Skip to content

draw.io is a JavaScript, client-side editor for general diagramming.

28.2.9 release

David Bensona4dffbda2d84
diff --git a/ChangeLog b/ChangeLog
index c43afe001..e4646a23f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-23-OCT-2025 28.2.8
+03-NOV-2025: 28.2.9
+
+- Updates DOMPurify from 3.2.5 to 3.3.0
+- Adds handling of light-dark grid settings [jgraph/drawio#5285]
+- Fixes cursor state in freehand mode [jgraph/drawio#4936]
+- [conf forge] Changes to allow plantUml
+
+23-OCT-2025: 28.2.8
- Hides inactive virtual bends for entity relations
- Fixes preview button in smart template section
diff --git a/VERSION b/VERSION
index 441dbd341..126280f3b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-28.2.8
\ No newline at end of file
+28.2.9
\ No newline at end of file
diff --git a/etc/dependencies/package.json b/etc/dependencies/package.json
index 201552b62..bacdf7cc4 100644
--- a/etc/dependencies/package.json
+++ b/etc/dependencies/package.json
@@ -15,7 +15,7 @@
"mermaid": "11.12.0",
"pako": "2.1.0",
"crypto-js": "3.1.2",
- "dompurify": "3.2.5",
+ "dompurify": "3.3.0",
"spin.js": "2.0.0",
"roughjs": "4.6.6",
"mathjax": "3.2.2"
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 017eb98ff..9fdcf84ff 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -1,7 +1,8 @@
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...M,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Ie=!1,Me=!0,ke=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,M),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...I]),yt=w({},[...M,...k]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Ie&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!Me&&S(/\/>/i,m)){At(a,e);continue}ke&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),s||(s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const u=w(Array.prototype.forEach),m=w(Array.prototype.lastIndexOf),p=w(Array.prototype.pop),f=w(Array.prototype.push),d=w(Array.prototype.splice),h=w(String.prototype.toLowerCase),g=w(String.prototype.toString),T=w(String.prototype.match),y=w(String.prototype.replace),E=w(String.prototype.indexOf),A=w(String.prototype.trim),_=w(Object.prototype.hasOwnProperty),b=w(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function R(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function D(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function C(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=D(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=C(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=o(e)}return function(){return null}}const O=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),x=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:W});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.3.0",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:w,Element:D,NodeFilter:B,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Y,trustedTypes:j}=n,q=D.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:be}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const we=R({},[...O,...x,...L,...I,...U]);let Re=null;const De=R({},[...z,...P,...F,...H]);let Ce=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Oe=null;const xe=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,ke=!0,Ie=!1,Me=!0,Ue=!1,ze=!0,Pe=!1,Fe=!1,He=!1,Be=!1,Ge=!1,We=!1,Ye=!0,je=!1,Xe=!0,qe=!1,$e={},Ke=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=R({},["audio","video","img","source","image","track"]);let Qe=null;const et=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let rt=ot,it=!1,at=null;const lt=R({},[tt,nt,ot],g);let ct=R({},["mi","mo","mn","ms","mtext"]),st=R({},["annotation-xml"]);const ut=R({},["title","style","font","a","script"]);let mt=null;const pt=["application/xhtml+xml","text/html"];let ft=null,dt=null;const ht=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),mt=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===mt?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ft):we,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ft):De,at=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):lt,Qe=_(e,"ADD_URI_SAFE_ATTR")?R(C(et),e.ADD_URI_SAFE_ATTR,ft):et,Ze=_(e,"ADD_DATA_URI_TAGS")?R(C(Je),e.ADD_DATA_URI_TAGS,ft):Je,Ke=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ft):Ve,ve=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ft):C({}),Oe=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ft):C({}),$e=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ge=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Xe=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,rt=e.NAMESPACE||ot,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(ke=!1),Ge&&(Be=!0),$e&&(Ne=R({},U),Re=[],!0===$e.html&&(R(Ne,O),R(Re,z)),!0===$e.svg&&(R(Ne,x),R(Re,P),R(Re,H)),!0===$e.svgFilters&&(R(Ne,L),R(Re,P),R(Re,H)),!0===$e.mathMl&&(R(Ne,I),R(Re,F),R(Re,H))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?xe.tagCheck=e.ADD_TAGS:(Ne===we&&(Ne=C(Ne)),R(Ne,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?xe.attributeCheck=e.ADD_ATTR:(Re===De&&(Re=C(Re)),R(Re,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&R(Qe,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.FORBID_CONTENTS,ft)),Xe&&(Ne["#text"]=!0),Pe&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),dt=e}},yt=R({},[...x,...L,...k]),Et=R({},[...I,...M]),At=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},_t=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Ge)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(rt===ot)try{t=(new Y).parseFromString(o,mt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(rt,"template",null);try{t.documentElement.innerHTML=it?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===ot?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},wt=function(e){return"function"==typeof w&&e instanceof w};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,dt)}))}const Dt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return At(e),!0;const n=ft(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),ze&&e.hasChildNodes()&&!wt(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return At(e),!0;if(e.nodeType===ee)return At(e),!0;if(ze&&e.nodeType===te&&b(/<[/\w]/g,e.data))return At(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(n))&&(!Ne[n]||ve[n])){if(!ve[n]&&vt(n)){if(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Xe&&!Ke[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return At(e),!0}return e instanceof D&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===ot?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===ot?"math"===n:t.namespaceURI===nt?"math"===n&&st[o]:Boolean(Et[n]):e.namespaceURI===ot?!(t.namespaceURI===nt&&!st[o])&&!(t.namespaceURI===tt&&!ct[o])&&!Et[n]&&(ut[n]||!yt[n]):!("application/xhtml+xml"!==mt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(At(e),!0)},Ct=function(e,t,n){if(Ye&&("id"===t||"name"===t)&&(n in r||n in ht))return!1;if(ke&&!Oe[t]&&b(ye,t));else if(Le&&b(Ee,t));else if(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e));else if(!Re[t]||Oe[t]){if(!(vt(e)&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&b(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Qe[t]);else if(b(Se,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ze[e]){if(Ie&&!b(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&T(e,be)},Ot=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ft(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!je||"id"!==s&&"name"!==s||(_t(a,e),f="user-content-"+f),ze&&b(/((--!?|])>)|<\/(style|title|textarea)/i,f)){_t(a,e);continue}if("attributename"===s&&T(f,"href")){_t(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(a,e);continue}if(!Me&&b(/\/>/i,f)){_t(a,e);continue}Ue&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=ft(e.nodeName);if(Ct(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Nt(e)?At(e):p(o.removed)}catch(t){_t(a,e)}}else _t(a,e)}Rt(de.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),Dt(n),Ot(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!wt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Fe||Tt(t),o.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=ft(e.nodeName);if(!Ne[t]||ve[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=bt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Be&&!Ue&&!Pe&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=bt(e),!n)return Be?null:We?ce:""}n&&He&&At(n.firstChild);const c=St(qe?e:n);for(;i=c.nextNode();)Dt(i),Ot(i),i.content instanceof s&&xt(i.content);if(qe)return e;if(Be){if(Ge)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ue&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},o.clearConfig=function(){dt=null,Fe=!1},o.isValidAttribute=function(e,t,n){dt||Tt({});const o=ft(e),r=ft(t);return Ct(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+//# sourceMappingURL=purify.min.js.map
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
@@ -67,7 +68,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -2036,8 +2037,8 @@ this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,b);y.setAttribute("title",b);w.appendChild(y)}b=
document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.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!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
var A=mxUtils.button(f,function(){p&&a.hideDialog();null!=g&&g()});A.className="geBtn";e.appendChild(A);null!=h&&(f=mxUtils.button(h,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){A.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e,f){this.create(a,b,e,f)};
-PrintDialog.prototype.create=function(a){function b(A){var E=h.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(E){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*D);F.height=Math.ceil(F.height*D);H*=D;!E&&e.pageVisible?(D=e.getPageLayout(),M-=D.x*F.width,N-=D.y*F.height):
-E=!0;E=PrintDialog.createPrintPreview(e,H,F,0,M,N,E);E.open();A&&PrintDialog.printPreview(E)}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 m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
+PrintDialog.prototype.create=function(a){function b(A){var D=h.checked||k.checked,E=parseInt(w.value)/100;isNaN(E)&&(E=1,w.value="100%");mxClient.IS_SF&&(E*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(D){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*E);F.height=Math.ceil(F.height*E);H*=E;!D&&e.pageVisible?(E=e.getPageLayout(),M-=E.x*F.width,N-=E.y*F.height):
+D=!0;D=PrintDialog.createPrintPreview(e,H,F,0,M,N,D);D.open();A&&PrintDialog.printPreview(D)}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 m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
m.appendChild(p);mxEvent.addListener(p,"click",function(A){h.checked=!h.checked;k.checked=!h.checked;mxEvent.consume(A)});mxEvent.addListener(h,"change",function(){k.checked=!h.checked});d.appendChild(m);g.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,
"click",function(A){k.checked=!k.checked;h.checked=!k.checked;mxEvent.consume(A)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);g.appendChild(d);mxEvent.addListener(k,"change",
function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");h.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
@@ -2045,18 +2046,18 @@ m.style.paddingTop="20px";m.setAttribute("align","right");p=mxUtils.button(mxRes
m.appendChild(p);d.appendChild(m);g.appendChild(d);f.appendChild(g);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}};
PrintDialog.createPrintPreview=function(a,b,e,f,g,d,h){b=new mxPrintPreview(a,b,e,f,g,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=h;h=a.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";b.backgroundColor=h;var m=b.isTextLabel;b.isTextLabel=function(k){return"geHint"==!k.className&&m.apply(this,arguments)};var p=b.getLinkForCellState;b.getLinkForCellState=function(k){return a.getAbsoluteUrl(p.apply(this,arguments))};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
+var PageSetupDialog=function(a){function b(){var E=w;null!=E&&null!=E.originalSrc&&(E=a.createImageForPageLink(E.originalSrc,null));null!=E&&null!=E.src?(u.style.backgroundImage="url("+E.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}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("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 m=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 p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.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")+":");
+h=document.createElement("td");h.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var E=parseInt(p.value);p.value=Math.max(1,isNaN(E)?e.getGridSize():E)});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 k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";
-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();h.appendChild(u);h.appendChild(k);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");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,y,w,m.get());D.ignoreColor=e.background==y;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
-(D.shadowVisible=A);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";h.appendChild(E);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,D=function(E){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(E)};mxEvent.addListener(k,"click",D);mxEvent.addListener(u,"click",D);b();h.appendChild(u);h.appendChild(k);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");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(p.value);isNaN(E)||e.gridSize===E||e.setGridSize(E);E=new ChangePageSetup(a,y,w,m.get());E.ignoreColor=e.background==y;E.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
+(E.shadowVisible=A);e.pageFormat.width==E.previousFormat.width&&e.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage&&E.shadowVisible==e.shadowVisible||e.model.execute(E)});D.className="geBtn gePrimaryBtn";h.appendChild(D);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var g=document.createElement("input");g.setAttribute("name",b);g.setAttribute("type","radio");g.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var h=document.createElement("select");h.style.position="relative";h.style.marginBottom="4px";h.style.borderRadius="4px";h.style.borderWidth="1px";h.style.borderStyle="solid";
h.style.boxSizing="border-box";h.style.padding="2px";h.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";g.style.marginRight="6px";m.appendChild(g);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,
mxResources.get("landscape"));m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign=
-"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<A.length;E++){var D=document.createElement("option");D.setAttribute("value",A[E].unit);mxUtils.write(D,A[E].label);y.appendChild(D)}y.value=Editor.pageSizeUnit;k.appendChild(y);
-m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(E=0;E<H.length;E++)A=H[E],F[A.key]=A,D=document.createElement("option"),D.setAttribute("value",A.key),mxUtils.write(D,A.title),h.appendChild(D);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
+"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],D=0;D<A.length;D++){var E=document.createElement("option");E.setAttribute("value",A[D].unit);mxUtils.write(E,A[D].label);y.appendChild(E)}y.value=Editor.pageSizeUnit;k.appendChild(y);
+m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(D=0;D<H.length;D++)A=H[D],F[A.key]=A,E=document.createElement("option"),E.setAttribute("value",A.key),mxUtils.write(E,A.title),h.appendChild(E);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==V.format.width&&e.height==V.format.height?(h.value=V.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==V.format.height&&e.height==V.format.width&&(h.value=V.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
h.value?(u.value=Editor.toUnit(e.width,y.value),w.value=Editor.toUnit(e.height,y.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};M();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var N=function(J,V){J=F[h.value];null!=J.format?(u.value=Editor.toUnit(d.checked?J.format.height:J.format.width,y.value),w.value=Editor.toUnit(d.checked?J.format.width:J.format.height,y.value),k.style.display=
"none",m.style.display=""):(m.style.display="none",k.style.display="");J=parseFloat(u.value);if(isNaN(J)||0>=J)u.value=Editor.toUnit(e.width,y.value);J=parseFloat(w.value);if(isNaN(J)||0>=J)w.value=Editor.toUnit(e.height,y.value);J=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),y.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),y.value)));V||J.width==e.width&&J.height==e.height||(e=J,null!=f&&f(e))};mxEvent.addListener(b,"click",function(J){g.checked=!0;N(J);mxEvent.consume(J)});
@@ -2065,28 +2066,28 @@ Editor.pageSizeUnit),y.value);Editor.pageSizeUnit=y.value;N(J,!0);mxEvent.consum
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,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
-E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(E,(g||mxResources.get("filename"))+":");A.appendChild(E);y.appendChild(A);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-g||null==h)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=D,M.style.backgroundColor=
-"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(D);y.appendChild(A);
-null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),
+var FilenameDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var D=document.createElement("div");D.style.display="inline-block";
+D.style.textOverflow="ellipsis";D.style.whiteSpace="nowrap";D.style.overflow="hidden";D.style.fontSize="10pt";D.style.padding="2px 0";D.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(D,(g||mxResources.get("filename"))+":");A.appendChild(D);y.appendChild(A);var E=document.createElement("input");E.setAttribute("value",b||"");E.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(E.value))p&&a.hideDialog(),f(E.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+g||null==h)if(null!=u?Editor.selectFilename(E):(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=E,M.style.backgroundColor=
+"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(E);y.appendChild(A);
+null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,E,a.editor.diagramFileTypes),
b.style.width="100%",A.appendChild(b));null!=h&&y.appendChild(h);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});A.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));
-a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(D,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
+a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(E,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(g)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var h=b.value.lastIndexOf(".drawio.");h=0<h?h:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<h?b.value.substring(0,h+1)+d:b.value+"."+d;"createEvent"in
document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var h=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){h=m;break}}f.value=h};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};
var WrapperWindow=function(a,b,e,f,g,d,h,m){m=null!=m?m:document.createElement("div");this.window=new mxWindow(b,m,e,f,g,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);h(m)};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph;if(null!=h.container&&!h.transparentBackground){if(h.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=h.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(h.container),p.style.position="absolute",h.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){h.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=
h.tooltipHandler&&h.tooltipHandler.isHideOnHover()&&h.tooltipHandler.hide();h.isMouseDown&&!mxEvent.isConsumed(k)&&h.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
-10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",E=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var D=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),y=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
-this.scale-y+m,E)+H*h)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
-"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=E,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
+mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",D="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){D=
+10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",D=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var E=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(E=this.getBackgroundPageBounds(),y=1+E.x,E=1+E.y);D=-Math.round(D-mxUtils.mod(this.translate.x*
+this.scale-y+m,D)+H*h)+"px "+-Math.round(D-mxUtils.mod(this.translate.y*this.scale-E+p,D)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=D,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
+"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=D,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}h=mxUtils.getLightDarkColor(h);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){a.apply(this,arguments);
if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+h,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(h,m,p){var k=this.view.scale,u=this.view.translate,w=this.pageFormat,y=k*this.pageScale,A=this.view.getBackgroundPageBounds();
-m=A.width;p=A.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),D=(h=h&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,F=h?Math.ceil(m/E.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?D:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
-Math.round(A.y+(V+1)*E.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*E.height))]:[new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
+m=A.width;p=A.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(p/D.height)-1:0,F=h?Math.ceil(m/D.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?E:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
+Math.round(A.y+(V+1)*D.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*D.height))]:[new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var h=
e.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),m=0<h.width?h.x/this.scale-this.translate.x:0,p=0<h.height?h.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var y=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+y*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+h.height/this.scale)/k)-y)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2103,10 +2104,10 @@ navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{Y=[parseInt(ba[1],10),p
(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(Y){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(Y)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(Y)-ba.y-this.diagramContainer.clientHeight?
this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(Y,ba){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(Y){16==Y.which?this.shiftDown=!0:32!=Y.which||g.isEditing()?mxEvent.isConsumed(Y)||27!=Y.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||
mxEvent.getSource(Y)!=g.container||mxEvent.consume(Y))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(Y){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(Y){return y.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(Y.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(Y.getEvent()))&&
-(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var E=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=mxUtils.bind(this,
+(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,
function(){if(null!=this.toolbar)for(var Y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ba=this.toolbar.container.firstChild;null!=ba;){var L=ba.getAttribute("data-min-width");null!=L&&parseInt(L)>Y?ba.style.display="none":ba.style.display="";ba=ba.nextSibling}}),F=!1,H=null,M=null,N=null,J=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=g.cellEditor.isContentEditing()){for(var Y=this.toolbar.container.firstChild,ba=[];null!=Y;){var L=Y.nextSibling;Y.parentNode.removeChild(Y);
-ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;D()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",D);mxEvent.addListener(window,"resize",
-D);D();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
+ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,"resize",
+E);E();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
"input",ba);mxEvent.addListener(g.cellEditor.textarea,"touchend",ba);mxEvent.addListener(g.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(g.cellEditor.textarea,"keyup",ba);ba()}};var W=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(Y,ba){try{W.apply(this,arguments),J()}catch(L){f.handleError(L)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(Y){}var T=g.fireMouseEvent;
g.fireMouseEvent=function(Y,ba,L){try{Y==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(U){f.handleError(U)}};var O=g.foldCells;g.foldCells=function(Y,ba,L,U,X){try{O.apply(this,arguments)}catch(ia){f.handleError(ia)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(Y,ba,L){this.menus.createPopupMenu(Y,ba,L)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(Y){g.popupMenuHandler.hideMenu()}));
this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(Y,ba){var L=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(L.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(L[L.length-1]))},0));g.pasteCellStyles(L)});var fa=null,S=null;a=mxUtils.bind(this,function(){if(null!=this.toolbar){var Y=this.getSelectionState();g.isEnabled()&&
@@ -2125,32 +2126,32 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
arguments);e.updateActionStates()};a.showLinkDialog=mxUtils.bind(e,e.showLinkDialog);a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),e=this.initSelectionState(),f=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(e,b[g],b,f),f=!1)}this.updateSelectionStateForTableCells(e);if(Editor.enableCustomProperties){e.customProperties={};a=e.vertices;b=e.edges;for(g=0;g<a.length;g++)this.findCommonProperties(a[g],e.customProperties,0==g,e);
for(g=0;g<b.length;g++)this.findCommonProperties(b[g],e.customProperties,0==a.length&&0==g,e)}return e};
-EditorUi.prototype.findCommonProperties=function(a,b,e,f){f=mxUtils.bind(this,function(p){if(null!=p)if(e)for(var k=0;k<p.length;k++)b[p[k].name]=p[k];else for(var u in b)if(null!=u){var w=!1;for(k=0;k<p.length;k++)if(p[k].name==u&&p[k].type==b[u].type){w=!0;break}w||delete b[u]}});var g=this.editor.graph,d=g.view.getState(a);if(null!=d&&null!=d.shape){if(!d.shape.commonCustomPropAdded){d.shape.commonCustomPropAdded=!0;d.shape.customProperties=d.shape.customProperties||[];if(null!=d.shape&&null!=
-d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=mxUtils.bind(this,function(p){p=h.desc.getElementsByTagName(p);for(var k=[],u=0;u<p.length;u++){var w=p[u].getAttribute("color");if(!mxUtils.isValidColor(w)){var y=p[u].getAttribute("name");y=null!=y?y:Editor.getLabelForStylename(w);var A=p[u].getAttribute("default");A=null!=A?A:h.getDefaultColorValue(p[u],g);k.push({name:w,type:"color",primary:"false"!=p[u].getAttribute("primary"),defVal:A,defaultColor:A,undefinedColor:A,dispName:y})}}return k});
-Array.prototype.push.apply(d.shape.customProperties,m("fillcolor"));Array.prototype.push.apply(d.shape.customProperties,m("strokecolor"))}d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)}f(d.shape.customProperties)}a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(p){}};
+EditorUi.prototype.findCommonProperties=function(a,b,e,f){f=mxUtils.bind(this,function(k){if(null!=k)if(e)for(var u=0;u<k.length;u++)b[k[u].name]=k[u];else for(var w in b)if(null!=w){var y=!1;for(u=0;u<k.length;u++)if(k[u].name==w&&k[u].type==b[w].type){y=!0;break}y||delete b[w]}});var g=this.editor.graph,d=g.view.getState(a);if(null!=d&&null!=d.shape){if(!d.shape.commonCustomPropAdded){d.shape.commonCustomPropAdded=!0;d.shape.customProperties=d.shape.customProperties||[];if(null!=d.shape&&null!=
+d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=[],p=mxUtils.bind(this,function(k){k=h.desc.getElementsByTagName(k);for(var u=[],w=0;w<k.length;w++){var y=k[w].getAttribute("color");if(!mxUtils.isValidColor(y)&&!m[y]){m[y]=!0;var A=k[w].getAttribute("name");A=null!=A?A:Editor.getLabelForStylename(y);var D=k[w].getAttribute("default");D=null!=D?D:h.getDefaultColorValue(k[w],g);u.push({name:y,type:"color",primary:"false"!=k[w].getAttribute("primary"),defVal:D,defaultColor:D,undefinedColor:D,
+dispName:A})}}return u});Array.prototype.push.apply(d.shape.customProperties,p("fillcolor"));Array.prototype.push.apply(d.shape.customProperties,p("strokecolor"));Array.prototype.push.apply(d.shape.customProperties,p("fontcolor"))}d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)}f(d.shape.customProperties)}a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(k){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),g=e.getParent(f);if(null!=f&&null!=g){for(var d=f.getIndex(b[0]),h=g.getIndex(f),m=null,p=1,k=1,u=0,w=h<g.getChildCount()-1?e.getChildAt(e.getChildAt(g,h+1),d):null;u<b.length-1;){var y=b[++u];null==w||w!=y||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(w),w=h+k<g.getChildCount()?e.getChildAt(e.getChildAt(g,h+k),d):null);var A=this.editor.graph.view.getState(y);
if(y==e.getChildAt(f,d+p)&&null!=A&&1==mxUtils.getValue(A.style,"colspan",1)&&1==mxUtils.getValue(A.style,"rowspan",1))p++;else break}u==k*p-1&&(a.mergeCell=b[0],a.colspan=p,a.rowspan=k)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
EditorUi.prototype.createTimeout=function(a,b,e){var f=!0,g=null,d=mxUtils.bind(this,function(m){g.clear()&&(f=!1,m=null!=m?m:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(a,b,e)})},null!=e?e(m):this.handleError(m))}),h=window.setTimeout(d,null!=a?a:this.timeout);g={clear:function(){window.clearTimeout(h);return f},isAlive:function(){return f}};null!=b&&this.tryAndHandle(mxUtils.bind(this,function(){b(g)}),d);return g};
EditorUi.prototype.tryAndHandle=function(a,b){try{a()}catch(e){null!=b?b(e):this.handleError(e)}};
EditorUi.prototype.removeUserDefinedDarkColors=function(a,b,e){var f=this.editor.graph;a=null!=a?a:f.getSelectionCells();var g=Graph.colorStyles,d=document.createElement("div");f.model.beginUpdate();try{for(var h=0;h<a.length;h++)if(f.model.isEdge(a[h])||f.model.isVertex(a[h])){var m=f.getCellStyle(a[h],!1);if(null!=m)for(var p=0;p<g.length;p++)try{var k=m[g[p]];if(mxUtils.isLightDarkColor(k)){var u=mxUtils.getLightDarkColor(k);f.setCellStyles(g[p],u.light,[a[h]])}}catch(y){}b&&f.isHtmlLabel(a[h])&&
-"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),y.style.setProperty(A,E.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
+"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,D){return mxUtils.isLightDarkColor(D)?(D=mxUtils.getLightDarkColor(D),y.style.setProperty(A,D.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
EditorUi.prototype.updateSelectionStateForCell=function(a,b,e,f){e=this.editor.graph;a.cells.push(b);if(e.getModel().isVertex(b)){a.connections=0<e.model.getEdgeCount(b);a.unlocked=a.unlocked&&!e.isCellLocked(b);a.resizable=a.resizable&&e.isCellResizable(b);a.rotatable=a.rotatable&&e.isCellRotatable(b);a.movable=a.movable&&e.isCellMovable(b)&&!e.isTableRow(b)&&!e.isTableCell(b);a.swimlane=a.swimlane||e.isSwimlane(b);a.table=a.table||e.isTable(b);a.cell=a.cell||e.isTableCell(b);a.row=a.row||e.isTableRow(b);
a.vertices.push(b);var g=e.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else e.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
!1);d=e.view.getState(b);null!=d&&(a.html=a.html&&e.isHtmlLabel(b),a.autoSize=a.autoSize||e.isAutoSizeState(d),a.glass=a.glass&&e.isGlassState(d),a.rounded=a.rounded&&e.isRoundedState(d),a.lineJumps=a.lineJumps&&e.isLineJumpState(d),a.image=a.image||e.isImageState(d),a.shadow=a.shadow&&e.isShadowState(d),a.fill=a.fill&&e.isFillState(d),a.gradient=a.fill&&e.isGradientState(d),a.stroke=a.stroke&&e.isStrokeState(d),b=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||
"image"==b,e.mergeStyle(d.style,a.style,f))};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(p,k){"mouseDown"==k.getProperty("eventName")&&b.hideShapePicker()}));var e=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",e);a.addListener(mxEvent.ESCAPE,e);a.view.addListener(mxEvent.SCALE,e);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);a.getSelectionModel().addListener(mxEvent.CHANGE,e);var f=a.popupMenuHandler.isMenuShowing;
a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var g=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,E){var D=a.getCompositeParent(p.cell);y=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=y&&y.relative;)cell=
-D,D=a.model.getParent(cell),y=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(F){E(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
-k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(E,A,D,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(D,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
-function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,E,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
+e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,D){var E=a.getCompositeParent(p.cell);y=a.getCellGeometry(E);for(u.consume();null!=E&&a.model.isVertex(E)&&null!=y&&y.relative;)cell=
+E,E=a.model.getParent(cell),y=a.getCellGeometry(E);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),E,mxUtils.bind(this,function(F){D(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
+k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),D=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var E=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(D,A,E,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(E,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
+function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,D,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
EditorUi.prototype.centerShapePicker=function(a,b,e,f,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):g==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};
EditorUi.prototype.showShapePicker=function(a,b,e,f,g,d,h,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,h,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};
-EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(D){D=D[0];var F=0,H=0,M=D.geometry;null!=M&&(w.model.isEdge(D)&&(D=M.getTerminalPoint(!1),M=new mxRectangle(0,0,D.x,D.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
-g=w.view.getState(e);var E=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(D){var F=document.createElement("a");y.appendChild(F);null!=E&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var H=D.geometry;w.model.isEdge(D)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([D],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(D);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
-N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
+EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(E){E=E[0];var F=0,H=0,M=E.geometry;null!=M&&(w.model.isEdge(E)&&(E=M.getTerminalPoint(!1),M=new mxRectangle(0,0,E.x,E.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
+g=w.view.getState(e);var D=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(E){var F=document.createElement("a");y.appendChild(F);null!=D&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(D,[E]):this.sidebar.graph.pasteCellStyles([E],w.currentVertexStyle,w.currentEdgeStyle);var H=E.geometry;w.model.isEdge(E)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([E],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(E);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
+N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(E,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
"center",H.style.justifyContent="center",F.appendChild(H))});for(k=0;k<(m?Math.min(h.length,4):h.length);k++)g(h[k]);h=y.offsetTop+y.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<h&&(y.style.top=Math.max(w.container.scrollTop+22,b-h)+"px");h=y.offsetLeft+y.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<h&&(y.style.left=Math.max(w.container.scrollLeft+22,a-h)+"px")}return y};
EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,g=mxUtils.bind(this,function(d,h,m,p){return f.createVertex(null,null,p||"",0,0,h||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,h,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=h?h:0),!1);d.geometry.points=null!=h?[new mxPoint(d.geometry.width/2,h)]:[];d.geometry.relative=!0;d.edge=
!0;return d});if(null!=a)try{a=f.cloneCell(a),f.model.isVertex(a)&&null!=a.geometry&&(a.geometry.x=0,a.geometry.y=0)}catch(d){a=null}null==a&&(a=g(f.appendFontSize(Editor.defaultTextStyle,f.vertexFontSize),60,30,"Text"));a=[a,g("whiteSpace=wrap;html=1;"),g("ellipse;whiteSpace=wrap;html=1;",80,80),g("rhombus;whiteSpace=wrap;html=1;",80,80),g("rounded=1;whiteSpace=wrap;html=1;"),g("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),g("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2170,7 +2171,7 @@ EditorUi.prototype.getImageForEdgeStyle=function(a){var b=Format.orthogonalImage
null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==e&&(b="vertical"==mxUtils.getValue(a,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return b};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var h=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{h=h||d.getSelectionCells();h=d.getExportableCells(d.model.getTopmostCells(h));for(var m={},p=d.createCellLookup(h),k=d.cloneCells(h,null,m),u=new mxGraphModel,w=u.getChildAt(u.getRoot(),
-0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var E=d.getCellGeometry(k[y]);null!=E&&E.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(E.offset=null,E.relative=!1,E.x=A.x/A.view.scale-A.view.translate.x,E.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
+0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var D=d.getCellGeometry(k[y]);null!=D&&D.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(D.offset=null,D.relative=!1,D.x=A.x/A.view.scale-A.view.translate.x,D.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=e.apply(this,arguments);a.updatePasteActionStates();return h};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*P.width),this.scale*(this.translate.y+ca.y*P.height),this.scale*ca.width*
@@ -2186,8 +2187,8 @@ mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appe
": "+this.currentPage.getName());p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(ca-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(ca+1,this.pages.length)].getName())}});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var y=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display=
"",k.style.display="inline-block"):(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var A=this.menus.get("pages");null!=A&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(ca){var P=new mxPopupMenu(A.funct);P.smartSeparators=!0;P.showDisabled=!0;P.autoExpand=!0;P.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(P,arguments);P.destroy()});var da=mxUtils.getOffset(k);P.popup(da.x,da.y+k.offsetHeight,null,ca);mxEvent.addListener(P.div,
"mouseleave",mxUtils.bind(this,function(){P.hideMenu()}))}))}this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){a.isLightboxView()?
-(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,F=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),
-600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,F=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
+600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=M.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
P.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){M.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(ca){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
@@ -2282,14 +2283,14 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&"undefined"!==typeof wind
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(f){f=new ChangePageSetup(this,null,f);f.ignoreColor=!0;this.editor.graph.model.execute(f)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(A){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var F=f.getCellGeometry(E[D]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(E[D],
-F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(D);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(D),37==w||38==w?f.model.add(F,D,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,D,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(D,0,0,f.getMovableCells(E)),null!=M.first&&(D=
-E=0,37==w?E=-y:38==w?D=-y:39==w?E=y:40==w&&(D=y),M.currentDx+=E*H,M.currentDy+=D*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
+EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var D=f.getCompositeParents(f.getSelectionCells()),E=0<D.length?D[0]:null;if(null!=E)if(A){f.getModel().beginUpdate();try{for(E=0;E<D.length;E++)if(f.getModel().isVertex(D[E])&&f.isCellResizable(D[E])){var F=f.getCellGeometry(D[E]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(D[E],
+F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(E);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(E)&&null!=f.layoutManager&&!f.isCellLocked(E)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(E),37==w||38==w?f.model.add(F,E,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,E,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(E,0,0,f.getMovableCells(D)),null!=M.first&&(E=
+D=0,37==w?D=-y:38==w?E=-y:39==w?D=y:40==w&&(E=y),M.currentDx+=D*H,M.currentDy+=E*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&
(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var h=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=g.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var y=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?y=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?
y=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(y=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=y)return y.funct;if("/"==w.key&&!this.isControlDown(w)&&!mxEvent.isAltDown(w))return function(){var A=document.getElementById("geOmniSearch");null!=A&&30<A.clientWidth&&A.focus()};if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var A=
f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=A&&0<A.length&&(1==A.length&&f.model.isEdge(A[0])?f.setSelectionCell(f.model.getTerminal(A[0],!1)):f.setSelectionCell(A[A.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(w)?function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null,!0)}:function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null)}}return p.apply(this,
-arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,E){var D=this.actions.get(A);null!=D&&(A=function(){D.isEnabled()&&D.funct.apply(this,arguments)},y?E?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):E?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
+arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,D){var E=this.actions.get(A);null!=E&&(A=function(){E.isEnabled()&&E.funct.apply(this,arguments)},y?D?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):D?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
g.bindAction(80,!0,"print");g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(61,!0,"zoomIn");g.bindAction(187,!0,"zoomIn");g.bindAction(222,!0,"zoomIn");g.bindAction(173,!0,"zoomOut");g.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)g.bindAction(79,!0,"outline",!0),g.bindControlKey(36,function(){f.isEnabled()&&f.foldCells(!0)}),g.bindControlKey(35,function(){f.isEnabled()&&f.foldCells(!1)}),g.bindControlKey(13,function(){k.ctrlEnter()}),g.bindAction(8,
!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),
g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(90,!0,"redo",!0),g.bindAction(89,!0,"redo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,
@@ -2347,20 +2348,20 @@ Sidebar.prototype.isEntryIgnored=function(a,b){b=!b;if(null!=a.parentLibraries&&
Sidebar.prototype.searchEntries=function(a,b,e,f,g,d){if(null!=this.taglist&&null!=a){"mxgraph."==a.substring(0,8)&&0>a.indexOf(" ")&&8<a.lastIndexOf(".")&&(a=a.substring(8).replace(/\./g," "));var h=a.toLowerCase().split(" ");a=new mxDictionary;g=(e+1)*b;for(var m=[],p=0,k=0;k<h.length;k++){var u=Editor.soundex(h[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[h[k]];var w=null!=m?m.entries.slice():[];m=this.taglist[u];w=null!=m?w.concat(m.entries):w;u=new mxDictionary;if(0<w.length){m=[];
for(var y=0;y<w.length;y++){var A=w[y];if(0==p==(null==a.get(A))&&null==u.get(A)&&(u.put(A,A),!this.isEntryIgnored(A,d)&&(m.push(A),k==h.length-1&&m.length==g))){f(m.slice(e*b,g),g,!0,h);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,h)}else f([],null,null,h)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};
Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};
-Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){D=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
+Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){E=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
h.className="geSidebar geSearchSidebar";a||(h.style.display="none");var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";var p=document.createElement("input");p.setAttribute("id","geOmniSearch");p.setAttribute("placeholder",mxResources.get("typeSlashToSearch"));p.setAttribute("type","text");m.appendChild(p);var k=document.createElement("img");k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));
k.className="geAdaptiveAsset";m.appendChild(k);h.appendChild(m);var u=!1;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(S){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(S)!=p||document.activeElement==p||(p.focus(),mxClient.IS_GC||mxClient.IS_FF?p.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(S){mxEvent.getSource(S)==p&&u&&mxEvent.consume(S)}),mxUtils.bind(this,function(S){u&&(mxEvent.consume(S),u=!1)}));var w=[],y=mxUtils.bind(this,function(S,aa){f.hideCurrentMenu();
-mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),E=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
-0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),D=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=D||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
-p.value.toLowerCase();D=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
-null,mxUtils.bind(this,function(){f.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?E(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
-function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==D&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
-f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==D&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
+mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
+0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),E=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
+p.value.toLowerCase();E=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
+null,mxUtils.bind(this,function(){f.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?D(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
+function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==E&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
+f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==E&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
var H=mxUtils.button(mxResources.get("moreResults"),function(){fa()});H.setAttribute("title",mxResources.get("moreResults"));H.className="geBtn gePrimaryBtn";H.style.borderRadius="16px";H.style.padding="8px 12px";F.appendChild(H);h.appendChild(F);var M="",N=!1,J=!1,V=0,W={},T=12,O=mxUtils.bind(this,function(){N=!1;this.currentSearch=null;for(var S=h.firstChild;null!=S;){var aa=S.nextSibling;S!=m&&S!=F&&S.parentNode.removeChild(S);S=aa}});mxEvent.addListener(k,"click",function(){k.getAttribute("src")!=
Editor.magnifyImage&&e();p.focus()});var fa=mxUtils.bind(this,function(){f.hideCurrentMenu();T=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=p.value){if(null!=F.parentNode&&(M!=p.value&&(O(),M=p.value,W={},J=!1,V=0),!N&&!J)){H.setAttribute("disabled","true");F.style.display="flex";H.style.cursor="wait";H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");N=!0;var S={};this.currentSearch=S;try{this.searchEntries(M,T,V,mxUtils.bind(this,
function(aa,Y,ba,L){if(this.currentSearch==S){aa=null!=aa?aa:[];N=!1;V++;this.insertSearchHint(h,M,T,V,aa,Y,ba,L);0==aa.length&&1==V&&(M="");null!=F.parentNode&&F.parentNode.removeChild(F);for(Y=0;Y<aa.length;Y++)mxUtils.bind(this,function(U){try{var X=U();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(U,!1)&&(X.style.opacity=this.closedLibraryOpacity);null==W[X.innerHTML]?(W[X.innerHTML]=null!=U.parentLibraries?U.parentLibraries.slice():[],h.appendChild(X)):null!=
U.parentLibraries&&(W[X.innerHTML]=W[X.innerHTML].concat(U.parentLibraries));mxEvent.addGestureListeners(X,null,null,mxUtils.bind(this,function(ia){var ja=W[X.innerHTML];mxEvent.isPopupTrigger(ia)&&this.showPopupMenuForEntry(X,ja,ia)}));mxEvent.disableContextMenu(X)}catch(ia){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ia.stack)):console.error(ia))}})(aa[Y]);ba?(H.removeAttribute("disabled"),H.innerHTML="",mxUtils.write(H,mxResources.get("moreResults"))):
-(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=D?(D(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
+(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=E?(E(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
(e(),mxEvent.consume(S))}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==p.value?(k.setAttribute("src",Editor.magnifyImage),k.setAttribute("title",mxResources.get("search"))):(k.setAttribute("src",Editor.crossImage),k.setAttribute("title",mxResources.get("reset")));""==p.value?(J=!0,F.style.display="none"):p.value!=M?(F.style.display="none",J=!1):N||(F.style.display=J?"none":"flex")}),0)});mxEvent.addListener(p,"keyup",a);mxEvent.addListener(p,"paste",a);mxEvent.addListener(p,
"cut",a);mxEvent.addListener(p,"mousedown",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});mxEvent.addListener(p,"selectstart",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});a=document.createElement("div");a.appendChild(h);this.appendChild(a);this.palettes.search=[d,a]};
Sidebar.prototype.insertSearchHint=function(a,b,e,f,g,d,h,m){0==g.length&&1==f&&(e=document.createElement("div"),e.className="geSidebarText",b=mxResources.get("noResultsFor",[b]),e.setAttribute("title",b),mxUtils.write(e,b),a.appendChild(e))};
@@ -2473,17 +2474,17 @@ a.width,(e-2*this.thumbBorder)/a.height))/100,this.graph.view.scaleAndTranslate(
null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder-1)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=g&&0!=h&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",
b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),f.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a"),D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";mxEvent.addListener(E,"click",function(H){mxEvent.consume(H)});var F=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
-null!=w?(E.className="geButton",E.style.backgroundImage="url("+w+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):(E.className="geItem",this.createThumb(D,k,u,E,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(E,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
-null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(H){mxEvent.isMouseEvent(H)&&this.showTooltip(E,a,F.width,F.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};
+Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var D=document.createElement("a"),E=2*this.thumbBorder;D.style.width=k+E+"px";D.style.height=u+E+"px";mxEvent.addListener(D,"click",function(H){mxEvent.consume(H)});var F=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(E=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(E),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
+null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.backgroundRepeat="no-repeat",D.style.backgroundPosition="center",D.style.backgroundSize="24px 24px"):(D.className="geItem",this.createThumb(E,k,u,D,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(D,this.createDropHandler(a,!0,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
+null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(H){mxEvent.isMouseEvent(H)&&this.showTooltip(D,a,F.width,F.height,b,e)}))):(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
Sidebar.prototype.createDropHandler=function(a,b,e,f,g,d){e=null!=e?e:!0;return mxUtils.bind(this,function(h,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&h.isEnabled()){a=h.getImportableCells(a);if(0<a.length){h.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:h.isValidDropTarget(p,a,m);var y=null;null==p||w||(p=null);if(!h.isCellLocked(p||
-h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,E=h.view.translate,D=(k+E.x)*A,F=(u+E.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,D,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
-h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;E=h.view.translate;D=(k+E.x)*A;F=(u+E.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],D,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
+h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,D=h.view.translate,E=(k+D.x)*A,F=(u+D.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,E,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
+h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;D=h.view.translate;E=(k+D.x)*A;F=(u+D.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],E,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
h.setSelectionCells(y));(g||h.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=y&&1==y.length)&&window.setTimeout(function(){h.startEditing(y[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
-Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(A);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=D=0;if(null!=k){var H=k.origin;D=H.x;
-F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),N=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-D,p.y-=H.y-F));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=F;D=y.x;F=y.y;m.model.isEdge(b[f])&&(F=D=0);k=b=m.importCells(b,p.x-(M?D:0),p.y-
+Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),D=!0;if(null!=m.layoutManager){var E=m.layoutManager.getLayout(A);null!=E&&E.constructor==mxStackLayout&&(D=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=E=0;if(null!=k){var H=k.origin;E=H.x;
+F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),N=m.getCellAt((p.x+E+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-E,p.y-=H.y-F));else if(!D||m.isTableRow(a)||m.isTableCell(a))p.x+=E,p.y+=F;E=y.x;F=y.y;m.model.isEdge(b[f])&&(F=E=0);k=b=m.importCells(b,p.x-(M?E:0),p.y-
(M?F:0),M?A:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var J=m.getCellGeometry(b[f]),V=null!=J?J.getTerminalPoint(!0):null;J.points=null;if(null!=V)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var W=m.getCellGeometry(b[e]),T=null!=W?W.getTerminalPoint(!0):null;null!=T&&T.x==V.x&&T.y==V.y&&m.model.setTerminal(b[e],
-a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),D=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
+a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),E=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,E,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(fa){this.editorUi.handleError(fa)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var g=this.editorUi.editor.graph,d=g.view,h=1<f.length,m=g.view.getState(a),p=g.getCellGeometry(a);f=g.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),g.model.isEdge(a)?(p=m.absolutePoints,b=p[0],g=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=g.x/d.scale-d.translate.x-f.width/2,f.y=g.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),
p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),g=f.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+
@@ -2492,7 +2493,7 @@ f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+p.height/2+f.height/2+d:e==mx
2):e==mxConstants.DIRECTION_WEST&&(f.x-=p.getCenterX()+p.width/2,f.y-=p.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(oa,za){var Aa=mxUtils.createImage(oa.src);Aa.style.width=oa.width+"px";Aa.style.height=oa.height+"px";null!=za&&Aa.setAttribute("title",za);mxUtils.setOpacity(Aa,oa==this.refreshTarget?30:20);Aa.style.position="absolute";Aa.style.cursor="crosshair";return Aa}function m(oa,za,Aa,Ma){null!=Ma.parentNode&&(mxUtils.contains(Aa,oa,za)?(mxUtils.setOpacity(Ma,100),U=Ma):mxUtils.setOpacity(Ma,Ma==S?30:20));return Aa}var p=this.editorUi,k=
-p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,E=0;E<f.length&&A;E++)d+=k.model.getDescendants(f[E]).length,A=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,D=0;D<f.length&&A;D++)d+=k.model.getDescendants(f[D]).length,A=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
J&&U==S){var Ka=oa.isCellSelected(J.cell)?oa.getSelectionCells():[J.cell];oa.updateShapes(oa.model.isEdge(J.cell)?f[0]:f[w],Ka,!0);oa.setSelectionCells(Ka)}else null!=f&&null!=U&&null!=M&&U!=S?(Ka=oa.model.isEdge(M.cell)||null==u?w:u,oa.setSelectionCells(this.dropAndConnect(M.cell,f,L,Ka,za,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(oa.view.getState(oa.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);A&&(F.createDragElement=mxUtils.bind(this,function(){return F.createPreviewElement(this.graph)}),
F.createPreviewElement=mxUtils.bind(this,function(oa){var za=document.createElement("a");za.className="geItem";za.style.overflow="visible";oa=oa.view.scale;za.style.width=oa*Math.max(1,g.width)+"px";za.style.height=oa*Math.max(1,g.height)+"px";mxUtils.setOpacity(za,50);var Aa=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Aa),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(Aa,oa*Math.max(1,g.width),oa*Math.max(1,g.height),za,null,null,null,null,null,k.shapeBackgroundColor,
0,oa);return za}));var H=F.mouseDown;F.mouseDown=function(oa){mxEvent.isPopupTrigger(oa)||mxEvent.isMultiTouchEvent(oa)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),H.apply(this,arguments))};var M=null,N=null,J=null,V=!1,W=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),O=h(this.triangleDown,mxResources.get("connect")),fa=h(this.triangleLeft,mxResources.get("connect")),S=h(this.refreshTarget,mxResources.get("replace")),aa=null,Y=h(this.roundDrop),
@@ -2502,7 +2503,7 @@ null:oa.getCellGeometry(M.cell),Ja=oa.getCellGeometry(f[Ma]),ra=oa.model.getPare
Pa.height*Aa.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=F.currentHighlight&&null!=F.currentHighlight.state&&oa.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*Aa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
g.height*Aa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),ca=0,P=null,da=this.editorUi.editor.graph.getCellStyle(f[0]);F.getDropTarget=mxUtils.bind(this,function(oa,za,Aa,Ma){var Pa=mxEvent.isAltDown(Ma)||
null==f?null:oa.getCellAt(za,Aa,null,null,null,function(Wa,Xa,bb){return oa.isContainer(Wa.cell)&&"0"!=mxUtils.getValue(Wa.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ka=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ka)&&this.graph.isCellConnectable(Ka)&&(Pa=Ka)}oa.isCellLocked(Pa)&&(Pa=null);var Ja=oa.view.getState(Pa);Ka=U=null;P!=Ja?(ta=(new Date).getTime(),ca=0,P=Ja,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(D&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
+null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(E&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(da,mxConstants.STYLE_SHAPE)||1500<ca||oa.model.isEdge(Ja.cell))&&ca>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ja)&&(oa.model.isVertex(Ja.cell)&&null!=w||oa.model.isEdge(Ja.cell)&&oa.model.isEdge(f[0]))){if(oa.isCellEditable(Ja.cell)){J=Ja;var ra=oa.model.isEdge(Ja.cell)?oa.view.getPoint(Ja):new mxPoint(Ja.getCenterX(),Ja.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height);S.style.left=Math.floor(ra.x)+"px";S.style.top=Math.floor(ra.y)+"px";null==aa&&(oa.container.appendChild(S),aa=S.parentNode);m(za,Aa,ra,S)}}else null==J||!mxUtils.contains(J,za,Aa)||1500<ca&&!mxEvent.isShiftDown(Ma)?(J=null,null!=aa&&(S.parentNode.removeChild(S),aa=null)):null!=J&&null!=aa&&(ra=oa.model.isEdge(J.cell)?oa.view.getPoint(J):new mxPoint(J.getCenterX(),J.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height),m(za,Aa,ra,S));if(V&&null!=M&&!mxEvent.isAltDown(Ma)&&null==U){Ka=mxRectangle.fromRectangle(M);if(oa.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=Y.parentNode&&(ra=Da[0],Ka.add(m(za,Aa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),Y)));null!=ba.parentNode&&(Da=Da[Da.length-1],Ka.add(m(za,Aa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
@@ -2518,7 +2519,7 @@ Ka.length;ra++)null!=Ka[ra].parentNode&&Ka[ra].parentNode.removeChild(Ka[ra]);V|
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()){for(var g=b=null,d=0;d<a.length&&(null==g&&f.model.isVertex(a[d])?g=d:null==b&&f.model.isEdge(a[d])&&null==f.model.getTerminal(a[d],!0)&&(b=d),null==g||null==b);d++);d=null==b?g:b;f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:
mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,d,e,g,b));f.scrollCellToVisible(f.getSelectionCell())}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,b,e,f){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,y=null;b.getGraphForEvent=function(A){return k?g.apply(this,arguments):null};b.mouseDown=function(A){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(A),mxEvent.getClientY(A));y=a.style.opacity;k=!1;""==y&&(y="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(A){(k=null!=u&&(Math.abs(u.x-
-mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(E){b.reset(),w.editorUi.handleError(E)}}};
+mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(D){b.reset(),w.editorUi.handleError(D)}}};
Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,g,d,h,m){null!=m&&null!=g&&(m+=" "+g);m=null!=m&&0<m.length?m:null!=g?g.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,g,d,h)}))};Sidebar.prototype.createVertexTemplate=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,g,d,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,g,d,h,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),w=new mxGraphModel;u.decode(k.documentElement,w);p=this.graph.cloneCells(w.root.getChildAt(0).children)}catch(y){f=mxResources.get("error")+": "+y.message}return this.createVertexTemplateFromCells(p,b,e,f,g,d,h,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){return this.createItem(a,f,g,d,b,e,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createEdgeTemplateEntry=function(a,b,e,f,g,d,h,m,p){h=null!=h&&0<h.length?h:g.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,e,f,g,d,m,p)}))};
@@ -2531,8 +2532,8 @@ Sidebar.prototype.setContentVisible=function(a,b){var e=Editor.transitionDelay;m
(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",null);a.style.display="none"}),1E3*e))};Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
Sidebar.prototype.addImagePalette=function(a,b,e,f,g,d,h){for(var m=[],p=0;p<g.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var y=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=y?y:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(g[p],null!=d?d[p]:null,null!=h?h[g[p]]:null);this.addPaletteFunctions(a,
b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,E,D){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(E*h),Math.round(D*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,E,D,F,H){(null==g||0>mxUtils.indexOf(g,E))&&w.appendChild(this.createVertexTemplate("shape="+A+E.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",E.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,D,E){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(D*h),Math.round(E*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,D,E,F,H){(null==g||0>mxUtils.indexOf(g,D))&&w.appendChild(this.createVertexTemplate("shape="+A+D.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",D.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.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.refreshListener&&(this.editorUi.removeListener(this.refreshListener),this.refreshListener=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(f){for(var g=0;g<a.length;g++)f=f.replace(new RegExp("&"+a[g][0]+";","g"),"&#"+a[g][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,g,d,h){return e(Graph.sanitizeHtml(f),g,d,h)}})();
@@ -2563,8 +2564,8 @@ mouseUp:mxUtils.bind(this,function(L,U){k=h=m=p=null})})}this.cellRenderer.minSv
null,"simple"==L.view.graph.getAdaptiveColors())&&(L.lastSanitizedLabelValue=y.innerHTML)),U=L.lastSanitizedLabelValue));return U};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);
this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(L,U){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var A=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=A.apply(this,arguments);if(this.graph.pageVisible){var U=[],X=this.graph.pageFormat,ia=this.graph.pageScale,ja=X.width*ia;X=X.height*ia;ia=this.graph.view.translate;for(var ta=this.graph.view.scale,ca=this.graph.getPageLayout(),P=0;P<ca.width;P++)U.push(new mxRectangle(((ca.x+
P)*ja+ia.x)*ta,(ca.y*X+ia.y)*ta,ja*ta,X*ta));for(P=1;P<ca.height;P++)U.push(new mxRectangle((ca.x*ja+ia.x)*ta,((ca.y+P)*X+ia.y)*ta,ja*ta,X*ta));L=U.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,U){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=E.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var D=this.graphHandler.start;
-this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
+arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=D.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var E=this.graphHandler.start;
+this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=ia&&this.graph.applyNewEdgeStyle(ia,[ca]);return ca};var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),M=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;N.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),M=0):M=(new Date).getTime()-H};var J=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<M||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&J.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(L){return V.apply(this,arguments)||mxEvent.isShiftDown(L)};var W=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(W=this.container.style.cursor,
this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=W)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var T=this.click;this.click=function(L){var U=null==L.state&&null!=L.sourceState&&this.isCellLocked(this.getLayerForCell(L.sourceState.cell));if(this.isEnabled()&&!U||L.isConsumed())return T.apply(this,arguments);
@@ -2589,7 +2590,7 @@ Graph.createSvgNode=function(a,b,e,f,g){var d=mxUtils.createXmlDocument(),h=null
e+"px");h.setAttribute("height",f+"px");h.setAttribute("viewBox",a+" "+b+" "+e+" "+f);d.appendChild(h);return h};
Graph.htmlToPng=function(a,b,e,f,g,d){g=null!=g?g:"";d=null!=d?d:Editor.htmlRasterScale;var h=document.createElement("canvas");h.width=b*d;h.height=e*d;var m=document.createElement("img");m.onload=mxUtils.bind(this,function(){try{var k=h.getContext("2d");k.scale(d,d);k.drawImage(m,0,0);f(h.toDataURL())}catch(u){f(null)}});var p=mxUtils.createXmlDocument();p=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");a=(new mxSvgCanvas2D(p)).convertHtml(a);m.onerror=
function(k){f(null)};m.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+b+'" height="'+e+'">'+(""!=g?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+g+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+a+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,E){return null!=f?f(y,A,E):mxUtils.isValidColor(E)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),E=mxUtils.getLightDarkColor(E,null,null,e),y.style.setProperty(A,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
+Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,D){return null!=f?f(y,A,D):mxUtils.isValidColor(D)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),D=mxUtils.getLightDarkColor(D,null,null,e),y.style.setProperty(A,D.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
""==d[p].style.getPropertyValue("color")&&(w=d[p].getAttribute("color"),m=g(d[p],"color",w)||m);null!=b&&null!=h&&d[p].setAttribute(b,JSON.stringify(h))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var g=a[f].getAttribute(b);if(null!=g){a[f].removeAttribute(b);var d=JSON.parse(g),h;for(h in d){var m=d[h];""==m?(a[f].style[h]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[h]=m;e=!0}}}catch(p){}return e};
Graph.getGivenColor=function(a,b){var e=null;if(a.nodeType==mxConstants.NODETYPE_ELEMENT){try{var f=a.getAttribute(Graph.backupStyleAttribute);if(null!=f){var g=JSON.parse(f);null!=g&&null!=g[b]&&("color"==b&&"FONT"==a.nodeName&&""==g[b]&&null!=a.getAttribute("color")?e=a.getAttribute("color"):""!=g[b]&&(e=g[b]))}}catch(d){}null==e&&""!=a.style[b]&&(e=a.style[b])}return e};
Graph.setTextColor=function(a,b,e){for(var f=e?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,g=e?"color":"background-color",d=a.getElementsByTagName("*"),h=[],m=0;m<d.length;m++)h.push({node:d[m],value:d[m].style[g]});document.execCommand(e?"forecolor":"backcolor",!1,f);a=a.getElementsByTagName("*");for(m=0;m<a.length;m++){if(m<h.length&&h[m].node==a[m]&&h[m].value!=a[m].style[g]&&""==a[m].style[g])try{if(d=a[m].getAttribute(Graph.backupStyleAttribute),null!=d){var p=JSON.parse(d);p[g]=
@@ -2600,16 +2601,16 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.b
Graph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),g=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,e,f,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},g)},0)};
-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,E=w.container.offsetHeight/2;w.rootCell=
-y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var D=y.referenceCell||y,F=f.model.getCell(D.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
-M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(D,
+Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,D=w.container.offsetHeight/2;w.rootCell=
+y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var E=y.referenceCell||y,F=f.model.getCell(E.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
+M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(E,
null==V[N].getTerminal(!0)),F=0;F<V[N].getChildCount();F++){var W=V[N].getChildAt(F);null!=W.geometry&&W.geometry.relative&&(W.setStyle(W.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),W.geometry.offset=new mxPoint(0,0),W.geometry.y=0,W.geometry.x=.5>W.geometry.x?-.8:.5<W.geometry.x?.8:0)}if(0<y.startIndex){var T=w.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((y.startIndex||0)/pageSize)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-T.referenceCell=D;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=D;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
-S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=E-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=E-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
+T.referenceCell=E;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=E;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
+S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=D-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=D-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
Math.min(w.container.offsetWidth/2-40,w.container.offsetHeight/2-80));for(A=0;A<Y;A++)aa=w.getModel().getGeometry(y[A]),null!=aa&&(aa=aa.clone(),aa.x+=L*Math.sin(A*ba),aa.y+=L*Math.cos(A*ba),w.getModel().setGeometry(y[A],aa))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=f.background==
mxConstants.NONE||null==f.background?"light-dark(#ffffff,"+Editor.darkColor+")":f.background;var p=document.createElement("img");p.setAttribute("src",Editor.closeBlackImage);p.style.position="absolute";p.style.cursor="pointer";p.style.right="10px";p.style.top="10px";m.appendChild(p);var k=document.createElement("div");k.style.position="absolute";k.style.cursor="pointer";k.style.right="38px";k.style.top="14px";k.style.textAlign="right";k.style.verticalAlign="top";mxUtils.write(k,mxResources.get("close"));
m.appendChild(k);document.body.appendChild(m);var u=function(w){27==w.keyCode&&p.click()};mxEvent.addListener(document,"keydown",u);(function(w){var y=new Graph(w);y.keepEdgesInBackground=!0;y.isCellResizable=function(){return!1};y.isCellRotatable=function(){return!1};y.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};y.getFoldingImage=function(){return null};var A=function(){mxEvent.removeListener(document,"keydown",u);w.parentNode.removeChild(w);f.scrollCellToVisible(g)};
-mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var E=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):E.apply(this,arguments)};A=y.container.offsetWidth/2;var D=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=D-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
+mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var D=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):D.apply(this,arguments)};A=y.container.offsetWidth/2;var E=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=E-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
function(M,N){H||(M=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,y.labelsVisible=!1,H=!0,mxEffects.animateChanges(y,M,function(){var J=new mxParallelEdgeLayout(y);J.spacing=60;var V=J.layout;J.layout=function(W){J.spacing=Math.min(60,Math.max(30,60-5*W.length));V.apply(this,arguments)};J.execute(y.getDefaultParent());mxText.prototype.enableBoundingBox=!0;y.labelsVisible=!0;y.tooltipHandler.hide();y.refresh();d(y);H=!1}))});h(y,F)})(m)})(a,b)};
Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
@@ -2636,14 +2637,14 @@ h.shape?h.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.ge
mxUtils.getValue(h.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(h){return!0};Graph.prototype.getVerticesAndEdges=function(h,m){h=null!=h?h:!0;m=null!=m?m:!0;var p=this.model;return p.filterDescendants(function(k){return h&&p.isVertex(k)||m&&p.isEdge(k)},p.getRoot())};Graph.prototype.applyNewEdgeStyle=function(h,m,p){h=this.getCellStyle(h).newEdgeStyle;if(null!=h){this.model.beginUpdate();try{var k=JSON.parse(h),u;for(u in k)this.setCellStyles(u,k[u],m),"edgeStyle"==
u&&"elbowEdgeStyle"==k[u]&&null!=p&&this.setCellStyles("elbow",p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",m)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(h){for(var m={},p=0;p<h.length;p++){var k=this.view.getState(h[p]);null!=k&&this.mergeStyle(k.style,m,0==p)}return m};Graph.prototype.mergeStyle=function(h,m,p){if(null!=h){var k={},u;for(u in h){var w=h[u];null!=w&&(k[u]=!0,null==m[u]&&p?m[u]=w:m[u]!=w&&delete m[u])}for(u in m)k[u]||
delete m[u]}};Graph.prototype.getStartEditingCell=function(h,m){m=this.getCellStyle(h);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h)&&(h=this.model.getChildAt(h,0),m=this.getCellStyle(h),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(m=0;m<this.model.getChildCount(h);m++){var p=
-this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,E=!1;if(0<h.length)for(var D=0;D<h.length&&(A=this.getModel().isVertex(h[D])||A,!(E=this.getModel().isEdge(h[D])||
-E)||!A);D++);else E=A=!0;A=A&&!w;E=E&&!y;for(D=0;D<m.length;D++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(A||h)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||h)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
-m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),E=!1;null!=y.style&&(pairs=y.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(D,J);0<=V&&D.splice(V,
-1);for(E=0;E<Graph.cellStyleGroups.length;E++){var W=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(D,W[T]);0<=O&&D.splice(O,1)}}}}var fa=this.model.isEdge(y);E=fa?p:m;for(H=0;H<D.length;H++){J=D[H];var S=E[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==E.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==E.curved&&(A=mxUtils.setStyle(A,
+this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,D=!1;if(0<h.length)for(var E=0;E<h.length&&(A=this.getModel().isVertex(h[E])||A,!(D=this.getModel().isEdge(h[E])||
+D)||!A);E++);else D=A=!0;A=A&&!w;D=D&&!y;for(E=0;E<m.length;E++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[E]),"strokeColor"!=m[E]||null!=p[E]&&"none"!=p[E])if(0<=mxUtils.indexOf(Graph.cellStyles,m[E])||"shape"==m[E])if("shape"!=m[E]&&(A||h)&&(null==p[E]?delete k[m[E]]:k[m[E]]=p[E]),D||h)null==p[E]?delete u[m[E]]:u[m[E]]=p[E]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
+m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),D=!1;null!=y.style&&(pairs=y.style.split(";"),D=D||0<=mxUtils.indexOf(pairs,"text"));if(D)var E=Graph.textStyles;else if(E=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(E,J);0<=V&&E.splice(V,
+1);for(D=0;D<Graph.cellStyleGroups.length;D++){var W=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(E,W[T]);0<=O&&E.splice(O,1)}}}}var fa=this.model.isEdge(y);D=fa?p:m;for(H=0;H<E.length;H++){J=E[H];var S=D[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==D.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==D.curved&&(A=mxUtils.setStyle(A,
"curved",null)))}Editor.simpleLabels&&(A=mxUtils.setStyle(mxUtils.setStyle(A,"html",null),"whiteSpace",null));this.model.setStyle(y,A)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(A in h){var y=h[A];if(k[A]!=y){if(A==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[A]&&"umlLifeline"!=
y){w=!0;var A="participant"}this.setCellStyles(A,y,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=
-function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),E=this.getScaledCellAt(h,m,A,k,u,w);if(null!=E)return E;if(this.isCellVisible(A)&&
-(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(E=this.view.getState(A),null!=E&&(null==w||!w(E,h,m))&&this.intersects(E,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
+function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),D=this.getScaledCellAt(h,m,A,k,u,w);if(null!=D)return D;if(this.isCellVisible(A)&&
+(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(D=this.view.getState(A),null!=D&&(null==w||!w(D,h,m))&&this.intersects(D,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
m.relative;)h=this.getModel().getParent(h),m=this.getCellGeometry(h);return h};Graph.prototype.isPart=function(h){return"1"==mxUtils.getValue(this.getCurrentCellStyle(h),"part","0")||this.isTableCell(h)||this.isTableRow(h)};Graph.prototype.getCompositeParents=function(h){for(var m=new mxDictionary,p=[],k=0;k<h.length;k++){var u=this.getCompositeParent(h[k]);this.isTableCell(u)&&(u=this.graph.model.getParent(u));this.isTableRow(u)&&(u=this.graph.model.getParent(u));null==u||m.get(u)||(m.put(u,!0),
p.push(u))}return p};Graph.prototype.getReferenceTerminal=function(h){if(null!=h){var m=this.getCellGeometry(h);null!=m&&m.relative&&(h=this.model.getParent(h))}null!=h&&this.model.isEdge(h)&&(h=this.model.getParent(h));null!=h&&(h=this.getCompositeParent(h));return h};Graph.prototype.getCompositeParent=function(h){for(;this.isPart(h);){var m=this.model.getParent(h);if(!this.model.isVertex(m))break;h=m}return h};Graph.prototype.filterSelectionCells=function(h){var m=this.getSelectionCells();if(null!=
h){for(var p=[],k=0;k<m.length;k++)h(m[k])||p.push(m[k]);m=p}return m};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(h){if(this.useCssTransforms){var m=this.currentScale,p=this.currentTranslate;h=new mxRectangle((h.x+2*p.x)*m-p.x,(h.y+2*p.y)*m-p.y,h.width*m,h.height*m)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(h){h=this.strokeWidth;this.graph.useCssTransforms&&(h/=this.graph.currentScale);return h};mxGraphView.prototype.getGraphBounds=
@@ -2681,8 +2682,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);ret
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,h=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
-12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:E,ss:h(E),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+h(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),D=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var E=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
+12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:D,ss:h(D),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<E?"-":"+")+h(100*Math.floor(Math.abs(E)/60)+Math.abs(E)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),g=f.getChildCount(f.root),d=0;d<g;d++)mxUtils.bind(this,function(h){function m(){f.isVisible(h)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(h)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(h)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);
@@ -2701,11 +2702,11 @@ Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.mo
Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};
Graph.prototype.connectVertex=function(a,b,e,f,g,d,h,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var y=this.view.translate;k=y.x*e;y=y.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,y=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,y+u.y*e)).grow(40*e);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==A||d[D]==this.model.getParent(a)))A=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var F=this.view.getState(d[D]);null==w||null==F||mxUtils.intersects(w,F)||(E=d[D])}}var H=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=E;E=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==E&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
-!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),E=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&H||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==E&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==E&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==E&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,D=null;if(null!=d){d=d.reverse();for(var E=0;E<d.length;E++)if(!this.isCellLocked(d[E])&&!this.model.isEdge(d[E])&&d[E]!=a)if(!this.model.isAncestor(a,d[E])&&this.isContainer(d[E])&&(null==A||d[E]==this.model.getParent(a)))A=d[E];else if(null==D&&this.isCellConnectable(d[E])&&!this.model.isAncestor(d[E],a)&&!this.isSwimlane(d[E])){var F=this.view.getState(d[E]);null==w||null==F||mxUtils.intersects(w,F)||(D=d[E])}}var H=
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=D;D=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==D&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
+!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),D=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&H||null==D&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==D&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==D&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==D&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,g=0;g<a.length;g++)if(f=a[g],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2791,25 +2792,25 @@ TableLayout.prototype.getRowLayout=function(a,b){var e=this.graph.model.getChild
TableLayout.prototype.layoutRow=function(a,b,e,f){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var h=a.x,m=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var p=0;p<d.length;p++){var k=this.graph.getCellGeometry(d[p]);null!=k&&(k=k.clone(),k.y=a.y,k.height=e-a.y-a.height,null!=b?(k.x=b[p],k.width=b[p+1]-k.x,p==d.length-1&&p<b.length-2&&(k.width=f-k.x-a.x-a.width)):(k.x=h,h+=k.width,p==d.length-1?k.width=f-a.x-a.width-m:m+=k.width),k.alternateBounds=new mxRectangle(0,
0,k.width,k.height),g.setGeometry(d[p],k))}return m};
TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var h=this.graph.getModel(),m=0;h.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=h.getChildCells(a,!0),w=0;w<u.length;w++)h.setVisible(u[w],!0);var y=this.getSize(u,!1);if(0<p&&0<k&&0<
-u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var E=d?null:this.getRowLayout(u[0],k),D=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],E,A.height,k,D));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
+u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var D=d?null:this.getRowLayout(u[0],k),E=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],D,A.height,k,E));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,h.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(H){h.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(w=0;w<u.length;w++)h.setVisible(u[w],
!1)}finally{h.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,y){y=null!=y?y:!0;var A=this.getState(w);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&!A.invalid&&this.updateLineJumps(A)&&this.graph.cellRenderer.redraw(A,!1,this.isRendering());A=b.apply(this,
arguments);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(A);return A};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(w){var y=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-y)for(var A=null,E=0;E<y.length;E++)if("hidden"!=y[E].getAttribute("visibility")){if(!(null!=A&&A!=y[E].getAttribute("d")||null!=w&&0!=--w))return y[E]}else null==A&&(A=y[E].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
+y)for(var A=null,D=0;D<y.length;D++)if("hidden"!=y[D].getAttribute("visibility")){if(!(null!=A&&A!=y[D].getAttribute("d")||null!=w&&0!=--w))return y[D]}else null==A&&(A=y[D].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,y){return g.apply(this,arguments)||null!=w.routedPoints&&null!=y.routedPoints&&!mxUtils.equalPoints(y.routedPoints,w.routedPoints)};
-var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,E=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;E.push(X);
-X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;E=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=D(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
+var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,D=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;D.push(X);
+X=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;D=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=E(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
1],aa=O[T];for(V=O[T+2];T<O.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,V.x,V.y,S.x,S.y)<1*this.scale*this.scale;)S=V,T++,V=O[T+2];var Y=mxUtils.intersection(N.x,N.y,M.x,M.y,aa.x,aa.y,S.x,S.y);if(null!=Y&&(Math.abs(Y.x-N.x)>F||Math.abs(Y.y-N.y)>F)&&(Math.abs(Y.x-M.x)>F||Math.abs(Y.y-M.y)>F)&&(null==fa||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,fa.x,fa.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,aa.x,aa.y)>F)&&(null==V||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,V.x,V.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,S.x,S.y)>F)){V=
-Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=D(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=D(0,Y.x,Y.y)||A}w.routedPoints=E;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
-this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
-this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*D/N,V.y=V.y*D/N):V=null);T>D*D&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>D*D&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,E,!1,null,H),J=0>Math.round(V.x)||
-0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,E,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
-mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,E){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,E){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,E);var D=this.getNextPoint(w,A,E),F=this.graph.isOrthogonal(w),
-H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);D=mxUtils.getRotatedPoint(D,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(y,D,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),D=mxUtils.getRotatedPoint(D,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
-y,A,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,E,D){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);E=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-D.x)*(H.x-D.x)+(H.y-D.y)*(H.y-D.y);if(null==E||M<E)A=H,E=M}}null!=A&&(D=A)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
-null!=A.state&&(E=A.state.view.graph.replacePlaceholders(A.state.cell,E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),E=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&
-console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
+Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=E(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=E(0,Y.x,Y.y)||A}w.routedPoints=D;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
+this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
+this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*E/N,V.y=V.y*E/N):V=null);T>E*E&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>E*E&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,D,!1,null,H),J=0>Math.round(V.x)||
+0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,D,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
+mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,D){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,D){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,D);var E=this.getNextPoint(w,A,D),F=this.graph.isOrthogonal(w),
+H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);E=mxUtils.getRotatedPoint(E,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(y,E,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),E=mxUtils.getRotatedPoint(E,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
+y,A,D,E),D)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,D,E){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);D=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-E.x)*(H.x-E.x)+(H.y-E.y)*(H.y-E.y);if(null==D||M<D)A=H,D=M}}null!=A&&(E=A)}return E};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var D=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
+null!=A.state&&(D=A.state.view.graph.replacePlaceholders(A.state.cell,D));return D};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),D=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(D.documentElement))}catch(E){null!=window.console&&
+console.log("Error in shape: "+E)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var g=b[f];if(!mxStencilRegistry.isFileLoaded(g))if(mxStencilRegistry.setFileLoaded(g),".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=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};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var e=2;e<a.length-1;e++)b+="/"+a[e]}return b};
@@ -2851,8 +2852,8 @@ null!=C&&C.constructor==mxStackLayout&&(B=!1))}return B};Graph.prototype.getPref
!1);C.setTerminal(Q,ka,!0);C.setTerminal(Q,Z,!1);var ha=C.getGeometry(Q);if(null!=ha){ha=ha.clone();null!=ha.points&&ha.points.reverse();var la=ha.getTerminalPoint(!0),ya=ha.getTerminalPoint(!1);ha.setTerminalPoint(la,!1);ha.setTerminalPoint(ya,!0);C.setGeometry(Q,ha);var La=this.view.getState(Q),Ha=this.view.getState(Z),xa=this.view.getState(ka);if(null!=La){var Ga=null!=Ha?this.getConnectionConstraint(La,Ha,!0):null,va=null!=xa?this.getConnectionConstraint(La,xa,!1):null;this.setConnectionConstraint(Q,
Z,!0,va);this.setConnectionConstraint(Q,ka,!1,Ga);var ua=mxUtils.getValue(La.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(La.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[Q]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[Q])}G.push(Q)}}else if(C.isVertex(Q)&&(ha=this.getCellGeometry(Q),null!=ha)){if(!(this.isTable(Q)||this.isTableRow(Q)||this.isTableCell(Q)||this.isSwimlane(Q))){ha=ha.clone();
ha.x+=ha.width/2-ha.height/2;ha.y+=ha.height/2-ha.width/2;var Sa=ha.width;ha.width=ha.height;ha.height=Sa;C.setGeometry(Q,ha)}var Qa=this.view.getState(Q);if(null!=Qa){var Na=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Na[mxUtils.mod(mxUtils.indexOf(Na,Ra)+(B?-1:1),Na.length)],[Q])}G.push(Q)}}}finally{C.endUpdate()}return G};
-Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var E=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
-this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}E.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
+Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
+this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
null!=C.shape.stencil&&this.stencilHasPlaceholders(C.shape.stencil)?this.removeStateForCell(q[B]):this.isReplacePlaceholders(q[B])&&this.view.invalidate(q[B],!1,!1)}};Graph.prototype.replaceElement=function(q,B){B=q.ownerDocument.createElement(null!=B?B:"span");for(var C=Array.prototype.slice.call(q.attributes);attr=C.pop();)B.setAttribute(attr.nodeName,attr.nodeValue);B.innerHTML=q.innerHTML;q.parentNode.replaceChild(B,q)};Graph.prototype.processElements=function(q,B){if(null!=q){q=q.getElementsByTagName("*");
for(var C=0;C<q.length;C++)null!=q[C]&&B(q[C])}};Graph.prototype.updateLabelElements=function(q,B,C){q=null!=q?q:this.getSelectionCells();for(var G=document.createElement("div"),K=0;K<q.length;K++){var Q=this.getCurrentCellStyle(q[K]);if(null!=Q&&"1"==Q.html&&(Q=this.convertValueToString(q[K]),null!=Q&&0<Q.length)){G.innerHTML=Graph.sanitizeHtml(Q);for(var Z=G.getElementsByTagName(null!=C?C:"*"),ka=0;ka<Z.length;ka++)B(Z[ka]);G.innerHTML!=Q&&this.cellLabelChanged(q[K],G.innerHTML)}}};Graph.prototype.cellLabelChanged=
function(q,B,C){B=Graph.zapGremlins(B);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var G=q.getAttribute("placeholder"),K=q;null!=K;){if(K==this.model.getRoot()||null!=K.value&&"object"==typeof K.value&&K.hasAttribute(G)){this.setAttributeForCell(K,G,B);break}K=this.model.getParent(K)}var Q=q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&Q.hasAttribute("label_"+Graph.diagramLanguage)?
@@ -2860,14 +2861,14 @@ Q.setAttribute("label_"+Graph.diagramLanguage,B):Q.setAttribute("label",B);B=Q}m
this.isCellDeletable(K.cell)&&this.isTransparentState(K)){for(var Q=!0,Z=0;Z<this.model.getChildCount(K.cell)&&Q;Z++)B.get(this.model.getChildAt(K.cell,Z))||(Q=!1);Q&&q.push(K.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var B=[],C=0;C<q.length;C++)this.isCellDeletable(q[C])&&this.isTransparentState(this.view.getState(q[C]))&&B.push(q[C]);q=B;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=
function(q,B){this.setAttributeForCell(q,"link",B)};Graph.prototype.setTooltipForCell=function(q,B){var C="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(C="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,C,B)};Graph.prototype.getAttributeForCell=function(q,B,C){q=null!=q.value&&"object"===typeof q.value?q.value.getAttribute(B):null;return null!=q?q:C};Graph.prototype.setAttributeForCell=function(q,
B,C){if(null!=q.value&&"object"==typeof q.value)var G=q.value.cloneNode(!0);else G=mxUtils.createXmlDocument().createElement("UserObject"),G.setAttribute("label",q.value||"");null!=C?G.setAttribute(B,C):G.removeAttribute(B);this.model.setValue(q,G)};Graph.prototype.isTargetShape=function(q,B,C){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(C=0;C<B.length;C++){var G=mxUtils.getValue(this.getCurrentCellStyle(B[C]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(G,
-q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=D.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
+q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=E.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,B){this.isEnabled()&&(B=this.insertTextForEvent(q,B),mxGraph.prototype.dblClick.call(this,q,B))};Graph.prototype.insertTextForEvent=function(q,B){var C=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));if(null!=q&&!this.model.isVertex(B)){var G=this.model.isEdge(B)?this.view.getState(B):null,K=mxEvent.getSource(q);
this.firstClickState!=G||this.firstClickSource!=K||null!=G&&null!=G.text&&null!=G.text.node&&null!=G.text.boundingBox&&(mxUtils.contains(G.text.boundingBox,C.x,C.y)||mxUtils.isAncestorNode(G.text.node,mxEvent.getSource(q)))||(null!=G||this.isCellLocked(this.getDefaultParent()))&&(null==G||this.isCellLocked(G.cell))||!(null!=G||mxClient.IS_SVG&&K==this.view.getCanvas().ownerSVGElement)||(null==G&&(G=this.view.getState(this.getCellAt(C.x,C.y))),B=this.addText(C.x,C.y,G))}return B};Graph.prototype.getInsertPoint=
-function(){var q=this.getGridSize(),B=this.container.scrollLeft/this.view.scale-this.view.translate.x,C=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var G=this.getPageLayout(),K=this.getPageSize();B=Math.max(B,G.x*K.width);C=Math.max(C,G.y*K.height)}return new mxPoint(this.snap(B+q),this.snap(C+q))};Graph.prototype.getFreeInsertPoint=function(){var q=this.view,B=this.getGraphBounds(),C=this.getInsertPoint(),G=this.snap(Math.round(Math.max(C.x,B.x/q.scale-q.translate.x+
-(0==B.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(C.y,(B.y+B.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(G,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-
-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,B){q=null!=q?q:"";null!=B&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+B+";");return q};Graph.prototype.addText=function(q,B,C){var G=
-new mxCell;G.value="Text";G.geometry=new mxGeometry(0,0,0,0);G.vertex=!0;if(null!=C&&this.model.isEdge(C.cell)){G.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);G.geometry.relative=!0;G.connectable=!1;var K=this.view.getRelativePoint(C,q,B);G.geometry.x=Math.round(1E4*K.x)/1E4;G.geometry.y=Math.round(K.y);G.geometry.offset=new mxPoint(0,0);K=this.view.getPoint(C,G.geometry);var Q=this.view.scale;G.geometry.offset=new mxPoint(Math.round((q-
-K.x)/Q),Math.round((B-K.y)/Q))}else K=this.view.translate,G.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),G.geometry.width=40,G.geometry.height=20,G.geometry.x=Math.round(q/this.view.scale)-K.x-(null!=C?C.origin.x:0),G.geometry.y=Math.round(B/this.view.scale)-K.y-(null!=C?C.origin.y:0),G.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([G],null!=C?C.cell:null),this.fireEvent(new mxEventObject("textInserted",
+function(q){q=this.getGridSize();var B=this.container.scrollLeft/this.view.scale-this.view.translate.x,C=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var G=this.getPageLayout(),K=this.getPageSize();B=Math.max(B,G.x*K.width);C=Math.max(C,G.y*K.height)}return new mxPoint(this.snap(B+q),this.snap(C+q))};Graph.prototype.getFreeInsertPoint=function(q){var B=this.view,C=this.getGraphBounds(),G=this.getInsertPoint(q);q=this.snap(Math.round(Math.max(G.x,C.x/B.scale-
+B.translate.x+(0==C.width?2*this.gridSize:0))));B=this.snap(Math.round(Math.max(G.y,(C.y+C.height)/B.scale-B.translate.y+2*this.gridSize)));return new mxPoint(q,B)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,B){q=null!=q?q:"";null!=B&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+B+";");return q};Graph.prototype.addText=
+function(q,B,C){var G=new mxCell;G.value="Text";G.geometry=new mxGeometry(0,0,0,0);G.vertex=!0;if(null!=C&&this.model.isEdge(C.cell)){G.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);G.geometry.relative=!0;G.connectable=!1;var K=this.view.getRelativePoint(C,q,B);G.geometry.x=Math.round(1E4*K.x)/1E4;G.geometry.y=Math.round(K.y);G.geometry.offset=new mxPoint(0,0);K=this.view.getPoint(C,G.geometry);var Q=this.view.scale;G.geometry.offset=
+new mxPoint(Math.round((q-K.x)/Q),Math.round((B-K.y)/Q))}else K=this.view.translate,G.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),G.geometry.width=40,G.geometry.height=20,G.geometry.x=Math.round(q/this.view.scale)-K.x-(null!=C?C.origin.x:0),G.geometry.y=Math.round(B/this.view.scale)-K.y-(null!=C?C.origin.y:0),G.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([G],null!=C?C.cell:null),this.fireEvent(new mxEventObject("textInserted",
"cells",[G])),this.autoSizeCell(G)}finally{this.getModel().endUpdate()}return G};Graph.prototype.addClickHandler=function(q,B,C){var G=mxUtils.bind(this,function(){var ha=this.container.getElementsByTagName("a");if(null!=ha)for(var la=0;la<ha.length;la++){var ya=this.getAbsoluteUrl(ha[la].getAttribute("href"));null!=ya&&(ha[la].setAttribute("rel",this.linkRelation),ha[la].setAttribute("href",ya),null!=B&&mxEvent.addGestureListeners(ha[la],null,null,B))}});this.model.addListener(mxEvent.CHANGE,G);
G();var K=this.container.style.cursor,Q=this.getTolerance(),Z=this,ka={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(Z,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ha){var la=ha.sourceState;if(null==la||null==Z.getLinkForCell(la.cell))ha=Z.getCellAt(ha.getGraphX(),ha.getGraphY(),null,null,null,function(ya,La,Ha){return null==Z.getLinkForCell(ya.cell)}),la=null==la||Z.model.isAncestor(ha,la.cell)?
Z.view.getState(ha):null;la!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=la,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ha,la){this.startX=la.getGraphX();this.startY=la.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&(Z.container.style.cursor="move");this.updateCurrentState(la)},mouseMove:function(ha,la){if(Z.isMouseDown)null!=this.currentLink&&
@@ -3039,34 +3040,34 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,g){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);a.addListener("languageChanged",this.update);a.addListener("formatWidthChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(E,D,F,H){var M=mxUtils.bind(this,function(J,V){h!=E&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
-F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=E,h.classList.add("geActiveFormatTitle"),m!=D&&(null!=m&&(m.style.display="none"),m=D,m.style.display=""))});mxEvent.addListener(E,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
+Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(D,E,F,H){var M=mxUtils.bind(this,function(J,V){h!=D&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
+F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=D,h.classList.add("geActiveFormatTitle"),m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(D,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
g=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);g.style.display="none";var w=f.cloneNode(!1);p(f,g,k++);var y=e.cloneNode(!1);y.style.display="none";u=document.createElement("div");mxUtils.write(u,mxResources.get("style"));w.appendChild(u);w.setAttribute("title",mxResources.get("style"));e.appendChild(w);this.panels.push(new DiagramStylePanel(this,a,y));this.container.appendChild(y);p(w,y,k++,!0)}else if(b.isEditing())u=document.createElement("div"),
mxUtils.write(u,mxResources.get("text")),f.appendChild(u),f.setAttribute("title",mxResources.get("text")),e.appendChild(f),y=e.cloneNode(!1),y.style.display="none",this.panels.push(new TextFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++,!0);else{w=f.cloneNode(!1);var A=w.cloneNode(!1);0<g.cells.length&&(u=document.createElement("div"),mxUtils.write(u,mxResources.get("style")),f.appendChild(u),f.setAttribute("title",mxResources.get("style")),e.appendChild(f),y=e.cloneNode(!1),y.style.display=
"none",this.panels.push(new StyleFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++));u=document.createElement("div");mxUtils.write(u,mxResources.get("text"));w.appendChild(u);w.setAttribute("title",mxResources.get("text"));e.appendChild(w);y=e.cloneNode(!1);y.style.display="none";this.panels.push(new TextFormatPanel(this,a,y));this.container.appendChild(y);u=document.createElement("div");mxUtils.write(u,mxResources.get("arrange"));A.appendChild(u);A.setAttribute("title",mxResources.get("arrange"));
e.appendChild(A);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?p(w,y,k++):w.style.display="none";p(A,f,k++,!0)}e.className="geFormatTitleContainer"}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,E=mxUtils.bind(this,function(D){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
+BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,D=mxUtils.bind(this,function(E){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
w=null),h(F),a.value=(p?this.inUnit(F):F)+d,y=!1);else if(F!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var H=k.getSelectionState().cells;u.setCellStyles(b,F,H);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(H,function(N){N.removeAttribute("size");N.style.fontSize="";""==N.getAttribute("style")&&N.removeAttribute("style")});for(var M=0;M<H.length;M++)0==u.model.getChildCount(H[M])&&u.autoSizeCell(H[M],!1);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(D)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
+"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(E)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(E){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",D);mxEvent.addListener(a,"blur",D);return D};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.className="geFormatSectionTitle";mxUtils.write(b,a);return b};
BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;if(null!=e&&e.isEnabled()){b=mxUtils.button(e.getTitle(),mxUtils.bind(this,function(g){try{e.funct(g,g)}catch(d){this.editorUi.handleError(d)}}));var f=null!=e.shortcut?" ("+e.shortcut+")":"";b.setAttribute("title",e.getTitle()+f);b.style.marginBottom="2px";b.className="geFullWidthElement";a.appendChild(b)}return b};
BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,g=0,d=0;d<b.length;d++){var h=this.addAction(a,b[d]);null!=h&&(g++,0==mxUtils.mod(g,2)&&(f.style.marginRight="4px",f.style.width="104px",h.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=h)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,E){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(E))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
+BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,D){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(D))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
u.style.backgroundImage="url("+Editor.arrowDownImage+")";f.appendChild(u);mxEvent.addGestureListeners(k,function(y){mxEvent.consume(y)},null,function(y){m(mxEvent.isShiftDown(y)?p:e,"0",y);mxEvent.consume(y)});mxEvent.addGestureListeners(u,function(y){mxEvent.consume(y)},null,function(y){m(-(mxEvent.isShiftDown(y)?p:e),"2",y);mxEvent.consume(y)});if(g){var w=null;mxEvent.addGestureListeners(f,function(y){mxEvent.consume(y)},null,function(y){if(null!=w){try{w.select()}catch(A){}w=null;mxEvent.consume(y)}})}else mxEvent.addListener(f,
"click",function(y){mxEvent.consume(y)});return f};
BaseFormatPanel.prototype.createOption=function(a,b,e,f,g){var d=document.createElement("div");d.className="geFormatEntry";var h=document.createElement("input");h.setAttribute("type","checkbox");d.appendChild(h);var m=document.createElement("span");m.className="geStyleLabel";m.setAttribute("title",a);mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(w,y){p||(p=!0,w?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,
h.checked=!1),k!=w&&(k=w,b()!=k&&e(k,y)),p=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=h.getAttribute("disabled")){var y=mxEvent.getSource(w);if(y==d||y==m)h.checked=!h.checked;u(h.checked,w)}});u(k);null!=f&&(f.install(u),this.listeners.push(f));null!=g&&g(d);return d};
BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;g=null!=g?"null"==g?null:g:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=g},function(y){m&&u.stopEditing();if(null!=h)h.funct();else{u.getModel().beginUpdate();try{var A=null!=p?p:k.getSelectionState().cells;y=y?f:g;u.setCellStyles(b,y,A);null!=d&&d(A,y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}}},{install:function(y){this.listener=function(){y(mxUtils.getValue(w,b,e)!=g)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var E=document.createElement("input");E.setAttribute("type","checkbox");h||A.appendChild(E);var D=document.createElement("span");mxUtils.write(D,a);A.appendChild(D);var F=
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||A.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);A.appendChild(E);var F=
b(),H=!1,M=null,N=null,J=document.createElement("input");J.setAttribute("type","color");J.style.position="relative";J.style.visibility="hidden";J.style.top="10px";J.style.width="0px";J.style.height="0px";J.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(M=document.createElement("img"),M.src=Editor.colorDropperImage,M.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(M,"click",function(T){J.value=u(F);J.click();mxEvent.consume(T)}));var V=null,W=function(T,O){H||
(H=!0,null!=d&&d(T),O||(null!=V&&(y.cellEditor.restoreSelection(V),V=null),e(T)),F=b(),T=mxUtils.getLightDarkColor("default"!=F?F:m),O=document.createElement("div"),O.style.width="21px",O.style.height="12px",O.style.margin="2px 18px 2px 3px",O.style.borderWidth="1px",O.style.borderStyle="solid",O.style.backgroundColor=T.cssText,N.innerText="",N.appendChild(O),!p&&mxUtils.isLightDarkColor(F)&&T.light!=T.dark?O.style.background="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+
-" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?E.style.display=
-"none":(E.style.display="",null!=F&&F!=mxConstants.NONE?(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0):(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1)),N.style.display=E.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
-(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=E.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==E||"INPUT"!=T.nodeName)T!=E&&(E.checked=!E.checked),
-E.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
-BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(E){p.getModel().beginUpdate();try{var D=m.getSelectionState().cells;u[A]=E;var F=u.join(",");p.setCellStyles(b,
-F,D);null!=g&&g(E);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",D))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(E){this.listener=function(){var D=p.getCellStyle(p.getSelectionCell(),!1);null!=D&&(D=null!=D?null!=D[b]?D[b]:h:null,u=null!=D?mxUtils.parseColorList(D):[],E(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
+" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?D.style.display=
+"none":(D.style.display="",null!=F&&F!=mxConstants.NONE?(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0):(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1)),N.style.display=D.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
+(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=D.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==D||"INPUT"!=T.nodeName)T!=D&&(D.checked=!D.checked),
+D.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
+BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(D){p.getModel().beginUpdate();try{var E=m.getSelectionState().cells;u[A]=D;var F=u.join(",");p.setCellStyles(b,
+F,E);null!=g&&g(D);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",E))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(D){this.listener=function(){var E=p.getCellStyle(p.getSelectionCell(),!1);null!=E&&(E=null!=E?null!=E[b]?E[b]:h:null,u=null!=E?mxUtils.parseColorList(E):[],D(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,g,d,h,m){function p(){var y=u.getCellStyle(u.getSelectionCell(),!1);return null!=y?null!=y[b]?y[b]:h:null}var k=this.editorUi,u=k.editor.graph,w=p();return null!=w&&m&&1<mxUtils.parseColorList(w).length?this.createArrayCellColorOption(a,b,e,f,g,d,h):this.createColorOption(a,p,function(y){u.getModel().beginUpdate();try{var A=k.getSelectionState().cells;u.setCellStyles(b,y,A);null!=g&&g(y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(y){this.listener=function(){var A=u.getCellStyle(u.getSelectionCell(),!1);null!=A&&y(null!=A[b]?A[b]:h,!0)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}},f,null,d)};
BaseFormatPanel.prototype.addArrow=function(a){var b=document.createElement("div");b.className="geAdaptiveAsset geArrow";b.style.backgroundImage="url("+Editor.thinExpandImage+")";a.className="geStyleBtn";a.appendChild(b);return b};
@@ -3104,44 +3105,44 @@ BaseFormatPanel.prototype.getUnit=function(a){var b="";switch(this.editorUi.edit
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=f.getModel(),d=e.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var p=this.addUnitInput(h,this.getUnit(),87,52,function(){A.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
+null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
"hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var y=w.getElementsByTagName("input")[0];
-this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var E=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
-aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var F=this.addUnitInput(D,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(D,this.getUnit(),16,
-52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(D);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);M=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*J.x)/
-10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(D,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
-J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(u?"left":"line"),87,64);this.addLabel(D,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
-" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
-!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
+this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var D=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
+aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var F=this.addUnitInput(E,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(E,this.getUnit(),16,
+52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);M=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*J.x)/
+10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(E,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
+J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
+" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);E.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
+!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.y=aa):S.y=aa});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(J=f.getCellGeometry(d.vertices[0]),null!=J&&J.relative)){var fa=document.createElement("select");fa.style.position="absolute";fa.style.width="134px";fa.style.left="77px";m=document.createElement("option");m.setAttribute("value","none");m.setAttribute("title",mxResources.get("move"));mxUtils.write(m,
mxResources.get("move")+"...");fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","start");m.setAttribute("title",mxResources.get("linestart"));mxUtils.write(m,mxResources.get("linestart"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","center");m.setAttribute("title",mxResources.get("center"));mxUtils.write(m,mxResources.get("center"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","end");m.setAttribute("title",mxResources.get("lineend"));
-mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(D);mxUtils.br(D);D.appendChild(fa)}a.appendChild(D)}};
+mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(E);mxUtils.br(E);E.appendChild(fa)}a.appendChild(E)}};
ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+h.getUnit();else if(p!=d){g.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(g.getModel().isVertex(k[u])){var w=g.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var y=g.view.getState(k[u]);null!=y&&g.isRecursiveVertexResize(y)&&g.resizeChildCells(k[u],w);g.getModel().setGeometry(k[u],w);g.constrainChildCells(k[u])}}}finally{g.getModel().endUpdate()}d=
p;a.value=p+" "+h.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,g=f.editor.graph,d=null,h=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(h){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){g.getModel().beginUpdate();try{for(var p=f.getSelectionState().cells,k=0;k<p.length;k++)if(g.getModel().isEdge(p[k])){var u=g.getCellGeometry(p[k]);null!=u&&(u=u.clone(),b(u,m),g.getModel().setGeometry(p[k],u))}}finally{g.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(h)}var f=this.editorUi,g=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
V=Math.min(999,Math.max(1,isNaN(V)?1:V));if(V!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var W=e.getSelectionState().cells;f.setCellStyles("width",V,W);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[V],"cells",W))}m.value=V+" pt";mxEvent.consume(J)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
"absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("linestart"));k.appendChild(h);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){H.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
-this.addKeyHandler(u,D);this.addKeyHandler(w,D);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
-"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
-"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(E,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});
-D()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
+this.addKeyHandler(u,E);this.addKeyHandler(w,E);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),D=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
+null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
+"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
+"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(D,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
+E()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,B){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var C=mxUtils.getCurrentStyle(q);parseFloat(C.fontSize)*B/100!=parseFloat(C.lineHeight)?q.style.lineHeight=B+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,B){B?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var g=
this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=this.createTitle(mxResources.get("font"));a.appendChild(m);m=this.createPanel();m.className="geFormatEntry";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=g.toolbar.addMenu(g.menus.get("formatBlock"),mxResources.get("style"),null,p);this.addArrow(k);k.style.margin="0px";k.style.position="relative";k.classList.add("geFullWidthElement");a.appendChild(p)}k=m.cloneNode(!1);a.appendChild(k);p=this.createPanel();var u=g.toolbar.addMenu(g.menus.get("fontFamily"),
"Helvetica",null,k);this.addArrow(u);u.style.margin="0px";u.style.position="relative";u.classList.add("geFullWidthElement");"inherit"==h.style[mxConstants.STYLE_FONTFAMILY]&&(k.style.display="none");k=m.cloneNode(!1);var w=g.toolbar.addItems(["bold","italic","underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+g.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+g.actions.get("italic").shortcut+
-")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),E=function(q){return function(){return q()}},D=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
-[mxConstants.ALIGN_LEFT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
-A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
-!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),D=function(q){return function(){return q()}},E=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
+[mxConstants.ALIGN_LEFT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
+A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
+!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
A);a.appendChild(A);var V,W,T,O;if(d.cellEditor.isContentEditing()){M.style.display="none";N.style.display="none";J.style.display="none";y.style.display="none";var fa=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){document.execCommand("justifyfull",!1,null)},A);fa.style.marginRight="9px";var S=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},A);S.style.marginLeft="10px";var aa=g.addButton(Editor.superscriptImage,
-mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";E=A.cloneNode(!1);E.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
-function(){document.execCommand("indent",!1,null)},E),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];A[A.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",H.style.marginRight=
+mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";D=A.cloneNode(!1);D.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
+function(){document.execCommand("indent",!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];A[A.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",H.style.marginRight=
"12px";A=m.cloneNode(!1);mxUtils.write(A,mxResources.get("position"));var Y=document.createElement("select");Y.style.left="114px";Y.style.width="98px";var ba="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),L={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<ba.length;E++){var U=document.createElement("option");U.setAttribute("value",ba[E]);mxUtils.write(U,mxResources.get(ba[E]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
-U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<U.length;E++){var ja=document.createElement("option");ja.setAttribute("value",U[E]);"vertical-"==U[E].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[E].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[E]));
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<ba.length;D++){var U=document.createElement("option");U.setAttribute("value",ba[D]);mxUtils.write(U,mxResources.get(ba[D]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
+U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<U.length;D++){var ja=document.createElement("option");ja.setAttribute("value",U[D]);"vertical-"==U[D].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[D].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[D]));
X.appendChild(ja)}ba.appendChild(X);d.isEditing()||(a.appendChild(A),mxEvent.addListener(Y,"change",function(q){d.getModel().beginUpdate();try{var B=L[Y.value];null!=B&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,B[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,B[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,B[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,B[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(ba),mxEvent.addListener(X,
"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ia[X.value],h.cells);mxEvent.consume(q)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);A=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ta.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var B=d.cellEditor.textarea.getElementsByTagName("font"),
C=0;C<B.length;C++)if("1"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize="";var G=mxUtils.getCurrentStyle(B[C]);q!=b(G)?B[C].style.fontSize=q+"px":""==B[C].getAttribute("style")&&B[C].removeAttribute("style")}}},!0);A=this.createStepper(ta,A,1,!0,Menus.prototype.defaultFontSize);A.style.display=ta.style.display;A.style.left="198px";"inherit"==h.style[mxConstants.STYLE_FONTSIZE]&&(ta.style.display="none",A.style.display="none");k.appendChild(A);var ca=null,P=d.shapeBackgroundColor,
@@ -3151,7 +3152,7 @@ da=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundC
h.cells)))},"default",{install:function(q){da=q},destroy:function(){da=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){oa.style.display=q==mxConstants.NONE?"none":"";za.style.display=oa.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,
null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,h.cells);d.updateLabelElements(h.cells,function(B){B.removeAttribute("color");B.style.color=null})},d.shapeForegroundColor);"inherit"==h.style[mxConstants.STYLE_FONTCOLOR]&&(k.style.display="none");k.style.fontWeight="bold";p.appendChild(k);p.appendChild(oa);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(za),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";A=d.filterSelectionCells(mxUtils.bind(this,function(q){var B=d.view.getState(q);return null==B||d.getModel().isEdge(q)||d.isAutoSizeState(B)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,A);k.style.fontWeight="bold";0<A.length&&p.appendChild(k);
-A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);E=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=E&&null!=E.text&&null!=E.text.node&&0==E.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
+A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);D=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=D&&null!=D.text&&null!=D.text.node&&0==D.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"));k=this.createCellOption(mxResources.get("lblToSvg"),"convertToSvg","0");k.style.fontWeight="bold";p.appendChild(k);A||(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"));if(!g.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.getElementsByTagName("span")[0].style.maxWidth="172px",k.appendChild(g.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/5165"));k=this.createPanel();k.style.height="86px";A=document.createElement("div");
A.style.position="absolute";A.style.width="70px";A.style.marginTop="0px";A.style.fontWeight="bold";mxUtils.write(A,mxResources.get("spacing"));k.appendChild(A);var Aa=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ma=this.addUnitInput(k,this.getUnit(),16,52,function(){bb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),
16,64);mxUtils.br(k);mxUtils.br(k);var Pa=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){qb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,
@@ -3165,8 +3166,8 @@ function(q){if(null!=W){var B=W.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*
"1"),G.style.border="1px solid "+C,G.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=W){var B=W.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(C,G,K,Q){return"#"+("0"+Number(G).toString(16)).substr(-2)+("0"+Number(K).toString(16)).substr(-2)+("0"+Number(Q).toString(16)).substr(-2)});g.pickColor(B,function(C){var G=null==T||null!=q&&mxEvent.isShiftDown(q)?
W:T;d.processElements(G,function(K){K.style.backgroundColor=null});G.style.backgroundColor=null==C||C==mxConstants.NONE?"":C})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=W){var q=W.getAttribute("cellPadding")||0;q=new FilenameDialog(g,q,mxResources.get("apply"),mxUtils.bind(this,function(B){null!=B&&0<B.length?W.setAttribute("cellPadding",B):W.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(q.container,300,80,!0,!0);q.init()}},m),
g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=W&&W.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=W&&W.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=W&&W.setAttribute("align","right")},m)];A[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Wa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),
-mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
-mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
+mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(D);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
+mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
q=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(M,q==mxConstants.ALIGN_TOP);f(N,q==mxConstants.ALIGN_MIDDLE);f(J,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);B=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);Y.value=q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&
B==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&B==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?
X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(C||document.activeElement!=Ma)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ma.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(C||document.activeElement!=Aa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),Aa.value=
@@ -3177,8 +3178,8 @@ window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement
d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa;xa=xa.parentNode}return null},K=mxUtils.getCurrentStyle(q),Q=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(K);if(window.getSelection)for(var ka=q.getElementsByTagName("*"),ha=window.getSelection(),la=0;la<ka.length&&(!ha.containsNode(ka[la],!0)||null==ka[la].style||(null==Z&&""!=ka[la].style.fontSize&&(Z=parseFloat(ka[la].style.fontSize)),
null==Q&&""!=ka[la].style.lineHeight&&(Q=ka[la].style.lineHeight),null==Z||null==Q));la++);null==Z&&(Z=b(K));if(null==Q)for(ka=q;null!=ka&&ka!=d.cellEditor.textarea.parentNode;){if(null!=ka.style&&""!=ka.style.lineHeight){Q=ka.style.lineHeight;break}ka=ka.parentNode}if(null!=K){f(w[0],"bold"==K.fontWeight||400<K.fontWeight||C("B")||C("STRONG"));f(w[1],"italic"==K.fontStyle||C("I")||C("EM"));f(w[2],"underline"==K.textDecorationLine||C("U"));f(V,"line-through"==K.textDecorationLine||C("STRIKE"));f(aa,
C("SUP"));f(S,C("SUB"));var ya=G(q);if(null!=ya){C=function(xa,Ga){Ha.push({name:xa,dispName:Ga,type:"string",getValue:function(){return La[xa]},valueChanged:function(va,ua){var Sa=ya.style,Qa=va;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Sa[xa]=Qa;""==va&&null!=ua&&(ua.value=La[xa])}})};var La=mxUtils.getCurrentStyle(ya),Ha=[];C("paddingTop","Padding Top");C("paddingRight","Padding Right");C("paddingLeft","Padding Left");C("paddingBottom","Padding Bottom");C("marginTop","Margin Top");C("marginRight",
-"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(D,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(D,
-!1),f(F,!1),f(H,!1)):(f(fa,!1),f(D,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
+"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(E,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(E,
+!1),f(F,!1),f(H,!1)):(f(fa,!1),f(E,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
Math.round(100*B)+" %"));null!=da&&(ma=d.getTextColor(q,!0),da(ma,!0));null!=ca&&(P=d.getTextColor(q,!1),ca(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(K.fontFamily))}}cb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};
StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
@@ -3186,8 +3187,8 @@ var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPA
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(g))):Base64.decode(g,!0),h=mxUtils.parseXml(d);if(null!=h){var m="light"==h.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,
"darkMode",null),p=""==h.documentElement.style.colorScheme,k=h.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],h,k[b],u,e,f,m,p)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,E){var D=mxUtils.trim(w.style.getPropertyValue(y));if(""!=D&&"url("!=D.substring(0,4)){var F=D;"transparent"==F?F=mxConstants.NONE:(D=mxUtils.isLightDarkColor(F))&&E?E=!1:D||E||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
-"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,E);a.appendChild(w);
+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,D){var E=mxUtils.trim(w.style.getPropertyValue(y));if(""!=E&&"url("!=E.substring(0,4)){var F=E;"transparent"==F?F=mxConstants.NONE:(E=mxUtils.isLightDarkColor(F))&&D?D=!1:E||D||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
+"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,D);a.appendChild(w);
a.style.display=""}}),h(b,"fill",mxResources.get("fill"),m),h(b,"stroke",mxResources.get("line"),m),h(b,"stop-color",mxResources.get("gradient"),m))};
StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.position="relative";e.style.marginBottom="2px";e.className="geFullWidthElement";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),g=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);g=this.editorUi.sidebar.getLibsForStyle(d);
null!=g||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(g=[])}null!=g&&f.push("openLibrary");for(d=0;d<f.length;d++){var h=this.editorUi.actions.get(f[d]);if(null==h||h.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+"...");null!=h&&null!=h.shortcut&&(p+=" ("+h.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),
@@ -3196,11 +3197,11 @@ f=f.view.getState(f.getSelectionCell()),null!=f&&null!=mxUtils.getValue(f.style,
StyleFormatPanel.prototype.addFill=function(a){function b(){h.innerHTML="";A=1;for(var F=0;F<Editor.fillStyles.length;F++){var H=document.createElement("option");H.setAttribute("value",Editor.fillStyles[F].val);mxUtils.write(H,Editor.fillStyles[F].dispName);h.appendChild(H)}}var e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=document.createElement("select");d.style.position="absolute";d.style.left="76px";d.style.width="86px";var h=d.cloneNode(!1);mxEvent.addListener(d,"click",function(F){mxEvent.consume(F)});
mxEvent.addListener(h,"click",function(F){mxEvent.consume(F)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(F){d.style.display=null==F||F==mxConstants.NONE?"none":""},function(F){f.updateCellStyles({gradientColor:F},f.getSelectionCells())},f.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:
mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(F){f.setCellStyles(p,F,g.cells)}),f.getDefaultColor(g.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(g.style,p,null);m.style.display=null!=u&&u!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var E=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
+mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var D=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
g.fill?"":"none";F=mxUtils.getValue(g.style,p,null);if(g.fill&&null!=F&&F!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=A){h.innerHTML="";A=2;for(F=0;F<Editor.roughFillStyles.length;F++){var M=document.createElement("option");M.setAttribute("value",Editor.roughFillStyles[F].val);mxUtils.write(M,Editor.roughFillStyles[F].dispName);h.appendChild(M)}h.value="auto"}}else 1!=A&&b();h.value=H;h.value||(H="auto",h.value=H);h.style.display="1"==g.style.sketch||"none"==d.style.display?
-"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
-"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var D={};k=this.getCustomColors();for(u=0;u<k.length;u++)D[k[u].key]||(D[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
-!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!D[F[N]]){D[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
+"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
+"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var E={};k=this.getCustomColors();for(u=0;u<k.length;u++)E[k[u].key]||(E[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
+!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!E[F[N]]){E[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi,b=a.editor.graph;a=a.getSelectionState();var e=[];if(null!=a.customProperties)for(var f in a.customProperties){var g=a.customProperties[f];if(null!=g&&g.primary&&("color"==g.type||"color"==g.subType)&&("function"!==typeof g.isVisible||g.isVisible(a,this))){var d="color"==g.subType?g.subDefVal:g.defVal;d=null!=d?d:b.shapeBackgroundColor;e.push({title:g.dispName,defaultValue:d,defaultColorValue:null!=g.defaultColor?g.defaultColor:
d,undefinedColor:g.undefinedColor,key:g.name})}}a.swimlane&&(b=this.editorUi.editor.graph,e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default",defaultColorValue:b.shapeBackgroundColor}));return e};
StyleFormatPanel.prototype.addDashPattern=function(a,b){var e=b.split(" ");if(2<=e.length){for(var f=0,g=0;g<e.length;g++)f+=parseInt(e[g]);b=Graph.createSvgImage(f,1,'<line transform="translate(0,1)" x1="0" y1="0" x2="'+f+'" y2="0" stroke-dasharray="'+b+'" stroke-width="2" stroke="black"/>',f,1);a.style.backgroundImage="url("+b.src+")";a.style.backgroundSize=f+"px 1px";a.style.backgroundRepeat="repeat-x"}else a.style.borderBottomStyle=b};
@@ -3208,15 +3209,15 @@ StyleFormatPanel.prototype.addStroke=function(a){function b(P){var da=f.fromUnit
Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",h.cells)));N.value=f.inUnit(da)+" "+f.getUnit();mxEvent.consume(P)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var p=document.createElement("select");
p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var da=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var Ia=0;Ia<da.length;Ia++)d.setCellStyles(da[Ia],
ma[Ia],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",da,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||
-P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var E=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
-P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),D=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
-E(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
+P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var D=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
+P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
+D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
"",da,[null,null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["link",null,null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["flexArrow",null,null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));
Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["arrow",null,null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["filledEdge",null,null,null,null],"",null,null,null,!0,Format.filledEdgeImage.src)).setAttribute("title","Filled Edge");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["pipe",null,null,null,null],"",null,null,null,!0,Format.pipeEdgeImage.src)).setAttribute("title",
-"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,40,
-"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");E(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
+"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,40,
+"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
M.style.width="52px";M.style.left="148px";M.setAttribute("title",mxResources.get("linewidth"));A.appendChild(M);var N=M.cloneNode(!0);N.style.width="56px";N.style.left="144px";F.appendChild(N);var J=this.createStepper(M,b,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=M.style.display;A.appendChild(J);J=this.createStepper(N,e,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=N.style.display;F.appendChild(J);mxEvent.addListener(M,"blur",b);mxEvent.addListener(M,"change",
b);mxEvent.addListener(N,"blur",e);mxEvent.addListener(N,"change",e);var V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
@@ -3253,9 +3254,9 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STY
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",
mxResources.get("block"));P.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)}})),"",null,k);H.style.width="67px";H.style.marginRight="2px";w.style.width="67px";w.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";T.style.width="67px";T.style.marginRight="2px";this.addArrow(H).appendChild(document.createElement("div"));this.addArrow(V).appendChild(document.createElement("div"));
-this.addArrow(W);this.addArrow(T);D.style.width="142px";D=this.addArrow(D);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";D.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
+this.addArrow(W);this.addArrow(T);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";E.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
"2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var S=this.addUnitInput(u,this.getUnit(),82,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),aa=this.addUnitInput(u,this.getUnit(),16,52,function(){ja.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
-mxUtils.br(u);D=document.createElement("div");D.style.height="8px";u.appendChild(D);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
+mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
"10px";this.addLabel(u,mxResources.get("lineend"),16,62).style.fontSize="10px";mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var L=this.addUnitInput(m,this.getUnit(),16,52,function(){ca.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var U=mxUtils.bind(this,
function(P,da,ma){function Ia(oa,za,Aa,Ma){Aa=Aa.getElementsByTagName("div")[0];null!=Aa&&g.updateCssForMarker(Aa,Ma,h.style.shape,oa,za);return Aa}h=g.getSelectionState();if(ma||document.activeElement!=M)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),M.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=N)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();p.style.visibility=
"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape||"pipe"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");O.style.borderBottom="1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),2<=String(P).split(" ").length?(O.style.borderBottom="1px solid transparent",
@@ -3270,9 +3271,9 @@ d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];f
mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=mxUtils.bind(this,function(w,y,A){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(A||document.activeElement!=p)w=parseInt(mxUtils.getValue(f.style,
"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(w)?"":this.inUnit(w)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState(),g=document.createElement("table");g.className="geFullWidthElement";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),h=document.createElement("tr");h.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.style.verticalAlign="top";var p=m.cloneNode(!0);p.style.paddingLeft="8px";h.appendChild(m);h.appendChild(p);
-d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,E,D){y=this.createCellOption(y,A,E,null,null,D);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
-"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var D in f.customProperties)y=
-f.customProperties[D],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,D,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
+d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,D,E){y=this.createCellOption(y,A,D,null,null,E);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,D){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
+"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var E in f.customProperties)y=
+f.customProperties[E],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,E,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
DiagramStylePanel.prototype.getGlobalStyleButtons=function(){var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatEntry";var f=document.createElement("input");f.setAttribute("type","checkbox");f.checked=Editor.sketchMode;e.appendChild(f);mxUtils.write(e,mxResources.get("sketch"));mxEvent.addListener(e,"click",function(d){if(b.isEnabled()){var h=!Editor.sketchMode;b.updateCellStyles({sketch:h?"1":null,curveFitting:h?Editor.sketchDefaultCurveFitting:null,jiggle:h?
Editor.sketchDefaultJiggle:null},b.getVerticesAndEdges());a.setSketchMode(h);mxEvent.consume(d)}});e=[e,mxUtils.button(mxResources.get("rounded"),mxUtils.bind(this,function(d){var h=b.getVerticesAndEdges(),m=!0;if(0<h.length)for(var p=0;p<h.length;p++){var k=b.getCellStyle(h[p]);if(0==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,0)){m=!1;break}}m=!m;b.updateCellStyles({rounded:m?"1":"0"},h);m?(b.currentEdgeStyle.rounded="1",b.currentVertexStyle.rounded="1"):(delete b.currentEdgeStyle.rounded,delete b.currentVertexStyle.rounded);
@@ -3292,10 +3293,10 @@ S!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&S==mxConstants.STYLE_FONTCOLOR?
"light",fa.parentNode.appendChild(S))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var y=mxUtils.bind(this,function(V,W,T,O,fa){var S=this.format.cachedStyleEntries[fa];null==S&&(S=document.createElement("div"),S.className="geGraphStylePreview",p||null==O||null==O.background||(S.style.backgroundColor=O.background),u(V,W,T,O,S),mxEvent.addGestureListeners(S,mxUtils.bind(this,function(aa){S.style.opacity=
.6}),null,mxUtils.bind(this,function(aa){S.style.opacity="";e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(V,e.currentVertexStyle);k(V,e.currentEdgeStyle);k(W,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var Y=d.slice(),ba;for(ba in V)Y.push(ba);h(Y,O);if(!p){var L=new ChangePageSetup(b,null!=O?O.background:null);L.ignoreImage=!0;f.execute(L);f.execute(new ChangeGridColor(b,null!=O&&null!=O.gridColor?O.gridColor:
g))}}finally{f.endUpdate()}})),mxClient.IS_TOUCH||(mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(aa){var Y=e.getCellStyle;aa=e.background;var ba=e.view.gridColor;p||(e.background=null!=O?O.background:null,e.view.gridColor=null!=O&&null!=O.gridColor?O.gridColor:g);e.getCellStyle=function(L,U){U=null!=U?U:!0;var X=mxUtils.clone(Y.apply(this,arguments)),ia=e.stylesheet.getDefaultVertexStyle(),ja=W;f.isEdge(L)&&(ia=e.stylesheet.getDefaultEdgeStyle(),ja=T);m(X,d,ia);k(V,X,L,O);k(ja,X,L,
-O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");
-for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,D())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
-N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);E.push(N)}a.appendChild(H);D();if(15>A&&0<E.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,E[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
-1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");
+for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,E())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
+N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);D.push(N)}a.appendChild(H);E();if(15>A&&0<D.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,D[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
+1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),g=f.getElementsByTagName("input")[0];null!=g&&(g.style.visibility=null!=e.backgroundImage?
@@ -3313,7 +3314,7 @@ 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,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function 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 m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
-function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
+function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,O.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,O.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,O.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,O.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
O.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,O.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ia(){mxShape.call(this)}function ja(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
function ca(){mxShape.call(this)}function P(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ia(){mxShape.call(this)}function oa(){mxShape.call(this)}function za(){mxShape.call(this)}function Aa(){mxShape.call(this)}function Ma(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ka(){mxRectangleShape.call(this)}function Ja(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
@@ -3337,10 +3338,10 @@ c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.be
15;w.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
w);mxUtils.extend(y,mxShape);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",y);mxUtils.extend(A,mxCylinder);A.prototype.size=15;A.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
-0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
-mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.isRoundable=function(){return!0};D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
+0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",D);mxUtils.extend(E,
+mxCylinder);E.prototype.tabWidth=60;E.prototype.tabHeight=20;E.prototype.tabPosition="right";E.prototype.arcSize=.1;E.prototype.isRoundable=function(){return!0};E.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(z*=Math.min(n,r));z=Math.min(z,.5*n,.5*(r-t));l=Math.max(l,z);l=Math.min(n-z,l);x||(z=0);c.begin();"left"==v?(c.moveTo(Math.max(z,0),t),c.lineTo(Math.max(z,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(z,0),0),c.lineTo(n-Math.max(z,0),t));x?(c.moveTo(0,z+t),c.arcTo(z,z,0,0,1,z,t),c.lineTo(n-z,t),c.arcTo(z,z,0,0,1,n,z+t),c.lineTo(n,
-r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
+r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",E);E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?
new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
t=mxUtils.getValue(this.style,"umlStateConnection",null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),
@@ -3350,7 +3351,7 @@ mxActor);M.prototype.size=.4;M.prototype.redrawPath=function(c,l,t,n,r){l=r*Math
n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",M);mxUtils.extend(N,mxActor);N.prototype.size=.3;N.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};N.prototype.redrawPath=
function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",N);var Ya=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ya.apply(this,arguments)};
mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};A.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*
-l*this.scale))}return null};D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
+l*this.scale))}return null};E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};F.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,
"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,
"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",J);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=
@@ -3521,8 +3522,8 @@ return l},internalStorage:function(c){var l=[Va(c,["dx","dy"],function(t){var n=
l.push(ib(c));return l},module:function(c){return[Va(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ma.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,
t.y-l.y))/2)})]},corner:function(c){return[Va(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Va(c,["dx","dy"],function(l){var t=
Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:vb(1),doubleArrow:vb(.5),"mxgraph.arrows2.wedgeArrow":db(20,20),"mxgraph.arrows2.wedgeArrowDashed":db(20,
-20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
-t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
+20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
+t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Va(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/
200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(A.prototype.size),offPageConnector:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-
t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));
@@ -3546,7 +3547,7 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};A.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=
+0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};E.prototype.getConstraints=
function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3559,7 +3560,7 @@ Z.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -3582,8 +3583,8 @@ function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mx
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};da.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var E=A.getCellGeometry(k);null!=E&&w&&y&&(w/=y,E=E.clone(),1<w?E.height=E.width/w:E.width=E.height*w,A.getModel().setGeometry(k,
-E));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
+Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var D=A.getCellGeometry(k);null!=D&&w&&y&&(w/=y,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,A.getModel().setGeometry(k,
+D));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
u=d.container.scrollLeft,w=d.container.scrollTop,y=d.view.translate.x,A=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&y==d.view.translate.x&&A==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter");m.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",m);this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?
f.actions.get("smartFit").funct():d.isEnabled()&&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(k,u){try{var w=mxUtils.parseXml(k);g.graph.setSelectionCells(g.graph.importGraphModel(w.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.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+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
@@ -3591,8 +3592,8 @@ f.actions.get("smartFit").funct():d.isEnabled()&&d.startEditingAtCell()});this.a
this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){f.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){f.pasteFromClipboard(d.popupMenuHandler.getTriggerPoint())});
this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),
u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var F=y.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||D.setAttribute("placeholders",
-F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));y.setValue(E,D)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
+"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(D,E){var F=y.getValue(D);E=D.cloneValue(E);E.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||E.setAttribute("placeholders",
+F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||E.setAttribute("label",d.convertValueToString(D));y.setValue(D,E)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(k){f.handleError(k)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
function(){var k=f.getSelectionState();if(null!=k.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",k.rowspan,[k.mergeCell]),d.setCellStyles("colspan",k.colspan,[k.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var k=f.getSelectionState();if(0<k.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,k.cells),d.setCellStyles("colspan",null,k.cells)}finally{d.getModel().endUpdate()}}}));m=new Action("turn",
function(k,u){k=null!=u?u:k;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=k?mxEvent.isShiftDown(k):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");m.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",m);this.put("selectConnections",new Action("selectEdges",function(k){k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.addSelectionCells(d.getEdges(k))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,
@@ -3607,7 +3608,7 @@ null==w&&(w=k.value.getAttribute("tooltip"));null!=w&&(u=w)}u=new TextareaDialog
!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(w,y,A){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<w.length?w:null),d.setAttributeForCell(k,"linkTarget",A)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=h;this.addAction("editImage...",function(){f.actions.get("image").funct()});
this.put("insertLink",new Action("link...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,w){k=mxUtils.trim(k);if(0<k.length){var y=null,A=d.getLinkTitle(k);null!=u&&0<u.length&&(y=u[0].iconUrl,A=u[0].name||u[0].type,A=A.charAt(0).toUpperCase()+A.substring(1),30<A.length&&(A=A.substring(0,30)+"..."));u=new mxCell(A,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
y:"spacing=10;"));u.vertex=!0;y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=y.x;u.geometry.y=y.y;d.setAttributeForCell(u,"linkTarget",w);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=
-d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?
+d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var D=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(E){d.cellEditor.restoreSelection(D);null!=E&&d.insertLink(E)}))}else d.isSelectionEmpty()?
this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];d.getModel().isVertex(w)&&(0<d.getModel().getChildCount(w)?d.updateGroupBounds([w],0,!0):d.updateCellSize(w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});
this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),w=0;w<u.length;w++)if(state=d.getView().getState(u[w]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[w]]);else if("0"==y&&"1"==k){var A=mxUtils.htmlEntities(d.convertValueToString(state.cell),
!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(A));d.setCellStyles("html",k,[u[w]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=k?k:"0"],"cells",u))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),u="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(u=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
@@ -3621,8 +3622,8 @@ f.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});m.setToggleAction(!0)
m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;f.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());f.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());f.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){f.editor.setAutosave(!f.editor.autosave)});
m.setToggleAction(!0);m.setSelectedCallback(function(){return f.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var k="";mxResources.isLanguageSupported(mxClient.language)&&(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;m=new Action("about",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)});m.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",m);m=
-mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(D){D.style.fontWeight=null;"B"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
-function(D){D.style.fontStyle=null;"I"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(D){D.style.textDecoration=null;"U"==D.nodeName&&d.replaceElement(D)});for(var E=0;E<A.length;E++)0==d.model.getChildCount(A[E])&&d.autoSizeCell(A[E],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
+mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(E){E.style.fontWeight=null;"B"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
+function(E){E.style.fontStyle=null;"I"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(E){E.style.textDecoration=null;"U"==E.nodeName&&d.replaceElement(E)});for(var D=0;D<A.length;D++)0==d.model.getChildCount(A[D])&&d.autoSizeCell(A[D],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){f.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",d.shapeForegroundColor)});this.addAction("strokeColor...",function(){f.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("fillColor...",function(){f.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
null,null,"default",d.shapeBackgroundColor)});this.addAction("gradientColor...",function(){f.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("backgroundColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",d.shapeBackgroundColor)});this.addAction("borderColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("removeFormat",
function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.removeTextStyleForCell(k[u],!0)}finally{d.getModel().endUpdate()}}});this.addAction("vertical",function(){f.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){f.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
@@ -3638,10 +3639,10 @@ null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction
this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];if(d.getModel().isEdge(w)){var y=d.getCellGeometry(w);null!=y&&(y=y.clone(),y.points=null,y.x=0,y.y=0,y.offset=null,d.getModel().setGeometry(w,y))}}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,
Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(E,D,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(E,D,F);else{var J=d.getSelectionCells();if(null!=E&&(0<E.length||0<J.length)){var V=null;
-d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
-"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=D&&null!=F)for(E=0;E<J.length;E++){var O=J[E];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=D,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
-d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,E,D){e(k,A,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
+!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(D,E,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(D,E,F);else{var J=d.getSelectionCells();if(null!=D&&(0<D.length||0<J.length)){var V=null;
+d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
+"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=E&&null!=F)for(D=0;D<J.length;D++){var O=J[D];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=E,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
+d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,D,E){e(k,A,D,E,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
@@ -3691,20 +3692,20 @@ w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=
b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{h?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{h?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",
mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var E=!1;if(null!=y){w=d.getParentByName(y,"TR");var D=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+D);D=Math.min(20,y.cellIndex+D);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<D;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
-1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],D=0;D<H.cells.length;D++)M=H.cells[D],F==w.sectionRowIndex&&D==y.cellIndex&&(E="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&D<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return E}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,E,D){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
-A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<E;N++){M.push("<tr>");for(var J=0;J<D;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");E=M.join("");F.call(H,E);E=d.cellEditor.textarea.getElementsByTagName("table");if(E.length==A.length+1)for(H=E.length-1;0<=H;H--)if(0==H||E[H]!=A[H-1]){d.selectNode(E[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("geToolbarMenu"),a.labels=!1);a=a.addItem("",null,null,
+Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var D=!1;if(null!=y){w=d.getParentByName(y,"TR");var E=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+E);E=Math.min(20,y.cellIndex+E);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<E;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
+1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],E=0;E<H.cells.length;E++)M=H.cells[E],F==w.sectionRowIndex&&E==y.cellIndex&&(D="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&E<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return D}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,D,E){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
+A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<D;N++){M.push("<tr>");for(var J=0;J<E;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");D=M.join("");F.call(H,D);D=d.cellEditor.textarea.getElementsByTagName("table");if(D.length==A.length+1)for(H=D.length-1;0<=H;H--)if(0==H||D[H]!=A[H-1]){d.selectNode(D[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("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<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var h=document.createElement("input");h.setAttribute("id","geTitleOption");h.setAttribute("type","checkbox");h.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,
null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(h,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");m.style.verticalAlign="middle";var p=document.createElement("label");mxUtils.write(p,mxResources.get("container"));p.setAttribute("for","geContainerOption");p.style.verticalAlign="middle";mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,
-function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse="collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";
-D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=D.insertRow(F),M=0;M<E;M++)H.insertCell(-1);return D}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var E=g(A);null!=y&&null!=w&&E&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
+function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,D){var E=document.createElement("table");E.className="geInsertTablePicker";E.setAttribute("border","1");E.style.borderCollapse="collapse";E.style.borderStyle="solid";E.style.marginBottom="4px";
+E.style.marginTop="8px";E.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=E.insertRow(F),M=0;M<D;M++)H.insertCell(-1);return E}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var D=g(A);null!=y&&null!=w&&D&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(k,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var D=0;D<e.length;D++)p.setCellStyles(e[D],f[D],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
"cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
Menus.prototype.styleChange=function(a,b,e,f,g,d,h,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var w=this.editorUi.editor.graph;null!=h&&w.cellEditor.isContentEditing()?h():u(m)}),d,g);p&&this.showIconOnly(a);return a};
Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(e){var f=this.editorUi.editor.graph;f.stopEditing(!1);f.getModel().beginUpdate();try{for(var g=f.getEditableCells(f.getSelectionCells()),d=!1,h=0;h<a.length;h++)if(f.setCellStyles(a[h],b[h],g),a[h]==mxConstants.STYLE_ALIGN&&f.updateLabelElements(g,function(m){m.removeAttribute("align");m.style.textAlign=null}),a[h]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[h])d=!0;if(d)for(d=0;d<g.length;d++)0==f.model.getChildCount(g[d])&&
f.autoSizeCell(g[d],!1);null!=e&&e();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{f.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
+Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(D){if(null!=D&&0<D.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,D)}finally{u.getModel().endUpdate()}}null!=m&&m(D)}}),mxResources.get("enterValue")+
(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(w.container,300,80,!0,!0);w.init()}),d,p,h)};
Menus.prototype.pickColor=function(a,b,e,f,g,d){this.editorUi.tryAndHandle(mxUtils.bind(this,function(){var h=this.editorUi.editor.graph;if(null!=b&&h.cellEditor.isContentEditing()){var m=h.getSelectedEditingElement();null!=m&&null!=h.cellEditor.textarea&&(m=h.getTextColor(m,"forecolor"==b),this.editorUi.pickColor(m,mxUtils.bind(this,function(k){null!=h.cellEditor.textarea&&(Graph.setTextColor(h.cellEditor.textarea,k,"forecolor"==b),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
["forecolor"==b?mxConstants.STYLE_FONTCOLOR:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[k],"cells",[h.cellEditor.getEditingCell()])))}),f,g,d))}else{var p=h.getCellStyle(h.getSelectionCell(),!1);m=mxConstants.NONE;null!=p&&(m=p[a]||m);this.editorUi.pickColor(m,ColorDialog.createApplyFunction(this.editorUi,a),f,g,d)}}))};
@@ -3745,50 +3746,50 @@ p.addItem("",Editor.removeFormatImage,mxUtils.bind(this,function(){document.exec
!1,null)}))})),null,Editor.plusImage);h.setAttribute("data-min-width",700);this.addSeparator(null,700);var m=this.addMenu(new Menu(mxUtils.bind(this,function(p){var k=b.getSelectedElement(),u=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),w=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==w)this.editorUi.menus.addInsertTableItem(p);else{var y=b.getParentByName(w,"TABLE",b.cellEditor.text2);k=p.addItem("",Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,
null!=u?u.cellIndex:0))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnBefore"));k=p.addItem("",Editor.addColumnRightImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,null!=u?u.cellIndex+1:-1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnAfter"));k=p.addItem("Delete column",Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=u)try{b.deleteColumn(y,u.cellIndex)}catch(A){this.editorUi.handleError(A)}}));
k.setAttribute("title",mxResources.get("deleteColumn"));k=p.addItem("",Editor.addRowAboveImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowBefore"));k=p.addItem("",Editor.addRowBelowImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex+1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowAfter"));k=p.addItem("",
-Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
-function(E){null==E||E==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+E,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
-("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(E){y.style.backgroundColor=null==E||E==mxConstants.NONE?"":E})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(E){null!=E&&0<E.length?y.setAttribute("cellPadding",E):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
+function(D){null==D||D==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+D,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(D){y.style.backgroundColor=null==D||D==mxConstants.NONE?"":D})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(D){null!=D&&0<D.length?y.setAttribute("cellPadding",D):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
this.editorUi.showDialog(A.container,300,80,!0,!0);A.init()}));k.setAttribute("title",mxResources.get("spacing"));k=p.addItem("",Editor.alignLeftImage,mxUtils.bind(this,function(){y.setAttribute("align","left")}));k.setAttribute("title",mxResources.get("left"));k=p.addItem("",Editor.alignCenterImage,mxUtils.bind(this,function(){y.setAttribute("align","center")}));k.setAttribute("title",mxResources.get("center"));k=p.addItem("",Editor.alignRightImage,mxUtils.bind(this,function(){y.setAttribute("align",
"right")}));k.setAttribute("title",mxResources.get("right"))}})),null,Editor.tableImage);m.setAttribute("data-min-width",740);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){e.innerText=mxResources.get("style");d.setAttribute("title",mxResources.get("format"));e.setAttribute("title",mxResources.get("style"));f.setAttribute("title",mxResources.get("fontFamily"));g.setAttribute("title",mxResources.get("fontSize"));h.setAttribute("title",mxResources.get("insert"));m.setAttribute("title",
mxResources.get("table"))}))};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.setMenuText=function(a,b){a.getElementsByTagName("span")[0].innerText=b};Toolbar.prototype.setMenuIcon=function(a,b){a.style.backgroundImage="url("+b+")"};
Toolbar.prototype.addMenu=function(a,b,e,f){var g=this.editorUi.createMenuElement("",a.funct);this.editorUi.menus.menuCreated(a,g,"geButton");null!=e?g.style.backgroundImage="url("+e+")":null!=b&&(a=document.createElement("span"),mxUtils.write(a,b),g.appendChild(a));f=null!=f?f:this.container;f.appendChild(g);return g};
Toolbar.prototype.addSeparator=function(a,b){a=null!=a?a:this.container;var e=document.createElement("div");e.className="geSeparator";a.appendChild(e);null!=b&&e.setAttribute("data-min-width",b);return e};Toolbar.prototype.addItems=function(a,b,e,f,g){for(var d=[],h=0;h<a.length;h++){var m=a[h];"-"==m?d.push(this.addSeparator(b,g)):(m=this.addItem(null!=f?f[h]:null,m,b,e),d.push(m),null!=g&&m.setAttribute("data-min-width",g))}return d};
Toolbar.prototype.addItem=function(a,b,e){var f=this.editorUi.actions.get(b),g=null;null!=f&&(g=this.editorUi.addButton(a,"",f.funct,null!=e?e:this.container),this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){var d=f.getTitle();null!=f.shortcut&&(d+=" ("+f.shortcut+")");g.setAttribute("title",d)})),a=mxUtils.bind(this,function(){f.enabled?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}),f.addListener("stateChanged",a),a());return g};
-Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(D,F,H){if(null==D)return[H,H,H];var M=Math.floor(D),
-N=H*(1-F);D=H*(1-F*(M%2?D-M:1-(D-M)));switch(M){case 6:case 0:return[H,D,N];case 1:return[D,H,N];case 2:return[N,H,D];case 3:return[N,D,H];case 4:return[D,N,H];case 5:return[H,N,D]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
+Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,F,H){if(null==E)return[H,H,H];var M=Math.floor(E),
+N=H*(1-F);E=H*(1-F*(M%2?E-M:1-(E-M)));switch(M){case 6:case 0:return[H,E,N];case 1:return[E,H,N];case 2:return[N,H,E];case 3:return[N,E,H];case 4:return[E,N,H];case 5:return[H,N,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var g=[0,0,1],d=1;e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position=
-"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(D){var F=Math.round(100*(1-g[1]));f.style.left=
-Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";E.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
-"");1!=D&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(D){0==g[2]&&(g[2]=1);m=!0;y(D)}),w=mxUtils.bind(this,function(D){p=!0;y(D)}),y=mxUtils.bind(this,function(D){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(D)-F.left;D=mxEvent.getClientY(D)-F.top;f.style.left=H-8+"px";f.style.top=D-8+"px";H*=6/180;D=1-D/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>D&&(D=0);1<D&&(D=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==D?g[1]:g[1]=
-D,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),D=mxEvent.getClientY(D)-F.top,g[2]=Math.max(Math.min(1,1-D/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
-null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var E=document.createElement("div");E.style.background="url("+this.arrowImage+")";E.style.position="absolute";E.style.pointerEvents="none";E.style.width="7px";E.style.height="11px";E.style.left="2px";E.style.top="-3px";sliderBox.appendChild(E);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(D,
-F){F=null!=F?F:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",F=!0;D=mxUtils.parseColor(D);var H=D.r/255,M=D.g/255,N=D.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=D.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
+"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(E){var F=Math.round(100*(1-g[1]));f.style.left=
+Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";D.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
+"");1!=E&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(E){0==g[2]&&(g[2]=1);m=!0;y(E)}),w=mxUtils.bind(this,function(E){p=!0;y(E)}),y=mxUtils.bind(this,function(E){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(E)-F.left;E=mxEvent.getClientY(E)-F.top;f.style.left=H-8+"px";f.style.top=E-8+"px";H*=6/180;E=1-E/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>E&&(E=0);1<E&&(E=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==E?g[1]:g[1]=
+E,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-F.top,g[2]=Math.max(Math.min(1,1-E/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
+null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var D=document.createElement("div");D.style.background="url("+this.arrowImage+")";D.style.position="absolute";D.style.pointerEvents="none";D.style.width="7px";D.style.height="11px";D.style.left="2px";D.style.top="-3px";sliderBox.appendChild(D);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(E,
+F){F=null!=F?F:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",F=!0;E=mxUtils.parseColor(E);var H=E.r/255,M=E.g/255,N=E.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=E.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
var ColorDialog=function(a,b,e,f,g,d,h){function m(da){return mxUtils.color2hex("#"+da).substring(1).toUpperCase()}function p(){Y.src="none"==aa.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(da,ma){da||"none"==aa.style.display?(aa.style.display="flex",!1!==ma&&O.focus()):aa.style.display="none";p()}function u(da){""==da.value&&null!=N&&V?da.style.background=da==O?N.dark:N.light:""==da.value||da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)?da.style.background="transparent":
da.style.background="#"+da.value;da.style.color="transparent"==da.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(da.style.background)?"#ffffff":"#000000"}function w(){u(W);u(O)}function y(da){V!=da&&(da?h&&null!=N?(W.value=N.light.substring(1).toUpperCase(),da=!1):(W.value="",O.value="",fa.value="automatic",W.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),O.setAttribute("title",mxResources.get("useBlackAndWhite")),W.setAttribute("title",mxResources.get("useBlackAndWhite"))):
(""==W.value&&null!=N&&(W.value=N.light.substring(1).toUpperCase()),W.removeAttribute("placeholder"),W.removeAttribute("title"),""==O.value&&null!=N&&(O.style.background=N.dark,da=mxUtils.getCurrentStyle(O),O.value=mxUtils.rgba2hex(da.backgroundColor).substring(1).toUpperCase()),O.removeAttribute("placeholder"),O.removeAttribute("title"),da=!1));V=da}function A(da){"#"==da.value.charAt(0)&&(da.value=da.value.substring(1));var ma=da.value,Ia=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ia&&"default"!=
Ia&&Ia!=mxResources.get("default").toLowerCase()&&Ia!=mxResources.get("automatic").toLowerCase()||null==N?(da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)||(da.value=m(da.value),ia.fromString("#"+da.value)),y(!1),da!=O||W.value==mxConstants.NONE&&O.value==mxConstants.NONE||(fa.value="custom"),da==W&&"automatic"==fa.value&&(W.value==mxConstants.NONE?O.value=mxConstants.NONE:mxUtils.isVarColor(W.value)?O.value=W.value:O.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+da.value)).substring(1).toUpperCase()),
-w()):U.click()}function E(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
-12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||
-window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),E())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
+w()):U.click()}function D(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
+12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||
+window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),D())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
h):null,J=a.editor.graph;this.editorUi=a;var V=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var W=document.createElement("input");W.style.textOverflow="ellipsis";W.style.margin="0 0 0 4px";W.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var T=document.createElement("div");T.style.display="flex";T.style.alignItems="center";d.appendChild(T);
var O=document.createElement("input");O.style.textOverflow="ellipsis";O.style.margin="0 4px";O.style.maxWidth="70px";O.style.width="100%";var fa=document.createElement("select");fa.style.textOverflow="ellipsis";fa.style.width="100%";var S=document.createElement("option");S.setAttribute("value","automatic");mxUtils.write(S,mxResources.get("automatic"));fa.appendChild(S);S=document.createElement("option");S.setAttribute("value","custom");mxUtils.write(S,mxResources.get("userDefined"));fa.appendChild(S);
fa.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var aa=document.createElement("div");aa.style.padding="0 6px 0 6px";S=document.createElement("img");S.setAttribute("title",mxResources.get("dark"));S.className="geAdaptiveAsset";S.src=Editor.thinDarkImage;S.style.width="20px";aa.appendChild(S);mxEvent.addListener(S,"click",function(){O.focus()});aa.appendChild(O);aa.appendChild(fa);aa.style.display="flex";aa.style.alignItems="center";S=document.createElement("div");S.style.display="flex";S.style.alignItems=
"center";S.style.userSelect="none";S.style.cursor="pointer";S.style.padding="2px 0 2px 0";var Y=document.createElement("img");Y.setAttribute("title",mxResources.get("dark"));Y.className="geAdaptiveAsset";Y.style.marginLeft="-2px";S.appendChild(Y);mxUtils.write(S,mxResources.get("advanced"));var ba=document.createElement("img");ba.setAttribute("title",mxResources.get("swap"));ba.className="geAdaptiveAsset";ba.style.marginLeft="6px";ba.style.width="16px";ba.style.height="16px";ba.style.cursor="pointer";
ba.src=Editor.swapImage;mxEvent.addListener(ba,"click",function(da){k(!0,!1);fa.value="custom";y(!1);var ma=W.value;W.value=O.value;O.value=ma;w();ja.focus();mxEvent.consume(da)});S.appendChild(ba);var L=ba.cloneNode();L.setAttribute("title",mxResources.get("copy"));L.style.marginLeft="2px";L.src=Editor.doubleArrowUpImage;mxEvent.addListener(L,"click",function(da){k(!0,!1);fa.value="custom";y(!1);ja==O?W.value=O.value:O.value=W.value;w();ja.focus();mxEvent.consume(da)});S.appendChild(L);ba=L.cloneNode();
ba.setAttribute("title",mxResources.get("opacity"));ba.src=Editor.opacityImage;mxEvent.addListener(ba,"click",function(da){var ma=mxUtils.parseColor("#"+ja.value);ma=String(Math.floor(Math.max(0,Math.min(100*ma.a,100))));a.prompt(mxResources.get("opacity")+" (0-100)",ma,function(Ia){!isNaN(Ia)&&""!==Ia&&0<=Ia&&100>=Ia&&(y(!1),W.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+W.value,Ia/100,!0)).substring(1).toUpperCase(),O.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+O.value,Ia/100,!0)).substring(1).toUpperCase(),
-w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),D());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
-var X=null!=e?e:this.createApplyFunction();this.init=function(){D()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
+w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),E());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
+var X=null!=e?e:this.createApplyFunction();this.init=function(){E()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
(ja.value=da,A(ja),window.setTimeout(function(){ja.focus()},0))});e=document.createElement("div");e.appendChild(ia.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var ca=mxUtils.bind(this,function(da,ma,Ia,oa){ma=null!=ma?ma:12;var za=document.createElement("table");za.style.borderCollapse="collapse";za.setAttribute("cellspacing","0");za.style.marginBottom="20px";za.style.cellSpacing="0px";za.style.marginLeft=
"1px";var Aa=document.createElement("tbody");za.appendChild(Aa);for(var Ma=da.length/ma,Pa=0;Pa<Ma;Pa++){for(var Ka=document.createElement("tr"),Ja=0;Ja<ma;Ja++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ia);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(ra)){var Wa=
mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(Wa).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Wa=this.colorNames[String(ra).toUpperCase()];null!=Wa&&Da.setAttribute("title",Wa)}Ka.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ja==O&&O.value==mxConstants.NONE?W.value=mxConstants.NONE:ja.value=mxConstants.NONE;if(ja==W||ja==O&&
-W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",E))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
+W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
mxResources.get("reset")),da.className="geAdaptiveAsset",da.style.border="1px solid black",da.style.padding="0px",da.style.width="16px",da.style.height="16px",da.style.backgroundImage="url('"+Editor.crossImage+"')",da.style.backgroundPosition="center center",da.style.backgroundSize="14px 14px",da.style.backgroundRepeat="no-repeat",da.style.cursor="pointer",Ka.appendChild(da),mxEvent.addListener(da,"click",function(){ColorDialog.resetRecentColors();za.parentNode.replaceChild(H(),za)}));ta.appendChild(za);
return za});h||(d.appendChild(S),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==J.getAdaptiveColors()||"automatic"!=fa.value||(aa.style.display="none",p()),S=document.createElement("img"),S.setAttribute("title",mxResources.get("light")),S.className="geAdaptiveAsset",S.src=Editor.thinLightImage,S.style.width="20px",T.appendChild(S),mxEvent.addListener(S,"click",function(){W.focus()}));T.appendChild(W);null!=N&&(U.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),U.style.cursor=
"pointer",U.style.position="relative",U.style.marginLeft="4px",U.innerText="",J=document.createElement("div"),J.style.display="inline-block",J.style.verticalAlign="middle",J.style.borderStyle="solid",J.style.borderWidth="1px",J.style.marginTop="-2px",J.style.width="12px",J.style.height="12px",h?J.style.backgroundColor=N.light:J.style.backgroundImage="linear-gradient(to right bottom, "+N.cssText+" 50%, "+mxUtils.invertLightDarkColor(N).cssText+" 50.3%)",U.appendChild(J),T.appendChild(U),mxEvent.addListener(U,
-"dblclick",E));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
+"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
"relative";S.style.verticalAlign="middle";S.style.marginTop="-2px";S.style.width="auto";S.style.height="14px";J.appendChild(S);T.appendChild(J);e.appendChild(d);mxEvent.addListener(P,"change",function(){ia.fromString(P.value)});h||e.appendChild(aa);H();d=ca(this.presetColors);d.style.marginBottom="8px";d=ca(this.defaultColors);d.style.marginBottom="16px";e.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
-"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),E);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
+"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),D);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
mxUtils.isVarColor(T.light)?W.value=T.light:(mxUtils.isRgbColor(T.light)?T.light=mxUtils.rgba2hex(T.light):mxUtils.isHexColor(T.light)||(T.light="#"+m(T.light)),W.value=T.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==T.dark?O.value=mxConstants.NONE:mxUtils.isVarColor(T.dark)?O.value=T.dark:(mxUtils.isRgbColor(T.dark)?T.dark=mxUtils.rgba2hex(T.dark):mxUtils.isHexColor(T.dark)||(T.dark="#"+m(T.dark)),O.value=T.dark.substring(1).toUpperCase()),F(),w()));h||!ColorDialog.collapsed||
"automatic"!=fa.value||Editor.isDarkMode()||(aa.style.display="none",p());e.appendChild(d);this.picker=ia;this.colorInput=W;mxEvent.addListener(W,"keypress",M);mxEvent.addListener(O,"keypress",M);mxEvent.addListener(e,"keydown",function(da){27==da.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(da))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
@@ -3798,45 +3799,45 @@ var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("
"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},SimpleTextareaDialog=function(a,b,e,f,g){var d=document.createElement("div"),h=document.createElement("textarea");h.style.position="absolute";h.style.left="30px";h.style.right="30px";h.style.top="30px";h.style.bottom="100px";
h.style.resize="none";h.setAttribute("wrap","off");h.setAttribute("spellcheck","false");h.setAttribute("autocorrect","off");h.setAttribute("autocomplete","off");h.setAttribute("autocapitalize","off");h.value=null!=b?b:"";d.appendChild(h);b=document.createElement("div");b.style.position="absolute";b.style.bottom="46px";b.style.right="30px";b.style.left="30px";b.style.justifyContent="end";b.style.display="flex";null==g||a.isOffline()||b.appendChild(a.createHelpIcon(g));g=mxUtils.button(mxResources.get("cancel"),
function(){a.hideDialog()});g.setAttribute("title","Escape");g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var m=mxUtils.button(null!=f?f:mxResources.get("apply"),function(){a.hideDialog();e(h.value)});m.setAttribute("title","Ctrl+Enter");m.className="geBtn gePrimaryBtn";b.appendChild(m);mxEvent.addListener(h,"keydown",function(p){13==p.keyCode&&mxEvent.isControlDown(p)&&m.click()});a.editor.cancelFirst||b.appendChild(g);this.init=function(){h.focus();h.scrollTop=0};d.appendChild(b);
-this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,E){k=null!=k?k:!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";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
-F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(D);h.appendChild(F);null!=E&&m.appendChild(E);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
-"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};D.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
+this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,D){k=null!=k?k:!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";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
+F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(F);null!=D&&m.appendChild(D);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
+"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};E.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
A[b][1],A[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&F.appendChild(d);null!=p&&p(F,H);if(null!=f){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(H.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";F.appendChild(M);mxEvent.addListener(H,"keydown",function(N){13==N.keyCode&&mxEvent.isControlDown(N)&&M.click()})}a.editor.cancelFirst||
F.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.position="absolute";b.style.inset="10px";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.overflow="auto";e.style.resize="none";e.style.position="absolute";e.style.top="20px";e.style.bottom="76px";e.style.left="20px";
e.style.right="20px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(p){p.stopPropagation();p.preventDefault()},!1),e.addEventListener("drop",function(p){p.stopPropagation();p.preventDefault();if(0<p.dataTransfer.files.length){p=p.dataTransfer.files[0];var k=new FileReader;k.onload=function(u){e.value=u.target.result};k.readAsText(p)}else e.value=a.extractGraphModelFromEvent(p)},
!1));var g=document.createElement("div");g.style.display="flex";g.style.whiteSpace="nowrap";g.style.alignItems="center";g.style.justifyContent="end";g.style.position="absolute";g.style.height="36px";g.style.bottom="24px";g.style.left="20px";g.style.right="20px";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&g.appendChild(d);var h=document.createElement("select");h.style.textOverflow="ellipsis";h.style.width="196px";h.className=
"geBtn";if(a.editor.graph.isEnabled()){var m=document.createElement("option");m.setAttribute("value","apply");mxUtils.write(m,mxResources.get("apply",null,"Update Existing Drawing"));h.appendChild(m)}a.editor.graph.isEnabled()&&(m=document.createElement("option"),m.setAttribute("value","insert"),mxUtils.write(m,mxResources.get("insert")),h.appendChild(m));m=document.createElement("option");m.setAttribute("value","new");mxUtils.write(m,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&
!navigator.standalone&&h.appendChild(m);g.appendChild(h);m=mxUtils.button(mxResources.get("ok"),function(){var p=Graph.zapGremlins(mxUtils.trim(e.value)),k=null;if("new"==h.value)a.hideDialog(),a.editor.editAsNew(p);else if("apply"==h.value)try{var u=mxUtils.parseXml(p).documentElement,w=Editor.extractParserError(u,mxResources.get("unknownError"));w?(EditorUi.debug("EditDiagramDialogParserError",[this],"node",[u],"cause",[w]),k=mxResources.get("invalidInput")+" ("+w+")"):("mxfile"==u.nodeName?a.editor.setGraphXml(u):
-a.updateDiagramData(f,u),a.hideDialog())}catch(D){k=D}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var E=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(E));a.hideDialog()}catch(D){k=D}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
+a.updateDiagramData(f,u),a.hideDialog())}catch(E){k=E}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var D=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(D));a.hideDialog()}catch(E){k=E}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),E.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
-"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(D.removeAttribute("disabled"),F.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*E.value>MAX_AREA||0>=A.value?"red":"";E.style.backgroundColor=A.value*E.value>MAX_AREA||0>=E.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 T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),D.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),D.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
+"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),F.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*D.value>MAX_AREA||0>=A.value?"red":"";D.style.backgroundColor=A.value*D.value>MAX_AREA||0>=D.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
d),m=Math.ceil(g.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);g.appendChild(k);
p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));w.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));w.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),w.appendChild(k));k=document.createElement("td");k.appendChild(w);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");
k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");g.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value","100");y.style.width="180px";k=document.createElement("td");k.appendChild(y);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");g.appendChild(k);var A=document.createElement("input");
-A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
-k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);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 H=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
-"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(D);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
+A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var D=document.createElement("input");D.setAttribute("value",m);D.style.width="180px";k=document.createElement("td");k.appendChild(D);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
+k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var E=document.createElement("select");E.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");E.appendChild(k);k=document.createElement("option");
+k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));E.appendChild(k);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 H=!1;mxEvent.addListener(E,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
+"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(E);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
M.setAttribute("type","checkbox");M.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(M);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=!1;k=document.createElement("td");k.appendChild(N);
g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var J=document.createElement("input");J.setAttribute("type","number");J.setAttribute("value",ExportDialog.lastBorderValue);J.style.width="180px";k=document.createElement("td");k.appendChild(J);g.appendChild(k);p.appendChild(g);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(y,"change",
-function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(E,"change",function(){var T=parseInt(E.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
-T)):(y.value="100",A.value=h,E.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
+function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var T=parseInt(D.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
+T)):(y.value="100",A.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
"pdf"==O)&&M.checked)aa=null;else if(null==aa||aa==mxConstants.NONE)aa="#ffffff";ExportDialog.lastBorderValue=S;ExportDialog.exportFile(a,T,O,aa,fa,S,Y,N.checked)}}));V.className="geBtn gePrimaryBtn";var W=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});W.className="geBtn";a.editor.cancelFirst?(k.appendChild(W),k.appendChild(V)):(k.appendChild(V),k.appendChild(W));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,g,d,h,m){m=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(m.getSvg(f,g,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-p.x)/m.view.scale),Math.floor((d/g-p.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*g/m.view.scale+2*d);g=Math.ceil(p.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
var EditDataDialog=function(a,b){function e(){0<J.value.length?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(T){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,w=[],y=[],A=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
-mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=E?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
-":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");D(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
-T.name>O.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=E)if(g.model.isRoot(b)){var fa=a.getPageById(E);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
-O),E=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),E=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
+"100%";var u=d.attributes,w=[],y=[],A=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
+mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=D?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
+":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");E(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
+T.name>O.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=D)if(g.model.isRoot(b)){var fa=a.getPageById(D);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
+O),D=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),D=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);h=document.createElement("div");h.style.display="flex";h.style.alignItems="center";h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop="6px";h.style.width="100%";var J=document.createElement("input");J.setAttribute("placeholder",mxResources.get("enterPropertyName"));J.setAttribute("type",
"text");J.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");J.style.boxSizing="border-box";J.style.borderWidth="1px";J.style.borderStyle="solid";J.style.marginLeft="2px";J.style.padding="4px";J.style.width="100%";h.appendChild(J);p.appendChild(h);f.appendChild(p);var V=mxUtils.button(mxResources.get("addProperty"),function(){var T=J.value;if(0<T.length&&"label"!=T&&"id"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var O=mxUtils.indexOf(w,T);if(0<=O&&null!=y[O])y[O].focus();else{d.cloneNode(!1).setAttribute(T,
-"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);D(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
+"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);E(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
"ellipsis";V.style.position="absolute";V.style.overflow="hidden";V.style.width="144px";V.style.right="0px";V.className="geBtn";h.appendChild(V);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(T){var O=g.getDataForCells([b],!0);T=new EmbedDialog(a,JSON.stringify(O,null,2),null,null,function(){console.log(O);a.alert("Written to Console (Dev Tools)")},
mxResources.get("export"),null,"Console","data.json");a.showDialog(T.container,450,240,!0,!0);T.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var W=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var T=!1,O=0;O<w.length;O++)null==y[O]?d.removeAttribute(w[O]):(d.setAttribute(w[O],y[O].value),T=T||"placeholder"==w[O]&&"1"==d.getAttribute("placeholders"));T&&d.removeAttribute("label");g.getModel().setValue(b,
d)}catch(fa){mxUtils.alert(fa)}});W.setAttribute("title","Ctrl+Enter");W.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&W.click()});mxEvent.addListener(J,"keyup",e);mxEvent.addListener(J,"change",e);u=document.createElement("div");u.style.display="flex";u.style.justifyContent="flex-end";u.style.alignItems="center";u.style.position="absolute";u.style.left="30px";u.style.right="30px";u.style.bottom="30px";u.style.height="40px";if(a.editor.graph.getModel().isVertex(b)||
@@ -3857,17 +3858,17 @@ mxResources.get("lockUnlock"));var ta=p.getCurrentCellStyle(ba);"1"==mxUtils.get
P&&p.removeSelectionCells(p.getModel().getDescendants(ba));mxEvent.consume(ca)}});X.appendChild(ja);mxUtils.write(ia,Y);ia.style.display="block";ia.style.whiteSpace="nowrap";ia.style.overflow="hidden";ia.style.textOverflow="ellipsis";ia.style.position="absolute";ia.style.padding="2px";ia.style.left="52px";ia.style.right="8px";X.appendChild(ia);U.appendChild(X);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)Y=document.createElement("div"),Y.style.display=
"block",Y.style.textAlign="right",Y.style.whiteSpace="nowrap",Y.style.position="absolute",Y.style.right="16px",Y.style.top="6px",0<aa&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9660;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa-
1);mxEvent.consume(ca)})),0<=aa&&aa<A-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9650;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa+1);mxEvent.consume(ca)})),U.appendChild(Y);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
-(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",E=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
+(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",D=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
mxEvent.consume(ca))});u.appendChild(U)}p.isEnabled()?(W.classList.remove("mxDisabled"),N.classList.remove("mxDisabled"),V.classList.remove("mxDisabled"),H.classList.remove("mxDisabled")):(W.classList.add("mxDisabled"),N.classList.add("mxDisabled"),V.classList.add("mxDisabled"),H.classList.add("mxDisabled"));A=p.model.getChildCount(p.model.root);u.innerText="";J.clear();for(var fa=A-1;0<=fa;fa--)mxUtils.bind(this,function(aa){O(fa,p.convertValueToString(aa)||mxResources.get("background"),aa,aa)})(p.model.getChildAt(p.model.root,
-fa));var S=p.convertValueToString(E)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
+fa));var S=p.convertValueToString(D)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
!1,null);fa.removeAttribute("draggable");fa.style.cursor="";var ba=function(L){if("true"==aa.contentEditable){aa.contentEditable="false";var U=mxUtils.getTextContent(aa);L&&U!=Y?(U=mxUtils.getTextContent(aa),0<U.length?p.cellLabelChanged(O,U):p.cellLabelChanged(O,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(aa,"keydown",function(L){if(13==L.keyCode||27==L.keyCode)ba(13==L.keyCode),mxEvent.consume(L)});mxEvent.addListener(aa,"blur",function(L){ba(!0);mxEvent.consume(L)})}}}}var p=a.editor.graph,
k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,y=null;mxEvent.addListener(k,"dragover",function(O){O.dataTransfer.dropEffect="move";y=0;O.stopPropagation();O.preventDefault()});mxEvent.addListener(k,"drop",function(O){O.stopPropagation();
-O.preventDefault()});var A=null,E=null,D=document.createElement("div");D.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
-p.isEnabled()||H.classList.add("mxDisabled");D.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
-"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});D.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
-"click",function(O){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");D.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(E),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
-O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");D.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(E);p.removeCells([E],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
-p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");D.appendChild(W);k.appendChild(D);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
+O.preventDefault()});var A=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
+p.isEnabled()||H.classList.add("mxDisabled");E.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
+"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});E.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
+"click",function(O){p.isEnabled()&&a.showDataDialog(D);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");E.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(D),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
+O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(D);p.removeCells([D],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
+p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);k.appendChild(E);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
h);a.addListener("lockedChanged",h);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?M.classList.add("mxDisabled"):M.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};
this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -11990,25 +11991,25 @@ DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f
function(u){g&&(window.clearTimeout(c),this.sync.cleanup(b,f,u))}),p,q):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(c),null!=b&&b())}),p,q)}};
DrawioFile.prototype.updateFile=function(b,f,g,c,p){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",p,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
c,p):this.reloadFile(b,f))}catch(u){null!=f&&f(u)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,g,c,p){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var u=this.getShadowPages(),y=[this.ui.diffPages(null!=c?c:u,q)],G=this.ignorePatches(y);if(G)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",G),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(u,
+DrawioFile.prototype.mergeFile=function(b,f,g,c,p){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var u=this.getShadowPages(),y=[this.ui.diffPages(null!=c?c:u,q)],H=this.ignorePatches(y);if(H)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",H),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var E=this.isModified()?this.ui.diffPages(u,
this.isRealtime()?this.ownPages:this.ui.pages):null,F=this.ui.patchPages(this.ui.clonePages(u),y[0]),d=this.ui.getHashValueForPages(F,{}),k=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",u,"pages",q,"patched",F,"patches",y,"changes",E,"checksum",d,"current",k,"valid",d==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",p);if(null!=d&&d!=k)this.checksumError(g,y,null,null,"mergeFile",
-d,k,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var l=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?E:null,null,p);null==l||mxUtils.isEmptyObject(l)||y.push(l)}this.patch(y,DrawioFile.LAST_WRITE_WINS?E:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var n=this.getCurrentUser(),x=null!=n?
-n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,z)}catch(B){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=g&&g(z)}};
+d,k,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var l=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?E:null,null,p);null==l||mxUtils.isEmptyObject(l)||y.push(l)}this.patch(y,DrawioFile.LAST_WRITE_WINS?E:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(A);try{var n=this.getCurrentUser(),x=null!=n?
+n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}catch(B){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(A){null!=g&&g(A)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),g=f.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var p=f.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(p=this.ui.anonymizeNode(p,!0));p.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,p,!0);g.appendChild(p)}return mxUtils.getPrettyXml(g)};
DrawioFile.prototype.compressReportData=function(b,f,g){f=null!=f?f:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,g,c,p,q,u,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var G=this.getCurrentUser(),E=null!=G?G.id:"unknown",F=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(f).length,k=null;if(null!=f&&1E3>d){b=[];for(g=0;g<f.length;g++)b.push(this.ui.anonymizePatch(f[g]));k=JSON.stringify(b);k=null!=k&&1E3>
-k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var n=null!=k?"report":"error",x=this.ui.getHashValueForPages(l.getShadowPages()),z="unknown",B="unknown",I="unknown";try{var H=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=H&&(null!=H.getAttribute("version")&&(z=H.getAttribute("version")),null!=H.getAttribute("agent")&&(B=H.getAttribute("agent")),null!=H.getAttribute("type")&&(I=H.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
-n+" in "+p,null,this.getMode()+"."+F,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=u?"-current_"+u:"")+(null!=y?"-rev_"+this.ui.hashValue(y):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+B)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+F,action:p,label:"user_"+
+DrawioFile.prototype.checksumError=function(b,f,g,c,p,q,u,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var H=this.getCurrentUser(),E=null!=H?H.id:"unknown",F=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(f).length,k=null;if(null!=f&&1E3>d){b=[];for(g=0;g<f.length;g++)b.push(this.ui.anonymizePatch(f[g]));k=JSON.stringify(b);k=null!=k&&1E3>
+k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var n=null!=k?"report":"error",x=this.ui.getHashValueForPages(l.getShadowPages()),A="unknown",B="unknown",I="unknown";try{var G=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=G&&(null!=G.getAttribute("version")&&(A=G.getAttribute("version")),null!=G.getAttribute("agent")&&(B=G.getAttribute("agent")),null!=G.getAttribute("type")&&(I=G.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
+n+" in "+p,null,this.getMode()+"."+F,"user_"+E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=u?"-current_"+u:"")+(null!=y?"-rev_"+this.ui.hashValue(y):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+A)+("-latestAgent_"+B)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+F,action:p,label:"user_"+
E+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,g,c){try{var p=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),y=null!=u?this.ui.hashValue(u.id):"unknown",G=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),F=E.lastIndexOf(".");u="xml";0<F&&(u=E.substring(F));var d=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+u+")\nUser="+y+G+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+DrawioFile.prototype.sendErrorReport=function(b,f,g,c){try{var p=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),y=null!=u?this.ui.hashValue(u.id):"unknown",H=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",E=this.getTitle(),F=E.lastIndexOf(".");u="xml";0<F&&(u=E.substring(F));var d=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+u+")\nUser="+y+H+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+d+"\n\nShadow:\n"+p+"\n\nData:\n"+q,c)}catch(k){}};
DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,p=c.getSelectionCells(),q=c.getViewState(),u=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(y){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[q],"latestFile",y);null!=y?(this.ui.replaceFileData(y.getData(),
-[g]),this.ui.restoreViewState(u,q,p),this.setDescriptor(y.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var G=this.ui.getCurrentFile();null!=G&&(G.stats=this.stats,G.patch([g]),G.fileChanged());this.ui.restoreViewState(u,q,p);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(y){null!=f&&f(y)}};
+[g]),this.ui.restoreViewState(u,q,p),this.setDescriptor(y.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var H=this.ui.getCurrentFile();null!=H&&(H.stats=this.stats,H.patch([g]),H.fileChanged());this.ui.restoreViewState(u,q,p);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(y){null!=f&&f(y)}};
DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var g=0;g<b.length&&f;g++)f=f&&mxUtils.isEmptyObject(b[g]);return f};
-DrawioFile.prototype.patch=function(b,f,g,c){if(null!=b){var p=this.ui.editor.undoManager,q=p.history.slice(),u=p.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var G=this.changeListenerEnabled;this.changeListenerEnabled=g;var E=y.foldingEnabled,F=y.mathEnabled,d=y.cellRenderer.redraw;y.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());d.apply(this,arguments)};y.model.beginUpdate();
-try{if(g){for(var k=this.ui.pages.slice(),l=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var z=mxUtils.indexOf(this.ui.pages,n[x]);0>z?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(z,x)}for(x=0;x<k.length;x++)0>mxUtils.indexOf(n,k[x])&&this.ui.removePage(k[x]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);y.checkDefaultParent()}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=d;this.changeListenerEnabled=G;g||(p.history=q,p.indexOfNextAdd=u,p.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)F!=y.mathEnabled?(this.ui.editor.updateGraphComponents(),y.refresh()):(E!=y.foldingEnabled?
+DrawioFile.prototype.patch=function(b,f,g,c){if(null!=b){var p=this.ui.editor.undoManager,q=p.history.slice(),u=p.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var H=this.changeListenerEnabled;this.changeListenerEnabled=g;var E=y.foldingEnabled,F=y.mathEnabled,d=y.cellRenderer.redraw;y.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());d.apply(this,arguments)};y.model.beginUpdate();
+try{if(g){for(var k=this.ui.pages.slice(),l=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var A=mxUtils.indexOf(this.ui.pages,n[x]);0>A?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(A,x)}for(x=0;x<k.length;x++)0>mxUtils.indexOf(n,k[x])&&this.ui.removePage(k[x]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);y.checkDefaultParent()}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=d;this.changeListenerEnabled=H;g||(p.history=q,p.indexOfNextAdd=u,p.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)F!=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",f,"undoable",g)}return b};
DrawioFile.prototype.save=function(b,f,g,c,p,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",p,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!p&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=g)g({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(u){if(null!=g)g(u);else throw u;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
@@ -12059,7 +12060,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",g);b(f,g)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,f,g,c,p,q,u){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(q,f,g,c,p,u)}catch(E){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=c&&c(E);try{var y=this.getCurrentUser(),G=null!=y?y.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),G,E)}catch(F){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(E){this.descriptorChanged(),null!=c&&c(E)}};
+this.inConflictState=!0;this.descriptorChanged();null!=c&&c(E);try{var y=this.getCurrentUser(),H=null!=y?y.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),H,E)}catch(F){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(E){this.descriptorChanged(),null!=c&&c(E)}};
DrawioFile.prototype.autosave=function(b,f,g,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var p=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var u=this.isAutosaveRevision();
u&&(this.lastAutosaveRevision=(new Date).getTime());this.save(u,mxUtils.bind(this,function(y){this.autosaveCompleted();null!=g&&g(y)}),mxUtils.bind(this,function(y){null!=c&&c(y)}))}else this.isModified()||this.ui.clearStatus(),null!=g&&g(null)}catch(y){null!=c&&c(y)}}),p);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",p,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
@@ -12068,10 +12069,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,g){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,g,c,p,q,u){DrawioFile.call(this,b,f);this.title=g;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=p;this.desc=q;this.editable=u};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,g,c,p){this.saveAs(this.title,f,g,c,p)};LocalFile.prototype.saveAs=function(b,f,g,c,p){this.saveFile(b,!1,f,g,null,c,p)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,g,c,p,q,u){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;p||this.updateFileData();var y=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var G=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),F=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var k=mxUtils.bind(this,function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft(G);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);u||this.desc.lastModified==x.lastModified?n.write(y?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var B=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(G,B,E,k);this.removeDraft()}catch(I){k(I)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;k(x)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,y?"image/png":"text/xml",y);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(y?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));E()}});y?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){F(d)}),c,this.ui.getCurrentFile()!=this?G:null,f.scale,f.border)):F(G)};
+LocalFile.prototype.saveFile=function(b,f,g,c,p,q,u){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;p||this.updateFileData();var y=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var H=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),F=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var k=mxUtils.bind(this,function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft(H);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);u||this.desc.lastModified==x.lastModified?n.write(y?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(A){try{var B=this.desc;this.savingFile=!1;this.desc=A;this.fileSaved(H,B,E,k);this.removeDraft()}catch(I){k(I)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;k(x)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,y?"image/png":"text/xml",y);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(y?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));E()}});y?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){F(d)}),c,this.ui.getCurrentFile()!=this?H:null,f.scale,f.border)):F(H)};
LocalFile.prototype.rename=function(b,f,g){this.title=b;this.descriptorChanged();null!=f&&f()};LocalLibrary=function(b,f,g){LocalFile.call(this,b,f,g)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,g){this.saveFile(b,!1,f,g)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,g){DrawioFile.call(this,b,f);this.title=g;this.etag=this.getEtag(f)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,f){this.getLatestVersionId(b,f)};StorageFile.prototype.getLatestVersionId=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(g){b(this.getEtag(g))}),f)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};
StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,f,g){this.saveAs(this.getTitle(),f,g)};
@@ -12090,374 +12091,375 @@ StorageFile.listFiles=function(b,f,g,c){b.getDatabaseItems(function(p){var q=[];
StorageLibrary.prototype.isRenamable=function(b,f,g){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,g){DrawioFile.call(this,b,f);this.title=g;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,g){RemoteFile.call(this,b,f,g.title);this.libObj=g};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,g){};
RemoteLibrary.prototype.saveAs=function(b,f,g){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,g){StorageFile.call(this,b,f,g);b=g;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,g){return!1};UrlLibrary.prototype.saveAs=function(b,f,g){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,g){DrawioFile.call(this,b,f);this.desc=g||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,g){function c(d,k,l,n,x,z){function B(){mxEvent.addListener(I,"click",null!=z?z:function(){l==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()})):l==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()}),function(S){b.spinner.stop();b.handleError(S)}):
-(b.setMode(l,!0),f())})}y++;++u>g&&(mxUtils.br(G),u=1);var I=document.createElement("a");I.style.overflow="hidden";I.style.display="inline-block";I.className="geBaseButton";I.style.boxSizing="border-box";I.style.fontSize="11px";I.style.position="relative";I.style.margin="4px";I.style.marginTop="8px";I.style.marginBottom="0px";I.style.padding="8px 10px 8px 10px";I.style.width="88px";I.style.height="100px";I.style.whiteSpace="nowrap";I.setAttribute("title",k);var H=document.createElement("div");H.style.textOverflow=
-"ellipsis";H.style.overflow="hidden";H.style.position="absolute";H.style.bottom="8px";H.style.left="0px";H.style.right="0px";mxUtils.write(H,k);I.appendChild(H);if(null!=d){var C=document.createElement("img");C.setAttribute("src",d);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";I.appendChild(C)}else H.style.paddingTop="5px",H.style.whiteSpace="normal",mxClient.IS_IOS?(I.style.padding="0px 10px 20px 10px",I.style.top=
-"6px"):mxClient.IS_FF&&(H.style.paddingTop="0px",H.style.marginTop="-2px");if(null!=x)for(d=0;d<x.length;d++)mxUtils.br(H),mxUtils.write(H,x[d]);if(null!=n&&null==b[n]){C.style.visibility="hidden";mxUtils.setOpacity(H,10);var R=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});R.spin(I);var U=window.setTimeout(function(){null==b[n]&&(R.stop(),I.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(S,Q){null!=b[n]&&Q.getProperty("client")==b[n]&&(window.clearTimeout(U),mxUtils.setOpacity(H,100),C.style.visibility="",R.stop(),B(),"drive"==n&&null!=E.parentNode&&E.parentNode.removeChild(E))}))}else B();G.appendChild(I)}g=null!=g?g:2;var p=document.createElement("div");p.style.textAlign="center";p.style.whiteSpace="nowrap";p.style.paddingTop="0px";p.style.paddingBottom="20px";var q=document.createElement("div");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";
-q.style.padding="10px 0px 20px 0px";var u=0,y=0,G=document.createElement("div");G.style.paddingTop="2px";q.appendChild(G);var E=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");p.appendChild(F);p.appendChild(q);u=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
+var StorageDialog=function(b,f,g){function c(d,k,l,n,x,A){function B(){mxEvent.addListener(I,"click",null!=A?A:function(){l==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()})):l==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);f()}),function(S){b.spinner.stop();b.handleError(S)}):
+(b.setMode(l,!0),f())})}y++;++u>g&&(mxUtils.br(H),u=1);var I=document.createElement("a");I.style.overflow="hidden";I.style.display="inline-block";I.className="geBaseButton";I.style.boxSizing="border-box";I.style.fontSize="11px";I.style.position="relative";I.style.margin="4px";I.style.marginTop="8px";I.style.marginBottom="0px";I.style.padding="8px 10px 8px 10px";I.style.width="88px";I.style.height="100px";I.style.whiteSpace="nowrap";I.setAttribute("title",k);var G=document.createElement("div");G.style.textOverflow=
+"ellipsis";G.style.overflow="hidden";G.style.position="absolute";G.style.bottom="8px";G.style.left="0px";G.style.right="0px";mxUtils.write(G,k);I.appendChild(G);if(null!=d){var C=document.createElement("img");C.setAttribute("src",d);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";I.appendChild(C)}else G.style.paddingTop="5px",G.style.whiteSpace="normal",mxClient.IS_IOS?(I.style.padding="0px 10px 20px 10px",I.style.top=
+"6px"):mxClient.IS_FF&&(G.style.paddingTop="0px",G.style.marginTop="-2px");if(null!=x)for(d=0;d<x.length;d++)mxUtils.br(G),mxUtils.write(G,x[d]);if(null!=n&&null==b[n]){C.style.visibility="hidden";mxUtils.setOpacity(G,10);var R=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});R.spin(I);var T=window.setTimeout(function(){null==b[n]&&(R.stop(),I.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(S,Q){null!=b[n]&&Q.getProperty("client")==b[n]&&(window.clearTimeout(T),mxUtils.setOpacity(G,100),C.style.visibility="",R.stop(),B(),"drive"==n&&null!=E.parentNode&&E.parentNode.removeChild(E))}))}else B();H.appendChild(I)}g=null!=g?g:2;var p=document.createElement("div");p.style.textAlign="center";p.style.whiteSpace="nowrap";p.style.paddingTop="0px";p.style.paddingBottom="20px";var q=document.createElement("div");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";
+q.style.padding="10px 0px 20px 0px";var u=0,y=0,H=document.createElement("div");H.style.paddingTop="2px";q.appendChild(H);var E=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");p.appendChild(F);p.appendChild(q);u=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");q=document.createElement("span");q.style.position="absolute";q.style.cursor="pointer";q.style.bottom="27px";q.style.color="gray";q.style.userSelect="none";q.style.textAlign="center";q.style.left="50%";mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0)");mxUtils.write(q,mxResources.get("decideLater"));
p.appendChild(q);mxEvent.addListener(q,"click",function(){b.hideDialog();var d=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(E.style.padding="7px",E.style.fontSize="9pt",E.style.marginTop="-14px",E.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",p.appendChild(E))},5E3);this.container=p},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var g=b.addLanguageMenu(f,!1,"28px");null!=g&&(g.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 p=document.createElement("div");p.style.margin="8px 0px 0px 0px";p.style.padding="18px 0px 24px 0px";g="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",g=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",g=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",g=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
(c.src=IMAGE_PATH+"/github-logo.svg",g=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",g=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",g=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",p.style.paddingBottom="10px",p.style.paddingTop="30px",g=mxResources.get("device"));var q=document.createElement("button");
-q.className="geBigButton";q.style.marginBottom="8px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)p.style.padding="42px 0px 10px 0px",q.style.marginBottom="12px";else{p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";var u=document.createElement("table"),y=document.createElement("tbody"),G=document.createElement("tr"),E=document.createElement("td"),F=document.createElement("td");u.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,g);F.style.textAlign="left";F.appendChild(c);G.appendChild(E);G.appendChild(F);y.appendChild(G);u.appendChild(y);f.appendChild(u);g=document.createElement("span");g.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0)");mxUtils.write(g,
+q.className="geBigButton";q.style.marginBottom="8px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)p.style.padding="42px 0px 10px 0px",q.style.marginBottom="12px";else{p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";var u=document.createElement("table"),y=document.createElement("tbody"),H=document.createElement("tr"),E=document.createElement("td"),F=document.createElement("td");u.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,g);F.style.textAlign="left";F.appendChild(c);H.appendChild(E);H.appendChild(F);y.appendChild(H);u.appendChild(y);f.appendChild(u);g=document.createElement("span");g.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0)");mxUtils.write(g,
mxResources.get("changeStorage"));mxEvent.addListener(g,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(g)}mxUtils.write(q,mxResources.get("createNewDiagram"));mxEvent.addListener(q,"click",function(){b.hideDialog();b.actions.get("new").funct()});p.appendChild(q);mxUtils.br(p);q=document.createElement("button");q.className="geBigButton";q.style.marginBottom="22px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";mxUtils.write(q,
mxResources.get("openExistingDiagram"));mxEvent.addListener(q,"click",function(){b.actions.get("open").funct()});p.appendChild(q);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(g=function(l){q.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));q.style.marginBottom="16px";p.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){l()})});p.appendChild(n)},b.mode==App.MODE_GOOGLE&&
null!=b.drive){var d=b.drive.getUsersList();if(0<d.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");q.style.marginBottom="16px";p.style.paddingBottom="18px";p.appendChild(c);var k=document.createElement("select");k.style.marginLeft="4px";k.style.width="140px";for(g=0;g<d.length;g++)u=document.createElement("option"),mxUtils.write(u,d[g].displayName),u.value=g,k.appendChild(u),u=document.createElement("option"),u.innerHTML="&nbsp;&nbsp;&nbsp;",
mxUtils.write(u,"<"+d[g].email+">"),u.setAttribute("disabled","disabled"),k.appendChild(u);u=document.createElement("option");mxUtils.write(u,mxResources.get("addAccount"));u.value=d.length;k.appendChild(u);mxEvent.addListener(k,"change",function(){var l=k.value,n=d.length!=l;n&&b.drive.setUser(d[l]);b.drive.authorize(n,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(x){b.handleError(x,null,function(){b.hideDialog();b.showSplash()})},!0)});p.appendChild(k)}else g(function(){b.drive.logout()})}else b.mode!=
App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?g(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?g(function(){b.gitLab.logout();var l=document.createElement("form");l.setAttribute("method","post");l.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");l.setAttribute("target","_blank");document.body.appendChild(l);l.submit();l.parentNode.removeChild(l)}):b.mode==App.MODE_TRELLO&&
-null!=b.trello?b.trello.isAuthorized()&&g(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&g(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):g(function(){b.oneDrive.logout()});f.appendChild(p);this.container=f},EmbedDialog=function(b,f,g,c,p,q,u,y,G){c=document.createElement("div");var E=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=q?mxUtils.write(c,q):mxUtils.write(c,mxResources.get(5E5>f.length?E?"link":"mainEmbedNotice":"preview")+":");
+null!=b.trello?b.trello.isAuthorized()&&g(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&g(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):g(function(){b.oneDrive.logout()});f.appendChild(p);this.container=f},EmbedDialog=function(b,f,g,c,p,q,u,y,H){c=document.createElement("div");var E=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=q?mxUtils.write(c,q):mxUtils.write(c,mxResources.get(5E5>f.length?E?"link":"mainEmbedNotice":"preview")+":");
mxUtils.br(c);q=document.createElement("div");q.style.position="absolute";q.style.top="30px";q.style.right="30px";q.style.color="gray";mxUtils.write(q,b.formatFileSize(f.length));c.appendChild(q);var F=document.createElement("textarea");F.setAttribute("autocomplete","off");F.setAttribute("autocorrect","off");F.setAttribute("autocapitalize","off");F.setAttribute("spellcheck","false");F.style.fontFamily="monospace";F.style.wordBreak="break-all";F.style.marginTop="10px";F.style.resize="none";F.style.height=
"150px";F.style.width="440px";F.style.border="1px solid gray";F.value=mxResources.get("updatingDocument");c.appendChild(F);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>f.length?(F.value=f,F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)):(F.setAttribute("readonly","true"),F.value=mxResources.get("tooLargeUseDownload"))},0)};q=document.createElement("div");q.style.position="absolute";q.style.bottom="36px";
q.style.right="32px";u=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!E||navigator.standalone||!(E||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(u=mxUtils.button(null!=y?y:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var k=5E5>f.length?F.value:f;if(null!=p)p(k);else if(E)try{var l=b.openLink(k);null!=l&&(null==g||0<g)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,
8)!=k.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(x){}}),g||500)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}else{var n=window.open();n=null!=n?n.document:null;null!=n?(n.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==f.substring(0,7)?f:mxUtils.htmlEntities(f))+"</body></html>"),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
-u.className="geBtn",q.appendChild(u));if(!E||7500<f.length)y=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=G?G:"embed.txt","txt",f,"text/plain")}),y.className="geBtn",q.appendChild(y);if(!b.isOffline()&&5E5>f.length){y=mxUtils.button("",function(){try{var k="mailto:?subject="+encodeURIComponent(G||b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(k)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});
+u.className="geBtn",q.appendChild(u));if(!E||7500<f.length)y=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=H?H:"embed.txt","txt",f,"text/plain")}),y.className="geBtn",q.appendChild(y);if(!b.isOffline()&&5E5>f.length){y=mxUtils.button("",function(){try{var k="mailto:?subject="+encodeURIComponent(H||b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(k)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});
var d=document.createElement("img");d.className="geAdaptiveAsset";d.setAttribute("src",Editor.mailImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");d.style.marginBottom="5px";y.appendChild(d);y.style.verticalAlign="bottom";y.style.paddingTop="4px";y.style.minWidth="46px";y.className="geBtn";q.appendChild(y)}y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});q.appendChild(y);d=mxUtils.button(mxResources.get("copy"),function(){F.focus();
mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(q.appendChild(d),d.className="geBtn gePrimaryBtn",y.className="geBtn"):null!=u&&(q.appendChild(u),y.className="geBtn",u.className="geBtn gePrimaryBtn");c.appendChild(q);this.container=c};EmbedDialog.showPreviewOption=!0;
var CreateGraphDialog=function(b,f,g){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var p=document.createElement("div");p.style.position="relative";p.style.border="1px solid gray";p.style.boxSizing="border-box";p.style.width="100%";p.style.height="360px";p.style.overflow="hidden";p.style.marginBottom="16px";mxEvent.disableContextMenu(p);c.appendChild(p);var q=new Graph(p);q.setCellsCloneable(!0);q.setPanning(!0);q.setAllowDanglingEdges(!1);q.connectionHandler.select=
-!1;q.view.setTranslate(20,20);q.border=20;q.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=q.view.getDrawPane()&&(p=q.view.getDrawPane().ownerSVGElement,null!=p&&(p.style.position="absolute"));var u="curved=1;";q.cellRenderer.installCellOverlayListeners=function(n,x,z){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(z.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,
-"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(z.node,"touchstart",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,"state",n))})};q.getAllConnectionConstraints=function(){return null};q.connectionHandler.marker.highlight.keepOnTop=!1;q.connectionHandler.createEdgeState=function(n){n=q.createEdge(null,null,null,null,null,u);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var y=q.getDefaultParent(),G=mxUtils.bind(this,function(n){var x=
-new mxCellOverlay(this.connectImage,"Add outgoing");x.cursor="hand";x.addListener(mxEvent.CLICK,function(z,B){q.connectionHandler.reset();q.clearSelection();var I=q.getCellGeometry(n),H;d(function(){H=q.insertVertex(y,null,"Entry",I.x,I.y,80,30,"rounded=1;");G(H);q.view.refresh(H);q.insertEdge(y,null,"",n,H,u)},function(){q.scrollCellToVisible(H)})});x.addListener("pointerdown",function(z,B){z=B.getProperty("event");B=B.getProperty("state");q.popupMenuHandler.hideMenu();q.stopEditing(!1);var I=mxUtils.convertPoint(q.container,
-mxEvent.getClientX(z),mxEvent.getClientY(z));q.connectionHandler.start(B,I.x,I.y);q.isMouseDown=!0;q.isMouseTrigger=mxEvent.isMouseEvent(z);mxEvent.consume(z)});q.addCellOverlay(n,x)});q.getModel().beginUpdate();try{var E=q.insertVertex(y,null,"Start",0,0,80,30,"ellipse");G(E)}finally{q.getModel().endUpdate()}if("horizontalTree"==g){var F=new mxCompactTreeLayout(q);F.edgeRouting=!1;F.levelDistance=30;F.sortEdges=!0;u="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==g?(F=new mxCompactTreeLayout(q,
+!1;q.view.setTranslate(20,20);q.border=20;q.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=q.view.getDrawPane()&&(p=q.view.getDrawPane().ownerSVGElement,null!=p&&(p.style.position="absolute"));var u="curved=1;";q.cellRenderer.installCellOverlayListeners=function(n,x,A){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(A.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,
+"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(A.node,"touchstart",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,"state",n))})};q.getAllConnectionConstraints=function(){return null};q.connectionHandler.marker.highlight.keepOnTop=!1;q.connectionHandler.createEdgeState=function(n){n=q.createEdge(null,null,null,null,null,u);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var y=q.getDefaultParent(),H=mxUtils.bind(this,function(n){var x=
+new mxCellOverlay(this.connectImage,"Add outgoing");x.cursor="hand";x.addListener(mxEvent.CLICK,function(A,B){q.connectionHandler.reset();q.clearSelection();var I=q.getCellGeometry(n),G;d(function(){G=q.insertVertex(y,null,"Entry",I.x,I.y,80,30,"rounded=1;");H(G);q.view.refresh(G);q.insertEdge(y,null,"",n,G,u)},function(){q.scrollCellToVisible(G)})});x.addListener("pointerdown",function(A,B){A=B.getProperty("event");B=B.getProperty("state");q.popupMenuHandler.hideMenu();q.stopEditing(!1);var I=mxUtils.convertPoint(q.container,
+mxEvent.getClientX(A),mxEvent.getClientY(A));q.connectionHandler.start(B,I.x,I.y);q.isMouseDown=!0;q.isMouseTrigger=mxEvent.isMouseEvent(A);mxEvent.consume(A)});q.addCellOverlay(n,x)});q.getModel().beginUpdate();try{var E=q.insertVertex(y,null,"Start",0,0,80,30,"ellipse");H(E)}finally{q.getModel().endUpdate()}if("horizontalTree"==g){var F=new mxCompactTreeLayout(q);F.edgeRouting=!1;F.levelDistance=30;F.sortEdges=!0;u="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==g?(F=new mxCompactTreeLayout(q,
!1),F.edgeRouting=!1,F.levelDistance=30,F.sortEdges=!0,u="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==g?(F=new mxRadialTreeLayout(q,!1),F.edgeRouting=!1,F.levelDistance=80):"verticalFlow"==g?F=new mxHierarchicalLayout(q,mxConstants.DIRECTION_NORTH):"horizontalFlow"==g?F=new mxHierarchicalLayout(q,mxConstants.DIRECTION_WEST):"circle"==g?F=new mxCircleLayout(q):(F=new mxFastOrganicLayout(q,!1),F.forceConstant=80);if(null!=F){var d=function(n,x){q.getModel().beginUpdate();try{null!=n&&n(),
-F.execute(q.getDefaultParent(),E)}catch(z){throw z;}finally{n=new mxMorphing(q),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){q.getModel().endUpdate();null!=x&&x()})),n.startAnimation()}},k=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,x,z,B,I){k.apply(this,arguments);d()};q.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};q.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
-function(){b.hideDialog()})});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);var l=mxUtils.button(mxResources.get("insert"),function(n){q.clearCellOverlays();var x=q.getModel().getChildren(q.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(q.getBoundingBoxFromGeometry(x,!0));x=b.editor.graph.importCells(x,n.x,n.y);n=b.editor.graph.view;var z=n.getBounds(x);null!=z&&(z.x-=n.translate.x,z.y-=n.translate.y,b.editor.graph.scrollRectToVisible(z),
+F.execute(q.getDefaultParent(),E)}catch(A){throw A;}finally{n=new mxMorphing(q),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){q.getModel().endUpdate();null!=x&&x()})),n.startAnimation()}},k=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,x,A,B,I){k.apply(this,arguments);d()};q.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};q.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
+function(){b.hideDialog()})});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);var l=mxUtils.button(mxResources.get("insert"),function(n){q.clearCellOverlays();var x=q.getModel().getChildren(q.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(q.getBoundingBoxFromGeometry(x,!0));x=b.editor.graph.importCells(x,n.x,n.y);n=b.editor.graph.view;var A=n.getBounds(x);null!=A&&(A.x-=n.translate.x,A.y-=n.translate.y,b.editor.graph.scrollRectToVisible(A),
b.editor.graph.setSelectionCells(x));b.hideDialog()});c.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(p);this.graph=q};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==",26,
26);
-var BackgroundImageDialog=function(b,f,g,c,p){function q(){null==A||A==mxConstants.NONE?(v.style.display="none",S.checked=!1):(v.style.backgroundColor=A,v.style.display="",S.checked=!0)}var u=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var G=document.createElement("h2");mxUtils.write(G,mxResources.get("background"));G.style.marginTop="0px";y.appendChild(G);var E=null!=g&&null!=g.originalSrc;G=!1;var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value",
+var BackgroundImageDialog=function(b,f,g,c,p){function q(){null==z||z==mxConstants.NONE?(v.style.display="none",S.checked=!1):(v.style.backgroundColor=z,v.style.display="",S.checked=!0)}var u=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var H=document.createElement("h2");mxUtils.write(H,mxResources.get("background"));H.style.marginTop="0px";y.appendChild(H);var E=null!=g&&null!=g.originalSrc;H=!1;var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value",
"url");F.setAttribute("type","radio");F.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.width="360px";k.value=E||null==g?"":g.src;var l=document.createElement("select");l.style.width="360px";
-if(null!=b.pages)for(var n=0;n<b.pages.length;n++){var x=document.createElement("option");mxUtils.write(x,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1]));x.setAttribute("value","data:page/id,"+b.pages[n].getId());b.pages[n]==b.currentPage&&x.setAttribute("disabled","disabled");null!=g&&g.originalSrc==x.getAttribute("value")&&(x.setAttribute("selected","selected"),G=!0);l.appendChild(x)}E||null!=b.pages&&1!=b.pages.length||(F.style.display="none",d.style.display="none",l.style.display=
-"none");var z=document.createElement("option"),B=!1,I=!1,H=function(J,K){B||null!=J&&I||(d.checked?null!=K&&K(z.selected?null:l.value):""==k.value||b.isOffline()?(R.value="",U.value="",null!=K&&K("")):(k.value=mxUtils.trim(k.value),b.loadImage(k.value,function(m){R.value=m.width;U.value=m.height;null!=K&&K(k.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));R.value="";U.value="";null!=K&&K(null)})))},C=mxUtils.bind(this,function(J){b.importFiles(J,
-0,0,b.maxBackgroundSize,function(K,m,t,D,M,L){k.value=K;H();k.focus()},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var m=0;m<K.length;m++)K[m]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){E?l.focus():k.focus();mxEvent.addListener(l,"focus",function(){F.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");F.setAttribute("checked","checked");
+if(null!=b.pages)for(var n=0;n<b.pages.length;n++){var x=document.createElement("option");mxUtils.write(x,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1]));x.setAttribute("value","data:page/id,"+b.pages[n].getId());b.pages[n]==b.currentPage&&x.setAttribute("disabled","disabled");null!=g&&g.originalSrc==x.getAttribute("value")&&(x.setAttribute("selected","selected"),H=!0);l.appendChild(x)}E||null!=b.pages&&1!=b.pages.length||(F.style.display="none",d.style.display="none",l.style.display=
+"none");var A=document.createElement("option"),B=!1,I=!1,G=function(J,K){B||null!=J&&I||(d.checked?null!=K&&K(A.selected?null:l.value):""==k.value||b.isOffline()?(R.value="",T.value="",null!=K&&K("")):(k.value=mxUtils.trim(k.value),b.loadImage(k.value,function(m){R.value=m.width;T.value=m.height;null!=K&&K(k.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));R.value="";T.value="";null!=K&&K(null)})))},C=mxUtils.bind(this,function(J){b.importFiles(J,
+0,0,b.maxBackgroundSize,function(K,m,t,D,M,L){k.value=K;G();k.focus()},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var m=0;m<K.length;m++)K[m]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){E?l.focus():k.focus();mxEvent.addListener(l,"focus",function(){F.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");F.setAttribute("checked","checked");
F.checked=!0});if(Graph.fileSupport){k.setAttribute("placeholder",mxResources.get("dragImagesHere"));var J=y.parentNode,K=null;mxEvent.addListener(J,"dragleave",function(m){null!=K&&(K.parentNode.removeChild(K),K=null);m.stopPropagation();m.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(m){null==K&&(K=b.highlightElement(J));m.stopPropagation();m.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(m){null!=K&&(K.parentNode.removeChild(K),K=null);
-if(0<m.dataTransfer.files.length)C(m.dataTransfer.files);else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")){var t=m.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(t)&&(k.value=decodeURIComponent(t),H())}m.stopPropagation();m.preventDefault()}),!1)}};y.appendChild(F);y.appendChild(k);mxUtils.br(y);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,mxResources.get("width")+":");y.appendChild(n);var R=document.createElement("input");
-R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==g||E?"":g.width;y.appendChild(R);mxUtils.write(y,mxResources.get("height")+":");var U=document.createElement("input");U.setAttribute("type","text");U.style.width="60px";U.style.marginLeft="8px";U.style.marginRight="16px";U.value=null==g||E?"":g.height;y.appendChild(U);mxUtils.br(y);mxUtils.br(y);mxEvent.addListener(k,"change",H);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&
-null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(k.value=J.url,H()));k.focus()};y.appendChild(d);y.appendChild(l);mxUtils.br(y);mxUtils.br(y);E?(d.setAttribute("checked","checked"),d.checked=!0):(F.setAttribute("checked","checked"),F.checked=!0);!G&&d.checked&&(mxUtils.write(z,mxResources.get("pageNotFound")),z.setAttribute("disabled","disabled"),z.setAttribute("selected","selected"),z.setAttribute("value","pageNotFound"),l.appendChild(z),mxEvent.addListener(l,
-"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)}));g=document.createElement("div");g.style.display=p?"inline-flex":"none";g.style.alignItems="center";g.style.cursor="default";g.style.minWidth="40%";g.style.height="20px";var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px 10px 0px 4px";S.style.verticalAlign="bottom";S.defaultChecked=c!=mxConstants.NONE&&null!=c;S.checked=S.defaultChecked;g.appendChild(S);mxUtils.write(g,mxResources.get("fillColor"));
+if(0<m.dataTransfer.files.length)C(m.dataTransfer.files);else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")){var t=m.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(t)&&(k.value=decodeURIComponent(t),G())}m.stopPropagation();m.preventDefault()}),!1)}};y.appendChild(F);y.appendChild(k);mxUtils.br(y);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,mxResources.get("width")+":");y.appendChild(n);var R=document.createElement("input");
+R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==g||E?"":g.width;y.appendChild(R);mxUtils.write(y,mxResources.get("height")+":");var T=document.createElement("input");T.setAttribute("type","text");T.style.width="60px";T.style.marginLeft="8px";T.style.marginRight="16px";T.value=null==g||E?"":g.height;y.appendChild(T);mxUtils.br(y);mxUtils.br(y);mxEvent.addListener(k,"change",G);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&
+null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(k.value=J.url,G()));k.focus()};y.appendChild(d);y.appendChild(l);mxUtils.br(y);mxUtils.br(y);E?(d.setAttribute("checked","checked"),d.checked=!0):(F.setAttribute("checked","checked"),F.checked=!0);!H&&d.checked&&(mxUtils.write(A,mxResources.get("pageNotFound")),A.setAttribute("disabled","disabled"),A.setAttribute("selected","selected"),A.setAttribute("value","pageNotFound"),l.appendChild(A),mxEvent.addListener(l,
+"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)}));g=document.createElement("div");g.style.display=p?"inline-flex":"none";g.style.alignItems="center";g.style.cursor="default";g.style.minWidth="40%";g.style.height="20px";var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px 10px 0px 4px";S.style.verticalAlign="bottom";S.defaultChecked=c!=mxConstants.NONE&&null!=c;S.checked=S.defaultChecked;g.appendChild(S);mxUtils.write(g,mxResources.get("fillColor"));
p=g.cloneNode(!1);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.style.margin="0px 10px 0px 30px";Q.style.verticalAlign="bottom";Q.defaultChecked=u.shadowVisible;Q.checked=Q.defaultChecked;p.appendChild(Q);mxUtils.write(p,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||Q.setAttribute("disabled","disabled");mxEvent.addListener(p,"click",function(J){mxEvent.getSource(J)!=Q&&(Q.checked=!Q.checked)});var v=document.createElement("button");v.style.width="36px";v.style.height=
-"18px";v.style.cursor="pointer";v.style.marginLeft="10px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.verticalAlign="bottom";v.className="geColorBtn";var A=c;q();mxEvent.addListener(g,"click",function(J){mxEvent.getSource(J)!=S&&(S.checked=!S.checked);A=S.checked?"#ffffff":null;q()});mxEvent.addListener(v,"click",function(J){b.pickColor(A||"none",function(K){A=K;q()});mxEvent.consume(J)});g.appendChild(v);y.appendChild(g);y.appendChild(p);mxUtils.br(y);
-c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);p=mxUtils.button(mxResources.get("reset"),function(){k.value="";R.value="";U.value="";F.checked=!0;A=mxConstants.NONE;q();B=!1});mxEvent.addGestureListeners(p,function(){B=!0});p.className="geBtn";p.width="100";c.appendChild(p);if(Graph.fileSupport){var N=document.createElement("input");
-N.setAttribute("multiple","multiple");N.setAttribute("type","file");mxEvent.addListener(N,"change",function(J){null!=N.files&&(C(N.files),N.type="",N.type="file",N.value="")});N.style.display="none";y.appendChild(N);p=mxUtils.button(mxResources.get("open"),function(){N.click()});p.className="geBtn";c.appendChild(p)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();H(null,function(J){f(""!=J&&null!=J?new mxImage(J,R.value,U.value):null,null==J,A,!mxClient.IS_SVG||mxClient.IS_SF?
-null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(u);y.appendChild(c);this.container=y},ParseDialog=function(b,f,g){function c(l,n,x){var z=l.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var B=function(t,D,M,L,O){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,L,O));var P=
-null;I.getModel().beginUpdate();try{P="txt"==D?b.insertAsPreText(M,q.x,q.y):I.insertVertex(null,null,null,q.x,q.y,L,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(M)+";"),I.setAttributeForCell(P,"plantUmlData",JSON.stringify({data:t,format:D},null,2))}finally{I.getModel().endUpdate()}null!=P&&(I.setSelectionCell(P),I.scrollCellToVisible(P))},I=b.editor.graph,H="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-l&&"svg"==H?window.setTimeout(function(){b.spinner.stop();B(l,H,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(l,H,function(t,D,M){b.spinner.stop();B(l,H,t,D,M)},function(t){b.handleError(t)})}}else if("mermaid"==n||"mermaid2drawio"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<z.length&&(0==z[C].trim().length||"%%"==z[C].substring(0,2));)C++;if("---"==z[C].trim()){do C++;while(C<z.length&&"---"!=z[C].trim());C++}C=z[C].trim().toLowerCase();z=C.indexOf(" ");C=C.substring(0,0<z?z:C.length);var R="undefined"!==typeof mxMermaidToDrawio&&
+"18px";v.style.cursor="pointer";v.style.marginLeft="10px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.verticalAlign="bottom";v.className="geColorBtn";var z=c;q();mxEvent.addListener(g,"click",function(J){mxEvent.getSource(J)!=S&&(S.checked=!S.checked);z=S.checked?"#ffffff":null;q()});mxEvent.addListener(v,"click",function(J){b.pickColor(z||"none",function(K){z=K;q()});mxEvent.consume(J)});g.appendChild(v);y.appendChild(g);y.appendChild(p);mxUtils.br(y);
+c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);p=mxUtils.button(mxResources.get("reset"),function(){k.value="";R.value="";T.value="";F.checked=!0;z=mxConstants.NONE;q();B=!1});mxEvent.addGestureListeners(p,function(){B=!0});p.className="geBtn";p.width="100";c.appendChild(p);if(Graph.fileSupport){var N=document.createElement("input");
+N.setAttribute("multiple","multiple");N.setAttribute("type","file");mxEvent.addListener(N,"change",function(J){null!=N.files&&(C(N.files),N.type="",N.type="file",N.value="")});N.style.display="none";y.appendChild(N);p=mxUtils.button(mxResources.get("open"),function(){N.click()});p.className="geBtn";c.appendChild(p)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();G(null,function(J){f(""!=J&&null!=J?new mxImage(J,R.value,T.value):null,null==J,z,!mxClient.IS_SVG||mxClient.IS_SF?
+null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(u);y.appendChild(c);this.container=y},ParseDialog=function(b,f,g){function c(l,n,x){var A=l.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var B=function(t,D,M,L,O){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,L,O));var P=
+null;I.getModel().beginUpdate();try{P="txt"==D?b.insertAsPreText(M,q.x,q.y):I.insertVertex(null,null,null,q.x,q.y,L,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(M)+";"),I.setAttributeForCell(P,"plantUmlData",JSON.stringify({data:t,format:D},null,2))}finally{I.getModel().endUpdate()}null!=P&&(I.setSelectionCell(P),I.scrollCellToVisible(P))},I=b.editor.graph,G="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+l&&"svg"==G?window.setTimeout(function(){b.spinner.stop();B(l,G,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(l,G,function(t,D,M){b.spinner.stop();B(l,G,t,D,M)},function(t){b.handleError(t)})}}else if("mermaid"==n||"mermaid2drawio"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<A.length&&(0==A[C].trim().length||"%%"==A[C].substring(0,2));)C++;if("---"==A[C].trim()){do C++;while(C<A.length&&"---"!=A[C].trim());C++}C=A[C].trim().toLowerCase();A=C.indexOf(" ");C=C.substring(0,0<A?A:C.length);var R="undefined"!==typeof mxMermaidToDrawio&&
"mermaid2drawio"==n&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);I=b.editor.graph;R&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(t){b.spinner.stop();I.setSelectionCells(b.importXml(t,Math.max(q.x,20),Math.max(q.y,20),!0,null,null,!0));I.scrollCellToVisible(I.getSelectionCell())}));b.generateMermaidImage(l,null,function(t,D,M){if(!R){q=
mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,D,M));b.spinner.stop();var L=null;I.getModel().beginUpdate();try{L=I.insertVertex(null,null,null,q.x,q.y,D,M,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+t+";"),I.setAttributeForCell(L,"mermaidData",JSON.stringify({data:l},null,2))}finally{I.getModel().endUpdate()}null!=L&&(I.setSelectionCell(L),I.scrollCellToVisible(L))}},function(t){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(t)})}}else if("table"==
-n){n=null;var U=[],S=0,Q={};for(C=0;C<z.length;C++){var v=mxUtils.trim(z[C]);if("primary key"==v.substring(0,11).toLowerCase()){var A=v.match(/\((.+)\)/);A&&A[1]&&(Q[A[1]]=!0);z.splice(C,1)}else 0<v.toLowerCase().indexOf("primary key")&&(Q[v.split(" ")[0]]=!0,z[C]=mxUtils.trim(v.replace(/primary key/i,"")))}for(C=0;C<z.length;C++)if(v=mxUtils.trim(z[C]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-
-1))),n=new mxCell(v,new mxGeometry(S,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,U.push(n),v=b.editor.graph.getPreferredSizeForCell(N),null!=v&&(n.geometry.width=v.width+10);else if(null!=n&&")"==v.charAt(0))S+=n.geometry.width+40,n=null;else if("("!=v&&null!=n){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);A=Q[v.split(" ")[0]];var N=new mxCell("",new mxGeometry(0,
-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(A?"1":"0")+";");N.vertex=!0;var J=new mxCell(A?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(A?"fontStyle=1;":""));J.vertex=!0;N.insert(J);v=new mxCell(v,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(A?"fontStyle=5;":""));v.vertex=!0;N.insert(v);v=b.editor.graph.getPreferredSizeForCell(v);null!=v&&n.geometry.width<v.width+30&&(n.geometry.width=Math.min(320,Math.max(n.geometry.width,v.width+30)));n.insert(N,A?0:null);n.geometry.height+=30}0<U.length&&(I=b.editor.graph,q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(U,
-!0)),I.setSelectionCells(I.importCells(U,q.x,q.y)),I.scrollCellToVisible(I.getSelectionCell()))}else if("list"==n){if(0<z.length){I=b.editor.graph;n=null;U=[];for(C=N=0;C<z.length;C++)";"!=z[C].charAt(0)&&(0==z[C].length?n=null:null==n?(n=new mxCell(z[C],new mxGeometry(N,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),n.vertex=!0,U.push(n),v=I.getPreferredSizeForCell(n),
-null!=v&&n.geometry.width<v.width+10&&(n.geometry.width=v.width+10),N+=n.geometry.width+40):"--"==z[C]?(v=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),v.vertex=!0,n.geometry.height+=v.geometry.height,n.insert(v)):0<z[C].length&&(S=new mxCell(z[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-S.vertex=!0,v=I.getPreferredSizeForCell(S),null!=v&&S.geometry.width<v.width&&(S.geometry.width=v.width),n.geometry.width=Math.max(n.geometry.width,S.geometry.width),n.geometry.height+=S.geometry.height,n.insert(S)));if(0<U.length){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(U,!0));I.getModel().beginUpdate();try{U=I.importCells(U,q.x,q.y);v=[];for(C=0;C<U.length;C++)v.push(U[C]),v=v.concat(U[C].children);I.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{I.getModel().endUpdate()}I.setSelectionCells(U);
-I.scrollCellToVisible(I.getSelectionCell())}}}else{N=function(t){var D=K[t];null==D&&(D=new mxCell(t,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),D.vertex=!0,K[t]=D,U.push(D));return D};var K={};U=[];for(C=0;C<z.length;C++)if(";"!=z[C].charAt(0)){var m=z[C].split("->");2<=m.length&&(A=N(m[0]),J=N(m[m.length-1]),m=new mxCell(2<m.length?m[1]:"",new mxGeometry),m.edge=!0,m.geometry.relative=!0,A.insertEdge(m,!0),J.insertEdge(m,!1),U.push(m))}if(0<U.length){z=document.createElement("div");z.style.visibility=
-"hidden";document.body.appendChild(z);I=new Graph(z);I.getModel().beginUpdate();try{U=I.importCells(U);for(C=0;C<U.length;C++)I.getModel().isVertex(U[C])&&(v=I.getPreferredSizeForCell(U[C]),U[C].geometry.width=Math.max(U[C].geometry.width,v.width),U[C].geometry.height=Math.max(U[C].geometry.height,v.height));C=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(I,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(I.getDefaultParent(),U),C=!1):"circle"==
-n?(new mxCircleLayout(I)).execute(I.getDefaultParent()):(S=new mxFastOrganicLayout(I),S.disableEdgeStyle=!1,S.forceConstant=180,S.execute(I.getDefaultParent()));C&&(Q=new mxParallelEdgeLayout(I),Q.spacing=30,Q.execute(I.getDefaultParent()))}finally{I.getModel().endUpdate()}I.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{U=I.getModel().getChildren(I.getDefaultParent()),q=mxEvent.isAltDown(x)?q:b.editor.graph.getCenterInsertPoint(I.getBoundingBoxFromGeometry(U,!0)),v=b.editor.graph.importCells(U,
-q.x,q.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());I.destroy();z.parentNode.removeChild(z)}}}function p(){return"list"==y.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==y.value||
+n){n=null;var T=[],S=0,Q={};for(C=0;C<A.length;C++){var v=mxUtils.trim(A[C]);if("primary key"==v.substring(0,11).toLowerCase()){var z=v.match(/\((.+)\)/);z&&z[1]&&(Q[z[1]]=!0);A.splice(C,1)}else 0<v.toLowerCase().indexOf("primary key")&&(Q[v.split(" ")[0]]=!0,A[C]=mxUtils.trim(v.replace(/primary key/i,"")))}for(C=0;C<A.length;C++)if(v=mxUtils.trim(A[C]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-
+1))),n=new mxCell(v,new mxGeometry(S,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,T.push(n),v=b.editor.graph.getPreferredSizeForCell(N),null!=v&&(n.geometry.width=v.width+10);else if(null!=n&&")"==v.charAt(0))S+=n.geometry.width+40,n=null;else if("("!=v&&null!=n){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);z=Q[v.split(" ")[0]];var N=new mxCell("",new mxGeometry(0,
+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(z?"1":"0")+";");N.vertex=!0;var J=new mxCell(z?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(z?"fontStyle=1;":""));J.vertex=!0;N.insert(J);v=new mxCell(v,new mxGeometry(30,
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(z?"fontStyle=5;":""));v.vertex=!0;N.insert(v);v=b.editor.graph.getPreferredSizeForCell(v);null!=v&&n.geometry.width<v.width+30&&(n.geometry.width=Math.min(320,Math.max(n.geometry.width,v.width+30)));n.insert(N,z?0:null);n.geometry.height+=30}0<T.length&&(I=b.editor.graph,q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(T,
+!0)),I.setSelectionCells(I.importCells(T,q.x,q.y)),I.scrollCellToVisible(I.getSelectionCell()))}else if("list"==n){if(0<A.length){I=b.editor.graph;n=null;T=[];for(C=N=0;C<A.length;C++)";"!=A[C].charAt(0)&&(0==A[C].length?n=null:null==n?(n=new mxCell(A[C],new mxGeometry(N,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),n.vertex=!0,T.push(n),v=I.getPreferredSizeForCell(n),
+null!=v&&n.geometry.width<v.width+10&&(n.geometry.width=v.width+10),N+=n.geometry.width+40):"--"==A[C]?(v=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),v.vertex=!0,n.geometry.height+=v.geometry.height,n.insert(v)):0<A[C].length&&(S=new mxCell(A[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+S.vertex=!0,v=I.getPreferredSizeForCell(S),null!=v&&S.geometry.width<v.width&&(S.geometry.width=v.width),n.geometry.width=Math.max(n.geometry.width,S.geometry.width),n.geometry.height+=S.geometry.height,n.insert(S)));if(0<T.length){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(T,!0));I.getModel().beginUpdate();try{T=I.importCells(T,q.x,q.y);v=[];for(C=0;C<T.length;C++)v.push(T[C]),v=v.concat(T[C].children);I.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{I.getModel().endUpdate()}I.setSelectionCells(T);
+I.scrollCellToVisible(I.getSelectionCell())}}}else{N=function(t){var D=K[t];null==D&&(D=new mxCell(t,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),D.vertex=!0,K[t]=D,T.push(D));return D};var K={};T=[];for(C=0;C<A.length;C++)if(";"!=A[C].charAt(0)){var m=A[C].split("->");2<=m.length&&(z=N(m[0]),J=N(m[m.length-1]),m=new mxCell(2<m.length?m[1]:"",new mxGeometry),m.edge=!0,m.geometry.relative=!0,z.insertEdge(m,!0),J.insertEdge(m,!1),T.push(m))}if(0<T.length){A=document.createElement("div");A.style.visibility=
+"hidden";document.body.appendChild(A);I=new Graph(A);I.getModel().beginUpdate();try{T=I.importCells(T);for(C=0;C<T.length;C++)I.getModel().isVertex(T[C])&&(v=I.getPreferredSizeForCell(T[C]),T[C].geometry.width=Math.max(T[C].geometry.width,v.width),T[C].geometry.height=Math.max(T[C].geometry.height,v.height));C=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(I,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(I.getDefaultParent(),T),C=!1):"circle"==
+n?(new mxCircleLayout(I)).execute(I.getDefaultParent()):(S=new mxFastOrganicLayout(I),S.disableEdgeStyle=!1,S.forceConstant=180,S.execute(I.getDefaultParent()));C&&(Q=new mxParallelEdgeLayout(I),Q.spacing=30,Q.execute(I.getDefaultParent()))}finally{I.getModel().endUpdate()}I.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{T=I.getModel().getChildren(I.getDefaultParent()),q=mxEvent.isAltDown(x)?q:b.editor.graph.getCenterInsertPoint(I.getBoundingBoxFromGeometry(T,!0)),v=b.editor.graph.importCells(T,
+q.x,q.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());I.destroy();A.parentNode.removeChild(A)}}}function p(){return"list"==y.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==y.value||
"mermaid2drawio"==y.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==y.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==y.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==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 q=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");var u=document.createElement("textarea");u.style.position="absolute";u.style.left="30px";u.style.right="30px";u.style.top=
-"30px";u.style.bottom="100px";u.style.resize="none";u.setAttribute("wrap","off");u.setAttribute("spellcheck","false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");var y=document.createElement("select");y.className="geBtn";if("formatSql"==g||"mermaid"==g&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())y.style.display="none";var G=document.createElement("option");G.setAttribute("value","list");mxUtils.write(G,mxResources.get("list"));
-"plantUml"!=g&&"mermaid"!=g&&y.appendChild(G);null!=g&&"fromText"!=g||G.setAttribute("selected","selected");G=document.createElement("option");G.setAttribute("value","table");mxUtils.write(G,mxResources.get("formatSql"));"formatSql"==g&&(y.appendChild(G),G.setAttribute("selected","selected"));G=document.createElement("option");G.setAttribute("value","mermaid");mxUtils.write(G,mxResources.get("image"));if("mermaid"==g){if("undefined"!==typeof mxMermaidToDrawio){var E=document.createElement("option");
-E.setAttribute("value","mermaid2drawio");E.setAttribute("selected","selected");mxUtils.write(E,mxResources.get("diagram"));y.appendChild(E)}else y.style.display="none";y.appendChild(G)}G=document.createElement("option");G.setAttribute("value","diagram");mxUtils.write(G,mxResources.get("diagram"));E=document.createElement("option");E.setAttribute("value","circle");mxUtils.write(E,mxResources.get("circle"));var F=document.createElement("option");F.setAttribute("value","horizontalFlow");mxUtils.write(F,
-mxResources.get("horizontalFlow"));var d=document.createElement("option");d.setAttribute("value","verticalFlow");mxUtils.write(d,mxResources.get("verticalFlow"));"plantUml"!=g&&"mermaid"!=g&&(y.appendChild(G),y.appendChild(E),y.appendChild(F),y.appendChild(d));G=document.createElement("option");G.setAttribute("value","plantUmlSvg");mxUtils.write(G,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==g&&G.setAttribute("selected","selected");E=document.createElement("option");
-E.setAttribute("value","plantUmlPng");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value","plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==g&&(y.appendChild(G),y.appendChild(E),y.appendChild(F));var k=p();u.value=k;f.appendChild(u);G=document.createElement("div");G.style.position="absolute";G.style.bottom=
-"46px";G.style.right="30px";G.style.left="30px";G.style.justifyContent="end";G.style.display="flex";this.init=function(){u.focus()};Graph.fileSupport&&(u.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),u.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=l.dataTransfer.files[0];var n=new FileReader;n.onload=function(x){u.value=x.target.result};n.readAsText(l)}},!1));"plantUml"==g&&"https://plant-aws.diagrams.net"==
-window.PLANT_URL&&(E=document.createElement("div"),E.style.display="inline-block",E.style.color="#c00",E.style.fontSize="12px",E.style.marginRight="10px",E.style.display="flex",E.style.alignItems="center",E.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',G.appendChild(E));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=g&&"plantUml"!=g||G.appendChild(b.createHelpIcon("mermaid"==
-g?"https://mermaid.js.org/intro/":"https://plantuml.com/"));G.appendChild(y);mxEvent.addListener(y,"change",function(){var l=p();if(0==u.value.length||u.value==k)k=l,u.value=k});g=mxUtils.button(mxResources.get("close"),function(){u.value==k?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&G.appendChild(g);E=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),c(u.value,y.value,l)}catch(n){b.handleError(n)}});
-E.className="geBtn gePrimaryBtn";G.appendChild(E);b.editor.cancelFirst||G.appendChild(g);f.appendChild(G);this.container=f},NewDialog=function(b,f,g,c,p,q,u,y,G,E,F,d,k,l,n,x,z,B,I,H){function C(la){null!=la&&(Aa=Ca=la?135:140);la=!0;if(null!=Xa)for(;M<Xa.length&&(la||0!=mxUtils.mod(M,30));){var xa=Xa[M++];xa=J(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs,xa.type);la&&xa.click();la=!1}}function R(la,xa,sa,pa,ta,ya){if(null!=
-la&&mxUtils.isAncestorNode(document.body,pa)){la=mxUtils.parseXml(la);la=Editor.parseDiagramNode(la.documentElement,null,!0);var Ga=new mxCodec(la.ownerDocument),Ja=new mxGraphModel;Ga.decode(la,Ja);b.sidebar.createTooltip(pa,Ja.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ta?mxResources.get(ta):null,!0,new mxPoint(xa,
-sa),!0,function(){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&Q(pa,null,null,ya,infoObj,clibs)},!0,!1)}}function U(){var la=document.createElement("div");la.style.position="absolute";la.style.overflow="visible";la.style.left="8px";la.style.right="8px";la.style.bottom="8px";la.style.top="8px";mxUtils.write(la,mxResources.get("describeYourDiagram")+":");mxUtils.br(la);var xa=document.createElement("input");xa.setAttribute("type","text");xa.setAttribute("placeholder",
-mxResources.get("processForHiringNewEmployee"));xa.style.width="100%";xa.style.marginTop="6px";xa.style.marginBottom="4px";xa.style.boxSizing="border-box";la.appendChild(xa);la.init=function(){xa.focus()};mxUtils.br(la);var sa=document.createElement("div");sa.style.top="86px";sa.style.left="0";sa.style.right="0";sa.style.bottom="0";sa.style.margin="0";sa.style.borderRadius="0";sa.style.width="auto";sa.style.height="auto";sa.style.position="absolute";sa.style.border="1px solid #424242";sa.className=
-"geTemplate";var pa=document.createElement("div");pa.style.boxSizing="border-box";pa.style.position="absolute";pa.style.fontSize="14px";pa.style.textAlign="center";pa.style.top="50%";mxUtils.write(pa,mxResources.get("blankDiagram"));sa.appendChild(pa);var ta=document.createElement("select");ta.className="geBtn";ta.style.maxWidth="160px";ta.style.marginLeft="0px";pa=document.createElement("option");mxUtils.write(pa,mxResources.get("diagramType"));pa.setAttribute("value","");ta.appendChild(pa);for(var ya=
-0;ya<EditorUi.mermaidDiagramTypes.length;ya++){pa=document.createElement("option");var Ga=EditorUi.mermaidDiagramTypes[ya],Ja=Ga;Ga==urlParams["smart-template-type"]&&pa.setAttribute("selected","selected");"erDiagram"==Ja&&(Ja="entityRelationshipDiagram");Ja=mxResources.get(Ja,null,Ja.charAt(0).toUpperCase()+Ja.substring(1).replace(/[A-Z]/g," $&"));pa.setAttribute("value",Ga);mxUtils.write(pa,Ja);ta.appendChild(pa)}var Na=mxUtils.button(mxResources.get("generate"),function(){var Ua=xa.value,Ra=ta.value.replace(/([A-Z])/g,
-" $1").toLowerCase(),ab="Write the declaration code for a detailed and complex "+(""!=Ra?Ra:"graph")+' that shows "'+(""!=Ua?Ua:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ra=""!=ta.value?" ("+mxUtils.trim(mxUtils.getTextContent(ta.options[ta.selectedIndex]))+")":"";var Oa="gantt"==ta.value||"pie"==ta.value||"timeline"==ta.value||"quadrantchart"==ta.value||"c4context"==ta.value,Va=xa.value+Ra;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
-function(Fa){Oa||(ra=ba=Fa,wa="Smart Template: "+Va)}));b.spinner.spin(sa,mxResources.get("generate")+" '"+Ua+"'")&&b.generateOpenAiMermaidDiagram(ab,function(Fa,bb,Za,ib){b.spinner.stop();sa.innerHTML="";var cb=document.createElement("img");cb.setAttribute("title",mxResources.get("preview"));cb.src="data:image/svg+xml;base64,"+bb.substring(bb.indexOf(",")+1);cb.style.cursor="pointer";cb.style.width="95%";cb.style.height="95%";sa.appendChild(cb);Fa=b.createMermaidXml(Fa,EditorUi.defaultMermaidConfig,
-bb,Za,ib,Va);var kb="<mxfile><diagram>"+Graph.compress(Fa)+"</diagram></mxfile>";if(Oa||"undefined"===typeof mxMermaidToDrawio)ra=ba=Fa;Fa=P.cloneNode(!0);sa.appendChild(Fa);bb=function(Pa){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Za=function(Pa){X||R(kb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),cb,Va)};mxEvent.addGestureListeners(cb,bb,null,Za);mxEvent.addGestureListeners(Fa,bb,null,Za)},function(Fa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();
-b.handleError(Fa)})});Na.setAttribute("disabled","disabled");Na.className="geBtn gePrimaryBtn";pa=function(){window.setTimeout(function(){""!=xa.value?Na.removeAttribute("disabled"):Na.setAttribute("disabled","disabled")},0)};ya=null!=I?I:urlParams["smart-template"];null!=ya&&"1"!=ya&&(xa.value=decodeURIComponent(ya),pa(),""==ya||null==I&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Na.click()},0));mxEvent.addListener(xa,"change",pa);mxEvent.addListener(xa,"keydown",pa);
-mxEvent.addListener(xa,"cut",pa);mxEvent.addListener(xa,"paste",pa);mxEvent.addListener(xa,"keydown",function(Ua){13==Ua.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(ta);pa.appendChild(Na);la.appendChild(pa);la.appendChild(sa);return la}function S(){if(ma&&null!=l)g||b.hideDialog(),l(ma,va,D.value);else if(c)g||b.hideDialog(),
-c(ba,D.value,da,ia);else{var la=D.value;if(null!=la&&0<la.length){var xa=function(pa,ta,ya){b.createFile(ya,ba,null!=ia&&0<ia.length?ia:null,pa,function(){b.hideDialog()},null,ta,null,null!=ka&&0<ka.length?ka:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var sa=new SaveDialog(b,la,mxUtils.bind(this,function(pa,ta,ya){xa(ta,ya,pa.value)}),null,null,null,null,b.mode);b.showDialog(sa.container,420,150,!0,!1);sa.init()}else b.pickFolder(b.mode,function(pa){xa(b.mode,pa,la)},b.mode!=App.MODE_GOOGLE||
-null==b.stateArg||null==b.stateArg.folderId)}}}function Q(la,xa,sa,pa,ta,ya,Ga){return ha!=la?(null!=ha&&(ha.classList.remove("geTemplateSelected"),ha==Da&&(Ba.style.display="none",Ka.style.display="",La.style.visibility="hidden",Ia.style.visibility=null!=ra?"visible":"hidden")),la==Da&&(xa=ra,null!=xa?(Ia.style.visibility="visible",Ia.style.visibility=null!=ra?"visible":"hidden",La.style.visibility="visible"):(Ba.style.display="",La.style.visibility="hidden",Ia.style.visibility="hidden")),O.removeAttribute("disabled"),
-ba=xa,ia=sa,ka=ya,ha=la,ma=pa,da=Ga,va=ta,ha.classList.add("geTemplateSelected"),!0):!1}function v(){Ba.style.display="";Ka.style.display="none";La.style.visibility="hidden";Ia.style.visibility="hidden";Ma.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Ma.select():document.execCommand("selectAll",!1,null)}function A(){Ka.style.backgroundImage=za;Ka.style.backgroundSize="contain";Ba.style.display="none";Ka.style.display="";La.style.visibility="visible";Ia.style.visibility="visible"}
-function N(la){var xa=mxUtils.trim(Ma.value);la||""==xa?null!=wa&&(Ma.value=wa,A()):(Ka.style.backgroundImage="url("+Editor.spinImage+")",Ka.style.backgroundSize="12px 12px",Ka.style.display="",Ba.style.display="none",b.generateDiagram(xa,mxUtils.bind(this,function(sa,pa){ha==Da&&"none"==Ba.style.display&&(za="url(data:image/svg+xml;base64,"+pa.substring(pa.indexOf(",")+1)+")",Da.setAttribute("title",xa),Ia.style.display="",ra=ba=sa,wa=xa,A())}),mxUtils.bind(this,function(sa){ha==Da&&(Ba.style.display=
-"",Ka.style.display="none",La.style.visibility="hidden",Ia.style.visibility="hidden",b.handleError(sa))})))}function J(la,xa,sa,pa,ta,ya,Ga,Ja,Na,Ua,Ra,ab){function Oa(Pa,gb){null==bb?(Za=Pa,Za=/^https?:\/\//.test(Za)?b.editor.isCorsEnabledForUrl(Za)?Za:PROXY_URL+"?url="+encodeURIComponent(Za):TEMPLATE_PATH+"/"+Za,mxUtils.get(Za,mxUtils.bind(this,function(hb){200<=hb.getStatus()&&299>=hb.getStatus()&&(bb=hb.getText());gb(bb,Za)}))):gb(bb,Za)}function Va(Pa,gb){if(null==la||T||b.sidebar.currentElt==
-Fa)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=V){var hb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+V.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+V.naturalWidth+'" height="'+V.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";R(hb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),sa,la)}else b.sidebar.currentElt=Fa,T=!0,
-Oa(la,function(lb){if(T&&b.sidebar.currentElt==Fa)try{R(lb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),Fa,gb)}catch(mb){b.sidebar.currentElt=null,b.handleError(mb)}T=!1})}var Fa=null;if("generative"!=ab||null==Da){Fa=document.createElement("div");Fa.className="geTemplate";var bb=null,Za=la;null!=sa?Fa.setAttribute("title",mxResources.get(sa,null,sa)):null!=pa&&0<pa.length&&Fa.setAttribute("title",pa)}else Fa=Da;var ib=document.createElement("span");ib.className="geAdaptiveAsset";mxUtils.write(ib,
-mxResources.get(sa,null,sa));if(null!=ya){Fa.style.display="inline-flex";Fa.style.justifyContent="center";Fa.style.alignItems="center";Na=document.createElement("img");Na.setAttribute("src",ya);Na.setAttribute("alt",pa);Na.style.maxWidth=Aa+"px";Na.style.maxHeight=Ca+"px";V=Na;var cb=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Fa.appendChild(Na);Na.onerror=function(){this.src!=cb?this.src=cb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Fa,mxUtils.bind(this,
-function(Pa){Q(Fa,null,null,la,Ga,Ra)}),null,null);mxEvent.addListener(Fa,"dblclick",function(Pa){S();mxEvent.consume(Pa)})}else if(!Ua&&null!=la&&0<la.length){var kb=function(Pa){L.spin(oa)&&Oa(la,function(gb,hb){L.stop();null!=gb&&(Q(Fa,gb,xa,null,null,Ra,hb),Pa&&S())})};ya=Na||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Na=Ka.cloneNode(!1);Na.style.backgroundImage="url("+ya+")";Na.style.display="";Fa.appendChild(Na);null!=sa&&Fa.appendChild(ib);mxEvent.addGestureListeners(Fa,mxUtils.bind(this,
-function(Pa){kb()}),null,null);mxEvent.addListener(Fa,"dblclick",function(Pa){kb(!0);mxEvent.consume(Pa)})}else Fa.appendChild(ib),"generative"==ab&&null==Da&&(Fa.appendChild(Ka),Fa.appendChild(Ba),Fa.appendChild(Ia),Fa.appendChild(La),Da=Fa),ta&&Q(Fa),null!=Ja?(mxEvent.addGestureListeners(Fa,null,null,mxUtils.bind(this,function(Pa){Q(Fa,null,null,la,Ga)})),mxEvent.addListener(Fa,"click",Ja)):(mxEvent.addListener(Fa,"click",function(Pa){Q(Fa,null,null,la,Ga)&&"generative"==ab&&null==ra&&v()}),mxEvent.addListener(Fa,
-"dblclick",function(Pa){"generative"!=ab?S():"none"==Ba.style.display&&v();mxEvent.consume(Pa)}));null!=la&&(ya=P.cloneNode(!0),Fa.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Pa){X=b.sidebar.currentElt==Fa}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Pa){X||Va(Pa,null!=sa?sa:pa);mxEvent.consume(Pa)})));oa.appendChild(Fa);return Fa}function K(){function la(Oa,Va){Oa=mxResources.get(Oa,null,Oa.substring(0,1).toUpperCase()+Oa.substring(1));18<Oa.length&&
-(Oa=Oa.substring(0,18)+"&hellip;");return Oa+(null!=Va?" ("+Va.length+")":"")}function xa(Oa,Va,Fa){mxEvent.addListener(Va,"click",function(){Ya!=Va&&(null!=Ya&&(Ya.style.backgroundColor=""),Ya=Va,Ya.style.backgroundColor=u,oa.scrollTop=0,oa.innerText="",M=0,null!=Ha[Oa].content?(oa.appendChild(Ha[Oa].content),ba=ra,Xa=null,null!=Ha[Oa].content.init&&Ha[Oa].content.init()):(Xa=Fa?Sa[Oa][Fa]:Ha[Oa],Y=null,C(!1)))});"smartTemplate"!=Oa||null==I&&null==urlParams["smart-template"]||Va.click()}fb&&(fb=
-!1,mxEvent.addListener(oa,"scroll",function(Oa){oa.scrollTop+oa.clientHeight>=oa.scrollHeight&&(C(),mxEvent.consume(Oa))}));if(0<db){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));qa.appendChild(sa);for(var pa in $a){var ta=document.createElement("div");sa=pa;var ya=$a[pa];18<sa.length&&(sa=sa.substring(0,18)+"&hellip;");ta.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-ta.setAttribute("title",sa+" ("+ya.length+")");mxUtils.write(ta,ta.getAttribute("title"));null!=E&&(ta.style.padding=E);qa.appendChild(ta);(function(Oa,Va){mxEvent.addListener(ta,"click",function(){Ya!=Va&&(Ya.style.backgroundColor="",Ya=Va,Ya.style.backgroundColor=u,oa.scrollTop=0,oa.innerText="",M=0,Xa=$a[Oa],Y=null,C(!1))})})(pa,ta)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");qa.appendChild(sa)}for(pa in Ha){sa=
-ya=null;if(null!=Ha[pa].content)ta=document.createElement(Ga?"ul":"div"),sa=la(pa),ta.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ta.setAttribute("title",sa),mxUtils.write(ta,sa),qa.appendChild(ta),sa=ta;else{var Ga=Sa[pa];sa=ta=document.createElement(Ga?"ul":"div");ya=Ha[pa];var Ja=la(pa,ya);if(null!=Ga){ya=document.createElement("li");var Na=document.createElement("div");
-Na.className="geTempTreeCaret";Na.setAttribute("title",Ja);mxUtils.write(Na,Ja);sa=Na;ya.appendChild(Na);Ja=document.createElement("ul");Ja.className="geTempTreeNested";Ja.style.visibility="hidden";for(var Ua in Ga){var Ra=document.createElement("li"),ab=la(Ua,Ga[Ua]);Ra.setAttribute("title",ab);mxUtils.write(Ra,ab);xa(pa,Ra,Ua);Ja.appendChild(Ra)}ya.appendChild(Ja);ta.className="geTempTree";ta.appendChild(ya);(function(Oa,Va){mxEvent.addListener(Va,"click",function(){Oa.style.visibility="visible";
-Oa.classList.toggle("geTempTreeActive");Oa.classList.toggle("geTempTreeNested")&&setTimeout(function(){Oa.style.visibility="hidden"},550);Va.classList.toggle("geTempTreeCaret-down")})})(Ja,Na)}else ta.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ta.setAttribute("title",Ja),mxUtils.write(ta,Ja);null!=E&&(ta.style.padding=E);qa.appendChild(ta)}xa(pa,sa);null==Ya&&sa.click()}C(!1)}
-y=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);g=null!=g?g:!0;p=null!=p?p:!1;u=null!=u?u:"light-dark(#ebf2f9, "+Editor.darkColor+")";F=null!=F?F:EditorUi.templateFile;var m=document.createElement("div");m.style.userSelect="none";m.style.height="100%";G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.height="46px";g&&m.appendChild(G);var t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width=
-"40px";t.style.height="40px";t.style.marginRight="10px";t.style.paddingBottom="4px";t.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";
-f||y||!g||G.appendChild(t);g&&mxUtils.write(G,(y?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");t=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?t=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?t=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?t=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?t=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?
-t=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(t=b.trello.extension);var D=document.createElement("input");D.setAttribute("value",b.defaultFilename+t);D.style.marginLeft="10px";D.style.width=f||y?"144px":"244px";this.init=function(){g&&Editor.selectFilename(D);null!=oa.parentNode&&null!=oa.parentNode.parentNode&&mxEvent.addGestureListeners(oa.parentNode.parentNode,mxUtils.bind(this,function(la){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};g&&(G.appendChild(D),B?D.style.width=
-f||y?"350px":"450px":null!=b.editor.diagramFileTypes&&(B=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),B.style.marginLeft="6px",B.style.width=f||y?"80px":"180px",G.appendChild(B)));B=!1;var M=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),O=mxUtils.button(x||mxResources.get("create"),function(){O.setAttribute("disabled","disabled");S();O.removeAttribute("disabled")});
-O.className="geBtn gePrimaryBtn";var P=document.createElement("img");P.setAttribute("src",Editor.magnifyImage);P.setAttribute("title",mxResources.get("preview"));P.className="geButton geRoundButton";var T=!1,V=null,X=!1;if(d||k){var W=[],Y=null,Z=null,aa=null,fa=function(la){O.setAttribute("disabled","disabled");for(var xa=0;xa<W.length;xa++)W[xa].className=xa==la?"geBtn gePrimaryBtn":"geBtn"};B=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";m.appendChild(x);
-y=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){qa.style.display="";ja.style.display="";oa.style.left="160px";fa(0);oa.scrollTop=0;oa.innerText="";M=0;Y!=Xa&&(Xa=Y,Ha=Z,db=aa,qa.innerText="",K(),Y=null)});W.push(y);x.appendChild(y);var ea=function(la){qa.style.display="none";ja.style.display="none";oa.style.left="30px";fa(la?-1:1);null==Y&&(Y=Xa);oa.scrollTop=0;oa.innerText="";L.spin(oa);var xa=function(sa,pa,ta){M=0;L.stop();Xa=sa;ta=ta||{};var ya=0,Ga;for(Ga in ta)ya+=
-ta[Ga].length;if(pa)oa.innerText=pa;else if(0==sa.length&&0==ya)oa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(oa.innerText="",0<ya){qa.style.display="";oa.style.left="160px";qa.innerText="";db=0;Ha={"draw.io":sa};for(Ga in ta)Ha[Ga]=ta[Ga];K()}else C(!0)};la?k(ca.value,xa):d(xa)};d&&(y=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ea()}),x.appendChild(y),W.push(y));if(k){y=document.createElement("span");y.style.marginLeft="10px";y.innerText=mxResources.get("search")+
-":";x.appendChild(y);var ca=document.createElement("input");ca.style.marginRight="10px";ca.style.marginLeft="10px";ca.style.width="220px";mxEvent.addListener(ca,"keypress",function(la){13==la.keyCode&&ea(!0)});x.appendChild(ca);y=mxUtils.button(mxResources.get("search"),function(){ea(!0)});y.className="geBtn";x.appendChild(y)}fa(0)}var ia=null,ka=null,ba=null,ha=null,ma=null,da=null,va=null,ra=null,wa=null,oa=document.createElement("div");oa.style.border="1px solid #d3d3d3";oa.style.position="absolute";
-oa.style.left="160px";oa.style.right="34px";x=(g?72:40)+(B?30:0);oa.style.top=x+"px";oa.style.bottom="68px";oa.style.margin="6px 0 0 -1px";oa.style.padding="6px";oa.style.overflow="auto";var ja=document.createElement("div");ja.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap;";var na=document.createElement("input");na.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";
-na.setAttribute("placeholder",mxResources.get("search"));na.setAttribute("type","text");ja.appendChild(na);var ua=document.createElement("img");ua.setAttribute("src",Editor.magnifyImage);ua.setAttribute("title",mxResources.get("search"));ua.className="geAdaptiveAsset";ua.style.position="relative";ua.style.cursor="pointer";ua.style.outline="none";ua.style.opacity="0.5";ua.style.height="16px";ua.style.left="-20px";ua.style.top="4px";ja.appendChild(ua);mxEvent.addListener(ua,"click",function(){ua.getAttribute("src")!=
-Editor.magnifyImage&&(ua.setAttribute("src",Editor.magnifyImage),ua.setAttribute("title",mxResources.get("search")),na.value="",null!=eb&&(eb.click(),eb=null));na.focus()});mxEvent.addListener(na,"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var xa=na.value;if(""==xa)null!=eb&&(eb.click(),eb=null);else{if(null==NewDialog.tagsList[F]){var sa={};for(Ra in Ha)if(null==Ha[Ra].content)for(var pa=Ha[Ra],ta=0;ta<pa.length;ta++){var ya=pa[ta];if(null!=ya.tags)for(var Ga=ya.tags.toLowerCase().split(";"),
-Ja=0;Ja<Ga.length;Ja++)null==sa[Ga[Ja]]&&(sa[Ga[Ja]]=[]),sa[Ga[Ja]].push(ya)}NewDialog.tagsList[F]=sa}var Na=xa.toLowerCase().split(" ");sa=NewDialog.tagsList[F];if(0<db&&null==sa.__tagsList__){for(Ra in $a)for(pa=$a[Ra],ta=0;ta<pa.length;ta++)for(ya=pa[ta],Ga=ya.title.split(" "),Ga.push(Ra),Ja=0;Ja<Ga.length;Ja++){var Ua=Ga[Ja].toLowerCase();null==sa[Ua]&&(sa[Ua]=[]);sa[Ua].push(ya)}sa.__tagsList__=!0}var Ra=[];pa={};for(ta=Ga=0;ta<Na.length;ta++)if(0<Na[ta].length){Ua=sa[Na[ta]];var ab={};Ra=[];
-if(null!=Ua)for(Ja=0;Ja<Ua.length;Ja++)ya=Ua[Ja],0==Ga==(null==pa[ya.url])&&(ab[ya.url]=!0,Ra.push(ya));pa=ab;Ga++}oa.scrollTop=0;oa.innerText="";M=0;sa=document.createElement("div");sa.style.padding="6px";sa.style.whiteSpace="nowrap";sa.style.overflow="hidden";sa.style.textOverflow="ellipsis";ya=mxResources.get(0==Ra.length?"noResultsFor":"resultsFor",[xa]);sa.setAttribute("title",ya);mxUtils.write(sa,ya);oa.appendChild(sa);null!=Ya&&null==eb&&(Ya.style.backgroundColor="",eb=Ya,Ya=sa);Xa=Ra;Y=null;
-C(!1)}mxEvent.consume(la)}}));mxEvent.addListener(na,"keyup",mxUtils.bind(this,function(la){""==na.value?(ua.setAttribute("src",Editor.magnifyImage),ua.setAttribute("title",mxResources.get("search"))):(ua.setAttribute("src",Editor.crossImage),ua.setAttribute("title",mxResources.get("reset")))}));x+=23;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(oa,
-"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var Aa=140,Ca=Aa,Da=null,za="url("+Editor.sparklesImage+")",Ba=document.createElement("div");Ba.className="geGenerateDiagramForm";Ba.style.position="absolute";Ba.style.width="100%";Ba.style.height="100%";var Ka=document.createElement("div");Ka.className="geTemplatePreview geAdaptiveAsset";Ka.style.backgroundImage=za;var Ma=document.createElement("textarea");Ma.setAttribute("placeholder",mxResources.get("describeYourDiagram"));Ma.className=
-"geGenerateDiagramDescription";var Ea=document.createElement("button");Ea.className="geBtn gePrimaryBtn geGenerateDiagramButton";Ea.setAttribute("disabled","disabled");Ea.setAttribute("title",mxResources.get("ok"));mxUtils.write(Ea,mxResources.get("ok"));var Ia=P.cloneNode(!0);Ia.style.display="none";var Qa=!1;mxEvent.addGestureListeners(Ia,function(la){Qa=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(la){if(!Qa&&null!=ra){var xa="<mxfile><diagram>"+Graph.compress(ra)+
-"</diagram></mxfile>";R(xa,mxEvent.getClientX(la),mxEvent.getClientY(la),Da,wa)}});var La=P.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";x=P.cloneNode(!0);x.setAttribute("src",Editor.helpImage);x.setAttribute("title",mxResources.get("help"));mxEvent.addListener(x,"click",function(la){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(la)});Ba.appendChild(Ma);
-Ba.appendChild(Ea);Ba.appendChild(x);Ba.style.display="none";mxEvent.addListener(La,"click",v);mxEvent.addListener(Ma,"input",function(){""!=Ma.value?Ea.removeAttribute("disabled"):Ea.setAttribute("disabled","disabled")});mxEvent.addListener(Ea,"click",function(){N()});mxEvent.addListener(Ma,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(N(!0),mxEvent.consume(la)):(N(),mxEvent.consume(la))});var Ha={},Sa={},$a={},db=0,fb=!0,Ya=null,eb=null;Ha.basic=H?[]:[{title:"blankDiagram"}];
-var Xa=Ha.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ha.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ha.smartTemplate={content:U()});if(!f){var jb=function(){mxUtils.get(Wa,function(la){if(!Ta){Ta=!0;la=la.getXml().documentElement.firstChild;for(var xa=
-{};null!=la;){if("undefined"!==typeof la.getAttribute)if("parsererror"==la.nodeName)null!=window.console&&console.log("Parser error in "+F+": "+la.textContent);else if("clibs"==la.nodeName){for(var sa=la.getAttribute("name"),pa=la.getElementsByTagName("add"),ta=[],ya=0;ya<pa.length;ya++)ta.push(encodeURIComponent(mxUtils.getTextContent(pa[ya])));null!=sa&&0<ta.length&&(xa[sa]=ta.join(";"))}else if(ta=la.getAttribute("url"),null!=ta){pa=la.getAttribute("section");sa=la.getAttribute("subsection");if(null==
-pa&&(ya=ta.indexOf("/"),pa=ta.substring(0,ya),null==sa)){var Ga=ta.indexOf("/",ya+1);-1<Ga&&(sa=ta.substring(ya+1,Ga))}ya=Ha[pa];null==ya&&(ya=[],Ha[pa]=ya);ta=la.getAttribute("clibs");null!=xa[ta]&&(ta=xa[ta]);ta={url:la.getAttribute("url"),libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ta,tags:la.getAttribute("tags")};ya.push(ta);null!=sa&&(ya=Sa[pa],null==ya&&(ya={},Sa[pa]=ya),pa=ya[sa],
-null==pa&&(pa=[],ya[sa]=pa),pa.push(ta))}la=la.nextSibling}L.stop();K()}})};m.appendChild(ja);m.appendChild(qa);m.appendChild(oa);var Ta=!1,Wa=F;/^https?:\/\//.test(Wa)&&!b.editor.isCorsEnabledForUrl(Wa)&&(Wa=PROXY_URL+"?url="+encodeURIComponent(Wa));L.spin(oa);null!=z?z(function(la,xa){$a=la;aa=db=xa;jb()},jb):jb();Z=Ha}mxEvent.addListener(D,"keypress",function(la){b.dialog.container.firstChild==m&&13==la.keyCode&&S()});z=document.createElement("div");z.style.marginTop=f?"4px":"16px";z.style.textAlign=
-"right";z.style.position="absolute";z.style.left="40px";z.style.bottom="24px";z.style.right="40px";H=mxUtils.button(mxResources.get("cancel"),function(){null!=q&&q();b.hideDialog(!0)});H.className="geBtn";!b.editor.cancelFirst||p&&null==q||z.appendChild(H);f||"1"==urlParams.embed||p||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&
-b.editor.loadUrl(b.editor.getProxiedUrl(xa),function(sa){ba=sa;ia=null;templateRealURl=xa;b.hideDialog();S()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),f.className="geBtn",z.appendChild(f));Graph.fileSupport&&n&&(n=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,
-"change",function(xa){b.openFiles(la.files,!0);la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=la}b.newDlgFileInputElt.click()}),n.className="geBtn",z.appendChild(n));z.appendChild(O);b.editor.cancelFirst||null!=c||p&&null==q||z.appendChild(H);m.appendChild(z);this.container=m};NewDialog.tagsList={};
-var SaveDialog=function(b,f,g,c,p,q,u,y,G,E,F){function d(m,t,D,M,L,O){var P=null;if((null==c||0>mxUtils.indexOf(c,m))&&(null==G||m==G)&&(null==E||0<=mxUtils.indexOf(E,m))){L=null!=L?L:b.getTitleForService(m);var T=0<=mxUtils.indexOf(A,m);if(T||null!=b.getServiceForName(m)){P=document.createElement("option");var V="";!T&&b.isOffline(m==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(P.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==O)P.innerHTML=mxUtils.htmlEntities(L)+
-"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,P.setAttribute("value","pickFolder-"+m),P.setAttribute("title",L+" - "+mxResources.get("pickFolder")+"...");else{T=m+(null!=D?"-"+D:"");var X=J[T];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=t){"/"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1));"/"==t.charAt(0)&&(t=t.substring(1));X=t;if(m!=App.MODE_GITHUB&&m==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
-X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}P.innerHTML=mxUtils.htmlEntities(L)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;P.setAttribute("title",L+(null!=t?" ("+t+")":"")+(null!=D&&decodeURIComponent(D)!=t?" ["+D+"]":""));P.setAttribute("value",T);J[T]={option:P,mode:m,path:t,id:D};SaveDialog.lastValue==T&&null==y&&"disabled"==!P.getAttribute("disabled")?M=!0:null==M&&("root"==O?M=null==y&&b.mode==m||null!=m&&m==y:"pickFolder-"==
+"30px";u.style.bottom="100px";u.style.resize="none";u.setAttribute("wrap","off");u.setAttribute("spellcheck","false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");var y=document.createElement("select");y.className="geBtn";if("formatSql"==g||"mermaid"==g&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())y.style.display="none";var H=document.createElement("option");H.setAttribute("value","list");mxUtils.write(H,mxResources.get("list"));
+"plantUml"!=g&&"mermaid"!=g&&y.appendChild(H);null!=g&&"fromText"!=g||H.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","table");mxUtils.write(H,mxResources.get("formatSql"));"formatSql"==g&&(y.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","mermaid");mxUtils.write(H,mxResources.get("image"));if("mermaid"==g){if("undefined"!==typeof mxMermaidToDrawio){var E=document.createElement("option");
+E.setAttribute("value","mermaid2drawio");E.setAttribute("selected","selected");mxUtils.write(E,mxResources.get("diagram"));y.appendChild(E)}else y.style.display="none";y.appendChild(H)}H=document.createElement("option");H.setAttribute("value","diagram");mxUtils.write(H,mxResources.get("diagram"));E=document.createElement("option");E.setAttribute("value","circle");mxUtils.write(E,mxResources.get("circle"));var F=document.createElement("option");F.setAttribute("value","horizontalFlow");mxUtils.write(F,
+mxResources.get("horizontalFlow"));var d=document.createElement("option");d.setAttribute("value","verticalFlow");mxUtils.write(d,mxResources.get("verticalFlow"));"plantUml"!=g&&"mermaid"!=g&&(y.appendChild(H),y.appendChild(E),y.appendChild(F),y.appendChild(d));H=document.createElement("option");H.setAttribute("value","plantUmlSvg");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==g&&H.setAttribute("selected","selected");E=document.createElement("option");
+E.setAttribute("value","plantUmlPng");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value","plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==g&&(y.appendChild(H),y.appendChild(E),y.appendChild(F));var k=p();u.value=k;f.appendChild(u);H=document.createElement("div");H.style.position="absolute";H.style.bottom=
+"46px";H.style.right="30px";H.style.left="30px";H.style.justifyContent="end";H.style.display="flex";this.init=function(){u.focus()};Graph.fileSupport&&(u.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),u.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=l.dataTransfer.files[0];var n=new FileReader;n.onload=function(x){u.value=x.target.result};n.readAsText(l)}},!1));"plantUml"==g&&"https://plant-aws.diagrams.net"==
+window.PLANT_URL&&(E=document.createElement("div"),E.style.display="inline-block",E.style.color="#c00",E.style.fontSize="12px",E.style.marginRight="10px",E.style.display="flex",E.style.alignItems="center",E.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',H.appendChild(E));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=g&&"plantUml"!=g||H.appendChild(b.createHelpIcon("mermaid"==
+g?"https://mermaid.js.org/intro/":"https://plantuml.com/"));H.appendChild(y);mxEvent.addListener(y,"change",function(){var l=p();if(0==u.value.length||u.value==k)k=l,u.value=k});g=mxUtils.button(mxResources.get("close"),function(){u.value==k?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&H.appendChild(g);E=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),c(u.value,y.value,l)}catch(n){b.handleError(n)}});
+E.className="geBtn gePrimaryBtn";H.appendChild(E);b.editor.cancelFirst||H.appendChild(g);f.appendChild(H);this.container=f},NewDialog=function(b,f,g,c,p,q,u,y,H,E,F,d,k,l,n,x,A,B,I,G){function C(na){null!=na&&(Xa=qb=na?135:140);na=!0;if(null!=lb)for(;X<lb.length&&(na||0!=mxUtils.mod(X,30));){var xa=lb[X++];xa=J(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs,xa.type);na&&xa.click();na=!1}}function R(na,xa,qa,ta,ua,za){if(null!=
+na&&mxUtils.isAncestorNode(document.body,ta)){na=mxUtils.parseXml(na);na=Editor.parseDiagramNode(na.documentElement,null,!0);var Ma=new mxCodec(na.ownerDocument),Na=new mxGraphModel;Ma.decode(na,Na);b.sidebar.createTooltip(ta,Na.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ua?mxResources.get(ua):null,!0,new mxPoint(xa,
+qa),!0,function(){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&Q(ta,null,null,za,infoObj,clibs)},!0,!1)}}function T(){var na=document.createElement("div");na.style.position="absolute";na.style.overflow="visible";na.style.left="8px";na.style.right="8px";na.style.bottom="8px";na.style.top="8px";mxUtils.write(na,mxResources.get("describeYourDiagram")+":");mxUtils.br(na);var xa=document.createElement("input");xa.setAttribute("type","text");xa.setAttribute("placeholder",
+mxResources.get("processForHiringNewEmployee"));xa.style.width="100%";xa.style.marginTop="6px";xa.style.marginBottom="4px";xa.style.boxSizing="border-box";na.appendChild(xa);na.init=function(){xa.focus()};mxUtils.br(na);var qa=document.createElement("div");qa.style.top="86px";qa.style.left="0";qa.style.right="0";qa.style.bottom="0";qa.style.margin="0";qa.style.borderRadius="0";qa.style.width="auto";qa.style.height="auto";qa.style.position="absolute";qa.style.border="1px solid #424242";qa.className=
+"geTemplate";var ta=document.createElement("div");ta.style.boxSizing="border-box";ta.style.position="absolute";ta.style.fontSize="14px";ta.style.textAlign="center";ta.style.top="50%";mxUtils.write(ta,mxResources.get("blankDiagram"));qa.appendChild(ta);var ua=document.createElement("select");ua.className="geBtn";ua.style.maxWidth="160px";ua.style.marginLeft="0px";ta=document.createElement("option");mxUtils.write(ta,mxResources.get("diagramType"));ta.setAttribute("value","");ua.appendChild(ta);for(var za=
+0;za<EditorUi.mermaidDiagramTypes.length;za++){ta=document.createElement("option");var Ma=EditorUi.mermaidDiagramTypes[za],Na=Ma;Ma==urlParams["smart-template-type"]&&ta.setAttribute("selected","selected");"erDiagram"==Na&&(Na="entityRelationshipDiagram");Na=mxResources.get(Na,null,Na.charAt(0).toUpperCase()+Na.substring(1).replace(/[A-Z]/g," $&"));ta.setAttribute("value",Ma);mxUtils.write(ta,Na);ua.appendChild(ta)}var Qa=mxUtils.button(mxResources.get("generate"),function(){var Ya=xa.value,Ua=ua.value.replace(/([A-Z])/g,
+" $1").toLowerCase(),ib="Write the declaration code for a detailed and complex "+(""!=Ua?Ua:"graph")+' that shows "'+(""!=Ya?Ya:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ua=""!=ua.value?" ("+mxUtils.trim(mxUtils.getTextContent(ua.options[ua.selectedIndex]))+")":"";var Ra="gantt"==ua.value||"pie"==ua.value||"timeline"==ua.value||"quadrantchart"==ua.value||"c4context"==ua.value,Za=xa.value+Ua;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
+function(Ga){Ra||(Ea=oa=Ga,Oa="Smart Template: "+Za)}));b.spinner.spin(qa,mxResources.get("generate")+" '"+Ya+"'")&&b.generateOpenAiMermaidDiagram(ib,function(Ga,mb,eb,vb){b.spinner.stop();qa.innerHTML="";var nb=document.createElement("img");nb.setAttribute("title",mxResources.get("preview"));nb.src="data:image/svg+xml;base64,"+mb.substring(mb.indexOf(",")+1);nb.style.cursor="pointer";nb.style.width="95%";nb.style.height="95%";qa.appendChild(nb);Ga=b.createMermaidXml(Ga,EditorUi.defaultMermaidConfig,
+mb,eb,vb,Za);var xb="<mxfile><diagram>"+Graph.compress(Ga)+"</diagram></mxfile>";if(Ra||"undefined"===typeof mxMermaidToDrawio)Ea=oa=Ga;Ga=Z.cloneNode(!0);qa.appendChild(Ga);mb=function(Ta){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};eb=function(Ta){ea||R(xb,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),nb,Za)};mxEvent.addGestureListeners(nb,mb,null,eb);mxEvent.addGestureListeners(Ga,mb,null,eb)},function(Ga){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();
+b.handleError(Ga)})});Qa.setAttribute("disabled","disabled");Qa.className="geBtn gePrimaryBtn";ta=function(){window.setTimeout(function(){""!=xa.value?Qa.removeAttribute("disabled"):Qa.setAttribute("disabled","disabled")},0)};za=null!=I?I:urlParams["smart-template"];null!=za&&"1"!=za&&(xa.value=decodeURIComponent(za),ta(),""==za||null==I&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Qa.click()},0));mxEvent.addListener(xa,"change",ta);mxEvent.addListener(xa,"keydown",ta);
+mxEvent.addListener(xa,"cut",ta);mxEvent.addListener(xa,"paste",ta);mxEvent.addListener(xa,"keydown",function(Ya){13==Ya.keyCode&&Qa.click()});ta=document.createElement("div");ta.style.height="40px";ta.style.marginTop="4px";ta.style.marginBottom="4px";ta.style.whiteSpace="nowrap";ta.style.overflowX="auto";ta.style.overflowY="hidden";ta.appendChild(ua);ta.appendChild(Qa);na.appendChild(ta);na.appendChild(qa);return na}function S(){if(ya==bb&&null==oa&&null!=jb&&null!=$a)c&&b.spinner.spin(document.body,
+mxResources.get("generate")+" '"+$a.value+"'")&&(t=!0,b.hideDialog()),jb.click();else if(t&&b.spinner.stop(),Ca&&null!=l)g||t||b.hideDialog(),l(Ca,Aa,P.value);else if(c)g||t||b.hideDialog(),c(oa,P.value,Fa,ma);else{var na=P.value;if(null!=na&&0<na.length){var xa=function(ta,ua,za){b.createFile(za,oa,null!=ma&&0<ma.length?ma:null,ta,function(){t||b.hideDialog()},null,ua,null,null!=wa&&0<wa.length?wa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var qa=new SaveDialog(b,na,mxUtils.bind(this,
+function(ta,ua,za){xa(ua,za,ta.value)}),null,null,null,null,b.mode);b.showDialog(qa.container,420,150,!0,!1);qa.init()}else b.pickFolder(b.mode,function(ta){xa(b.mode,ta,na)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function Q(na,xa,qa,ta,ua,za,Ma){return ya!=na?(null!=ya&&(ya.classList.remove("geTemplateSelected"),ya==bb&&(Va.style.display="none",fb.style.display="",La.style.visibility="hidden",Sa.style.visibility=null!=Ea?"visible":"hidden")),na==bb&&(xa=Ea,null!=
+xa?(Sa.style.visibility="visible",Sa.style.visibility=null!=Ea?"visible":"hidden",La.style.visibility="visible"):(Va.style.display="",La.style.visibility="hidden",Sa.style.visibility="hidden")),Y.removeAttribute("disabled"),oa=xa,ma=qa,wa=za,ya=na,Ca=ta,Fa=Ma,Aa=ua,ya.classList.add("geTemplateSelected"),!0):!1}function v(){Va.style.display="";fb.style.display="none";La.style.visibility="hidden";Sa.style.visibility="hidden";$a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?$a.select():
+document.execCommand("selectAll",!1,null)}function z(){fb.style.backgroundImage=rb;fb.style.backgroundSize="contain";Va.style.display="none";fb.style.display="";La.style.visibility="visible";Sa.style.visibility="visible"}function N(na){if(!ob){ob=!0;var xa=mxUtils.trim($a.value);na||""==xa?null!=Oa&&($a.value=Oa,z()):(fb.style.backgroundImage="url("+Editor.spinImage+")",fb.style.backgroundSize="12px 12px",fb.style.display="",Va.style.display="none",b.generateDiagram(xa,mxUtils.bind(this,function(qa,
+ta){ob=!1;ya==bb&&"none"==Va.style.display&&(rb="url(data:image/svg+xml;base64,"+ta.substring(ta.indexOf(",")+1)+")",bb.setAttribute("title",xa),Sa.style.display="",Ea=oa=qa,Oa=xa,z(),t&&S())}),mxUtils.bind(this,function(qa){ob=!1;ya==bb&&(Va.style.display="",fb.style.display="none",La.style.visibility="hidden",Sa.style.visibility="hidden",b.handleError(qa))})))}}function J(na,xa,qa,ta,ua,za,Ma,Na,Qa,Ya,Ua,ib){function Ra(Ta,tb){null==mb?(eb=Ta,eb=/^https?:\/\//.test(eb)?b.editor.isCorsEnabledForUrl(eb)?
+eb:PROXY_URL+"?url="+encodeURIComponent(eb):TEMPLATE_PATH+"/"+eb,mxUtils.get(eb,mxUtils.bind(this,function(ub){200<=ub.getStatus()&&299>=ub.getStatus()&&(mb=ub.getText());tb(mb,eb)}))):tb(mb,eb)}function Za(Ta,tb){if(null==na||aa||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=fa){var ub="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+fa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+
+fa.naturalWidth+'" height="'+fa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";R(ub,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),qa,na)}else b.sidebar.currentElt=Ga,aa=!0,Ra(na,function(Db){if(aa&&b.sidebar.currentElt==Ga)try{R(Db,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),Ga,tb)}catch(Eb){b.sidebar.currentElt=null,b.handleError(Eb)}aa=!1})}var Ga=null;if("generative"!=ib||null==bb){Ga=document.createElement("div");Ga.className="geTemplate";var mb=null,
+eb=na;null!=qa?Ga.setAttribute("title",mxResources.get(qa,null,qa)):null!=ta&&0<ta.length&&Ga.setAttribute("title",ta)}else Ga=bb;var vb=document.createElement("span");vb.className="geAdaptiveAsset";mxUtils.write(vb,mxResources.get(qa,null,qa));if(null!=za){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";Qa=document.createElement("img");Qa.setAttribute("src",za);Qa.setAttribute("alt",ta);Qa.style.maxWidth=Xa+"px";Qa.style.maxHeight=qb+"px";fa=Qa;var nb=
+za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(Qa);Qa.onerror=function(){this.src!=nb?this.src=nb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Ta){Q(Ga,null,null,na,Ma,Ua)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Ta){S();mxEvent.consume(Ta)})}else if(!Ya&&null!=na&&0<na.length){var xb=function(Ta){W.spin(Ba)&&Ra(na,function(tb,ub){W.stop();null!=tb&&(Q(Ga,tb,xa,null,null,Ua,ub),Ta&&S())})};
+za=Qa||TEMPLATE_PATH+"/"+na.substring(0,na.length-4)+".png";Qa=fb.cloneNode(!1);Qa.style.backgroundImage="url("+za+")";Qa.style.display="";Ga.appendChild(Qa);null!=qa&&Ga.appendChild(vb);mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Ta){xb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Ta){xb(!0);mxEvent.consume(Ta)})}else Ga.appendChild(vb),"generative"==ib&&null==bb&&(Ga.appendChild(fb),Ga.appendChild(Va),Ga.appendChild(Sa),Ga.appendChild(La),bb=Ga),ua&&Q(Ga),null!=Na?(mxEvent.addGestureListeners(Ga,
+null,null,mxUtils.bind(this,function(Ta){Q(Ga,null,null,na,Ma)})),mxEvent.addListener(Ga,"click",Na)):(mxEvent.addListener(Ga,"click",function(Ta){Q(Ga,null,null,na,Ma)&&"generative"==ib&&null==Ea&&v()}),mxEvent.addListener(Ga,"dblclick",function(Ta){"generative"!=ib?S():"none"==Va.style.display&&v();mxEvent.consume(Ta)}));null!=na&&(za=Z.cloneNode(!0),Ga.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Ta){ea=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(za,"click",
+mxUtils.bind(this,function(Ta){ea||Za(Ta,null!=qa?qa:ta);mxEvent.consume(Ta)})));Ba.appendChild(Ga);return Ga}function K(){function na(Ra,Za){Ra=mxResources.get(Ra,null,Ra.substring(0,1).toUpperCase()+Ra.substring(1));18<Ra.length&&(Ra=Ra.substring(0,18)+"&hellip;");return Ra+(null!=Za?" ("+Za.length+")":"")}function xa(Ra,Za,Ga){mxEvent.addListener(Za,"click",function(){cb!=Za&&(null!=cb&&(cb.style.backgroundColor=""),cb=Za,cb.style.backgroundColor=u,Ba.scrollTop=0,Ba.innerText="",X=0,null!=Ja[Ra].content?
+(Ba.appendChild(Ja[Ra].content),oa=Ea,lb=null,null!=Ja[Ra].content.init&&Ja[Ra].content.init()):(lb=Ga?Wa[Ra][Ga]:Ja[Ra],ha=null,C(!1)))});"smartTemplate"!=Ra||null==I&&null==urlParams["smart-template"]||Za.click()}pb&&(pb=!1,mxEvent.addListener(Ba,"scroll",function(Ra){Ba.scrollTop+Ba.clientHeight>=Ba.scrollHeight&&(C(),mxEvent.consume(Ra))}));if(0<ab){var qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,
+mxResources.get("custom"));Ka.appendChild(qa);for(var ta in gb){var ua=document.createElement("div");qa=ta;var za=gb[ta];18<qa.length&&(qa=qa.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ua.setAttribute("title",qa+" ("+za.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=E&&(ua.style.padding=E);Ka.appendChild(ua);(function(Ra,Za){mxEvent.addListener(ua,
+"click",function(){cb!=Za&&(cb.style.backgroundColor="",cb=Za,cb.style.backgroundColor=u,Ba.scrollTop=0,Ba.innerText="",X=0,lb=gb[Ra],ha=null,C(!1))})})(ta,ua)}qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,"draw.io");Ka.appendChild(qa)}for(ta in Ja){qa=za=null;if(null!=Ja[ta].content)ua=document.createElement(Ma?"ul":"div"),qa=na(ta),ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ua.setAttribute("title",qa),mxUtils.write(ua,qa),Ka.appendChild(ua),qa=ua;else{var Ma=Wa[ta];qa=ua=document.createElement(Ma?"ul":"div");za=Ja[ta];var Na=na(ta,za);if(null!=Ma){za=document.createElement("li");var Qa=document.createElement("div");Qa.className="geTempTreeCaret";Qa.setAttribute("title",Na);mxUtils.write(Qa,Na);qa=Qa;za.appendChild(Qa);Na=document.createElement("ul");Na.className="geTempTreeNested";Na.style.visibility="hidden";for(var Ya in Ma){var Ua=document.createElement("li"),ib=
+na(Ya,Ma[Ya]);Ua.setAttribute("title",ib);mxUtils.write(Ua,ib);xa(ta,Ua,Ya);Na.appendChild(Ua)}za.appendChild(Na);ua.className="geTempTree";ua.appendChild(za);(function(Ra,Za){mxEvent.addListener(Za,"click",function(){Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ra.style.visibility="hidden"},550);Za.classList.toggle("geTempTreeCaret-down")})})(Na,Qa)}else ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ua.setAttribute("title",Na),mxUtils.write(ua,Na);null!=E&&(ua.style.padding=E);Ka.appendChild(ua)}xa(ta,qa);null==cb&&qa.click()}C(!1)}var m=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);g=null!=g?g:!0;p=null!=p?p:!1;u=null!=u?u:"light-dark(#ebf2f9, "+Editor.darkColor+")";F=null!=F?F:EditorUi.templateFile;var t=!1,D=document.createElement("div");D.style.userSelect="none";D.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";
+M.style.height="46px";g&&D.appendChild(M);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align","absmiddle");L.style.width="40px";L.style.height="40px";L.style.marginRight="10px";L.style.paddingBottom="4px";L.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";f||m||!g||M.appendChild(L);g&&mxUtils.write(M,(m?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");var O=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?O=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?O=b.dropbox.extension:
+b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?O=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?O=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?O=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(O=b.trello.extension);var P=document.createElement("input");P.setAttribute("value",b.defaultFilename+O);P.style.marginLeft="10px";P.style.width=f||m?"144px":"244px";this.init=function(){g&&Editor.selectFilename(P);null!=Ba.parentNode&&null!=Ba.parentNode.parentNode&&mxEvent.addGestureListeners(Ba.parentNode.parentNode,
+mxUtils.bind(this,function(na){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};if(g)if(M.appendChild(P),B)P.style.width=f||m?"350px":"450px";else if(null!=b.editor.diagramFileTypes){var U=FilenameDialog.createFileTypes(b,P,b.editor.diagramFileTypes);U.style.marginLeft="6px";U.style.width=f||m?"80px":"180px";M.appendChild(U)}var V=!1,X=0,W=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),
+Y=mxUtils.button(x||mxResources.get("create"),function(){Y.setAttribute("disabled","disabled");S();Y.removeAttribute("disabled")});Y.className="geBtn gePrimaryBtn";var Z=document.createElement("img");Z.setAttribute("src",Editor.magnifyImage);Z.setAttribute("title",mxResources.get("preview"));Z.className="geButton geRoundButton";var aa=!1,fa=null,ea=!1;if(d||k){var ca=[],ha=null,ka=null,ba=null,ia=function(na){Y.setAttribute("disabled","disabled");for(var xa=0;xa<ca.length;xa++)ca[xa].className=xa==
+na?"geBtn gePrimaryBtn":"geBtn"};V=!0;var la=document.createElement("div");la.style.whiteSpace="nowrap";la.style.height="30px";D.appendChild(la);var da=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ka.style.display="";Ia.style.display="";Ba.style.left="160px";ia(0);Ba.scrollTop=0;Ba.innerText="";X=0;ha!=lb&&(lb=ha,Ja=ka,ab=ba,Ka.innerText="",K(),ha=null)});ca.push(da);la.appendChild(da);var ra=function(na){Ka.style.display="none";Ia.style.display="none";Ba.style.left="30px";
+ia(na?-1:1);null==ha&&(ha=lb);Ba.scrollTop=0;Ba.innerText="";W.spin(Ba);var xa=function(qa,ta,ua){X=0;W.stop();lb=qa;ua=ua||{};var za=0,Ma;for(Ma in ua)za+=ua[Ma].length;if(ta)Ba.innerText=ta;else if(0==qa.length&&0==za)Ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(Ba.innerText="",0<za){Ka.style.display="";Ba.style.left="160px";Ka.innerText="";ab=0;Ja={"draw.io":qa};for(Ma in ua)Ja[Ma]=ua[Ma];K()}else C(!0)};na?k(va.value,xa):d(xa)};if(d){var pa=mxUtils.button(mxResources.get("Recent",
+null,"Recent"),function(){ra()});la.appendChild(pa);ca.push(pa)}if(k){var sa=document.createElement("span");sa.style.marginLeft="10px";sa.innerText=mxResources.get("search")+":";la.appendChild(sa);var va=document.createElement("input");va.style.marginRight="10px";va.style.marginLeft="10px";va.style.width="220px";mxEvent.addListener(va,"keypress",function(na){13==na.keyCode&&ra(!0)});la.appendChild(va);var ja=mxUtils.button(mxResources.get("search"),function(){ra(!0)});ja.className="geBtn";la.appendChild(ja)}ia(0)}var ma=
+null,wa=null,oa=null,ya=null,Ca=null,Fa=null,Aa=null,Ea=null,Oa=null,Ba=document.createElement("div");Ba.style.border="1px solid #d3d3d3";Ba.style.position="absolute";Ba.style.left="160px";Ba.style.right="34px";var Da=(g?72:40)+(V?30:0);Ba.style.top=Da+"px";Ba.style.bottom="68px";Ba.style.margin="6px 0 0 -1px";Ba.style.padding="6px";Ba.style.overflow="auto";var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;height:22px;margin-top: 6px;white-space: nowrap;";
+var Pa=document.createElement("input");Pa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Pa.setAttribute("placeholder",mxResources.get("search"));Pa.setAttribute("type","text");Ia.appendChild(Pa);var Ha=document.createElement("img");Ha.setAttribute("src",Editor.magnifyImage);Ha.setAttribute("title",mxResources.get("search"));Ha.className="geAdaptiveAsset";Ha.style.position="relative";Ha.style.cursor="pointer";Ha.style.outline=
+"none";Ha.style.opacity="0.5";Ha.style.height="16px";Ha.style.left="-20px";Ha.style.top="4px";Ia.appendChild(Ha);mxEvent.addListener(Ha,"click",function(){Ha.getAttribute("src")!=Editor.magnifyImage&&(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search")),Pa.value="",null!=sb&&(sb.click(),sb=null));Pa.focus()});mxEvent.addListener(Pa,"keydown",mxUtils.bind(this,function(na){if(13==na.keyCode){var xa=Pa.value;if(""==xa)null!=sb&&(sb.click(),sb=null);else{if(null==
+NewDialog.tagsList[F]){var qa={};for(Ua in Ja)if(null==Ja[Ua].content)for(var ta=Ja[Ua],ua=0;ua<ta.length;ua++){var za=ta[ua];if(null!=za.tags)for(var Ma=za.tags.toLowerCase().split(";"),Na=0;Na<Ma.length;Na++)null==qa[Ma[Na]]&&(qa[Ma[Na]]=[]),qa[Ma[Na]].push(za)}NewDialog.tagsList[F]=qa}var Qa=xa.toLowerCase().split(" ");qa=NewDialog.tagsList[F];if(0<ab&&null==qa.__tagsList__){for(Ua in gb)for(ta=gb[Ua],ua=0;ua<ta.length;ua++)for(za=ta[ua],Ma=za.title.split(" "),Ma.push(Ua),Na=0;Na<Ma.length;Na++){var Ya=
+Ma[Na].toLowerCase();null==qa[Ya]&&(qa[Ya]=[]);qa[Ya].push(za)}qa.__tagsList__=!0}var Ua=[];ta={};for(ua=Ma=0;ua<Qa.length;ua++)if(0<Qa[ua].length){Ya=qa[Qa[ua]];var ib={};Ua=[];if(null!=Ya)for(Na=0;Na<Ya.length;Na++)za=Ya[Na],0==Ma==(null==ta[za.url])&&(ib[za.url]=!0,Ua.push(za));ta=ib;Ma++}Ba.scrollTop=0;Ba.innerText="";X=0;qa=document.createElement("div");qa.style.padding="6px";qa.style.whiteSpace="nowrap";qa.style.overflow="hidden";qa.style.textOverflow="ellipsis";za=mxResources.get(0==Ua.length?
+"noResultsFor":"resultsFor",[xa]);qa.setAttribute("title",za);mxUtils.write(qa,za);Ba.appendChild(qa);null!=cb&&null==sb&&(cb.style.backgroundColor="",sb=cb,cb=qa);lb=Ua;ha=null;C(!1)}mxEvent.consume(na)}}));mxEvent.addListener(Pa,"keyup",mxUtils.bind(this,function(na){""==Pa.value?(Ha.setAttribute("src",Editor.magnifyImage),Ha.setAttribute("title",mxResources.get("search"))):(Ha.setAttribute("src",Editor.crossImage),Ha.setAttribute("title",mxResources.get("reset")))}));Da+=23;var Ka=document.createElement("div");
+Ka.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Ba,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var Xa=140,qb=Xa,bb=null,rb="url("+Editor.sparklesImage+")",Va=document.createElement("div");Va.className="geGenerateDiagramForm";Va.style.position="absolute";Va.style.width="100%";Va.style.height="100%";var fb=document.createElement("div");fb.className="geTemplatePreview geAdaptiveAsset";
+fb.style.backgroundImage=rb;var $a=document.createElement("textarea");$a.setAttribute("placeholder",mxResources.get("describeYourDiagram"));$a.className="geGenerateDiagramDescription";var jb=document.createElement("button");jb.className="geBtn gePrimaryBtn geGenerateDiagramButton";jb.setAttribute("disabled","disabled");jb.setAttribute("title",mxResources.get("ok"));mxUtils.write(jb,mxResources.get("ok"));var Sa=Z.cloneNode(!0);Sa.style.display="none";var db=!1;mxEvent.addGestureListeners(Sa,function(na){db=
+null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(na){if(!db&&null!=Ea){var xa="<mxfile><diagram>"+Graph.compress(Ea)+"</diagram></mxfile>";R(xa,mxEvent.getClientX(na),mxEvent.getClientY(na),bb,Oa)}});var La=Z.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";var hb=Z.cloneNode(!0);hb.setAttribute("src",Editor.helpImage);hb.setAttribute("title",mxResources.get("help"));
+mxEvent.addListener(hb,"click",function(na){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(na)});Va.appendChild($a);Va.appendChild(jb);Va.appendChild(hb);Va.style.display="none";mxEvent.addListener(La,"click",v);mxEvent.addListener($a,"input",function(){""!=$a.value?jb.removeAttribute("disabled"):jb.setAttribute("disabled","disabled")});var ob=!1;mxEvent.addListener(jb,"click",function(){N()});mxEvent.addListener($a,"keydown",function(na){13!=na.keyCode||mxEvent.isShiftDown(na)?
+27==na.keyCode&&(N(!0),mxEvent.consume(na)):(N(),mxEvent.consume(na))});var Ja={},Wa={},gb={},ab=0,pb=!0,cb=null,sb=null;Ja.basic=G?[]:[{title:"blankDiagram"}];var lb=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&
+(Ja.smartTemplate={content:T()});if(!f){var yb=function(){mxUtils.get(wb,function(na){if(!Ab){Ab=!0;na=na.getXml().documentElement.firstChild;for(var xa={};null!=na;){if("undefined"!==typeof na.getAttribute)if("parsererror"==na.nodeName)null!=window.console&&console.log("Parser error in "+F+": "+na.textContent);else if("clibs"==na.nodeName){for(var qa=na.getAttribute("name"),ta=na.getElementsByTagName("add"),ua=[],za=0;za<ta.length;za++)ua.push(encodeURIComponent(mxUtils.getTextContent(ta[za])));
+null!=qa&&0<ua.length&&(xa[qa]=ua.join(";"))}else if(ua=na.getAttribute("url"),null!=ua){ta=na.getAttribute("section");qa=na.getAttribute("subsection");if(null==ta&&(za=ua.indexOf("/"),ta=ua.substring(0,za),null==qa)){var Ma=ua.indexOf("/",za+1);-1<Ma&&(qa=ua.substring(za+1,Ma))}za=Ja[ta];null==za&&(za=[],Ja[ta]=za);ua=na.getAttribute("clibs");null!=xa[ua]&&(ua=xa[ua]);ua={url:na.getAttribute("url"),libs:na.getAttribute("libs"),title:na.getAttribute("title"),tooltip:na.getAttribute("name")||na.getAttribute("url"),
+preview:na.getAttribute("preview"),clibs:ua,tags:na.getAttribute("tags")};za.push(ua);null!=qa&&(za=Wa[ta],null==za&&(za={},Wa[ta]=za),ta=za[qa],null==ta&&(ta=[],za[qa]=ta),ta.push(ua))}na=na.nextSibling}W.stop();K()}})};D.appendChild(Ia);D.appendChild(Ka);D.appendChild(Ba);var Ab=!1,wb=F;/^https?:\/\//.test(wb)&&!b.editor.isCorsEnabledForUrl(wb)&&(wb=PROXY_URL+"?url="+encodeURIComponent(wb));W.spin(Ba);null!=A?A(function(na,xa){gb=na;ba=ab=xa;yb()},yb):yb();ka=Ja}mxEvent.addListener(P,"keypress",
+function(na){b.dialog.container.firstChild==D&&13==na.keyCode&&S()});var kb=document.createElement("div");kb.style.marginTop=f?"4px":"16px";kb.style.textAlign="right";kb.style.position="absolute";kb.style.left="40px";kb.style.bottom="24px";kb.style.right="40px";var zb=mxUtils.button(mxResources.get("cancel"),function(){null!=q&&q();b.hideDialog(!0)});zb.className="geBtn";!b.editor.cancelFirst||p&&null==q||kb.appendChild(zb);if(!(f||"1"==urlParams.embed||p||mxClient.IS_ANDROID||mxClient.IS_IOS)&&"1"!=
+urlParams.noDevice){var Bb=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var na=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(xa),function(qa){oa=qa;ma=null;templateRealURl=xa;b.hideDialog();S()},function(qa){b.handleError(qa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(na.container,300,80,!0,!0);na.init()});Bb.className="geBtn";kb.appendChild(Bb)}if(Graph.fileSupport&&n){var Cb=mxUtils.button(mxResources.get("import"),
+function(){if(null==b.newDlgFileInputElt){var na=document.createElement("input");na.setAttribute("multiple","multiple");na.setAttribute("type","file");mxEvent.addListener(na,"change",function(xa){b.openFiles(na.files,!0);na.value=""});na.style.display="none";document.body.appendChild(na);b.newDlgFileInputElt=na}b.newDlgFileInputElt.click()});Cb.className="geBtn";kb.appendChild(Cb)}kb.appendChild(Y);b.editor.cancelFirst||null!=c||p&&null==q||kb.appendChild(zb);D.appendChild(kb);this.container=D};
+NewDialog.tagsList={};
+var SaveDialog=function(b,f,g,c,p,q,u,y,H,E,F){function d(m,t,D,M,L,O){var P=null;if((null==c||0>mxUtils.indexOf(c,m))&&(null==H||m==H)&&(null==E||0<=mxUtils.indexOf(E,m))){L=null!=L?L:b.getTitleForService(m);var U=0<=mxUtils.indexOf(z,m);if(U||null!=b.getServiceForName(m)){P=document.createElement("option");var V="";!U&&b.isOffline(m==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(P.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==O)P.innerHTML=mxUtils.htmlEntities(L)+
+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,P.setAttribute("value","pickFolder-"+m),P.setAttribute("title",L+" - "+mxResources.get("pickFolder")+"...");else{U=m+(null!=D?"-"+D:"");var X=J[U];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=t){"/"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1));"/"==t.charAt(0)&&(t=t.substring(1));X=t;if(m!=App.MODE_GITHUB&&m==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
+X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}P.innerHTML=mxUtils.htmlEntities(L)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;P.setAttribute("title",L+(null!=t?" ("+t+")":"")+(null!=D&&decodeURIComponent(D)!=t?" ["+D+"]":""));P.setAttribute("value",U);J[U]={option:P,mode:m,path:t,id:D};SaveDialog.lastValue==U&&null==y&&"disabled"==!P.getAttribute("disabled")?M=!0:null==M&&("root"==O?M=null==y&&b.mode==m||null!=m&&m==y:"pickFolder-"==
v.value.substring(0,11)&&(M=!0));M&&P.setAttribute("selected","selected")}v.appendChild(P)}}return P}function k(m){b.pickFolder(m,function(t){var D=null;m==App.MODE_GOOGLE&&null!=t.docs&&0<t.docs.length?D={mode:m,path:t.docs[0].name,id:t.docs[0].id}:m==App.MODE_ONEDRIVE&&null!=t.value&&0<t.value.length?D={mode:m,path:t.value[0].name,id:OneDriveFile.prototype.getIdOf(t.value[0])}:(m==App.MODE_GITHUB||m==App.MODE_GITLAB)&&null!=t&&0<t.length&&(D={mode:m,path:decodeURIComponent(t),id:t});null!=D&&(b.addRecent(D,
"Folders",5),t=d(D.mode,D.path,D.id,!0),v.innerHTML="",J={},l(),D=v.selectedIndex,v.value=t.value,0>v.selectedIndex&&(v.selectedIndex=D))},!0,!0,!0,!0)}function l(){var m=b.getRecent("Folders"),t=0;if(null!=m&&0<m.length)for(var D=0;D<m.length;D++)null!=d(m[D].mode,m[D].path,m[D].id)&&t++;d(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");d(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(d(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),
null,null,"root"),d(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&d(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);d(App.MODE_GITHUB,null,null,null,null,"pick");d(App.MODE_GITLAB,null,null,null,null,"pick");d(App.MODE_TRELLO);m=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&m&&d(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&
"0"!=urlParams.browser&&d(App.MODE_BROWSER);m&&d("download");Editor.popupsAllowed&&d("_blank",null,null,null,mxResources.get("openInNewWindow"));"pickFolder-"==v.value.substring(0,11)&&(m=document.createElement("option"),m.setAttribute("value",""),m.setAttribute("selected","selected"),mxUtils.write(m,mxResources.get("pickFolder")+"..."),v.insertBefore(m,v.firstChild));N=v.value}function n(){if("pickFolder-"==v.value.substring(0,11)){var m=v.value.substring(11);v.value=N;k(m)}else if(null!=Q&&null!=
-J[v.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[Q.value].extension){m=b.getExtensionForService(J[v.value].mode);var t=S.value;null!=m&&0>f.indexOf(".")&&0>t.indexOf(".")&&(S.value=t+m)}K.innerHTML="";mxUtils.write(K,null!=F?F:mxResources.get("download"==v.value||"_blank"==v.value||null!=G?"ok":"save"));""==v.value?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")}var x=document.createElement("div");x.style.display="flex";x.style.flexWrap="wrap";x.style.whiteSpace=
-"nowrap";var z=document.createElement("div");z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoRows="auto auto 44px";z.style.gridAutoColumns="0fr minmax(0,1fr)";z.style.width="100%";var B=null,I=null;if(null!=p&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){z.style.display="inline-grid";z.style.flexBasis="75%";B=document.createElement("div");B.style.display="inline-block";B.style.height="auto";B.style.maxWidth="25%";B.style.margin="auto";var H=document.createElement("img"),
-C=u?p:btoa(unescape(encodeURIComponent(p))),R="data:"+q+";base64,"+C;H.setAttribute("src",R);H.style.boxSizing="border-box";H.style.maxHeight="50px";H.style.maxWidth="100%";H.style.paddingLeft="10px";B.appendChild(H);"image/png"!=q&&"image/svg+xml"!=q||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(I=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(R,null,null,q,mxUtils.bind(this,function(){"copy"==y?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
+J[v.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[Q.value].extension){m=b.getExtensionForService(J[v.value].mode);var t=S.value;null!=m&&0>f.indexOf(".")&&0>t.indexOf(".")&&(S.value=t+m)}K.innerHTML="";mxUtils.write(K,null!=F?F:mxResources.get("download"==v.value||"_blank"==v.value||null!=H?"ok":"save"));""==v.value?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")}var x=document.createElement("div");x.style.display="flex";x.style.flexWrap="wrap";x.style.whiteSpace=
+"nowrap";var A=document.createElement("div");A.style.display="grid";A.style.gap="5px 8px";A.style.gridAutoRows="auto auto 44px";A.style.gridAutoColumns="0fr minmax(0,1fr)";A.style.width="100%";var B=null,I=null;if(null!=p&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){A.style.display="inline-grid";A.style.flexBasis="75%";B=document.createElement("div");B.style.display="inline-block";B.style.height="auto";B.style.maxWidth="25%";B.style.margin="auto";var G=document.createElement("img"),
+C=u?p:btoa(unescape(encodeURIComponent(p))),R="data:"+q+";base64,"+C;G.setAttribute("src",R);G.style.boxSizing="border-box";G.style.maxHeight="50px";G.style.maxWidth="100%";G.style.paddingLeft="10px";B.appendChild(G);"image/png"!=q&&"image/svg+xml"!=q||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(I=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(R,null,null,q,mxUtils.bind(this,function(){"copy"==y?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
mxUtils.bind(this,function(m){b.handleError(m)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(B.setAttribute("title",mxResources.get("openInNewWindow")),B.style.cursor="pointer",mxEvent.addGestureListeners(B,null,null,function(m){mxEvent.isPopupTrigger(m)||b.openInNewWindow(p,q,u)})):B.setAttribute("title",mxResources.get("preview"))}C=document.createElement("div");C.style.display="flex";C.style.padding="1px";C.style.alignItems="center";C.style.justifyContent="flex-end";
-C.style.gridColumn="1";C.style.whiteSpace="nowrap";var U=document.createElement("div");U.style.display="grid";U.style.padding="1px";U.style.alignItems="center";U.style.gridColumn="2";U.style.gridAutoColumns="minmax(0,1fr) auto";U.style.gap="6px";mxUtils.write(C,mxResources.get("saveAs")+":");var S=document.createElement("input");S.setAttribute("type","text");S.setAttribute("value",f);S.style.boxSizing="border-box";S.style.width="100%";U.appendChild(S);null==G&&(z.appendChild(C),z.appendChild(U));
-var Q=null;null!=b.editor.diagramFileTypes&&null==q&&null==G&&(C=C.cloneNode(!1),U=U.cloneNode(!1),mxUtils.write(C,mxResources.get("type")+":"),Q=FilenameDialog.createFileTypes(b,S,b.editor.diagramFileTypes),Q.style.boxSizing="border-box",Q.style.width="100%",U.appendChild(Q),z.appendChild(C),z.appendChild(U));C=C.cloneNode(!1);U=U.cloneNode(!1);mxUtils.write(C,mxResources.get("where")+":");var v=document.createElement("select");v.style.textOverflow="ellipsis";v.style.gridColumn="1";var A=["browser",
-"device","download","_blank"],N=null,J={};H=mxUtils.button(mxResources.get("reset"),function(){S.value=f;S.dispatchEvent(new Event("change"));b.resetRecent("Folders");v.innerHTML="";v.value="";pickFolderOption=null;J={};l()},null,"geBtn");var K=mxUtils.button("",function(){SaveDialog.lastValue=v.value;var m=J[SaveDialog.lastValue];null!=m&&g(S,m.mode,m.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(S,"keypress",function(m){13==m.keyCode&&("copy"==y&&null!=I?I.click():K.click())});mxEvent.addListener(v,
-"change",n);l();U.appendChild(v);null!=SaveDialog.lastValue&&null!=J[SaveDialog.lastValue]&&(v.value=SaveDialog.lastValue);n();z.appendChild(C);z.appendChild(U);x.appendChild(z);null!=B&&x.appendChild(B);z=document.createElement("div");z.style.flexBasis="100%";z.style.textAlign="right";z.style.marginTop=null!=q?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||z.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
-null,"geBtn");b.editor.cancelFirst&&z.appendChild(B);z.appendChild(H);"copy"==y&&null!=I?(I.className="geBtn gePrimaryBtn",K.className="geBtn",z.appendChild(K),z.appendChild(I)):(null!=I&&z.appendChild(I),z.appendChild(K));b.editor.cancelFirst||z.appendChild(B);x.appendChild(z);this.init=function(){Editor.selectFilename(S)};this.container=x},CreateDialog=function(b,f,g,c,p,q,u,y,G,E,F,d,k,l,n,x,z){function B(v,A,N,J){function K(){mxEvent.addListener(m,"click",function(){var O=N;if(u){var P=C.value,
-T=P.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>T){O=null!=O?O:Q.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=T&&(P=P.substring(0,T));C.value=P+V}}I(N)})}var m=document.createElement("a");m.style.overflow="hidden";var t=document.createElement("img");
-t.src=v;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";m.style.display="inline-block";m.className="geBaseButton";m.style.position="relative";m.style.margin="4px";m.style.padding="8px 8px 10px 8px";m.style.whiteSpace="nowrap";m.appendChild(t);m.style.color="gray";m.style.fontSize="11px";var D=document.createElement("div");m.appendChild(D);mxUtils.write(D,A);if(null!=J&&null==b[J]){t.style.visibility="hidden";mxUtils.setOpacity(D,
-10);var M=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});M.spin(m);var L=window.setTimeout(function(){null==b[J]&&(M.stop(),m.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(L),mxUtils.setOpacity(D,100),t.style.visibility="",M.stop(),K())}))}else K();U.appendChild(m);++S==d&&(mxUtils.br(U),S=0)}function I(v){var A=C.value;
-if(null==v||null!=A&&0<A.length)z&&b.hideDialog(),g(A,v,C)}F="1"==urlParams.noDevice?!1:F;u=null!=u?u:!0;y=null!=y?y:!0;d=null!=d?d:4;z=null!=z?z:!0;q=document.createElement("div");q.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(q);var H=document.createElement("h2");mxUtils.write(H,p||mxResources.get("create"));H.style.marginTop="0px";H.style.marginBottom="24px";q.appendChild(H);p=document.createElement("span");mxUtils.write(p,mxResources.get("filename")+":");p.style.maxWidth="106px";p.style.overflow=
+C.style.gridColumn="1";C.style.whiteSpace="nowrap";var T=document.createElement("div");T.style.display="grid";T.style.padding="1px";T.style.alignItems="center";T.style.gridColumn="2";T.style.gridAutoColumns="minmax(0,1fr) auto";T.style.gap="6px";mxUtils.write(C,mxResources.get("saveAs")+":");var S=document.createElement("input");S.setAttribute("type","text");S.setAttribute("value",f);S.style.boxSizing="border-box";S.style.width="100%";T.appendChild(S);null==H&&(A.appendChild(C),A.appendChild(T));
+var Q=null;null!=b.editor.diagramFileTypes&&null==q&&null==H&&(C=C.cloneNode(!1),T=T.cloneNode(!1),mxUtils.write(C,mxResources.get("type")+":"),Q=FilenameDialog.createFileTypes(b,S,b.editor.diagramFileTypes),Q.style.boxSizing="border-box",Q.style.width="100%",T.appendChild(Q),A.appendChild(C),A.appendChild(T));C=C.cloneNode(!1);T=T.cloneNode(!1);mxUtils.write(C,mxResources.get("where")+":");var v=document.createElement("select");v.style.textOverflow="ellipsis";v.style.gridColumn="1";var z=["browser",
+"device","download","_blank"],N=null,J={};G=mxUtils.button(mxResources.get("reset"),function(){S.value=f;S.dispatchEvent(new Event("change"));b.resetRecent("Folders");v.innerHTML="";v.value="";pickFolderOption=null;J={};l()},null,"geBtn");var K=mxUtils.button("",function(){SaveDialog.lastValue=v.value;var m=J[SaveDialog.lastValue];null!=m&&g(S,m.mode,m.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(S,"keypress",function(m){13==m.keyCode&&("copy"==y&&null!=I?I.click():K.click())});mxEvent.addListener(v,
+"change",n);l();T.appendChild(v);null!=SaveDialog.lastValue&&null!=J[SaveDialog.lastValue]&&(v.value=SaveDialog.lastValue);n();A.appendChild(C);A.appendChild(T);x.appendChild(A);null!=B&&x.appendChild(B);A=document.createElement("div");A.style.flexBasis="100%";A.style.textAlign="right";A.style.marginTop=null!=q?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||A.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
+null,"geBtn");b.editor.cancelFirst&&A.appendChild(B);A.appendChild(G);"copy"==y&&null!=I?(I.className="geBtn gePrimaryBtn",K.className="geBtn",A.appendChild(K),A.appendChild(I)):(null!=I&&A.appendChild(I),A.appendChild(K));b.editor.cancelFirst||A.appendChild(B);x.appendChild(A);this.init=function(){Editor.selectFilename(S)};this.container=x},CreateDialog=function(b,f,g,c,p,q,u,y,H,E,F,d,k,l,n,x,A){function B(v,z,N,J){function K(){mxEvent.addListener(m,"click",function(){var O=N;if(u){var P=C.value,
+U=P.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>U){O=null!=O?O:Q.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=U&&(P=P.substring(0,U));C.value=P+V}}I(N)})}var m=document.createElement("a");m.style.overflow="hidden";var t=document.createElement("img");
+t.src=v;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";m.style.display="inline-block";m.className="geBaseButton";m.style.position="relative";m.style.margin="4px";m.style.padding="8px 8px 10px 8px";m.style.whiteSpace="nowrap";m.appendChild(t);m.style.color="gray";m.style.fontSize="11px";var D=document.createElement("div");m.appendChild(D);mxUtils.write(D,z);if(null!=J&&null==b[J]){t.style.visibility="hidden";mxUtils.setOpacity(D,
+10);var M=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});M.spin(m);var L=window.setTimeout(function(){null==b[J]&&(M.stop(),m.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(L),mxUtils.setOpacity(D,100),t.style.visibility="",M.stop(),K())}))}else K();T.appendChild(m);++S==d&&(mxUtils.br(T),S=0)}function I(v){var z=C.value;
+if(null==v||null!=z&&0<z.length)A&&b.hideDialog(),g(z,v,C)}F="1"==urlParams.noDevice?!1:F;u=null!=u?u:!0;y=null!=y?y:!0;d=null!=d?d:4;A=null!=A?A:!0;q=document.createElement("div");q.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(q);var G=document.createElement("h2");mxUtils.write(G,p||mxResources.get("create"));G.style.marginTop="0px";G.style.marginBottom="24px";q.appendChild(G);p=document.createElement("span");mxUtils.write(p,mxResources.get("filename")+":");p.style.maxWidth="106px";p.style.overflow=
"hidden";p.style.textOverflow="ellipsis";p.style.display="inline-block";q.appendChild(p);var C=document.createElement("input");C.setAttribute("value",f);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};q.appendChild(C);null!=x&&null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width="90px",q.appendChild(x));x=null;if("1"!=
urlParams.noDevice&&null!=k&&null!=l&&"image/"==l.substring(0,6)&&("image/svg"!=l.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";p=document.createElement("img");var R=n?k:btoa(unescape(encodeURIComponent(k)));p.setAttribute("src","data:"+l+";base64,"+R);p.style.position="absolute";p.style.top="70px";p.style.right="100px";p.style.maxWidth="120px";p.style.maxHeight="80px";mxUtils.setPrefixedStyle(p.style,"transform","translate(50%,-50%)");q.appendChild(p);mxClient.IS_FF||"image/png"!=l||null==
-navigator.clipboard||"function"!==typeof window.ClipboardItem||(x=mxUtils.button(mxResources.get("copy"),function(v){v=b.base64ToBlob(R,"image/png");v=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="data:'+l+";base64,"+R+'">'],{type:"text/html"})});navigator.clipboard.write([v]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(A){b.handleError(A)}))}),x.style.marginTop="6px",x.className="geBtn");G&&Editor.popupsAllowed&&
-(p.style.cursor="pointer",mxEvent.addGestureListeners(p,null,null,function(v){mxEvent.isPopupTrigger(v)||I("_blank")}))}mxUtils.br(q);var U=document.createElement("div");U.style.textAlign="center";var S=0;U.style.marginTop="6px";q.appendChild(U);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(k,mxResources.get("googleDrive")),
+navigator.clipboard||"function"!==typeof window.ClipboardItem||(x=mxUtils.button(mxResources.get("copy"),function(v){v=b.base64ToBlob(R,"image/png");v=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="data:'+l+";base64,"+R+'">'],{type:"text/html"})});navigator.clipboard.write([v]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(z){b.handleError(z)}))}),x.style.marginTop="6px",x.className="geBtn");H&&Editor.popupsAllowed&&
+(p.style.cursor="pointer",mxEvent.addGestureListeners(p,null,null,function(v){mxEvent.isPopupTrigger(v)||I("_blank")}))}mxUtils.br(q);var T=document.createElement("div");T.style.textAlign="center";var S=0;T.style.marginTop="6px";q.appendChild(T);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(k,mxResources.get("googleDrive")),
Q.appendChild(k),B(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(k,mxResources.get("oneDrive")),Q.appendChild(k),b.mode==App.MODE_ONEDRIVE&&k.setAttribute("selected","selected"),B(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(k=document.createElement("option"),
k.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(k,mxResources.get("dropbox")),Q.appendChild(k),b.mode==App.MODE_DROPBOX&&k.setAttribute("selected","selected"),B(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_GITHUB),mxUtils.write(k,mxResources.get("github")),Q.appendChild(k),B(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&
(k=document.createElement("option"),k.setAttribute("value",App.MODE_GITLAB),mxUtils.write(k,mxResources.get("gitlab")),Q.appendChild(k),B(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(k=document.createElement("option"),k.setAttribute("value",App.MODE_TRELLO),mxUtils.write(k,mxResources.get("trello")),Q.appendChild(k),B(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||
"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)k=document.createElement("option"),k.setAttribute("value",App.MODE_DEVICE),mxUtils.write(k,mxResources.get("device")),Q.appendChild(k),b.mode!=App.MODE_DEVICE&&y||k.setAttribute("selected","selected"),F&&B(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,
mxResources.get("browser")),Q.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),B(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=E&&(F=mxUtils.button(mxResources.get("help"),function(){b.openLink(E)}),F.className="geBtn",y.appendChild(F));F=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),
-window.close(),window.location.href=b.getUrl())});F.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(F);null==c&&(k=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),k.className="geBtn",y.appendChild(k));G&&Editor.popupsAllowed&&(G=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),G.className="geBtn",y.appendChild(G));CreateDialog.showDownloadButton&&(G=mxUtils.button(mxResources.get("download"),function(){I("download")}),G.className="geBtn",
-y.appendChild(G),null!=x&&(G.style.marginTop="6px",y.style.marginTop="6px"));null!=x&&(mxUtils.br(y),y.appendChild(x));b.editor.cancelFirst&&null==c||y.appendChild(F);mxEvent.addListener(C,"keypress",function(v){13==v.keyCode?I(App.MODE_DEVICE):27==v.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});q.appendChild(y);this.container=q};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+window.close(),window.location.href=b.getUrl())});F.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(F);null==c&&(k=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),k.className="geBtn",y.appendChild(k));H&&Editor.popupsAllowed&&(H=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),H.className="geBtn",y.appendChild(H));CreateDialog.showDownloadButton&&(H=mxUtils.button(mxResources.get("download"),function(){I("download")}),H.className="geBtn",
+y.appendChild(H),null!=x&&(H.style.marginTop="6px",y.style.marginTop="6px"));null!=x&&(mxUtils.br(y),y.appendChild(x));b.editor.cancelFirst&&null==c||y.appendChild(F);mxEvent.addListener(C,"keypress",function(v){13==v.keyCode?I(App.MODE_DEVICE):27==v.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});q.appendChild(y);this.container=q};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,f,g,c,p){p=null!=p?p:!0;var q=document.createElement("div");q.style.textAlign="center";q.style.height="100%";mxUtils.write(q,mxResources.get("fileOpenLocation"));mxUtils.br(q);mxUtils.br(q);var u=mxUtils.button(mxResources.get("openInThisWindow"),function(){p&&b.hideDialog();null!=c&&c()});u.className="geBtn";u.style.marginBottom="8px";u.style.width="280px";q.appendChild(u);mxUtils.br(q);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){p&&b.hideDialog();
-null!=g&&g();b.openLink(f,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=u.style.width;q.appendChild(y);mxUtils.br(q);mxUtils.br(q);mxUtils.write(q,mxResources.get("allowPopups"));this.container=q},ImageDialog=function(b,f,g,c,p,q,u,y){function G(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}q=null!=q?q:!0;var E=b.editor.graph,F=document.createElement("div");
+null!=g&&g();b.openLink(f,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=u.style.width;q.appendChild(y);mxUtils.br(q);mxUtils.br(q);mxUtils.write(q,mxResources.get("allowPopups"));this.container=q},ImageDialog=function(b,f,g,c,p,q,u,y){function H(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}q=null!=q?q:!0;var E=b.editor.graph,F=document.createElement("div");
mxUtils.write(F,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("value",g);d.setAttribute("type","text");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.marginTop=
"6px";d.style.width=(Graph.fileSupport?460:340)-20+"px";d.style.backgroundImage="url('"+Editor.crossImage+"')";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="100% 50%";d.style.paddingRight="14px";g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(g,"click",function(){d.value="";d.focus()});f.appendChild(d);f.appendChild(g);F.appendChild(f);var k=y,l,n,x=function(C,R,U,S){var Q="data:"==C.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(v){b.spinner.stop();b.hideDialog();var A=!1===S?1:null!=R&&null!=U?Math.max(R/v.width,U/v.height):Math.min(1,Math.min(520/v.width,520/v.height));q&&(C=b.convertDataUri(C));c(C,
-Math.round(Number(v.width)*A),Math.round(Number(v.height)*A),k,l,n)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(C,null,null,k,l,n)):(C=b.convertDataUri(C),R=null==R?120:R,U=null==U?100:U,b.hideDialog(),c(C,R,U,k,l,n))},z=function(C,R){if(null!=C){var U=p?null:E.getModel().getGeometry(E.getSelectionCell());null!=U?x(C,U.width,U.height,R):x(C,null,null,R)}else b.hideDialog(),c(null)};this.init=function(){d.focus();
-if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=F.parentNode,R=null;mxEvent.addListener(C,"dragleave",function(U){null!=R&&(R.parentNode.removeChild(R),R=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==R&&(R=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<U.dataTransfer.files.length)b.importFiles(U.dataTransfer.files,
-0,0,b.maxImageSize,function(Q,v,A,N,J,K,m,t){z(Q,t)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var v=0;v<Q.length;v++)Q[v]()},!mxEvent.isControlDown(U),null,null,!0);else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var S=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(S)&&z(decodeURIComponent(S))}U.stopPropagation();U.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign=
+"')";mxEvent.addListener(g,"click",function(){d.value="";d.focus()});f.appendChild(d);f.appendChild(g);F.appendChild(f);var k=y,l,n,x=function(C,R,T,S){var Q="data:"==C.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(v){b.spinner.stop();b.hideDialog();var z=!1===S?1:null!=R&&null!=T?Math.max(R/v.width,T/v.height):Math.min(1,Math.min(520/v.width,520/v.height));q&&(C=b.convertDataUri(C));c(C,
+Math.round(Number(v.width)*z),Math.round(Number(v.height)*z),k,l,n)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(C,null,null,k,l,n)):(C=b.convertDataUri(C),R=null==R?120:R,T=null==T?100:T,b.hideDialog(),c(C,R,T,k,l,n))},A=function(C,R){if(null!=C){var T=p?null:E.getModel().getGeometry(E.getSelectionCell());null!=T?x(C,T.width,T.height,R):x(C,null,null,R)}else b.hideDialog(),c(null)};this.init=function(){d.focus();
+if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=F.parentNode,R=null;mxEvent.addListener(C,"dragleave",function(T){null!=R&&(R.parentNode.removeChild(R),R=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(T){null==R&&(R=b.highlightElement(C));T.stopPropagation();T.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(T){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<T.dataTransfer.files.length)b.importFiles(T.dataTransfer.files,
+0,0,b.maxImageSize,function(Q,v,z,N,J,K,m,t){A(Q,t)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var v=0;v<Q.length;v++)Q[v]()},!mxEvent.isControlDown(T),null,null,!0);else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var S=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(S)&&A(decodeURIComponent(S))}T.stopPropagation();T.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign=
"center";g=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&y.appendChild(g);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(d.value=C.url));d.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type",
-"file");mxEvent.addListener(B,"change",function(C){null!=B.files&&(b.importFiles(B.files,0,0,b.maxImageSize,function(R,U,S,Q,v,A){z(R)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var U=0;U<R.length;U++)R[U]()},!0),B.type="",B.type="file",B.value="")});B.style.display="none";document.body.appendChild(B);b.imgDlgFileInputElt=B}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";y.appendChild(f)}mxEvent.addListener(d,
-"keypress",function(C){13==C.keyCode&&z(d.value)});var I=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,d.value,k,function(R,U,S){k=R;l=U;n=S});b.showDialog(C.container,300,390,!0,!0)});u&&(I.className="geBtn",y.appendChild(I));var H=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=d.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(d.value),R=new Image;R.onload=function(){b.editor.convertImageToDataUri(C,
-function(U){b.confirmImageResize(function(S){b.resizeImage(R,U,mxUtils.bind(this,function(Q,v,A){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(d.value=Q,G()):b.handleError({message:mxResources.get("imageTooBig")})}),S,b.maxImageSize)},R.width>b.maxImageSize||R.height>b.maxImageSize||U.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};R.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
-R.src=C}});H.className="geBtn";mxEvent.addListener(d,"change",function(C){k=null;G()});G();y.appendChild(H);u=mxUtils.button(mxResources.get("apply"),function(){z(d.value)});u.className="geBtn gePrimaryBtn";y.appendChild(u);b.editor.cancelFirst||y.appendChild(g);Graph.fileSupport&&(y.style.marginTop="120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",u=document.createElement("div"),u.style.position="absolute",
-u.style.width="420px",u.style.top="58%",u.style.textAlign="center",u.style.fontSize="18px",u.style.color="#a0c3ff",mxUtils.write(u,mxResources.get("dragImagesHere")),F.appendChild(u));F.appendChild(y);this.container=F},LinkDialog=function(b,f,g,c,p,q,u){function y(C,R){var U=document.createElement("option");mxUtils.write(U,mxResources.get(C));U.value=C;I.appendChild(U);H[C]=R}var G=document.createElement("div");G.style.height="100%";mxUtils.write(G,mxResources.get("editLink")+":");var E=document.createElement("div");
+"file");mxEvent.addListener(B,"change",function(C){null!=B.files&&(b.importFiles(B.files,0,0,b.maxImageSize,function(R,T,S,Q,v,z){A(R)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var T=0;T<R.length;T++)R[T]()},!0),B.type="",B.type="file",B.value="")});B.style.display="none";document.body.appendChild(B);b.imgDlgFileInputElt=B}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";y.appendChild(f)}mxEvent.addListener(d,
+"keypress",function(C){13==C.keyCode&&A(d.value)});var I=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,d.value,k,function(R,T,S){k=R;l=T;n=S});b.showDialog(C.container,300,390,!0,!0)});u&&(I.className="geBtn",y.appendChild(I));var G=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=d.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(d.value),R=new Image;R.onload=function(){b.editor.convertImageToDataUri(C,
+function(T){b.confirmImageResize(function(S){b.resizeImage(R,T,mxUtils.bind(this,function(Q,v,z){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(d.value=Q,H()):b.handleError({message:mxResources.get("imageTooBig")})}),S,b.maxImageSize)},R.width>b.maxImageSize||R.height>b.maxImageSize||T.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};R.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
+R.src=C}});G.className="geBtn";mxEvent.addListener(d,"change",function(C){k=null;H()});H();y.appendChild(G);u=mxUtils.button(mxResources.get("apply"),function(){A(d.value)});u.className="geBtn gePrimaryBtn";y.appendChild(u);b.editor.cancelFirst||y.appendChild(g);Graph.fileSupport&&(y.style.marginTop="120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",u=document.createElement("div"),u.style.position="absolute",
+u.style.width="420px",u.style.top="58%",u.style.textAlign="center",u.style.fontSize="18px",u.style.color="#a0c3ff",mxUtils.write(u,mxResources.get("dragImagesHere")),F.appendChild(u));F.appendChild(y);this.container=F},LinkDialog=function(b,f,g,c,p,q,u){function y(C,R){var T=document.createElement("option");mxUtils.write(T,mxResources.get(C));T.value=C;I.appendChild(T);G[C]=R}var H=document.createElement("div");H.style.height="100%";mxUtils.write(H,mxResources.get("editLink")+":");var E=document.createElement("div");
E.className="geUrlLinkContainer";E.style.backgroundColor="transparent";E.style.borderColor="transparent";E.style.whiteSpace="nowrap";E.style.textOverflow="clip";E.style.cursor="default";var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("dragUrlsHere"));F.setAttribute("type","text");F.style.marginTop="6px";F.style.width="414px";F.style.boxSizing="border-box";F.style.backgroundRepeat="no-repeat";F.style.backgroundPosition="100% 50%";F.style.paddingRight="16px";F.style.marginBottom=
"4px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.backgroundImage="url("+Editor.crossImage+")";d.className="geAdaptiveAsset";d.style.display="inline-block";d.style.position="relative";d.style.top="3px";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";mxEvent.addListener(d,"click",function(){F.value="";F.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value",
"url");k.setAttribute("type","radio");k.setAttribute("name","geLinkDialogOption");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="414px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=u&&(x.setAttribute("checked","checked"),x.defaultChecked=
!0);u=null!=u?u:"_blank";x.setAttribute("title",u);q&&(F.style.width="200px");if(p&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(F.setAttribute("value",f),k.setAttribute("checked","checked"),k.defaultChecked=!0);E.appendChild(k);E.appendChild(F);E.appendChild(d);q&&(E.appendChild(x),mxUtils.write(E,mxResources.get("openInNewWindow")));mxUtils.br(E);E.appendChild(l);p=!1;for(q=0;q<b.pages.length;q++)d=document.createElement("option"),mxUtils.write(d,
-b.pages[q].getName()||mxResources.get("pageWithNumber",[q+1])),d.setAttribute("value","data:page/id,"+b.pages[q].getId()),f==d.getAttribute("value")&&(d.setAttribute("selected","selected"),p=!0),n.appendChild(d);if(!p&&l.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");n.appendChild(z);mxEvent.addListener(n,"change",function(){null==z.parentNode||
-z.selected||z.parentNode.removeChild(z)})}E.appendChild(n)}else F.setAttribute("value",f),E.appendChild(F),E.appendChild(d);G.appendChild(E);var B=mxUtils.button(g,function(){b.hideDialog();c(l.checked?"pageNotFound"!==n.value?n.value:f:F.value,LinkDialog.selectedDocs,x.checked?u:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?n.focus():(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",
-!1,null));mxEvent.addListener(n,"focus",function(){k.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(F,"focus",function(){l.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var C=G.parentNode,R=null;mxEvent.addListener(C,"dragleave",function(U){null!=R&&(R.parentNode.removeChild(R),R=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==
-R&&(R=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){try{null!=R&&(R.parentNode.removeChild(R),R=null),0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(U.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,B.click())}catch(S){b.handleError(S)}U.stopPropagation();U.preventDefault()}),!1)}};g=document.createElement("div");g.style.marginTop="16px";g.style.textAlign=
+b.pages[q].getName()||mxResources.get("pageWithNumber",[q+1])),d.setAttribute("value","data:page/id,"+b.pages[q].getId()),f==d.getAttribute("value")&&(d.setAttribute("selected","selected"),p=!0),n.appendChild(d);if(!p&&l.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");n.appendChild(A);mxEvent.addListener(n,"change",function(){null==A.parentNode||
+A.selected||A.parentNode.removeChild(A)})}E.appendChild(n)}else F.setAttribute("value",f),E.appendChild(F),E.appendChild(d);H.appendChild(E);var B=mxUtils.button(g,function(){b.hideDialog();c(l.checked?"pageNotFound"!==n.value?n.value:f:F.value,LinkDialog.selectedDocs,x.checked?u:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?n.focus():(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",
+!1,null));mxEvent.addListener(n,"focus",function(){k.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(F,"focus",function(){l.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var C=H.parentNode,R=null;mxEvent.addListener(C,"dragleave",function(T){null!=R&&(R.parentNode.removeChild(R),R=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(T){null==
+R&&(R=b.highlightElement(C));T.stopPropagation();T.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(T){try{null!=R&&(R.parentNode.removeChild(R),R=null),0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(T.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,B.click())}catch(S){b.handleError(S)}T.stopPropagation();T.preventDefault()}),!1)}};g=document.createElement("div");g.style.marginTop="16px";g.style.textAlign=
"right";b.isOffline()||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.style.verticalAlign="middle";E.className="geBtn";b.editor.cancelFirst&&g.appendChild(E);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;var R=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==
-C.docs[0].mimeType.substring(0,23)?R="https://app.diagrams.net/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(R="https://drive.google.com/#folders/"+C.docs[0].id);F.value=R;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var H={};p=document.createElement("option");mxUtils.write(p,mxResources.get("select")+"...");p.value="";I.appendChild(p);
+C.docs[0].mimeType.substring(0,23)?R="https://app.diagrams.net/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(R="https://drive.google.com/#folders/"+C.docs[0].id);F.value=R;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var G={};p=document.createElement("option");mxUtils.write(p,mxResources.get("select")+"...");p.value="";I.appendChild(p);
"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(R){LinkDialog.filePicked(R)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y("dropbox",function(){Dropbox.choose({linkType:"direct",
-cancel:function(){},success:function(C){F.value=C[0].link;F.focus()}})});null!=b.oneDrive&&y("oneDrive",function(){b.oneDrive.pickFile(function(C,R){null!=R&&null!=R.value&&0<R.value.length&&(F.value=R.value[0].webUrl,F.focus())},!0)});null!=b.gitHub&&y("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var R=C[0],U=C[1],S=C[2];C=C.slice(3,C.length).join("/");F.value="https://github.com/"+R+"/"+U+"/blob/"+S+"/"+C;F.focus()}})});null!=b.gitLab&&y("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=
-C){C=C.split("/");var R=C[0],U=C[1],S=C[2];C=C.slice(3,C.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+R+"/"+U+"/blob/"+S+"/"+C;F.focus()}})});1<I.children.length&&(g.appendChild(I),mxEvent.addListener(I,"change",function(C){null!=H[I.value]&&(H[I.value](),I.value="")}));mxEvent.addListener(F,"keypress",function(C){13==C.keyCode&&B.click()});g.appendChild(B);b.editor.cancelFirst||g.appendChild(E);G.appendChild(g);this.container=G},RevisionDialog=function(b,f,g){var c=document.createElement("div"),
+cancel:function(){},success:function(C){F.value=C[0].link;F.focus()}})});null!=b.oneDrive&&y("oneDrive",function(){b.oneDrive.pickFile(function(C,R){null!=R&&null!=R.value&&0<R.value.length&&(F.value=R.value[0].webUrl,F.focus())},!0)});null!=b.gitHub&&y("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var R=C[0],T=C[1],S=C[2];C=C.slice(3,C.length).join("/");F.value="https://github.com/"+R+"/"+T+"/blob/"+S+"/"+C;F.focus()}})});null!=b.gitLab&&y("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=
+C){C=C.split("/");var R=C[0],T=C[1],S=C[2];C=C.slice(3,C.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+R+"/"+T+"/blob/"+S+"/"+C;F.focus()}})});1<I.children.length&&(g.appendChild(I),mxEvent.addListener(I,"change",function(C){null!=G[I.value]&&(G[I.value](),I.value="")}));mxEvent.addListener(F,"keypress",function(C){13==C.keyCode&&B.click()});g.appendChild(B);b.editor.cancelFirst||g.appendChild(E);H.appendChild(g);this.container=H},RevisionDialog=function(b,f,g){var c=document.createElement("div"),
p=document.createElement("h3");p.style.marginTop="3px";mxUtils.write(p,mxResources.get("revisionHistory"));c.appendChild(p);p=document.createElement("div");p.style.position="absolute";p.style.overflow="auto";p.style.width="170px";p.style.height="378px";c.appendChild(p);var q=document.createElement("div");q.style.position="absolute";q.style.left="200px";q.style.width="470px";q.style.height="376px";q.style.overflow="hidden";q.style.borderWidth="1px";q.style.borderStyle="solid";var u=document.createElement("div");
u.style.position="absolute";u.style.display="none";u.style.textAlign="center";u.style.padding="8px";u.style.borderRadius="8px";u.style.left="50%";u.style.top="50%";u.style.whiteSpace="nowrap";u.style.transform="translate(-50%, -50%)";u.style.background="inherit";u.style.border="1px solid";q.appendChild(u);mxEvent.disableContextMenu(q);c.appendChild(q);var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=
-null;y.maxFitScale=null;y.centerZoom=!0;var G=0,E=null,F=0,d=y.getGlobalVariable;y.getGlobalVariable=function(Y){return"page"==Y&&null!=E&&null!=E[F]?E[F].getAttribute("name"):"pagenumber"==Y?F+1:"pagecount"==Y?null!=E?E.length:1:d.apply(this,arguments)};y.getLinkForCell=function(){return null};for(var k=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
-left:"50%"}),l=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),x={},z=0;z<n.length;z++)x[n[z].getAttribute("id")]=n[z];var B=null,I=null,H=null,C=null,R=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=H&&y.zoomIn()},20);R.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=H&&y.zoomOut()},20);U.setAttribute("disabled","disabled");var S=b.createToolbarButton(Editor.zoomFitImage,
-mxResources.get("fit"),function(){null!=H&&(1==y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual(),y.center())},20);S.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));Q.setAttribute("disabled","disabled");var v=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));v.setAttribute("disabled","disabled");var A=q.cloneNode(!1);A.style.pointerEvent="none";q.parentNode.appendChild(A);var N=new Graph(A);N.setTooltips(!1);N.setEnabled(!1);
+null;y.maxFitScale=null;y.centerZoom=!0;var H=0,E=null,F=0,d=y.getGlobalVariable;y.getGlobalVariable=function(Y){return"page"==Y&&null!=E&&null!=E[F]?E[F].getAttribute("name"):"pagenumber"==Y?F+1:"pagecount"==Y?null!=E?E.length:1:d.apply(this,arguments)};y.getLinkForCell=function(){return null};for(var k=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
+left:"50%"}),l=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),x={},A=0;A<n.length;A++)x[n[A].getAttribute("id")]=n[A];var B=null,I=null,G=null,C=null,R=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=G&&y.zoomIn()},20);R.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=G&&y.zoomOut()},20);T.setAttribute("disabled","disabled");var S=b.createToolbarButton(Editor.zoomFitImage,
+mxResources.get("fit"),function(){null!=G&&(1==y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual(),y.center())},20);S.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));Q.setAttribute("disabled","disabled");var v=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));v.setAttribute("disabled","disabled");var z=q.cloneNode(!1);z.style.pointerEvent="none";q.parentNode.appendChild(z);var N=new Graph(z);N.setTooltips(!1);N.setEnabled(!1);
N.setPanning(!0);N.panningHandler.ignoreCell=!0;N.panningHandler.useLeftButtonForPanning=!0;N.minFitScale=null;N.maxFitScale=null;N.centerZoom=!0;var J=document.createElement("div");J.style.textAlign="left";J.style.color="gray";J.style.backgroundColor="transparent";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.style.whiteSpace="nowrap";J.style.cursor="default";J.style.height="100%";J.style.display="inline-flex";J.style.alignItems="center";J.style.flexGrow="1";mxEvent.addListener(J,"click",
-function(){var Y=mxUtils.getTextContent(J);""!=Y&&b.alert(Y)});var K=null;mxEvent.addGestureListeners(Q,function(Y){try{var Z=null!=E[G]?x[E[G].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);u.innerText="";if(null==Z)u.style.display="inline-block",mxUtils.write(u,mxResources.get("pageNotFound"));else{K=J.innerHTML;J.innerHTML=mxResources.get("current");q.style.display="none";A.style.display="";A.style.backgroundColor=q.style.backgroundColor;var aa=Editor.parseDiagramNode(Z);(new mxCodec(aa.ownerDocument)).decode(aa,
+function(){var Y=mxUtils.getTextContent(J);""!=Y&&b.alert(Y)});var K=null;mxEvent.addGestureListeners(Q,function(Y){try{var Z=null!=E[H]?x[E[H].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);u.innerText="";if(null==Z)u.style.display="inline-block",mxUtils.write(u,mxResources.get("pageNotFound"));else{K=J.innerHTML;J.innerHTML=mxResources.get("current");q.style.display="none";z.style.display="";z.style.backgroundColor=q.style.backgroundColor;var aa=Editor.parseDiagramNode(Z);(new mxCodec(aa.ownerDocument)).decode(aa,
N.getModel());N.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y);N.mathEnabled="1"==aa.getAttribute("math");N.setAdaptiveColors(aa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&N.mathEnabled&&Editor.MathJaxRender(N.container)}}catch(fa){u.style.display="inline-block",u.innerText="",mxUtils.write(u,mxResources.get("pageNotFound")+": "+fa.message)}},null,function(){mxUtils.setOpacity(Q,60);u.style.display="none";u.innerText="";"none"==q.style.display&&(q.style.display=
-"",J.innerHTML=K,A.style.display="none")});mxEvent.addListener(v,"click",mxUtils.bind(this,function(Y){if(null!=H){Y=b.getPagesForNode(H.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(aa){try{if(0<aa.length&&b.editor.graph.isEnabled()){var fa=[JSON.parse(aa)];b.confirm(mxResources.get("areYouSure"),function(){try{l.patch(fa,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
-null,null,null,null,function(aa,fa){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),ca=document.createElement("option");mxUtils.write(ca,mxResources.get("allPages"));ca.setAttribute("value","allPages");ea.appendChild(ca);for(var ia in Z[EditorUi.DIFF_UPDATE]){ca=document.createElement("option");var ka=b.getPageById(ia);null!=ka&&(mxUtils.write(ca,ka.getName()),ca.setAttribute("value","page-"+ia),ea.appendChild(ca))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,
-"change",function(ba){ba=null;if("allPages"!=ea.value){var ha=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][ha]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][ha]=Z[EditorUi.DIFF_UPDATE][ha])}fa.value=JSON.stringify(null==ba?Z:ba,null,2)});2<ea.children.length&&aa.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var m=mxUtils.button(mxResources.get("restore"),function(Y){null!=H&&null!=C&&
+"",J.innerHTML=K,z.style.display="none")});mxEvent.addListener(v,"click",mxUtils.bind(this,function(Y){if(null!=G){Y=b.getPagesForNode(G.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(aa){try{if(0<aa.length&&b.editor.graph.isEnabled()){var fa=[JSON.parse(aa)];b.confirm(mxResources.get("areYouSure"),function(){try{l.patch(fa,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
+null,null,null,null,function(aa,fa){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),ca=document.createElement("option");mxUtils.write(ca,mxResources.get("allPages"));ca.setAttribute("value","allPages");ea.appendChild(ca);for(var ha in Z[EditorUi.DIFF_UPDATE]){ca=document.createElement("option");var ka=b.getPageById(ha);null!=ka&&(mxUtils.write(ca,ka.getName()),ca.setAttribute("value","page-"+ha),ea.appendChild(ca))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,
+"change",function(ba){ba=null;if("allPages"!=ea.value){var ia=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][ia]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][ia]=Z[EditorUi.DIFF_UPDATE][ia])}fa.value=JSON.stringify(null==ba?Z:ba,null,2)});2<ea.children.length&&aa.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var m=mxUtils.button(mxResources.get("restore"),function(Y){null!=G&&null!=C&&
b.confirm(mxResources.get("areYouSure"),function(){null!=g?g(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(m.setAttribute("disabled","disabled"),l.save(!0,function(Z){b.spinner.stop();m.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();m.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");var t=document.createElement("select");
-t.setAttribute("disabled","disabled");t.style.userSelect="none";t.style.maxWidth="100px";t.style.marginLeft="10px";t.style.display="none";var D=null;mxEvent.addListener(t,"change",function(Y){null!=D&&(D(Y),mxEvent.consume(Y))});var M=mxUtils.button(mxResources.get("open"),function(){null!=H&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(H.documentElement)),b.openLink(b.getUrl(),null,!0))});M.className="geBtn";M.setAttribute("disabled","disabled");
+t.setAttribute("disabled","disabled");t.style.userSelect="none";t.style.maxWidth="100px";t.style.marginLeft="10px";t.style.display="none";var D=null;mxEvent.addListener(t,"change",function(Y){null!=D&&(D(Y),mxEvent.consume(Y))});var M=mxUtils.button(mxResources.get("open"),function(){null!=G&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(G.documentElement)),b.openLink(b.getUrl(),null,!0))});M.className="geBtn";M.setAttribute("disabled","disabled");
var L=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});L.className="geBtn";L.setAttribute("disabled","disabled");null!=g&&(M.style.display="none");n=document.createElement("div");n.style.position="absolute";n.style.top="482px";n.style.right="28px";n.style.left="32px";n.style.justifyContent="end";n.style.display="flex";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.left="32px";O.style.right=
-"32px";O.style.border="none";O.style.top="442px";var P=null;if(null!=f&&0<f.length){q.style.cursor="move";var T=document.createElement("table");T.style.borderWidth="1px";T.style.borderStyle="solid";T.style.borderCollapse="collapse";T.style.borderSpacing="0px";T.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(G=mxUtils.indexOf(b.pages,b.currentPage));for(z=f.length-1;0<=z;z--){var W=function(Y){var Z=new Date(Y.modifiedDate),
-aa=null;if(0<=Z.getTime()){var fa=function(ca){k.stop();u.innerText="";var ia=mxUtils.parseXml(ca),ka=b.editor.extractGraphModel(ia.documentElement,!0);if(null!=ka){var ba=function(ra){null!=ra&&(ra=ha(Editor.parseDiagramNode(ra)));return ra},ha=function(ra){var wa=ra.getAttribute("background");if(null==wa||""==wa||wa==mxConstants.NONE)wa=y.defaultPageBackgroundColor;q.style.backgroundColor=mxUtils.getLightDarkColor(wa);(new mxCodec(ra.ownerDocument)).decode(ra,y.getModel());y.maxFitScale=1;y.fit(8);
-y.center();y.mathEnabled="1"==ra.getAttribute("math");y.setAdaptiveColors(ra.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container);return ra};t.style.display="none";t.innerText="";H=ia;C=ca;E=parseSelectFunction=null;F=0;if("mxfile"==ka.nodeName){ia=ka.getElementsByTagName("diagram");E=[];for(ca=0;ca<ia.length;ca++)E.push(ia[ca]);F=Math.min(G,E.length-1);0<E.length&&ba(E[F]);if(1<E.length)for(t.removeAttribute("disabled"),t.style.display="",ca=0;ca<
-E.length;ca++){ia=document.createElement("option");ia.setAttribute("title",ma+" ("+E[ca].getAttribute("id")+")");ia.setAttribute("value",ca);var ma=E[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ka=b.getPageById(E[ca].getAttribute("id"));var da="";if(null!=ka){var va=new DiagramPage(E[ca]);b.getHashValueForPages([ka])!=b.getHashValueForPages([va])&&(da=" (M)")}else da=" (X)";mxUtils.write(ia,ma+da);ca==F&&ia.setAttribute("selected","selected");t.appendChild(ia)}D=function(){try{var ra=
-parseInt(t.value);F=G=ra;ba(E[ra])}catch(wa){t.value=G,b.handleError(wa)}}}else ha(ka);ma=Y.lastModifyingUserName;null!=ma&&20<ma.length&&(ma=ma.substring(0,20)+"...");J.innerText="";mxUtils.write(J,(null!=ma?ma+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());J.setAttribute("title",aa.getAttribute("title"));R.removeAttribute("disabled");U.removeAttribute("disabled");S.removeAttribute("disabled");Q.removeAttribute("disabled");v.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&
-m.removeAttribute("disabled"),M.removeAttribute("disabled"),L.removeAttribute("disabled"));mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(S,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(v,60)}else t.style.display="none",t.innerText="",J.innerText="",u.innerText="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(u,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize=
+"32px";O.style.border="none";O.style.top="442px";var P=null;if(null!=f&&0<f.length){q.style.cursor="move";var U=document.createElement("table");U.style.borderWidth="1px";U.style.borderStyle="solid";U.style.borderCollapse="collapse";U.style.borderSpacing="0px";U.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(H=mxUtils.indexOf(b.pages,b.currentPage));for(A=f.length-1;0<=A;A--){var W=function(Y){var Z=new Date(Y.modifiedDate),
+aa=null;if(0<=Z.getTime()){var fa=function(ca){k.stop();u.innerText="";var ha=mxUtils.parseXml(ca),ka=b.editor.extractGraphModel(ha.documentElement,!0);if(null!=ka){var ba=function(pa){null!=pa&&(pa=ia(Editor.parseDiagramNode(pa)));return pa},ia=function(pa){var sa=pa.getAttribute("background");if(null==sa||""==sa||sa==mxConstants.NONE)sa=y.defaultPageBackgroundColor;q.style.backgroundColor=mxUtils.getLightDarkColor(sa);(new mxCodec(pa.ownerDocument)).decode(pa,y.getModel());y.maxFitScale=1;y.fit(8);
+y.center();y.mathEnabled="1"==pa.getAttribute("math");y.setAdaptiveColors(pa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container);return pa};t.style.display="none";t.innerText="";G=ha;C=ca;E=parseSelectFunction=null;F=0;if("mxfile"==ka.nodeName){ha=ka.getElementsByTagName("diagram");E=[];for(ca=0;ca<ha.length;ca++)E.push(ha[ca]);F=Math.min(H,E.length-1);0<E.length&&ba(E[F]);if(1<E.length)for(t.removeAttribute("disabled"),t.style.display="",ca=0;ca<
+E.length;ca++){ha=document.createElement("option");ha.setAttribute("title",la+" ("+E[ca].getAttribute("id")+")");ha.setAttribute("value",ca);var la=E[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ka=b.getPageById(E[ca].getAttribute("id"));var da="";if(null!=ka){var ra=new DiagramPage(E[ca]);b.getHashValueForPages([ka])!=b.getHashValueForPages([ra])&&(da=" (M)")}else da=" (X)";mxUtils.write(ha,la+da);ca==F&&ha.setAttribute("selected","selected");t.appendChild(ha)}D=function(){try{var pa=
+parseInt(t.value);F=H=pa;ba(E[pa])}catch(sa){t.value=H,b.handleError(sa)}}}else ia(ka);la=Y.lastModifyingUserName;null!=la&&20<la.length&&(la=la.substring(0,20)+"...");J.innerText="";mxUtils.write(J,(null!=la?la+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());J.setAttribute("title",aa.getAttribute("title"));R.removeAttribute("disabled");T.removeAttribute("disabled");S.removeAttribute("disabled");Q.removeAttribute("disabled");v.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&
+m.removeAttribute("disabled"),M.removeAttribute("disabled"),L.removeAttribute("disabled"));mxUtils.setOpacity(R,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(S,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(v,60)}else t.style.display="none",t.innerText="",J.innerText="",u.innerText="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(u,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize=
"12px";aa.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";Y==f[f.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===X?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());aa.appendChild(ea);aa.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=Y.fileSize?" "+b.formatFileSize(parseInt(Y.fileSize)):"")+(null!=Y.lastModifyingUserName?
-" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(ca){I!=Y&&(k.stop(),null!=B&&(B.style.backgroundColor=""),I=Y,B=aa,B.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=H=null,J.removeAttribute("title"),J.innerText=mxResources.get("loading")+"...",q.style.backgroundColor=y.defaultPageBackgroundColor,u.innerText="",y.getModel().clear(),m.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),S.setAttribute("disabled",
-"disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(S,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(v,20),k.spin(q),Y.getXml(function(ia){if(I==Y)try{fa(ia)}catch(ka){J.innerText=mxResources.get("error")+": "+ka.message}},function(ia){k.stop();t.style.display="none";t.innerText="";J.innerText="";mxUtils.write(J,mxResources.get("errorLoadingFile"));
-mxUtils.write(u,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(aa,"dblclick",function(ca){M.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(aa)}return aa}(f[z]);null!=W&&z==f.length-1&&(P=W)}T.appendChild(V);p.appendChild(T)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(q.style.display="none",
-O.style.display="none",mxUtils.write(p,mxResources.get("notAvailable"))):(q.style.display="none",O.style.display="none",mxUtils.write(p,mxResources.get("noRevisions")));this.init=function(){null!=P&&P.click()};p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";O.appendChild(J);O.appendChild(Q);O.appendChild(U);O.appendChild(S);O.appendChild(R);O.appendChild(t);O.appendChild(v);b.editor.cancelFirst&&n.appendChild(p);n.appendChild(M);null!=l&&l.constructor==DriveFile&&
-n.appendChild(L);n.appendChild(m);b.editor.cancelFirst||n.appendChild(p);c.appendChild(n);c.appendChild(O);this.container=c},DraftDialog=function(b,f,g,c,p,q,u,y,G){var E=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,f);E.appendChild(F);var d=document.createElement("select"),k=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,k(),b.confirm(mxResources.get("areYouSure"),
-null,mxUtils.bind(this,function(){var Q=this,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){for(v=0;v<G.length;v++)p.apply(Q,[v,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);A.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(I=mxUtils.parseXml(G[d.value].data),H=b.editor.extractGraphModel(I.documentElement,!0),C=0,this.init())});if(null!=G){d.style.marginLeft="4px";for(f=0;f<G.length;f++){var l=document.createElement("option");l.setAttribute("value",f);var n=new Date(G[f].created),
-x=new Date(G[f].modified);mxUtils.write(l,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());d.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));d.appendChild(l);F.appendChild(d);mxEvent.addListener(d,"change",k)}null==g&&(g=G[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";
-z.style.marginTop="10px";z.style.left="40px";z.style.right="40px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);E.appendChild(z);var B=new Graph(z);B.setEnabled(!1);B.setPanning(!0);B.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var I=mxUtils.parseXml(g),H=b.editor.extractGraphModel(I.documentElement,!0),C=0,R=null,
-U=B.getGlobalVariable;B.getGlobalVariable=function(Q){return"page"==Q&&null!=R&&null!=R[C]?R[C].getAttribute("name"):"pagenumber"==Q?C+1:"pagecount"==Q?null!=R?R.length:1:U.apply(this,arguments)};B.getLinkForCell=function(){return null};g=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);F=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
+" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(ca){I!=Y&&(k.stop(),null!=B&&(B.style.backgroundColor=""),I=Y,B=aa,B.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=G=null,J.removeAttribute("title"),J.innerText=mxResources.get("loading")+"...",q.style.backgroundColor=y.defaultPageBackgroundColor,u.innerText="",y.getModel().clear(),m.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),S.setAttribute("disabled",
+"disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),mxUtils.setOpacity(R,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(S,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(v,20),k.spin(q),Y.getXml(function(ha){if(I==Y)try{fa(ha)}catch(ka){J.innerText=mxResources.get("error")+": "+ka.message}},function(ha){k.stop();t.style.display="none";t.innerText="";J.innerText="";mxUtils.write(J,mxResources.get("errorLoadingFile"));
+mxUtils.write(u,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(aa,"dblclick",function(ca){M.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(aa)}return aa}(f[A]);null!=W&&A==f.length-1&&(P=W)}U.appendChild(V);p.appendChild(U)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(q.style.display="none",
+O.style.display="none",mxUtils.write(p,mxResources.get("notAvailable"))):(q.style.display="none",O.style.display="none",mxUtils.write(p,mxResources.get("noRevisions")));this.init=function(){null!=P&&P.click()};p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";O.appendChild(J);O.appendChild(Q);O.appendChild(T);O.appendChild(S);O.appendChild(R);O.appendChild(t);O.appendChild(v);b.editor.cancelFirst&&n.appendChild(p);n.appendChild(M);null!=l&&l.constructor==DriveFile&&
+n.appendChild(L);n.appendChild(m);b.editor.cancelFirst||n.appendChild(p);c.appendChild(n);c.appendChild(O);this.container=c},DraftDialog=function(b,f,g,c,p,q,u,y,H){var E=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,f);E.appendChild(F);var d=document.createElement("select"),k=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,k(),b.confirm(mxResources.get("areYouSure"),
+null,mxUtils.bind(this,function(){var Q=this,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){for(v=0;v<H.length;v++)p.apply(Q,[v,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);z.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(I=mxUtils.parseXml(H[d.value].data),G=b.editor.extractGraphModel(I.documentElement,!0),C=0,this.init())});if(null!=H){d.style.marginLeft="4px";for(f=0;f<H.length;f++){var l=document.createElement("option");l.setAttribute("value",f);var n=new Date(H[f].created),
+x=new Date(H[f].modified);mxUtils.write(l,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());d.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));d.appendChild(l);F.appendChild(d);mxEvent.addListener(d,"change",k)}null==g&&(g=H[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";
+A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);E.appendChild(A);var B=new Graph(A);B.setEnabled(!1);B.setPanning(!0);B.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var I=mxUtils.parseXml(g),G=b.editor.extractGraphModel(I.documentElement,!0),C=0,R=null,
+T=B.getGlobalVariable;B.getGlobalVariable=function(Q){return"page"==Q&&null!=R&&null!=R[C]?R[C].getAttribute("name"):"pagenumber"==Q?C+1:"pagecount"==Q?null!=R?R.length:1:T.apply(this,arguments)};B.getLinkForCell=function(){return null};g=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);F=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
B.view.scale?(B.maxFitScale=8,B.fit(8)):B.zoomActual();B.center()},20);u=mxUtils.button(u||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){p.apply(Q,[d.value,mxUtils.bind(Q,function(){null!=d.parentNode&&(d.options[d.selectedIndex].parentNode.removeChild(d.options[d.selectedIndex]),1<d.options.length?(d.value=d.options[0].value,k()):b.hideDialog(!0))})]);v.jumpToEnd()})}),
mxResources.get("no"),mxResources.get("yes"))});u.className="geBtn";var S=document.createElement("select");S.style.maxWidth="80px";S.style.position="relative";S.style.top="-2px";S.style.verticalAlign="bottom";S.style.marginRight="6px";S.style.display="none";q=mxUtils.button(q||mxResources.get("edit"),function(){c.apply(this,[d.value])});q.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.right="40px";l.style.textAlign="right";
-n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function Q(J){if(null!=J){var K=J.getAttribute("background");if(null==K||""==K||K==mxConstants.NONE)K="light-dark(#ffffff, transparent)";z.style.backgroundColor=K;(new mxCodec(J.ownerDocument)).decode(J,B.getModel());B.maxFitScale=1;B.fit(8);B.center()}return J}function v(J){null!=J&&(J=
-Q(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(S,"change",function(J){C=parseInt(S.value);v(R[C]);mxEvent.consume(J)});if("mxfile"==H.nodeName){var A=H.getElementsByTagName("diagram");R=[];for(var N=0;N<A.length;N++)R.push(A[N]);0<R.length&&v(R[C]);S.innerText="";if(1<R.length)for(S.style.display="",N=0;N<R.length;N++)A=document.createElement("option"),mxUtils.write(A,R[N].getAttribute("name")||mxResources.get("pageWithNumber",[N+1])),A.setAttribute("value",N),N==C&&A.setAttribute("selected",
-"selected"),S.appendChild(A);else S.style.display="none"}else Q(H)};n.appendChild(S);n.appendChild(g);n.appendChild(F);n.appendChild(f);g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(l.appendChild(g),null!=y&&l.appendChild(y),l.appendChild(u),l.appendChild(q)):(l.appendChild(q),l.appendChild(u),null!=y&&l.appendChild(y),l.appendChild(g));E.appendChild(l);
+n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function Q(J){if(null!=J){var K=J.getAttribute("background");if(null==K||""==K||K==mxConstants.NONE)K="light-dark(#ffffff, transparent)";A.style.backgroundColor=K;(new mxCodec(J.ownerDocument)).decode(J,B.getModel());B.maxFitScale=1;B.fit(8);B.center()}return J}function v(J){null!=J&&(J=
+Q(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(S,"change",function(J){C=parseInt(S.value);v(R[C]);mxEvent.consume(J)});if("mxfile"==G.nodeName){var z=G.getElementsByTagName("diagram");R=[];for(var N=0;N<z.length;N++)R.push(z[N]);0<R.length&&v(R[C]);S.innerText="";if(1<R.length)for(S.style.display="",N=0;N<R.length;N++)z=document.createElement("option"),mxUtils.write(z,R[N].getAttribute("name")||mxResources.get("pageWithNumber",[N+1])),z.setAttribute("value",N),N==C&&z.setAttribute("selected",
+"selected"),S.appendChild(z);else S.style.display="none"}else Q(G)};n.appendChild(S);n.appendChild(g);n.appendChild(F);n.appendChild(f);g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(l.appendChild(g),null!=y&&l.appendChild(y),l.appendChild(u),l.appendChild(q)):(l.appendChild(q),l.appendChild(u),null!=y&&l.appendChild(y),l.appendChild(g));E.appendChild(l);
E.appendChild(n);this.container=E},FindWindow=function(b,f,g,c,p,q){function u(D,M,L){if("object"===typeof M.value&&null!=M.value.attributes){M=M.value.attributes;for(var O=0;O<M.length;O++)if("label"!=M[O].nodeName){var P=mxUtils.trim(M[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==D&&0<=P.indexOf(L)||null!=D&&D.test(P))return!0}}return!1}function y(){l?(K.removeAttribute("disabled"),m.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),m.setAttribute("disabled",
-"disabled"));C.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}function G(D,M,L){N.innerText="";var O=F.model.getDescendants(F.model.getRoot()),P=C.value.toLowerCase(),T=U.checked?new RegExp(P):null,V=null;x=null;d!=P&&(d=P,k=null,n=!1);var X=null==k;if(0<P.length){if(n){n=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}D=(W+1)%b.pages.length;k=null;do n=!1,O=b.pages[D],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(O),F.model.setRoot(O.root),
-D=(D+1)%b.pages.length;while(!G(!0,M,L)&&D!=W);k&&(k=null,L?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));n=!1;F=b.editor.graph;return G(!0,M,L)}for(Y=0;Y<O.length;Y++){W=F.view.getState(O[Y]);M&&(X=X||W==k);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(F.model.isVertex(W.cell)||F.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=F.sanitizeHtml(F.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=F.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
-" ")).toLowerCase();var Z=0;M&&q&&W==k&&(label=label.substr(z),Z=z);var aa=null==R||""==R.value;if(null==T&&(0<=label.indexOf(P)||aa&&u(T,W.cell,P))||null!=T&&(T.test(label)||aa&&u(T,W.cell,P)))if(q&&(null!=T?(aa=label.match(T),null!=aa&&0<aa.length&&(x=aa[0].toLowerCase(),z=Z+aa.index+x.length)):(x=P,z=Z+label.indexOf(P)+x.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==k}}if(null!=V){if(Y==O.length&&S.checked)return k=null,n=!0,G(!0,M,L);k=V;F.scrollCellToVisible(k.cell);F.isEnabled()&&!F.isCellLocked(k.cell)?
-L||F.getSelectionCell()==k.cell&&1==F.getSelectionCount()||F.setSelectionCell(k.cell):F.highlightCell(k.cell)}else{if(!D&&S.checked)return n=!0,G(!0,M,L);F.isEnabled()&&!L&&F.clearSelection()}l=null!=V;q&&!D&&y();return 0==P.length||null!=V}var E=b.actions.get("findReplace"),F=b.editor.graph,d=null,k=null,l=!1,n=!1,x=null,z=0,B=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var H=q?"260px":"200px",C=document.createElement("input");
-C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=H;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";I.appendChild(C);mxUtils.br(I);if(q){var R=document.createElement("input");R.setAttribute("placeholder",mxResources.get("replaceWith"));R.setAttribute("type","text");R.style.marginTop="4px";R.style.marginBottom="6px";R.style.width=H;R.style.fontSize="12px";R.style.borderRadius=
-"4px";R.style.padding="6px";I.appendChild(R);mxUtils.br(I);mxEvent.addListener(R,"input",y)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";I.appendChild(U);H=document.createElement("label");H.setAttribute("for","geFindWinRegExChck");I.appendChild(H);mxUtils.write(H,mxResources.get("regularExpression"));I.appendChild(H);H=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");H.style.position=
-"relative";H.style.marginLeft="6px";I.appendChild(H);mxUtils.br(I);var S=document.createElement("input");S.setAttribute("id","geFindWinAllPagesChck");S.setAttribute("type","checkbox");S.style.marginRight="4px";I.appendChild(S);H=document.createElement("label");H.setAttribute("for","geFindWinAllPagesChck");I.appendChild(H);mxUtils.write(H,mxResources.get("allPages"));I.appendChild(H);var Q=document.createElement("div");mxUtils.br(I);H=document.createElement("div");H.style.left="0px";H.style.right=
-"0px";H.style.marginTop="6px";H.style.padding="0 6px 0 6px";I.appendChild(H);var v=mxUtils.button(mxResources.get("reset"),function(){N.innerText="";C.value="";C.style.backgroundColor="";q&&(R.value="",y());d=k=null;n=!1;C.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";q||H.appendChild(v);var A=mxUtils.button(mxResources.get("find"),
-function(){try{C.style.backgroundColor=G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(D){b.handleError(D)}});A.setAttribute("title",mxResources.get("find")+" (Enter)");A.style.float="none";A.style.width="120px";A.style.marginTop="6px";A.style.marginLeft="8px";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.className="geBtn gePrimaryBtn";H.appendChild(A);var N=document.createElement("div");N.style.marginTop="10px";if(q){var J=function(D,M,L,O,P){if(null==P||"1"!=P.html)return O=D.toLowerCase().indexOf(M,
-O),0>O?D:D.substr(0,O)+L+D.substr(O+M.length);var T=D;M=mxUtils.htmlEntities(M,!1,!1,!1);P=[];var V=-1;for(D=D.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=D.indexOf("<",V+1));)P.push(V);V=D.match(/<[^>]*>/g);D=D.replace(/<[^>]*>/g,"");O=D.toLowerCase().indexOf(M,O);if(0>O)return T;T=O+M.length;L=mxUtils.htmlEntities(L);D=D.substr(0,O)+L+D.substr(T);for(var X=0,W=0;W<P.length;W++){if(P[W]-X<O)D=D.substr(0,P[W])+V[W]+D.substr(P[W]);
-else{var Y=P[W]-X<T?O+X:P[W]+(L.length-M.length);D=D.substr(0,Y)+V[W]+D.substr(Y)}X+=V[W].length}return D.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};H.style.textAlign="center";var K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=k){var D=k.cell,M=F.getLabel(D);F.isCellEditable(D)&&F.model.setValue(D,J(M,x,R.value,z-x.length,F.getCurrentCellStyle(D)));C.style.backgroundColor=G(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(L){b.handleError(L)}});
-K.setAttribute("title",mxResources.get("replFind"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");H.appendChild(K);mxUtils.br(H);var m=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=k){var D=k.cell,M=F.getLabel(D);F.model.setValue(D,J(M,x,R.value,z-x.length,F.getCurrentCellStyle(D)));K.setAttribute("disabled",
-"disabled");m.setAttribute("disabled","disabled")}}catch(L){b.handleError(L)}});m.setAttribute("title",mxResources.get("replace"));m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");H.appendChild(m);var t=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";d=null;var D=b.currentPage,M=b.editor.graph.getSelectionCells();
-b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var L=0,O={};G(!1,!0,!0)&&100>L;){var P=k.cell,T=F.getLabel(P),V=O[P.id];if(V&&V.replAllMrk==B&&V.replAllPos>=z)break;O[P.id]={replAllMrk:B,replAllPos:z};F.isCellEditable(P)&&(F.model.setValue(P,J(T,x,R.value,z-x.length,F.getCurrentCellStyle(P))),L++)}D!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,D));mxUtils.write(N,mxResources.get("matchesRepl",[L]))}catch(X){b.handleError(X)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(M),
-b.editor.graph.rendering=!0}B++});t.setAttribute("title",mxResources.get("replaceAll"));t.style.float="none";t.style.width="120px";t.style.marginTop="6px";t.style.marginLeft="8px";t.style.overflow="hidden";t.style.textOverflow="ellipsis";t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");H.appendChild(t);mxUtils.br(H);H.appendChild(v);v=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));v.setAttribute("title",mxResources.get("close"));
-v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";H.appendChild(v);mxUtils.br(H);H.appendChild(N)}else H.style.display="flex",H.style.alignItems="center",v.style.width="",A.style.width="";mxEvent.addListener(C,"keyup",function(D){if(91==D.keyCode||93==D.keyCode||17==D.keyCode)mxEvent.consume(D);else if(27==D.keyCode)E.funct();else if(d!=C.value.toLowerCase()||13==D.keyCode)try{C.style.backgroundColor=
-G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(M){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(D){70==D.keyCode&&b.keyHandler.isControlDown(D)&&!mxEvent.isShiftDown(D)&&(E.funct(),mxEvent.consume(D))});this.window=new mxWindow(mxResources.get("find")+(q?"/"+mxResources.get("replace"):""),I,f,g,c,p,!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()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?S.removeAttribute("disabled"):(S.checked=!1,S.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(D){C.focus();C.value=D;A.click()}},FreehandWindow=function(b,f,g,c,p,q){var u=b.editor.graph,y=document.createElement("div");y.style.textAlign=
-"center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(q){var G=function(){var l=u.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&F.setAttribute("title",l))},E=document.createElement("input");E.setAttribute("id","geFreehandBrush");E.setAttribute("type","checkbox");E.checked=
+"disabled"));C.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}function H(D,M,L){N.innerText="";var O=F.model.getDescendants(F.model.getRoot()),P=C.value.toLowerCase(),U=T.checked?new RegExp(P):null,V=null;x=null;d!=P&&(d=P,k=null,n=!1);var X=null==k;if(0<P.length){if(n){n=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}D=(W+1)%b.pages.length;k=null;do n=!1,O=b.pages[D],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(O),F.model.setRoot(O.root),
+D=(D+1)%b.pages.length;while(!H(!0,M,L)&&D!=W);k&&(k=null,L?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));n=!1;F=b.editor.graph;return H(!0,M,L)}for(Y=0;Y<O.length;Y++){W=F.view.getState(O[Y]);M&&(X=X||W==k);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(F.model.isVertex(W.cell)||F.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=F.sanitizeHtml(F.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=F.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
+" ")).toLowerCase();var Z=0;M&&q&&W==k&&(label=label.substr(A),Z=A);var aa=null==R||""==R.value;if(null==U&&(0<=label.indexOf(P)||aa&&u(U,W.cell,P))||null!=U&&(U.test(label)||aa&&u(U,W.cell,P)))if(q&&(null!=U?(aa=label.match(U),null!=aa&&0<aa.length&&(x=aa[0].toLowerCase(),A=Z+aa.index+x.length)):(x=P,A=Z+label.indexOf(P)+x.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==k}}if(null!=V){if(Y==O.length&&S.checked)return k=null,n=!0,H(!0,M,L);k=V;F.scrollCellToVisible(k.cell);F.isEnabled()&&!F.isCellLocked(k.cell)?
+L||F.getSelectionCell()==k.cell&&1==F.getSelectionCount()||F.setSelectionCell(k.cell):F.highlightCell(k.cell)}else{if(!D&&S.checked)return n=!0,H(!0,M,L);F.isEnabled()&&!L&&F.clearSelection()}l=null!=V;q&&!D&&y();return 0==P.length||null!=V}var E=b.actions.get("findReplace"),F=b.editor.graph,d=null,k=null,l=!1,n=!1,x=null,A=0,B=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var G=q?"260px":"200px",C=document.createElement("input");
+C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=G;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";I.appendChild(C);mxUtils.br(I);if(q){var R=document.createElement("input");R.setAttribute("placeholder",mxResources.get("replaceWith"));R.setAttribute("type","text");R.style.marginTop="4px";R.style.marginBottom="6px";R.style.width=G;R.style.fontSize="12px";R.style.borderRadius=
+"4px";R.style.padding="6px";I.appendChild(R);mxUtils.br(I);mxEvent.addListener(R,"input",y)}var T=document.createElement("input");T.setAttribute("id","geFindWinRegExChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";I.appendChild(T);G=document.createElement("label");G.setAttribute("for","geFindWinRegExChck");I.appendChild(G);mxUtils.write(G,mxResources.get("regularExpression"));I.appendChild(G);G=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");G.style.position=
+"relative";G.style.marginLeft="6px";I.appendChild(G);mxUtils.br(I);var S=document.createElement("input");S.setAttribute("id","geFindWinAllPagesChck");S.setAttribute("type","checkbox");S.style.marginRight="4px";I.appendChild(S);G=document.createElement("label");G.setAttribute("for","geFindWinAllPagesChck");I.appendChild(G);mxUtils.write(G,mxResources.get("allPages"));I.appendChild(G);var Q=document.createElement("div");mxUtils.br(I);G=document.createElement("div");G.style.left="0px";G.style.right=
+"0px";G.style.marginTop="6px";G.style.padding="0 6px 0 6px";I.appendChild(G);var v=mxUtils.button(mxResources.get("reset"),function(){N.innerText="";C.value="";C.style.backgroundColor="";q&&(R.value="",y());d=k=null;n=!1;C.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";q||G.appendChild(v);var z=mxUtils.button(mxResources.get("find"),
+function(){try{C.style.backgroundColor=H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(D){b.handleError(D)}});z.setAttribute("title",mxResources.get("find")+" (Enter)");z.style.float="none";z.style.width="120px";z.style.marginTop="6px";z.style.marginLeft="8px";z.style.overflow="hidden";z.style.textOverflow="ellipsis";z.className="geBtn gePrimaryBtn";G.appendChild(z);var N=document.createElement("div");N.style.marginTop="10px";if(q){var J=function(D,M,L,O,P){if(null==P||"1"!=P.html)return O=D.toLowerCase().indexOf(M,
+O),0>O?D:D.substr(0,O)+L+D.substr(O+M.length);var U=D;M=mxUtils.htmlEntities(M,!1,!1,!1);P=[];var V=-1;for(D=D.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=D.indexOf("<",V+1));)P.push(V);V=D.match(/<[^>]*>/g);D=D.replace(/<[^>]*>/g,"");O=D.toLowerCase().indexOf(M,O);if(0>O)return U;U=O+M.length;L=mxUtils.htmlEntities(L);D=D.substr(0,O)+L+D.substr(U);for(var X=0,W=0;W<P.length;W++){if(P[W]-X<O)D=D.substr(0,P[W])+V[W]+D.substr(P[W]);
+else{var Y=P[W]-X<U?O+X:P[W]+(L.length-M.length);D=D.substr(0,Y)+V[W]+D.substr(Y)}X+=V[W].length}return D.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};G.style.textAlign="center";var K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=k){var D=k.cell,M=F.getLabel(D);F.isCellEditable(D)&&F.model.setValue(D,J(M,x,R.value,A-x.length,F.getCurrentCellStyle(D)));C.style.backgroundColor=H(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(L){b.handleError(L)}});
+K.setAttribute("title",mxResources.get("replFind"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");G.appendChild(K);mxUtils.br(G);var m=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=k){var D=k.cell,M=F.getLabel(D);F.model.setValue(D,J(M,x,R.value,A-x.length,F.getCurrentCellStyle(D)));K.setAttribute("disabled",
+"disabled");m.setAttribute("disabled","disabled")}}catch(L){b.handleError(L)}});m.setAttribute("title",mxResources.get("replace"));m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");G.appendChild(m);var t=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";d=null;var D=b.currentPage,M=b.editor.graph.getSelectionCells();
+b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var L=0,O={};H(!1,!0,!0)&&100>L;){var P=k.cell,U=F.getLabel(P),V=O[P.id];if(V&&V.replAllMrk==B&&V.replAllPos>=A)break;O[P.id]={replAllMrk:B,replAllPos:A};F.isCellEditable(P)&&(F.model.setValue(P,J(U,x,R.value,A-x.length,F.getCurrentCellStyle(P))),L++)}D!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,D));mxUtils.write(N,mxResources.get("matchesRepl",[L]))}catch(X){b.handleError(X)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(M),
+b.editor.graph.rendering=!0}B++});t.setAttribute("title",mxResources.get("replaceAll"));t.style.float="none";t.style.width="120px";t.style.marginTop="6px";t.style.marginLeft="8px";t.style.overflow="hidden";t.style.textOverflow="ellipsis";t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");G.appendChild(t);mxUtils.br(G);G.appendChild(v);v=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));v.setAttribute("title",mxResources.get("close"));
+v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";G.appendChild(v);mxUtils.br(G);G.appendChild(N)}else G.style.display="flex",G.style.alignItems="center",v.style.width="",z.style.width="";mxEvent.addListener(C,"keyup",function(D){if(91==D.keyCode||93==D.keyCode||17==D.keyCode)mxEvent.consume(D);else if(27==D.keyCode)E.funct();else if(d!=C.value.toLowerCase()||13==D.keyCode)try{C.style.backgroundColor=
+H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(M){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(D){70==D.keyCode&&b.keyHandler.isControlDown(D)&&!mxEvent.isShiftDown(D)&&(E.funct(),mxEvent.consume(D))});this.window=new mxWindow(mxResources.get("find")+(q?"/"+mxResources.get("replace"):""),I,f,g,c,p,!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()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?S.removeAttribute("disabled"):(S.checked=!1,S.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(D){C.focus();C.value=D;z.click()}},FreehandWindow=function(b,f,g,c,p,q){var u=b.editor.graph,y=document.createElement("div");y.style.textAlign=
+"center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(q){var H=function(){var l=u.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&F.setAttribute("title",l))},E=document.createElement("input");E.setAttribute("id","geFreehandBrush");E.setAttribute("type","checkbox");E.checked=
u.freehand.isPerfectFreehandMode();E.style.margin="10px 5px 0px 10px";E.style.float="left";y.appendChild(E);u.freehand.setPerfectFreehandMode(E.checked);q=document.createElement("label");q.setAttribute("for","geFreehandBrush");q.style.float="left";q.style.marginTop="10px";y.appendChild(q);mxUtils.write(q,mxResources.get("brush"));y.appendChild(q);var F=document.createElement("tempDiv");F.style.display="block";F.style.width="100%";F.style.height="100%";F.style.borderRadius="2px";F.style.boxSizing=
-"border-box";F.style.border="1px solid black";F.style.backgroundColor=u.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){F.style.backgroundColor=u.freehand.getStrokeColor()});G();q=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(u.freehand.getStrokeColor(!0),function(n){u.freehand.setStrokeColor(n);F.style.backgroundColor=u.freehand.getStrokeColor();G()},"default");mxEvent.consume(l)}));q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";
+"border-box";F.style.border="1px solid black";F.style.backgroundColor=u.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){F.style.backgroundColor=u.freehand.getStrokeColor()});H();q=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(u.freehand.getStrokeColor(!0),function(n){u.freehand.setStrokeColor(n);F.style.backgroundColor=u.freehand.getStrokeColor();H()},"default");mxEvent.consume(l)}));q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";
q.style.top="8px";q.style.right="8px";q.style.width="28px";q.style.height="18px";q.className="geColorBtn";q.innerText="";q.appendChild(F);y.appendChild(q);q=document.createElement("img");q.setAttribute("title",mxResources.get("settings"));q.setAttribute("src",Editor.gearImage);q.className="geButton";q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";q.style.top="8px";q.style.right="38px";q.style.width="18px";q.style.height="18px";q.style.opacity="0.6";y.appendChild(q);
mxEvent.addListener(q,"click",mxUtils.bind(this,function(l){l=u.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",l,function(n){!isNaN(n)&&0<n&&20>=n&&u.freehand.setSmoothing(parseInt(n))})}));mxUtils.br(y);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",u.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";y.appendChild(d);mxUtils.br(y);q=function(){u.freehand.setPerfectFreehandMode(E.checked);
d.style.visibility=E.checked?"visible":"hidden"};mxEvent.addListener(E,"change",q);q();mxEvent.addListener(d,"change",function(){u.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){u.freehand.isDrawing()?u.freehand.stopDrawing():u.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing")+" (X)");k.style.width="90%";k.style.marginLeft="0px";k.style.position="relative";k.className="geBtn gePrimaryBtn";y.appendChild(k);
this.window=new mxWindow(mxResources.get("freehand"),y,f,g,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);u.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing"));var l=document.createElement("span");l.className="geShortcutKey";l.style.margin="0 2px 4px 0";mxUtils.write(l,"X");k.appendChild(l);k.setAttribute("title",
mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");k.className="geBtn"+(u.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){u.freehand.isDrawing()&&u.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,f,g,c,p){var q=b.editor.graph,u=document.createElement("div");u.style.userSelect="none";u.style.overflow=
-"hidden";u.style.height="100%";var y=document.createElement("div");y.style.display="flex";y.style.alignItems="center";y.style.justifyContent="center";y.style.paddingTop="20px";var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginRight="4px";G.checked=!0;var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginRight="4px";E.checked=!0;var F=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(q.isSelectionEmpty()?
-q.getVerticesAndEdges():q.getSelectionCells(),G.checked,E.checked)}));F.setAttribute("title","Convert Colors");F.className="geBtn gePrimaryBtn";y.appendChild(F);u.appendChild(y);y=y.cloneNode(!1);y.appendChild(E);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("background"));u.appendChild(y);y=y.cloneNode(!1);y.appendChild(G);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("labels"));u.appendChild(y);this.window=new mxWindow(mxResources.get("adaptiveColors"),u,f,g,c,p,!0,!0);this.window.destroyOnClose=
-!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,g,c,p){function q(){v=!0;z.value=A;d.isSelectionEmpty()?(I.setAttribute("disabled","disabled"),"selectionOnly"==z.value&&(z.value="includeCopyOfMyDiagram")):I.removeAttribute("disabled");b.isDiagramEmpty()?(B.setAttribute("disabled","disabled"),
-"includeCopyOfMyDiagram"==z.value&&(z.value="help")):B.removeAttribute("disabled");v=!1}function u(J,K,m){var t=document.createElement("button");t.className="geBtn gePrimaryBtn";t.style.padding="4px";t.style.height="auto";t.style.position="relative";"flex"==m?(t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.whiteSpace="nowrap",t.style.margin="0px",t.style.flexGrow="1"):(t.style.display="block",t.style.margin="8px",t.style.left="50%",t.style.transform="translateX(-50%)");mxUtils.write(t,
-J);t.setAttribute("title",J);mxEvent.addListener(t,"click",K);return t}function y(J){var K=document.createElement("div");K.style.display="block";K.style.position="relative";K.style.backgroundColor="#e0e0e0";K.style.borderRadius="4px";K.style.wordWrap="break-word";K.style.textAlign="left";K.style.padding="6px";K.style.margin="12px";K.style.left="0px";K.style.right="0px";mxUtils.write(K,J);l.appendChild(K);return K}function G(J){var K=J.indexOf("<mxGraphModel "),m=J.indexOf("</mxGraphModel>");0>K&&
+"hidden";u.style.height="100%";var y=document.createElement("div");y.style.display="flex";y.style.alignItems="center";y.style.justifyContent="center";y.style.paddingTop="20px";var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginRight="4px";E.checked=!0;var F=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(q.isSelectionEmpty()?
+q.getVerticesAndEdges():q.getSelectionCells(),H.checked,E.checked)}));F.setAttribute("title","Convert Colors");F.className="geBtn gePrimaryBtn";y.appendChild(F);u.appendChild(y);y=y.cloneNode(!1);y.appendChild(E);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("background"));u.appendChild(y);y=y.cloneNode(!1);y.appendChild(H);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("labels"));u.appendChild(y);this.window=new mxWindow(mxResources.get("adaptiveColors"),u,f,g,c,p,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,g,c,p){function q(){v=!0;A.value=z;d.isSelectionEmpty()?(I.setAttribute("disabled","disabled"),"selectionOnly"==A.value&&(A.value="includeCopyOfMyDiagram")):I.removeAttribute("disabled");b.isDiagramEmpty()?(B.setAttribute("disabled","disabled"),
+"includeCopyOfMyDiagram"==A.value&&(A.value="help")):B.removeAttribute("disabled");v=!1}function u(J,K,m){var t=document.createElement("button");t.className="geBtn gePrimaryBtn";t.style.padding="4px";t.style.height="auto";t.style.position="relative";"flex"==m?(t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.whiteSpace="nowrap",t.style.margin="0px",t.style.flexGrow="1"):(t.style.display="block",t.style.margin="8px",t.style.left="50%",t.style.transform="translateX(-50%)");mxUtils.write(t,
+J);t.setAttribute("title",J);mxEvent.addListener(t,"click",K);return t}function y(J){var K=document.createElement("div");K.style.display="block";K.style.position="relative";K.style.backgroundColor="#e0e0e0";K.style.borderRadius="4px";K.style.wordWrap="break-word";K.style.textAlign="left";K.style.padding="6px";K.style.margin="12px";K.style.left="0px";K.style.right="0px";mxUtils.write(K,J);l.appendChild(K);return K}function H(J){var K=J.indexOf("<mxGraphModel "),m=J.indexOf("</mxGraphModel>");0>K&&
(K=J.indexOf("<mxGraphModel>"));if(0<=K&&m>K){var t=mxUtils,D=t.trim,M=J.substring(0,K),L=M.indexOf("```");0<=L&&(M=M.substring(M,0,L+6));t=D.call(t,M);K=J.substring(K,m+15);D=mxUtils;M=D.trim;J=J.substring(m+15);m=J.lastIndexOf("```");0<=m&&(J=J.substring(m+3));return[t,K,M.call(D,J)]}return null}function E(J){var K=y(J);K.style.cursor="pointer";K.style.marginBottom="2px";K.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(K,"click",function(X){Q.value=J;Q.focus()});var m=y("");
-m.style.marginTop="2px";var t=b.currentPage,D=J,M=[],L=null;if("includeCopyOfMyDiagram"==z.value||"selectionOnly"==z.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==z.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!d.model.isRoot(X)&&!d.model.isLayer(X)&&!d.isCellSelected(X)&&!d.isAncestorSelected(X)});L=O.encode(d.getModel());O.document.appendChild(L);M.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+
-mxUtils.getXml(L)})}else"create"==z.value?(D=C.value.replace(/([A-Z])/g," $1").toLowerCase(),D="Write the declaration code for a "+(""!=D?D:"graph")+' that shows "'+(""!=J?J:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):M.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});M.push({role:"user",content:D});
-var P={model:Editor.gptModel,messages:M},T=0;for(M=0;M<P.messages.length;M++)T+=P.messages[M].content.match(/\b\w+\b|[^\w\s]|=/g).length;var V=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("loading")+"...");var X=document.createElement("img");X.setAttribute("title","Processing "+T+" tokens");X.setAttribute("src",IMAGE_PATH+"/spin.gif");X.style.marginLeft="6px";m.appendChild(X);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,
+m.style.marginTop="2px";var t=b.currentPage,D=J,M=[],L=null;if("includeCopyOfMyDiagram"==A.value||"selectionOnly"==A.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==A.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!d.model.isRoot(X)&&!d.model.isLayer(X)&&!d.isCellSelected(X)&&!d.isAncestorSelected(X)});L=O.encode(d.getModel());O.document.appendChild(L);M.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+
+mxUtils.getXml(L)})}else"create"==A.value?(D=C.value.replace(/([A-Z])/g," $1").toLowerCase(),D="Write the declaration code for a "+(""!=D?D:"graph")+' that shows "'+(""!=J?J:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):M.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});M.push({role:"user",content:D});
+var P={model:Editor.gptModel,messages:M},U=0;for(M=0;M<P.messages.length;M++)U+=P.messages[M].content.match(/\b\w+\b|[^\w\s]|=/g).length;var V=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("loading")+"...");var X=document.createElement("img");X.setAttribute("title","Processing "+U+" tokens");X.setAttribute("src",IMAGE_PATH+"/spin.gif");X.style.marginLeft="6px";m.appendChild(X);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,
function(W){var Y=new mxXmlRequest(Editor.gptUrl,JSON.stringify(P),"POST");Y.setRequestHeaders=mxUtils.bind(this,function(fa,ea){fa.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);fa.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(fa){W.clear();m.innerHTML="";mxUtils.write(m,fa.message);m.appendChild(u(mxResources.get("tryAgain"),V));m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(fa)}),aa=mxUtils.bind(this,
-function(fa){var ea=G(fa),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){fa=document.createElement("div");fa.style.display="inline-block";fa.style.position="relative";fa.style.transform="translateX(-50%)";fa.style.padding="6px";fa.style.left="50%";var ia=mxUtils.parseXml(ea[1]),ka=new mxCodec(ia),ba=new mxGraphModel;ka.decode(ia.documentElement,ba);var ha=null;null!=L&&(ia=new mxCodec(L.ownerDocument),ha=new mxGraphModel,ia.decode(L,ha));ia=mxUtils.bind(this,function(ma){d.model.beginUpdate();
-try{if(null!=ha&&null!=b.getPageIndex(t)){b.selectPage(t);var da=b.diffCells(ha.root,ba.root);b.patchPage(t,da,null,!0)}else{var va=ba.getChildren(ba.getChildAt(ba.getRoot(),0));d.setSelectionCells(d.importCells(va))}}finally{d.model.endUpdate()}mxEvent.consume(ma)});ka=d.getBoundingBoxFromGeometry(ca);null!=ka?(fa.style.cursor="move",fa.appendChild(b.sidebar.createVertexTemplateFromCells(ca,ka.width,ka.height,"",!0,null,!0,!0,ia,160,120))):(fa.style.padding="14px",mxUtils.write(fa,mxResources.get("noPreview")));
-m.innerHTML="";K=m;0<ea[0].length&&(mxUtils.write(K,ea[0]),mxUtils.br(K));K.appendChild(fa);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(u(mxResources.get("tryAgain"),V,"flex"));ca.appendChild(u(mxResources.get(null!=L?"apply":"insert"),ia,"flex"));m.appendChild(ca);0<ea[2].length&&(mxUtils.br(K),mxUtils.write(K,ea[2]));K.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else m.innerHTML="",K=m,mxUtils.write(K,fa),
-m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});Y.send(mxUtils.bind(this,function(fa){if(W.clear())try{if(200<=fa.getStatus()&&299>=fa.getStatus()){var ea=JSON.parse(fa.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",P,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==z.value){var ia=b.extractMermaidDeclaration(ca);null!=ia?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ha){aa(ha)})),b.generateMermaidImage(ia,null,
-function(){},function(ha){mxMermaidToDrawio.resetListeners();Z(ha)})):(aa(ca),m.appendChild(u(mxResources.get("tryAgain"),V)))}else aa(ca)}else{var ka="Error: "+fa.getStatus();try{var ba=JSON.parse(fa.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(ka=ba.error.message)}catch(ha){}m.innerHTML="";mxUtils.write(m,ka);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ha){Z(ha)}}),Z)}),function(W){m.innerHTML="";mxUtils.write(m,W.message);m.appendChild(u(mxResources.get("tryAgain"),
+function(fa){var ea=H(fa),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){fa=document.createElement("div");fa.style.display="inline-block";fa.style.position="relative";fa.style.transform="translateX(-50%)";fa.style.padding="6px";fa.style.left="50%";var ha=mxUtils.parseXml(ea[1]),ka=new mxCodec(ha),ba=new mxGraphModel;ka.decode(ha.documentElement,ba);var ia=null;null!=L&&(ha=new mxCodec(L.ownerDocument),ia=new mxGraphModel,ha.decode(L,ia));ha=mxUtils.bind(this,function(la){d.model.beginUpdate();
+try{if(null!=ia&&null!=b.getPageIndex(t)){b.selectPage(t);var da=b.diffCells(ia.root,ba.root);b.patchPage(t,da,null,!0)}else{var ra=ba.getChildren(ba.getChildAt(ba.getRoot(),0));d.setSelectionCells(d.importCells(ra))}}finally{d.model.endUpdate()}mxEvent.consume(la)});ka=d.getBoundingBoxFromGeometry(ca);null!=ka?(fa.style.cursor="move",fa.appendChild(b.sidebar.createVertexTemplateFromCells(ca,ka.width,ka.height,"",!0,null,!0,!0,ha,160,120))):(fa.style.padding="14px",mxUtils.write(fa,mxResources.get("noPreview")));
+m.innerHTML="";K=m;0<ea[0].length&&(mxUtils.write(K,ea[0]),mxUtils.br(K));K.appendChild(fa);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(u(mxResources.get("tryAgain"),V,"flex"));ca.appendChild(u(mxResources.get(null!=L?"apply":"insert"),ha,"flex"));m.appendChild(ca);0<ea[2].length&&(mxUtils.br(K),mxUtils.write(K,ea[2]));K.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else m.innerHTML="",K=m,mxUtils.write(K,fa),
+m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});Y.send(mxUtils.bind(this,function(fa){if(W.clear())try{if(200<=fa.getStatus()&&299>=fa.getStatus()){var ea=JSON.parse(fa.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",P,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==A.value){var ha=b.extractMermaidDeclaration(ca);null!=ha?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){aa(ia)})),b.generateMermaidImage(ha,null,
+function(){},function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(aa(ca),m.appendChild(u(mxResources.get("tryAgain"),V)))}else aa(ca)}else{var ka="Error: "+fa.getStatus();try{var ba=JSON.parse(fa.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(ka=ba.error.message)}catch(ia){}m.innerHTML="";mxUtils.write(m,ka);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){m.innerHTML="";mxUtils.write(m,W.message);m.appendChild(u(mxResources.get("tryAgain"),
V));m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function F(){""!=mxUtils.trim(Q.value)&&(E(Q.value),Q.value="")}var d=b.editor.graph,k=document.createElement("div");k.style.textAlign="center";k.style.overflow="hidden";k.style.height="100%";var l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.top="0px";l.style.left="0px";l.style.right="0px";l.style.bottom="104px";k.appendChild(l);var n=document.createElement("div");n.style.position=
-"absolute";n.style.boxSizing="border-box";n.style.borderRadius="4px";n.style.border="1px solid lightgray";n.style.margin="8px 8px 16px 8px";n.style.padding="8px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.padding="6px";n.style.height="80px";var x=document.createElement("div");x.style.display="flex";x.style.gap="6px";x.style.marginBottom="6px";var z=document.createElement("select");z.style.textOverflow="ellipsis";z.style.flexGrow="1";z.style.padding="4px";z.style.minWidth=
-"0";n.appendChild(x);var B=document.createElement("option");B.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(B);var I=document.createElement("option");I.setAttribute("value","selectionOnly");mxUtils.write(I,mxResources.get("selectionOnly"));z.appendChild(I);x.appendChild(z);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var H=document.createElement("option");H.setAttribute("value","create");mxUtils.write(H,
-mxResources.get("create"));z.appendChild(H)}H=document.createElement("option");H.setAttribute("value","help");mxUtils.write(H,mxResources.get("help"));z.appendChild(H);H=document.createElement("option");H.setAttribute("value","reset");mxUtils.write(H,mxResources.get("reset"));z.appendChild(H);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(H=0;H<EditorUi.mermaidDiagramTypes.length;H++){var R=document.createElement("option"),
-U=EditorUi.mermaidDiagramTypes[H],S=U;"erDiagram"==S&&(S="entityRelationshipDiagram");S=mxResources.get(S,null,S.charAt(0).toUpperCase()+S.substring(1).replace(/[A-Z]/g," $&"));R.setAttribute("value",U);mxUtils.write(R,S);C.appendChild(R)}x.appendChild(C);x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.textOverflow="clip";x.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";
-Q.style.background="transparent";Q.style.padding="8px 26px 8px 8px";Q.style.boxSizing="border-box";x.appendChild(Q);H=document.createElement("img");H.setAttribute("src",Editor.sendImage);H.setAttribute("title",mxResources.get("sendMessage"));H.className="geAdaptiveAsset";H.style.position="relative";H.style.cursor="pointer";H.style.opacity="0.5";H.style.height="19px";H.style.left="-24px";H.style.top="5px";H.style.background="url('"+b.editor.transparentImage+"')";x.appendChild(H);n.appendChild(x);d.isSelectionEmpty()?
-b.isDiagramEmpty()?z.value="help":z.value="includeCopyOfMyDiagram":z.value="selectionOnly";var v=!1,A=z.value,N=function(){Q.setAttribute("placeholder",mxResources.get("create"==z.value?"describeYourDiagram":"askMeAnything"));"create"==z.value?(z.style.width="",C.style.display=""):(z.style.width="100%",C.style.display="none")};N();mxEvent.addListener(z,"change",function(){v||("reset"==z.value?(z.value=A,l.innerHTML=""):A=z.value,N())});d.selectionModel.addListener(mxEvent.CHANGE,q);d.getModel().addListener(mxEvent.CHANGE,
-q);q();mxEvent.addListener(H,"click",F);mxEvent.addListener(Q,"keydown",function(J){13!=J.keyCode||mxEvent.isShiftDown(J)||F()});k.appendChild(n);this.window=new mxWindow(mxResources.get("chatWindowTitle"),k,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){d.getModel().removeListener(q)}));this.window.addListener("show",
-mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,g,c,p){var q=b.editor.graph,u=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)u=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var y=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(G,E){if(q.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=
-d.split(" ");for(var k=[],l=[],n=0;n<d.length;n++){var x=mxUtils.trim(d[n]);""!=x&&(l.push(x),0>mxUtils.indexOf(G,x)&&k.push(x))}q.isSelectionEmpty()?E(G.concat(k)):q.addTagsForCells(q.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(F.container,320,80,!0,!0);F.init()}},u);u=y.div;this.window=new mxWindow(mxResources.get("tags"),u,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
+"absolute";n.style.boxSizing="border-box";n.style.borderRadius="4px";n.style.border="1px solid lightgray";n.style.margin="8px 8px 16px 8px";n.style.padding="8px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.padding="6px";n.style.height="80px";var x=document.createElement("div");x.style.display="flex";x.style.gap="6px";x.style.marginBottom="6px";var A=document.createElement("select");A.style.textOverflow="ellipsis";A.style.flexGrow="1";A.style.padding="4px";A.style.minWidth=
+"0";n.appendChild(x);var B=document.createElement("option");B.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(B);var I=document.createElement("option");I.setAttribute("value","selectionOnly");mxUtils.write(I,mxResources.get("selectionOnly"));A.appendChild(I);x.appendChild(A);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var G=document.createElement("option");G.setAttribute("value","create");mxUtils.write(G,
+mxResources.get("create"));A.appendChild(G)}G=document.createElement("option");G.setAttribute("value","help");mxUtils.write(G,mxResources.get("help"));A.appendChild(G);G=document.createElement("option");G.setAttribute("value","reset");mxUtils.write(G,mxResources.get("reset"));A.appendChild(G);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(G=0;G<EditorUi.mermaidDiagramTypes.length;G++){var R=document.createElement("option"),
+T=EditorUi.mermaidDiagramTypes[G],S=T;"erDiagram"==S&&(S="entityRelationshipDiagram");S=mxResources.get(S,null,S.charAt(0).toUpperCase()+S.substring(1).replace(/[A-Z]/g," $&"));R.setAttribute("value",T);mxUtils.write(R,S);C.appendChild(R)}x.appendChild(C);x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.textOverflow="clip";x.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";
+Q.style.background="transparent";Q.style.padding="8px 26px 8px 8px";Q.style.boxSizing="border-box";x.appendChild(Q);G=document.createElement("img");G.setAttribute("src",Editor.sendImage);G.setAttribute("title",mxResources.get("sendMessage"));G.className="geAdaptiveAsset";G.style.position="relative";G.style.cursor="pointer";G.style.opacity="0.5";G.style.height="19px";G.style.left="-24px";G.style.top="5px";G.style.background="url('"+b.editor.transparentImage+"')";x.appendChild(G);n.appendChild(x);d.isSelectionEmpty()?
+b.isDiagramEmpty()?A.value="help":A.value="includeCopyOfMyDiagram":A.value="selectionOnly";var v=!1,z=A.value,N=function(){Q.setAttribute("placeholder",mxResources.get("create"==A.value?"describeYourDiagram":"askMeAnything"));"create"==A.value?(A.style.width="",C.style.display=""):(A.style.width="100%",C.style.display="none")};N();mxEvent.addListener(A,"change",function(){v||("reset"==A.value?(A.value=z,l.innerHTML=""):z=A.value,N())});d.selectionModel.addListener(mxEvent.CHANGE,q);d.getModel().addListener(mxEvent.CHANGE,
+q);q();mxEvent.addListener(G,"click",F);mxEvent.addListener(Q,"keydown",function(J){13!=J.keyCode||mxEvent.isShiftDown(J)||F()});k.appendChild(n);this.window=new mxWindow(mxResources.get("chatWindowTitle"),k,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){d.getModel().removeListener(q)}));this.window.addListener("show",
+mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,g,c,p){var q=b.editor.graph,u=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)u=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var y=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(H,E){if(q.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=
+d.split(" ");for(var k=[],l=[],n=0;n<d.length;n++){var x=mxUtils.trim(d[n]);""!=x&&(l.push(x),0>mxUtils.indexOf(H,x)&&k.push(x))}q.isSelectionEmpty()?E(H.concat(k)):q.addTagsForCells(q.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(F.container,320,80,!0,!0);F.init()}},u);u=y.div;this.window=new mxWindow(mxResources.get("tags"),u,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){y.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,g,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("authorizationRequired"));var u="Unknown",
y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(u=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(u=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(u=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(u=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(u=mxResources.get("gitlab"),
-y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):f==b.trello&&(u=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[u]));var G=document.createElement("input");G.setAttribute("type","checkbox");u=mxUtils.button(mxResources.get("authorize"),function(){c(G.checked)});u.insertBefore(y,u.firstChild);u.style.marginTop="6px";u.className="geBigButton";u.style.fontSize="18px";u.style.padding="14px";
-p.appendChild(q);p.appendChild(b);p.appendChild(u);g&&(g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(G),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberMe")),g.appendChild(q),p.appendChild(g),G.checked=!0,G.defaultChecked=!0,mxEvent.addListener(q,"click",function(E){G.checked=!G.checked;mxEvent.consume(E)}));this.container=p},MoreShapesDialog=function(b,f,g){g=null!=g?g:b.sidebar.entries;var c=document.createElement("div"),p=[];if(null!=b.sidebar.customEntries)for(var q=
-0;q<b.sidebar.customEntries.length;q++){for(var u=b.sidebar.customEntries[q]||{},y={title:b.getResource(u.title),entries:[]},G=0;null!=u.entries&&G<u.entries.length;G++){var E=u.entries[G];y.entries.push({id:E.id,title:b.getResource(E.title),desc:b.getResource(E.desc),image:E.preview})}0<y.entries.length&&p.push(y)}for(q=0;q<g.length;q++)if(null==b.sidebar.enabledLibraries)p.push(g[q]);else{y={title:g[q].title,entries:[]};for(G=0;G<g[q].entries.length;G++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-g[q].entries[G].id)&&y.entries.push(g[q].entries[G]);0<y.entries.length&&p.push(y)}g=p;if(f){q=mxUtils.bind(this,function(U){for(var S=0;S<U.length;S++)(function(Q){var v=n.cloneNode(!1);v.style.fontWeight="bold";v.style.backgroundColor="light-dark(#e5e5e5, #505759)";v.style.padding="6px 0px 6px 20px";mxUtils.write(v,Q.title);F.appendChild(v);for(var A=0;A<Q.entries.length;A++)(function(N){var J=n.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace="nowrap";
+y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):f==b.trello&&(u=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[u]));var H=document.createElement("input");H.setAttribute("type","checkbox");u=mxUtils.button(mxResources.get("authorize"),function(){c(H.checked)});u.insertBefore(y,u.firstChild);u.style.marginTop="6px";u.className="geBigButton";u.style.fontSize="18px";u.style.padding="14px";
+p.appendChild(q);p.appendChild(b);p.appendChild(u);g&&(g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(H),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberMe")),g.appendChild(q),p.appendChild(g),H.checked=!0,H.defaultChecked=!0,mxEvent.addListener(q,"click",function(E){H.checked=!H.checked;mxEvent.consume(E)}));this.container=p},MoreShapesDialog=function(b,f,g){g=null!=g?g:b.sidebar.entries;var c=document.createElement("div"),p=[];if(null!=b.sidebar.customEntries)for(var q=
+0;q<b.sidebar.customEntries.length;q++){for(var u=b.sidebar.customEntries[q]||{},y={title:b.getResource(u.title),entries:[]},H=0;null!=u.entries&&H<u.entries.length;H++){var E=u.entries[H];y.entries.push({id:E.id,title:b.getResource(E.title),desc:b.getResource(E.desc),image:E.preview})}0<y.entries.length&&p.push(y)}for(q=0;q<g.length;q++)if(null==b.sidebar.enabledLibraries)p.push(g[q]);else{y={title:g[q].title,entries:[]};for(H=0;H<g[q].entries.length;H++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
+g[q].entries[H].id)&&y.entries.push(g[q].entries[H]);0<y.entries.length&&p.push(y)}g=p;if(f){q=mxUtils.bind(this,function(T){for(var S=0;S<T.length;S++)(function(Q){var v=n.cloneNode(!1);v.style.fontWeight="bold";v.style.backgroundColor="light-dark(#e5e5e5, #505759)";v.style.padding="6px 0px 6px 20px";mxUtils.write(v,Q.title);F.appendChild(v);for(var z=0;z<Q.entries.length;z++)(function(N){var J=n.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace="nowrap";
J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",N.title+" ("+N.id+")");var K=document.createElement("input");K.setAttribute("type","checkbox");K.checked=b.sidebar.isEntryVisible(N.id);K.defaultChecked=K.checked;J.appendChild(K);mxUtils.write(J," "+N.title);F.appendChild(J);var m=function(t){if(null==t||"INPUT"!=mxEvent.getSource(t).nodeName){d.style.textAlign="center";d.style.padding="0px";d.style.color="";d.innerText="";if(null!=N.desc){var D=document.createElement("pre");
D.style.boxSizing="border-box";D.style.fontFamily="inherit";D.style.margin="20px";D.style.right="0px";D.style.textAlign="left";mxUtils.write(D,N.desc);d.appendChild(D)}null!=N.imageCallback?N.imageCallback(d):null!=N.image?(D=document.createElement("img"),D.setAttribute("border","0"),D.style.maxWidth="100%",D.setAttribute("src",N.image),d.appendChild(D)):null==N.desc&&(d.style.padding="20px",d.style.color="rgb(179, 179, 179)",mxUtils.write(d,mxResources.get("noPreview")));null!=k&&(k.style.backgroundColor=
-"");k=J;k.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=t&&mxEvent.consume(t)}};mxEvent.addListener(J,"click",m);mxEvent.addListener(J,"dblclick",function(t){K.checked=!K.checked;mxEvent.consume(t)});l.push(function(){return K.checked?N.id:null});0==S&&0==A&&m()})(Q.entries[A])})(U[S])});G=document.createElement("div");G.className="geDialogTitle";mxUtils.write(G,mxResources.get("shapes"));G.style.position="absolute";G.style.top="0px";G.style.left="0px";G.style.lineHeight="40px";G.style.height=
-"40px";G.style.right="0px";var F=document.createElement("div"),d=document.createElement("div");F.style.position="absolute";F.style.top="40px";F.style.left="0px";F.style.width="202px";F.style.bottom="60px";F.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var k=null,l=[],n=document.createElement("div");n.style.position=
-"relative";n.style.left="0px";n.style.right="0px";q(g);c.style.padding="30px";c.appendChild(G);c.appendChild(F);c.appendChild(d);g=document.createElement("div");g.className="geDialogFooter";g.style.position="absolute";g.style.paddingRight="16px";g.style.left="0px";g.style.right="0px";g.style.bottom="0px";g.style.height="60px";g.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.position="relative";x.style.top="1px";x.checked=b.sidebar.sidebarTitles;
-x.defaultChecked=x.checked;g.appendChild(x);q=document.createElement("span");mxUtils.write(q," "+mxResources.get("labels"));q.style.paddingRight="20px";g.appendChild(q);mxEvent.addListener(q,"click",function(U){x.checked=!x.checked;mxEvent.consume(U)});var z=document.createElement("input");z.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)q=document.createElement("span"),q.style.paddingRight="20px",q.appendChild(z),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),
-z.style.position="relative",z.style.top="1px",z.checked=!0,z.defaultChecked=!0,mxEvent.addListener(q,"click",function(U){mxEvent.getSource(U)!=z&&(z.checked=!z.checked,mxEvent.consume(U))}),g.appendChild(q);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var U=[],S=0;S<l.length;S++){var Q=l[S].apply(this,arguments);null!=Q&&U.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(S=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=S&&0<U.splice(S,1).length)&&b.toggleScratchpad(),S=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=S&&0<U.splice(S,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),z.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),z.checked,!0);b.setSidebarTitles(x.checked,z.checked)});G.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table");
-q=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";G=document.createElement("tr");B.style.width="100%";f=document.createElement("td");p=document.createElement("td");u=document.createElement("td");var I=mxUtils.bind(this,function(U,S,Q){var v=document.createElement("input");v.type="checkbox";B.appendChild(v);v.checked=b.sidebar.isEntryVisible(Q);var A=document.createElement("span");mxUtils.write(A,S);S=document.createElement("div");S.style.display="block";S.appendChild(v);
-S.appendChild(A);mxEvent.addListener(A,"click",function(N){v.checked=!v.checked;mxEvent.consume(N)});U.appendChild(S);return function(){return v.checked?Q:null}});G.appendChild(f);G.appendChild(p);G.appendChild(u);q.appendChild(G);B.appendChild(q);l=[];var H=0;for(q=0;q<g.length;q++)for(G=0;G<g[q].entries.length;G++)H++;var C=[f,p,u],R=0;for(q=0;q<g.length;q++)(function(U){for(var S=0;S<U.entries.length;S++){var Q=U.entries[S];l.push(I(C[Math.floor(R/(H/3))],Q.title,Q.id));R++}})(g[q]);c.appendChild(B);
-g=document.createElement("div");g.style.marginTop="18px";g.style.textAlign="center";z=document.createElement("input");isLocalStorage&&(z.setAttribute("type","checkbox"),z.checked=!0,z.defaultChecked=!0,g.appendChild(z),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),g.appendChild(q),mxEvent.addListener(q,"click",function(U){z.checked=!z.checked;mxEvent.consume(U)}));c.appendChild(g);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-q.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],S=0;S<l.length;S++){var Q=l[S].apply(this,arguments);null!=Q&&U.push(Q)}b.sidebar.showEntries(0<U.length?U.join(";"):"",z.checked);b.hideDialog()});G.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.marginTop="26px";g.style.textAlign="right"}b.editor.cancelFirst?(g.appendChild(q),g.appendChild(G)):(g.appendChild(G),g.appendChild(q));c.appendChild(g);this.container=c},PluginsDialog=function(b,
-f,g,c){function p(){G=!0;if(0==y.length)u.innerText=mxResources.get("noPlugins");else{u.innerText="";for(var l=0;l<y.length;l++){var n=document.createElement("span");n.style.display="flex";n.style.alignItems="center";n.style.whiteSpace="nowrap";var x=document.createElement("img");x.src=Editor.trashImage;x.style.position="relative";x.style.cursor="pointer";x.style.marginRight="4px";x.style.display="inline-block";x.style.width="18px";x.setAttribute("title",mxResources.get("delete"));n.appendChild(x);
-mxUtils.write(n,y[l]);u.appendChild(n);mxUtils.br(u);mxEvent.addListener(x,"click",function(z){return function(){b.confirm(mxResources.get("delete")+' "'+y[z]+'"?',function(){null!=g&&g(y[z]);y.splice(z,1);p()})}}(l))}}}var q=document.createElement("div"),u=document.createElement("div");u.style.height="180px";u.style.overflow="auto";var y=mxSettings.getPlugins().slice(),G=!1;q.appendChild(u);p();G=!1;var E=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(l){l&&0>mxUtils.indexOf(y,
-l)&&y.push(l);p()})}:function(){var l=document.createElement("div"),n=document.createElement("span");n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");l.appendChild(n);var x=document.createElement("select");x.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var z=document.createElement("option");mxUtils.write(z,App.publicPlugin[n]);z.value=App.publicPlugin[n];x.appendChild(z)}l.appendChild(x);mxUtils.br(l);mxUtils.br(l);n=mxUtils.button(mxResources.get("custom")+
-"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var H=0;H<I.length;H++){var C=I[H],R=App.pluginRegistry[C];null!=R&&(C=R);0<C.length&&0>mxUtils.indexOf(y,C)&&y.push(C)}p()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});n.className="geBtn";ALLOW_CUSTOM_PLUGINS||(n.style.display="none");l=new CustomDialog(b,l,mxUtils.bind(this,function(){var B=
-App.pluginRegistry[x.value];0>mxUtils.indexOf(y,B)&&(y.push(B),p())}),null,null,null,n);b.showDialog(l.container,360,100,!0,!0)});E.className="geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var d=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){G?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});d.className="geBtn gePrimaryBtn";var k=document.createElement("div");
-k.style.marginTop="14px";k.style.textAlign="right";b.isOffline()||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||k.appendChild(F),k.appendChild(E),k.appendChild(d)):(k.appendChild(E),k.appendChild(d),c||k.appendChild(F));q.appendChild(k);this.container=q},CropImageDialog=function(b,f,g,c){function p(){var U=z.checked,S=B.checked,Q=l.geometry,v=G.width,A=G.height,N=(300-v)/2,J=(300-A)/2;Q.x<N?(Q.width-=N-Q.x,Q.x=N):Q.x+Q.width>N+v&&(Q.width=N+v-Q.x,
-Q.x=Math.min(Q.x,N+v));Q.y<J?(Q.height-=J-Q.y,Q.y=J):Q.y+Q.height>J+A&&(Q.height=J+A-Q.y,Q.y=Math.min(Q.y,J+A));var K=(Q.x-N)/v*100;v=100-(Q.x+Q.width-N)/v*100;N=(Q.y-J)/A*100;Q=100-(Q.y+Q.height-J)/A*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(v)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(K)+"%"+(U?" round "+k+"%":S?" round 50%":"")+")"}function q(U){null!=F&&(!0!==U&&(F.model.setGeometry(l,d.clone()),k=5,H.value=k),F.model.setStyle(l,n+p()),F.selectAll(),I.style.visibility=z.checked?
-"visible":"hidden")}var u=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 G=document.createElement("img");G.onload=function(){function U(){F.model.setStyle(l,n+p())}F=new Graph(E);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);
-F.graphHandler.allowLivePreview=!1;var S=F.createVertexHandler;F.createVertexHandler=function(){var T=S.apply(this,arguments);T.livePreview=!1;return T};if(null!=g)try{if("inset"==g.substring(0,5)){var Q=l.geometry,v=G.width,A=G.height,N=(300-v)/2,J=(300-A)/2,K=g.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),m=parseFloat(K[0]),t=parseFloat(K[1]),D=parseFloat(K[2]),M=parseFloat(K[3]);isFinite(m)&&isFinite(t)&&isFinite(D)&&isFinite(M)?(Q.x=M/100*v+N,Q.y=m/100*A+J,Q.width=(100-t)/100*v+N-Q.x,Q.height=(100-
-D)/100*A+J-Q.y,"round"==K[4]?"50%"==K[5]?B.setAttribute("checked","checked"):(k=parseInt(K[5]),H.value=k,z.setAttribute("checked","checked"),I.style.visibility="visible"):x.setAttribute("checked","checked")):g=null}else g=null}catch(T){}l.style=n+(g?g:p());l.vertex=!0;F.addCell(l,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,U);F.addListener(mxEvent.CELLS_RESIZED,U);var L=F.graphHandler.mouseUp,O=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){L.apply(this,arguments);
-E.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){O.apply(this,arguments);E.style.backgroundColor=""};F.dblClick=function(){};var P=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){P.call(this,[l],[l])}};G.onerror=function(){G.onload=null;G.src=Editor.errorImage};G.setAttribute("src",f);G.style.maxWidth="300px";G.style.maxHeight="300px";y.appendChild(G);u.appendChild(y);var E=document.createElement("div");E.style.width="300px";E.style.height=
+"");k=J;k.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=t&&mxEvent.consume(t)}};mxEvent.addListener(J,"click",m);mxEvent.addListener(J,"dblclick",function(t){K.checked=!K.checked;mxEvent.consume(t)});l.push(function(){return K.checked?N.id:null});0==S&&0==z&&m()})(Q.entries[z])})(T[S])});H=document.createElement("div");H.className="geDialogTitle";mxUtils.write(H,mxResources.get("shapes"));H.style.position="absolute";H.style.top="0px";H.style.left="0px";H.style.lineHeight="40px";H.style.height=
+"40px";H.style.right="0px";var F=document.createElement("div"),d=document.createElement("div");F.style.position="absolute";F.style.top="40px";F.style.left="0px";F.style.width="202px";F.style.bottom="60px";F.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var k=null,l=[],n=document.createElement("div");n.style.position=
+"relative";n.style.left="0px";n.style.right="0px";q(g);c.style.padding="30px";c.appendChild(H);c.appendChild(F);c.appendChild(d);g=document.createElement("div");g.className="geDialogFooter";g.style.position="absolute";g.style.paddingRight="16px";g.style.left="0px";g.style.right="0px";g.style.bottom="0px";g.style.height="60px";g.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.position="relative";x.style.top="1px";x.checked=b.sidebar.sidebarTitles;
+x.defaultChecked=x.checked;g.appendChild(x);q=document.createElement("span");mxUtils.write(q," "+mxResources.get("labels"));q.style.paddingRight="20px";g.appendChild(q);mxEvent.addListener(q,"click",function(T){x.checked=!x.checked;mxEvent.consume(T)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)q=document.createElement("span"),q.style.paddingRight="20px",q.appendChild(A),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),
+A.style.position="relative",A.style.top="1px",A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(q,"click",function(T){mxEvent.getSource(T)!=A&&(A.checked=!A.checked,mxEvent.consume(T))}),g.appendChild(q);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var T=[],S=0;S<l.length;S++){var Q=l[S].apply(this,arguments);null!=Q&&T.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(S=mxUtils.indexOf(T,".scratchpad"),null!=b.scratchpad!=(0<=S&&0<T.splice(S,1).length)&&b.toggleScratchpad(),S=mxUtils.indexOf(T,"search"),mxSettings.settings.search=0<=S&&0<T.splice(S,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(T.join(";"),A.checked,!0);b.setSidebarTitles(x.checked,A.checked)});H.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table");
+q=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";H=document.createElement("tr");B.style.width="100%";f=document.createElement("td");p=document.createElement("td");u=document.createElement("td");var I=mxUtils.bind(this,function(T,S,Q){var v=document.createElement("input");v.type="checkbox";B.appendChild(v);v.checked=b.sidebar.isEntryVisible(Q);var z=document.createElement("span");mxUtils.write(z,S);S=document.createElement("div");S.style.display="block";S.appendChild(v);
+S.appendChild(z);mxEvent.addListener(z,"click",function(N){v.checked=!v.checked;mxEvent.consume(N)});T.appendChild(S);return function(){return v.checked?Q:null}});H.appendChild(f);H.appendChild(p);H.appendChild(u);q.appendChild(H);B.appendChild(q);l=[];var G=0;for(q=0;q<g.length;q++)for(H=0;H<g[q].entries.length;H++)G++;var C=[f,p,u],R=0;for(q=0;q<g.length;q++)(function(T){for(var S=0;S<T.entries.length;S++){var Q=T.entries[S];l.push(I(C[Math.floor(R/(G/3))],Q.title,Q.id));R++}})(g[q]);c.appendChild(B);
+g=document.createElement("div");g.style.marginTop="18px";g.style.textAlign="center";A=document.createElement("input");isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,g.appendChild(A),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),g.appendChild(q),mxEvent.addListener(q,"click",function(T){A.checked=!A.checked;mxEvent.consume(T)}));c.appendChild(g);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+q.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){for(var T=["search"],S=0;S<l.length;S++){var Q=l[S].apply(this,arguments);null!=Q&&T.push(Q)}b.sidebar.showEntries(0<T.length?T.join(";"):"",A.checked);b.hideDialog()});H.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.marginTop="26px";g.style.textAlign="right"}b.editor.cancelFirst?(g.appendChild(q),g.appendChild(H)):(g.appendChild(H),g.appendChild(q));c.appendChild(g);this.container=c},PluginsDialog=function(b,
+f,g,c){function p(){H=!0;if(0==y.length)u.innerText=mxResources.get("noPlugins");else{u.innerText="";for(var l=0;l<y.length;l++){var n=document.createElement("span");n.style.display="flex";n.style.alignItems="center";n.style.whiteSpace="nowrap";var x=document.createElement("img");x.src=Editor.trashImage;x.style.position="relative";x.style.cursor="pointer";x.style.marginRight="4px";x.style.display="inline-block";x.style.width="18px";x.setAttribute("title",mxResources.get("delete"));n.appendChild(x);
+mxUtils.write(n,y[l]);u.appendChild(n);mxUtils.br(u);mxEvent.addListener(x,"click",function(A){return function(){b.confirm(mxResources.get("delete")+' "'+y[A]+'"?',function(){null!=g&&g(y[A]);y.splice(A,1);p()})}}(l))}}}var q=document.createElement("div"),u=document.createElement("div");u.style.height="180px";u.style.overflow="auto";var y=mxSettings.getPlugins().slice(),H=!1;q.appendChild(u);p();H=!1;var E=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(l){l&&0>mxUtils.indexOf(y,
+l)&&y.push(l);p()})}:function(){var l=document.createElement("div"),n=document.createElement("span");n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");l.appendChild(n);var x=document.createElement("select");x.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var A=document.createElement("option");mxUtils.write(A,App.publicPlugin[n]);A.value=App.publicPlugin[n];x.appendChild(A)}l.appendChild(x);mxUtils.br(l);mxUtils.br(l);n=mxUtils.button(mxResources.get("custom")+
+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var G=0;G<I.length;G++){var C=I[G],R=App.pluginRegistry[C];null!=R&&(C=R);0<C.length&&0>mxUtils.indexOf(y,C)&&y.push(C)}p()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});n.className="geBtn";ALLOW_CUSTOM_PLUGINS||(n.style.display="none");l=new CustomDialog(b,l,mxUtils.bind(this,function(){var B=
+App.pluginRegistry[x.value];0>mxUtils.indexOf(y,B)&&(y.push(B),p())}),null,null,null,n);b.showDialog(l.container,360,100,!0,!0)});E.className="geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var d=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){H?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});d.className="geBtn gePrimaryBtn";var k=document.createElement("div");
+k.style.marginTop="14px";k.style.textAlign="right";b.isOffline()||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||k.appendChild(F),k.appendChild(E),k.appendChild(d)):(k.appendChild(E),k.appendChild(d),c||k.appendChild(F));q.appendChild(k);this.container=q},CropImageDialog=function(b,f,g,c){function p(){var T=A.checked,S=B.checked,Q=l.geometry,v=H.width,z=H.height,N=(300-v)/2,J=(300-z)/2;Q.x<N?(Q.width-=N-Q.x,Q.x=N):Q.x+Q.width>N+v&&(Q.width=N+v-Q.x,
+Q.x=Math.min(Q.x,N+v));Q.y<J?(Q.height-=J-Q.y,Q.y=J):Q.y+Q.height>J+z&&(Q.height=J+z-Q.y,Q.y=Math.min(Q.y,J+z));var K=(Q.x-N)/v*100;v=100-(Q.x+Q.width-N)/v*100;N=(Q.y-J)/z*100;Q=100-(Q.y+Q.height-J)/z*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(v)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(K)+"%"+(T?" round "+k+"%":S?" round 50%":"")+")"}function q(T){null!=F&&(!0!==T&&(F.model.setGeometry(l,d.clone()),k=5,G.value=k),F.model.setStyle(l,n+p()),F.selectAll(),I.style.visibility=A.checked?
+"visible":"hidden")}var u=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 H=document.createElement("img");H.onload=function(){function T(){F.model.setStyle(l,n+p())}F=new Graph(E);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);
+F.graphHandler.allowLivePreview=!1;var S=F.createVertexHandler;F.createVertexHandler=function(){var U=S.apply(this,arguments);U.livePreview=!1;return U};if(null!=g)try{if("inset"==g.substring(0,5)){var Q=l.geometry,v=H.width,z=H.height,N=(300-v)/2,J=(300-z)/2,K=g.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),m=parseFloat(K[0]),t=parseFloat(K[1]),D=parseFloat(K[2]),M=parseFloat(K[3]);isFinite(m)&&isFinite(t)&&isFinite(D)&&isFinite(M)?(Q.x=M/100*v+N,Q.y=m/100*z+J,Q.width=(100-t)/100*v+N-Q.x,Q.height=(100-
+D)/100*z+J-Q.y,"round"==K[4]?"50%"==K[5]?B.setAttribute("checked","checked"):(k=parseInt(K[5]),G.value=k,A.setAttribute("checked","checked"),I.style.visibility="visible"):x.setAttribute("checked","checked")):g=null}else g=null}catch(U){}l.style=n+(g?g:p());l.vertex=!0;F.addCell(l,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,T);F.addListener(mxEvent.CELLS_RESIZED,T);var L=F.graphHandler.mouseUp,O=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){L.apply(this,arguments);
+E.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){O.apply(this,arguments);E.style.backgroundColor=""};F.dblClick=function(){};var P=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){P.call(this,[l],[l])}};H.onerror=function(){H.onload=null;H.src=Editor.errorImage};H.setAttribute("src",f);H.style.maxWidth="300px";H.style.maxHeight="300px";y.appendChild(H);u.appendChild(y);var E=document.createElement("div");E.style.width="300px";E.style.height=
"300px";E.style.overflow="hidden";E.style.backgroundColor="#fff9";u.appendChild(E);var F=null,d=new mxGeometry(100,100,100,100),k=5,l=new mxCell("",d.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingRect");x.setAttribute("name","croppingShape");x.setAttribute("checked","checked");x.style.margin="5px";u.appendChild(x);f=document.createElement("label");
-f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));u.appendChild(f);var z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRounded");z.setAttribute("name","croppingShape");z.style.margin="5px";u.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));u.appendChild(f);var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id",
-"croppingEllipse");B.setAttribute("name","croppingShape");B.style.margin="5px";u.appendChild(B);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));u.appendChild(f);mxEvent.addListener(x,"change",q);mxEvent.addListener(z,"change",q);mxEvent.addListener(B,"change",q);var I=document.createElement("div");I.style.textAlign="center";I.style.visibility="hidden";var H=document.createElement("input");H.setAttribute("type","range");H.setAttribute("min",
-"1");H.setAttribute("max","49");H.setAttribute("value",k);H.setAttribute("title",mxResources.get("arcSize"));I.appendChild(H);u.appendChild(I);mxEvent.addListener(H,"change",function(){k=this.value;q(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(p(),l.geometry.width,l.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){c(null,
-G.width,G.height);b.hideDialog()});C.className="geBtn";var R=document.createElement("div");R.style.marginTop="10px";R.style.textAlign="right";b.editor.cancelFirst?(R.appendChild(f),R.appendChild(C),R.appendChild(y)):(R.appendChild(C),R.appendChild(y),R.appendChild(f));u.appendChild(R);this.container=u},EditGeometryDialog=function(b,f){var g=b.editor.graph,c=1==f.length?g.getCellGeometry(f[0]):null,p=document.createElement("div"),q=document.createElement("table"),u=document.createElement("tbody"),
-y=document.createElement("tr"),G=document.createElement("td"),E=document.createElement("td");q.style.paddingLeft="6px";mxUtils.write(G,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=c&&c.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};E.appendChild(F);y.appendChild(G);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");
-mxUtils.write(G,mxResources.get("left")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.x:"";E.appendChild(d);y.appendChild(G);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.y:"";E.appendChild(k);y.appendChild(G);
-y.appendChild(E);u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("dx")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c&&null!=c.offset?c.offset.x:"";E.appendChild(l);y.appendChild(G);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("dy")+
-":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c&&null!=c.offset?c.offset.y:"";E.appendChild(n);y.appendChild(G);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";E.appendChild(x);y.appendChild(G);y.appendChild(E);
-u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=c?c.height:"";E.appendChild(z);y.appendChild(G);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");E=document.createElement("td");mxUtils.write(G,mxResources.get("rotation")+":");var B=document.createElement("input");
-B.setAttribute("type","text");B.style.width="100px";B.value=1==f.length?mxUtils.getValue(g.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";E.appendChild(B);y.appendChild(G);y.appendChild(E);u.appendChild(y);q.appendChild(u);p.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();g.getModel().beginUpdate();try{for(var H=0;H<f.length;H++){var C=g.getCellGeometry(f[H]);null!=
-C&&(C=C.clone(),g.isCellMovable(f[H])&&(C.relative=F.checked,0<mxUtils.trim(d.value).length&&(C.x=Number(d.value)),0<mxUtils.trim(k.value).length&&(C.y=Number(k.value)),0<mxUtils.trim(l.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(n.value))),g.isCellResizable(f[H])&&(0<mxUtils.trim(x.value).length&&(C.width=Number(x.value)),0<mxUtils.trim(z.value).length&&(C.height=Number(z.value))),
-g.getModel().setGeometry(f[H],C));0<mxUtils.trim(B.value).length&&g.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[f[H]])}}finally{g.getModel().endUpdate()}});I.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",function(H){13==H.keyCode&&I.click()});q=document.createElement("div");q.style.marginTop="20px";q.style.textAlign="right";b.editor.cancelFirst?(q.appendChild(c),q.appendChild(I)):(q.appendChild(I),q.appendChild(c));p.appendChild(q);this.container=p},LibraryDialog=function(b,
-f,g,c,p,q,u){function y(v){for(v=document.elementFromPoint(v.clientX,v.clientY);null!=v&&v.parentNode!=x;)v=v.parentNode;var A=null;if(null!=v){var N=x.firstChild;for(A=0;null!=N&&N!=v;)N=N.nextSibling,A++}return A}function G(v,A,N,J,K,m,t,D,M){try{if(b.spinner.stop(),null==A||"image/"==A.substring(0,6))if(null==v&&null!=t||null==B[v]){var L=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=aa.title&&0<aa.title.length?
-aa.title:mxResources.get("untitled"));Z.style.color=null==aa.title||0==aa.title.length?"#d0d0d0":""};x.style.backgroundImage="";z.style.display="none";var O=K,P=m;if(K>b.maxImageSize||m>b.maxImageSize){var T=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,m));K*=T;m*=T}O>P?(P=Math.round(100*P/O),O=100):(O=Math.round(100*O/P),P=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
+f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));u.appendChild(f);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";u.appendChild(A);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));u.appendChild(f);var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id",
+"croppingEllipse");B.setAttribute("name","croppingShape");B.style.margin="5px";u.appendChild(B);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));u.appendChild(f);mxEvent.addListener(x,"change",q);mxEvent.addListener(A,"change",q);mxEvent.addListener(B,"change",q);var I=document.createElement("div");I.style.textAlign="center";I.style.visibility="hidden";var G=document.createElement("input");G.setAttribute("type","range");G.setAttribute("min",
+"1");G.setAttribute("max","49");G.setAttribute("value",k);G.setAttribute("title",mxResources.get("arcSize"));I.appendChild(G);u.appendChild(I);mxEvent.addListener(G,"change",function(){k=this.value;q(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(p(),l.geometry.width,l.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){c(null,
+H.width,H.height);b.hideDialog()});C.className="geBtn";var R=document.createElement("div");R.style.marginTop="10px";R.style.textAlign="right";b.editor.cancelFirst?(R.appendChild(f),R.appendChild(C),R.appendChild(y)):(R.appendChild(C),R.appendChild(y),R.appendChild(f));u.appendChild(R);this.container=u},EditGeometryDialog=function(b,f){var g=b.editor.graph,c=1==f.length?g.getCellGeometry(f[0]):null,p=document.createElement("div"),q=document.createElement("table"),u=document.createElement("tbody"),
+y=document.createElement("tr"),H=document.createElement("td"),E=document.createElement("td");q.style.paddingLeft="6px";mxUtils.write(H,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=c&&c.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};E.appendChild(F);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");
+mxUtils.write(H,mxResources.get("left")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.x:"";E.appendChild(d);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.y:"";E.appendChild(k);y.appendChild(H);
+y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("dx")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c&&null!=c.offset?c.offset.x:"";E.appendChild(l);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("dy")+
+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c&&null!=c.offset?c.offset.y:"";E.appendChild(n);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";E.appendChild(x);y.appendChild(H);y.appendChild(E);
+u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";E.appendChild(A);y.appendChild(H);y.appendChild(E);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");E=document.createElement("td");mxUtils.write(H,mxResources.get("rotation")+":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.width="100px";B.value=1==f.length?mxUtils.getValue(g.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";E.appendChild(B);y.appendChild(H);y.appendChild(E);u.appendChild(y);q.appendChild(u);p.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();g.getModel().beginUpdate();try{for(var G=0;G<f.length;G++){var C=g.getCellGeometry(f[G]);null!=
+C&&(C=C.clone(),g.isCellMovable(f[G])&&(C.relative=F.checked,0<mxUtils.trim(d.value).length&&(C.x=Number(d.value)),0<mxUtils.trim(k.value).length&&(C.y=Number(k.value)),0<mxUtils.trim(l.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(n.value))),g.isCellResizable(f[G])&&(0<mxUtils.trim(x.value).length&&(C.width=Number(x.value)),0<mxUtils.trim(A.value).length&&(C.height=Number(A.value))),
+g.getModel().setGeometry(f[G],C));0<mxUtils.trim(B.value).length&&g.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[f[G]])}}finally{g.getModel().endUpdate()}});I.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",function(G){13==G.keyCode&&I.click()});q=document.createElement("div");q.style.marginTop="20px";q.style.textAlign="right";b.editor.cancelFirst?(q.appendChild(c),q.appendChild(I)):(q.appendChild(I),q.appendChild(c));p.appendChild(q);this.container=p},LibraryDialog=function(b,
+f,g,c,p,q,u){function y(v){for(v=document.elementFromPoint(v.clientX,v.clientY);null!=v&&v.parentNode!=x;)v=v.parentNode;var z=null;if(null!=v){var N=x.firstChild;for(z=0;null!=N&&N!=v;)N=N.nextSibling,z++}return z}function H(v,z,N,J,K,m,t,D,M){try{if(b.spinner.stop(),null==z||"image/"==z.substring(0,6))if(null==v&&null!=t||null==B[v]){var L=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=aa.title&&0<aa.title.length?
+aa.title:mxResources.get("untitled"));Z.style.color=null==aa.title||0==aa.title.length?"#d0d0d0":""};x.style.backgroundImage="";A.style.display="none";var O=K,P=m;if(K>b.maxImageSize||m>b.maxImageSize){var U=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,m));K*=U;m*=U}O>P?(P=Math.round(100*P/O),O=100):(O=Math.round(100*O/P),P=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
"0 12px";V.style.cursor="move";mxUtils.setPrefixedStyle(V.style,"transition","transform .1s ease-in-out");if(null!=v){var X=document.createElement("img");X.setAttribute("src",R.convert(v));X.style.width=O+"px";X.style.height=P+"px";X.style.margin="10px";X.style.paddingBottom=Math.floor((100-P)/2)+"px";X.style.paddingLeft=Math.floor((100-O)/2)+"px";V.appendChild(X)}else if(null!=t){var W=b.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,
V,null,!0,!1,null,null,k.shapeBackgroundColor),V.firstChild.style.display="inline-block",V.firstChild.style.cursor="")}var Y=document.createElement("img");Y.setAttribute("src",Editor.closeBlackImage);Y.setAttribute("border","0");Y.setAttribute("title",mxResources.get("delete"));Y.setAttribute("align","top");Y.style.paddingTop="4px";Y.style.position="absolute";Y.style.marginLeft="-12px";Y.style.zIndex="1";Y.style.cursor="pointer";mxEvent.addListener(Y,"dragstart",function(ka){mxEvent.consume(ka)});
-(function(ka,ba,ha){mxEvent.addListener(Y,"click",function(ma){B[ba]=null;for(var da=0;da<d.length;da++)if(null!=d[da].data&&d[da].data==ba||null!=d[da].xml&&null!=ha&&d[da].xml==ha.xml){d.splice(da,1);break}V.parentNode.removeChild(ka);0==d.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",z.style.display="");mxEvent.consume(ma)});mxEvent.addListener(Y,"dblclick",function(ma){mxEvent.consume(ma)})})(V,v,t);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
+(function(ka,ba,ia){mxEvent.addListener(Y,"click",function(la){B[ba]=null;for(var da=0;da<d.length;da++)if(null!=d[da].data&&d[da].data==ba||null!=d[da].xml&&null!=ia&&d[da].xml==ia.xml){d.splice(da,1);break}V.parentNode.removeChild(ka);0==d.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",A.style.display="");mxEvent.consume(la)});mxEvent.addListener(Y,"dblclick",function(la){mxEvent.consume(la)})})(V,v,t);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.bottom="-18px";Z.style.left="10px";Z.style.right="10px";Z.style.backgroundColor="light-dark(#ffffff, transparent)";Z.style.overflow="hidden";Z.style.textAlign="center";Z.setAttribute("title",mxResources.get("rename"));var aa=null;null!=v?(aa={data:v,w:K,h:m,title:M},null!=D&&(aa.aspect=D),B[v]=X,d.push(aa)):null!=t&&(t.aspect="fixed",d.push(t),aa=t);mxEvent.addListener(Z,"keydown",function(ka){13==ka.keyCode&&null!=C&&(C(),C=null,
-mxEvent.consume(ka))});L();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(ka){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(ka)});W=function(ka){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ba=new FilenameDialog(b,aa.title||"",mxResources.get("ok"),function(ha){null!=ha&&(aa.title=ha,L())},mxResources.get("enterValue"));b.showDialog(ba.container,300,80,!0,!0);ba.init();mxEvent.consume(ka)}else if("true"!=Z.getAttribute("contentEditable")){null!=
+mxEvent.consume(ka))});L();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(ka){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(ka)});W=function(ka){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ba=new FilenameDialog(b,aa.title||"",mxResources.get("ok"),function(ia){null!=ia&&(aa.title=ia,L())},mxResources.get("enterValue"));b.showDialog(ba.container,300,80,!0,!0);ba.init();mxEvent.consume(ka)}else if("true"!=Z.getAttribute("contentEditable")){null!=
C&&(C(),C=null);if(null==aa.title||0==aa.title.length)Z.innerText="";Z.style.textOverflow="";Z.style.whiteSpace="";Z.style.cursor="text";Z.style.color="";Z.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Z.style,"user-select","text");Z.focus();document.execCommand("selectAll",!1,null);C=function(){Z.removeAttribute("contentEditable");Z.style.cursor="pointer";aa.title=mxUtils.getTextContent(Z);L()};mxEvent.consume(ka)}};mxEvent.addListener(Z,"click",W);mxEvent.addListener(V,"dblclick",
W);x.appendChild(V);mxEvent.addListener(V,"dragstart",function(ka){null==C&&(null==v&&null!=t&&(Y.style.visibility="hidden",Z.style.visibility="hidden"),mxClient.IS_FF&&null!=t.xml&&ka.dataTransfer.setData("Text",t.xml),I=y(ka),mxClient.IS_GC&&(V.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(V,30);Y.style.visibility="";Z.style.visibility=""},0))});mxEvent.addListener(V,"dragend",function(ka){"hidden"==Y.style.visibility&&
-(Y.style.visibility="",Z.style.visibility="");I=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else U||(U=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(O=mxUtils.parseXml(v),"mxlibrary"==O.documentElement.nodeName){P=JSON.parse(mxUtils.getTextContent(O.documentElement));if(null!=P&&0<P.length)for(var fa=0;fa<P.length;fa++)null!=P[fa].xml?G(null,null,0,0,0,0,P[fa]):G(P[fa].data,null,0,0,P[fa].w,P[fa].h,null,"fixed",P[fa].title);K=!0}else if("mxfile"==
-O.documentElement.nodeName){var ea=O.documentElement.getElementsByTagName("diagram");for(fa=0;fa<ea.length;fa++){var ca=Editor.getDiagramNodeXml(ea[fa]);W=b.stringToCells(ca);if(0<W.length){var ia=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ia&&G(null,null,0,0,0,0,{xml:ca,w:ia.width,h:ia.height})}}K=!0}}catch(ka){null!=window.console&&console.error("Error in library dialog: "+ka)}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ka){null!=window.console&&
-console.log("Error in library dialog: "+ka)}return null}function E(v){v.dataTransfer.dropEffect=null!=I?"move":"copy";v.stopPropagation();v.preventDefault()}function F(v){v.stopPropagation();v.preventDefault();U=!1;H=y(v);if(null!=I)null!=H&&H<x.children.length?(d.splice(H>I?H-1:H,0,d.splice(I,1)[0]),x.insertBefore(x.children[I],x.children[H])):(d.push(d.splice(I,1)[0]),x.appendChild(x.children[I]));else if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files,0,0,b.maxImageSize,S(v));
-else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var A=decodeURIComponent(v.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(A)||/(\.png)($|\?)/i.test(A)||/(\.gif)($|\?)/i.test(A)||/(\.svg)($|\?)/i.test(A))&&b.loadImage(A,function(N){G(A,null,0,0,N.width,N.height);x.scrollTop=x.scrollHeight})}v.stopPropagation();v.preventDefault()}var d=[],k=b.editor.graph;g=document.createElement("div");g.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";
+(Y.style.visibility="",Z.style.visibility="");I=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else T||(T=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(O=mxUtils.parseXml(v),"mxlibrary"==O.documentElement.nodeName){P=JSON.parse(mxUtils.getTextContent(O.documentElement));if(null!=P&&0<P.length)for(var fa=0;fa<P.length;fa++)null!=P[fa].xml?H(null,null,0,0,0,0,P[fa]):H(P[fa].data,null,0,0,P[fa].w,P[fa].h,null,"fixed",P[fa].title);K=!0}else if("mxfile"==
+O.documentElement.nodeName){var ea=O.documentElement.getElementsByTagName("diagram");for(fa=0;fa<ea.length;fa++){var ca=Editor.getDiagramNodeXml(ea[fa]);W=b.stringToCells(ca);if(0<W.length){var ha=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ha&&H(null,null,0,0,0,0,{xml:ca,w:ha.width,h:ha.height})}}K=!0}}catch(ka){null!=window.console&&console.error("Error in library dialog: "+ka)}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ka){null!=window.console&&
+console.log("Error in library dialog: "+ka)}return null}function E(v){v.dataTransfer.dropEffect=null!=I?"move":"copy";v.stopPropagation();v.preventDefault()}function F(v){v.stopPropagation();v.preventDefault();T=!1;G=y(v);if(null!=I)null!=G&&G<x.children.length?(d.splice(G>I?G-1:G,0,d.splice(I,1)[0]),x.insertBefore(x.children[I],x.children[G])):(d.push(d.splice(I,1)[0]),x.appendChild(x.children[I]));else if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files,0,0,b.maxImageSize,S(v));
+else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var z=decodeURIComponent(v.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(z)||/(\.png)($|\?)/i.test(z)||/(\.gif)($|\?)/i.test(z)||/(\.svg)($|\?)/i.test(z))&&b.loadImage(z,function(N){H(z,null,0,0,N.width,N.height);x.scrollTop=x.scrollHeight})}v.stopPropagation();v.preventDefault()}var d=[],k=b.editor.graph;g=document.createElement("div");g.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";
l.style.height="40px";g.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",f);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";null==p||p.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==p||p.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};l.appendChild(n);
Editor.enableUncompressedLibraries&&(n.style.width="420px",f=document.createElement("input"),f.setAttribute("type","checkbox"),f.style.marginRight="10px",l.appendChild(f),mxUtils.write(l,mxResources.get("compressed")));var x=document.createElement("div");x.style.borderWidth="1px 0px 1px 0px";x.style.borderColor="#d3d3d3";x.style.borderStyle="solid";x.style.marginTop="6px";x.style.overflow="auto";x.style.height="340px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";
-0==d.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var z=document.createElement("div");z.style.position="absolute";z.style.width="640px";z.style.top="260px";z.style.textAlign="center";z.style.fontSize="22px";z.style.color="#a0c3ff";mxUtils.write(z,mxResources.get("dragImagesHere"));g.appendChild(z);var B={},I=null,H=null,C=null;l=function(v){"true"!=mxEvent.getSource(v).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(v))};mxEvent.addListener(x,
-"mousedown",l);mxEvent.addListener(x,"pointerdown",l);mxEvent.addListener(x,"touchstart",l);var R=new mxUrlConverter,U=!1;if(null!=c)for(l=0;l<c.length;l++)f=c[l],G(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(x,"dragleave",function(v){z.style.cursor="";for(var A=mxEvent.getSource(v);null!=A;){if(A==x||A==z){v.stopPropagation();v.preventDefault();break}A=A.parentNode}});var S=function(v){return function(A,N,J,K,m,t,D,M,L){null!=L&&EditorUi.isVisioFilename(L.name)?b.importVisio(L,
-mxUtils.bind(this,function(O){G(O,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," "))})):null!=L&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(A,L.name)?b.isExternalDataComms()?b.parseFile(L,mxUtils.bind(this,function(O){4==O.readyState&&(b.spinner.stop(),200<=O.status&&299>=O.status&&(G(O.responseText,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),
-b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(G(A,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",E);mxEvent.addListener(x,"drop",F);mxEvent.addListener(z,"dragover",E);mxEvent.addListener(z,"drop",F);g.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
-l.setAttribute("id","btnCancel");l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);"draw.io"!=b.getServiceName()||null==p||p.constructor!=DriveLibrary&&p.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(p,function(v){if(null!=v){var A=b.getSearch("create title mode url drive splash state clibs ui".split(" "));A+=(0==A.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(v);v=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+A,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(v.container,450,240,!0);v.init()}else p.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(p.getId(),p)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("export"),
-function(){var v=b.createLibraryDataFromImages(d),A=n.value;/(\.xml)$/i.test(A)||(A+=".xml");b.isLocalFileSave()?b.saveLocalFile(v,A,"text/xml",null,null,null!=u?u:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(A)+"&format=xml&xml="+encodeURIComponent(v))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";c.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var Q=document.createElement("input");Q.setAttribute("multiple",
-"multiple");Q.setAttribute("type","file");mxEvent.addListener(Q,"change",function(v){U=!1;b.importFiles(Q.files,0,0,b.maxImageSize,function(A,N,J,K,m,t,D,M,L){null!=Q.files&&(S(v)(A,N,J,K,m,t,D,M,L),Q.type="",Q.type="file",Q.value="")});x.scrollTop=x.scrollHeight});Q.style.display="none";document.body.appendChild(Q);b.libDlgFileInputElt=Q}f=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";
-c.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=C&&(C(),C=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(v,A,N){U=!1;if(null!=v){if("data:image/"==v.substring(0,11)){var J=v.indexOf(",");0<J&&(v=v.substring(0,J)+";base64,"+v.substring(J+1))}G(v,null,0,0,A,N);x.scrollTop=x.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";c.appendChild(f);this.saveBtnClickHandler=function(v,A,N,J){b.saveLibrary(v,A,N,J)};f=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(n.value,d,p,q)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";c.appendChild(f);b.editor.cancelFirst||c.appendChild(l);g.appendChild(c);this.container=g},EditShapeDialog=function(b,f,g,c,p){c=null!=c?c:300;p=null!=p?p:120;var q=document.createElement("table"),u=document.createElement("tbody");q.style.cellPadding="4px";var y=document.createElement("tr");var G=document.createElement("td");G.setAttribute("colspan",
-"2");G.style.fontSize="10pt";mxUtils.write(G,g);y.appendChild(G);u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");var E=document.createElement("textarea");E.style.outline="none";E.style.resize="none";E.style.width=c-200+"px";E.style.height=p+"px";this.textarea=E;this.init=function(){E.focus();E.scrollTop=0};G.appendChild(E);y.appendChild(G);G=document.createElement("td");g=document.createElement("div");g.style.position="relative";g.style.border="1px solid gray";g.style.top=
-"6px";g.style.width="200px";g.style.height=p+4+"px";g.style.overflow="hidden";g.style.marginBottom="16px";mxEvent.disableContextMenu(g);G.appendChild(g);var F=new Graph(g);F.setEnabled(!1);var d=b.editor.graph.cloneCell(f);F.addCells([d]);g=F.view.getState(d);var k="";null!=g.shape&&null!=g.shape.stencil&&(k=mxUtils.getPrettyXml(g.shape.stencil.desc));mxUtils.write(E,k||"");g=F.getGraphBounds();p=Math.min(160/g.width,(p-40)/g.height);F.view.scaleAndTranslate(p,20/p-g.x,20/p-g.y);y.appendChild(G);
-u.appendChild(y);y=document.createElement("tr");G=document.createElement("td");G.setAttribute("colspan","2");G.style.paddingTop="2px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");b.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),p.className="geBtn",G.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&G.appendChild(p);
-var l=function(n,x,z){var B=E.value,I=mxUtils.parseXml(B);B=mxUtils.getPrettyXml(I.documentElement);I=I.documentElement.getElementsByTagName("parsererror");if(null!=I&&0<I.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(z&&b.hideDialog(),I=!n.model.contains(x),!z||I||B!=k){B=Graph.compress(B);n.getModel().beginUpdate();try{if(I){var H=b.editor.graph.getFreeInsertPoint();x.geometry.x=H.x;x.geometry.y=H.y;n.addCell(x)}n.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+B+")",[x])}catch(C){throw C;}finally{n.getModel().endUpdate()}I&&(n.setSelectionCell(x),n.scrollCellToVisible(x))}};g=mxUtils.button(mxResources.get("preview"),function(){l(F,d,!1)});g.className="geBtn";G.appendChild(g);g=mxUtils.button(mxResources.get("apply"),function(){l(b.editor.graph,f,!0)});g.className="geBtn gePrimaryBtn";G.appendChild(g);b.editor.cancelFirst||G.appendChild(p);y.appendChild(G);u.appendChild(y);q.appendChild(u);this.container=q},CustomDialog=function(b,f,g,c,p,q,
-u,y,G,E,F,d){var k=document.createElement("div");k.appendChild(f);var l=document.createElement("div");l.style.marginTop=null!=d?d:"30px";l.style.textAlign="right";null!=u&&l.appendChild(u);b.isOffline()||null==q||l.appendChild(b.createHelpIcon(q));f=mxUtils.button(G||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});f.className="geBtn";y&&(f.style.display="none");b.editor.cancelFirst&&l.appendChild(f);p=mxUtils.button(p||mxResources.get("ok"),mxUtils.bind(this,function(){E||b.hideDialog(null,
-null,this.container);if(null!=g){var n=g();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}E&&b.hideDialog(null,null,this.container)}));l.appendChild(p);p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(f);if(null!=F)for(y=0;y<F.length;y++)(function(n,x,z){n=mxUtils.button(n,function(B){x(B)});null!=z&&n.setAttribute("title",z);n.className="geBtn";l.appendChild(n)})(F[y][0],F[y][1],F[y][2]);k.appendChild(l);this.cancelBtn=f;this.okButton=p;this.container=
+0==d.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var A=document.createElement("div");A.style.position="absolute";A.style.width="640px";A.style.top="260px";A.style.textAlign="center";A.style.fontSize="22px";A.style.color="#a0c3ff";mxUtils.write(A,mxResources.get("dragImagesHere"));g.appendChild(A);var B={},I=null,G=null,C=null;l=function(v){"true"!=mxEvent.getSource(v).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(v))};mxEvent.addListener(x,
+"mousedown",l);mxEvent.addListener(x,"pointerdown",l);mxEvent.addListener(x,"touchstart",l);var R=new mxUrlConverter,T=!1;if(null!=c)for(l=0;l<c.length;l++)f=c[l],H(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(x,"dragleave",function(v){A.style.cursor="";for(var z=mxEvent.getSource(v);null!=z;){if(z==x||z==A){v.stopPropagation();v.preventDefault();break}z=z.parentNode}});var S=function(v){return function(z,N,J,K,m,t,D,M,L){null!=L&&EditorUi.isVisioFilename(L.name)?b.importVisio(L,
+mxUtils.bind(this,function(O){H(O,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," "))})):null!=L&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(z,L.name)?b.isExternalDataComms()?b.parseFile(L,mxUtils.bind(this,function(O){4==O.readyState&&(b.spinner.stop(),200<=O.status&&299>=O.status&&(H(O.responseText,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),
+b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(H(z,N,J,K,m,t,D,"fixed",mxEvent.isAltDown(v)?null:D.substring(0,D.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",E);mxEvent.addListener(x,"drop",F);mxEvent.addListener(A,"dragover",E);mxEvent.addListener(A,"drop",F);g.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
+l.setAttribute("id","btnCancel");l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);"draw.io"!=b.getServiceName()||null==p||p.constructor!=DriveLibrary&&p.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(p,function(v){if(null!=v){var z=b.getSearch("create title mode url drive splash state clibs ui".split(" "));z+=(0==z.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(v);v=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+z,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(v.container,450,240,!0);v.init()}else p.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(p.getId(),p)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("export"),
+function(){var v=b.createLibraryDataFromImages(d),z=n.value;/(\.xml)$/i.test(z)||(z+=".xml");b.isLocalFileSave()?b.saveLocalFile(v,z,"text/xml",null,null,null!=u?u:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(z)+"&format=xml&xml="+encodeURIComponent(v))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";c.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var Q=document.createElement("input");Q.setAttribute("multiple",
+"multiple");Q.setAttribute("type","file");mxEvent.addListener(Q,"change",function(v){T=!1;b.importFiles(Q.files,0,0,b.maxImageSize,function(z,N,J,K,m,t,D,M,L){null!=Q.files&&(S(v)(z,N,J,K,m,t,D,M,L),Q.type="",Q.type="file",Q.value="")});x.scrollTop=x.scrollHeight});Q.style.display="none";document.body.appendChild(Q);b.libDlgFileInputElt=Q}f=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";
+c.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=C&&(C(),C=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(v,z,N){T=!1;if(null!=v){if("data:image/"==v.substring(0,11)){var J=v.indexOf(",");0<J&&(v=v.substring(0,J)+";base64,"+v.substring(J+1))}H(v,null,0,0,z,N);x.scrollTop=x.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";c.appendChild(f);this.saveBtnClickHandler=function(v,z,N,J){b.saveLibrary(v,z,N,J)};f=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(n.value,d,p,q)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";c.appendChild(f);b.editor.cancelFirst||c.appendChild(l);g.appendChild(c);this.container=g},EditShapeDialog=function(b,f,g,c,p){c=null!=c?c:300;p=null!=p?p:120;var q=document.createElement("table"),u=document.createElement("tbody");q.style.cellPadding="4px";var y=document.createElement("tr");var H=document.createElement("td");H.setAttribute("colspan",
+"2");H.style.fontSize="10pt";mxUtils.write(H,g);y.appendChild(H);u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");var E=document.createElement("textarea");E.style.outline="none";E.style.resize="none";E.style.width=c-200+"px";E.style.height=p+"px";this.textarea=E;this.init=function(){E.focus();E.scrollTop=0};H.appendChild(E);y.appendChild(H);H=document.createElement("td");g=document.createElement("div");g.style.position="relative";g.style.border="1px solid gray";g.style.top=
+"6px";g.style.width="200px";g.style.height=p+4+"px";g.style.overflow="hidden";g.style.marginBottom="16px";mxEvent.disableContextMenu(g);H.appendChild(g);var F=new Graph(g);F.setEnabled(!1);var d=b.editor.graph.cloneCell(f);F.addCells([d]);g=F.view.getState(d);var k="";null!=g.shape&&null!=g.shape.stencil&&(k=mxUtils.getPrettyXml(g.shape.stencil.desc));mxUtils.write(E,k||"");g=F.getGraphBounds();p=Math.min(160/g.width,(p-40)/g.height);F.view.scaleAndTranslate(p,20/p-g.x,20/p-g.y);y.appendChild(H);
+u.appendChild(y);y=document.createElement("tr");H=document.createElement("td");H.setAttribute("colspan","2");H.style.paddingTop="2px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),p.className="geBtn",H.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&H.appendChild(p);
+var l=function(n,x,A){var B=E.value,I=mxUtils.parseXml(B);B=mxUtils.getPrettyXml(I.documentElement);I=I.documentElement.getElementsByTagName("parsererror");if(null!=I&&0<I.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),I=!n.model.contains(x),!A||I||B!=k){B=Graph.compress(B);n.getModel().beginUpdate();try{if(I){var G=b.editor.graph.getFreeInsertPoint();x.geometry.x=G.x;x.geometry.y=G.y;n.addCell(x)}n.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+B+")",[x])}catch(C){throw C;}finally{n.getModel().endUpdate()}I&&(n.setSelectionCell(x),n.scrollCellToVisible(x))}};g=mxUtils.button(mxResources.get("preview"),function(){l(F,d,!1)});g.className="geBtn";H.appendChild(g);g=mxUtils.button(mxResources.get("apply"),function(){l(b.editor.graph,f,!0)});g.className="geBtn gePrimaryBtn";H.appendChild(g);b.editor.cancelFirst||H.appendChild(p);y.appendChild(H);u.appendChild(y);q.appendChild(u);this.container=q},CustomDialog=function(b,f,g,c,p,q,
+u,y,H,E,F,d){var k=document.createElement("div");k.appendChild(f);var l=document.createElement("div");l.style.marginTop=null!=d?d:"30px";l.style.textAlign="right";null!=u&&l.appendChild(u);b.isOffline()||null==q||l.appendChild(b.createHelpIcon(q));f=mxUtils.button(H||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});f.className="geBtn";y&&(f.style.display="none");b.editor.cancelFirst&&l.appendChild(f);p=mxUtils.button(p||mxResources.get("ok"),mxUtils.bind(this,function(){E||b.hideDialog(null,
+null,this.container);if(null!=g){var n=g();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}E&&b.hideDialog(null,null,this.container)}));l.appendChild(p);p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(f);if(null!=F)for(y=0;y<F.length;y++)(function(n,x,A){n=mxUtils.button(n,function(B){x(B)});null!=A&&n.setAttribute("title",A);n.className="geBtn";l.appendChild(n)})(F[y][0],F[y][1],F[y][2]);k.appendChild(l);this.cancelBtn=f;this.okButton=p;this.container=
k},BtnDialog=function(b,f,g,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("done"));var u="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(u=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
(u=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(u=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(u=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(u=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(u=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[u],"You are now authorized in {1}"));
-g=mxUtils.button(g,c);g.insertBefore(y,g.firstChild);g.style.marginTop="6px";g.className="geBigButton";g.style.fontSize="18px";g.style.padding="14px";p.appendChild(q);p.appendChild(b);p.appendChild(g);this.container=p},FontDialog=function(b,f,g,c,p){function q(H){this.style.border="";13==H.keyCode&&I.click()}var u=document.createElement("table"),y=document.createElement("tbody");u.style.marginTop="8px";var G=document.createElement("tr");var E=document.createElement("td");E.colSpan=2;E.style.whiteSpace=
-"nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");E.appendChild(F);var d=document.createElement("label");d.setAttribute("for","fontdialog-sysfonts");mxUtils.write(d,mxResources.get("sysFonts",null,"System Fonts"));E.appendChild(d);G.appendChild(E);
-y.appendChild(G);G=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")+":");G.appendChild(E);var k=document.createElement("input");"s"==c&&k.setAttribute("value",f);k.style.marginLeft="4px";k.style.width="250px";k.className="dlg_fontName_s";E=document.createElement("td");E.appendChild(k);G.appendChild(E);y.appendChild(G);G=document.createElement("tr");
+g=mxUtils.button(g,c);g.insertBefore(y,g.firstChild);g.style.marginTop="6px";g.className="geBigButton";g.style.fontSize="18px";g.style.padding="14px";p.appendChild(q);p.appendChild(b);p.appendChild(g);this.container=p},FontDialog=function(b,f,g,c,p){function q(G){this.style.border="";13==G.keyCode&&I.click()}var u=document.createElement("table"),y=document.createElement("tbody");u.style.marginTop="8px";var H=document.createElement("tr");var E=document.createElement("td");E.colSpan=2;E.style.whiteSpace=
+"nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");E.appendChild(F);var d=document.createElement("label");d.setAttribute("for","fontdialog-sysfonts");mxUtils.write(d,mxResources.get("sysFonts",null,"System Fonts"));E.appendChild(d);H.appendChild(E);
+y.appendChild(H);H=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")+":");H.appendChild(E);var k=document.createElement("input");"s"==c&&k.setAttribute("value",f);k.style.marginLeft="4px";k.style.width="250px";k.className="dlg_fontName_s";E=document.createElement("td");E.appendChild(k);H.appendChild(E);y.appendChild(H);H=document.createElement("tr");
E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","googlefonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-googlefonts");E.appendChild(l);d=document.createElement("label");d.setAttribute("for","fontdialog-googlefonts");mxUtils.write(d,mxResources.get("googleFonts",
-null,"Google Fonts"));E.appendChild(d);if(!b.isOffline()||EditorUi.isElectronApp)d=b.createHelpIcon("https://fonts.google.com/"),E.appendChild(d);G.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(G);G=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")+":");G.appendChild(E);var n=document.createElement("input");
-"g"==c&&n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_g";E=document.createElement("td");E.appendChild(n);G.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(G);G=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");
-x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");E.appendChild(x);d=document.createElement("label");d.setAttribute("for","fontdialog-webfonts");mxUtils.write(d,mxResources.get("webfonts",null,"Web Fonts"));E.appendChild(d);G.appendChild(E);Editor.enableWebFonts&&y.appendChild(G);G=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")+":");G.appendChild(E);var z=document.createElement("input");"w"==c&&(Editor.enableWebFonts?z.setAttribute("value",f):k.setAttribute("value",f));z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontName_w";E=document.createElement("td");E.appendChild(z);G.appendChild(E);Editor.enableWebFonts&&y.appendChild(G);G=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")+":");G.appendChild(E);var B=document.createElement("input");B.setAttribute("value",g||"");B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontUrl";E=document.createElement("td");E.appendChild(B);G.appendChild(E);Editor.enableWebFonts&&y.appendChild(G);this.init=function(){var H=k;"g"==c?H=n:"w"==c&&Editor.enableWebFonts&&(H=z);H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-H.select():document.execCommand("selectAll",!1,null)};G=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.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();p()});f.className="geBtn";b.editor.cancelFirst&&E.appendChild(f);var I=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var H=
-k.value;var C="s"}else if(l.checked){H=n.value;var R=Editor.GOOGLE_FONTS+encodeURIComponent(H).replace(/%20/g,"+");C="g"}else x.checked&&(H=z.value,R=B.value,C="w");var U=H;var S=R,Q=C,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,A=u.querySelector(".dlg_fontName_"+Q);null==A||null!=U&&0!=U.length?(A=u.querySelector(".dlg_fontUrl"),null==A||"w"!=Q||v.test(S)?U=!0:(A.style.border="1px solid red",U=!1)):(A.style.border="1px solid red",U=!1);U&&(p(H,R,C),b.hideDialog())});
-I.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",q);mxEvent.addListener(n,"keypress",q);mxEvent.addListener(z,"keypress",q);mxEvent.addListener(B,"keypress",q);mxEvent.addListener(k,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(n,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(z,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){x.setAttribute("checked",
-"checked");x.checked=!0});E.appendChild(I);b.editor.cancelFirst||E.appendChild(f);G.appendChild(E);y.appendChild(G);u.appendChild(y);this.container=u};
+null,"Google Fonts"));E.appendChild(d);if(!b.isOffline()||EditorUi.isElectronApp)d=b.createHelpIcon("https://fonts.google.com/"),E.appendChild(d);H.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(H);H=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")+":");H.appendChild(E);var n=document.createElement("input");
+"g"==c&&n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_g";E=document.createElement("td");E.appendChild(n);H.appendChild(E);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(H);H=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.fontWeight="bold";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");
+x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");E.appendChild(x);d=document.createElement("label");d.setAttribute("for","fontdialog-webfonts");mxUtils.write(d,mxResources.get("webfonts",null,"Web Fonts"));E.appendChild(d);H.appendChild(E);Editor.enableWebFonts&&y.appendChild(H);H=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")+":");H.appendChild(E);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",f):k.setAttribute("value",f));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";E=document.createElement("td");E.appendChild(A);H.appendChild(E);Editor.enableWebFonts&&y.appendChild(H);H=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")+":");H.appendChild(E);var B=document.createElement("input");B.setAttribute("value",g||"");B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontUrl";E=document.createElement("td");E.appendChild(B);H.appendChild(E);Editor.enableWebFonts&&y.appendChild(H);this.init=function(){var G=k;"g"==c?G=n:"w"==c&&Editor.enableWebFonts&&(G=A);G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+G.select():document.execCommand("selectAll",!1,null)};H=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.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();p()});f.className="geBtn";b.editor.cancelFirst&&E.appendChild(f);var I=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var G=
+k.value;var C="s"}else if(l.checked){G=n.value;var R=Editor.GOOGLE_FONTS+encodeURIComponent(G).replace(/%20/g,"+");C="g"}else x.checked&&(G=A.value,R=B.value,C="w");var T=G;var S=R,Q=C,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,z=u.querySelector(".dlg_fontName_"+Q);null==z||null!=T&&0!=T.length?(z=u.querySelector(".dlg_fontUrl"),null==z||"w"!=Q||v.test(S)?T=!0:(z.style.border="1px solid red",T=!1)):(z.style.border="1px solid red",T=!1);T&&(p(G,R,C),b.hideDialog())});
+I.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",q);mxEvent.addListener(n,"keypress",q);mxEvent.addListener(A,"keypress",q);mxEvent.addListener(B,"keypress",q);mxEvent.addListener(k,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(n,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(A,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){x.setAttribute("checked",
+"checked");x.checked=!0});E.appendChild(I);b.editor.cancelFirst||E.appendChild(f);H.appendChild(E);y.appendChild(H);u.appendChild(y);this.container=u};
function AspectDialog(b,f,g,c,p){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:g||[]};f=document.createElement("div");var q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("pages"));f.appendChild(q);g=document.createElement("div");g.className="geAspectDlgList";f.appendChild(g);q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("layers"));f.appendChild(q);q=document.createElement("div");q.className="geAspectDlgList";
f.appendChild(q);this.pagesContainer=g;this.layersContainer=q;this.ui=b;g=document.createElement("div");g.style.marginTop="16px";g.style.textAlign="center";q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=p&&p()});q.className="geBtn";b.editor.cancelFirst&&g.appendChild(q);var u=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));g.appendChild(u);u.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||g.appendChild(q);u.setAttribute("disabled","disabled");this.okBtn=u;f.appendChild(g);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -12467,34 +12469,34 @@ AspectDialog.prototype.createPageItem=function(b,f,g){var c=document.createEleme
this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var q=p.model;q=q.getChildCells(q.getRoot());for(var u=0;u<q.length;u++)this.createLayerItem(q[u],b,p,g)});mxEvent.addListener(c,"click",f);this.aspect.pageId==b&&f()};
AspectDialog.prototype.createLayerItem=function(b,f,g,c){f=g.convertValueToString(b)||mxResources.get("background")||"Background";var p=document.createElement("div");p.setAttribute("data-layer-id",b.id);p.className="geAspectDlgListItem";p.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(p);this.createViewer(p.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=p.className.indexOf("geAspectDlgListItemSelected")?
(p.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(p.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(p,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b,f){function g(C){var R=E;E=function(U,S){try{C(function(){R(U,S)},S)}catch(Q){S(Q)}}}var c=document.createElement("table"),p=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var q=b.getCurrentFile(),u=null!=q&&null!=q.getTitle()?q.getTitle():b.defaultFilename,y=/(\.png)$/i.test(u),G=/(\.svg)$/i.test(u),E=function(C,R){C()},F=null!=q?q.isLocked():!1;var d=document.createElement("tr");var k=document.createElement("td");
+var FilePropertiesDialog=function(b,f){function g(C){var R=E;E=function(T,S){try{C(function(){R(T,S)},S)}catch(Q){S(Q)}}}var c=document.createElement("table"),p=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var q=b.getCurrentFile(),u=null!=q&&null!=q.getTitle()?q.getTitle():b.defaultFilename,y=/(\.png)$/i.test(u),H=/(\.svg)$/i.test(u),E=function(C,R){C()},F=null!=q?q.isLocked():!1;var d=document.createElement("tr");var k=document.createElement("td");
k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("locked")+":");d.appendChild(k);var l=document.createElement("input");l.setAttribute("type","checkbox");F&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(l);d.appendChild(k);p.appendChild(d);this.init=function(){l.focus()};g(function(C,R){null!=b.fileNode&&F!=l.checked?window.setTimeout(function(){null!=
-q&&q.setLocked(l.checked);C()},0):C()});if(y||G){u=1;y=0;d=b.fileNode;null!=d&&(d.hasAttribute("scale")&&(u=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(y=parseInt(d.getAttribute("border"))));d=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+":");d.appendChild(k);var n=document.createElement("input");n.setAttribute("value",100*u+"%");n.style.marginLeft="4px";n.style.width="100%";
+q&&q.setLocked(l.checked);C()},0):C()});if(y||H){u=1;y=0;d=b.fileNode;null!=d&&(d.hasAttribute("scale")&&(u=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(y=parseInt(d.getAttribute("border"))));d=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+":");d.appendChild(k);var n=document.createElement("input");n.setAttribute("value",100*u+"%");n.style.marginLeft="4px";n.style.width="100%";
k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(n);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");d.appendChild(k);var x=document.createElement("input");x.setAttribute("value",y);x.style.marginLeft="4px";x.style.width="100%";k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(x);d.appendChild(k);p.appendChild(d);
-this.init=this.init||function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};g(function(C,R){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(n.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(x.value))),null!=q&&q.fileChanged());C()})}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var z=null!=q?q.isCompressed():Editor.defaultCompressed;d=document.createElement("tr");k=document.createElement("td");
-k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("compressed")+":");d.appendChild(k);var B=document.createElement("input");B.setAttribute("type","checkbox");z&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(B);d.appendChild(k);p.appendChild(d);this.init=this.init||function(){B.focus()};g(function(C,R){null!=b.fileNode&&z!=
+this.init=this.init||function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};g(function(C,R){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(n.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(x.value))),null!=q&&q.fileChanged());C()})}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var A=null!=q?q.isCompressed():Editor.defaultCompressed;d=document.createElement("tr");k=document.createElement("td");
+k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("compressed")+":");d.appendChild(k);var B=document.createElement("input");B.setAttribute("type","checkbox");A&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(B);d.appendChild(k);p.appendChild(d);this.init=this.init||function(){B.focus()};g(function(C,R){null!=b.fileNode&&A!=
B.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",B.checked?"true":"false");null!=q&&(q.compressionChanged(B.checked),q.fileChanged());C()},0):C()})}if(null!=q&&q.isRealtimeOptional()){d=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("realtimeCollaboration")+":");d.appendChild(k);var I=document.createElement("input");I.setAttribute("type",
-"checkbox");var H=q.isRealtimeEnabled();if(H="disabled"!=b.drive.getCustomProperty(q.desc,"collaboration"))I.setAttribute("checked","checked"),I.defaultChecked=!0;g(function(C,R){I.checked!=H?q.setRealtimeEnabled(I.checked,C,R):C()});this.init=null!=this.init?this.init:function(){I.focus()};k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(I);k.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));d.appendChild(k);p.appendChild(d)}null!=q&&
+"checkbox");var G=q.isRealtimeEnabled();if(G="disabled"!=b.drive.getCustomProperty(q.desc,"collaboration"))I.setAttribute("checked","checked"),I.defaultChecked=!0;g(function(C,R){I.checked!=G?q.setRealtimeEnabled(I.checked,C,R):C()});this.init=null!=this.init?this.init:function(){I.focus()};k=document.createElement("td");k.style.whiteSpace="nowrap";k.appendChild(I);k.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));d.appendChild(k);p.appendChild(d)}null!=q&&
"draw.io"==b.getServiceName()&&0<q.getSize()&&"1"!=urlParams.embed&&(d=document.createElement("tr"),k=document.createElement("td"),k.style.whiteSpace="nowrap",k.style.overflow="hidden",k.style.textOverflow="ellipsis",k.style.fontSize="10pt",mxUtils.write(k,mxResources.get("size")+":"),d.appendChild(k),k=b.formatFileSize(q.getSize()),u=document.createElement("input"),u.setAttribute("title",k),u.setAttribute("value",k),u.setAttribute("disabled","disabled"),u.style.marginLeft="4px",u.style.width="100%",
k=document.createElement("td"),k.style.whiteSpace="nowrap",k.appendChild(u),d.appendChild(k),p.appendChild(d));null!=f&&(d=document.createElement("tr"),k=document.createElement("td"),k.style.whiteSpace="nowrap",k.style.overflow="hidden",k.style.textOverflow="ellipsis",k.style.fontSize="10pt",mxUtils.write(k,mxResources.get("publicDiagramUrl")+":"),d.appendChild(k),u=document.createElement("a"),u.setAttribute("href",f),u.setAttribute("title",f),u.style.whiteSpace="nowrap",u.style.overflow="hidden",
u.style.textOverflow="ellipsis",u.style.display="block",u.style.margin="2px 0px 2px 8px",u.style.fontSize="10pt",mxUtils.write(u,f),mxEvent.addListener(u,"click",function(C){b.openLink(f);mxEvent.consume(C)}),k=document.createElement("td"),k.appendChild(u),d.appendChild(k),p.appendChild(d));null!=q&&null!=q.fileObject&&null!=q.fileObject.path&&(d=document.createElement("tr"),k=document.createElement("td"),k.style.whiteSpace="nowrap",k.style.overflow="hidden",k.style.textOverflow="ellipsis",k.style.fontSize=
"10pt",mxUtils.write(k,mxResources.get("pathFilename")+":"),d.appendChild(k),u=document.createElement("input"),u.setAttribute("title",q.fileObject.path),u.setAttribute("value",q.fileObject.path),u.setAttribute("disabled","disabled"),u.style.marginLeft="4px",u.style.width="100%",k=document.createElement("td"),k.appendChild(u),d.appendChild(k),p.appendChild(d));this.init=null!=this.init?this.init:function(){};u=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
E(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});u.className="geBtn gePrimaryBtn";d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&k.appendChild(y);k.appendChild(u);b.editor.cancelFirst||k.appendChild(y);d.appendChild(k);
p.appendChild(d);c.appendChild(p);this.container=c},ConnectionPointsDialog=function(b,f){function g(){null!=p&&p.destroy()}var c=document.createElement("div");c.style.userSelect="none";var p=null;this.init=function(){function q(J,K,m){var t="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";J=new mxCell("",new mxGeometry(J,K,6,6),t);J.vertex=!0;J.cp=!0;J.constObj=m;return d.addCell(J)}function u(J){J=d.getSelectionCells();
-d.deleteCells(J)}function y(){var J=parseInt(Q.value)||0;J=0>J?0:100<J?100:J;Q.value=J;var K=parseInt(A.value)||0;K=0>K?0:100<K?100:K;A.value=K;var m=parseInt(v.value)||0,t=parseInt(N.value)||0;m=new mxConnectionConstraint(new mxPoint(J/100,K/100),!1,null,m,t);J=d.getConnectionPoint(n,m);K=d.getSelectionCell();if(null!=K){K.constObj=m;m=K.geometry.clone();t=d.view.scale;var D=d.view.translate;m.x=(J.x-3*t)/t-D.x;m.y=(J.y-3*t)/t-D.y;d.model.setGeometry(K,m)}}function G(J){if(J.constObj)return{x:J.constObj.point.x,
-y:J.constObj.point.y,dx:J.constObj.dx,dy:J.constObj.dy};var K=0,m=0,t=k.geometry,D=mxUtils.format((J.geometry.x+3-t.x)/t.width);J=mxUtils.format((J.geometry.y+3-t.y)/t.height);0>D?(K=D*t.width,D=0):1<D&&(K=(D-1)*t.width,D=1);0>J?(m=J*t.height,J=0):1<J&&(m=(J-1)*t.height,J=1);return{x:D,y:J,dx:parseInt(K),dy:parseInt(m)}}function E(J){if(1==d.getSelectionCount()){var K=d.getSelectionCell();J&&(K.constObj=null);J=G(K);Q.value=100*J.x;A.value=100*J.y;v.value=J.dx;N.value=J.dy;S.style.visibility=""}else S.style.visibility=
+d.deleteCells(J)}function y(){var J=parseInt(Q.value)||0;J=0>J?0:100<J?100:J;Q.value=J;var K=parseInt(z.value)||0;K=0>K?0:100<K?100:K;z.value=K;var m=parseInt(v.value)||0,t=parseInt(N.value)||0;m=new mxConnectionConstraint(new mxPoint(J/100,K/100),!1,null,m,t);J=d.getConnectionPoint(n,m);K=d.getSelectionCell();if(null!=K){K.constObj=m;m=K.geometry.clone();t=d.view.scale;var D=d.view.translate;m.x=(J.x-3*t)/t-D.x;m.y=(J.y-3*t)/t-D.y;d.model.setGeometry(K,m)}}function H(J){if(J.constObj)return{x:J.constObj.point.x,
+y:J.constObj.point.y,dx:J.constObj.dx,dy:J.constObj.dy};var K=0,m=0,t=k.geometry,D=mxUtils.format((J.geometry.x+3-t.x)/t.width);J=mxUtils.format((J.geometry.y+3-t.y)/t.height);0>D?(K=D*t.width,D=0):1<D&&(K=(D-1)*t.width,D=1);0>J?(m=J*t.height,J=0):1<J&&(m=(J-1)*t.height,J=1);return{x:D,y:J,dx:parseInt(K),dy:parseInt(m)}}function E(J){if(1==d.getSelectionCount()){var K=d.getSelectionCell();J&&(K.constObj=null);J=H(K);Q.value=100*J.x;z.value=100*J.y;v.value=J.dx;N.value=J.dy;S.style.visibility=""}else S.style.visibility=
"hidden"}var F=document.createElement("div");F.style.width="350px";F.style.height="350px";F.style.overflow="hidden";F.style.borderStyle="solid";F.style.borderWidth="1px";F.style.boxSizing="border-box";mxEvent.disableContextMenu(F);c.appendChild(F);var d=new Graph(F);d.transparentBackground=!1;d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!0);d.setConnectable(!1);d.setTooltips(!1);d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;d.maxFitScale=2;F=f.geometry;
var k=new mxCell(f.value,new mxGeometry(0,0,F.width,F.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");k.vertex=!0;d.addCell(k);d.dblClick=function(J,K){if(null!=K&&K!=k)d.setSelectionCell(K);else{K=mxUtils.convertPoint(d.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=d.view.scale;var m=d.view.translate;d.setSelectionCell(q((K.x-3*J)/J-m.x,(K.y-3*J)/J-m.y))}};p=new mxKeyHandler(d);p.bindKey(46,u);p.bindKey(8,u);d.getRubberband().isForceRubberbandEvent=
-function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==k)};d.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var l=d.isCellSelectable;d.isCellSelectable=function(J){return J==k?!1:l.apply(this,arguments)};d.getLinkForCell=function(){return null};var n=d.view.getState(k);F=d.getAllConnectionConstraints(n);for(var x=0;null!=F&&x<F.length;x++){var z=d.getConnectionPoint(n,F[x]);q(z.x-3,z.y-3,F[x])}d.fit(8);d.center();x=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){d.zoomIn()});z=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){d.zoomOut()});var B=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==d.view.scale?(d.maxFitScale=8,d.fit(8)):d.zoomActual();d.center()}),I=function(){b.prompt(mxResources.get("gridSize"),d.gridSize,function(J){!isNaN(J)&&0<J&&(d.setGridSize(J),d.setGridEnabled(!0),d.refresh())})},H=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(J){mxEvent.isShiftDown(J)?
-I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(H,"dblclick",I);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),u);mxUtils.setOpacity(C,10);F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.paddingTop="6px";F.appendChild(x);F.appendChild(z);F.appendChild(B);F.appendChild(H);F.appendChild(C);c.appendChild(F);var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","1");R.setAttribute("value",
-"1");R.style.width="45px";R.style.position="relative";R.style.margin="0 4px 0 4px";var U=document.createElement("select");U.style.position="relative";z=["left","right","top","bottom"];for(x=0;x<z.length;x++)B=z[x],H=document.createElement("option"),mxUtils.write(H,mxResources.get(B)),H.value=B,U.appendChild(H);x=mxUtils.button(mxResources.get("add"),function(){var J=parseInt(R.value);J=1>J?1:100<J?100:J;R.value=J;for(var K=U.value,m=k.geometry,t=[],D=0;D<J;D++){switch(K){case "left":var M=m.x;var L=
-m.y+(D+1)*m.height/(J+1);break;case "right":M=m.x+m.width;L=m.y+(D+1)*m.height/(J+1);break;case "top":M=m.x+(D+1)*m.width/(J+1);L=m.y;break;case "bottom":M=m.x+(D+1)*m.width/(J+1),L=m.y+m.height}t.push(q(M-3,L-3))}d.setSelectionCells(t)});x.style.marginLeft="auto";F.appendChild(x);F.appendChild(R);F.appendChild(U);var S=document.createElement("div");S.style.margin="4px 0px 8px 0px";S.style.whiteSpace="nowrap";S.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));
+function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==k)};d.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var l=d.isCellSelectable;d.isCellSelectable=function(J){return J==k?!1:l.apply(this,arguments)};d.getLinkForCell=function(){return null};var n=d.view.getState(k);F=d.getAllConnectionConstraints(n);for(var x=0;null!=F&&x<F.length;x++){var A=d.getConnectionPoint(n,F[x]);q(A.x-3,A.y-3,F[x])}d.fit(8);d.center();x=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){d.zoomIn()});A=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){d.zoomOut()});var B=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==d.view.scale?(d.maxFitScale=8,d.fit(8)):d.zoomActual();d.center()}),I=function(){b.prompt(mxResources.get("gridSize"),d.gridSize,function(J){!isNaN(J)&&0<J&&(d.setGridSize(J),d.setGridEnabled(!0),d.refresh())})},G=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(J){mxEvent.isShiftDown(J)?
+I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(G,"dblclick",I);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),u);mxUtils.setOpacity(C,10);F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.paddingTop="6px";F.appendChild(x);F.appendChild(A);F.appendChild(B);F.appendChild(G);F.appendChild(C);c.appendChild(F);var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","1");R.setAttribute("value",
+"1");R.style.width="45px";R.style.position="relative";R.style.margin="0 4px 0 4px";var T=document.createElement("select");T.style.position="relative";A=["left","right","top","bottom"];for(x=0;x<A.length;x++)B=A[x],G=document.createElement("option"),mxUtils.write(G,mxResources.get(B)),G.value=B,T.appendChild(G);x=mxUtils.button(mxResources.get("add"),function(){var J=parseInt(R.value);J=1>J?1:100<J?100:J;R.value=J;for(var K=T.value,m=k.geometry,t=[],D=0;D<J;D++){switch(K){case "left":var M=m.x;var L=
+m.y+(D+1)*m.height/(J+1);break;case "right":M=m.x+m.width;L=m.y+(D+1)*m.height/(J+1);break;case "top":M=m.x+(D+1)*m.width/(J+1);L=m.y;break;case "bottom":M=m.x+(D+1)*m.width/(J+1),L=m.y+m.height}t.push(q(M-3,L-3))}d.setSelectionCells(t)});x.style.marginLeft="auto";F.appendChild(x);F.appendChild(R);F.appendChild(T);var S=document.createElement("div");S.style.margin="4px 0px 8px 0px";S.style.whiteSpace="nowrap";S.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));
S.appendChild(F);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";S.appendChild(Q);mxUtils.write(S,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";S.appendChild(v);mxUtils.write(S,"pt");F=document.createElement("span");mxUtils.write(F,mxResources.get("dy"));F.style.marginLeft="12px";S.appendChild(F);
-var A=document.createElement("input");A.setAttribute("type","number");A.setAttribute("min","0");A.setAttribute("max","100");A.style.width="45px";A.style.margin="0 4px 0 4px";S.appendChild(A);mxUtils.write(S,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";S.appendChild(N);mxUtils.write(S,"pt");c.appendChild(S);E();d.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<d.getSelectionCount()?mxUtils.setOpacity(C,60):
-mxUtils.setOpacity(C,10);E()});d.addListener(mxEvent.CELLS_MOVED,E);mxEvent.addListener(Q,"change",y);mxEvent.addListener(A,"change",y);mxEvent.addListener(v,"change",y);mxEvent.addListener(N,"change",y);F=mxUtils.button(mxResources.get("cancel"),function(){g();b.hideDialog()});F.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){var J=d.model.cells,K=[],m=[],t;for(t in J){var D=J[t];D.cp&&m.push(G(D))}m.sort(function(M,L){return M.x!=L.x?M.x-L.x:M.y!=L.y?M.y-L.y:M.dx!=L.dx?M.dx-
-L.dx:M.dy-L.dy});for(J=0;J<m.length;J++)0<J&&m[J].x==m[J-1].x&&m[J].y==m[J-1].y&&m[J].dx==m[J-1].dx&&m[J].dy==m[J-1].dy||K.push("["+m[J].x+","+m[J].y+",0,"+m[J].dx+","+m[J].dy+"]");b.editor.graph.setCellStyles("points","["+K.join(",")+"]",[f]);g();b.hideDialog()});x.className="geBtn gePrimaryBtn";z=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);g();b.hideDialog()});z.className="geBtn";B=document.createElement("div");B.style.marginTop="10px";B.style.textAlign=
-"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(F);B.appendChild(z);B.appendChild(x);b.editor.cancelFirst||B.appendChild(F);c.appendChild(B)};this.destroy=g;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
+var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("min","0");z.setAttribute("max","100");z.style.width="45px";z.style.margin="0 4px 0 4px";S.appendChild(z);mxUtils.write(S,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";S.appendChild(N);mxUtils.write(S,"pt");c.appendChild(S);E();d.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<d.getSelectionCount()?mxUtils.setOpacity(C,60):
+mxUtils.setOpacity(C,10);E()});d.addListener(mxEvent.CELLS_MOVED,E);mxEvent.addListener(Q,"change",y);mxEvent.addListener(z,"change",y);mxEvent.addListener(v,"change",y);mxEvent.addListener(N,"change",y);F=mxUtils.button(mxResources.get("cancel"),function(){g();b.hideDialog()});F.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){var J=d.model.cells,K=[],m=[],t;for(t in J){var D=J[t];D.cp&&m.push(H(D))}m.sort(function(M,L){return M.x!=L.x?M.x-L.x:M.y!=L.y?M.y-L.y:M.dx!=L.dx?M.dx-
+L.dx:M.dy-L.dy});for(J=0;J<m.length;J++)0<J&&m[J].x==m[J-1].x&&m[J].y==m[J-1].y&&m[J].dx==m[J-1].dx&&m[J].dy==m[J-1].dy||K.push("["+m[J].x+","+m[J].y+",0,"+m[J].dx+","+m[J].dy+"]");b.editor.graph.setCellStyles("points","["+K.join(",")+"]",[f]);g();b.hideDialog()});x.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);g();b.hideDialog()});A.className="geBtn";B=document.createElement("div");B.style.marginTop="10px";B.style.textAlign=
+"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(F);B.appendChild(A);B.appendChild(x);b.editor.cancelFirst||B.appendChild(F);c.appendChild(B)};this.destroy=g;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
@@ -12579,33 +12581,33 @@ Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),E
Editor.canvasSupported=!1;(function(){try{var m=document.createElement("canvas");Editor.canvasSupported=!(!m.getContext||!m.getContext("2d"))}catch(t){}})();Editor.useCanvasForExport=!1;(function(){try{var m=document.createElement("canvas"),t=new Image;t.onload=function(){try{m.getContext("2d").drawImage(t,0,0);var D=m.toDataURL("image/png");Editor.useCanvasForExport=null!=D&&6<D.length}catch(M){}};t.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(D){}})();
Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var m=document.createElement("canvas");m.width=m.height=1;var t=m.toDataURL("image/jpeg");Editor.jpgSupported=null!==t.match("image/jpeg");t=m.toDataURL("image/webp");Editor.webpSupported=null!==t.match("image/webp")}catch(D){}})();Editor.loadCompatibleCss=function(m){mxUtils.lightDarkColorSupported||mxUtils.get(m||"styles/grapheditor.css",mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){var D=document.createElement("style");
D.type="text/css";var M=D.appendChild,L=document,O=L.createTextNode;t=t.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(t=t.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(P){}M.call(D,O.call(L,t));document.head.appendChild(D)}}))};Editor.createRoughCanvas=function(m){var t=
-rough.canvas({getContext:function(){return m}});t.draw=function(D){var M=D.sets||[];D=D.options||this.getDefaultOptions();for(var L=0;L<M.length;L++){var O=M[L];switch(O.type){case "path":null!=D.stroke&&this._drawToContext(m,O,D);break;case "fillPath":this._drawToContext(m,O,D);break;case "fillSketch":this.fillSketch(m,O,D)}}};t.fillSketch=function(D,M,L){var O=m.state.strokeColor,P=m.state.strokeWidth,T=m.state.strokeAlpha,V=m.state.dashed,X=L.fillWeight;0>X&&(X=L.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);
-m.setStrokeColor(L.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(D,M,L);m.setDashed(V);m.setStrokeWidth(P);m.setStrokeColor(O);m.setStrokeAlpha(T)};t._drawToContext=function(D,M,L){D.begin();for(var O=0;O<M.ops.length;O++){var P=M.ops[O],T=P.data;switch(P.op){case "move":D.moveTo(T[0],T[1]);break;case "bcurveTo":D.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":D.lineTo(T[0],T[1])}}D.end();"fillPath"===M.type&&L.filled?D.fill():D.stroke()};return t};(function(){function m(O,
-P,T){this.canvas=O;this.rc=P;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
+rough.canvas({getContext:function(){return m}});t.draw=function(D){var M=D.sets||[];D=D.options||this.getDefaultOptions();for(var L=0;L<M.length;L++){var O=M[L];switch(O.type){case "path":null!=D.stroke&&this._drawToContext(m,O,D);break;case "fillPath":this._drawToContext(m,O,D);break;case "fillSketch":this.fillSketch(m,O,D)}}};t.fillSketch=function(D,M,L){var O=m.state.strokeColor,P=m.state.strokeWidth,U=m.state.strokeAlpha,V=m.state.dashed,X=L.fillWeight;0>X&&(X=L.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);
+m.setStrokeColor(L.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(D,M,L);m.setDashed(V);m.setStrokeWidth(P);m.setStrokeColor(O);m.setStrokeAlpha(U)};t._drawToContext=function(D,M,L){D.begin();for(var O=0;O<M.ops.length;O++){var P=M.ops[O],U=P.data;switch(P.op){case "move":D.moveTo(U[0],U[1]);break;case "bcurveTo":D.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":D.lineTo(U[0],U[1])}}D.end();"fillPath"===M.type&&L.filled?D.fill():D.stroke()};return t};(function(){function m(O,
+P,U){this.canvas=O;this.rc=P;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=
mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp=
-"L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,P){var T=1;if(null!=this.shape.state){var V=this.shape.state.cell.id;if(null!=V)for(var X=0;X<V.length;X++)T=(T<<5)-T+V.charCodeAt(X)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};V=this.rc.getDefaultOptions();T.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;O=null;(T.filled=P)?(T.fill=this.canvas.state.fillColor===
-mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):T.fill="";T.bowing=mxUtils.getValue(this.shape.style,"bowing",V.bowing);T.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",V.hachureAngle);T.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",V.curveFitting);T.roughness=mxUtils.getValue(this.shape.style,"jiggle",V.roughness);T.simplification=mxUtils.getValue(this.shape.style,"simplification",
-V.simplification);T.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",V.disableMultiStroke);T.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",V.disableMultiStrokeFill);P=mxUtils.getValue(this.shape.style,"hachureGap",-1);T.hachureGap="auto"==P?-1:P;T.dashGap=mxUtils.getValue(this.shape.style,"dashGap",P);T.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",P);T.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",P);P=mxUtils.getValue(this.shape.style,
-"fillWeight",-1);T.fillWeight="auto"==P?-1:P;P=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==P&&(P="auto");"auto"==P&&(P=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&P.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&P.push(mxUtils.hex2rgb(Editor.darkColor)),P=null!=T.fill&&(null!=O||0<=mxUtils.indexOf(P,mxUtils.hex2rgb(T.fill)))?"solid":V.fillStyle);T.fillStyle=P;return T};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+"L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,P){var U=1;if(null!=this.shape.state){var V=this.shape.state.cell.id;if(null!=V)for(var X=0;X<V.length;X++)U=(U<<5)-U+V.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};V=this.rc.getDefaultOptions();U.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;O=null;(U.filled=P)?(U.fill=this.canvas.state.fillColor===
+mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",V.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",V.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",V.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",V.roughness);U.simplification=mxUtils.getValue(this.shape.style,"simplification",
+V.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",V.disableMultiStroke);U.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",V.disableMultiStrokeFill);P=mxUtils.getValue(this.shape.style,"hachureGap",-1);U.hachureGap="auto"==P?-1:P;U.dashGap=mxUtils.getValue(this.shape.style,"dashGap",P);U.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",P);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",P);P=mxUtils.getValue(this.shape.style,
+"fillWeight",-1);U.fillWeight="auto"==P?-1:P;P=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==P&&(P="auto");"auto"==P&&(P=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&P.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&P.push(mxUtils.hex2rgb(Editor.darkColor)),P=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(P,mxUtils.hex2rgb(U.fill)))?"solid":V.fillStyle);U.fillStyle=P;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};m.prototype.lineTo=function(O,P){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
-O,P),this.lastX=O,this.lastY=P)};m.prototype.moveTo=function(O,P){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,P),this.lastX=O,this.lastY=P,this.firstX=O,this.firstY=P)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,P,T,V){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,P,T,V),this.lastX=T,this.lastY=V)};
-m.prototype.curveTo=function(O,P,T,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,P,T,V,X,W),this.lastX=X,this.lastY=W)};m.prototype.arcTo=function(O,P,T,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,O,P,T,V,X,W,Y);if(null!=Z)for(var aa=0;aa<Z.length;aa+=6)this.curveTo(Z[aa],Z[aa+1],Z[aa+2],Z[aa+3],Z[aa+4],Z[aa+5]);this.lastX=W;this.lastY=Y}};m.prototype.rect=function(O,
-P,T,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,P,T,V,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,P,T,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+T/2,P+V/2,T,V,this.getStyle(!0,!0)))};m.prototype.roundrect=function(O,P,T,V,X,W){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+
-X,P),this.lineTo(O+T-X,P),this.quadTo(O+T,P,O+T,P+W),this.lineTo(O+T,P+V-W),this.quadTo(O+T,P+V,O+T-X,P+V),this.lineTo(O+X,P+V),this.quadTo(O,P+V,O,P+V-W),this.lineTo(O,P+W),this.quadTo(O,P,O+X,P))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var P in O)this.nextShape.options[P]=O[P];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;
+O,P),this.lastX=O,this.lastY=P)};m.prototype.moveTo=function(O,P){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,P),this.lastX=O,this.lastY=P,this.firstX=O,this.firstY=P)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,P,U,V){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,P,U,V),this.lastX=U,this.lastY=V)};
+m.prototype.curveTo=function(O,P,U,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,P,U,V,X,W),this.lastX=X,this.lastY=W)};m.prototype.arcTo=function(O,P,U,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,O,P,U,V,X,W,Y);if(null!=Z)for(var aa=0;aa<Z.length;aa+=6)this.curveTo(Z[aa],Z[aa+1],Z[aa+2],Z[aa+3],Z[aa+4],Z[aa+5]);this.lastX=W;this.lastY=Y}};m.prototype.rect=function(O,
+P,U,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,P,U,V,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,P,U,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,P+V/2,U,V,this.getStyle(!0,!0)))};m.prototype.roundrect=function(O,P,U,V,X,W){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+
+X,P),this.lineTo(O+U-X,P),this.quadTo(O+U,P,O+U,P+W),this.lineTo(O+U,P+V-W),this.quadTo(O+U,P+V,O+U-X,P+V),this.lineTo(O+X,P+V),this.quadTo(O,P+V,O,P+V-W),this.lineTo(O,P+W),this.quadTo(O,P,O+X,P))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var P in O)this.nextShape.options[P]=O[P];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;
O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!0))};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;
this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new m(O,Editor.createRoughCanvas(O),this)};var t=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?t.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(O):
-this.createRoughCanvas(O)};var D=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,P,T,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||D.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var P=O.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=
-this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};T||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;M.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();T&&null!=V&&(O.addTolerance=function(){})}M.apply(this,arguments);O.addTolerance=P};var L=mxShape.prototype.paintGlassEffect;
-mxShape.prototype.paintGlassEffect=function(O,P,T,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,L.apply(this,arguments),O.handJiggle.passThrough=!1):L.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),{to:"string"})};
+this.createRoughCanvas(O)};var D=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,P,U,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||D.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var P=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=
+this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};U||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;M.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();U&&null!=V&&(O.addTolerance=function(){})}M.apply(this,arguments);O.addTolerance=P};var L=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(O,P,U,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,L.apply(this,arguments),O.handJiggle.passThrough=!1):L.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),{to:"string"})};
Editor.extractGraphModel=function(m,t,D){if(null!=m&&"undefined"!==typeof pako){var M=m.ownerDocument.getElementsByTagName("div"),L=[];if(null!=M&&0<M.length)for(var O=0;O<M.length;O++)if("mxgraph"==M[O].getAttribute("class")){L.push(M[O]);break}0<L.length&&(M=L[0].getAttribute("data-mxgraph"),null!=M?(L=JSON.parse(M),null!=L&&null!=L.xml&&(m=mxUtils.parseXml(L.xml),m=m.documentElement)):(L=L[0].getElementsByTagName("div"),0<L.length&&(M=mxUtils.getTextContent(L[0]),M=Graph.decompress(M,null,D),0<
M.length&&(m=mxUtils.parseXml(M),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(M=m.getAttribute("content"),null!=M&&"<"!=M.charAt(0)&&"%"!=M.charAt(0)&&(M=unescape(window.atob?atob(M):Base64.decode(cont,M))),null!=M&&"%"==M.charAt(0)&&(M=decodeURIComponent(M)),null!=M&&0<M.length)m=mxUtils.parseXml(M).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||t||(L=null,"diagram"==m.nodeName?L=m:"mxfile"==m.nodeName&&(M=m.getElementsByTagName("diagram"),0<M.length&&
(L=M[Math.max(0,Math.min(M.length-1,urlParams.page||0))])),null!=L&&(m=Editor.parseDiagramNode(L,D)));null==m||"mxGraphModel"==m.nodeName||t&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,t,D){Editor.validateDiagramNode(m);var M=mxUtils.trim(mxUtils.getTextContent(m)),L=null;0<M.length?(t=Graph.decompress(M,null,t),null!=t&&0<t.length&&(L=mxUtils.parseXml(t).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(L=m[0],D&&(L=Editor.parseDiagramNode(L,t,!1)),t=mxUtils.createXmlDocument(),
t.appendChild(t.importNode(L,!0)),L=t.documentElement));return L};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var t=mxUtils.getNodeValue(m),D=null;0<t.length?D=Graph.decompress(t):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(D=mxUtils.getXml(m[0])));return D};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var t=new mxCodec,D=new mxGraphModel;m.appendChild(t.encode(D))}return m};
Editor.extractGraphModelFromPdf=function(m){var t=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var D=m.indexOf("EmbeddedFile");if(-1<D){var M=m.indexOf("stream",D)+9;if(0<m.substring(D,M).indexOf("application#2Fvnd.jgraph.mxfile")){var L=m.indexOf("endstream",M-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"})}}for(D=m.indexOf("/ObjStm");0<D;){M=m.indexOf("stream",D)+9;L=m.indexOf("endstream",
-M-1);M=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"});L=M.indexOf("/Subject <");if(0<L){D=M.substring(L+14,M.indexOf(">",L));if(null!=D){t=D;D=[];for(M=0;M<t.length;M+=2)L=t.substr(M,2),"00"!=L&&D.push(String.fromCharCode(parseInt(L,16)));t=D.join("")}break}D=m.indexOf("/ObjStm",D+1)}}if(null==t&&"%PDF-1.4"==m.substring(0,8)){D="";L=M=0;for(var O=[],P=null;L<m.length;){var T=m.charCodeAt(L);L+=1;10!=T&&(D+=String.fromCharCode(T));T=="/Subject (%3Cmxfile".charCodeAt(M)?
-M++:M=0;if(19==M){var V=m.indexOf("%3C%2Fmxfile%3E",L)+15;L-=9;if(V>L){t=m.substring(L,V);break}}10==T&&("endobj"==D?P=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(P=[],O[D.split(" ")[0]]=P):null!=P&&P.push(D),D="")}}null==t&&null!=O&&(t=Editor.extractGraphModelFromXref(O));null!=t&&(t=decodeURIComponent(t.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return t};Editor.extractGraphModelFromXref=function(m){var t=m.trailer,D=null;null!=t&&(t=/.* \/Info (\d+) (\d+) R/g.exec(t.join("\n")),
+M-1);M=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"});L=M.indexOf("/Subject <");if(0<L){D=M.substring(L+14,M.indexOf(">",L));if(null!=D){t=D;D=[];for(M=0;M<t.length;M+=2)L=t.substr(M,2),"00"!=L&&D.push(String.fromCharCode(parseInt(L,16)));t=D.join("")}break}D=m.indexOf("/ObjStm",D+1)}}if(null==t&&"%PDF-1.4"==m.substring(0,8)){D="";L=M=0;for(var O=[],P=null;L<m.length;){var U=m.charCodeAt(L);L+=1;10!=U&&(D+=String.fromCharCode(U));U=="/Subject (%3Cmxfile".charCodeAt(M)?
+M++:M=0;if(19==M){var V=m.indexOf("%3C%2Fmxfile%3E",L)+15;L-=9;if(V>L){t=m.substring(L,V);break}}10==U&&("endobj"==D?P=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(P=[],O[D.split(" ")[0]]=P):null!=P&&P.push(D),D="")}}null==t&&null!=O&&(t=Editor.extractGraphModelFromXref(O));null!=t&&(t=decodeURIComponent(t.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return t};Editor.extractGraphModelFromXref=function(m){var t=m.trailer,D=null;null!=t&&(t=/.* \/Info (\d+) (\d+) R/g.exec(t.join("\n")),
null!=t&&0<t.length&&(t=m[t[1]],null!=t&&(t=/.* \/Subject (\d+) (\d+) R/g.exec(t.join("\n")),null!=t&&0<t.length&&(m=m[t[1]],null!=m&&(m=m.join("\n"),D=m.substring(1,m.length-1))))));return D};Editor.extractParserError=function(m,t){var D=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(D=t||mxResources.get("invalidChars"),t=m[0].getElementsByTagName("div"),0<t.length&&(D=mxUtils.getTextContent(t[0])));return null!=D?mxUtils.trim(D):D};Editor.addRetryToError=function(m,
t){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=t))};Editor.mermaidToDrawio=function(m,t,D){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,t,D)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");if(null!=m.customCss){var t=document.createElement("style");t.type="text/css";t.appendChild(document.createTextNode(m.customCss));document.head.appendChild(t)}null!=m.defaultFonts&&(Menus.prototype.defaultFonts=
m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&
@@ -12633,36 +12635,36 @@ this.graph.currentStyle);var M=this.graph.getBackgroundImageObject(this.graph.ba
"^"+L.url}),D.setAttribute("extFonts",M.join("|")));return D};Editor.prototype.isDataSvg=function(m){try{var t=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=t&&(null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(cont,t))),null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t)),null!=t&&0<t.length)){var D=mxUtils.parseXml(t).documentElement;return"mxfile"==D.nodeName||"mxGraphModel"==D.nodeName}}catch(M){}return!1};Editor.prototype.extractGraphModel=
function(m,t,D){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,t){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var D=function(){M=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var M=null;Editor.doMathJaxRender=
-function(P){try{null==M?(MathJax.typesetClear([P]),MathJax.typeset([P]),D()):M!=P&&Editor.mathJaxQueue.push(P)}catch(T){MathJax.typesetClear([P]),null!=T.retry?(M=P,T.retry.then(function(){MathJax.typesetPromise([P]).then(D)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());D()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());D()})):null!=window.console&&console.log("Error in MathJax.typeset: "+T.toString())}};window.MathJax=null!=t?t:
+function(P){try{null==M?(MathJax.typesetClear([P]),MathJax.typeset([P]),D()):M!=P&&Editor.mathJaxQueue.push(P)}catch(U){MathJax.typesetClear([P]),null!=U.retry?(M=P,U.retry.then(function(){MathJax.typesetPromise([P]).then(D)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());D()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());D()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=t?t:
{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var P=0;P<Editor.mathJaxQueue.length;P++)Editor.doMathJaxRender(Editor.mathJaxQueue[P])}}};Editor.MathJaxRender=function(P){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(P):Editor.mathJaxQueue.push(P)};Editor.onMathJaxDone=function(){};
-var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var P=mxUtils.bind(this,function(T,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,P);this.graph.addListener(mxEvent.REFRESH,P)};t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);t[0].parentNode.appendChild(O)}}};
+var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var P=mxUtils.bind(this,function(U,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,P);this.graph.addListener(mxEvent.REFRESH,P)};t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);t[0].parentNode.appendChild(O)}}};
Editor.prototype.csvToArray=function(m){if(0<m.length){var t="",D=[""],M=0,L=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(L&&O===t&&(D[M]+=O),L=!L):","===O&&L?O=D[++M]="":D[M]+=O,t=O;return D}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var t=EditorUi.isVisioFilename(m);t=/\.png$/i.test(m)||/\.pdf$/i.test(m)||t;var D=
"t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+D+(t?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||
"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var t=m.convert,D=this;m.convert=function(M){null!=M&&navigator.onLine&&("http://"!=M.substring(0,7)&&"https://"!=M.substring(0,8)||M.substring(0,m.baseUrl.length)==m.baseUrl||D.crossOriginImages&&D.isCorsEnabledForUrl(M)?"chrome-extension://"!=M.substring(0,19)&&(M=t.apply(this,arguments)):M=PROXY_URL+
-"?url="+encodeURIComponent(M));return M};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,t,D,M,L){try{var O=!0,P=window.setTimeout(mxUtils.bind(this,function(){O=!1;t(m)}),this.timeout),T=mxUtils.bind(this,function(){null!=M?this.convertImageToDataUri(m,t,D,M,!0):t(m)});if(/(\.svg)$/i.test(m)&&!L)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(P);O&&(200>X.getStatus()||
-299<X.getStatus()?T():t(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(P);O&&T()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(P);if(O)try{M=null!=M&&L?M:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(M,M);X.height=V.height*M;X.width=V.width*M;W.drawImage(V,0,0);t(X.toDataURL())}catch(Y){t(m)}};V.onerror=function(){window.clearTimeout(P);O&&(null!=D?D():t(m))};V.src=
-m}}catch(X){null!=D?D():t(m)}};Editor.prototype.convertImages=function(m,t,D,M){function L(){0<O.length?O.shift()():t(m)}null==M&&(M=this.createImageUrlConverter());var O=[],P=D||{};D=mxUtils.bind(this,function(T,V){T=m.getElementsByTagName(T);for(var X=0;X<T.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=M.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=P[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(P[Y]=
-aa,W.setAttribute(V,aa));L()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),L())}else null!=Y&&W.setAttribute(V,Y),L()}}catch(aa){L()}}))})(T[X])});D("image","xlink:href");D("img","src");L()};Editor.base64Encode=function(m){for(var t="",D=0,M=m.length,L,O,P;D<M;){L=m.charCodeAt(D++)&255;if(D==M){t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4);t+="==";break}O=m.charCodeAt(D++);
+"?url="+encodeURIComponent(M));return M};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,t,D,M,L){try{var O=!0,P=window.setTimeout(mxUtils.bind(this,function(){O=!1;t(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=M?this.convertImageToDataUri(m,t,D,M,!0):t(m)});if(/(\.svg)$/i.test(m)&&!L)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(P);O&&(200>X.getStatus()||
+299<X.getStatus()?U():t(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(P);O&&U()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(P);if(O)try{M=null!=M&&L?M:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(M,M);X.height=V.height*M;X.width=V.width*M;W.drawImage(V,0,0);t(X.toDataURL())}catch(Y){t(m)}};V.onerror=function(){window.clearTimeout(P);O&&(null!=D?D():t(m))};V.src=
+m}}catch(X){null!=D?D():t(m)}};Editor.prototype.convertImages=function(m,t,D,M){function L(){0<O.length?O.shift()():t(m)}null==M&&(M=this.createImageUrlConverter());var O=[],P=D||{};D=mxUtils.bind(this,function(U,V){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=M.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=P[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(P[Y]=
+aa,W.setAttribute(V,aa));L()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),L())}else null!=Y&&W.setAttribute(V,Y),L()}}catch(aa){L()}}))})(U[X])});D("image","xlink:href");D("img","src");L()};Editor.base64Encode=function(m){for(var t="",D=0,M=m.length,L,O,P;D<M;){L=m.charCodeAt(D++)&255;if(D==M){t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4);t+="==";break}O=m.charCodeAt(D++);
if(D==M){t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(O&240)>>4);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);t+="=";break}P=m.charCodeAt(D++);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(O&240)>>4);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-15)<<2|(P&192)>>6);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P&63)}return t};Editor.prototype.loadUrl=function(m,t,D,M,L,O,P,T){try{var V=!P&&(M||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));L=null!=L?L:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=t&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),
-t(W)):null!=D&&(0==W.getStatus()?D({message:mxResources.get("accessDenied")},W):404==W.getStatus()?D({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):D({message:this.getErrorMessage(W)},W))}),function(W){null!=D&&D({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){L&&null!=D&&D({code:App.ERROR_TIMEOUT,retry:X})},T)});X()}catch(W){null!=D&&D(W)}};Editor.prototype.getErrorMessage=function(m){var t=mxResources.get("error")+" "+m.getStatus();try{var D=m.getText(),
+15)<<2|(P&192)>>6);t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P&63)}return t};Editor.prototype.loadUrl=function(m,t,D,M,L,O,P,U){try{var V=!P&&(M||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));L=null!=L?L:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=t&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),
+t(W)):null!=D&&(0==W.getStatus()?D({message:mxResources.get("accessDenied")},W):404==W.getStatus()?D({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):D({message:this.getErrorMessage(W)},W))}),function(W){null!=D&&D({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){L&&null!=D&&D({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(W){null!=D&&D(W)}};Editor.prototype.getErrorMessage=function(m){var t=mxResources.get("error")+" "+m.getStatus();try{var D=m.getText(),
M=JSON.parse(D);null!=M&&null!=M.error&&null!=M.error.message&&(t=M.error.message+" ("+t+")")}catch(L){}return t};Editor.prototype.absoluteCssFonts=function(m){var t=null;if(null!=m){var D=m.split("url(");if(0<D.length){t=[D[0]];m=window.location.pathname;var M=null!=m?m.lastIndexOf("/"):-1;0<=M&&(m=m.substring(0,M+1));M=document.getElementsByTagName("base");var L=null;null!=M&&0<M.length&&(L=M[0].getAttribute("href"));for(var O=1;O<D.length;O++)if(M=D[O].indexOf(")"),0<M){var P=Editor.trimCssUrl(D[O].substring(0,
M));this.graph.isRelativeUrl(P)&&(P=null!=L?L+P:window.location.protocol+"//"+window.location.hostname+("/"==P.charAt(0)?"":m)+P);t.push('url("'+P+'"'+D[O].substring(M))}else t.push(D[O])}else t=[m]}return null!=t?t.join(""):null};Editor.prototype.mapFontUrl=function(m,t,D){/^https?:\/\//.test(t)&&!this.isCorsEnabledForUrl(t)&&(t=PROXY_URL+"?url="+encodeURIComponent(t));D(m,t)};Editor.prototype.embedCssFonts=function(m,t){var D=m.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var L=
-mxUtils.bind(this,function(){if(0==M){for(var V=[D[0]],X=1;X<D.length;X++){var W=D[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(D[X].substring(0,W))]);V.push('"'+D[X].substring(W))}t(V.join(""))}});if(0<D.length){for(m=1;m<D.length;m++){var O=D[m].indexOf(")"),P=null,T=D[m].indexOf("format(",O);0<T&&(P=Editor.trimCssUrl(D[m].substring(T+7,D[m].indexOf(")",T))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;M++;var X="application/x-font-ttf";
+mxUtils.bind(this,function(){if(0==M){for(var V=[D[0]],X=1;X<D.length;X++){var W=D[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(D[X].substring(0,W))]);V.push('"'+D[X].substring(W))}t(V.join(""))}});if(0<D.length){for(m=1;m<D.length;m++){var O=D[m].indexOf(")"),P=null,U=D[m].indexOf("format(",O);0<U&&(P=Editor.trimCssUrl(D[m].substring(U+7,D[m].indexOf(")",U))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;M++;var X="application/x-font-ttf";
if("svg"==P||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==P||"embedded-opentype"==P||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==P||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==P||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==P||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";else if("sfnt"==P||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(W,Y){this.loadUrl(Y,
mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;M--;L()}),mxUtils.bind(this,function(Z){M--;L()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(D[m].substring(0,O)),P)}L()}else t(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(t){this.resolvedFontCss=t;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},t;for(t in Graph.fontMapping)Graph.isCssFontUrl(t)&&
-(m[t]=Graph.fontMapping[t]);return m};Editor.prototype.embedExtFonts=function(m){var t=this.graph.getCustomFonts();if(0<t.length){var D=[],M=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var L=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(D.join(""),m)}),O=0;O<t.length;O++)mxUtils.bind(this,function(P,T){Graph.isCssFontUrl(T)?null==this.cachedGoogleFonts[T]?(M++,this.loadUrl(Graph.rewriteGoogleFontUrl(T),mxUtils.bind(this,function(V){this.cachedGoogleFonts[T]=
-V;D.push(V+"\n");M--;L()}),mxUtils.bind(this,function(V){M--;D.push("@import url("+T+");\n");L()}))):D.push(this.cachedGoogleFonts[T]+"\n"):D.push('@font-face {font-family: "'+P+'";src: url("'+T+'")}\n')})(t[O].name,t[O].url);L()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var t=document.getElementsByTagName("style"),D=0;D<t.length;D++){var M=mxUtils.getTextContent(t[D]);0>M.indexOf("mxPageSelector")&&0<M.indexOf("MathJax")&&m[0].appendChild(t[D].cloneNode(!0))}};
+(m[t]=Graph.fontMapping[t]);return m};Editor.prototype.embedExtFonts=function(m){var t=this.graph.getCustomFonts();if(0<t.length){var D=[],M=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var L=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(D.join(""),m)}),O=0;O<t.length;O++)mxUtils.bind(this,function(P,U){Graph.isCssFontUrl(U)?null==this.cachedGoogleFonts[U]?(M++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(V){this.cachedGoogleFonts[U]=
+V;D.push(V+"\n");M--;L()}),mxUtils.bind(this,function(V){M--;D.push("@import url("+U+");\n");L()}))):D.push(this.cachedGoogleFonts[U]+"\n"):D.push('@font-face {font-family: "'+P+'";src: url("'+U+'")}\n')})(t[O].name,t[O].url);L()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var t=document.getElementsByTagName("style"),D=0;D<t.length;D++){var M=mxUtils.getTextContent(t[D]);0>M.indexOf("mxPageSelector")&&0<M.indexOf("MathJax")&&m[0].appendChild(t[D].cloneNode(!0))}};
Editor.prototype.addFontCss=function(m,t){t=null!=t?t:this.absoluteCssFonts(this.fontCss);if(null!=t){var D=mxUtils.getSvgDefs(m),M=t.split("\n");t=[];for(var L=[],O=0;O<M.length;O++)"@import"==M[O].substring(0,7)?t.push(M[O]):L.push(M[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");m.setAttribute("type","text/css");0<t.length&&(mxUtils.setTextContent(m,t.join("\n")),D.appendChild(m));0<L.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,
-L.join("\n")),D.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,t,D){var M=mxClient.IS_FF?8192:16384;return Math.min(D,Math.min(M/m,M/t))};Editor.prototype.exportToCanvas=function(m,t,D,M,L,O,P,T,V,X,W,Y,Z,aa,fa,ea,ca,ia){try{O=null!=O?O:!0;P=null!=P?P:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var ka=V?null:Y.background;ka==mxConstants.NONE&&(ka=null);null==ka&&(ka=M);null==ka&&0==V&&
-(ka="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,P,null,null,null,X,null,ea,ca,ia),mxUtils.bind(this,function(ba){try{ba.style.setProperty("-webkit-font-smoothing","antialiased");ba.style.setProperty("-moz-osx-font-smoothing","grayscale");var ha=new Image;ha.onload=mxUtils.bind(this,function(){try{var da=function(){mxClient.IS_SF?window.setTimeout(function(){oa.drawImage(ha,0,0);m(va,ba)},0):(oa.drawImage(ha,0,0),m(va,ba))},va=document.createElement("canvas"),
-ra=parseInt(ba.getAttribute("width")),wa=parseInt(ba.getAttribute("height"));T=null!=T?T:1;null!=t&&(T=O?Math.min(1,Math.min(3*t/(4*wa),t/ra)):t/ra);T=this.getMaxCanvasScale(ra,wa,T);ra=Math.ceil(T*ra);wa=Math.ceil(T*wa);va.setAttribute("width",ra);va.setAttribute("height",wa);var oa=va.getContext("2d");if(null!=ka){var ja=mxUtils.getLightDarkColor(ka);oa.beginPath();oa.rect(0,0,ra,wa);oa.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ja.dark:ja.light;oa.fill()}1!=T&&oa.scale(T,T);if(fa){var na=
-Y.view,ua=na.scale;na.scale=1;var qa=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=ua;qa="data:image/svg+xml;base64,"+qa;var Aa=Y.gridSize*na.gridSteps*T,Ca=Y.getGraphBounds(),Da=na.translate.x*ua,za=na.translate.y*ua,Ba=Da+(Ca.x-Da)/ua-Z,Ka=za+(Ca.y-za)/ua-Z,Ma=new Image;Ma.onload=function(){try{for(var Ea=-Math.round(Aa-mxUtils.mod((Da-Ba)*T,Aa)),Ia=-Math.round(Aa-mxUtils.mod((za-Ka)*T,Aa));Ea<ra;Ea+=Aa)for(var Qa=Ia;Qa<wa;Qa+=Aa)oa.drawImage(Ma,Ea/T,Qa/T);da()}catch(La){null!=
-L&&L(La)}};Ma.onerror=function(Ea){null!=L&&L(Ea)};Ma.src=qa}else da()}catch(Ea){null!=L&&L(Ea)}});ha.onerror=function(da){null!=L&&L(da)};X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var ma=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),ha.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(da){null!=L&&L(da)}});this.embedExtFonts(mxUtils.bind(this,function(da){try{null!=da&&this.addFontCss(ba,da),this.loadFonts(ma)}catch(va){null!=
-L&&L(va)}}))}catch(da){null!=L&&L(da)}}),D,W)}catch(ba){null!=L&&L(ba)}};Editor.crcTable=[];for(var p=0;256>p;p++)for(var q=p,u=0;8>u;u++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[p]=q;Editor.updateCRC=function(m,t,D,M){for(var L=0;L<M;L++)m=Editor.crcTable[(m^t.charCodeAt(D+L))&255]^m>>>8;return m};Editor.crc32=function(m){for(var t=-1,D=0;D<m.length;D++)t=t>>>8^Editor.crcTable[(t^m.charCodeAt(D))&255];return(t^-1)>>>0};Editor.writeGraphModelToPng=function(m,t,D,M,L){function O(W,Y){var Z=
-V;V+=Y;return W.substring(Z,V)}function P(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function T(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var V=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=L&&L();else if(O(m,4),"IHDR"!=O(m,4))null!=L&&L();else{O(m,17);L=m.substring(0,V);do{var X=P(m);if("IDAT"==O(m,4)){L=m.substring(0,
-V-8);"pHYs"==t&&"dpi"==D?(D=Math.round(M/.0254),D=T(D)+T(D)+String.fromCharCode(1)):D=D+String.fromCharCode(0)+("zTXt"==t?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,t,0,4);M=Editor.updateCRC(M,D,0,D.length);L+=T(D.length)+t+D+T(M^4294967295);L+=m.substring(V-8,m.length);break}L+=m.substring(V-8,V-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(L):Base64.encode(L,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
-var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,t){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var G=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,t){var D=null;null!=m.editor.graph.getModel().getParent(t)?D=t.getId():
+L.join("\n")),D.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,t,D){var M=mxClient.IS_FF?8192:16384;return Math.min(D,Math.min(M/m,M/t))};Editor.prototype.exportToCanvas=function(m,t,D,M,L,O,P,U,V,X,W,Y,Z,aa,fa,ea,ca,ha){try{O=null!=O?O:!0;P=null!=P?P:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var ka=V?null:Y.background;ka==mxConstants.NONE&&(ka=null);null==ka&&(ka=M);null==ka&&0==V&&
+(ka="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,P,null,null,null,X,null,ea,ca,ha),mxUtils.bind(this,function(ba){try{ba.style.setProperty("-webkit-font-smoothing","antialiased");ba.style.setProperty("-moz-osx-font-smoothing","grayscale");var ia=new Image;ia.onload=mxUtils.bind(this,function(){try{var da=function(){mxClient.IS_SF?window.setTimeout(function(){va.drawImage(ia,0,0);m(ra,ba)},0):(va.drawImage(ia,0,0),m(ra,ba))},ra=document.createElement("canvas"),
+pa=parseInt(ba.getAttribute("width")),sa=parseInt(ba.getAttribute("height"));U=null!=U?U:1;null!=t&&(U=O?Math.min(1,Math.min(3*t/(4*sa),t/pa)):t/pa);U=this.getMaxCanvasScale(pa,sa,U);pa=Math.ceil(U*pa);sa=Math.ceil(U*sa);ra.setAttribute("width",pa);ra.setAttribute("height",sa);var va=ra.getContext("2d");if(null!=ka){var ja=mxUtils.getLightDarkColor(ka);va.beginPath();va.rect(0,0,pa,sa);va.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ja.dark:ja.light;va.fill()}1!=U&&va.scale(U,U);if(fa){var ma=
+Y.view,wa=ma.scale;ma.scale=1;var oa=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=wa;oa="data:image/svg+xml;base64,"+oa;var ya=Y.gridSize*ma.gridSteps*U,Ca=Y.getGraphBounds(),Fa=ma.translate.x*wa,Aa=ma.translate.y*wa,Ea=Fa+(Ca.x-Fa)/wa-Z,Oa=Aa+(Ca.y-Aa)/wa-Z,Ba=new Image;Ba.onload=function(){try{for(var Da=-Math.round(ya-mxUtils.mod((Fa-Ea)*U,ya)),Ia=-Math.round(ya-mxUtils.mod((Aa-Oa)*U,ya));Da<pa;Da+=ya)for(var Pa=Ia;Pa<sa;Pa+=ya)va.drawImage(Ba,Da/U,Pa/U);da()}catch(Ha){null!=
+L&&L(Ha)}};Ba.onerror=function(Da){null!=L&&L(Da)};Ba.src=oa}else da()}catch(Da){null!=L&&L(Da)}});ia.onerror=function(da){null!=L&&L(da)};X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var la=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),ia.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(da){null!=L&&L(da)}});this.embedExtFonts(mxUtils.bind(this,function(da){try{null!=da&&this.addFontCss(ba,da),this.loadFonts(la)}catch(ra){null!=
+L&&L(ra)}}))}catch(da){null!=L&&L(da)}}),D,W)}catch(ba){null!=L&&L(ba)}};Editor.crcTable=[];for(var p=0;256>p;p++)for(var q=p,u=0;8>u;u++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[p]=q;Editor.updateCRC=function(m,t,D,M){for(var L=0;L<M;L++)m=Editor.crcTable[(m^t.charCodeAt(D+L))&255]^m>>>8;return m};Editor.crc32=function(m){for(var t=-1,D=0;D<m.length;D++)t=t>>>8^Editor.crcTable[(t^m.charCodeAt(D))&255];return(t^-1)>>>0};Editor.writeGraphModelToPng=function(m,t,D,M,L){function O(W,Y){var Z=
+V;V+=Y;return W.substring(Z,V)}function P(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function U(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var V=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=L&&L();else if(O(m,4),"IHDR"!=O(m,4))null!=L&&L();else{O(m,17);L=m.substring(0,V);do{var X=P(m);if("IDAT"==O(m,4)){L=m.substring(0,
+V-8);"pHYs"==t&&"dpi"==D?(D=Math.round(M/.0254),D=U(D)+U(D)+String.fromCharCode(1)):D=D+String.fromCharCode(0)+("zTXt"==t?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,t,0,4);M=Editor.updateCRC(M,D,0,D.length);L+=U(D.length)+t+D+U(M^4294967295);L+=m.substring(V-8,m.length);break}L+=m.substring(V-8,V-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(L):Base64.encode(L,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
+var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,t){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var H=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,t){var D=null;null!=m.editor.graph.getModel().getParent(t)?D=t.getId():
null!=m.currentPage&&(D=m.currentPage.getId());return D});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 F=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?F.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==
Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=d.apply(this,arguments);var t=this.editorUi,D=t.editor.graph;if(D.isEnabled()){var M=t.getCurrentFile();null!=M&&M.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return t.editor.autosave},function(O){t.editor.setAutosave(O);t.editor.autosave&&M.isModified()&&M.fileChanged()},
{install:function(O){this.listener=function(){O(t.editor.autosave)};t.editor.addListener("autosaveChanged",this.listener)},destroy:function(){t.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&D.isEnabled()&&"undefined"!==typeof MathJax){var L=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return D.mathEnabled},function(O){t.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(D.mathEnabled)};t.addListener("mathEnabledChanged",
@@ -12691,36 +12693,36 @@ stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;var k=StyleFormatPanel.prototype.init;
StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));k.apply(this,arguments);null!=m.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),m.customProperties,m))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var t=
-this.editorUi.getSelectionState();1==t.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=t.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);l.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,t,D,M){function L(oa,ja,na,ua,qa){if(null!=na.valueChanged)na.valueChanged(ja,qa,D,Y);else{Z.getModel().beginUpdate();try{qa=[];var Aa=[];if(null!=na.index){for(var Ca=[],Da=na.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==
-oa;)Ca.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;na.index<Ca.length?null!=ua?Ca.splice(ua,1):Ca[na.index]=ja:Ca.push(ja);null!=na.size&&Ca.length>na.size&&(Ca=Ca.slice(0,na.size));ja=Ca.join(",");null!=na.countProperty&&(Z.setCellStyles(na.countProperty,Ca.length,Z.getSelectionCells()),qa.push(na.countProperty),Aa.push(Ca.length))}Z.setCellStyles(oa,ja,Z.getSelectionCells());qa.push(oa);Aa.push(ja);if(null!=na.dependentProps)for(oa=0;oa<na.dependentProps.length;oa++){var za=na.dependentPropsDefVal[oa],
-Ba=na.dependentPropsVals[oa];if(Ba.length>ja)Ba=Ba.slice(0,ja);else for(var Ka=Ba.length;Ka<ja;Ka++)Ba.push(za);Ba=Ba.join(",");Z.setCellStyles(na.dependentProps[oa],Ba,Z.getSelectionCells());qa.push(na.dependentProps[oa]);Aa.push(Ba)}if("function"==typeof na.onChange)na.onChange(Z,ja);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",qa,"values",Aa,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(oa,ja){ja.style.left="0px";ja.style.top="0px";ja.style.position=
-"relative";ja.style.right="0px";ja.style.bottom="0px";ja.style.width="100%";ja.style.maxWidth="100%";ja.style.maxHeight="100%";ja.style.textAlign="left"}function P(oa,ja,na){function ua(Aa){if(null==Aa||Aa==mxConstants.NONE)qa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Aa)qa.style.background="";else{var Ca=mxUtils.getLightDarkColor(Aa);mxUtils.isLightDarkColor(Aa)&&Ca.light!=Ca.dark?qa.style.background="linear-gradient(to right bottom, "+Ca.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ca).cssText+
-" 50.3%)":qa.style.background=Aa}}var qa=document.createElement("div");qa.style.width="32px";qa.style.height="8px";qa.style.margin="2px";qa.style.borderStyle="solid";qa.style.borderWidth="1px";ua(ja);btn=mxUtils.button("",mxUtils.bind(Y,function(Aa){this.editorUi.pickColor(ja,function(Ca){L(oa,Ca,na);ua(Ca)});mxEvent.consume(Aa)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(qa);return btn}function T(oa,
-ja,na,ua,qa,Aa,Ca){null!=ja&&(ja=ja.split(","),aa.push({name:oa,values:ja,type:na,defVal:ua,countProperty:qa,parentRow:Aa,isDeletable:!0,flipBkg:Ca}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Da){for(var za=Aa,Ba=0;null!=za.nextSibling;)if(za.nextSibling.getAttribute("data-pName")==oa)za=za.nextSibling,Ba++;else break;var Ka={type:na,parentRow:Aa,index:Ba,isDeletable:!0,defVal:ua,countProperty:qa};Ba=W(oa,"",Ka,0==Ba%2,Ca);L(oa,ua,Ka);za.parentNode.insertBefore(Ba,za.nextSibling);mxEvent.consume(Da)}));
-btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(oa,ja,na,ua,qa,Aa,Ca){if(0<qa){var Da=Array(qa);ja=null!=ja?ja.split(","):[];for(var za=0;za<qa;za++)Da[za]=null!=ja[za]?ja[za]:null!=ua?ua:"";aa.push({name:oa,values:Da,type:na,defVal:ua,parentRow:Aa,flipBkg:Ca,size:qa})}return document.createElement("div")}function X(oa,ja,na){var ua=document.createElement("input");ua.type="checkbox";ua.checked="1"==ja;mxEvent.addListener(ua,"change",function(){L(oa,
-ua.checked?"1":"0",na,null,ua)});return ua}function W(oa,ja,na,ua,qa){var Aa=na.dispName,Ca=na.type,Da=document.createElement("tr");Da.className="gePropRow"+(qa?"Dark":"")+(ua?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",oa);Da.setAttribute("data-pValue",ja);ua=!1;null!=na.index&&(Da.setAttribute("data-index",na.index),Aa=(null!=Aa?Aa:"")+"["+na.index+"]",ua=!0);var za=document.createElement("td");za.className="gePropRowCell";Aa=mxResources.get(Aa,null,Aa);mxUtils.write(za,Aa);za.setAttribute("title",
-Aa);ua&&(za.style.textAlign="right");Da.appendChild(za);za=document.createElement("td");za.className="gePropRowCell";za.setAttribute("title",null!=ja?decodeURIComponent(ja):mxResources.get("none"));mxEvent.addListener(za,"click",mxUtils.bind(Y,function(Ea){!mxUtils.isAncestorNode(Da,document.activeElement)&&mxUtils.isAncestorNode(Da.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Ea))}));if("color"==
-Ca)za.appendChild(P(oa,ja,na));else if("bool"==Ca||"boolean"==Ca)za.appendChild(X(oa,ja,na));else if("enum"==Ca){var Ba=na.enumList;za.innerHTML="";var Ka=document.createElement("div");Ka.className="gePropValue";za.appendChild(Ka);for(qa=0;qa<Ba.length;qa++)if(Aa=Ba[qa],Aa.val==ja){mxUtils.write(Ka,mxResources.get(Aa.dispName,null,Aa.dispName));break}mxEvent.addListener(za,"click",mxUtils.bind(Y,function(Ea){var Ia=mxEvent.getSource(Ea);if(!(Ia!=za&&Ia!=Ka||mxEvent.isConsumed(Ea))){Ka.innerHTML="";
-var Qa=document.createElement("select"),La=null;O(za,Qa);for(Ea=0;Ea<Ba.length;Ea++){Ia=Ba[Ea];var Ha=document.createElement("option");Ha.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ha,mxResources.get(Ia.dispName,null,Ia.dispName));Qa.appendChild(Ha);null==Ia.val&&(Ha.value="null",La=Ha)}Qa.value=null==ja&&null!=La?"null":ja;Ka.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Sa=mxUtils.htmlEntities(Qa.value);if(Qa[Qa.selectedIndex]==La||"null"==Sa.value)Sa=null;L(oa,Sa,na)});Qa.focus();
-mxEvent.addListener(Qa,"blur",function(){Ka.innerHTML="";for(var Sa=0;Sa<Ba.length;Sa++){var $a=Ba[Sa];if($a.val==Qa.value){mxUtils.write(Ka,mxResources.get($a.dispName,null,$a.dispName));break}}})}}))}else if("dynamicArr"==Ca)za.appendChild(T(oa,ja,na.subType,na.subDefVal,na.countProperty,Da,qa));else if("staticArr"==Ca)za.appendChild(V(oa,ja,na.subType,na.subDefVal,na.size,Da,qa));else if("readOnly"==Ca)qa=document.createElement("input"),qa.setAttribute("readonly",""),qa.value=ja,qa.style.borderWidth=
-"0px","id"==oa||"shape"==oa?(Da.firstChild.innerHTML="",Da.firstChild.setAttribute("colspan","2"),qa.style.flexGrow="1",qa.style.marginLeft="4px",qa.style.textAlign="id"==oa?"center":"left",qa.setAttribute("title",ja),Aa=document.createElement("div"),mxUtils.write(Aa,mxResources.get(oa)+":"),Aa.style.display="inline-flex",Aa.style.alignItems="center",Aa.style.width="100%",Aa.appendChild(qa),Da.firstChild.appendChild(Aa)):(qa.style.width="96px",za.appendChild(qa));else{za.innerHTML="";var Ma=document.createElement("div");
-Ma.className="gePropValue";za.appendChild(Ma);Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ja));mxEvent.addListener(za,"click",mxUtils.bind(Y,function(Ea){function Ia(){var Ha=La.value;Ha=0==Ha.length&&"string"!=Ca&&"numbers"!=Ca?0:Ha;na.allowAuto&&(null!=Ha.trim&&"auto"==Ha.trim().toLowerCase()?(Ha="auto",Ca="string"):(Ha=parseFloat(Ha),Ha=isNaN(Ha)?0:Ha));null!=na.min&&Ha<na.min?Ha=na.min:null!=na.max&&Ha>na.max&&(Ha=na.max);var Sa=null;try{Sa="numbers"==Ca?Ha.match(/\d+/g).map(Number).join(" "):
-encodeURIComponent(("int"==Ca?parseInt(Ha):Ha)+"")}catch($a){}L(oa,Sa,na,null,La)}var Qa=mxEvent.getSource(Ea);if(!(Qa!=za&&Qa!=Ma||mxEvent.isConsumed(Ea))){Ma.innerHTML="";var La=document.createElement("input");O(Ma,La);La.value=decodeURIComponent(ja);La.className="gePropEditor";"int"!=Ca&&"float"!=Ca||na.allowAuto||(La.type="number",La.step="int"==Ca?"1":"any",null!=na.min&&(La.min=parseFloat(na.min)),null!=na.max&&(La.max=parseFloat(na.max)));Ma.appendChild(La);mxEvent.addListener(La,"keypress",
-function(Ha){13==Ha.keyCode&&Ia()});La.focus();mxEvent.addListener(La,"blur",function(){Ia()})}}))}na.isDeletable&&(qa=mxUtils.button("-",mxUtils.bind(Y,function(Ea){L(oa,"",na,na.index);mxEvent.consume(Ea)})),qa.style.height="16px",qa.style.width="25px",qa.style.float="right",qa.className="geColorBtn",za.appendChild(qa));Da.appendChild(za);return Da}var Y=this,Z=this.editorUi.editor.graph,aa=[],fa=document.createElement("table");fa.className="geProperties geFullWidthElement";var ea=document.createElement("tr");
-ea.className="gePropHeader";var ca=document.createElement("th");ca.className="gePropHeaderCell";ca.style.paddingLeft="16px";ca.style.backgroundRepeat="no-repeat";ca.style.backgroundPosition="-2px 50%";ca.style.backgroundSize="20px";mxUtils.write(ca,mxResources.get("property"));ea.style.cursor="pointer";var ia=function(){var oa=fa.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ca.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ja="none";for(var na=m.childNodes.length-
-1;0<=na;na--)try{var ua=m.childNodes[na],qa=ua.nodeName.toUpperCase();"INPUT"!=qa&&"SELECT"!=qa||m.removeChild(ua)}catch(Aa){}}else ca.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ja="";for(na=0;na<oa.length;na++)oa[na].style.display=ja};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ia()});ea.appendChild(ca);var ka=document.createElement("th");ka.className="gePropHeaderCell";ka.style.paddingLeft="4px";mxUtils.write(ka,mxResources.get("value"));
-ea.appendChild(ka);fa.appendChild(ea);var ba=ka=!1;ea=null;1==D.vertices.length&&0==D.edges.length?ea=D.vertices[0].id:0==D.vertices.length&&1==D.edges.length&&(ea=D.edges[0].id);null==ea||M||(fa.appendChild(W("id",mxUtils.htmlEntities(ea),{dispName:"id",type:"readOnly"},!0,!1)),null!=D.style&&null!=D.style.shape&&fa.appendChild(W("shape",mxUtils.htmlEntities(D.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var ha in t)if(M=t[ha],("function"!=typeof M.isVisible||M.isVisible(D,this))&&
-!M.primary){var ma=null!=M.getValue?M.getValue(D,this):null!=D.style[ha]?mxUtils.htmlEntities(D.style[ha]+""):null!=M.getDefaultValue?M.getDefaultValue(D,this):M.defVal;if("separator"==M.type)ba=!ba;else{if("staticArr"==M.type)M.size=parseInt(D.style[M.sizeProperty]||t[M.sizeProperty].defVal)||0;else if(null!=M.dependentProps){var da=M.dependentProps,va=[],ra=[];for(ea=0;ea<da.length;ea++)if(null!=t[da[ea]]){var wa=D.style[da[ea]];ra.push(t[da[ea]].subDefVal);va.push(null!=wa?wa.split(","):[])}M.dependentPropsDefVal=
-ra;M.dependentPropsVals=va}fa.appendChild(W(ha,ma,M,ka,ba));ka=!ka}}for(ea=0;ea<aa.length;ea++)for(M=aa[ea],t=M.parentRow,ha=0;ha<M.values.length;ha++)ka=W(M.name,M.values[ha],{type:M.type,parentRow:M.parentRow,isDeletable:M.isDeletable,index:ha,defVal:M.defVal,countProperty:M.countProperty,size:M.size},0==ha%2,M.flipBkg),t.parentNode.insertBefore(ka,t.nextSibling),t=ka;m.appendChild(fa);ia();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var t=this.editorUi,
-D=t.editor.graph,M=document.createElement("div");M.style.padding="6px 20px 0 24px";m.appendChild(M);var L=document.createElement("div");L.className="geSwitcher";L.style.padding="4px 18px 6px 0px";for(var O=[],P=0;P<this.defaultColorSchemes.length;P++){var T=document.createElement("div");T.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){V(Z)}))})(P);O.push(T);L.appendChild(T)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&
+this.editorUi.getSelectionState();1==t.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=t.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);l.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,t,D,M){function L(va,ja,ma,wa,oa){if(null!=ma.valueChanged)ma.valueChanged(ja,oa,D,Y);else{Z.getModel().beginUpdate();try{oa=[];var ya=[];if(null!=ma.index){for(var Ca=[],Fa=ma.parentRow.nextSibling;Fa&&Fa.getAttribute("data-pName")==
+va;)Ca.push(Fa.getAttribute("data-pValue")),Fa=Fa.nextSibling;ma.index<Ca.length?null!=wa?Ca.splice(wa,1):Ca[ma.index]=ja:Ca.push(ja);null!=ma.size&&Ca.length>ma.size&&(Ca=Ca.slice(0,ma.size));ja=Ca.join(",");null!=ma.countProperty&&(Z.setCellStyles(ma.countProperty,Ca.length,Z.getSelectionCells()),oa.push(ma.countProperty),ya.push(Ca.length))}Z.setCellStyles(va,ja,Z.getSelectionCells());oa.push(va);ya.push(ja);if(null!=ma.dependentProps)for(va=0;va<ma.dependentProps.length;va++){var Aa=ma.dependentPropsDefVal[va],
+Ea=ma.dependentPropsVals[va];if(Ea.length>ja)Ea=Ea.slice(0,ja);else for(var Oa=Ea.length;Oa<ja;Oa++)Ea.push(Aa);Ea=Ea.join(",");Z.setCellStyles(ma.dependentProps[va],Ea,Z.getSelectionCells());oa.push(ma.dependentProps[va]);ya.push(Ea)}if("function"==typeof ma.onChange)ma.onChange(Z,ja);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",oa,"values",ya,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(va,ja){ja.style.left="0px";ja.style.top="0px";ja.style.position=
+"relative";ja.style.right="0px";ja.style.bottom="0px";ja.style.width="100%";ja.style.maxWidth="100%";ja.style.maxHeight="100%";ja.style.textAlign="left"}function P(va,ja,ma){function wa(ya){if(null==ya||ya==mxConstants.NONE)oa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ya)oa.style.background="";else{var Ca=mxUtils.getLightDarkColor(ya);mxUtils.isLightDarkColor(ya)&&Ca.light!=Ca.dark?oa.style.background="linear-gradient(to right bottom, "+Ca.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ca).cssText+
+" 50.3%)":oa.style.background=ya}}var oa=document.createElement("div");oa.style.width="32px";oa.style.height="8px";oa.style.margin="2px";oa.style.borderStyle="solid";oa.style.borderWidth="1px";wa(ja);btn=mxUtils.button("",mxUtils.bind(Y,function(ya){this.editorUi.pickColor(ja,function(Ca){L(va,Ca,ma);wa(Ca)});mxEvent.consume(ya)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function U(va,
+ja,ma,wa,oa,ya,Ca){null!=ja&&(ja=ja.split(","),aa.push({name:va,values:ja,type:ma,defVal:wa,countProperty:oa,parentRow:ya,isDeletable:!0,flipBkg:Ca}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Fa){for(var Aa=ya,Ea=0;null!=Aa.nextSibling;)if(Aa.nextSibling.getAttribute("data-pName")==va)Aa=Aa.nextSibling,Ea++;else break;var Oa={type:ma,parentRow:ya,index:Ea,isDeletable:!0,defVal:wa,countProperty:oa};Ea=W(va,"",Oa,0==Ea%2,Ca);L(va,wa,Oa);Aa.parentNode.insertBefore(Ea,Aa.nextSibling);mxEvent.consume(Fa)}));
+btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(va,ja,ma,wa,oa,ya,Ca){if(0<oa){var Fa=Array(oa);ja=null!=ja?ja.split(","):[];for(var Aa=0;Aa<oa;Aa++)Fa[Aa]=null!=ja[Aa]?ja[Aa]:null!=wa?wa:"";aa.push({name:va,values:Fa,type:ma,defVal:wa,parentRow:ya,flipBkg:Ca,size:oa})}return document.createElement("div")}function X(va,ja,ma){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ja;mxEvent.addListener(wa,"change",function(){L(va,
+wa.checked?"1":"0",ma,null,wa)});return wa}function W(va,ja,ma,wa,oa){var ya=ma.dispName,Ca=ma.type,Fa=document.createElement("tr");Fa.className="gePropRow"+(oa?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Fa.setAttribute("data-pName",va);Fa.setAttribute("data-pValue",ja);wa=!1;null!=ma.index&&(Fa.setAttribute("data-index",ma.index),ya=(null!=ya?ya:"")+"["+ma.index+"]",wa=!0);var Aa=document.createElement("td");Aa.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(Aa,ya);Aa.setAttribute("title",
+ya);wa&&(Aa.style.textAlign="right");Fa.appendChild(Aa);Aa=document.createElement("td");Aa.className="gePropRowCell";Aa.setAttribute("title",null!=ja?decodeURIComponent(ja):mxResources.get("none"));mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Da){!mxUtils.isAncestorNode(Fa,document.activeElement)&&mxUtils.isAncestorNode(Fa.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Da))}));if("color"==
+Ca)Aa.appendChild(P(va,ja,ma));else if("bool"==Ca||"boolean"==Ca)Aa.appendChild(X(va,ja,ma));else if("enum"==Ca){var Ea=ma.enumList;Aa.innerHTML="";var Oa=document.createElement("div");Oa.className="gePropValue";Aa.appendChild(Oa);for(oa=0;oa<Ea.length;oa++)if(ya=Ea[oa],ya.val==ja){mxUtils.write(Oa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Da){var Ia=mxEvent.getSource(Da);if(!(Ia!=Aa&&Ia!=Oa||mxEvent.isConsumed(Da))){Oa.innerHTML="";
+var Pa=document.createElement("select"),Ha=null;O(Aa,Pa);for(Da=0;Da<Ea.length;Da++){Ia=Ea[Da];var Ka=document.createElement("option");Ka.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ka,mxResources.get(Ia.dispName,null,Ia.dispName));Pa.appendChild(Ka);null==Ia.val&&(Ka.value="null",Ha=Ka)}Pa.value=null==ja&&null!=Ha?"null":ja;Oa.appendChild(Pa);mxEvent.addListener(Pa,"change",function(){var Xa=mxUtils.htmlEntities(Pa.value);if(Pa[Pa.selectedIndex]==Ha||"null"==Xa.value)Xa=null;L(va,Xa,ma)});Pa.focus();
+mxEvent.addListener(Pa,"blur",function(){Oa.innerHTML="";for(var Xa=0;Xa<Ea.length;Xa++){var qb=Ea[Xa];if(qb.val==Pa.value){mxUtils.write(Oa,mxResources.get(qb.dispName,null,qb.dispName));break}}})}}))}else if("dynamicArr"==Ca)Aa.appendChild(U(va,ja,ma.subType,ma.subDefVal,ma.countProperty,Fa,oa));else if("staticArr"==Ca)Aa.appendChild(V(va,ja,ma.subType,ma.subDefVal,ma.size,Fa,oa));else if("readOnly"==Ca)oa=document.createElement("input"),oa.setAttribute("readonly",""),oa.value=ja,oa.style.borderWidth=
+"0px","id"==va||"shape"==va?(Fa.firstChild.innerHTML="",Fa.firstChild.setAttribute("colspan","2"),oa.style.flexGrow="1",oa.style.marginLeft="4px",oa.style.textAlign="id"==va?"center":"left",oa.setAttribute("title",ja),ya=document.createElement("div"),mxUtils.write(ya,mxResources.get(va)+":"),ya.style.display="inline-flex",ya.style.alignItems="center",ya.style.width="100%",ya.appendChild(oa),Fa.firstChild.appendChild(ya)):(oa.style.width="96px",Aa.appendChild(oa));else{Aa.innerHTML="";var Ba=document.createElement("div");
+Ba.className="gePropValue";Aa.appendChild(Ba);Ba.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ja));mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Da){function Ia(){var Ka=Ha.value;Ka=0==Ka.length&&"string"!=Ca&&"numbers"!=Ca?0:Ka;ma.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ca="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ma.min&&Ka<ma.min?Ka=ma.min:null!=ma.max&&Ka>ma.max&&(Ka=ma.max);var Xa=null;try{Xa="numbers"==Ca?Ka.match(/\d+/g).map(Number).join(" "):
+encodeURIComponent(("int"==Ca?parseInt(Ka):Ka)+"")}catch(qb){}L(va,Xa,ma,null,Ha)}var Pa=mxEvent.getSource(Da);if(!(Pa!=Aa&&Pa!=Ba||mxEvent.isConsumed(Da))){Ba.innerHTML="";var Ha=document.createElement("input");O(Ba,Ha);Ha.value=decodeURIComponent(ja);Ha.className="gePropEditor";"int"!=Ca&&"float"!=Ca||ma.allowAuto||(Ha.type="number",Ha.step="int"==Ca?"1":"any",null!=ma.min&&(Ha.min=parseFloat(ma.min)),null!=ma.max&&(Ha.max=parseFloat(ma.max)));Ba.appendChild(Ha);mxEvent.addListener(Ha,"keypress",
+function(Ka){13==Ka.keyCode&&Ia()});Ha.focus();mxEvent.addListener(Ha,"blur",function(){Ia()})}}))}ma.isDeletable&&(oa=mxUtils.button("-",mxUtils.bind(Y,function(Da){L(va,"",ma,ma.index);mxEvent.consume(Da)})),oa.style.height="16px",oa.style.width="25px",oa.style.float="right",oa.className="geColorBtn",Aa.appendChild(oa));Fa.appendChild(Aa);return Fa}var Y=this,Z=this.editorUi.editor.graph,aa=[],fa=document.createElement("table");fa.className="geProperties geFullWidthElement";var ea=document.createElement("tr");
+ea.className="gePropHeader";var ca=document.createElement("th");ca.className="gePropHeaderCell";ca.style.paddingLeft="16px";ca.style.backgroundRepeat="no-repeat";ca.style.backgroundPosition="-2px 50%";ca.style.backgroundSize="20px";mxUtils.write(ca,mxResources.get("property"));ea.style.cursor="pointer";var ha=function(){var va=fa.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ca.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ja="none";for(var ma=m.childNodes.length-
+1;0<=ma;ma--)try{var wa=m.childNodes[ma],oa=wa.nodeName.toUpperCase();"INPUT"!=oa&&"SELECT"!=oa||m.removeChild(wa)}catch(ya){}}else ca.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ja="";for(ma=0;ma<va.length;ma++)va[ma].style.display=ja};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ha()});ea.appendChild(ca);var ka=document.createElement("th");ka.className="gePropHeaderCell";ka.style.paddingLeft="4px";mxUtils.write(ka,mxResources.get("value"));
+ea.appendChild(ka);fa.appendChild(ea);var ba=ka=!1;ea=null;1==D.vertices.length&&0==D.edges.length?ea=D.vertices[0].id:0==D.vertices.length&&1==D.edges.length&&(ea=D.edges[0].id);null==ea||M||(fa.appendChild(W("id",mxUtils.htmlEntities(ea),{dispName:"id",type:"readOnly"},!0,!1)),null!=D.style&&null!=D.style.shape&&fa.appendChild(W("shape",mxUtils.htmlEntities(D.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var ia in t)if(M=t[ia],("function"!=typeof M.isVisible||M.isVisible(D,this))&&
+!M.primary){var la=null!=M.getValue?M.getValue(D,this):null!=D.style[ia]?mxUtils.htmlEntities(D.style[ia]+""):null!=M.getDefaultValue?M.getDefaultValue(D,this):M.defVal;if("separator"==M.type)ba=!ba;else{if("staticArr"==M.type)M.size=parseInt(D.style[M.sizeProperty]||t[M.sizeProperty].defVal)||0;else if(null!=M.dependentProps){var da=M.dependentProps,ra=[],pa=[];for(ea=0;ea<da.length;ea++)if(null!=t[da[ea]]){var sa=D.style[da[ea]];pa.push(t[da[ea]].subDefVal);ra.push(null!=sa?sa.split(","):[])}M.dependentPropsDefVal=
+pa;M.dependentPropsVals=ra}fa.appendChild(W(ia,la,M,ka,ba));ka=!ka}}for(ea=0;ea<aa.length;ea++)for(M=aa[ea],t=M.parentRow,ia=0;ia<M.values.length;ia++)ka=W(M.name,M.values[ia],{type:M.type,parentRow:M.parentRow,isDeletable:M.isDeletable,index:ia,defVal:M.defVal,countProperty:M.countProperty,size:M.size},0==ia%2,M.flipBkg),t.parentNode.insertBefore(ka,t.nextSibling),t=ka;m.appendChild(fa);ha();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var t=this.editorUi,
+D=t.editor.graph,M=document.createElement("div");M.style.padding="6px 20px 0 24px";m.appendChild(M);var L=document.createElement("div");L.className="geSwitcher";L.style.padding="4px 18px 6px 0px";for(var O=[],P=0;P<this.defaultColorSchemes.length;P++){var U=document.createElement("div");U.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){V(Z)}))})(P);O.push(U);L.appendChild(U)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&
null!=O[this.format.currentScheme]&&(O[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(D.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?
-aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:"default";D.replaceDefaultColors(new mxCell,aa);var fa=mxUtils.bind(this,function(ca){var ia=mxUtils.button("",mxUtils.bind(this,function(ha){D.getModel().beginUpdate();try{for(var ma=t.getSelectionState().cells,da=0;da<ma.length;da++){var va=D.getModel().getStyle(ma[da]);null!=ca?(mxEvent.isShiftDown(ha)||(va=""==ca.fill||null==ca.fill?mxUtils.setStyle(va,
-mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,ca.fill),va=""==ca.gradient||null==ca.gradient?mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,ca.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!D.getModel().isVertex(ma[da])||(va=""==ca.font||null==ca.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,ca.font))),mxEvent.isAltDown(ha)||
-(va=""==ca.stroke||null==ca.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,ca.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),D.getModel().isVertex(ma[da])&&(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));D.getModel().setStyle(ma[da],va)}}finally{D.getModel().endUpdate()}}));ia.className=
-"geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin="0px 6px 6px 0px";if(null!=ca){var ka="1px solid";null!=ca.border&&(ka=ca.border);if(null!=ca.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ca.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ca.gradient).cssText+" 100%)";else if(ca.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ca.fill||""==ca.fill)ia.style.backgroundColor=
-mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(ca.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==ca.stroke||ca.stroke==mxConstants.NONE?ia.style.border=ka+" transparent":""==ca.stroke?ia.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(ca.stroke),ia.style.border=
-ka+" "+ba.cssText,ia.style.borderRightColor=ba.light,ia.style.borderBottomColor=ia.style.borderRightColor);null!=ca.title&&ia.setAttribute("title",ca.title)}else ka=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=ka,ia.style.border="1px solid "+ba;ia.style.borderRadius="0";M.appendChild(ia);null!=ca&&null!=ca.gradient&&(ka=ia.cloneNode(!1),ka.style.backgroundImage="linear-gradient(light-dark(transparent, "+
-mxUtils.getLightDarkColor(ca.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ca.gradient).light+") 100%)",ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ka.style.backgroundColor="transparent",M.appendChild(ka),ka.style.marginLeft="-42px",mxEvent.addListener(ka,"click",function(){ia.click()}))});M.innerText="";if(null!=Z)for(var ea=0;ea<Z.length;ea++)0<ea&&0==mxUtils.mod(ea,4)&&mxUtils.br(M),fa(Z[ea])});null==this.format.currentScheme?V(Math.min(O.length-1,Editor.isDarkMode()?
+aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:"default";D.replaceDefaultColors(new mxCell,aa);var fa=mxUtils.bind(this,function(ca){var ha=mxUtils.button("",mxUtils.bind(this,function(ia){D.getModel().beginUpdate();try{for(var la=t.getSelectionState().cells,da=0;da<la.length;da++){var ra=D.getModel().getStyle(la[da]);null!=ca?(mxEvent.isShiftDown(ia)||(ra=""==ca.fill||null==ca.fill?mxUtils.setStyle(ra,
+mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,ca.fill),ra=""==ca.gradient||null==ca.gradient?mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,ca.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!D.getModel().isVertex(la[da])||(ra=""==ca.font||null==ca.font?mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,ca.font))),mxEvent.isAltDown(ia)||
+(ra=""==ca.stroke||null==ca.fill?mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,ca.stroke))):(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null),D.getModel().isVertex(la[da])&&(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null)));D.getModel().setStyle(la[da],ra)}}finally{D.getModel().endUpdate()}}));ha.className=
+"geStyleButton";ha.style.width="36px";ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ha.style.margin="0px 6px 6px 0px";if(null!=ca){var ka="1px solid";null!=ca.border&&(ka=ca.border);if(null!=ca.gradient)ha.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ca.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ca.gradient).cssText+" 100%)";else if(ca.fill==mxConstants.NONE)ha.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ca.fill||""==ca.fill)ha.style.backgroundColor=
+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(ca.fill);ha.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==ca.stroke||ca.stroke==mxConstants.NONE?ha.style.border=ka+" transparent":""==ca.stroke?ha.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(ca.stroke),ha.style.border=
+ka+" "+ba.cssText,ha.style.borderRightColor=ba.light,ha.style.borderBottomColor=ha.style.borderRightColor);null!=ca.title&&ha.setAttribute("title",ca.title)}else ka=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000"),ha.style.backgroundColor=ka,ha.style.border="1px solid "+ba;ha.style.borderRadius="0";M.appendChild(ha);null!=ca&&null!=ca.gradient&&(ka=ha.cloneNode(!1),ka.style.backgroundImage="linear-gradient(light-dark(transparent, "+
+mxUtils.getLightDarkColor(ca.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ca.gradient).light+") 100%)",ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ka.style.backgroundColor="transparent",M.appendChild(ka),ka.style.marginLeft="-42px",mxEvent.addListener(ka,"click",function(){ha.click()}))});M.innerText="";if(null!=Z)for(var ea=0;ea<Z.length;ea++)0<ea&&0==mxUtils.mod(ea,4)&&mxUtils.br(M),fa(Z[ea])});null==this.format.currentScheme?V(Math.min(O.length-1,Editor.isDarkMode()?
1:"1"==urlParams.sketch?5:0)):V(this.format.currentScheme);P=10>=this.defaultColorSchemes.length?43:23;var W=document.createElement("div");W.className="geButton";W.style.cssText="position:absolute;left:0px;bottom:"+P+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(W,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+
P+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(m.appendChild(W),m.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(L)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+
@@ -12729,46 +12731,46 @@ function(m,t,D,M){if(null!=m&&0<m.length&&null!=t&&0<t.length){M=null!=M?M:Graph
(O.elt.onload=D,O.elt.onerror=D):D()),null!=t&&t.appendChild(O.elt)):null!=D&&D()}else null!=D&&D()}else null!=D&&D();return m};Graph.getFontUrl=function(m,t){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(t=m.url);return t};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var t=0;t<m.length;t++){var D=m[t].getAttribute("data-font-src");if(null!=D){var M="FONT"==m[t].nodeName?m[t].getAttribute("face"):m[t].style.fontFamily;null!=M&&Graph.addFont(M,D)}}};Graph.processFontStyle=
function(m){if(null!=m){var t=mxUtils.getValue(m,"fontSource",null);if(null!=t){var D=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=D)try{Graph.addFont(D,decodeURIComponent(t))}catch(M){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function m(L){t=L}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var t=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(L){t=null});
-this.isMouseInsertPoint=function(){return null!=t};var D=this.getInsertPoint;this.getInsertPoint=function(){return null!=t?this.getPointForEvent(t):D.apply(this,arguments)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=function(L){var O=this.graph.getCellStyle(L);if(null!=O&&"rack"==O.childLayout){var P=new mxStackLayout(this.graph,!1);P.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;P.marginLeft=O.marginLeft||
-0;P.marginRight=O.marginRight||0;P.marginTop=O.marginTop||0;P.marginBottom=O.marginBottom||0;P.allowGaps=O.allowGaps||0;P.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");P.resizeParent=!1;P.fill=!0;return P}return M.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,t){return Graph.processFontStyle(x.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=
-function(m,t,D,M,L,O,P,T,V,X,W,Y){z.apply(this,arguments);Graph.processFontAttributes(Y)};var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,t,D,M){function L(){for(var ea=T.getSelectionCells(),ca=[],ia=0;ia<ea.length;ia++)T.isCellVisible(ea[ia])&&ca.push(ea[ia]);T.setSelectionCells(ca)}function O(ea){T.setHiddenTags(ea?[]:V.slice());
-L();T.refresh()}function P(ea,ca){W.innerText="";if(0<ea.length){var ia=document.createElement("table");ia.setAttribute("cellpadding","2");ia.style.boxSizing="border-box";ia.style.tableLayout="fixed";ia.style.width="100%";var ka=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(ha){function ma(){var ja=T.getCellsForTags([ha],null,null,!0);T.isEnabled()?T.setSelectionCells(ja):T.highlightCells(ja,null,null,70)}var da=0>mxUtils.indexOf(T.hiddenTags,ha),
-va=document.createElement("tr"),ra=document.createElement("td");ra.style.align="center";ra.style.width="16px";var wa=document.createElement("img");wa.setAttribute("src",da?Editor.visibleImage:Editor.hiddenImage);wa.setAttribute("title",mxResources.get(da?"hideIt":"show",[ha]));mxUtils.setOpacity(wa,da?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width="16px";if(t||Editor.isDarkMode())wa.style.filter="invert(100%)";ra.appendChild(wa);mxEvent.addListener(wa,
-"click",function(ja){mxEvent.isShiftDown(ja)?O(0<=mxUtils.indexOf(T.hiddenTags,ha)):(T.toggleHiddenTag(ha),L(),T.refresh());mxEvent.consume(ja)});va.appendChild(ra);ra=document.createElement("td");ra.style.align="center";ra.style.width="16px";wa=document.createElement("img");wa.setAttribute("src",Editor.selectImage);wa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(wa,da?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width=
-"16px";if(t||Editor.isDarkMode())wa.style.filter="invert(100%)";mxEvent.addListener(wa,"click",function(ja){O(!0);ma();mxEvent.consume(ja)});ra.appendChild(wa);va.appendChild(ra);ra=document.createElement("td");ra.style.overflow="hidden";ra.style.whiteSpace="nowrap";ra.style.textOverflow="ellipsis";ra.style.verticalAlign="middle";ra.style.cursor="pointer";ra.setAttribute("title",ha);a=document.createElement("a");mxUtils.write(a,ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,
-da?100:40);ra.appendChild(a);mxEvent.addListener(ra,"click",function(ja){if(mxEvent.isShiftDown(ja))O(!0),ma();else if(da&&0<T.hiddenTags.length)O(!0);else{var na=V.slice(),ua=mxUtils.indexOf(na,ha);na.splice(ua,1);T.setHiddenTags(na);L();T.refresh()}mxEvent.consume(ja)});va.appendChild(ra);if(T.isEnabled()){ra=document.createElement("td");ra.style.verticalAlign="middle";ra.style.textAlign="center";ra.style.width="18px";if(null==ca){ra.style.align="center";ra.style.width="16px";wa=document.createElement("img");
-wa.setAttribute("src",Editor.trashImage);wa.setAttribute("title",mxResources.get("removeIt",[ha]));mxUtils.setOpacity(wa,da?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width="16px";if(t||Editor.isDarkMode())wa.style.filter="invert(100%)";mxEvent.addListener(wa,"click",function(ja){var na=mxUtils.indexOf(V,ha);0<=na&&V.splice(na,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[ha]);T.refresh();mxEvent.consume(ja)});ra.appendChild(wa)}else{var oa=
-document.createElement("input");oa.setAttribute("type","checkbox");oa.style.margin="0px";oa.defaultChecked=null!=ca&&0<=mxUtils.indexOf(ca,ha);oa.checked=oa.defaultChecked;oa.style.background="transparent";oa.setAttribute("title",mxResources.get(oa.defaultChecked?"removeIt":"add",[ha]));mxEvent.addListener(oa,"change",function(ja){oa.checked?T.addTagsForCells(T.getSelectionCells(),[ha]):T.removeTagsForCells(T.getSelectionCells(),[ha]);mxEvent.consume(ja)});ra.appendChild(oa)}va.appendChild(ra)}ka.appendChild(va)})(ea[ba]);
-ia.appendChild(ka);W.appendChild(ia)}}var T=this,V=T.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);T.addListener(mxEvent.ROOT,function(){V=
-T.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ea,ca){if(m()){ea=T.getAllTags();for(ca=0;ca<ea.length;ca++)0>mxUtils.indexOf(V,ea[ca])&&V.push(ea[ca]);V.sort();T.isSelectionEmpty()?P(V):P(V,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,Y);T.model.addListener(mxEvent.CHANGE,Y);T.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";
-Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle="solid";Z.style.whiteSpace="nowrap";if(T.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var fa=aa.cloneNode(!1);fa.style.backgroundImage="url("+Editor.visibleImage+")";fa.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(fa,"click",function(ea){T.setHiddenTags([]);
-mxEvent.isShiftDown(ea)||(V=T.hiddenTags.slice());L();T.refresh();mxEvent.consume(ea)});Z.appendChild(fa);null!=D&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){D(V,function(ca){V=ca;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=M&&Z.appendChild(M);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];
+this.isMouseInsertPoint=function(){return null!=t};var D=this.getInsertPoint;this.getInsertPoint=function(L){return null==t||L?D.apply(this,arguments):this.getPointForEvent(t)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=function(L){var O=this.graph.getCellStyle(L);if(null!=O&&"rack"==O.childLayout){var P=new mxStackLayout(this.graph,!1);P.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;P.marginLeft=O.marginLeft||
+0;P.marginRight=O.marginRight||0;P.marginTop=O.marginTop||0;P.marginBottom=O.marginBottom||0;P.allowGaps=O.allowGaps||0;P.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");P.resizeParent=!1;P.fill=!0;return P}return M.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,t){return Graph.processFontStyle(x.apply(this,arguments))};var A=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=
+function(m,t,D,M,L,O,P,U,V,X,W,Y){A.apply(this,arguments);Graph.processFontAttributes(Y)};var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,t,D,M){function L(){for(var ea=U.getSelectionCells(),ca=[],ha=0;ha<ea.length;ha++)U.isCellVisible(ea[ha])&&ca.push(ea[ha]);U.setSelectionCells(ca)}function O(ea){U.setHiddenTags(ea?[]:V.slice());
+L();U.refresh()}function P(ea,ca){W.innerText="";if(0<ea.length){var ha=document.createElement("table");ha.setAttribute("cellpadding","2");ha.style.boxSizing="border-box";ha.style.tableLayout="fixed";ha.style.width="100%";var ka=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(ia){function la(){var ja=U.getCellsForTags([ia],null,null,!0);U.isEnabled()?U.setSelectionCells(ja):U.highlightCells(ja,null,null,70)}var da=0>mxUtils.indexOf(U.hiddenTags,ia),
+ra=document.createElement("tr"),pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";var sa=document.createElement("img");sa.setAttribute("src",da?Editor.visibleImage:Editor.hiddenImage);sa.setAttribute("title",mxResources.get(da?"hideIt":"show",[ia]));mxUtils.setOpacity(sa,da?75:25);sa.className="geAdaptiveAsset";sa.style.verticalAlign="middle";sa.style.cursor="pointer";sa.style.width="16px";if(t||Editor.isDarkMode())sa.style.filter="invert(100%)";pa.appendChild(sa);mxEvent.addListener(sa,
+"click",function(ja){mxEvent.isShiftDown(ja)?O(0<=mxUtils.indexOf(U.hiddenTags,ia)):(U.toggleHiddenTag(ia),L(),U.refresh());mxEvent.consume(ja)});ra.appendChild(pa);pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";sa=document.createElement("img");sa.setAttribute("src",Editor.selectImage);sa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(sa,da?75:25);sa.className="geAdaptiveAsset";sa.style.verticalAlign="middle";sa.style.cursor="pointer";sa.style.width=
+"16px";if(t||Editor.isDarkMode())sa.style.filter="invert(100%)";mxEvent.addListener(sa,"click",function(ja){O(!0);la();mxEvent.consume(ja)});pa.appendChild(sa);ra.appendChild(pa);pa=document.createElement("td");pa.style.overflow="hidden";pa.style.whiteSpace="nowrap";pa.style.textOverflow="ellipsis";pa.style.verticalAlign="middle";pa.style.cursor="pointer";pa.setAttribute("title",ia);a=document.createElement("a");mxUtils.write(a,ia);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,
+da?100:40);pa.appendChild(a);mxEvent.addListener(pa,"click",function(ja){if(mxEvent.isShiftDown(ja))O(!0),la();else if(da&&0<U.hiddenTags.length)O(!0);else{var ma=V.slice(),wa=mxUtils.indexOf(ma,ia);ma.splice(wa,1);U.setHiddenTags(ma);L();U.refresh()}mxEvent.consume(ja)});ra.appendChild(pa);if(U.isEnabled()){pa=document.createElement("td");pa.style.verticalAlign="middle";pa.style.textAlign="center";pa.style.width="18px";if(null==ca){pa.style.align="center";pa.style.width="16px";sa=document.createElement("img");
+sa.setAttribute("src",Editor.trashImage);sa.setAttribute("title",mxResources.get("removeIt",[ia]));mxUtils.setOpacity(sa,da?75:25);sa.className="geAdaptiveAsset";sa.style.verticalAlign="middle";sa.style.cursor="pointer";sa.style.width="16px";if(t||Editor.isDarkMode())sa.style.filter="invert(100%)";mxEvent.addListener(sa,"click",function(ja){var ma=mxUtils.indexOf(V,ia);0<=ma&&V.splice(ma,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[ia]);U.refresh();mxEvent.consume(ja)});pa.appendChild(sa)}else{var va=
+document.createElement("input");va.setAttribute("type","checkbox");va.style.margin="0px";va.defaultChecked=null!=ca&&0<=mxUtils.indexOf(ca,ia);va.checked=va.defaultChecked;va.style.background="transparent";va.setAttribute("title",mxResources.get(va.defaultChecked?"removeIt":"add",[ia]));mxEvent.addListener(va,"change",function(ja){va.checked?U.addTagsForCells(U.getSelectionCells(),[ia]):U.removeTagsForCells(U.getSelectionCells(),[ia]);mxEvent.consume(ja)});pa.appendChild(va)}ra.appendChild(pa)}ka.appendChild(ra)})(ea[ba]);
+ha.appendChild(ka);W.appendChild(ha)}}var U=this,V=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);U.addListener(mxEvent.ROOT,function(){V=
+U.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ea,ca){if(m()){ea=U.getAllTags();for(ca=0;ca<ea.length;ca++)0>mxUtils.indexOf(V,ea[ca])&&V.push(ea[ca]);V.sort();U.isSelectionEmpty()?P(V):P(V,U.getCommonTagsForCells(U.getSelectionCells()))}});U.selectionModel.addListener(mxEvent.CHANGE,Y);U.model.addListener(mxEvent.CHANGE,Y);U.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";
+Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle="solid";Z.style.whiteSpace="nowrap";if(U.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var fa=aa.cloneNode(!1);fa.style.backgroundImage="url("+Editor.visibleImage+")";fa.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(fa,"click",function(ea){U.setHiddenTags([]);
+mxEvent.isShiftDown(ea)||(V=U.hiddenTags.slice());L();U.refresh();mxEvent.consume(ea)});Z.appendChild(fa);null!=D&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){D(V,function(ca){V=ca;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=M&&Z.appendChild(M);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];
for(var t in Graph.customFontElements){var D=Graph.customFontElements[t];m.push({name:D.name,url:D.url})}return m};Graph.prototype.setFont=function(m,t){Graph.addFont(m,t);var D=Editor.guid();document.execCommand("fontname",!1,D);for(var M=this.cellEditor.textarea.getElementsByTagName("font"),L=!1,O=0;O<M.length;O++)M[O].getAttribute("face")==D&&(L=!0,M[O].setAttribute("face",m),null!=t?M[O].setAttribute("data-font-src",t):M[O].removeAttribute("data-font-src"));L||document.execCommand("fontname",
!1,m)};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var t in m)this.globalVars[t]=m[t]}catch(D){null!=window.console&&console.log("Error in vars URL parameter: "+
-D)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var H=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var t=H.apply(this,arguments);null==t&&null!=this.globalVars&&(t=this.globalVars[m]);return t};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};
-Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,t,D,M,L,O,P,T,V,X,W,Y,Z,aa,fa,ea){var ca=C.apply(this,arguments);if(null!=Y){var ia=ca.getAttribute("style");null==ia&&(ia="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ca.setAttribute("style",ia+(" color-scheme: "+Y+";"))}var ka=this.getCustomFonts();if(W&&0<ka.length){var ba=ca.ownerDocument;ia=null!=ba.createElementNS?
-ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?ia.setAttributeNS("type","text/css"):ia.setAttribute("type","text/css");for(var ha="",ma="",da=0;da<ka.length;da++){var va=ka[da].name,ra=ka[da].url;Graph.isCssFontUrl(ra)?ha+="@import url("+Graph.rewriteGoogleFontUrl(ra)+");\n":ma+='@font-face {\nfont-family: "'+va+'";\nsrc: url("'+ra+'");\n}\n'}ia.appendChild(ba.createTextNode(ha+ma));ca.getElementsByTagName("defs")[0].appendChild(ia)}Editor.replaceSvgDataUris&&
-null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ca);this.mathEnabled&&(document.body.appendChild(ca),Editor.MathJaxRender(ca),ca.parentNode.removeChild(ca),ia=ca.ownerDocument.getElementById("MJX-SVG-styles"),null!=ia&&ca.getElementsByTagName("defs")[0].appendChild(ia.cloneNode(!0)));return ca};var R=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){R.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=
-null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var U=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){U.apply(this,arguments);this.enumerationState=0};var S=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return S.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,
+D)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var t=G.apply(this,arguments);null==t&&null!=this.globalVars&&(t=this.globalVars[m]);return t};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};
+Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,t,D,M,L,O,P,U,V,X,W,Y,Z,aa,fa,ea){var ca=C.apply(this,arguments);if(null!=Y){var ha=ca.getAttribute("style");null==ha&&(ha="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ca.setAttribute("style",ha+(" color-scheme: "+Y+";"))}var ka=this.getCustomFonts();if(W&&0<ka.length){var ba=ca.ownerDocument;ha=null!=ba.createElementNS?
+ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?ha.setAttributeNS("type","text/css"):ha.setAttribute("type","text/css");for(var ia="",la="",da=0;da<ka.length;da++){var ra=ka[da].name,pa=ka[da].url;Graph.isCssFontUrl(pa)?ia+="@import url("+Graph.rewriteGoogleFontUrl(pa)+");\n":la+='@font-face {\nfont-family: "'+ra+'";\nsrc: url("'+pa+'");\n}\n'}ha.appendChild(ba.createTextNode(ia+la));ca.getElementsByTagName("defs")[0].appendChild(ha)}Editor.replaceSvgDataUris&&
+null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ca);this.mathEnabled&&(document.body.appendChild(ca),Editor.MathJaxRender(ca),ca.parentNode.removeChild(ca),ha=ca.ownerDocument.getElementById("MJX-SVG-styles"),null!=ha&&ca.getElementsByTagName("defs")[0].appendChild(ha.cloneNode(!0)));return ca};var R=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){R.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=
+null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var T=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){T.apply(this,arguments);this.enumerationState=0};var S=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return S.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,
"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var t="1"==mxUtils.getValue(m.style,"enumerate",0);t&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):t||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);t=m.secondLabel;if(null!=t){var D=m.view.scale,M=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*D,m.y+4*D,0,0):mxRectangle.fromPoint(m.view.getPoint(m));t.bounds.equals(m)&&t.value==M&&t.scale==D||(t.bounds=m,t.value=M,t.scale=D,t.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var v=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){v.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,t){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&
-this.executeCustomActions(m.actions,null,t))};Graph.prototype.executeCustomActions=function(m,t,D){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 M=!1,L=0,O=0,P=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
-function(){M&&(M=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<L&&L--;0==L&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var W=this.stoppingCustomActions,Y=m[O++],Z=[];if(null!=Y.open)if(T(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,D))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),L++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Y.wait?parseInt(Y.wait):1E3),T());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,
+this.executeCustomActions(m.actions,null,t))};Graph.prototype.executeCustomActions=function(m,t,D){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 M=!1,L=0,O=0,P=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,
+function(){M&&(M=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<L&&L--;0==L&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var W=this.stoppingCustomActions,Y=m[O++],Z=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,D))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),L++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,
!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(P(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){P();var aa=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Y.hide&&(P(),aa=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&
(P(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(P(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));aa=[];null!=Y.select&&this.isEnabled()&&(aa=this.getCellsForAction(Y.select),this.setSelectionCells(aa));null!=Y.highlight&&(aa=this.getCellsForAction(Y.highlight),this.highlightCells(aa,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));
null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);null!=D&&null!=Y.explore&&Graph.exploreFromCell(this,D,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var fa=Y.tags.toggle;0==fa.length&&(fa=this.getAllTags());for(aa=0;aa<fa.length;aa++)this.toggleHiddenTag(fa[aa])}fa=null;null!=Y.tags.hidden&&(null==fa&&(fa=[]),fa=fa.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==fa&&(fa=[]);var ea=
-this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(fa,ea[aa])&&fa.push(ea[aa])}null!=fa&&this.setHiddenTags(fa);this.refresh()}0<Z.length&&(L++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==L?X():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=t&&t()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,t){var D=this.getLinkForCell(t);null!=D&&"data:action/json,"==D.substring(0,17)&&this.setLinkForCell(t,
+this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(fa,ea[aa])&&fa.push(ea[aa])}null!=fa&&this.setHiddenTags(fa);this.refresh()}0<Z.length&&(L++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==L?X():U()}else this.stoppingCustomActions=this.executingCustomActions=!1,U(),null!=t&&t()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,t){var D=this.getLinkForCell(t);null!=D&&"data:action/json,"==D.substring(0,17)&&this.setLinkForCell(t,
this.updateCustomLink(m,D));if(this.isHtmlLabel(t)){var M=document.createElement("div");M.innerHTML=Graph.sanitizeHtml(this.getLabel(t));for(var L=M.getElementsByTagName("a"),O=!1,P=0;P<L.length;P++)D=L[P].getAttribute("href"),null!=D&&"data:action/json,"==D.substring(0,17)&&(L[P].setAttribute("href",this.updateCustomLink(m,D)),O=!0);O&&this.labelChanged(t,M.innerHTML)}};Graph.prototype.updateCustomLink=function(m,t){if("data:action/json,"==t.substring(0,17))try{var D=JSON.parse(t.substring(17));
null!=D.actions&&(this.updateCustomLinkActions(m,D.actions),t="data:action/json,"+JSON.stringify(D))}catch(M){}return t};Graph.prototype.updateCustomLinkActions=function(m,t){for(var D=0;D<t.length;D++){var M=t[D],L;for(L in M)this.updateCustomLinkAction(m,M[L],"cells"),this.updateCustomLinkAction(m,M[L],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,t,D){if(null!=t&&null!=t[D]){for(var M=[],L=0;L<t[D].length;L++)if("*"==t[D][L])M.push(t[D][L]);else{var O=m[t[D][L]];null!=O?""!=
O&&M.push(O):M.push(t[D][L])}t[D]=M}};Graph.prototype.getCellsForAction=function(m,t){t=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,t));if(null!=m.excludeCells){for(var D=[],M=0;M<t.length;M++)0>m.excludeCells.indexOf(t[M].id)&&D.push(t[M]);t=D}return t};Graph.prototype.getCellsById=function(m){var t=[];if(null!=m)for(var D=0;D<m.length;D++)if("*"==m[D]){var M=this.model.getRoot();t=t.concat(this.model.filterDescendants(function(O){return O!=M},M))}else{var L=this.model.getCell(m[D]);
-null!=L&&t.push(L)}return t};var A=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return A.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var t=mxUtils.indexOf(this.hiddenTags,m);0>t?this.hiddenTags.push(m):0<=t&&this.hiddenTags.splice(t,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var t=0;t<m.length;t++)if(0>mxUtils.indexOf(this.hiddenTags,m[t]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,t,D,M){var L=[];if(null!=m){t=null!=t?t:this.model.getDescendants(this.model.getRoot());for(var O=0,P={},T=0;T<m.length;T++)0<m[T].length&&(P[m[T]]=!0,O++);for(T=0;T<t.length;T++)if(D&&this.model.getParent(t[T])==
-this.model.root||this.model.isVertex(t[T])||this.model.isEdge(t[T])){var V=this.getTagsForCell(t[T]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=m.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=P[V[W]]&&X++;X=X==O}X&&(1!=M||this.isCellVisible(t[T]))&&L.push(t[T])}}return L};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var t=null,D=[],M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);
+null!=L&&t.push(L)}return t};var z=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return z.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var t=mxUtils.indexOf(this.hiddenTags,m);0>t?this.hiddenTags.push(m):0<=t&&this.hiddenTags.splice(t,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var t=0;t<m.length;t++)if(0>mxUtils.indexOf(this.hiddenTags,m[t]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,t,D,M){var L=[];if(null!=m){t=null!=t?t:this.model.getDescendants(this.model.getRoot());for(var O=0,P={},U=0;U<m.length;U++)0<m[U].length&&(P[m[U]]=!0,O++);for(U=0;U<t.length;U++)if(D&&this.model.getParent(t[U])==
+this.model.root||this.model.isVertex(t[U])||this.model.isEdge(t[U])){var V=this.getTagsForCell(t[U]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=m.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=P[V[W]]&&X++;X=X==O}X&&(1!=M||this.isCellVisible(t[U]))&&L.push(t[U])}}return L};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var t=null,D=[],M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);
D=[];if(0<L.length){L=L.split(" ");for(var O={},P=0;P<L.length;P++)if(null==t||null!=t[L[P]])O[L[P]]=!0,D.push(L[P]);t=O}else return[]}return D};Graph.prototype.getTagsForCells=function(m){for(var t=[],D={},M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);if(0<L.length){L=L.split(" ");for(var O=0;O<L.length;O++)null==D[L[O]]&&(D[L[O]]=!0,t.push(L[O]))}}return t};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,t){if(0<
-m.length&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){for(var M=this.getTagsForCell(m[D]),L=M.split(" "),O=!1,P=0;P<t.length;P++){var T=mxUtils.trim(t[P]);""!=T&&0>mxUtils.indexOf(L,T)&&(M=0<M.length?M+" "+T:T,O=!0)}O&&this.setAttributeForCell(m[D],"tags",M)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(m,t){if(0<m.length&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){var M=this.getTagsForCell(m[D]);if(0<M.length){for(var L=
-M.split(" "),O=!1,P=0;P<t.length;P++){var T=mxUtils.indexOf(L,t[P]);0<=T&&(L.splice(T,1),O=!0)}O&&this.setAttributeForCell(m[D],"tags",L.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var t=0;t<m.length;t++)this.model.setVisible(m[t],!this.model.isVisible(m[t]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,t){this.model.beginUpdate();try{for(var D=0;D<m.length;D++)this.model.setVisible(m[D],t)}finally{this.model.endUpdate()}};
+m.length&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){for(var M=this.getTagsForCell(m[D]),L=M.split(" "),O=!1,P=0;P<t.length;P++){var U=mxUtils.trim(t[P]);""!=U&&0>mxUtils.indexOf(L,U)&&(M=0<M.length?M+" "+U:U,O=!0)}O&&this.setAttributeForCell(m[D],"tags",M)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(m,t){if(0<m.length&&0<t.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){var M=this.getTagsForCell(m[D]);if(0<M.length){for(var L=
+M.split(" "),O=!1,P=0;P<t.length;P++){var U=mxUtils.indexOf(L,t[P]);0<=U&&(L.splice(U,1),O=!0)}O&&this.setAttributeForCell(m[D],"tags",L.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var t=0;t<m.length;t++)this.model.setVisible(m[t],!this.model.isVisible(m[t]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,t){this.model.beginUpdate();try{for(var D=0;D<m.length;D++)this.model.setVisible(m[D],t)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(m,t,D,M){for(var L=0;L<m.length;L++)this.highlightCell(m[L],t,D,M)};Graph.prototype.highlightCell=function(m,t,D,M,L){t=null!=t?t:mxConstants.DEFAULT_VALID_COLOR;D=null!=D?D:1E3;m=this.view.getState(m);var O=null;null!=m&&(L=null!=L?L:4,L=Math.max(L+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,1)+L),O=new mxCellHighlight(this,t,L,!1),null!=M&&(O.opacity=M),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,
"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},D));return O};Graph.prototype.addSvgShadow=function(m,t,D,M){M=null!=M?M:!0;var L=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=D&&D||(t=null!=t?t:m.getElementsByTagName("g")[0],null!=t&&(this.updateShadowFilter(t,!0),!isNaN(parseInt(m.getAttribute("width")))&&M&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+L),m.setAttribute("height",parseInt(m.getAttribute("height"))+
L),t=m.getAttribute("viewBox"),null!=t&&0<t.length&&(t=t.split(" "),3<t.length&&(w=parseFloat(t[2])+L,h=parseFloat(t[3])+L,m.setAttribute("viewBox",t[0]+" "+t[1]+" "+w+" "+h))))));return L};Graph.prototype.updateShadowFilter=function(m,t){mxClient.IS_SF||(t?(t=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),m.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+t.cssText+
@@ -12785,340 +12787,340 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.networks2=[SHAPES_PATH+"/mxNetworks2.js",
STENCIL_PATH+"/networks2.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];
-mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var t=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?t="mxgraph.er":"sysML"==m.substring(0,5)&&(t="mxgraph.sysml"));return t};var N=mxMarker.createMarker;mxMarker.createMarker=function(m,t,D,M,L,O,P,T,V,X){if(null!=D&&null==mxMarker.markers[D]){var W=this.getPackageForType(D);null!=W&&mxStencilRegistry.getStencil(W)}return N.apply(this,
-arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,t,D,M,L,O){"1"==mxUtils.getValue(t.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(m,t,D,M){function L(){fa.value=Math.max(1,Math.min(W,Math.max(parseInt(fa.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(fa.value),parseInt(aa.value))))}function O(Ea){m.lastPrintPagesRadioChecked=
-Z.checked;m.lastPrintSelectionOnlyChecked=ca.checked;m.lastPrintCropRadioChecked=ka.checked;m.lastPrintFitRadioChecked=ba.checked;Z.checked&&aa.value<fa.value?(m.lastPrintPagesFromInput=aa.value,m.lastPrintPagesToInput=fa.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);Aa.value=Math.max(1,Math.min(1600,parseInt(Aa.value)))+"%";m.lastPrintZoom=Aa.value;m.lastPrintBorder=qa.value;m.lastPrintGrid=Ca.checked;m.lastPrintTransparent=za.checked;m.lastPrintInclude=Ba.checked;m.lastPrintSheetsAcross=
-na.value;m.lastPrintSheetsDown=ua.value;var Ia={};Ia.border=parseInt(qa.value);Ia.scale=parseInt(Aa.value)/100;Ia.grid=Ca.checked;Ia.shadows=Da.checked;Ia.transparent=za.checked;Ia.includeCopy=Ba.checked;Ia.sheetsAcross=parseInt(na.value);Ia.sheetsDown=parseInt(ua.value);Ia.pagesFrom=parseInt(aa.value);Ia.pagesTo=parseInt(fa.value);Ia.allPages=Y.checked;Ia.selection=ca.checked;Ia.pageView=ia.checked;Ia.crop=ka.checked;Ia.fit=ba.checked;return null!=D?D(!Ea,Ia):m.print(!Ea,Ia)}var P=m.editor.graph,
-T=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,t||mxResources.get("print"));T.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);t=document.createElement("span");mxUtils.write(t,mxResources.get("allPages"));
+mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var t=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?t="mxgraph.er":"sysML"==m.substring(0,5)&&(t="mxgraph.sysml"));return t};var N=mxMarker.createMarker;mxMarker.createMarker=function(m,t,D,M,L,O,P,U,V,X){if(null!=D&&null==mxMarker.markers[D]){var W=this.getPackageForType(D);null!=W&&mxStencilRegistry.getStencil(W)}return N.apply(this,
+arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,t,D,M,L,O){"1"==mxUtils.getValue(t.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(m,t,D,M){function L(){fa.value=Math.max(1,Math.min(W,Math.max(parseInt(fa.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(fa.value),parseInt(aa.value))))}function O(Da){m.lastPrintPagesRadioChecked=
+Z.checked;m.lastPrintSelectionOnlyChecked=ca.checked;m.lastPrintCropRadioChecked=ka.checked;m.lastPrintFitRadioChecked=ba.checked;Z.checked&&aa.value<fa.value?(m.lastPrintPagesFromInput=aa.value,m.lastPrintPagesToInput=fa.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);ya.value=Math.max(1,Math.min(1600,parseInt(ya.value)))+"%";m.lastPrintZoom=ya.value;m.lastPrintBorder=oa.value;m.lastPrintGrid=Ca.checked;m.lastPrintTransparent=Aa.checked;m.lastPrintInclude=Ea.checked;m.lastPrintSheetsAcross=
+ma.value;m.lastPrintSheetsDown=wa.value;var Ia={};Ia.border=parseInt(oa.value);Ia.scale=parseInt(ya.value)/100;Ia.grid=Ca.checked;Ia.shadows=Fa.checked;Ia.transparent=Aa.checked;Ia.includeCopy=Ea.checked;Ia.sheetsAcross=parseInt(ma.value);Ia.sheetsDown=parseInt(wa.value);Ia.pagesFrom=parseInt(aa.value);Ia.pagesTo=parseInt(fa.value);Ia.allPages=Y.checked;Ia.selection=ca.checked;Ia.pageView=ha.checked;Ia.crop=ka.checked;Ia.fit=ba.checked;return null!=D?D(!Da,Ia):m.print(!Da,Ia)}var P=m.editor.graph,
+U=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,t||mxResources.get("print"));U.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);t=document.createElement("span");mxUtils.write(t,mxResources.get("allPages"));
mxEvent.addListener(t,"click",function(){Y.checked=!0});V.appendChild(t);mxUtils.br(V);var Z=Y.cloneNode(!0);V.appendChild(Z);t=document.createElement("span");mxUtils.write(t,mxResources.get("pages")+":");V.appendChild(t);mxEvent.addListener(t,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";V.appendChild(aa);t=document.createElement("span");
mxUtils.write(t,mxResources.get("to"));V.appendChild(t);var fa=aa.cloneNode(!0);V.appendChild(fa);mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",L);mxEvent.addListener(fa,"change",L);if(null!=m.pages&&(W=m.pages.length,null!=m.currentPage))for(var ea=0;ea<W;ea++)if(m.currentPage==m.pages[ea]){X=ea+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(aa.value=Math.min(W,Math.max(1,
-m.lastPrintPagesFromInput)),fa.value=Math.min(W,Math.max(1,m.lastPrintPagesToInput))):(aa.value=X,fa.value=X);aa.setAttribute("max",W);fa.setAttribute("max",W);ea=mxUtils.button(mxResources.get("currentPage"),function(Ea){aa.value=X;fa.value=X;Z.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";V.appendChild(ea);1<W&&T.appendChild(V);V=document.createElement("div");
+m.lastPrintPagesFromInput)),fa.value=Math.min(W,Math.max(1,m.lastPrintPagesToInput))):(aa.value=X,fa.value=X);aa.setAttribute("max",W);fa.setAttribute("max",W);ea=mxUtils.button(mxResources.get("currentPage"),function(Da){aa.value=X;fa.value=X;Z.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";V.appendChild(ea);1<W&&U.appendChild(V);V=document.createElement("div");
V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var ca=document.createElement("input");ca.setAttribute("name","pages-printdialog");ca.setAttribute("type",1==W?"checkbox":"radio");ca.style.marginRight="8px";P.isSelectionEmpty()&&ca.setAttribute("disabled","disabled");P.isEnabled()&&(V.appendChild(ca),t=document.createElement("span"),mxUtils.write(t,mxResources.get("selectionOnly")),V.appendChild(t));(P.isEnabled()||1<W)&&
-T.appendChild(V);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Z.checked=!0:!P.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?ca.checked=!0:Y.checked=!0;P.isSelectionEmpty()||mxEvent.addListener(t,"click",function(){ca.checked=!ca.checked});P=document.createElement("div");P.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");P.appendChild(ia);t=document.createElement("span");
-mxUtils.write(t,mxResources.get("pageView"));P.appendChild(t);mxEvent.addListener(P,"click",function(){ia.checked=!0});T.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var ka=document.createElement("input");ka.style.marginBottom="8px";ka.style.marginRight="8px";ka.setAttribute("type","radio");ka.setAttribute("name","printSize");P.appendChild(ka);t=document.createElement("span");mxUtils.write(t,mxResources.get("crop"));P.appendChild(t);mxEvent.addListener(P,"click",function(){ka.checked=
-!0});T.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");t=document.createElement("div");t.style.display="inline-block";t.style.verticalAlign="top";t.style.paddingTop="2px";t.appendChild(ba);P.appendChild(t);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ea=document.createElement("tbody");
-var ha=document.createElement("tr"),ma=ha.cloneNode(!0),da=document.createElement("td"),va=da.cloneNode(!0),ra=da.cloneNode(!0),wa=da.cloneNode(!0),oa=da.cloneNode(!0),ja=da.cloneNode(!0);da.style.textAlign="right";wa.style.textAlign="right";mxUtils.write(da,mxResources.get("fitTo"));mxEvent.addListener(P,"click",function(Ea){mxEvent.getSource(Ea)!=ba&&(ba.checked=!ba.checked)});var na=document.createElement("input");na.style.margin="0 2px";na.style.boxSizing="border-box";na.setAttribute("value",
-m.lastPrintSheetsAcross||"1");na.setAttribute("min","1");na.setAttribute("type","number");na.style.width="40px";va.appendChild(na);t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsAcross"));ra.appendChild(t);mxUtils.write(wa,mxResources.get("fitToBy"));var ua=na.cloneNode(!0);ua.setAttribute("value",m.lastPrintSheetsDown||"1");oa.appendChild(ua);mxEvent.addListener(na,"click",function(Ea){ba.checked=!0;mxEvent.consume(Ea)});mxEvent.addListener(ua,"click",function(Ea){ba.checked=
-!0;mxEvent.consume(Ea)});m.lastPrintCropRadioChecked?ka.checked=!0:m.lastPrintFitRadioChecked?ba.checked=!0:ia.checked=!0;t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsDown"));ja.appendChild(t);ha.appendChild(da);ha.appendChild(va);ha.appendChild(ra);ma.appendChild(wa);ma.appendChild(oa);ma.appendChild(ja);ea.appendChild(ha);ea.appendChild(ma);V.appendChild(ea);P.appendChild(V);T.appendChild(P);P=document.createElement("div");P.style.borderTop="1px solid lightGray";
-P.style.whiteSpace="nowrap";P.style.paddingTop="12px";P.style.marginTop="12px";P.style.paddingLeft="8px";mxUtils.write(P,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","number");qa.setAttribute("min","0");qa.style.width="40px";qa.style.marginLeft="4px";qa.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;P.appendChild(qa);t=document.createElement("span");t.style.marginLeft="8px";mxUtils.write(t,mxResources.get("zoom")+
-":");P.appendChild(t);var Aa=document.createElement("input");Aa.style.width="60px";Aa.style.marginLeft="4px";Aa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";P.appendChild(Aa);mxUtils.br(P);var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="12px";Ca.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;P.appendChild(Ca);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("grid"));P.appendChild(t);
-mxEvent.addListener(t,"click",function(Ea){Ca.checked=!0;mxEvent.consume(Ea)});var Da=document.createElement("input");Da.setAttribute("type","checkbox");Da.style.marginTop="12px";Da.checked=null!=m.lastPrintShadow?m.lastPrintShadow:!1;P.appendChild(Da);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("shadows"));P.appendChild(t);m.isOffline()&&!mxClient.IS_CHROMEAPP||t.appendChild(m.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
-mxEvent.addListener(t,"click",function(Ea){"IMG"!=mxEvent.getSource(Ea).nodeName&&(Da.checked=!0,mxEvent.consume(Ea))});Editor.enableShadowOption?null!=D&&mxUtils.br(P):(Da.style.display="none",t.style.display="none");var za=document.createElement("input");za.setAttribute("type","checkbox");za.style.marginTop="10px";za.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=D&&(P.appendChild(za),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("transparentBackground")),
-P.appendChild(t),mxEvent.addListener(t,"click",function(Ea){za.checked=!0;mxEvent.consume(Ea)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="10px";Ba.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==D||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(P),P.appendChild(Ba),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram")),P.appendChild(t),
-mxEvent.addListener(t,"click",function(Ea){Ba.checked=!0;mxEvent.consume(Ea)}));T.appendChild(P);t=document.createElement("div");t.style.marginTop="30px";t.style.textAlign="right";t.style.whiteSpace="nowrap";m.isOffline()&&!mxClient.IS_CHROMEAPP||null!=D||t.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));P=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});P.className="geBtn";m.editor.cancelFirst&&t.appendChild(P);PrintDialog.previewEnabled&&null==D&&
-(V=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),O(!1)}catch(Ea){m.handleError(Ea)}}),V.className="geBtn",t.appendChild(V));M=null!=M?M:null!=D?"export":PrintDialog.previewEnabled?"print":"ok";M=mxUtils.button(mxResources.get(M),function(){try{m.hideDialog(),O(!0)}catch(Ea){m.handleError(Ea)}});M.className="geBtn gePrimaryBtn";t.appendChild(M);m.editor.cancelFirst||t.appendChild(P);T.appendChild(t);if(m.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(T.classList.add("geDarkMode"),
-T.style.colorScheme="dark"):(T.classList.remove("geDarkMode"),T.style.colorScheme="light")};m.addListener("darkModeChanged",Ka);Ka();var Ma=function(Ea,Ia){Ea=Ia.getProperty("dialog");T.parentNode==Ea.container&&(m.editor.removeListener(Ma),m.removeListener(Ka))};m.editor.addListener("hideDialog",Ma)}this.container=T};var K=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+U.appendChild(V);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Z.checked=!0:!P.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?ca.checked=!0:Y.checked=!0;P.isSelectionEmpty()||mxEvent.addListener(t,"click",function(){ca.checked=!ca.checked});P=document.createElement("div");P.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight="8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");P.appendChild(ha);t=document.createElement("span");
+mxUtils.write(t,mxResources.get("pageView"));P.appendChild(t);mxEvent.addListener(P,"click",function(){ha.checked=!0});U.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var ka=document.createElement("input");ka.style.marginBottom="8px";ka.style.marginRight="8px";ka.setAttribute("type","radio");ka.setAttribute("name","printSize");P.appendChild(ka);t=document.createElement("span");mxUtils.write(t,mxResources.get("crop"));P.appendChild(t);mxEvent.addListener(P,"click",function(){ka.checked=
+!0});U.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");t=document.createElement("div");t.style.display="inline-block";t.style.verticalAlign="top";t.style.paddingTop="2px";t.appendChild(ba);P.appendChild(t);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ea=document.createElement("tbody");
+var ia=document.createElement("tr"),la=ia.cloneNode(!0),da=document.createElement("td"),ra=da.cloneNode(!0),pa=da.cloneNode(!0),sa=da.cloneNode(!0),va=da.cloneNode(!0),ja=da.cloneNode(!0);da.style.textAlign="right";sa.style.textAlign="right";mxUtils.write(da,mxResources.get("fitTo"));mxEvent.addListener(P,"click",function(Da){mxEvent.getSource(Da)!=ba&&(ba.checked=!ba.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",
+m.lastPrintSheetsAcross||"1");ma.setAttribute("min","1");ma.setAttribute("type","number");ma.style.width="40px";ra.appendChild(ma);t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsAcross"));pa.appendChild(t);mxUtils.write(sa,mxResources.get("fitToBy"));var wa=ma.cloneNode(!0);wa.setAttribute("value",m.lastPrintSheetsDown||"1");va.appendChild(wa);mxEvent.addListener(ma,"click",function(Da){ba.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(wa,"click",function(Da){ba.checked=
+!0;mxEvent.consume(Da)});m.lastPrintCropRadioChecked?ka.checked=!0:m.lastPrintFitRadioChecked?ba.checked=!0:ha.checked=!0;t=document.createElement("span");mxUtils.write(t,mxResources.get("fitToSheetsDown"));ja.appendChild(t);ia.appendChild(da);ia.appendChild(ra);ia.appendChild(pa);la.appendChild(sa);la.appendChild(va);la.appendChild(ja);ea.appendChild(ia);ea.appendChild(la);V.appendChild(ea);P.appendChild(V);U.appendChild(P);P=document.createElement("div");P.style.borderTop="1px solid lightGray";
+P.style.whiteSpace="nowrap";P.style.paddingTop="12px";P.style.marginTop="12px";P.style.paddingLeft="8px";mxUtils.write(P,mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","number");oa.setAttribute("min","0");oa.style.width="40px";oa.style.marginLeft="4px";oa.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;P.appendChild(oa);t=document.createElement("span");t.style.marginLeft="8px";mxUtils.write(t,mxResources.get("zoom")+
+":");P.appendChild(t);var ya=document.createElement("input");ya.style.width="60px";ya.style.marginLeft="4px";ya.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";P.appendChild(ya);mxUtils.br(P);var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="12px";Ca.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;P.appendChild(Ca);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("grid"));P.appendChild(t);
+mxEvent.addListener(t,"click",function(Da){Ca.checked=!0;mxEvent.consume(Da)});var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.marginTop="12px";Fa.checked=null!=m.lastPrintShadow?m.lastPrintShadow:!1;P.appendChild(Fa);t=document.createElement("span");t.style.marginLeft="4px";t.style.marginRight="8px";mxUtils.write(t,mxResources.get("shadows"));P.appendChild(t);m.isOffline()&&!mxClient.IS_CHROMEAPP||t.appendChild(m.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
+mxEvent.addListener(t,"click",function(Da){"IMG"!=mxEvent.getSource(Da).nodeName&&(Fa.checked=!0,mxEvent.consume(Da))});Editor.enableShadowOption?null!=D&&mxUtils.br(P):(Fa.style.display="none",t.style.display="none");var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.marginTop="10px";Aa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=D&&(P.appendChild(Aa),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("transparentBackground")),
+P.appendChild(t),mxEvent.addListener(t,"click",function(Da){Aa.checked=!0;mxEvent.consume(Da)}));var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="10px";Ea.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==D||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(P),P.appendChild(Ea),t=document.createElement("span"),t.style.marginLeft="4px",mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram")),P.appendChild(t),
+mxEvent.addListener(t,"click",function(Da){Ea.checked=!0;mxEvent.consume(Da)}));U.appendChild(P);t=document.createElement("div");t.style.marginTop="30px";t.style.textAlign="right";t.style.whiteSpace="nowrap";m.isOffline()&&!mxClient.IS_CHROMEAPP||null!=D||t.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));P=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});P.className="geBtn";m.editor.cancelFirst&&t.appendChild(P);PrintDialog.previewEnabled&&null==D&&
+(V=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),O(!1)}catch(Da){m.handleError(Da)}}),V.className="geBtn",t.appendChild(V));M=null!=M?M:null!=D?"export":PrintDialog.previewEnabled?"print":"ok";M=mxUtils.button(mxResources.get(M),function(){try{m.hideDialog(),O(!0)}catch(Da){m.handleError(Da)}});M.className="geBtn gePrimaryBtn";t.appendChild(M);m.editor.cancelFirst||t.appendChild(P);U.appendChild(t);if(m.editor.isChromelessView()){var Oa=function(){Editor.isDarkMode()?(U.classList.add("geDarkMode"),
+U.style.colorScheme="dark"):(U.classList.remove("geDarkMode"),U.style.colorScheme="light")};m.addListener("darkModeChanged",Oa);Oa();var Ba=function(Da,Ia){Da=Ia.getProperty("dialog");U.parentNode==Da.container&&(m.editor.removeListener(Ba),m.removeListener(Oa))};m.editor.addListener("hideDialog",Ba)}this.container=U};var K=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else K.apply(this,
arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.8";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
-"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||"1"==urlParams.dev;EditorUi.isElectronApp=
-null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
-EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',
-numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,k,l,n,x,z,B){if(null!=d){x=null!=x?x:Error(d);x.stack=null!=x.stack?x.stack:"";z=null!=z?z: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>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&
-0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+z+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=n?":colno:"+encodeURIComponent(n):"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(I){}try{B||null==window.console||console.error(z,
-d,k,l,n,x)}catch(I){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=k+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(l){}};EditorUi.sendReport=function(d,k){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{k=null!=k?k:5E4,d.length>k&&(d=d.substring(0,
-k)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],k=0;k<arguments.length;k++)d.push(arguments[k]);mxClient.IS_IOS?(mxLog.show(),mxLog.debug(d.join(" "))):console.log.apply(console,d)}}catch(l){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};
-EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");for(var k=[],l=0;l<d.length;l++)k.push(d[l]);for(l=0;l<k.length;l++)EditorUi.replaceSvgImage(k[l])};EditorUi.replaceSvgImage=function(d){try{var k=null;k=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(k);if(null!=l&&"svg"==l.nodeName){var n=l.getAttribute("width"),x=l.getAttribute("height");l.setAttribute("x",d.getAttribute("x"));l.setAttribute("y",
-d.getAttribute("y"));l.setAttribute("width",d.getAttribute("width"));l.setAttribute("height",d.getAttribute("height"));l.style.fontFamily="initial";0<n&&0<x&&null==l.getAttribute("viewBox")&&l.setAttribute("viewBox","0 0 "+n+" "+x);var z=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");z.appendChild(l);d.hasAttribute("transform")&&z.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(z,d)}}catch(B){}};EditorUi.getSvgSubtree=function(d){var k=Graph.getSvgFromDataUri(d);
-d=null;if(null!=k){d=Graph.sanitizeNode(mxUtils.parseXml(k).documentElement);k=d.getElementsByTagName("style");if(0<k.length){var l="svg-image-"+Editor.guid();d.setAttribute("id",l);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),z=0;z<k.length;z++){x.textContent=k[z].textContent;n.body.appendChild(x);for(var B="",I=0;I<x.sheet.cssRules.length;I++){var H=x.sheet.cssRules[I];if(null!=H.selectorText){for(var C=H.selectorText.split(","),R=0;R<C.length;R++)C[R]=
-"#"+l+" "+C[R];H.selectorText=C.join(",")}B+=H.cssText+"\n"}k[z].textContent=B}}null!=d.style&&"light dark"==d.style.getPropertyValue("color-scheme")&&d.style.removeProperty("color-scheme");k=d.getElementsByTagName("*");for(l=0;l<k.length;l++)k[l].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;
-EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=
-1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme=
-"auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";return d};EditorUi.prototype.openLink=function(d,k,l){return this.editor.graph.openLink(d,k,l)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,k){k(localStorage.getItem(d))};EditorUi.prototype.setLocalData=
-function(d,k,l){localStorage.setItem(d,k);null!=l&&l()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,k){localStorage.removeItem(d);k()};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){var k=this.editor.graph;k.mathEnabled=d;null!=k.view.backgroundImage&&(k.view.backgroundImage.destroy(),k.view.backgroundImage=null);this.editor.updateGraphComponents();k.refresh();k.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};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,k,l){var n=null==d||null==k;l=null!=l?l:24;var x=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),z=this.timeout,B=x.spin,I=null,H=null,C=mxUtils.bind(this,
-function(S){null!=S&&S()}),R=this;x.spin=function(S,Q,v,A){A=null!=A?A:z;var N=!1;if(!this.active){var J=Date.now();null!=v&&(I=window.setTimeout(function(){x.stop();I=null;v({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:H})},A));n&&(k=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2);S==document.body&&"1"==urlParams.embedInline&&(S=R.diagramContainer,d=S.scrollLeft+S.clientWidth/2,k=S.scrollTop+S.clientHeight/2);
-B.call(this,S);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=S.scrollTop+"px",x.el.style.marginLeft=S.scrollLeft+"px");this.active=!0;null!=Q&&(N=document.createElement("div"),N.className="geSpinnerStatus",N.setAttribute("title",Q),S==document.body?(N.style.left=Math.max(0,d)+"px",N.style.top=Math.max(0,k+66)+"px"):(N.style.left="50%",N.style.top="50%",N.style.marginTop="70px"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),N.innerText=Q,S.appendChild(N),
-x.status=N);this.pause=mxUtils.bind(this,function(){var K=C;this.active&&(A=Math.max(0,A-(Date.now()-J)),K=mxUtils.bind(this,function(m){this.spin(S,Q,v,A);if(null!=m)try{m(),H=mxUtils.bind(this,function(){this.spin(S,Q,v,A);try{m()}catch(t){null!=v&&v(t)}})}catch(t){null!=v&&v(t)}}));this.stop();return K});N=!0}return N};var U=x.stop;x.stop=function(){U.call(this);this.active&&(this.active=!1,null!=I&&(window.clearTimeout(I),I=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||
+"1"==urlParams.dev;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
+"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,
+barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,k,l,n,x,A,B){if(null!=d){x=null!=x?x:Error(d);x.stack=null!=x.stack?x.stack:"";A=null!=A?A: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>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+A+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=n?":colno:"+
+encodeURIComponent(n):"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(I){}try{B||null==window.console||console.error(A,d,k,l,n,x)}catch(I){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=k+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(l){}};EditorUi.sendReport=
+function(d,k){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{k=null!=k?k:5E4,d.length>k&&(d=d.substring(0,k)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],k=0;k<arguments.length;k++)d.push(arguments[k]);mxClient.IS_IOS?
+(mxLog.show(),mxLog.debug(d.join(" "))):console.log.apply(console,d)}}catch(l){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");for(var k=[],l=0;l<d.length;l++)k.push(d[l]);for(l=0;l<k.length;l++)EditorUi.replaceSvgImage(k[l])};EditorUi.replaceSvgImage=function(d){try{var k=null;k=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var l=
+EditorUi.getSvgSubtree(k);if(null!=l&&"svg"==l.nodeName){var n=l.getAttribute("width"),x=l.getAttribute("height");l.setAttribute("x",d.getAttribute("x"));l.setAttribute("y",d.getAttribute("y"));l.setAttribute("width",d.getAttribute("width"));l.setAttribute("height",d.getAttribute("height"));l.style.fontFamily="initial";0<n&&0<x&&null==l.getAttribute("viewBox")&&l.setAttribute("viewBox","0 0 "+n+" "+x);var A=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");A.appendChild(l);d.hasAttribute("transform")&&
+A.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(A,d)}}catch(B){}};EditorUi.getSvgSubtree=function(d){var k=Graph.getSvgFromDataUri(d);d=null;if(null!=k){d=Graph.sanitizeNode(mxUtils.parseXml(k).documentElement);k=d.getElementsByTagName("style");if(0<k.length){var l="svg-image-"+Editor.guid();d.setAttribute("id",l);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),A=0;A<k.length;A++){x.textContent=k[A].textContent;n.body.appendChild(x);
+for(var B="",I=0;I<x.sheet.cssRules.length;I++){var G=x.sheet.cssRules[I];if(null!=G.selectorText){for(var C=G.selectorText.split(","),R=0;R<C.length;R++)C[R]="#"+l+" "+C[R];G.selectorText=C.join(",")}B+=G.cssText+"\n"}k[A].textContent=B}}null!=d.style&&"light dark"==d.style.getPropertyValue("color-scheme")&&d.style.removeProperty("color-scheme");k=d.getElementsByTagName("*");for(l=0;l<k.length;l++)k[l].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";return d};EditorUi.prototype.openLink=function(d,k,l){return this.editor.graph.openLink(d,k,l)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=
+function(d,k){k(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,k,l){localStorage.setItem(d,k);null!=l&&l()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,k){localStorage.removeItem(d);k()};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){var k=this.editor.graph;k.mathEnabled=d;null!=k.view.backgroundImage&&(k.view.backgroundImage.destroy(),k.view.backgroundImage=null);this.editor.updateGraphComponents();k.refresh();k.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};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,k,l){var n=null==d||null==k;l=null!=l?l:24;var x=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),A=this.timeout,B=x.spin,I=null,G=null,
+C=mxUtils.bind(this,function(S){null!=S&&S()}),R=this;x.spin=function(S,Q,v,z){z=null!=z?z:A;var N=!1;if(!this.active){var J=Date.now();null!=v&&(I=window.setTimeout(function(){x.stop();I=null;v({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})},z));n&&(k=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2);S==document.body&&"1"==urlParams.embedInline&&(S=R.diagramContainer,d=S.scrollLeft+S.clientWidth/2,k=S.scrollTop+
+S.clientHeight/2);B.call(this,S);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=S.scrollTop+"px",x.el.style.marginLeft=S.scrollLeft+"px");this.active=!0;null!=Q&&(N=document.createElement("div"),N.className="geSpinnerStatus",N.setAttribute("title",Q),S==document.body?(N.style.left=Math.max(0,d)+"px",N.style.top=Math.max(0,k+66)+"px"):(N.style.left="50%",N.style.top="50%",N.style.marginTop="70px"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),N.innerText=
+Q,S.appendChild(N),x.status=N);this.pause=mxUtils.bind(this,function(){var K=C;this.active&&(z=Math.max(0,z-(Date.now()-J)),K=mxUtils.bind(this,function(m){this.spin(S,Q,v,z);if(null!=m)try{m(),G=mxUtils.bind(this,function(){this.spin(S,Q,v,z);try{m()}catch(t){null!=v&&v(t)}})}catch(t){null!=v&&v(t)}}));this.stop();return K});N=!0}return N};var T=x.stop;x.stop=function(){T.call(this);this.active&&(this.active=!1,null!=I&&(window.clearTimeout(I),I=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),
x.status=null)};x.pause=function(){return C};return x};EditorUi.prototype.isCompatibleString=function(d){try{if(d=mxUtils.trim(d),"<"==d.charAt(0)){var k=mxUtils.parseXml(d),l=this.editor.extractGraphModel(k.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&
207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&
-26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var k=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=k.getFunction,n=this.editor.graph,x=this;k.getFunction=function(z){if(n.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var B=x.getSelectedPageIndex();if(mxEvent.isShiftDown(z)){if(37==
-z.keyCode)return function(){0<B&&x.movePage(B,B-1)};if(38==z.keyCode)return function(){0<B&&x.movePage(B,0)};if(39==z.keyCode)return function(){B<x.pages.length-1&&x.movePage(B,B+1)};if(40==z.keyCode)return function(){B<x.pages.length-1&&x.movePage(B,x.pages.length-1)}}else if(mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)){if(37==z.keyCode)return function(){0<B&&x.selectNextPage(!1)};if(38==z.keyCode)return function(){0<B&&x.selectPage(x.pages[0])};if(39==z.keyCode)return function(){B<
-x.pages.length-1&&x.selectNextPage(!0)};if(40==z.keyCode)return function(){B<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=z.keyCode&&90>=z.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(z)||mxEvent.isShiftDown(z)||mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)?l.apply(this,arguments):null}}return k};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var k=f.apply(this,arguments);if(null==k)try{var l=
-d.indexOf("&lt;mxfile ");if(0<=l){var n=d.lastIndexOf("&lt;/mxfile&gt;");n>l&&(k=d.substring(l,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(d),z=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);k=null!=z?mxUtils.getXml(z):""}}catch(B){}return k};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var k=d.indexOf('<meta charset="utf-8">');
+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 k=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=k.getFunction,n=this.editor.graph,x=this;k.getFunction=function(A){if(n.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var B=x.getSelectedPageIndex();if(mxEvent.isShiftDown(A)){if(37==
+A.keyCode)return function(){0<B&&x.movePage(B,B-1)};if(38==A.keyCode)return function(){0<B&&x.movePage(B,0)};if(39==A.keyCode)return function(){B<x.pages.length-1&&x.movePage(B,B+1)};if(40==A.keyCode)return function(){B<x.pages.length-1&&x.movePage(B,x.pages.length-1)}}else if(mxEvent.isControlDown(A)||mxClient.IS_MAC&&mxEvent.isMetaDown(A)){if(37==A.keyCode)return function(){0<B&&x.selectNextPage(!1)};if(38==A.keyCode)return function(){0<B&&x.selectPage(x.pages[0])};if(39==A.keyCode)return function(){B<
+x.pages.length-1&&x.selectNextPage(!0)};if(40==A.keyCode)return function(){B<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=A.keyCode&&90>=A.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(A)||mxEvent.isShiftDown(A)||mxEvent.isControlDown(A)||mxClient.IS_MAC&&mxEvent.isMetaDown(A)?l.apply(this,arguments):null}}return k};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var k=f.apply(this,arguments);if(null==k)try{var l=
+d.indexOf("&lt;mxfile ");if(0<=l){var n=d.lastIndexOf("&lt;/mxfile&gt;");n>l&&(k=d.substring(l,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(d),A=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);k=null!=A?mxUtils.getXml(A):""}}catch(B){}return k};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var k=d.indexOf('<meta charset="utf-8">');
0<=k&&(d=d.slice(0,k)+'<meta charset="utf-8"/>'+d.slice(k+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,k){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",k);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var l=null!=d?this.editor.extractGraphModel(d,!0):null;null!=l&&(d=l);if(null!=d){l=this.editor.graph;l.model.beginUpdate();try{var n=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");
-if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var z=x.length-1;0<=z;z--){var B=this.updatePageRoot(new DiagramPage(x[z]));null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[z+1]));l.model.execute(new ChangePage(this,B,0==z?B:null,0))}}else null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(z=0;z<n.length;z++)l.model.execute(new ChangePage(this,n[z],null));var I=this.getCurrentFile();null!=I&&I.fileReplaced(k)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,k,l,n,x,z,B,I,H,C,R,U,S){k=null!=
-k?k:this.editor.graph;x=null!=x?x:!1;H=null!=H?H:!0;R=null!=R?R:!Editor.defaultCompressed;var Q=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var v="_blank";else Q=v=n;if(null==d)return"";var A=d;if("mxfile"!=A.nodeName.toLowerCase()){if(R){var N=d.ownerDocument.createElement("diagram");N.setAttribute("name",mxResources.get("pageWithNumber",[1]));N.setAttribute("id",Editor.guid());N.appendChild(d)}else{N=Graph.zapGremlins(mxUtils.getXml(d));A=Graph.compress(N);if(Graph.decompress(A)!=
-N)return N;N=d.ownerDocument.createElement("diagram");N.setAttribute("name",mxResources.get("pageWithNumber",[1]));N.setAttribute("id",Editor.guid());mxUtils.setTextContent(N,A)}A=d.ownerDocument.createElement("mxfile");A.appendChild(N)}C?(A=A.cloneNode(!0),A.removeAttribute("modified"),A.removeAttribute("host"),A.removeAttribute("agent"),A.removeAttribute("etag"),A.removeAttribute("userAgent"),A.removeAttribute("version"),A.removeAttribute("editor"),A.removeAttribute("type")):(A.removeAttribute("userAgent"),
-A.removeAttribute("modified"),A.removeAttribute("version"),A.removeAttribute("editor"),A.removeAttribute("pages"),A.removeAttribute("type"),A.removeAttribute("etag"),mxClient.IS_CHROMEAPP?A.setAttribute("host","Chrome"):EditorUi.isElectronApp?A.setAttribute("host","Electron"):A.setAttribute("host",window.location.hostname),A.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),A.setAttribute("version",EditorUi.VERSION),1<A.getElementsByTagName("diagram").length&&
-null!=this.pages&&A.setAttribute("pages",this.pages.length));null!=U&&(A=A.cloneNode(!0),A.setAttribute("scale",U));null!=S&&(A=A.cloneNode(!0),A.setAttribute("border",S));d=R?mxUtils.getPrettyXml(A):mxUtils.getXml(A);if(!z&&!x&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))d=this.getHtml2(mxUtils.getXml(A),k,null!=l?l.getTitle():null,v,Q);else if(z||!x&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(A),
-d=this.getEmbeddedSvg(d,k,n,null,I,H,Q,null,null,l.scale,l.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,k,l,n){d=null!=d?d:!0;k=null!=k?k:!1;l=null!=l?l:!Editor.defaultCompressed;var x=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var C=H.getElementsByTagName("mxGraphModel"),R=0<C.length?C[0]:null;C=H;null==R&&l?(R=mxUtils.getNodeValue(H),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(C=H.cloneNode(!1),
-C.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||l?C=H.cloneNode(!0):(C=H.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(R)));x.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),k)d(this.currentPage.node);else for(k=0;k<this.pages.length;k++){var z=this.pages[k],B=z.node;if(z!=this.currentPage)if(z.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(z.root));
-this.editor.graph.saveViewState(z.viewState,I,null,n);EditorUi.removeChildNodes(B);B.appendChild(I);delete z.needsUpdate}else n&&(this.updatePageRoot(z),null!=z.viewState.backgroundImage&&null!=z.viewState.backgroundImage.originalSrc&&(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(z.root)),this.editor.graph.saveViewState(z.viewState,I,null,n,z),B=B.cloneNode(!1),B.appendChild(I)));d(B)}return x};EditorUi.prototype.anonymizeString=function(d,k){for(var l=[],n=0;n<d.length;n++){var x=
+if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var A=x.length-1;0<=A;A--){var B=this.updatePageRoot(new DiagramPage(x[A]));null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[A+1]));l.model.execute(new ChangePage(this,B,0==A?B:null,0))}}else null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
+[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(A=0;A<n.length;A++)l.model.execute(new ChangePage(this,n[A],null));var I=this.getCurrentFile();null!=I&&I.fileReplaced(k)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,k,l,n,x,A,B,I,G,C,R,T,S){k=null!=
+k?k:this.editor.graph;x=null!=x?x:!1;G=null!=G?G:!0;R=null!=R?R:!Editor.defaultCompressed;var Q=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var v="_blank";else Q=v=n;if(null==d)return"";var z=d;if("mxfile"!=z.nodeName.toLowerCase()){if(R){var N=d.ownerDocument.createElement("diagram");N.setAttribute("name",mxResources.get("pageWithNumber",[1]));N.setAttribute("id",Editor.guid());N.appendChild(d)}else{N=Graph.zapGremlins(mxUtils.getXml(d));z=Graph.compress(N);if(Graph.decompress(z)!=
+N)return N;N=d.ownerDocument.createElement("diagram");N.setAttribute("name",mxResources.get("pageWithNumber",[1]));N.setAttribute("id",Editor.guid());mxUtils.setTextContent(N,z)}z=d.ownerDocument.createElement("mxfile");z.appendChild(N)}C?(z=z.cloneNode(!0),z.removeAttribute("modified"),z.removeAttribute("host"),z.removeAttribute("agent"),z.removeAttribute("etag"),z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("type")):(z.removeAttribute("userAgent"),
+z.removeAttribute("modified"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("pages"),z.removeAttribute("type"),z.removeAttribute("etag"),mxClient.IS_CHROMEAPP?z.setAttribute("host","Chrome"):EditorUi.isElectronApp?z.setAttribute("host","Electron"):z.setAttribute("host",window.location.hostname),z.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),z.setAttribute("version",EditorUi.VERSION),1<z.getElementsByTagName("diagram").length&&
+null!=this.pages&&z.setAttribute("pages",this.pages.length));null!=T&&(z=z.cloneNode(!0),z.setAttribute("scale",T));null!=S&&(z=z.cloneNode(!0),z.setAttribute("border",S));d=R?mxUtils.getPrettyXml(z):mxUtils.getXml(z);if(!A&&!x&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))d=this.getHtml2(mxUtils.getXml(z),k,null!=l?l.getTitle():null,v,Q);else if(A||!x&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(z),
+d=this.getEmbeddedSvg(d,k,n,null,I,G,Q,null,null,l.scale,l.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,k,l,n){d=null!=d?d:!0;k=null!=k?k:!1;l=null!=l?l:!Editor.defaultCompressed;var x=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(G){var C=G.getElementsByTagName("mxGraphModel"),R=0<C.length?C[0]:null;C=G;null==R&&l?(R=mxUtils.getNodeValue(G),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(C=G.cloneNode(!1),
+C.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||l?C=G.cloneNode(!0):(C=G.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(R)));x.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),k)d(this.currentPage.node);else for(k=0;k<this.pages.length;k++){var A=this.pages[k],B=A.node;if(A!=this.currentPage)if(A.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(A.root));
+this.editor.graph.saveViewState(A.viewState,I,null,n);EditorUi.removeChildNodes(B);B.appendChild(I);delete A.needsUpdate}else n&&(this.updatePageRoot(A),null!=A.viewState.backgroundImage&&null!=A.viewState.backgroundImage.originalSrc&&(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(A.root)),this.editor.graph.saveViewState(A.viewState,I,null,n,A),B=B.cloneNode(!1),B.appendChild(I)));d(B)}return x};EditorUi.prototype.anonymizeString=function(d,k){for(var l=[],n=0;n<d.length;n++){var x=
d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?l.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):x.toUpperCase()!=x?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?l.push(" "):l.push("?"):l.push(k?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(d){d=mxUtils.clone(d);if(null!=d[EditorUi.DIFF_INSERT])for(var k=0;k<d[EditorUi.DIFF_INSERT].length;k++)try{var l=
-mxUtils.parseXml(d[EditorUi.DIFF_INSERT][k].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));d[EditorUi.DIFF_INSERT][k].data=mxUtils.getXml(l)}catch(z){d[EditorUi.DIFF_INSERT][k].data=z.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(k=mxUtils.bind(this,function(z){var B=x.cells[z];
-if(null!=B){for(var I in B)null!=B[I].value&&(B[I].value="["+B[I].value.length+"]"),null!=B[I].xmlValue&&(B[I].xmlValue="["+B[I].xmlValue.length+"]"),null!=B[I].style&&(B[I].style="["+B[I].style.length+"]"),mxUtils.isEmptyObject(B[I])&&delete B[I];mxUtils.isEmptyObject(B)&&delete x.cells[z]}}),k(EditorUi.DIFF_INSERT),k(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};
+mxUtils.parseXml(d[EditorUi.DIFF_INSERT][k].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));d[EditorUi.DIFF_INSERT][k].data=mxUtils.getXml(l)}catch(A){d[EditorUi.DIFF_INSERT][k].data=A.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][n];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(k=mxUtils.bind(this,function(A){var B=x.cells[A];
+if(null!=B){for(var I in B)null!=B[I].value&&(B[I].value="["+B[I].value.length+"]"),null!=B[I].xmlValue&&(B[I].xmlValue="["+B[I].xmlValue.length+"]"),null!=B[I].style&&(B[I].style="["+B[I].style.length+"]"),mxUtils.isEmptyObject(B[I])&&delete B[I];mxUtils.isEmptyObject(B)&&delete x.cells[A]}}),k(EditorUi.DIFF_INSERT),k(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};
EditorUi.prototype.anonymizeAttributes=function(d,k){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&d.setAttribute(d.attributes[l].name,this.anonymizeString(d.attributes[l].value,k));if(null!=d.childNodes)for(l=0;l<d.childNodes.length;l++)this.anonymizeAttributes(d.childNodes[l],k)};EditorUi.prototype.anonymizeNode=function(d,k){k=d.getElementsByTagName("mxCell");for(var l=0;l<k.length;l++)null!=k[l].getAttribute("value")&&k[l].setAttribute("value","["+k[l].getAttribute("value").length+
"]"),null!=k[l].getAttribute("xmlValue")&&k[l].setAttribute("xmlValue","["+k[l].getAttribute("xmlValue").length+"]"),null!=k[l].getAttribute("style")&&k[l].setAttribute("style","["+k[l].getAttribute("style").length+"]"),null!=k[l].parentNode&&"root"!=k[l].parentNode.nodeName&&null!=k[l].parentNode.parentNode&&(k[l].setAttribute("id",k[l].parentNode.getAttribute("id")),k[l].parentNode.parentNode.replaceChild(k[l],k[l].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var k=
this.getCurrentFile();null!=k&&(k.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&k.invalidChecksum?k.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(k.clearAutosave(),this.clearStatus(),d?k.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();k.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();k.handleFileError(l,!0)})):k.synchronizeFile(mxUtils.bind(this,function(){k.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){k.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(d,k,l,n,x,z,B,I,H,C,R,U,S){x=null!=x?x:!0;z=null!=z?z:!1;C=null!=C?C:!Editor.defaultCompressed;var Q=this.editor.graph;if((k||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var v=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());Q.setBackgroundImage=this.editor.graph.setBackgroundImage;Q.background=this.editor.graph.background;
-var A=null!=this.pages?this.pages[0]:null;null==A||this.currentPage==A?Q.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&Q.setBackgroundImage(A.viewState.backgroundImage);Q.getGlobalVariable=function(N){return"page"==N&&null!=A?A.getName():"pagenumber"==N?1:v.apply(this,arguments)};document.body.appendChild(Q.container);null!=A&&Q.model.setRoot(A.root)}B=null!=B?B:this.getXmlFileData(x,z,C,R);H=null!=H?H:this.getCurrentFile();d=this.createFileData(B,Q,H,
-window.location.href,d,k,l,n,x,I,C,U,S);Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);return d};EditorUi.prototype.getHtml=function(d,k,l,n,x,z){z=null!=z?z:!0;var B=null,I=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=k){B=z?k.getGraphBounds():k.getBoundingBox(k.getSelectionCells());var H=k.view.scale;z=Math.floor(B.x/H-k.view.translate.x);H=Math.floor(B.y/H-k.view.translate.y);B=k.background;null==x&&(k=this.getBasenames().join(";"),0<k.length&&(I=EditorUi.drawHost+
-"/embed.js?s="+k));d.setAttribute("x0",z);d.setAttribute("y0",H)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){k.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(d,k,l,n,x,A,B,I,G,C,R,T,S){x=null!=x?x:!0;A=null!=A?A:!1;C=null!=C?C:!Editor.defaultCompressed;var Q=this.editor.graph;if((k||!d&&null!=G&&/(\.svg)$/i.test(G.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var v=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());Q.setBackgroundImage=this.editor.graph.setBackgroundImage;Q.background=this.editor.graph.background;
+var z=null!=this.pages?this.pages[0]:null;null==z||this.currentPage==z?Q.setBackgroundImage(this.editor.graph.backgroundImage):null!=z.viewState&&null!=z.viewState&&Q.setBackgroundImage(z.viewState.backgroundImage);Q.getGlobalVariable=function(N){return"page"==N&&null!=z?z.getName():"pagenumber"==N?1:v.apply(this,arguments)};document.body.appendChild(Q.container);null!=z&&Q.model.setRoot(z.root)}B=null!=B?B:this.getXmlFileData(x,A,C,R);G=null!=G?G:this.getCurrentFile();d=this.createFileData(B,Q,G,
+window.location.href,d,k,l,n,x,I,C,T,S);Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);return d};EditorUi.prototype.getHtml=function(d,k,l,n,x,A){A=null!=A?A:!0;var B=null,I=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=k){B=A?k.getGraphBounds():k.getBoundingBox(k.getSelectionCells());var G=k.view.scale;A=Math.floor(B.x/G-k.view.translate.x);G=Math.floor(B.y/G-k.view.translate.y);B=k.background;null==x&&(k=this.getBasenames().join(";"),0<k.length&&(I=EditorUi.drawHost+
+"/embed.js?s="+k));d.setAttribute("x0",A);d.setAttribute("y0",G)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&null!=B&&B!=mxConstants.NONE?' style="background-color:'+B+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+
(null==x?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,k,l,n,x){k=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+
x+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var k=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,l=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[k],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");d=null!=k?this.editor.extractGraphModel(k,!0):null;null!=d&&(k=d);if(null!=k&&"mxfile"==k.nodeName&&(d=k.getElementsByTagName("diagram"),
-l={},0<d.length)){var n=this.getHashObject(),x=null;this.fileNode=k;this.pages=[];for(var z=0;z<d.length;z++){null==d[z].getAttribute("id")&&d[z].setAttribute("id",z);k=new DiagramPage(d[z]);null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[z+1]));this.pages.push(k);if(null==n.pageId&&null!=urlParams["page-id"]&&k.getId()==urlParams["page-id"]||null!=n.pageId&&k.getId()==n.pageId)x=k;if(null==l[k.getId()])l[k.getId()]=k;else throw Error(k.getId()+": Duplicate page ID");}this.currentPage=
+l={},0<d.length)){var n=this.getHashObject(),x=null;this.fileNode=k;this.pages=[];for(var A=0;A<d.length;A++){null==d[A].getAttribute("id")&&d[A].setAttribute("id",A);k=new DiagramPage(d[A]);null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[A+1]));this.pages.push(k);if(null==n.pageId&&null!=urlParams["page-id"]&&k.getId()==urlParams["page-id"]||null!=n.pageId&&k.getId()==n.pageId)x=k;if(null==l[k.getId()])l[k.getId()]=k;else throw Error(k.getId()+": Duplicate page ID");}this.currentPage=
null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];k=this.currentPage.node}null==this.fileNode&&null!=k&&(this.fileNode=k.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(k.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(k);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),
-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");k={};for(z=0;z<B.length;z++)k[B[z]]=!0;var I=this.editor.graph.getModel(),H=I.getChildren(I.root);for(z=0;z<H.length;z++){var C=H[z];I.setVisible(C,k[C.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var k=this.getCurrentFile();k=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(k)||/(\.html)$/i.test(k)||/(\.svg)$/i.test(k)||/(\.png)$/i.test(k))k=
-k.substring(0,k.lastIndexOf("."));/(\.drawio)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(k=k+"-"+this.currentPage.getName());return k};EditorUi.prototype.downloadFile=function(d,k,l,n,x,z,B,I,H,C,R,U,S,Q,v,A,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename(!x),K=J+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+
-d;if("xml"==d){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,k);this.saveData(K,d,m,"text/xml")}else if("html"==d)m=this.getHtml2(this.getFileData(!0),this.editor.graph,J),this.saveData(K,d,m,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,P){try{return this.createDownloadRequest(O,d,n,P,B,x,I,H,C,R,U,void 0,
-void 0,!z,S,Q,v,A,N)}catch(T){this.handleError(T)}}));else{var t=null,D=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==d){var M=this.editor.graph.background;if(B||M==mxConstants.NONE)M=null;var L=this.editor.graph.getSvg(M,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,
-mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();D(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();D(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,k,l,n,x,z,B,I,H,C,R,U,S,Q,v,A,N,J,K){d=this.downloadRequestBuilder(d,k,l,n,x,z,B,I,H,C,R,U,S,Q,v,A,N,J,K);k="";for(var m in d)l=d[m],null!=l&&(k+=m+"="+encodeURIComponent(l)+
-"&");return new mxXmlRequest(EXPORT_URL,k)};EditorUi.prototype.downloadRequestBuilder=function(d,k,l,n,x,z,B,I,H,C,R,U,S,Q,v,A,N,J,K){var m=this.editor.graph,t=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==z?!1:"xmlpng"!=k,null,null,null,!Editor.defaultCompressed,"pdf"==k);var D=null,M=null,L=null;if(!EditorUi.isElectronApp&&(t.width*t.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==k&&(null!=R?(D=R.from,M=R.to):0==z&&
-(L="1"));"xmlpng"==k&&(C="1",k="png");if(("xmlpng"==k||"svg"==k)&&null!=this.pages&&null!=this.currentPage)for(z=0;z<this.pages.length;z++)if(this.pages[z]==this.currentPage){D=z;break}z=m.background;"png"!=k&&"pdf"!=k&&"svg"!=k||!x?x||null!=z&&z!=mxConstants.NONE||(z="#ffffff"):z=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=R&&null!=R.from&&(x.globalVars.pagenumber=R.from+1);H&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==k?mxGraphView.prototype.defaultGridColor:
-m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:k,from:D,to:M,allPages:L,bg:null!=z?z:mxConstants.NONE,base64:n,embedXml:C,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:U&&isFinite(U)?U:null,h:S&&isFinite(S)?S:null,crop:null!=Q&&Q?"1":"0",fit:null!=A&&A?"1":"0",shadows:null!=K&&K?"1":"0",sheetsAcross:N,sheetsDown:J}};EditorUi.prototype.setMode=function(d,k){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=
+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");k={};for(A=0;A<B.length;A++)k[B[A]]=!0;var I=this.editor.graph.getModel(),G=I.getChildren(I.root);for(A=0;A<G.length;A++){var C=G[A];I.setVisible(C,k[C.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var k=this.getCurrentFile();k=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(k)||/(\.html)$/i.test(k)||/(\.svg)$/i.test(k)||/(\.png)$/i.test(k))k=
+k.substring(0,k.lastIndexOf("."));/(\.drawio)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(k=k+"-"+this.currentPage.getName());return k};EditorUi.prototype.downloadFile=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename(!x),K=J+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+
+d;if("xml"==d){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,k);this.saveData(K,d,m,"text/xml")}else if("html"==d)m=this.getHtml2(this.getFileData(!0),this.editor.graph,J),this.saveData(K,d,m,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,P){try{return this.createDownloadRequest(O,d,n,P,B,x,I,G,C,R,T,void 0,
+void 0,!A,S,Q,v,z,N)}catch(U){this.handleError(U)}}));else{var t=null,D=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==d){var M=this.editor.graph.background;if(B||M==mxConstants.NONE)M=null;var L=this.editor.graph.getSvg(M,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,
+mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();D(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();D(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N,J,K){d=this.downloadRequestBuilder(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N,J,K);k="";for(var m in d)l=d[m],null!=l&&(k+=m+"="+encodeURIComponent(l)+
+"&");return new mxXmlRequest(EXPORT_URL,k)};EditorUi.prototype.downloadRequestBuilder=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z,N,J,K){var m=this.editor.graph,t=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==A?!1:"xmlpng"!=k,null,null,null,!Editor.defaultCompressed,"pdf"==k);var D=null,M=null,L=null;if(!EditorUi.isElectronApp&&(t.width*t.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==k&&(null!=R?(D=R.from,M=R.to):0==A&&
+(L="1"));"xmlpng"==k&&(C="1",k="png");if(("xmlpng"==k||"svg"==k)&&null!=this.pages&&null!=this.currentPage)for(A=0;A<this.pages.length;A++)if(this.pages[A]==this.currentPage){D=A;break}A=m.background;"png"!=k&&"pdf"!=k&&"svg"!=k||!x?x||null!=A&&A!=mxConstants.NONE||(A="#ffffff"):A=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=R&&null!=R.from&&(x.globalVars.pagenumber=R.from+1);G&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==k?mxGraphView.prototype.defaultGridColor:
+m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:k,from:D,to:M,allPages:L,bg:null!=A?A:mxConstants.NONE,base64:n,embedXml:C,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:T&&isFinite(T)?T:null,h:S&&isFinite(S)?S:null,crop:null!=Q&&Q?"1":"0",fit:null!=z&&z?"1":"0",shadows:null!=K&&K?"1":"0",sheetsAcross:N,sheetsDown:J}};EditorUi.prototype.setMode=function(d,k){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=
window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var k=d.indexOf("#");0<=k&&(d=d.substring(0,k))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,k={};if(null!=d&&0<d.length){var l=d.lastIndexOf("#");if(0<l){d=decodeURIComponent(d.substring(l+1));try{k=JSON.parse(d)}catch(n){}}}return k};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();
d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var k=window.location.hash;if(null==k||""==k)k="#";var l=k.lastIndexOf("#");0<l&&(k=k.substring(0,l));try{null==d||mxUtils.isEmptyObject(d)||(k=k+"#"+encodeURIComponent(JSON.stringify(d)))}catch(n){}0<l&&0<k.lastIndexOf("#")?window.location.hash=k:window.location.replace(k)}};EditorUi.prototype.loadDescriptor=function(d,k,l){var n=window.location.hash,
-x=mxUtils.bind(this,function(B){var I=null!=d.data?d.data:"";null!=B&&0<B.length&&(0<I.length&&(I+="\n"),I+=B);B=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(S){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=d.update){var H=null!=d.interval?
-parseInt(d.interval):6E4,C=null,R=mxUtils.bind(this,function(){var S=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(Q){S===this.currentPage&&(200<=Q.getStatus()&&300>=Q.getStatus()?(this.updateDiagram(Q.getText()),U()):this.handleError({message:mxResources.get("error")+" "+Q.getStatus()}))}),mxUtils.bind(this,function(Q){this.handleError(Q)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(R,
-H)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();R()}));U();R()}null!=k&&k()});if(null!=d.url&&0<d.url.length){var z=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(z,mxUtils.bind(this,function(B){x(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function k(m){var t=new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);t.addListener(mxEvent.CLICK,function(D,M){n.alert(m.tooltip)});
-return t}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,z=x.getModel();z.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=z.getCell(d.getAttribute("id"));if(null!=I){try{var H=d.getAttribute("value");if(null!=H){var C=mxUtils.parseXml(H).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))z.setValue(I,C);else for(var R=C.attributes,U=0;U<
-R.length;U++)x.setAttributeForCell(I,R[U].nodeName,0<R[U].nodeValue.length?R[U].nodeValue:null)}}catch(m){null!=window.console&&console.log("Error in value for "+I.id+": "+m)}try{var S=d.getAttribute("style");null!=S&&x.model.setStyle(I,S)}catch(m){null!=window.console&&console.log("Error in style for "+I.id+": "+m)}try{var Q=d.getAttribute("icon");if(null!=Q){var v=0<Q.length?JSON.parse(Q):null;null!=v&&v.append||x.removeCellOverlays(I);null!=v&&x.addCellOverlay(I,k(v))}}catch(m){null!=window.console&&
-console.log("Error in icon for "+I.id+": "+m)}try{var A=d.getAttribute("geometry");if(null!=A){A=JSON.parse(A);var N=x.getCellGeometry(I);if(null!=N){N=N.clone();for(key in A){var J=parseFloat(A[key]);"dx"==key?N.x+=J:"dy"==key?N.y+=J:"dw"==key?N.width+=J:"dh"==key?N.height+=J:N[key]=parseFloat(A[key])}x.model.setGeometry(I,N)}}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
-K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,z)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(B=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{z.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,
-B)}return l};EditorUi.prototype.getCopyFilename=function(d,k){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=l.lastIndexOf(".");0<=n&&(d=l.substring(n),l=l.substring(0,n));if(k){k=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var z=x.getDate(),B=x.getHours(),I=x.getMinutes();x=x.getSeconds();l=k+(" "+(l+"-"+n+"-"+z+"-"+B+"-"+I+"-"+x))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.logIfModified=function(d,k){try{null!=d&&k&&EditorUi.debug("File.closed",
-[d])}catch(l){}};EditorUi.prototype.fileLoaded=function(d,k,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[d],"noDialogs",[k]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var z=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
+x=mxUtils.bind(this,function(B){var I=null!=d.data?d.data:"";null!=B&&0<B.length&&(0<I.length&&(I+="\n"),I+=B);B=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(S){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=d.update){var G=null!=d.interval?
+parseInt(d.interval):6E4,C=null,R=mxUtils.bind(this,function(){var S=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(Q){S===this.currentPage&&(200<=Q.getStatus()&&300>=Q.getStatus()?(this.updateDiagram(Q.getText()),T()):this.handleError({message:mxResources.get("error")+" "+Q.getStatus()}))}),mxUtils.bind(this,function(Q){this.handleError(Q)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(R,
+G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();R()}));T();R()}null!=k&&k()});if(null!=d.url&&0<d.url.length){var A=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(A,mxUtils.bind(this,function(B){x(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function k(m){var t=new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);t.addListener(mxEvent.CLICK,function(D,M){n.alert(m.tooltip)});
+return t}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,A=x.getModel();A.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=A.getCell(d.getAttribute("id"));if(null!=I){try{var G=d.getAttribute("value");if(null!=G){var C=mxUtils.parseXml(G).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))A.setValue(I,C);else for(var R=C.attributes,T=0;T<
+R.length;T++)x.setAttributeForCell(I,R[T].nodeName,0<R[T].nodeValue.length?R[T].nodeValue:null)}}catch(m){null!=window.console&&console.log("Error in value for "+I.id+": "+m)}try{var S=d.getAttribute("style");null!=S&&x.model.setStyle(I,S)}catch(m){null!=window.console&&console.log("Error in style for "+I.id+": "+m)}try{var Q=d.getAttribute("icon");if(null!=Q){var v=0<Q.length?JSON.parse(Q):null;null!=v&&v.append||x.removeCellOverlays(I);null!=v&&x.addCellOverlay(I,k(v))}}catch(m){null!=window.console&&
+console.log("Error in icon for "+I.id+": "+m)}try{var z=d.getAttribute("geometry");if(null!=z){z=JSON.parse(z);var N=x.getCellGeometry(I);if(null!=N){N=N.clone();for(key in z){var J=parseFloat(z[key]);"dx"==key?N.x+=J:"dy"==key?N.y+=J:"dw"==key?N.width+=J:"dh"==key?N.height+=J:N[key]=parseFloat(z[key])}x.model.setGeometry(I,N)}}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
+K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,A)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(B=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{A.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,
+B)}return l};EditorUi.prototype.getCopyFilename=function(d,k){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=l.lastIndexOf(".");0<=n&&(d=l.substring(n),l=l.substring(0,n));if(k){k=l;var x=new Date;l=x.getFullYear();n=x.getMonth()+1;var A=x.getDate(),B=x.getHours(),I=x.getMinutes();x=x.getSeconds();l=k+(" "+(l+"-"+n+"-"+A+"-"+B+"-"+I+"-"+x))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.logIfModified=function(d,k){try{null!=d&&k&&EditorUi.debug("File.closed",
+[d])}catch(l){}};EditorUi.prototype.fileLoaded=function(d,k,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[d],"noDialogs",[k]);var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var A=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
null!=n&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!k&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();k||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=d)try{this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",
this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?d.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));x=!0;if(!this.isOffline()&&null!=d.getMode()){var B="1"==urlParams.sketch?"sketch":
uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),
-title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(H){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||z():z()});k?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
-function(){this.hideDialog();var H=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(H)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,k){var l=0,n=new mxGraphModel,x=new mxCodec;null!=k&&(k.byteCount=0,k.attrCount=0,k.eltCount=0,k.nodeCount=0);for(var z=0;z<d.length;z++){this.updatePageRoot(d[z]);var B=d[z].node.cloneNode(!1);B.removeAttribute("name");n.root=d[z].root;
-var I=x.encode(n);this.editor.graph.saveViewState(d[z].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");B.appendChild(I);null!=k&&(k.eltCount+=B.getElementsByTagName("*").length,k.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(H,C,R,U){return!U||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?U&&"mxCell"==H.nodeName&&"previous"==C?null:R:Math.round(R)},k)<<0}return l};EditorUi.prototype.hashValue=
-function(d,k,l){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,k,l));if(null!=d.attributes){null!=l&&(l.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var z=d.attributes[x].name,B=null!=k?k(d,z,d.attributes[x].value,!0):d.attributes[x].value;null!=B&&(n^=this.hashValue(z,k,l)+this.hashValue(B,k,l))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)n=
-(n<<5)-n+this.hashValue(d.childNodes[x],k,l)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);k=0;null!=l&&(l.byteCount+=d.length);for(x=0;x<d.length;x++)k=(k<<5)-k+d.charCodeAt(x)<<0;n^=k}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,k,l,n,x,z,B){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
+title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(G){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||A():A()});k?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
+function(){this.hideDialog();var G=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(G)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else A();return x};EditorUi.prototype.getHashValueForPages=function(d,k){var l=0,n=new mxGraphModel,x=new mxCodec;null!=k&&(k.byteCount=0,k.attrCount=0,k.eltCount=0,k.nodeCount=0);for(var A=0;A<d.length;A++){this.updatePageRoot(d[A]);var B=d[A].node.cloneNode(!1);B.removeAttribute("name");n.root=d[A].root;
+var I=x.encode(n);this.editor.graph.saveViewState(d[A].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");B.appendChild(I);null!=k&&(k.eltCount+=B.getElementsByTagName("*").length,k.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(G,C,R,T){return!T||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?T&&"mxCell"==G.nodeName&&"previous"==C?null:R:Math.round(R)},k)<<0}return l};EditorUi.prototype.hashValue=
+function(d,k,l){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,k,l));if(null!=d.attributes){null!=l&&(l.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var A=d.attributes[x].name,B=null!=k?k(d,A,d.attributes[x].value,!0):d.attributes[x].value;null!=B&&(n^=this.hashValue(A,k,l)+this.hashValue(B,k,l))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)n=
+(n<<5)-n+this.hashValue(d.childNodes[x],k,l)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);k=0;null!=l&&(l.byteCount+=d.length);for(x=0;x<d.length;x++)k=(k<<5)-k+d.charCodeAt(x)<<0;n^=k}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,k,l,n,x,A,B){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var k=0;k<d.length;k++)null!=d[k].xml&&"<"!=d[k].xml.charAt(0)&&(d[k].xml=mxUtils.trim(Graph.decompress(d[k].xml)));k=mxUtils.createXmlDocument();var l=k.createElement("mxlibrary");
mxUtils.setTextContent(l,JSON.stringify(d,null,2));k.appendChild(l);return mxUtils.getXml(k,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var k=this.sidebar.palettes[d];if(null!=k){for(var l=0;l<k.length;l++)k[l].parentNode.removeChild(k[l]);delete this.sidebar.palettes[d]}};
EditorUi.prototype.repositionLibrary=function(d,k){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!k){null==d&&(k=this.sidebar.palettes["L.scratchpad"],null==k&&(k=this.sidebar.palettes.search),null!=k&&(d=k[k.length-1].nextSibling));d=null!=d?d:l.firstChild.nextSibling.nextSibling;k=l.lastChild;var n=k.previousSibling;l.insertBefore(k,d);l.insertBefore(n,k)}};EditorUi.prototype.loadLibrary=function(d,k){var l=mxUtils.parseXml(d.getData());if("mxlibrary"==
l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(d,n,l.documentElement.getAttribute("title"),k)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(d,k){var l=d?"findReplace":"find",n=l+"Window";
-if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,z=d?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(z+20),100,z,d?x?304:288:180,d);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==k&&this[n].window.setVisible(!this[n].window.isVisible());null!=k&&(this[n].doSearch(k),
-this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(d,k,l,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var x=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var z=0;z<this.openLibraries.length;z++)if(this.openLibraries[z].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[z],this.openLibraries);break}x={file:d,images:k,title:l,expand:n};this.openLibraries.push(x)}else this.scratchpad=
-d;z=this.sidebar.palettes[d.getHash()];z=null!=z?z[z.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(J,K){0==J.length&&d.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),K.appendChild(B)):this.addLibraryEntries(J,K)});null!=this.sidebar&&null!=k&&this.sidebar.addEntries(k);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
-var H=this.sidebar.addPalette(d.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(J){I(k,J)}));null!=x&&(x.div=H);this.repositionLibrary(z,"L.scratchpad"!=d.getHash());n=H.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&n.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var C=document.createElement("div");C.style.backgroundColor="inherit";n.style.position="relative";var R=document.createElement("img");R.className="geLibraryButton";R.setAttribute("src",
-Editor.crossImage);R.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)C.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var K=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K();mxEvent.consume(J)}}));if(d.isEditable()){var S=
-this.editor.graph,Q=null;l=mxUtils.bind(this,function(J){this.showLibraryDialog(d.getTitle(),H,k,d,d.getMode());mxEvent.consume(J)});var v=mxUtils.bind(this,function(J){d.setModified(!0);d.isAutosave()?(null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q),Q=R.cloneNode(!1),Q.setAttribute("src",Editor.spinImage),Q.setAttribute("title",mxResources.get("saving")),Q.style.cursor="default",Q.style.marginRight="2px",Q.style.marginTop="-2px",C.insertBefore(Q,C.firstChild),this.saveLibrary(d.getTitle(),
-k,d,d.getMode(),!0,!0,function(){null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q)})):null==U&&(U=R.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),C.insertBefore(U,C.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(K){this.saveLibrary(d.getTitle(),k,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(K)})))}),A=mxUtils.bind(this,function(J,
-K,m,t){J=S.cloneCells(mxUtils.sortCells(S.model.getTopmostCells(J)));for(var D=0;D<J.length;D++){var M=S.getCellGeometry(J[D]);null!=M&&M.translate(-K.x,-K.y)}H.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,t||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=t&&(K.title=t);k.push(K);v(m);null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null)}),N=
+if(null==this[n]){var x="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,A=d?x?330:300:240;this[n]=new FindWindow(this,document.body.offsetWidth-(A+20),100,A,d?x?304:288:180,d);this[n].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[n].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[n].window.setVisible(!0)}else null==k&&this[n].window.setVisible(!this[n].window.isVisible());null!=k&&(this[n].doSearch(k),
+this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(d,k,l,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var x=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var A=0;A<this.openLibraries.length;A++)if(this.openLibraries[A].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[A],this.openLibraries);break}x={file:d,images:k,title:l,expand:n};this.openLibraries.push(x)}else this.scratchpad=
+d;A=this.sidebar.palettes[d.getHash()];A=null!=A?A[A.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(J,K){0==J.length&&d.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),K.appendChild(B)):this.addLibraryEntries(J,K)});null!=this.sidebar&&null!=k&&this.sidebar.addEntries(k);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
+var G=this.sidebar.addPalette(d.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(J){I(k,J)}));null!=x&&(x.div=G);this.repositionLibrary(A,"L.scratchpad"!=d.getHash());n=G.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&n.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var C=document.createElement("div");C.style.backgroundColor="inherit";n.style.position="relative";var R=document.createElement("img");R.className="geLibraryButton";R.setAttribute("src",
+Editor.crossImage);R.setAttribute("title",mxResources.get("close"));var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)C.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var K=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K();mxEvent.consume(J)}}));if(d.isEditable()){var S=
+this.editor.graph,Q=null;l=mxUtils.bind(this,function(J){this.showLibraryDialog(d.getTitle(),G,k,d,d.getMode());mxEvent.consume(J)});var v=mxUtils.bind(this,function(J){d.setModified(!0);d.isAutosave()?(null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q),Q=R.cloneNode(!1),Q.setAttribute("src",Editor.spinImage),Q.setAttribute("title",mxResources.get("saving")),Q.style.cursor="default",Q.style.marginRight="2px",Q.style.marginTop="-2px",C.insertBefore(Q,C.firstChild),this.saveLibrary(d.getTitle(),
+k,d,d.getMode(),!0,!0,function(){null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q)})):null==T&&(T=R.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),C.insertBefore(T,C.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(K){this.saveLibrary(d.getTitle(),k,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==T||d.isModified()||(T.parentNode.removeChild(T),T=null)});mxEvent.consume(K)})))}),z=mxUtils.bind(this,function(J,
+K,m,t){J=S.cloneCells(mxUtils.sortCells(S.model.getTopmostCells(J)));for(var D=0;D<J.length;D++){var M=S.getCellGeometry(J[D]);null!=M&&M.translate(-K.x,-K.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,t||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=t&&(K.title=t);k.push(K);v(m);null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null)}),N=
mxUtils.bind(this,function(J){if(S.isSelectionEmpty())S.getRubberband().isActive()?(S.getRubberband().execute(J),S.getRubberband().reset()):null!=J&&mxEvent.getSource(J).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var K=S.getSelectionCells(),m=S.view.getBounds(K);if(null!=m&&0<m.width&&0<m.height){var t=S.view.scale;m.x/=t;m.y/=t;m.width/=t;m.height/=t;m.x-=S.view.translate.x;m.y-=S.view.translate.y;
-A(K,m)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(J)});mxEvent.addGestureListeners(H,function(){},mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler.first&&(S.graphHandler.suspend(),null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="hidden"),H.style.backgroundColor="light-dark(#fefefe, #000000)",H.style.cursor="copy",S.panningManager.stop(),S.autoScroll=!1,mxEvent.consume(J))}),
-mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler&&(H.style.backgroundColor="",H.style.cursor="default",this.sidebar.showTooltips=!0,S.panningManager.stop(),S.graphHandler.reset(),S.isMouseDown=!1,S.autoScroll=!0,N(J),mxEvent.consume(J))}));mxEvent.addListener(H,"mouseleave",mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.graphHandler.first&&(S.graphHandler.resume(),null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="visible"),H.style.backgroundColor=
-"",H.style.cursor="",S.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(J){H.style.backgroundColor="light-dark(#fefefe, #000000)";J.dataTransfer.dropEffect="copy";H.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(J){H.style.cursor="";H.style.backgroundColor="";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
-function(K,m,t,D,M,L,O,P,T){if(null!=K&&"image/"==m.substring(0,6))K="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,M,L),K)],K[0].vertex=!0,A(K,new mxRectangle(0,0,M,L),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
-Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,H);k=k.concat(Z);v(J);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var fa=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(fa);
-null!=ea&&A(fa,new mxRectangle(0,0,ea.width,ea.height),J)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null)});null!=T&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(T,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,O)&&null!=T?this.isExternalDataComms()?
-this.parseFile(T,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(K,m)}}));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(H,"dragleave",function(J){H.style.cursor="";H.style.backgroundColor=
+z(K,m)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(J)});mxEvent.addGestureListeners(G,function(){},mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler.first&&(S.graphHandler.suspend(),null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="hidden"),G.style.backgroundColor="light-dark(#fefefe, #000000)",G.style.cursor="copy",S.panningManager.stop(),S.autoScroll=!1,mxEvent.consume(J))}),
+mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler&&(G.style.backgroundColor="",G.style.cursor="default",this.sidebar.showTooltips=!0,S.panningManager.stop(),S.graphHandler.reset(),S.isMouseDown=!1,S.autoScroll=!0,N(J),mxEvent.consume(J))}));mxEvent.addListener(G,"mouseleave",mxUtils.bind(this,function(J){S.isMouseDown&&null!=S.graphHandler.first&&(S.graphHandler.resume(),null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="visible"),G.style.backgroundColor=
+"",G.style.cursor="",S.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(J){G.style.backgroundColor="light-dark(#fefefe, #000000)";J.dataTransfer.dropEffect="copy";G.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){G.style.cursor="";G.style.backgroundColor="";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
+function(K,m,t,D,M,L,O,P,U){if(null!=K&&"image/"==m.substring(0,6))K="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,M,L),K)],K[0].vertex=!0,z(K,new mxRectangle(0,0,M,L),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
+Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,G);k=k.concat(Z);v(J);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var fa=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(fa);
+null!=ea&&z(fa,new mxRectangle(0,0,ea.width,ea.height),J)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<k.length&&(B.parentNode.removeChild(B),B=null)});null!=U&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(U,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,O)&&null!=U?this.isExternalDataComms()?
+this.parseFile(U,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(K,m)}}));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"dragleave",function(J){G.style.cursor="";G.style.backgroundColor=
"";J.stopPropagation();J.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));C.insertBefore(R,C.firstChild);mxEvent.addListener(R,"click",l);l=R.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));C.insertBefore(l,C.firstChild);mxEvent.addListener(l,"click",N);".scratchpad"==d.title&&(this.addSelectionToScratchpad=N);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||
-(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",C.insertBefore(l,C.firstChild))}n.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(d,k){for(var l=0;l<d.length;l++)try{var n=d[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(z+="aspect=fixed;");z=z+"image="+x+";";
-null!=n.style&&(z+=n.style);k.appendChild(this.sidebar.createVertexTemplate(z,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var B=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),I=0==B.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";k.appendChild(this.sidebar.createVertexTemplateFromCells(B,n.w,n.h,I,!0,null,!0))}}catch(H){I=null!=H.message?mxResources.get("error")+": "+H.message:String(H),z=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,
-I,!0,null,!0),k.appendChild(z)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,k,l,n,x,z,B){d=new ImageDialog(this,d,k,l,n,
-x,z,B);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,k,l,n,x,z){var B=localStorage.getItem(k);d=new TextareaDialog(this,d,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=z&&z(I),I==B)this.hideDialog();else{if(0<I.length){var H=JSON.parse(I);localStorage.setItem(k,JSON.stringify(H))}else localStorage.removeItem(k);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),
-null,mxResources.get("close"),null,null,null,!0,null,null,x,l,n);this.showDialog(d.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,k,l,n){d=null!=d?d:mxUtils.bind(this,function(x,z,B,I){z||(x=new ChangePageSetup(this,n?B:null,x),x.ignoreColor=!n,null!=I&&n&&(x.shadowVisible=I),this.editor.graph.model.execute(x))});d=new BackgroundImageDialog(this,d,k,l,n);this.showDialog(d.container,400,
-n?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,k,l,n,x){d=new LibraryDialog(this,d,k,l,n,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(z){z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var k=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&
-k.refresh()}));return k};EditorUi.prototype.handleError=function(d,k,l,n,x,z,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},H=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{B||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",d)}catch(S){}if(null!=
-H||null!=k){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var C=mxResources.get("ok"),R=null;k=null!=k?k:mxResources.get("error");if(null!=H){null!=H.retry&&(C=mxResources.get("cancel"),R=function(){I();H.retry()});if(404==H.code||404==H.status||403==H.code){B=403==H.code?null!=H.message?mxUtils.htmlEntities(H.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
-" ("+this.drive.user.email+")":""),!1);var U=null!=x?null:null!=z?z:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==H.code||404==H.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(k,
-B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=n&&n()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function S(){N.innerText="";for(var J=0;J<Q.length;J++){var K=document.createElement("option");mxUtils.write(K,Q[J].displayName);K.value=J;N.appendChild(K);K=document.createElement("option");K.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(K,"<"+Q[J].email+">");K.setAttribute("disabled","disabled");
-N.appendChild(K)}K=document.createElement("option");mxUtils.write(K,mxResources.get("addAccount"));K.value=Q.length;N.appendChild(K)}var Q=this.drive.getUsersList(),v=document.createElement("div"),A=document.createElement("div");A.style.marginBottom="6px";mxUtils.write(A,mxResources.get("changeUser")+": ");v.appendChild(A);var N=document.createElement("select");N.style.width="100%";S();mxEvent.addListener(N,"change",mxUtils.bind(this,function(){var J=N.value,K=Q.length!=J;K&&this.drive.setUser(Q[J]);
-this.drive.authorize(K,mxUtils.bind(this,function(){K||(Q=this.drive.getUsersList(),S())}),mxUtils.bind(this,function(m){this.handleError(m)}),!0)}));v.appendChild(N);v=new CustomDialog(this,v,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(v.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=H.message?B=""==H.message&&null!=H.name?mxUtils.htmlEntities(H.name,!1):
-mxUtils.htmlEntities(H.message,!1):null!=H.response&&null!=H.response.error?B=mxUtils.htmlEntities(H.response.error,!1):"undefined"!==typeof window.App&&(H.code==App.ERROR_TIMEOUT?B=mxUtils.htmlEntities(mxResources.get("timeout"),!1):H.code==App.ERROR_BUSY?B=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof H&&0<H.length&&(B=mxUtils.htmlEntities(H,!1)))}x=d=null;null!=H&&null!=H.helpLink?(d=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(H.helpLink)})):
-null!=H&&null!=H.ownerEmail?(d=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+d+": "+H.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))})):null!=H&&null!=H.alternateAction&&(d=H.alternateAction.label,x=H.alternateAction.funct);this.showError(k,B,C,l,R,null,null,d,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(d,k,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),k);this.showDialog(d.container,
-l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,k,l,n,x,z){d=null!=d?d:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){B();null!=k&&k()},function(){B();null!=l&&l()},n,x,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,z);d.init()};EditorUi.prototype.showBanner=function(d,k,l,n,x,z,B,I,H){z=!1;if(!(this.bannerShowing||this["hideBanner"+
-d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var C=document.createElement("div");C.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");C.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(C.style,"transform",B);mxUtils.setPrefixedStyle(C.style,"transition","all 1000ms ease");null!=H&&mxUtils.setPrefixedStyle(C.style,"transform-origin",H);H=H=document.createElement("img");
-H.setAttribute("src",Editor.crossImage);H.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));H.setAttribute("border","0");x||(z=document.createElement("img"),z.setAttribute("src",IMAGE_PATH+"/logo.png"),z.setAttribute("border","0"),z.setAttribute("align","absmiddle"),z.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",C.appendChild(z),H.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
-C.appendChild(H));mxUtils.write(C,k);document.body.appendChild(C);this.bannerShowing=!0;x&&(H.className="geLibraryButton",C.appendChild(H));k=document.createElement("div");k.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var R=document.createElement("input");R.setAttribute("type","checkbox");R.setAttribute("id","geDoNotShowAgainCheckbox");R.style.marginRight="6px";if(!n){k.appendChild(R);var U=document.createElement("label");
-U.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(U,mxResources.get("doNotShowAgain"));k.appendChild(U);C.style.paddingBottom=x?"16px":"30px";C.appendChild(k)}var S=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,R.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=H&&mxEvent.addListener(H,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);
-S()}));var Q=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",B);window.setTimeout(mxUtils.bind(this,function(){S()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(v){var A=mxEvent.getSource(v);A!=R&&A!=U?(null!=l&&l(),S(),mxEvent.consume(v)):Q()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",I)}),500);window.setTimeout(Q,x?5E3:3E4);z=!0}return z};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=
-new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(d,k,l,n){d=d.toDataURL("image/"+l);if(null!=d&&6<d.length)null!=k&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(k))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,k,l,n,x){var z="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+
-(null!=k?".drawio":"")+"."+z;d=this.createImageDataUri(d,k,l,x);this.saveData(n,z,d.substring(d.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,k){d=new TextareaDialog(this,d,k,null,null,mxResources.get("close"));
-this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,k,l,n,x,z){"text/xml"!=l||/(\.drawio)$/i.test(k)||/(\.xml)$/i.test(k)||/(\.svg)$/i.test(k)||/(\.html)$/i.test(k)||(k=k+"."+(null!=z?z:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,l):new Blob([d],{type:l}),navigator.msSaveOrOpenBlob(d,k);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==
-l?mxUtils.popup(d,!0):(l.document.write(d),l.document.close(),l.document.execCommand("SaveAs",!0,k),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(k+":",d):this.openInNewWindow(d,l,n);else{var B=document.createElement("a");z=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-z=65==(I?parseInt(I[2],10):!1)?!1:z}if(z||this.isOffline()){B.href=URL.createObjectURL(n?this.base64ToBlob(d,l):new Blob([d],{type:l}));z?B.download=k:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(H){}}else this.createEchoRequest(d,k,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,k,l,n,x,z){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,
-d+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=z?"&base64="+z:"")+(null!=k?"&filename="+encodeURIComponent(k):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,k,l,n,x,z,B,I,H){z=null!=z?z:!1;B=null!=B?B:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(U,S,Q,v){try{if("_blank"==S)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var A=new EmbedDialog(this,d);this.showDialog(A.container,
-450,240,!0,!0);A.init()}else{var N=window.open("about:blank");null==N?mxUtils.popup(d,!0):(N.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),N.document.close())}else if(S==App.MODE_DEVICE||"download"==S)this.doSaveLocalFile(d,U,l,n,null,I);else if(null!=U&&0<U.length){var J=mxUtils.bind(this,function(K){try{this.exportFile(d,U,l,n,S,K)}catch(m){this.handleError(m)}});null!=v?J(v):this.pickFolder(S,J)}}catch(K){this.handleError(K)}});x=[];z||x.push(App.MODE_BROWSER);B||x.push("_blank");
-var R=new SaveDialog(this,k,mxUtils.bind(this,function(U,S,Q){C(U.value,S,U,Q);this.hideDialog(null,null,R.container)}),x,d,l,n,H);this.showDialog(R.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));R.init()};EditorUi.prototype.openInNewWindow=function(d,k,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(d,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==k){var z=mxUtils.parseXml(d).documentElement.style.backgroundColor;
-""!=z&&(x="background: "+z+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=k||mxClient.IS_SVG?"image/svg+xml"!=k||l?(z=l?d:btoa(unescape(encodeURIComponent(d))),n.document.write(x+'<img style="max-width:100%;" src="data:'+k+";base64,"+z+'"/></body></html>')):n.document.write(x+d+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");n.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;
+(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",C.insertBefore(l,C.firstChild))}n.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(d,k){for(var l=0;l<d.length;l++)try{var n=d[l],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var A="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(A+="aspect=fixed;");A=A+"image="+x+";";
+null!=n.style&&(A+=n.style);k.appendChild(this.sidebar.createVertexTemplate(A,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var B=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),I=0==B.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";k.appendChild(this.sidebar.createVertexTemplateFromCells(B,n.w,n.h,I,!0,null,!0))}}catch(G){I=null!=G.message?mxResources.get("error")+": "+G.message:String(G),A=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,
+I,!0,null,!0),k.appendChild(A)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,k,l,n,x,A,B){d=new ImageDialog(this,d,k,l,n,
+x,A,B);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,k,l,n,x,A){var B=localStorage.getItem(k);d=new TextareaDialog(this,d,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=A&&A(I),I==B)this.hideDialog();else{if(0<I.length){var G=JSON.parse(I);localStorage.setItem(k,JSON.stringify(G))}else localStorage.removeItem(k);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),
+null,mxResources.get("close"),null,null,null,!0,null,null,x,l,n);this.showDialog(d.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,k,l,n){d=null!=d?d:mxUtils.bind(this,function(x,A,B,I){A||(x=new ChangePageSetup(this,n?B:null,x),x.ignoreColor=!n,null!=I&&n&&(x.shadowVisible=I),this.editor.graph.model.execute(x))});d=new BackgroundImageDialog(this,d,k,l,n);this.showDialog(d.container,400,
+n?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,k,l,n,x){d=new LibraryDialog(this,d,k,l,n,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(A){A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var k=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&
+k.refresh()}));return k};EditorUi.prototype.handleError=function(d,k,l,n,x,A,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{B||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",d)}catch(S){}if(null!=
+G||null!=k){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var C=mxResources.get("ok"),R=null;k=null!=k?k:mxResources.get("error");if(null!=G){null!=G.retry&&(C=mxResources.get("cancel"),R=function(){I();G.retry()});if(404==G.code||404==G.status||403==G.code){B=403==G.code?null!=G.message?mxUtils.htmlEntities(G.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
+" ("+this.drive.user.email+")":""),!1);var T=null!=x?null:null!=A?A:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==G.code||404==G.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(k,
+B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);null!=n&&n()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function S(){N.innerText="";for(var J=0;J<Q.length;J++){var K=document.createElement("option");mxUtils.write(K,Q[J].displayName);K.value=J;N.appendChild(K);K=document.createElement("option");K.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(K,"<"+Q[J].email+">");K.setAttribute("disabled","disabled");
+N.appendChild(K)}K=document.createElement("option");mxUtils.write(K,mxResources.get("addAccount"));K.value=Q.length;N.appendChild(K)}var Q=this.drive.getUsersList(),v=document.createElement("div"),z=document.createElement("div");z.style.marginBottom="6px";mxUtils.write(z,mxResources.get("changeUser")+": ");v.appendChild(z);var N=document.createElement("select");N.style.width="100%";S();mxEvent.addListener(N,"change",mxUtils.bind(this,function(){var J=N.value,K=Q.length!=J;K&&this.drive.setUser(Q[J]);
+this.drive.authorize(K,mxUtils.bind(this,function(){K||(Q=this.drive.getUsersList(),S())}),mxUtils.bind(this,function(m){this.handleError(m)}),!0)}));v.appendChild(N);v=new CustomDialog(this,v,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(v.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=G.message?B=""==G.message&&null!=G.name?mxUtils.htmlEntities(G.name,!1):
+mxUtils.htmlEntities(G.message,!1):null!=G.response&&null!=G.response.error?B=mxUtils.htmlEntities(G.response.error,!1):"undefined"!==typeof window.App&&(G.code==App.ERROR_TIMEOUT?B=mxUtils.htmlEntities(mxResources.get("timeout"),!1):G.code==App.ERROR_BUSY?B=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof G&&0<G.length&&(B=mxUtils.htmlEntities(G,!1)))}x=d=null;null!=G&&null!=G.helpLink?(d=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):
+null!=G&&null!=G.ownerEmail?(d=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+d+": "+G.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))})):null!=G&&null!=G.alternateAction&&(d=G.alternateAction.label,x=G.alternateAction.funct);this.showError(k,B,C,l,R,null,null,d,x,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(d,k,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),k);this.showDialog(d.container,
+l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,k,l,n,x,A){d=null!=d?d:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){B();null!=k&&k()},function(){B();null!=l&&l()},n,x,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,A);d.init()};EditorUi.prototype.showBanner=function(d,k,l,n,x,A,B,I,G){A=!1;if(!(this.bannerShowing||this["hideBanner"+
+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var C=document.createElement("div");C.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");C.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(C.style,"transform",B);mxUtils.setPrefixedStyle(C.style,"transition","all 1000ms ease");null!=G&&mxUtils.setPrefixedStyle(C.style,"transform-origin",G);G=G=document.createElement("img");
+G.setAttribute("src",Editor.crossImage);G.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));G.setAttribute("border","0");x||(A=document.createElement("img"),A.setAttribute("src",IMAGE_PATH+"/logo.png"),A.setAttribute("border","0"),A.setAttribute("align","absmiddle"),A.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",C.appendChild(A),G.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
+C.appendChild(G));mxUtils.write(C,k);document.body.appendChild(C);this.bannerShowing=!0;x&&(G.className="geLibraryButton",C.appendChild(G));k=document.createElement("div");k.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var R=document.createElement("input");R.setAttribute("type","checkbox");R.setAttribute("id","geDoNotShowAgainCheckbox");R.style.marginRight="6px";if(!n){k.appendChild(R);var T=document.createElement("label");
+T.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(T,mxResources.get("doNotShowAgain"));k.appendChild(T);C.style.paddingBottom=x?"16px":"30px";C.appendChild(k)}var S=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,R.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=G&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);
+S()}));var Q=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",B);window.setTimeout(mxUtils.bind(this,function(){S()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(v){var z=mxEvent.getSource(v);z!=R&&z!=T?(null!=l&&l(),S(),mxEvent.consume(v)):Q()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform",I)}),500);window.setTimeout(Q,x?5E3:3E4);A=!0}return A};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=
+new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(d,k,l,n){d=d.toDataURL("image/"+l);if(null!=d&&6<d.length)null!=k&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(k))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,k,l,n,x){var A="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+
+(null!=k?".drawio":"")+"."+A;d=this.createImageDataUri(d,k,l,x);this.saveData(n,A,d.substring(d.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,k){d=new TextareaDialog(this,d,k,null,null,mxResources.get("close"));
+this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,k,l,n,x,A){"text/xml"!=l||/(\.drawio)$/i.test(k)||/(\.xml)$/i.test(k)||/(\.svg)$/i.test(k)||/(\.html)$/i.test(k)||(k=k+"."+(null!=A?A:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,l):new Blob([d],{type:l}),navigator.msSaveOrOpenBlob(d,k);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==
+l?mxUtils.popup(d,!0):(l.document.write(d),l.document.close(),l.document.execCommand("SaveAs",!0,k),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(k+":",d):this.openInNewWindow(d,l,n);else{var B=document.createElement("a");A=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+A=65==(I?parseInt(I[2],10):!1)?!1:A}if(A||this.isOffline()){B.href=URL.createObjectURL(n?this.base64ToBlob(d,l):new Blob([d],{type:l}));A?B.download=k:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(G){}}else this.createEchoRequest(d,k,l,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,k,l,n,x,A){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,
+d+(null!=l?"&mime="+l:"")+(null!=x?"&format="+x:"")+(null!=A?"&base64="+A:"")+(null!=k?"&filename="+encodeURIComponent(k):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,k,l,n,x,A,B,I,G){A=null!=A?A:!1;B=null!=B?B:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(T,S,Q,v){try{if("_blank"==S)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var z=new EmbedDialog(this,d);this.showDialog(z.container,
+450,240,!0,!0);z.init()}else{var N=window.open("about:blank");null==N?mxUtils.popup(d,!0):(N.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),N.document.close())}else if(S==App.MODE_DEVICE||"download"==S)this.doSaveLocalFile(d,T,l,n,null,I);else if(null!=T&&0<T.length){var J=mxUtils.bind(this,function(K){try{this.exportFile(d,T,l,n,S,K)}catch(m){this.handleError(m)}});null!=v?J(v):this.pickFolder(S,J)}}catch(K){this.handleError(K)}});x=[];A||x.push(App.MODE_BROWSER);B||x.push("_blank");
+var R=new SaveDialog(this,k,mxUtils.bind(this,function(T,S,Q){C(T.value,S,T,Q);this.hideDialog(null,null,R.container)}),x,d,l,n,G);this.showDialog(R.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));R.init()};EditorUi.prototype.openInNewWindow=function(d,k,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(d,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==k){var A=mxUtils.parseXml(d).documentElement.style.backgroundColor;
+""!=A&&(x="background: "+A+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=k||mxClient.IS_SVG?"image/svg+xml"!=k||l?(A=l?d:btoa(unescape(encodeURIComponent(d))),n.document.write(x+'<img style="max-width:100%;" src="data:'+k+";base64,"+A+'"/></body></html>')):n.document.write(x+d+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");n.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var k=d(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,this.tagsComponent.div.style.backgroundColor=
"#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var x=k.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";
this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();
k.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&
(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.editor.isExportToCanvas()&&
-this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=d(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var z=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
-this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=z.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=z.zIndex;var B=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});B.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(I){B.stop();this.exportDialog.style.width=
-"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var H=this.createImageDataUri(I,null,"png");I=document.createElement("img");I.style.maxWidth="140px";I.style.maxHeight="140px";I.style.cursor="pointer";I.style.backgroundColor="white";I.setAttribute("title",mxResources.get("openInNewWindow"));I.setAttribute("border","0");I.setAttribute("src",H);this.exportDialog.appendChild(I);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.openInNewWindow(H.substring(H.indexOf(",")+
-1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(I){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(I)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,k,l,n,x,z){this.isLocalFileSave()?this.saveLocalFile(l,
-d,n,x,k,z):this.saveRequest(d,k,mxUtils.bind(this,function(B,I){return this.createEchoRequest(l,B,n,x,k,I)}),l,x,n)};EditorUi.prototype.saveRequest=function(d,k,l,n,x,z,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var I=mxUtils.bind(this,function(C,R,U,S){if("_blank"==R||null!=C&&0<C.length){var Q=l("_blank"==R?null:C,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=Q&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?Q.simulate(document,"_blank"):(U=mxUtils.bind(this,
-function(v){z=null!=z?z:"pdf"==k?"application/pdf":"image/"+k;if(null!=n)try{this.exportFile(n,C,z,!0,R,v)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&Q.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=Q.getStatus()&&299>=Q.getStatus())try{this.exportFile(Q.getText(),C,z,!0,R,v)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}))}),
-null!=S?U(S):this.pickFolder(R,U)))}});x=[App.MODE_BROWSER];B||x.push("_blank");var H=new SaveDialog(this,d,mxUtils.bind(this,function(C,R,U){I(C.value,R,C,U);this.hideDialog(null,null,H.container)}),x,null,"application/pdf");this.showDialog(H.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));H.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,k,
-l,n,x,z){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,k,l){k(null)};EditorUi.prototype.exportSvg=function(d,k,l,n,x,z,B,I,H,C,R,U,S,Q){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(d,k,l,n,x,z,B,I,H,C,R,U,S,Q)}));this.handleError(W)})))try{var v=this.editor.graph.isSelectionEmpty();
-l=null!=l?l:v;var A=k?null:this.editor.graph.background;A==mxConstants.NONE&&(A=null);null==A&&0==k&&(A=this.editor.graph.shapeBackgroundColor);var N=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var J=mxUtils.lightDarkColorSupported,K=mxUtils.preferDarkColor;if("light"==R||"dark"==R)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==R;var m=Graph.addFont,t={};Graph.addFont=function(W,Y,Z,aa){m.call(this,
-W,Y,Z,t)};var D=this.editor.graph.createSvgImageExport(x),M=D.drawCellState;D.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);M.apply(this,arguments)};var L=this.editor.graph.getSvg(A,d,B,I,null,l,null,D,"blank"==C?"_blank":"self"==C?"_top":null,null,!S,R,U);mxUtils.lightDarkColorSupported=J;mxUtils.preferDarkColor=K;this.editor.graph.addForeignObjectWarning=N;n&&this.editor.graph.addSvgShadow(L);var O=this.getBaseFilename()+(x?".drawio":"")+".svg";Q=null!=Q?Q:mxUtils.bind(this,
-function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var P=mxUtils.bind(this,function(W){this.spinner.stop();x&&W.setAttribute("content",this.getFileData(!0,null,null,null,l,H,null,null,null,null,null,d,B));Q(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
-this.editor.addMathCss(L);var T=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&z&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&S?this.replaceAlternateContent(W,R,P):P(W)}),V=Graph.customFontElements;Graph.customFontElements=t;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=m;z&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,T,this.thumbImageCache)):T(W)});S?this.embedFonts(L,
-X):(this.editor.addFontCss(L),X(L))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(d,k,l){function n(U,S,Q,v,A){var N=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");N.setAttribute("x",S);N.setAttribute("y",Q+.5);N.setAttribute("width",v.width);N.setAttribute("height",v.height);null==N.setAttributeNS?N.setAttribute("xlink:href",A):N.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",A);U.replaceChild(N,U.lastChild);I()}function x(){if(B<R.length)R[B++](x)}
-var z="";k=d.getElementsByTagName("style");for(var B=0;B<k.length;B++)z+=k[B].innerHTML;k=d.getElementsByTagName("switch");counter=k.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&l(d)}),H={},C={},R=[];for(B=0;B<k.length;B++)mxUtils.bind(this,function(U){var S=U.getElementsByTagName("div");if(0<S.length)try{var Q=S[0].cloneNode(!0),v=parseInt(Q.style.marginLeft),A=parseInt(Q.style.paddingTop),N=Q.getElementsByTagName("div")[1],J=S=!1,K=Q.style.alignItems,m=Q.style.justifyContent;
-if(null!=Q.style.writingMode){var t=Q.style.writingMode;J="vertical-"==t.substring(0,9);S="-rl"==t.substring(t.length-3)}var D=!J&&"1px"==Q.style.width||J&&"1px"==Q.style.height;if(!J&&"1px"==Q.style.height||J&&"1px"==Q.style.width)Q.style.alignItems=J&&S?"unsafe flex-end":"unsafe flex-start";D&&(Q.style.justifyContent="unsafe flex-start");Q.style.paddingTop="";Q.style.marginLeft="";var M=Q.outerHTML,L=H[M];null==L&&(Q.style.position="absolute",Q.style.visibility="hidden",document.body.appendChild(Q),
-t=1,t="1px"==Q.style.width?N.offsetWidth:parseInt(Q.style.width),D=1,D="1px"==Q.style.height?N.offsetHeight:parseInt(Q.style.height),document.body.removeChild(Q),L=new mxRectangle(v,A,t,D),H[M]=L);"1px"==Q.style.height&&("unsafe center"==K?A-=L.height/2:"unsafe flex-end"==K&&(A-=L.height));if("1px"==Q.style.width)if(!J&&"unsafe center"==m||J&&"unsafe center"==K)v-=L.width/2;else if(!J&&"unsafe flex-end"==m||J&&(!S&&"unsafe flex-end"==K||S&&"unsafe flex-start"==K))v-=L.width;L=new mxRectangle(v,A,
-L.width,L.height+parseInt(N.style.fontSize)/4);R.push(mxUtils.bind(this,function(O){var P=C[M];null==P?Graph.htmlToPng(M,L.width,L.height,mxUtils.bind(this,function(T){n(U,v,A,L,T);C[M]=T;O()}),z):(n(U,v,A,L,P),O())}))}catch(O){I()}else I()})(k[B]);0==counter&&l(d);B=0;x()};EditorUi.prototype.addRadiobox=function(d,k,l,n,x,z,B){return this.addCheckbox(d,l,n,x,z,B,!0,k)};EditorUi.prototype.addCheckbox=function(d,k,l,n,x,z,B,I){z=null!=z?z:!0;var H=document.createElement("input");H.style.marginRight=
-"8px";H.style.marginTop="16px";H.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();H.id=B;null!=I&&H.setAttribute("name",I);l&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);n&&H.setAttribute("disabled","disabled");z&&(d.appendChild(H),l=document.createElement("label"),mxUtils.write(l,k),l.setAttribute("for",B),d.appendChild(l),x||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,k){var l=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);
-l.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var z=document.createElement("select");z.style.maxWidth="200px";z.style.width="auto";z.style.marginLeft="8px";z.style.marginRight="10px";z.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));z.appendChild(n);var B=document.createElement("option");B.setAttribute("value",
-"custom");mxUtils.write(B,mxResources.get("custom")+"...");z.appendChild(B);d.appendChild(z);mxEvent.addListener(z,"change",mxUtils.bind(this,function(){if("custom"==z.value){var I=new FilenameDialog(this,x,mxResources.get("ok"),function(H){null!=H?(x=H,B.setAttribute("title",H)):(z.value="blank",B.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){z.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,
-function(){l.checked&&(null==k||k.checked)?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===z.value?"_blank":x:null},getEditInput:function(){return l},getEditSelect:function(){return z}}};EditorUi.prototype.addLinkSection=function(d,k){function l(){var I=document.createElement("div");I.style.width="100%";I.style.height="100%";I.style.boxSizing="border-box";null!=z&&z!=mxConstants.NONE?(I.style.border="1px solid black",
-I.style.backgroundColor=z):(I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(I)}mxUtils.write(d,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));
+this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=d(mxUtils.bind(this,function(n){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var A=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
+this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=A.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";A=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=A.zIndex;var B=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});B.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(I){B.stop();this.exportDialog.style.width=
+"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var G=this.createImageDataUri(I,null,"png");I=document.createElement("img");I.style.maxWidth="140px";I.style.maxHeight="140px";I.style.cursor="pointer";I.style.backgroundColor="white";I.setAttribute("title",mxResources.get("openInNewWindow"));I.setAttribute("border","0");I.setAttribute("src",G);this.exportDialog.appendChild(I);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.openInNewWindow(G.substring(G.indexOf(",")+
+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(I){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(I)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,k,l,n,x,A){this.isLocalFileSave()?this.saveLocalFile(l,
+d,n,x,k,A):this.saveRequest(d,k,mxUtils.bind(this,function(B,I){return this.createEchoRequest(l,B,n,x,k,I)}),l,x,n)};EditorUi.prototype.saveRequest=function(d,k,l,n,x,A,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var I=mxUtils.bind(this,function(C,R,T,S){if("_blank"==R||null!=C&&0<C.length){var Q=l("_blank"==R?null:C,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=Q&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?Q.simulate(document,"_blank"):(T=mxUtils.bind(this,
+function(v){A=null!=A?A:"pdf"==k?"application/pdf":"image/"+k;if(null!=n)try{this.exportFile(n,C,A,!0,R,v)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&Q.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=Q.getStatus()&&299>=Q.getStatus())try{this.exportFile(Q.getText(),C,A,!0,R,v)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}))}),
+null!=S?T(S):this.pickFolder(R,T)))}});x=[App.MODE_BROWSER];B||x.push("_blank");var G=new SaveDialog(this,d,mxUtils.bind(this,function(C,R,T){I(C.value,R,C,T);this.hideDialog(null,null,G.container)}),x,null,"application/pdf");this.showDialog(G.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,k,
+l,n,x,A){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,k,l){k(null)};EditorUi.prototype.exportSvg=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(d,k,l,n,x,A,B,I,G,C,R,T,S,Q)}));this.handleError(W)})))try{var v=this.editor.graph.isSelectionEmpty();
+l=null!=l?l:v;var z=k?null:this.editor.graph.background;z==mxConstants.NONE&&(z=null);null==z&&0==k&&(z=this.editor.graph.shapeBackgroundColor);var N=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var J=mxUtils.lightDarkColorSupported,K=mxUtils.preferDarkColor;if("light"==R||"dark"==R)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==R;var m=Graph.addFont,t={};Graph.addFont=function(W,Y,Z,aa){m.call(this,
+W,Y,Z,t)};var D=this.editor.graph.createSvgImageExport(x),M=D.drawCellState;D.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);M.apply(this,arguments)};var L=this.editor.graph.getSvg(z,d,B,I,null,l,null,D,"blank"==C?"_blank":"self"==C?"_top":null,null,!S,R,T);mxUtils.lightDarkColorSupported=J;mxUtils.preferDarkColor=K;this.editor.graph.addForeignObjectWarning=N;n&&this.editor.graph.addSvgShadow(L);var O=this.getBaseFilename()+(x?".drawio":"")+".svg";Q=null!=Q?Q:mxUtils.bind(this,
+function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var P=mxUtils.bind(this,function(W){this.spinner.stop();x&&W.setAttribute("content",this.getFileData(!0,null,null,null,l,G,null,null,null,null,null,d,B));Q(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
+this.editor.addMathCss(L);var U=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&A&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&S?this.replaceAlternateContent(W,R,P):P(W)}),V=Graph.customFontElements;Graph.customFontElements=t;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=m;A&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,U,this.thumbImageCache)):U(W)});S?this.embedFonts(L,
+X):(this.editor.addFontCss(L),X(L))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(d,k,l){function n(T,S,Q,v,z){var N=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");N.setAttribute("x",S);N.setAttribute("y",Q+.5);N.setAttribute("width",v.width);N.setAttribute("height",v.height);null==N.setAttributeNS?N.setAttribute("xlink:href",z):N.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",z);T.replaceChild(N,T.lastChild);I()}function x(){if(B<R.length)R[B++](x)}
+var A="";k=d.getElementsByTagName("style");for(var B=0;B<k.length;B++)A+=k[B].innerHTML;k=d.getElementsByTagName("switch");counter=k.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&l(d)}),G={},C={},R=[];for(B=0;B<k.length;B++)mxUtils.bind(this,function(T){var S=T.getElementsByTagName("div");if(0<S.length)try{var Q=S[0].cloneNode(!0),v=parseInt(Q.style.marginLeft),z=parseInt(Q.style.paddingTop),N=Q.getElementsByTagName("div")[1],J=S=!1,K=Q.style.alignItems,m=Q.style.justifyContent;
+if(null!=Q.style.writingMode){var t=Q.style.writingMode;J="vertical-"==t.substring(0,9);S="-rl"==t.substring(t.length-3)}var D=!J&&"1px"==Q.style.width||J&&"1px"==Q.style.height;if(!J&&"1px"==Q.style.height||J&&"1px"==Q.style.width)Q.style.alignItems=J&&S?"unsafe flex-end":"unsafe flex-start";D&&(Q.style.justifyContent="unsafe flex-start");Q.style.paddingTop="";Q.style.marginLeft="";var M=Q.outerHTML,L=G[M];null==L&&(Q.style.position="absolute",Q.style.visibility="hidden",document.body.appendChild(Q),
+t=1,t="1px"==Q.style.width?N.offsetWidth:parseInt(Q.style.width),D=1,D="1px"==Q.style.height?N.offsetHeight:parseInt(Q.style.height),document.body.removeChild(Q),L=new mxRectangle(v,z,t,D),G[M]=L);"1px"==Q.style.height&&("unsafe center"==K?z-=L.height/2:"unsafe flex-end"==K&&(z-=L.height));if("1px"==Q.style.width)if(!J&&"unsafe center"==m||J&&"unsafe center"==K)v-=L.width/2;else if(!J&&"unsafe flex-end"==m||J&&(!S&&"unsafe flex-end"==K||S&&"unsafe flex-start"==K))v-=L.width;L=new mxRectangle(v,z,
+L.width,L.height+parseInt(N.style.fontSize)/4);R.push(mxUtils.bind(this,function(O){var P=C[M];null==P?Graph.htmlToPng(M,L.width,L.height,mxUtils.bind(this,function(U){n(T,v,z,L,U);C[M]=U;O()}),A):(n(T,v,z,L,P),O())}))}catch(O){I()}else I()})(k[B]);0==counter&&l(d);B=0;x()};EditorUi.prototype.addRadiobox=function(d,k,l,n,x,A,B){return this.addCheckbox(d,l,n,x,A,B,!0,k)};EditorUi.prototype.addCheckbox=function(d,k,l,n,x,A,B,I){A=null!=A?A:!0;var G=document.createElement("input");G.style.marginRight=
+"8px";G.style.marginTop="16px";G.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();G.id=B;null!=I&&G.setAttribute("name",I);l&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);n&&G.setAttribute("disabled","disabled");A&&(d.appendChild(G),l=document.createElement("label"),mxUtils.write(l,k),l.setAttribute("for",B),d.appendChild(l),x||mxUtils.br(d));return G};EditorUi.prototype.addEditButton=function(d,k){var l=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);
+l.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var A=document.createElement("select");A.style.maxWidth="200px";A.style.width="auto";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));A.appendChild(n);var B=document.createElement("option");B.setAttribute("value",
+"custom");mxUtils.write(B,mxResources.get("custom")+"...");A.appendChild(B);d.appendChild(A);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){if("custom"==A.value){var I=new FilenameDialog(this,x,mxResources.get("ok"),function(G){null!=G?(x=G,B.setAttribute("title",G)):(A.value="blank",B.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){A.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,
+function(){l.checked&&(null==k||k.checked)?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===A.value?"_blank":x:null},getEditInput:function(){return l},getEditSelect:function(){return A}}};EditorUi.prototype.addLinkSection=function(d,k){function l(){var I=document.createElement("div");I.style.width="100%";I.style.height="100%";I.style.boxSizing="border-box";null!=A&&A!=mxConstants.NONE?(I.style.border="1px solid black",
+I.style.backgroundColor=A):(I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(I)}mxUtils.write(d,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));
n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);k&&(k=document.createElement("option"),k.setAttribute("value","frame"),mxUtils.write(k,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(k));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+
-":");var z="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(I){this.pickColor(z||"none",function(H){z=H;l()});mxEvent.consume(I)}));l();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";d.appendChild(B);mxUtils.br(d);return{getColor:function(){return z},getTarget:function(){return n.value},
-focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,k,l,n,x,z){z=null!=z?z:[];l&&(z.push("lightbox=1"),"auto"!=d&&z.push("target="+d),null!=k&&k!=mxConstants.NONE&&z.push("highlight="+("#"==k.charAt(0)?k.substring(1):k)),null!=n&&0<n.length&&z.push("edit="+encodeURIComponent(n)),x&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));return z};EditorUi.prototype.createLink=function(d,k,l,n,x,z,B,I,H,C,R,U,S){var Q=this.getCurrentFile();H=this.createUrlParameters(d,
-k,n,x,z,H);d=!0;null!=B?l="#U"+encodeURIComponent(B):I||null==Q||""==Q.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+Q.getHash(),d=!1);d&&null!=Q&&null!=Q.getTitle()&&Q.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(Q.getTitle()));C&&1<l.length&&(H.push("open="+l.substring(1)),l="");R&&null!=this.currentPage&&H.push("page-id="+this.currentPage.getId());U&&H.push("transparent=1");
-null!=S&&H.push("dark="+S);return(n&&(null!=B||null!=Q&&Q.getMode()!=App.MODE_GITHUB&&Q.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,k,l,n,x,z,B,I,H,C,R,U,S){this.getBasenames();var Q={};""!=x&&x!=mxConstants.NONE&&(Q.highlight=x);"auto"!==n&&(Q.target=n);C||(Q.lightbox=
-!1);Q.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(Q.zoom=l/100);l=[];B&&(l.push("pages"),Q.resize=!0,null!=this.pages&&null!=this.currentPage&&(Q.page=mxUtils.indexOf(this.pages,this.currentPage)));k&&(l.push("zoom"),Q.resize=!0);I&&l.push("layers");H&&l.push("tags");null!=S&&(Q["dark-mode"]=S);0<l.length&&(C&&l.push("lightbox"),Q.toolbar=l.join(" "));null!=R&&0<R.length&&(Q.edit=R);null!=d?Q.url=d:Q.xml=this.getFileData(!0,null,null,null,null,!B);k='<div class="mxgraph" style="'+
-(z?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Q))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";U(k,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+
-'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,k,l,n){var x=document.createElement("div");x.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("html"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(z);var B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","type-embedhtmldialog");z=I.cloneNode(!0);z.setAttribute("value","copy");B.appendChild(z);var H=document.createElement("span");mxUtils.write(H,mxResources.get("includeCopyOfMyDiagram"));B.appendChild(H);mxUtils.br(B);B.appendChild(I);H=document.createElement("span");mxUtils.write(H,mxResources.get("publicDiagramUrl"));B.appendChild(H);var C=this.getCurrentFile();null==l&&null!=C&&C.constructor==window.DriveFile&&(H=
-document.createElement("a"),H.style.paddingLeft="12px",H.style.color="gray",H.style.cursor="pointer",mxUtils.write(H,mxResources.get("share")),B.appendChild(H),mxEvent.addListener(H,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(C.getId(),C)})));z.setAttribute("checked","checked");null==l&&I.setAttribute("disabled","disabled");x.appendChild(B);B=380;var R=this.addLinkSection(x),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";
-U.style.marginTop="16px";H=document.createElement("option");H.setAttribute("value","light");mxUtils.write(H,mxResources.get("light"));U.appendChild(H);H=document.createElement("option");H.setAttribute("value","dark");mxUtils.write(H,mxResources.get("dark"));U.appendChild(H);H=document.createElement("option");H.setAttribute("value","auto");mxUtils.write(H,mxResources.get("automatic"));H.setAttribute("selected","selected");U.appendChild(H);H.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+
-":");x.appendChild(U);mxUtils.br(x);B+=26;var S=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value="100%";x.appendChild(Q);var v=this.addCheckbox(x,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var A=A=this.addCheckbox(x,mxResources.get("allPages"),H,!H),N=this.addCheckbox(x,mxResources.get("layers"),
+":");var A="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(I){this.pickColor(A||"none",function(G){A=G;l()});mxEvent.consume(I)}));l();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";d.appendChild(B);mxUtils.br(d);return{getColor:function(){return A},getTarget:function(){return n.value},
+focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,k,l,n,x,A){A=null!=A?A:[];l&&(A.push("lightbox=1"),"auto"!=d&&A.push("target="+d),null!=k&&k!=mxConstants.NONE&&A.push("highlight="+("#"==k.charAt(0)?k.substring(1):k)),null!=n&&0<n.length&&A.push("edit="+encodeURIComponent(n)),x&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));return A};EditorUi.prototype.createLink=function(d,k,l,n,x,A,B,I,G,C,R,T,S){var Q=this.getCurrentFile();G=this.createUrlParameters(d,
+k,n,x,A,G);d=!0;null!=B?l="#U"+encodeURIComponent(B):I||null==Q||""==Q.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+Q.getHash(),d=!1);d&&null!=Q&&null!=Q.getTitle()&&Q.getTitle()!=this.defaultFilename&&G.push("title="+encodeURIComponent(Q.getTitle()));C&&1<l.length&&(G.push("open="+l.substring(1)),l="");R&&null!=this.currentPage&&G.push("page-id="+this.currentPage.getId());T&&G.push("transparent=1");
+null!=S&&G.push("dark="+S);return(n&&(null!=B||null!=Q&&Q.getMode()!=App.MODE_GITHUB&&Q.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,k,l,n,x,A,B,I,G,C,R,T,S){this.getBasenames();var Q={};""!=x&&x!=mxConstants.NONE&&(Q.highlight=x);"auto"!==n&&(Q.target=n);C||(Q.lightbox=
+!1);Q.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(Q.zoom=l/100);l=[];B&&(l.push("pages"),Q.resize=!0,null!=this.pages&&null!=this.currentPage&&(Q.page=mxUtils.indexOf(this.pages,this.currentPage)));k&&(l.push("zoom"),Q.resize=!0);I&&l.push("layers");G&&l.push("tags");null!=S&&(Q["dark-mode"]=S);0<l.length&&(C&&l.push("lightbox"),Q.toolbar=l.join(" "));null!=R&&0<R.length&&(Q.edit=R);null!=d?Q.url=d:Q.xml=this.getFileData(!0,null,null,null,null,!B);k='<div class="mxgraph" style="'+
+(A?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Q))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";T(k,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,k,l,n){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("html"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(A);var B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","type-embedhtmldialog");A=I.cloneNode(!0);A.setAttribute("value","copy");B.appendChild(A);var G=document.createElement("span");mxUtils.write(G,mxResources.get("includeCopyOfMyDiagram"));B.appendChild(G);mxUtils.br(B);B.appendChild(I);G=document.createElement("span");mxUtils.write(G,mxResources.get("publicDiagramUrl"));B.appendChild(G);var C=this.getCurrentFile();null==l&&null!=C&&C.constructor==window.DriveFile&&(G=
+document.createElement("a"),G.style.paddingLeft="12px",G.style.color="gray",G.style.cursor="pointer",mxUtils.write(G,mxResources.get("share")),B.appendChild(G),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(C.getId(),C)})));A.setAttribute("checked","checked");null==l&&I.setAttribute("disabled","disabled");x.appendChild(B);B=380;var R=this.addLinkSection(x),T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";
+T.style.marginTop="16px";G=document.createElement("option");G.setAttribute("value","light");mxUtils.write(G,mxResources.get("light"));T.appendChild(G);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));T.appendChild(G);G=document.createElement("option");G.setAttribute("value","auto");mxUtils.write(G,mxResources.get("automatic"));G.setAttribute("selected","selected");T.appendChild(G);G.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+
+":");x.appendChild(T);mxUtils.br(x);B+=26;var S=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value="100%";x.appendChild(Q);var v=this.addCheckbox(x,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var z=z=this.addCheckbox(x,mxResources.get("allPages"),G,!G),N=this.addCheckbox(x,mxResources.get("layers"),
!0),J=this.addCheckbox(x,mxResources.get("tags"),!0),K=this.addCheckbox(x,mxResources.get("lightbox"),!0),m=null;if(EditorUi.enableHtmlEditOption){m=this.addEditButton(x,K);var t=m.getEditInput();t.style.marginBottom="16px";B+=50;mxEvent.addListener(K,"change",function(){K.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled");t.checked&&K.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,x,mxUtils.bind(this,
-function(){n(I.checked?l:null,S.checked,Q.value,R.getTarget(),R.getColor(),v.checked,A.checked,N.checked,J.checked,K.checked,null!=m?m.getLink():null,null!=U?U.value:null)}),null,d,k);this.showDialog(d.container,340,B,!0,!0);z.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,k,l,n,x,z,B,I,H,C,R,U){var S=document.createElement("div");S.style.whiteSpace="nowrap";var Q=document.createElement("h3");mxUtils.write(Q,d||mxResources.get("publish"));Q.style.width="100%";Q.style.textAlign="center";
+function(){n(I.checked?l:null,S.checked,Q.value,R.getTarget(),R.getColor(),v.checked,z.checked,N.checked,J.checked,K.checked,null!=m?m.getLink():null,null!=T?T.value:null)}),null,d,k);this.showDialog(d.container,340,B,!0,!0);A.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,k,l,n,x,A,B,I,G,C,R,T){var S=document.createElement("div");S.style.whiteSpace="nowrap";var Q=document.createElement("h3");mxUtils.write(Q,d||mxResources.get("publish"));Q.style.width="100%";Q.style.textAlign="center";
Q.style.marginTop="2px";Q.style.marginBottom="20px";S.appendChild(Q);var v=document.createElement("select");d=30;v.className="geBtn";v.style.marginBottom="8px";v.style.marginLeft="0px";v.style.width="100%";v.style.boxSizing="border-box";if(null==I||""==I.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",Q=document.createElement("option"),mxUtils.write(Q,mxResources.get("makeCopy")),Q.setAttribute("value","copy"),v.appendChild(Q);Q=document.createElement("option");mxUtils.write(Q,
mxResources.get("authorizationRequired"));Q.setAttribute("value","auth");v.appendChild(Q);null!=I&&""!=I.getHash()||Q.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");v.appendChild(I);null!=B?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",B),v.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));S.appendChild(v);
-mxUtils.br(S);v.focus();var A=null,N=null;if(null!=k||null!=l)d+=30,mxUtils.write(S,mxResources.get("width")+":"),A=document.createElement("input"),A.setAttribute("type","text"),A.style.marginRight="16px",A.style.width="50px",A.style.marginLeft="6px",A.style.marginRight="16px",A.style.marginBottom="10px",A.value="100%",S.appendChild(A),mxUtils.write(S,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom=
+mxUtils.br(S);v.focus();var z=null,N=null;if(null!=k||null!=l)d+=30,mxUtils.write(S,mxResources.get("width")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.marginRight="16px",z.style.width="50px",z.style.marginLeft="6px",z.style.marginRight="16px",z.style.marginBottom="10px",z.value="100%",S.appendChild(z),mxUtils.write(S,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom=
"10px",N.value=l+"px",S.appendChild(N),mxUtils.br(S);var J=this.addLinkSection(S,n),K=C?this.addCheckbox(S,mxResources.get("transparentBackground"),!1):null;null!=K&&(d+=20);var m=document.createElement("select");m.className="geBtn";m.style.marginTop="8px";k=document.createElement("option");mxUtils.write(k,mxResources.get("allPages"));k.setAttribute("value","allPages");m.appendChild(k);k=document.createElement("option");mxUtils.write(k,mxResources.get("currentPage"));k.setAttribute("value","currentPage");
-m.appendChild(k);var t=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,k=null!=this.currentPage?this.currentPage.getName():"",16<k.length&&(k=k.substring(0,16)+"..."),U&&(mxUtils.write(S,mxResources.get("pages")+":"),S.appendChild(m),mxUtils.br(S),d+=30),t=this.addCheckbox(S,mxResources.get("selectedPage")+": "+k));var D=document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginTop="16px";U=document.createElement("option");
-U.setAttribute("value","0");mxUtils.write(U,mxResources.get("light"));D.appendChild(U);U=document.createElement("option");U.setAttribute("value","1");mxUtils.write(U,mxResources.get("dark"));D.appendChild(U);U=document.createElement("option");U.setAttribute("value","auto");mxUtils.write(U,mxResources.get("automatic"));U.setAttribute("selected","selected");D.appendChild(U);R&&(mxUtils.write(S,mxResources.get("appearance")+":"),S.appendChild(D),mxUtils.br(S),d+=30);var M=this.addCheckbox(S,mxResources.get("lightbox"),
-!0,null,null,!n),L=this.addEditButton(S,M),O=L.getEditInput();n&&(O.style.marginLeft=M.style.marginLeft,M.style.display="none",d-=20);var P=this.addCheckbox(S,mxResources.get("layers"),!0);P.style.marginLeft=O.style.marginLeft;P.style.marginTop="8px";var T=this.addCheckbox(S,mxResources.get("tags"),!0);T.style.marginLeft=O.style.marginLeft;T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(P.removeAttribute("disabled"),O.removeAttribute("disabled"),
-T.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));O.checked&&M.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,S,mxUtils.bind(this,function(){H(J.getTarget(),J.getColor(),null==t?!1:t.checked,M.checked,L.getLink(),P.checked,null!=A?A.value:null,null!=N?N.value:null,T.checked,v.value,null!=K?K.checked:!1,D.value,"allPages"==
-m.value)}),null,mxResources.get("create"),x,z);this.showDialog(n.container,340,296+d,!0,!0);null!=A?(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)):null==v.parentNode;J.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,k,l,n,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(x?"10":"4")+"px";z.appendChild(B);if(x){mxUtils.write(z,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";z.appendChild(I);mxUtils.write(z,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=
-this.lastExportBorder||"0";z.appendChild(H);mxUtils.br(z)}var C=this.addCheckbox(z,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=n?null:this.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var U=n?null:this.addCheckbox(z,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,z,mxUtils.bind(this,function(){var S=
-parseInt(I.value)/100||1,Q=parseInt(H.value)||0;l(!C.checked,null!=R?R.checked:!1,null!=U?U.checked:!1,S,Q)}),null,d,k);this.showDialog(d.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,k,l,n,x,z,B,I,H){B=null!=B?B:Editor.defaultIncludeDiagram;var C=document.createElement("div");C.style.whiteSpace="nowrap";var R=this.editor.graph,U="jpeg"==I||"webp"==I?220:320,S=document.createElement("h3");mxUtils.write(S,d);S.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+m.appendChild(k);var t=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,k=null!=this.currentPage?this.currentPage.getName():"",16<k.length&&(k=k.substring(0,16)+"..."),T&&(mxUtils.write(S,mxResources.get("pages")+":"),S.appendChild(m),mxUtils.br(S),d+=30),t=this.addCheckbox(S,mxResources.get("selectedPage")+": "+k));var D=document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginTop="16px";T=document.createElement("option");
+T.setAttribute("value","0");mxUtils.write(T,mxResources.get("light"));D.appendChild(T);T=document.createElement("option");T.setAttribute("value","1");mxUtils.write(T,mxResources.get("dark"));D.appendChild(T);T=document.createElement("option");T.setAttribute("value","auto");mxUtils.write(T,mxResources.get("automatic"));T.setAttribute("selected","selected");D.appendChild(T);R&&(mxUtils.write(S,mxResources.get("appearance")+":"),S.appendChild(D),mxUtils.br(S),d+=30);var M=this.addCheckbox(S,mxResources.get("lightbox"),
+!0,null,null,!n),L=this.addEditButton(S,M),O=L.getEditInput();n&&(O.style.marginLeft=M.style.marginLeft,M.style.display="none",d-=20);var P=this.addCheckbox(S,mxResources.get("layers"),!0);P.style.marginLeft=O.style.marginLeft;P.style.marginTop="8px";var U=this.addCheckbox(S,mxResources.get("tags"),!0);U.style.marginLeft=O.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(P.removeAttribute("disabled"),O.removeAttribute("disabled"),
+U.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));O.checked&&M.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,S,mxUtils.bind(this,function(){G(J.getTarget(),J.getColor(),null==t?!1:t.checked,M.checked,L.getLink(),P.checked,null!=z?z.value:null,null!=N?N.value:null,U.checked,v.value,null!=K?K.checked:!1,D.value,"allPages"==
+m.value)}),null,mxResources.get("create"),x,A);this.showDialog(n.container,340,296+d,!0,!0);null!=z?(z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)):null==v.parentNode;J.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,k,l,n,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(x?"10":"4")+"px";A.appendChild(B);if(x){mxUtils.write(A,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";A.appendChild(I);mxUtils.write(A,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=
+this.lastExportBorder||"0";A.appendChild(G);mxUtils.br(A)}var C=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=n?null:this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var T=n?null:this.addCheckbox(A,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,A,mxUtils.bind(this,function(){var S=
+parseInt(I.value)/100||1,Q=parseInt(G.value)||0;l(!C.checked,null!=R?R.checked:!1,null!=T?T.checked:!1,S,Q)}),null,d,k);this.showDialog(d.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,k,l,n,x,A,B,I,G){B=null!=B?B:Editor.defaultIncludeDiagram;var C=document.createElement("div");C.style.whiteSpace="nowrap";var R=this.editor.graph,T="jpeg"==I||"webp"==I?220:320,S=document.createElement("h3");mxUtils.write(S,d);S.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
C.appendChild(S);mxUtils.write(C,mxResources.get("zoom")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value=this.lastExportZoom||"100%";C.appendChild(Q);mxUtils.write(C,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||
-"0";C.appendChild(v);mxUtils.br(C);var A=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),N=document.createElement("input");N.style.marginTop="16px";N.style.marginRight="8px";N.style.marginLeft="24px";N.setAttribute("disabled","disabled");N.setAttribute("type","checkbox");var J=document.createElement("select");J.style.marginTop="16px";J.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(S=0;S<d.length;S++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[S]){var K=
-document.createElement("option");mxUtils.write(K,mxResources.get(d[S]));K.setAttribute("value",d[S]);J.appendChild(K)}H?(mxUtils.write(C,mxResources.get("size")+":"),C.appendChild(J),mxUtils.br(C),U+=26,mxEvent.addListener(J,"change",function(){"selectionOnly"==J.value&&(A.checked=!0)})):z&&(C.appendChild(N),mxUtils.write(C,mxResources.get("crop")),mxUtils.br(C),U+=30,mxEvent.addListener(A,"change",function(){A.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?
-H&&(A.style.display="none",A.nextSibling.style.display="none",A.nextSibling.nextSibling.style.display="none",U-=30):(J.value="diagram",N.setAttribute("checked","checked"),N.defaultChecked=!0,mxEvent.addListener(A,"change",function(){J.value=A.checked?"selectionOnly":"diagram"}));var m=this.addCheckbox(C,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),t=document.createElement("select");t.style.maxWidth="260px";t.style.marginLeft="8px";t.style.marginTop="16px";z=document.createElement("option");
-z.setAttribute("value","light");mxUtils.write(z,mxResources.get("light"));t.appendChild(z);H=document.createElement("option");H.setAttribute("value","dark");mxUtils.write(H,mxResources.get("dark"));t.appendChild(H);"svg"==I&&mxUtils.lightDarkColorSupported?(z=document.createElement("option"),z.setAttribute("value","auto"),mxUtils.write(z,mxResources.get("automatic")),z.setAttribute("selected","selected"),t.appendChild(z)):Editor.isDarkMode()?H.setAttribute("selected","selected"):z.setAttribute("selected",
-"selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(t);mxUtils.br(C);U+=26;var D=this.addCheckbox(C,mxResources.get("shadow"),R.shadowVisible),M=null;if("png"==I||"jpeg"==I||"webp"==I)M=this.addCheckbox(C,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),U+=30;R=null!=this.pages?this.pages.length:1;var L=this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram")+(1<R?":":""),B,null,null,"jpeg"!=I&&"webp"!=I),O=document.createElement("select");O.style.maxWidth=
-"260px";O.style.marginLeft="28px";"png"==I||"svg"==I?(B=function(){L.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},z=document.createElement("option"),z.setAttribute("value","allPages"),mxUtils.write(z,mxResources.get("allPages")),O.appendChild(z),z=document.createElement("option"),z.setAttribute("value","currentPage"),mxUtils.write(z,mxResources.get("currentPage")),O.appendChild(z),1<R?(L.style.marginBottom="12px",O.style.marginBottom="16px",C.appendChild(O),mxUtils.br(C),
-U+=20):L.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",B),B()):L.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");P.id="geCheckbox-"+Editor.guid();var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");T.id="geCheckbox-"+Editor.guid();k&&(P.checked=null!=
-this.lastEmbedImages?this.lastEmbedImages:!0,C.appendChild(P),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedImages")),B.setAttribute("for",P.id),C.appendChild(B),mxUtils.br(C),T.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,C.appendChild(T),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedFonts")),B.setAttribute("for",T.id),C.appendChild(B),mxUtils.br(C),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
-"8px";z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));V.appendChild(z);B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("openInNewWindow"));V.appendChild(B);B=document.createElement("option");B.setAttribute("value","self");mxUtils.write(B,mxResources.get("openInThisWindow"));V.appendChild(B);B=document.createElement("div");mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";
-B.style.display="none";"svg"==I&&(mxUtils.write(C,mxResources.get("links")+":"),C.appendChild(V),C.appendChild(B),mxUtils.br(C),mxUtils.br(C),U+=50);l=new CustomDialog(this,C,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=Q.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=T.checked;this.lastEmbedInclude=O.value;x(Q.value,m.checked,!A.checked,D.checked,L.checked,P.checked&&k,v.value,N.checked,("png"==I||"svg"==I)&&"currentPage"==O.value,V.value,null!=M?M.checked:
-null,null!=t?t.value:null,J.value,T.checked)}),null,l,n);this.showDialog(l.container,340,U,!0,!0,null,null,null,null,!0);Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,k,l,n,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var B=this.editor.graph;if(null!=k){var I=document.createElement("h3");mxUtils.write(I,k);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-z.appendChild(I)}var H=this.addCheckbox(z,mxResources.get("fit"),!0),C=this.addCheckbox(z,mxResources.get("shadow"),B.shadowVisible&&n,!n),R=this.addCheckbox(z,l),U=this.addCheckbox(z,mxResources.get("lightbox"),!0),S=this.addEditButton(z,U),Q=S.getEditInput(),v=1<B.model.getChildCount(B.model.getRoot()),A=this.addCheckbox(z,mxResources.get("layers"),v,!v);A.style.marginLeft=Q.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?
-(v&&A.removeAttribute("disabled"),Q.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&U.checked?S.getEditSelect().removeAttribute("disabled"):S.getEditSelect().setAttribute("disabled","disabled")});k=new CustomDialog(this,z,mxUtils.bind(this,function(){d(H.checked,C.checked,R.checked,U.checked,S.getLink(),A.checked)}),null,mxResources.get("embed"),x);this.showDialog(k.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(d,k,l,n,x,z,B,I){function H(Q){var v=" ",A="";n&&(v=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(x?"&edit=_blank":"")+(z?"&layers=1":"")+"');}})(this);\"",A+=
-"cursor:pointer;");d&&(A+="max-width:100%;");var N="";l&&(N=' width="'+Math.round(C.width)+'" height="'+Math.round(C.height)+'"');B('<img src="'+Q+'"'+N+(""!=A?' style="'+A+'"':"")+v+"/>")}var C=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Q){var v=n?this.getFileData(!0):null;Q=this.createImageDataUri(Q,v,"png");H(Q)}),null,null,null,mxUtils.bind(this,function(Q){I({message:mxResources.get("unknownError")})}),
-null,!0,l?2:1,null,k,null,null,Editor.defaultBorder);else if(k=this.getFileData(!0),C.width*C.height<=MAX_AREA&&k.length<=MAX_REQUEST_SIZE){var U="";l&&(U="&w="+Math.round(2*C.width)+"&h="+Math.round(2*C.height));var S=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+U+"&xml="+encodeURIComponent(k));S.send(mxUtils.bind(this,function(){200<=S.getStatus()&&299>=S.getStatus()?H("data:image/png;base64,"+S.getText()):I({message:mxResources.get("unknownError")})}))}else I({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(d,k,l,n,x,z,B){var I=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),H=I.getElementsByTagName("a");if(null!=H)for(var C=0;C<H.length;C++){var R=H[C].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==H[C].getAttribute("target")&&H[C].removeAttribute("target")}n&&I.setAttribute("content",this.getFileData(!0));k&&this.editor.graph.addSvgShadow(I);if(l){var U=" ",S="";n&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(x?"&edit=_blank":"")+(z?"&layers=1":"")+"');}})(this);\"",S+="cursor:pointer;");d&&(S+="max-width:100%;");this.editor.convertImages(I,mxUtils.bind(this,function(Q){B('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Q))+'"'+(""!=S?' style="'+S+'"':"")+U+"/>")}))}else S="",n&&(k=this.getSelectedPageIndex(),I.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=k?"&page="+k:"")+(x?"&edit=_blank":"")+(z?"&layers=1":"")+"');}}})(this);"),S+="cursor:pointer;"),d&&(d=parseInt(I.getAttribute("width")),x=parseInt(I.getAttribute("height")),I.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),S+="max-width:100%;max-height:"+x+"px;",I.removeAttribute("height")),""!=S&&I.setAttribute("style",S),this.editor.addFontCss(I),this.editor.graph.mathEnabled&&this.editor.addMathCss(I),B(mxUtils.getXml(I))};EditorUi.prototype.timeSince=function(d){d=
+"0";C.appendChild(v);mxUtils.br(C);var z=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),N=document.createElement("input");N.style.marginTop="16px";N.style.marginRight="8px";N.style.marginLeft="24px";N.setAttribute("disabled","disabled");N.setAttribute("type","checkbox");var J=document.createElement("select");J.style.marginTop="16px";J.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(S=0;S<d.length;S++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[S]){var K=
+document.createElement("option");mxUtils.write(K,mxResources.get(d[S]));K.setAttribute("value",d[S]);J.appendChild(K)}G?(mxUtils.write(C,mxResources.get("size")+":"),C.appendChild(J),mxUtils.br(C),T+=26,mxEvent.addListener(J,"change",function(){"selectionOnly"==J.value&&(z.checked=!0)})):A&&(C.appendChild(N),mxUtils.write(C,mxResources.get("crop")),mxUtils.br(C),T+=30,mxEvent.addListener(z,"change",function(){z.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?
+G&&(z.style.display="none",z.nextSibling.style.display="none",z.nextSibling.nextSibling.style.display="none",T-=30):(J.value="diagram",N.setAttribute("checked","checked"),N.defaultChecked=!0,mxEvent.addListener(z,"change",function(){J.value=z.checked?"selectionOnly":"diagram"}));var m=this.addCheckbox(C,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),t=document.createElement("select");t.style.maxWidth="260px";t.style.marginLeft="8px";t.style.marginTop="16px";A=document.createElement("option");
+A.setAttribute("value","light");mxUtils.write(A,mxResources.get("light"));t.appendChild(A);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));t.appendChild(G);"svg"==I&&mxUtils.lightDarkColorSupported?(A=document.createElement("option"),A.setAttribute("value","auto"),mxUtils.write(A,mxResources.get("automatic")),A.setAttribute("selected","selected"),t.appendChild(A)):Editor.isDarkMode()?G.setAttribute("selected","selected"):A.setAttribute("selected",
+"selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(t);mxUtils.br(C);T+=26;var D=this.addCheckbox(C,mxResources.get("shadow"),R.shadowVisible),M=null;if("png"==I||"jpeg"==I||"webp"==I)M=this.addCheckbox(C,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),T+=30;R=null!=this.pages?this.pages.length:1;var L=this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram")+(1<R?":":""),B,null,null,"jpeg"!=I&&"webp"!=I),O=document.createElement("select");O.style.maxWidth=
+"260px";O.style.marginLeft="28px";"png"==I||"svg"==I?(B=function(){L.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},A=document.createElement("option"),A.setAttribute("value","allPages"),mxUtils.write(A,mxResources.get("allPages")),O.appendChild(A),A=document.createElement("option"),A.setAttribute("value","currentPage"),mxUtils.write(A,mxResources.get("currentPage")),O.appendChild(A),1<R?(L.style.marginBottom="12px",O.style.marginBottom="16px",C.appendChild(O),mxUtils.br(C),
+T+=20):L.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",B),B()):L.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");P.id="geCheckbox-"+Editor.guid();var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+Editor.guid();k&&(P.checked=null!=
+this.lastEmbedImages?this.lastEmbedImages:!0,C.appendChild(P),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedImages")),B.setAttribute("for",P.id),C.appendChild(B),mxUtils.br(C),U.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,C.appendChild(U),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedFonts")),B.setAttribute("for",U.id),C.appendChild(B),mxUtils.br(C),T+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
+"8px";A=document.createElement("option");A.setAttribute("value","auto");mxUtils.write(A,mxResources.get("automatic"));V.appendChild(A);B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("openInNewWindow"));V.appendChild(B);B=document.createElement("option");B.setAttribute("value","self");mxUtils.write(B,mxResources.get("openInThisWindow"));V.appendChild(B);B=document.createElement("div");mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";
+B.style.display="none";"svg"==I&&(mxUtils.write(C,mxResources.get("links")+":"),C.appendChild(V),C.appendChild(B),mxUtils.br(C),mxUtils.br(C),T+=50);l=new CustomDialog(this,C,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=Q.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=U.checked;this.lastEmbedInclude=O.value;x(Q.value,m.checked,!z.checked,D.checked,L.checked,P.checked&&k,v.value,N.checked,("png"==I||"svg"==I)&&"currentPage"==O.value,V.value,null!=M?M.checked:
+null,null!=t?t.value:null,J.value,U.checked)}),null,l,n);this.showDialog(l.container,340,T,!0,!0,null,null,null,null,!0);Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,k,l,n,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=this.editor.graph;if(null!=k){var I=document.createElement("h3");mxUtils.write(I,k);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+A.appendChild(I)}var G=this.addCheckbox(A,mxResources.get("fit"),!0),C=this.addCheckbox(A,mxResources.get("shadow"),B.shadowVisible&&n,!n),R=this.addCheckbox(A,l),T=this.addCheckbox(A,mxResources.get("lightbox"),!0),S=this.addEditButton(A,T),Q=S.getEditInput(),v=1<B.model.getChildCount(B.model.getRoot()),z=this.addCheckbox(A,mxResources.get("layers"),v,!v);z.style.marginLeft=Q.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?
+(v&&z.removeAttribute("disabled"),Q.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&T.checked?S.getEditSelect().removeAttribute("disabled"):S.getEditSelect().setAttribute("disabled","disabled")});k=new CustomDialog(this,A,mxUtils.bind(this,function(){d(G.checked,C.checked,R.checked,T.checked,S.getLink(),z.checked)}),null,mxResources.get("embed"),x);this.showDialog(k.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(d,k,l,n,x,A,B,I){function G(Q){var v=" ",z="";n&&(v=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",z+=
+"cursor:pointer;");d&&(z+="max-width:100%;");var N="";l&&(N=' width="'+Math.round(C.width)+'" height="'+Math.round(C.height)+'"');B('<img src="'+Q+'"'+N+(""!=z?' style="'+z+'"':"")+v+"/>")}var C=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Q){var v=n?this.getFileData(!0):null;Q=this.createImageDataUri(Q,v,"png");G(Q)}),null,null,null,mxUtils.bind(this,function(Q){I({message:mxResources.get("unknownError")})}),
+null,!0,l?2:1,null,k,null,null,Editor.defaultBorder);else if(k=this.getFileData(!0),C.width*C.height<=MAX_AREA&&k.length<=MAX_REQUEST_SIZE){var T="";l&&(T="&w="+Math.round(2*C.width)+"&h="+Math.round(2*C.height));var S=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+T+"&xml="+encodeURIComponent(k));S.send(mxUtils.bind(this,function(){200<=S.getStatus()&&299>=S.getStatus()?G("data:image/png;base64,"+S.getText()):I({message:mxResources.get("unknownError")})}))}else I({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(d,k,l,n,x,A,B){var I=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),G=I.getElementsByTagName("a");if(null!=G)for(var C=0;C<G.length;C++){var R=G[C].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==G[C].getAttribute("target")&&G[C].removeAttribute("target")}n&&I.setAttribute("content",this.getFileData(!0));k&&this.editor.graph.addSvgShadow(I);if(l){var T=" ",S="";n&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",S+="cursor:pointer;");d&&(S+="max-width:100%;");this.editor.convertImages(I,mxUtils.bind(this,function(Q){B('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Q))+'"'+(""!=S?' style="'+S+'"':"")+T+"/>")}))}else S="",n&&(k=this.getSelectedPageIndex(),I.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=k?"&page="+k:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}}})(this);"),S+="cursor:pointer;"),d&&(d=parseInt(I.getAttribute("width")),x=parseInt(I.getAttribute("height")),I.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),S+="max-width:100%;max-height:"+x+"px;",I.removeAttribute("height")),""!=S&&I.setAttribute("style",S),this.editor.addFontCss(I),this.editor.graph.mathEnabled&&this.editor.addMathCss(I),B(mxUtils.getXml(I))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var k=Math.floor(d/31536E3);if(1<k)return k+" "+mxResources.get("years");k=Math.floor(d/2592E3);if(1<k)return k+" "+mxResources.get("months");k=Math.floor(d/86400);if(1<k)return k+" "+mxResources.get("days");k=Math.floor(d/3600);if(1<k)return k+" "+mxResources.get("hours");k=Math.floor(d/60);return 1<k?k+" "+mxResources.get("minutes"):1==k?k+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,k){if(null!=d){var l=null;if("diagram"==d.nodeName)l=
-d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){l=n[0];var x=k.getGlobalVariable;k.getGlobalVariable=function(z){return"page"==z?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==z?1:x.apply(this,arguments)}}}null!=l&&(d=Editor.parseDiagramNode(l))}n=this.editor.graph;try{this.editor.graph=k,this.editor.setGraphXml(d)}catch(z){}finally{this.editor.graph=n}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};
-EditorUi.prototype.getPngFileProperties=function(d){var k=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(k=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(l=n))}return{scale:k,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,k,l,n,x){try{var z=this.editor.graph,B=null;if(null!=l&&0<l.length)z=this.createTemporaryGraph(z.getStylesheet()),document.body.appendChild(z.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
-!0),z),B=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){z=this.createTemporaryGraph(z.getStylesheet());var I=z.getGlobalVariable;z.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?z.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&z.setBackgroundImage(H.viewState.backgroundImage);z.getGlobalVariable=function(C){return"page"==C?H.getName():"pagenumber"==C?1:I.apply(this,arguments)};document.body.appendChild(z.container);
-z.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(C){try{null==B&&(B=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=C.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(B));d(R.substring(R.lastIndexOf(",")+1));z!=this.editor.graph&&z.container.parentNode.removeChild(z.container)}catch(U){null!=k&&k(U)}}),null,null,null,mxUtils.bind(this,function(C){null!=k&&k(C)}),null,null,n,null,z.shadowVisible,null,z,x,null,
-null,null,"diagram",null)}catch(C){null!=k&&k(C)}};EditorUi.prototype.getEmbeddedSvg=function(d,k,l,n,x,z,B,I,H,C,R,U,S){I=null!=I?I:!0;R=null!=R?R:0;B=null!=H?H:k.background;B==mxConstants.NONE&&(B=null);null==B&&"none"==k.getAdaptiveColors()&&(B="#ffffff");H=this.editor.graph.createSvgImageExport(null!=d);z=k.getSvg(B,C,R,null,null,z,null,H,null,k.shadowVisible||U,null,S,"diagram");(k.shadowVisible||U)&&k.addSvgShadow(z,null,null,0==R);null!=d&&z.setAttribute("content",d);null!=l&&z.setAttribute("resource",
-l);var Q=mxUtils.bind(this,function(v){v=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(v);null!=x&&x(v);return v});k.mathEnabled&&this.editor.addMathCss(z);if(null!=x)this.embedFonts(z,mxUtils.bind(this,function(v){I?this.editor.convertImages(v,mxUtils.bind(this,function(A){Q(A)})):Q(v)}));else return Q(z)};EditorUi.prototype.embedFonts=function(d,k){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),k(d)}catch(n){k(d)}}))}catch(l){k(d)}}))};EditorUi.prototype.exportImage=function(d,k,l,n,x,z,B,I,H,C,R,U,S){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(v){Editor.addRetryToError(v,mxUtils.bind(this,function(){this.exportImage(d,k,l,n,x,z,B,I,H,C,R,U,S)}));this.handleError(v)}))){var Q=this.editor.graph.isSelectionEmpty();
-l=null!=l?l:Q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(v){this.spinner.stop();try{this.saveCanvas(v,x?this.getFileData(!0,null,null,null,l,I,null,null,null,null,null,d,z):null,H,null==this.pages||0==this.pages.length,R)}catch(A){this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,l,d||1,k,n,null,null,z,B,C,U,S)}catch(v){this.spinner.stop(),this.handleError(v)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var k=0;k<this.pages.length;k++)d[this.pages[k].getId()]=this.pages[k].getId();return d};EditorUi.prototype.importXml=function(d,k,l,n,x,z,B){k=null!=k?k:0;l=null!=l?l:0;var I=[];try{var H=this.editor.graph;if(null!=d&&0<d.length){H.model.beginUpdate();try{var C=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(C.documentElement,
-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var U=R.getElementsByTagName("diagram");if(1==U.length&&!z){if(R=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(d[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var S=U[0].getAttribute("name");null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,S))}}else if(0<U.length){z=[];var Q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[U[0].getAttribute("id")]=
-this.pages[0].getId(),S=U[0].getAttribute("name"),null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],S)),R=Editor.parseDiagramNode(U[0]),n=!1,Q=1);for(;Q<U.length;Q++){var v=U[Q].getAttribute("id");U[Q].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(U[Q]));d[v]=U[Q].getAttribute("id");var N=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[N+1]));H.model.execute(new ChangePage(this,A,A,N,!0));z.push(A)}this.updatePageLinks(d,
-z)}}if(null!=R&&"mxGraphModel"===R.nodeName){I=H.importGraphModel(R,k,l,n);if(null!=I)for(this.addLocalPagesToMapping(d),Q=0;Q<I.length;Q++)this.updatePageLinksForCell(d,I[Q]);var J=H.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=J&&null!=J.originalSrc){this.updateBackgroundPageLink(d,J);var K=new ChangePageSetup(this,null,J);K.ignoreColor=!0;H.model.execute(K)}}B&&H.pasteCellStyles(H.includeDescendants(I),H.defaultVertexStyle,H.defaultEdgeStyle)}finally{H.model.endUpdate()}}}catch(m){if(x)throw m;
+d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){l=n[0];var x=k.getGlobalVariable;k.getGlobalVariable=function(A){return"page"==A?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==A?1:x.apply(this,arguments)}}}null!=l&&(d=Editor.parseDiagramNode(l))}n=this.editor.graph;try{this.editor.graph=k,this.editor.setGraphXml(d)}catch(A){}finally{this.editor.graph=n}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};
+EditorUi.prototype.getPngFileProperties=function(d){var k=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(k=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(l=n))}return{scale:k,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,k,l,n,x){try{var A=this.editor.graph,B=null;if(null!=l&&0<l.length)A=this.createTemporaryGraph(A.getStylesheet()),document.body.appendChild(A.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
+!0),A),B=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){A=this.createTemporaryGraph(A.getStylesheet());var I=A.getGlobalVariable;A.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?A.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&A.setBackgroundImage(G.viewState.backgroundImage);A.getGlobalVariable=function(C){return"page"==C?G.getName():"pagenumber"==C?1:I.apply(this,arguments)};document.body.appendChild(A.container);
+A.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(C){try{null==B&&(B=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=C.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(B));d(R.substring(R.lastIndexOf(",")+1));A!=this.editor.graph&&A.container.parentNode.removeChild(A.container)}catch(T){null!=k&&k(T)}}),null,null,null,mxUtils.bind(this,function(C){null!=k&&k(C)}),null,null,n,null,A.shadowVisible,null,A,x,null,
+null,null,"diagram",null)}catch(C){null!=k&&k(C)}};EditorUi.prototype.getEmbeddedSvg=function(d,k,l,n,x,A,B,I,G,C,R,T,S){I=null!=I?I:!0;R=null!=R?R:0;B=null!=G?G:k.background;B==mxConstants.NONE&&(B=null);null==B&&"none"==k.getAdaptiveColors()&&(B="#ffffff");G=this.editor.graph.createSvgImageExport(null!=d);A=k.getSvg(B,C,R,null,null,A,null,G,null,k.shadowVisible||T,null,S,"diagram");(k.shadowVisible||T)&&k.addSvgShadow(A,null,null,0==R);null!=d&&A.setAttribute("content",d);null!=l&&A.setAttribute("resource",
+l);var Q=mxUtils.bind(this,function(v){v=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(v);null!=x&&x(v);return v});k.mathEnabled&&this.editor.addMathCss(A);if(null!=x)this.embedFonts(A,mxUtils.bind(this,function(v){I?this.editor.convertImages(v,mxUtils.bind(this,function(z){Q(z)})):Q(v)}));else return Q(A)};EditorUi.prototype.embedFonts=function(d,k){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),k(d)}catch(n){k(d)}}))}catch(l){k(d)}}))};EditorUi.prototype.exportImage=function(d,k,l,n,x,A,B,I,G,C,R,T,S){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(v){Editor.addRetryToError(v,mxUtils.bind(this,function(){this.exportImage(d,k,l,n,x,A,B,I,G,C,R,T,S)}));this.handleError(v)}))){var Q=this.editor.graph.isSelectionEmpty();
+l=null!=l?l:Q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(v){this.spinner.stop();try{this.saveCanvas(v,x?this.getFileData(!0,null,null,null,l,I,null,null,null,null,null,d,A):null,G,null==this.pages||0==this.pages.length,R)}catch(z){this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,l,d||1,k,n,null,null,A,B,C,T,S)}catch(v){this.spinner.stop(),this.handleError(v)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var k=0;k<this.pages.length;k++)d[this.pages[k].getId()]=this.pages[k].getId();return d};EditorUi.prototype.importXml=function(d,k,l,n,x,A,B){k=null!=k?k:0;l=null!=l?l:0;var I=[];try{var G=this.editor.graph;if(null!=d&&0<d.length){G.model.beginUpdate();try{var C=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(C.documentElement,
+null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var T=R.getElementsByTagName("diagram");if(1==T.length&&!A){if(R=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var S=T[0].getAttribute("name");null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,S))}}else if(0<T.length){A=[];var Q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=
+this.pages[0].getId(),S=T[0].getAttribute("name"),null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],S)),R=Editor.parseDiagramNode(T[0]),n=!1,Q=1);for(;Q<T.length;Q++){var v=T[Q].getAttribute("id");T[Q].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(T[Q]));d[v]=T[Q].getAttribute("id");var N=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[N+1]));G.model.execute(new ChangePage(this,z,z,N,!0));A.push(z)}this.updatePageLinks(d,
+A)}}if(null!=R&&"mxGraphModel"===R.nodeName){I=G.importGraphModel(R,k,l,n);if(null!=I)for(this.addLocalPagesToMapping(d),Q=0;Q<I.length;Q++)this.updatePageLinksForCell(d,I[Q]);var J=G.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=J&&null!=J.originalSrc){this.updateBackgroundPageLink(d,J);var K=new ChangePageSetup(this,null,J);K.ignoreColor=!0;G.model.execute(K)}}B&&G.pasteCellStyles(G.includeDescendants(I),G.defaultVertexStyle,G.defaultEdgeStyle)}finally{G.model.endUpdate()}}}catch(m){if(x)throw m;
this.handleError(m)}return I};EditorUi.prototype.updatePageLinks=function(d,k){for(var l=0;l<k.length;l++)this.updatePageLinksForCell(d,k[l].root),null!=k[l].viewState&&this.updateBackgroundPageLink(d,k[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,k){try{if(null!=k&&Graph.isPageLink(k.originalSrc)){var l=d[k.originalSrc.substring(k.originalSrc.indexOf(",")+1)];null!=l&&(k.originalSrc="data:page/id,"+l)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,k){var l=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(k);null!=x&&n.setLinkForCell(k,this.updatePageLink(d,x));if(n.isHtmlLabel(k)){l.innerHTML=Graph.sanitizeHtml(n.getLabel(k));for(var z=l.getElementsByTagName("a"),B=!1,I=0;I<z.length;I++)x=z[I].getAttribute("href"),null!=x&&(z[I].setAttribute("href",this.updatePageLink(d,x)),B=!0);B&&n.labelChanged(k,l.innerHTML)}for(I=0;I<n.model.getChildCount(k);I++)this.updatePageLinksForCell(d,n.model.getChildAt(k,I))};EditorUi.prototype.updatePageLink=
-function(d,k){if(Graph.isPageLink(k)){var l=d[k.substring(k.indexOf(",")+1)];k=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==k.substring(0,17))try{var n=JSON.parse(k.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var z=n.actions[x];if(null!=z.open&&Graph.isPageLink(z.open)){var B=z.open.substring(z.open.indexOf(",")+1);l=d[B];null!=l?z.open="data:page/id,"+l:null==this.getPageById(B)&&delete z.open}}k="data:action/json,"+JSON.stringify(n)}}catch(I){}return k};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,k,l,n,x){var z=mxUtils.bind(this,function(B){this.loadingExtensions=!1;null!=l?l(B):this.handleError(B)});this.createTimeout(null,mxUtils.bind(this,function(B){n=null!=n?n:d.name;var I=mxUtils.bind(this,function(C){B.clear()&&z(C)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var C=this.isRemoteVisioFormat(n);
-try{var R=n.lastIndexOf(".");if(0<=R&&R<n.length)n.substring(R+1).toUpperCase();else{var U=n.lastIndexOf("/");0<=U&&U<n.length&&(n=n.substring(U+1))}}catch(Q){}if(C)if(null==VSS_CONVERT_URL||this.isOffline())I({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{C=new FormData;C.append("file1",d,n);var S=new XMLHttpRequest;S.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
-null!=x&&S.setRequestHeader("x-convert-custom",x);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState&&B.clear())if(200<=S.status&&299>=S.status)try{var Q=S.response;if("text/xml"==Q.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(A){try{k(A.target.result)}catch(N){I({message:mxResources.get("errorLoadingFile")})}});v.readAsText(Q)}else this.doImportVisio(Q,k,I,n)}catch(A){I(A)}else try{""==S.responseType||"text"==S.responseType?I({message:S.responseText}):(v=new FileReader,
-v.onload=function(){try{I({message:JSON.parse(v.result).Message})}catch(A){null!=v.result&&0<v.result.length?I({message:v.result}):I(A)}},v.readAsText(S.response))}catch(A){I({})}});S.send(C)}else if(B.clear())try{this.doImportVisio(d,k,I,n)}catch(Q){I(Q)}}else I({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?H():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,I))}),z)};
-EditorUi.prototype.importGraphML=function(d,k,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,k,n)}catch(I){z(I)}else z({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
-this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,z))}),n)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var k=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(z){l.clear()&&k(z)}),x=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(d)||n({message:mxResources.get("unknownError")})}catch(z){n(z)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),k):k({message:mxResources.get("serviceUnavailableOrBlocked")})}};
-EditorUi.prototype.convertLucidChart=function(d,k,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var I=JSON.parse(d);k(LucidImporter.importState(I));try{if(null!=window.console&&"1"==urlParams.test){var H=[(new Date).toISOString(),
-"convertLucidChart",I];null!=I.state&&H.push(JSON.parse(I.state));if(null!=I.svgThumbs)for(var C=0;C<I.svgThumbs.length;C++)H.push(Editor.createSvgDataUri(I.svgThumbs[C]));null!=I.thumb&&H.push(I.thumb);console.log.apply(console,H)}}catch(R){}}catch(R){null!=window.console&&console.error(R),z(R)}else z({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingExtensions=!0,"1"==
-urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",B,null,null,null,z)},null,null,null,z)},null,null,null,z)},null,null,null,z)},null,null,null,z):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,z))}),n)};EditorUi.prototype.createMermaidXml=function(d,k,l,
-n,x,z){var B=new Graph(document.createElement("div"));l=B.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");B.setAttributeForCell(l,"mermaidData",JSON.stringify({data:d,config:k},null,2));null!=z&&B.setAttributeForCell(l,"templatePrompt",z);d=(new mxCodec).encode(B.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,k,l){var n=0,x=function(){for(var B=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),
-I=0;I<B.length;I++)null!=B[I].parentNode&&B[I].parentNode.removeChild(B[I])},z=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(B){var I=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),H=mxUtils.bind(this,function(C){B.clear()&&(x(),l(C))});I.send(mxUtils.bind(this,function(C){if(B.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var U=mxUtils.trim(C.getText());this.generateMermaidImage(U,null,mxUtils.bind(this,
-function(S,Q,v){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[d],"result",[U]),x(),k(U,S,Q,v))}),H)}),H,mxUtils.bind(this,function(S){3>n++?B.clear()&&z():H(S)}))}),H);else{var R={message:mxResources.get("error")+" "+C.getStatus()};try{R=JSON.parse(C.getText()),R=R.error}catch(U){}H(R)}}),H)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));
+function(d,k){var l=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(k);null!=x&&n.setLinkForCell(k,this.updatePageLink(d,x));if(n.isHtmlLabel(k)){l.innerHTML=Graph.sanitizeHtml(n.getLabel(k));for(var A=l.getElementsByTagName("a"),B=!1,I=0;I<A.length;I++)x=A[I].getAttribute("href"),null!=x&&(A[I].setAttribute("href",this.updatePageLink(d,x)),B=!0);B&&n.labelChanged(k,l.innerHTML)}for(I=0;I<n.model.getChildCount(k);I++)this.updatePageLinksForCell(d,n.model.getChildAt(k,I))};EditorUi.prototype.updatePageLink=
+function(d,k){if(Graph.isPageLink(k)){var l=d[k.substring(k.indexOf(",")+1)];k=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==k.substring(0,17))try{var n=JSON.parse(k.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var A=n.actions[x];if(null!=A.open&&Graph.isPageLink(A.open)){var B=A.open.substring(A.open.indexOf(",")+1);l=d[B];null!=l?A.open="data:page/id,"+l:null==this.getPageById(B)&&delete A.open}}k="data:action/json,"+JSON.stringify(n)}}catch(I){}return k};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,k,l,n,x){var A=mxUtils.bind(this,function(B){this.loadingExtensions=!1;null!=l?l(B):this.handleError(B)});this.createTimeout(null,mxUtils.bind(this,function(B){n=null!=n?n:d.name;var I=mxUtils.bind(this,function(C){B.clear()&&A(C)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var C=this.isRemoteVisioFormat(n);
+try{var R=n.lastIndexOf(".");if(0<=R&&R<n.length)n.substring(R+1).toUpperCase();else{var T=n.lastIndexOf("/");0<=T&&T<n.length&&(n=n.substring(T+1))}}catch(Q){}if(C)if(null==VSS_CONVERT_URL||this.isOffline())I({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{C=new FormData;C.append("file1",d,n);var S=new XMLHttpRequest;S.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
+null!=x&&S.setRequestHeader("x-convert-custom",x);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState&&B.clear())if(200<=S.status&&299>=S.status)try{var Q=S.response;if("text/xml"==Q.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(z){try{k(z.target.result)}catch(N){I({message:mxResources.get("errorLoadingFile")})}});v.readAsText(Q)}else this.doImportVisio(Q,k,I,n)}catch(z){I(z)}else try{""==S.responseType||"text"==S.responseType?I({message:S.responseText}):(v=new FileReader,
+v.onload=function(){try{I({message:JSON.parse(v.result).Message})}catch(z){null!=v.result&&0<v.result.length?I({message:v.result}):I(z)}},v.readAsText(S.response))}catch(z){I({})}});S.send(C)}else if(B.clear())try{this.doImportVisio(d,k,I,n)}catch(Q){I(Q)}}else I({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",G,null,null,null,I))}),A)};
+EditorUi.prototype.importGraphML=function(d,k,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var A=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,k,n)}catch(I){A(I)}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
+this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))}),n)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var k=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(A){l.clear()&&k(A)}),x=mxUtils.bind(this,function(){this.loadingExtensions=
+!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(d)||n({message:mxResources.get("unknownError")})}catch(A){n(A)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,n))}),k):k({message:mxResources.get("serviceUnavailableOrBlocked")})}};
+EditorUi.prototype.convertLucidChart=function(d,k,l){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=l?l(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var A=mxUtils.bind(this,function(I){x.clear()&&n(I)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if("undefined"!==typeof window.LucidImporter)try{var I=JSON.parse(d);k(LucidImporter.importState(I));try{if(null!=window.console&&"1"==urlParams.test){var G=[(new Date).toISOString(),
+"convertLucidChart",I];null!=I.state&&G.push(JSON.parse(I.state));if(null!=I.svgThumbs)for(var C=0;C<I.svgThumbs.length;C++)G.push(Editor.createSvgDataUri(I.svgThumbs[C]));null!=I.thumb&&G.push(I.thumb);console.log.apply(console,G)}}catch(R){}}catch(R){null!=window.console&&console.error(R),A(R)}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingExtensions=!0,"1"==
+urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",B,null,null,null,A)},null,null,null,A)},null,null,null,A)},null,null,null,A)},null,null,null,A):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))}),n)};EditorUi.prototype.createMermaidXml=function(d,k,l,
+n,x,A){var B=new Graph(document.createElement("div"));l=B.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");B.setAttributeForCell(l,"mermaidData",JSON.stringify({data:d,config:k},null,2));null!=A&&B.setAttributeForCell(l,"templatePrompt",A);d=(new mxCodec).encode(B.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,k,l){var n=0,x=function(){for(var B=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),
+I=0;I<B.length;I++)null!=B[I].parentNode&&B[I].parentNode.removeChild(B[I])},A=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(B){var I=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),G=mxUtils.bind(this,function(C){B.clear()&&(x(),l(C))});I.send(mxUtils.bind(this,function(C){if(B.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var T=mxUtils.trim(C.getText());this.generateMermaidImage(T,null,mxUtils.bind(this,
+function(S,Q,v){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[d],"result",[T]),x(),k(T,S,Q,v))}),G)}),G,mxUtils.bind(this,function(S){3>n++?B.clear()&&A():G(S)}))}),G);else{var R={message:mxResources.get("error")+" "+C.getStatus()};try{R=JSON.parse(C.getText()),R=R.error}catch(T){}G(R)}}),G)}),l)});A()};EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));
var k=d.split("```");k=1<k.length?k:d.split("<pre>");k=1<k.length?k:d.split("~~~");k=1<k.length?k:d.split("%%");k=1<k.length?k:d.split("(Begins)");d=mxUtils.trim(1>=k.length?d:k[1]);k=d.split("\n");var l=1<k.length?k[1]:null;if(null!=l){var n=l.indexOf("-");0<n&&(l=l.substring(0,n))}if(0<k.length&&"mermaid"==mxUtils.trim(k[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))k.shift(),d=mxUtils.trim(k.join("\n")),k=d.split("\n");l=k[0].split(" ")[0].replace(/:$/,"");n=l.indexOf("-");0<
-n&&(l=l.substring(0,n));try{"mindmap"==l&&2<k.length&&(d=extractMermaidMindmap(k))}catch(x){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,k,l,n,x){var z=mxUtils.bind(this,function(I){this.loadingMermaid=!1;null!=n?n(I):this.handleError(I)}),B=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;k=null!=k?k:mxUtils.clone(EditorUi.defaultMermaidConfig);k.securityLevel="strict";k.startOnLoad=!1;k.maxTextSize=9E5;"undefined"!==
-typeof mxMermaidToDrawio&&k.flowchart&&0<=d.indexOf("$$")&&(k.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(k.theme="dark");var I=mxUtils.bind(this,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');H=H.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var C=mxUtils.parseXml(H).getElementsByTagName("svg");if(0<C.length&&
-"error"!=C[0].getAttribute("aria-roledescription")){var R=parseFloat(C[0].getAttribute("width")),U=parseFloat(C[0].getAttribute("height"));if(isNaN(R)||isNaN(U))try{var S=C[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(S[2]);U=parseFloat(S[3])}catch(Q){R=R||100,U=U||100}l(this.convertDataUri(Editor.createSvgDataUri(H)),R,U)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(Q){n(Q)}});mermaid.mermaidAPI.initialize(k);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
-d).then(function(H){I(H.svg)}).catch(function(H){null!=x?x(H):n(H)})}catch(H){n(H)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){this.importXml(I,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",B,null,null,null,z)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,z))};
-EditorUi.prototype.generatePlantUmlImage=function(d,k,l,n){function x(I,H,C){c1=I>>2;c2=(I&3)<<4|H>>4;c3=(H&15)<<2|C>>6;c4=C&63;r="";r+=z(c1&63);r+=z(c2&63);r+=z(c3&63);return r+=z(c4&63)}function z(I){if(10>I)return String.fromCharCode(48+I);I-=10;if(26>I)return String.fromCharCode(65+I);I-=26;if(26>I)return String.fromCharCode(97+I);I-=26;return 0==I?"-":1==I?"_":"?"}var B=new XMLHttpRequest;B.open("GET",("txt"==k?PLANT_URL+"/txt/":"png"==k?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(I){r="";
-for(i=0;i<I.length;i+=3)r=i+2==I.length?r+x(I.charCodeAt(i),I.charCodeAt(i+1),0):i+1==I.length?r+x(I.charCodeAt(i),0,0):r+x(I.charCodeAt(i),I.charCodeAt(i+1),I.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=k&&(B.responseType="blob");B.onload=function(I){if(200<=this.status&&300>this.status)if("txt"==k)l(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(C){var R=new Image;R.onload=function(){try{var U=R.width,S=R.height;
-if(0==U&&0==S){var Q=H.result,v=Q.indexOf(","),A=decodeURIComponent(escape(atob(Q.substring(v+1)))),N=mxUtils.parseXml(A).getElementsByTagName("svg");0<N.length&&(U=parseFloat(N[0].getAttribute("width")),S=parseFloat(N[0].getAttribute("height")))}l(H.result,U,S)}catch(J){n(J)}};R.src=H.result};H.onerror=function(C){n(C)}}else n(I)};B.onerror=function(I){n(I)};B.send()};EditorUi.prototype.insertAsPreText=function(d,k,l){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,
-null,"<pre>"+d+"</pre>",k,l,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,k,l,n,x,z,B,I){z=null!=z?z:!0;B=null!=B?B:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(S){4==S.readyState&&200<=
-S.status&&299>=S.status&&this.editor.graph.setSelectionCells(this.insertTextAt(S.responseText,k,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var H=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var C=Editor.extractGraphModelFromPdf(d);if(null!=C&&0<C.length)return this.importXml(C,k,l,z,!0,I)}if(Editor.isPngDataUrl(d)&&(C=Editor.extractGraphModelFromPng(d),null!=C&&0<C.length))return this.importXml(C,k,l,z,
-!0,I);if("data:image/svg+xml;"==d.substring(0,19))try{C=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(C=d.substring(d.indexOf(",")+1),C=window.atob&&!mxClient.IS_SF?atob(C):Base64.decode(C,!0)):C=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(C,k,l,z,!0,I);if(0<R.length)return R}catch(S){}this.loadImage(d,mxUtils.bind(this,function(S){if("data:"==d.substring(0,5))this.resizeImage(S,d,mxUtils.bind(this,function(A,N,J){H.setSelectionCell(H.insertVertex(null,null,"",H.snap(k),
-H.snap(l),N,J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(A)+";"))}),B,this.maxImageSize);else{var Q=Math.min(1,Math.min(this.maxImageSize/S.width,this.maxImageSize/S.height)),v=Math.round(S.width*Q);S=Math.round(S.height*Q);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(k),H.snap(l),v,S,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var S=null;H.getModel().beginUpdate();try{S=H.insertVertex(H.getDefaultParent(),null,d,H.snap(k),H.snap(l),1,1,"text;"+(n?"html=1;":"")),H.updateCellSize(S),H.fireEvent(new mxEventObject("textInserted","cells",[S]))}finally{H.getModel().endUpdate()}H.setSelectionCell(S)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,k,l,z,null,I);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(S){this.editor.graph.setSelectionCells(this.importXml(S,k,l,z,null,I))}),mxUtils.bind(this,function(S){this.handleError(S)}));else{H=this.editor.graph;x=null;H.getModel().beginUpdate();try{x=H.insertVertex(H.getDefaultParent(),null,"",H.snap(k),H.snap(l),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));H.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(d=H.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;H.updateCellSize(x);if(0<this.maxTextWidth&&
-x.geometry.width>this.maxTextWidth){var U=H.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=U.width;x.geometry.height=U.height}Graph.isLink(x.value)&&H.setLinkForCell(x,x.value);x.geometry.width+=H.gridSize;x.geometry.height+=H.gridSize}finally{H.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(d){var k=-1;do d/=1024,k++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[k]};EditorUi.prototype.convertDataUri=
+n&&(l=l.substring(0,n));try{"mindmap"==l&&2<k.length&&(d=extractMermaidMindmap(k))}catch(x){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,k,l,n,x){var A=mxUtils.bind(this,function(I){this.loadingMermaid=!1;null!=n?n(I):this.handleError(I)}),B=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;k=null!=k?k:mxUtils.clone(EditorUi.defaultMermaidConfig);k.securityLevel="strict";k.startOnLoad=!1;k.maxTextSize=9E5;"undefined"!==
+typeof mxMermaidToDrawio&&k.flowchart&&0<=d.indexOf("$$")&&(k.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(k.theme="dark");var I=mxUtils.bind(this,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');G=G.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var C=mxUtils.parseXml(G).getElementsByTagName("svg");if(0<C.length&&
+"error"!=C[0].getAttribute("aria-roledescription")){var R=parseFloat(C[0].getAttribute("width")),T=parseFloat(C[0].getAttribute("height"));if(isNaN(R)||isNaN(T))try{var S=C[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(S[2]);T=parseFloat(S[3])}catch(Q){R=R||100,T=T||100}l(this.convertDataUri(Editor.createSvgDataUri(G)),R,T)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(Q){n(Q)}});mermaid.mermaidAPI.initialize(k);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
+d).then(function(G){I(G.svg)}).catch(function(G){null!=x?x(G):n(G)})}catch(G){n(G)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){this.importXml(I,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",B,null,null,null,A)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,A))};
+EditorUi.prototype.generatePlantUmlImage=function(d,k,l,n){function x(I,G,C){c1=I>>2;c2=(I&3)<<4|G>>4;c3=(G&15)<<2|C>>6;c4=C&63;r="";r+=A(c1&63);r+=A(c2&63);r+=A(c3&63);return r+=A(c4&63)}function A(I){if(10>I)return String.fromCharCode(48+I);I-=10;if(26>I)return String.fromCharCode(65+I);I-=26;if(26>I)return String.fromCharCode(97+I);I-=26;return 0==I?"-":1==I?"_":"?"}var B=new XMLHttpRequest;B.open("GET",("txt"==k?PLANT_URL+"/txt/":"png"==k?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(I){r="";
+for(i=0;i<I.length;i+=3)r=i+2==I.length?r+x(I.charCodeAt(i),I.charCodeAt(i+1),0):i+1==I.length?r+x(I.charCodeAt(i),0,0):r+x(I.charCodeAt(i),I.charCodeAt(i+1),I.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=k&&(B.responseType="blob");B.onload=function(I){if(200<=this.status&&300>this.status)if("txt"==k)l(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(C){var R=new Image;R.onload=function(){try{var T=R.width,S=R.height;
+if(0==T&&0==S){var Q=G.result,v=Q.indexOf(","),z=decodeURIComponent(escape(atob(Q.substring(v+1)))),N=mxUtils.parseXml(z).getElementsByTagName("svg");0<N.length&&(T=parseFloat(N[0].getAttribute("width")),S=parseFloat(N[0].getAttribute("height")))}l(G.result,T,S)}catch(J){n(J)}};R.src=G.result};G.onerror=function(C){n(C)}}else n(I)};B.onerror=function(I){n(I)};B.send()};EditorUi.prototype.insertAsPreText=function(d,k,l){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,
+null,"<pre>"+d+"</pre>",k,l,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,k,l,n,x,A,B,I){A=null!=A?A:!0;B=null!=B?B:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(S){4==S.readyState&&200<=
+S.status&&299>=S.status&&this.editor.graph.setSelectionCells(this.insertTextAt(S.responseText,k,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var G=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var C=Editor.extractGraphModelFromPdf(d);if(null!=C&&0<C.length)return this.importXml(C,k,l,A,!0,I)}if(Editor.isPngDataUrl(d)&&(C=Editor.extractGraphModelFromPng(d),null!=C&&0<C.length))return this.importXml(C,k,l,A,
+!0,I);if("data:image/svg+xml;"==d.substring(0,19))try{C=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(C=d.substring(d.indexOf(",")+1),C=window.atob&&!mxClient.IS_SF?atob(C):Base64.decode(C,!0)):C=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(C,k,l,A,!0,I);if(0<R.length)return R}catch(S){}this.loadImage(d,mxUtils.bind(this,function(S){if("data:"==d.substring(0,5))this.resizeImage(S,d,mxUtils.bind(this,function(z,N,J){G.setSelectionCell(G.insertVertex(null,null,"",G.snap(k),
+G.snap(l),N,J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(z)+";"))}),B,this.maxImageSize);else{var Q=Math.min(1,Math.min(this.maxImageSize/S.width,this.maxImageSize/S.height)),v=Math.round(S.width*Q);S=Math.round(S.height*Q);G.setSelectionCell(G.insertVertex(null,null,"",G.snap(k),G.snap(l),v,S,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var S=null;G.getModel().beginUpdate();try{S=G.insertVertex(G.getDefaultParent(),null,d,G.snap(k),G.snap(l),1,1,"text;"+(n?"html=1;":"")),G.updateCellSize(S),G.fireEvent(new mxEventObject("textInserted","cells",[S]))}finally{G.getModel().endUpdate()}G.setSelectionCell(S)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,k,l,A,null,I);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(S){this.editor.graph.setSelectionCells(this.importXml(S,k,l,A,null,I))}),mxUtils.bind(this,function(S){this.handleError(S)}));else{G=this.editor.graph;x=null;G.getModel().beginUpdate();try{x=G.insertVertex(G.getDefaultParent(),null,"",G.snap(k),G.snap(l),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));G.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(d=G.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;G.updateCellSize(x);if(0<this.maxTextWidth&&
+x.geometry.width>this.maxTextWidth){var T=G.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=T.width;x.geometry.height=T.height}Graph.isLink(x.value)&&G.setLinkForCell(x,x.value);x.geometry.width+=G.gridSize;x.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(d){var k=-1;do d/=1024,k++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[k]};EditorUi.prototype.convertDataUri=
function(d){if("data:"==d.substring(0,5)){var k=d.indexOf(";");0<k&&(d=d.substring(0,k)+d.substring(d.indexOf(",",k+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,k){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,k){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var l=
document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(B,I){StorageFile.listFiles(this,"F",B,I)});window.openBrowserFile=
-mxUtils.bind(this,function(B,I,H){StorageFile.getFileContent(this,B,I,H)});window.deleteBrowserFile=mxUtils.bind(this,function(B,I,H){StorageFile.deleteFile(this,B,I,H)});if(!k){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(B){this.hideDialog(B)}));window.openFile.setConsumer(mxUtils.bind(this,function(B,I){null!=I&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(I)?(B=new Blob([B],{type:"application/octet-stream"}),this.importVisio(B,
-mxUtils.bind(this,function(H){this.importXml(H,0,0,!0)}),null,I)):this.editor.graph.setSelectionCells(this.importXml(B,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!k){var x=this.dialog,z=x.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=n;z.apply(x,arguments);B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(d,k,l){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(z){if(mxUtils.isEmptyObject(z.files))l();else{var B=0,I,H=!1;z.forEach(function(C,R){C=R.name.toLowerCase();"diagram/diagram.xml"==C?(H=!0,R.async("string").then(function(U){0==U.indexOf("<mxfile ")?k(U):l()})):0==C.indexOf("versions/")&&(C=parseInt(C.substr(9)),C>B&&(B=C,I=R))});0<B?I.async("string").then(function(C){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(C,
-d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):n.parseFileData(C,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?k(R.responseText):l())}),d.name):l()}):H||l()}},function(z){l(z)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,l))};EditorUi.prototype.importFile=function(d,k,l,n,x,z,B,
-I,H,C,R,U){C=null!=C?C:!0;var S=!1,Q=null,v=mxUtils.bind(this,function(A){var N=null;null!=A&&"<mxlibrary"==A.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,A,B)),this.showSidebar()):N=this.importXml(A,l,n,C,null,null!=U?mxEvent.isControlDown(U):null);null!=I&&I(N)});"image"==k.substring(0,5)?(H=!1,"image/png"==k.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(Q=this.importXml(R,l,n,C,null,null!=U?mxEvent.isControlDown(U):null),H=!0)),H||(H=this.editor.graph,
-R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),C&&H.isGridEnabled()&&(l=H.snap(l),n=H.snap(n)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==k.substring(0,9)&&(R+="editableCssRules=.*;"),Q=[H.insertVertex(null,null,"",l,n,x,z,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(S=!0,this.importGraphML(d,v)):null!=H&&null!=B&&EditorUi.isVisioFilename(B)?(S=!0,this.importVisio(H,v)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(S=!0,k=mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?v(A.responseText):null!=I&&(I(null),this.showError(mxResources.get("error"),413==A.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,k,B):this.parseFile(H,k,B)):0==d.indexOf("PK")&&null!=H?(S=!0,this.importZipFile(H,v,mxUtils.bind(this,function(){Q=
-this.insertTextAt(this.validateFileData(d),l,n,!0,null,C);I(Q)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(Q=this.insertTextAt(this.validateFileData(d),l,n,!0,null,C,null,null!=U?mxEvent.isControlDown(U):null));S||null==I||I(Q);return Q};EditorUi.prototype.importFiles=function(d,k,l,n,x,z,B,I,H,C,R,U,S){n=null!=n?n:this.maxImageSize;C=null!=C?C:this.maxImageBytes;var Q=null!=k&&null!=l,v=!0;k=null!=k?k:0;l=null!=l?l:0;var A=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var N=R||
-this.resampleThreshold,J=0;J<d.length;J++)if("image/svg"!==d[J].type.substring(0,9)&&"image/"===d[J].type.substring(0,6)&&d[J].size>N){A=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[d],"x",[k],"y",[l],"maxSize",[n],"maxBytes",[C],"resampleThreshold",[this.resampleThreshold],"largeImages",[A],"crop",[Q],"resizeImages",[v],"ignoreEmbeddedXml",[U],"evt",[S]);var K=mxUtils.bind(this,function(){var m=this.editor.graph,t=m.gridSize;x=null!=x?x:mxUtils.bind(this,function(T,V,X,W,Y,Z,aa,
-fa,ea){try{if(null!=T&&"<mxlibrary"==T.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,T,aa)),this.showSidebar(),null;this.isCompatibleString(T)&&1==d.length&&null!=S&&"drop"==S.type&&this.isBlankFile()&&!this.canUndo()&&(Q=!1,W=X=0);return this.importFile(T,V,X,W,Y,Z,aa,fa,ea,Q,U,S)}catch(ca){return this.handleError(ca),null}});z=null!=z?z:mxUtils.bind(this,function(T){m.setSelectionCells(T)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var D=
-d.length,M=D,L=[],O=mxUtils.bind(this,function(T,V){L[T]=V;if(0==--M){this.spinner.stop();if(null!=I)I(L);else{var X=[];m.getModel().beginUpdate();try{for(T=0;T<L.length;T++){var W=L[T]();null!=W&&(X=X.concat(W))}}finally{m.getModel().endUpdate()}}z(X)}}),P=0;P<D;P++)mxUtils.bind(this,function(T){var V=d[T];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),
-Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),fa=mxUtils.parseXml(aa),ea=fa.getElementsByTagName("svg");if(0<ea.length){var ca=ea[0],ia=U?null:ca.getAttribute("content");null!=ia&&"<"!=ia.charAt(0)&&"%"!=ia.charAt(0)&&(ia=unescape(window.atob?atob(ia):Base64.decode(ia,!0)));null!=ia&&"%"==ia.charAt(0)&&(ia=decodeURIComponent(ia));null==ia||"<mxfile "!==ia.substring(0,8)&&"<mxGraphModel>"!==ia.substring(0,14)&&"<mxGraphModel "!==ia.substring(0,14)?O(T,mxUtils.bind(this,function(){try{if(null!=
-fa){var ha=fa.getElementsByTagName("svg");if(0<ha.length){var ma=ha[0],da=ma.getAttribute("width"),va=ma.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;var ra=ma.getAttribute("viewBox");if(null==ra||0==ra.length)ma.setAttribute("viewBox","0 0 "+da+" "+va);else if(isNaN(da)||isNaN(va)){var wa=ra.split(" ");3<wa.length&&(da=parseFloat(wa[2]),va=parseFloat(wa[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(ma));
-var oa=Math.min(1,Math.min(n/Math.max(1,da)),n/Math.max(1,va)),ja=x(Y,V.type,k+T*t,l+T*t,Math.max(1,Math.round(da*oa)),Math.max(1,Math.round(va*oa)),V.name);if(null!=ja&&(isNaN(da)||isNaN(va))){var na=new Image;na.onload=mxUtils.bind(this,function(){da=Math.max(1,na.width);va=Math.max(1,na.height);ja[0].geometry.width=da;ja[0].geometry.height=va;ma.setAttribute("viewBox","0 0 "+da+" "+va);Y=Editor.createSvgDataUri(mxUtils.getXml(ma));var ua=Y.indexOf(";");0<ua&&(Y=Y.substring(0,ua)+Y.substring(Y.indexOf(",",
-ua+1)));m.setCellStyles("image",Y,[ja[0]])});na.src=Editor.createSvgDataUri(mxUtils.getXml(ma))}return ja}}}catch(ua){}return null})):O(T,mxUtils.bind(this,function(){return x(ia,"text/xml",k+T*t,l+T*t,0,0,V.name)}))}else O(T,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var ka=U?null:this.extractGraphModelFromPng(W.target.result);if(null!=ka&&0<ka.length){var ba=new Image;ba.src=W.target.result;O(T,mxUtils.bind(this,function(){return x(ka,"text/xml",k+T*t,l+T*t,ba.width,
-ba.height,V.name)}));Z=!0}}Z||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(W.target.result,mxUtils.bind(this,function(ha){this.resizeImage(ha,W.target.result,mxUtils.bind(this,function(ma,da,va){O(T,mxUtils.bind(this,function(){if(null!=ma&&ma.length<
-C){var ra=v&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(n/da,n/va)):1;return x(ma,V.type,k+T*t,l+T*t,Math.round(da*ra),Math.round(va*ra),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,n,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,x(Y,V.type,k+T*t,l+T*t,240,160,V.name,function(ha){O(T,function(){return ha})},V)}catch(ha){O(T,mxUtils.bind(this,function(){return null})),
-null!=window.console&&console.error(ha,V)}else O(T,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?x(null,V.type,k+T*t,l+T*t,240,160,V.name,function(W){O(T,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(P)});if(A){A=[];for(J=0;J<d.length;J++)A.push(d[J]);d=A;this.confirmImageResize(function(m){v=m;K()},H)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
-this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,k){k=null!=k?k:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(z,B){if(z||k)mxSettings.setResizeImages(z?B:null),mxSettings.save();l();d(B)};null==n||k?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(z){x(z,
-!0)},function(z){x(z,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(d,k,l){l=null!=l?l:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,k,l)});n.readAsText(d)};EditorUi.prototype.parseFileData=
-function(d,k,l){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){k(n)};n.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(d,k){k=null!=k?k:this.resampleThreshold;return d>k};EditorUi.prototype.resizeImage=function(d,k,l,n,x,z,
-B){x=null!=x?x:this.maxImageSize;var I=Math.max(1,d.width),H=Math.max(1,d.height),C=k;if(n&&this.isResampleImageSize(null!=B?B:k.length,z))try{var R=Math.max(I/x,H/x);if(1<R){var U=Math.round(I/R),S=Math.round(H/R),Q=document.createElement("canvas");Q.width=U;Q.height=S;Q.getContext("2d").drawImage(d,0,0,U,S);var v=Q.toDataURL();if(v.length<k.length){var A=document.createElement("canvas");A.width=U;A.height=S;var N=A.toDataURL();v!==N&&(k=v,I=U,H=S)}}}catch(J){}n&&C!=k&&x>this.maxImageSize/2&&k.length>
-this.maxImageBytes?this.resizeImage(d,k,l,n,x/1.5,z,B):l(k,I,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,k,l){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;k(n)};null!=l&&(n.onerror=l);n.src=d}catch(x){if(null!=l)l(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
+mxUtils.bind(this,function(B,I,G){StorageFile.getFileContent(this,B,I,G)});window.deleteBrowserFile=mxUtils.bind(this,function(B,I,G){StorageFile.deleteFile(this,B,I,G)});if(!k){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(B){this.hideDialog(B)}));window.openFile.setConsumer(mxUtils.bind(this,function(B,I){null!=I&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(I)?(B=new Blob([B],{type:"application/octet-stream"}),this.importVisio(B,
+mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,I)):this.editor.graph.setSelectionCells(this.importXml(B,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!k){var x=this.dialog,A=x.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=n;A.apply(x,arguments);B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
+function(d,k,l){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(A){if(mxUtils.isEmptyObject(A.files))l();else{var B=0,I,G=!1;A.forEach(function(C,R){C=R.name.toLowerCase();"diagram/diagram.xml"==C?(G=!0,R.async("string").then(function(T){0==T.indexOf("<mxfile ")?k(T):l()})):0==C.indexOf("versions/")&&(C=parseInt(C.substr(9)),C>B&&(B=C,I=R))});0<B?I.async("string").then(function(C){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(C,
+d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):n.parseFileData(C,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?k(R.responseText):l())}),d.name):l()}):G||l()}},function(A){l(A)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,l))};EditorUi.prototype.importFile=function(d,k,l,n,x,A,B,
+I,G,C,R,T){C=null!=C?C:!0;var S=!1,Q=null,v=mxUtils.bind(this,function(z){var N=null;null!=z&&"<mxlibrary"==z.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,z,B)),this.showSidebar()):N=this.importXml(z,l,n,C,null,null!=T?mxEvent.isControlDown(T):null);null!=I&&I(N)});"image"==k.substring(0,5)?(G=!1,"image/png"==k.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(Q=this.importXml(R,l,n,C,null,null!=T?mxEvent.isControlDown(T):null),G=!0)),G||(G=this.editor.graph,
+R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),C&&G.isGridEnabled()&&(l=G.snap(l),n=G.snap(n)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==k.substring(0,9)&&(R+="editableCssRules=.*;"),Q=[G.insertVertex(null,null,"",l,n,x,A,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(S=!0,this.importGraphML(d,v)):null!=G&&null!=B&&EditorUi.isVisioFilename(B)?(S=!0,this.importVisio(G,v)):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(S=!0,k=mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?v(z.responseText):null!=I&&(I(null),this.showError(mxResources.get("error"),413==z.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,k,B):this.parseFile(G,k,B)):0==d.indexOf("PK")&&null!=G?(S=!0,this.importZipFile(G,v,mxUtils.bind(this,function(){Q=
+this.insertTextAt(this.validateFileData(d),l,n,!0,null,C);I(Q)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(Q=this.insertTextAt(this.validateFileData(d),l,n,!0,null,C,null,null!=T?mxEvent.isControlDown(T):null));S||null==I||I(Q);return Q};EditorUi.prototype.importFiles=function(d,k,l,n,x,A,B,I,G,C,R,T,S){n=null!=n?n:this.maxImageSize;C=null!=C?C:this.maxImageBytes;var Q=null!=k&&null!=l,v=!0;k=null!=k?k:0;l=null!=l?l:0;var z=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var N=R||
+this.resampleThreshold,J=0;J<d.length;J++)if("image/svg"!==d[J].type.substring(0,9)&&"image/"===d[J].type.substring(0,6)&&d[J].size>N){z=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[d],"x",[k],"y",[l],"maxSize",[n],"maxBytes",[C],"resampleThreshold",[this.resampleThreshold],"largeImages",[z],"crop",[Q],"resizeImages",[v],"ignoreEmbeddedXml",[T],"evt",[S]);var K=mxUtils.bind(this,function(){var m=this.editor.graph,t=m.gridSize;x=null!=x?x:mxUtils.bind(this,function(U,V,X,W,Y,Z,aa,
+fa,ea){try{if(null!=U&&"<mxlibrary"==U.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,aa)),this.showSidebar(),null;this.isCompatibleString(U)&&1==d.length&&null!=S&&"drop"==S.type&&this.isBlankFile()&&!this.canUndo()&&(Q=!1,W=X=0);return this.importFile(U,V,X,W,Y,Z,aa,fa,ea,Q,T,S)}catch(ca){return this.handleError(ca),null}});A=null!=A?A:mxUtils.bind(this,function(U){m.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var D=
+d.length,M=D,L=[],O=mxUtils.bind(this,function(U,V){L[U]=V;if(0==--M){this.spinner.stop();if(null!=I)I(L);else{var X=[];m.getModel().beginUpdate();try{for(U=0;U<L.length;U++){var W=L[U]();null!=W&&(X=X.concat(W))}}finally{m.getModel().endUpdate()}}A(X)}}),P=0;P<D;P++)mxUtils.bind(this,function(U){var V=d[U];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),
+Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),fa=mxUtils.parseXml(aa),ea=fa.getElementsByTagName("svg");if(0<ea.length){var ca=ea[0],ha=T?null:ca.getAttribute("content");null!=ha&&"<"!=ha.charAt(0)&&"%"!=ha.charAt(0)&&(ha=unescape(window.atob?atob(ha):Base64.decode(ha,!0)));null!=ha&&"%"==ha.charAt(0)&&(ha=decodeURIComponent(ha));null==ha||"<mxfile "!==ha.substring(0,8)&&"<mxGraphModel>"!==ha.substring(0,14)&&"<mxGraphModel "!==ha.substring(0,14)?O(U,mxUtils.bind(this,function(){try{if(null!=
+fa){var ia=fa.getElementsByTagName("svg");if(0<ia.length){var la=ia[0],da=la.getAttribute("width"),ra=la.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;ra=null!=ra&&"%"!=ra.charAt(ra.length-1)?parseFloat(ra):NaN;var pa=la.getAttribute("viewBox");if(null==pa||0==pa.length)la.setAttribute("viewBox","0 0 "+da+" "+ra);else if(isNaN(da)||isNaN(ra)){var sa=pa.split(" ");3<sa.length&&(da=parseFloat(sa[2]),ra=parseFloat(sa[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(la));
+var va=Math.min(1,Math.min(n/Math.max(1,da)),n/Math.max(1,ra)),ja=x(Y,V.type,k+U*t,l+U*t,Math.max(1,Math.round(da*va)),Math.max(1,Math.round(ra*va)),V.name);if(null!=ja&&(isNaN(da)||isNaN(ra))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){da=Math.max(1,ma.width);ra=Math.max(1,ma.height);ja[0].geometry.width=da;ja[0].geometry.height=ra;la.setAttribute("viewBox","0 0 "+da+" "+ra);Y=Editor.createSvgDataUri(mxUtils.getXml(la));var wa=Y.indexOf(";");0<wa&&(Y=Y.substring(0,wa)+Y.substring(Y.indexOf(",",
+wa+1)));m.setCellStyles("image",Y,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(la))}return ja}}}catch(wa){}return null})):O(U,mxUtils.bind(this,function(){return x(ha,"text/xml",k+U*t,l+U*t,0,0,V.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var ka=T?null:this.extractGraphModelFromPng(W.target.result);if(null!=ka&&0<ka.length){var ba=new Image;ba.src=W.target.result;O(U,mxUtils.bind(this,function(){return x(ka,"text/xml",k+U*t,l+U*t,ba.width,
+ba.height,V.name)}));Z=!0}}Z||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(W.target.result,mxUtils.bind(this,function(ia){this.resizeImage(ia,W.target.result,mxUtils.bind(this,function(la,da,ra){O(U,mxUtils.bind(this,function(){if(null!=la&&la.length<
+C){var pa=v&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(n/da,n/ra)):1;return x(la,V.type,k+U*t,l+U*t,Math.round(da*pa),Math.round(ra*pa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,n,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,x(Y,V.type,k+U*t,l+U*t,240,160,V.name,function(ia){O(U,function(){return ia})},V)}catch(ia){O(U,mxUtils.bind(this,function(){return null})),
+null!=window.console&&console.error(ia,V)}else O(U,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?x(null,V.type,k+U*t,l+U*t,240,160,V.name,function(W){O(U,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(P)});if(z){z=[];for(J=0;J<d.length;J++)z.push(d[J]);d=z;this.confirmImageResize(function(m){v=m;K()},G)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,k){k=null!=k?k:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(A,B){if(A||k)mxSettings.setResizeImages(A?B:null),mxSettings.save();l();d(B)};null==n||k?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(A){x(A,
+!0)},function(A){x(A,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(d,k,l){l=null!=l?l:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,k,l)});n.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,k,l){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){k(n)};n.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(d,k){k=null!=k?k:this.resampleThreshold;return d>k};EditorUi.prototype.resizeImage=function(d,k,l,n,x,A,
+B){x=null!=x?x:this.maxImageSize;var I=Math.max(1,d.width),G=Math.max(1,d.height),C=k;if(n&&this.isResampleImageSize(null!=B?B:k.length,A))try{var R=Math.max(I/x,G/x);if(1<R){var T=Math.round(I/R),S=Math.round(G/R),Q=document.createElement("canvas");Q.width=T;Q.height=S;Q.getContext("2d").drawImage(d,0,0,T,S);var v=Q.toDataURL();if(v.length<k.length){var z=document.createElement("canvas");z.width=T;z.height=S;var N=z.toDataURL();v!==N&&(k=v,I=T,G=S)}}}catch(J){}n&&C!=k&&x>this.maxImageSize/2&&k.length>
+this.maxImageBytes?this.resizeImage(d,k,l,n,x/1.5,A,B):l(k,I,G)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,k,l){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;k(n)};null!=l&&(n.onerror=l);n.src=d}catch(x){if(null!=l)l(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
urlParams.rough:d)};var p=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());p.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=
EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,k=this.editor.graph,l=k.isEnabled;k.isEnabled=function(){return l.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(k.panningHandler.isPanningTrigger=function(t){var D=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(D)&&!k.freehand.isDrawing()||mxEvent.isPopupTrigger(D)&&(null==t.getState()||mxEvent.isControlDown(D)||mxEvent.isShiftDown(D))});
-k.cellEditor.editPlantUmlData=function(t,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(O,L.format,function(P,T,V){d.spinner.stop();k.getModel().beginUpdate();try{if("txt"==L.format)k.labelChanged(t,"<pre>"+P+"</pre>"),k.updateCellSize(t,!0);else{k.setCellStyles("image",d.convertDataUri(P),[t]);var X=k.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=T,X.height=V,k.cellsResized([t],
-[X],!1))}k.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:O,format:L.format}))}finally{k.getModel().endUpdate()}},function(P){d.handleError(P)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};k.cellEditor.editMermaidData=function(t,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(O,L.config,function(P,T,V){d.spinner.stop();
-k.getModel().beginUpdate();try{k.setCellStyles("image",P,[t]);var X=k.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=Math.max(X.width,T),X.height=Math.max(X.height,V),k.cellsResized([t],[X],!1));k.setAttributeForCell(t,"mermaidData",JSON.stringify({data:O,config:L.config},null,2))}finally{k.getModel().endUpdate()}},function(P){d.handleError(P)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};var n=k.cellEditor.startEditing;k.cellEditor.startEditing=
+k.cellEditor.editPlantUmlData=function(t,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(O,L.format,function(P,U,V){d.spinner.stop();k.getModel().beginUpdate();try{if("txt"==L.format)k.labelChanged(t,"<pre>"+P+"</pre>"),k.updateCellSize(t,!0);else{k.setCellStyles("image",d.convertDataUri(P),[t]);var X=k.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=U,X.height=V,k.cellsResized([t],
+[X],!1))}k.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:O,format:L.format}))}finally{k.getModel().endUpdate()}},function(P){d.handleError(P)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};k.cellEditor.editMermaidData=function(t,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(O,L.config,function(P,U,V){d.spinner.stop();
+k.getModel().beginUpdate();try{k.setCellStyles("image",P,[t]);var X=k.model.getGeometry(t);null!=X&&(X=X.clone(),X.width=Math.max(X.width,U),X.height=Math.max(X.height,V),k.cellsResized([t],[X],!1));k.setAttributeForCell(t,"mermaidData",JSON.stringify({data:O,config:L.config},null,2))}finally{k.getModel().endUpdate()}},function(P){d.handleError(P)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};var n=k.cellEditor.startEditing;k.cellEditor.startEditing=
function(t,D){try{var M=this.graph.getAttributeForCell(t,"plantUmlData");if(null!=M)this.editPlantUmlData(t,D,M);else if(M=this.graph.getAttributeForCell(t,"mermaidData"),null!=M&&window.isMermaidEnabled)this.editMermaidData(t,D,M);else{var L=k.getCellStyle(t);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(t):n.apply(this,arguments)}}catch(O){d.handleError(O)}};k.getLinkTitle=function(t){return d.getLinkTitle(t)};k.customLinkClicked=function(t,D){var M=!1;try{var L=this.getGraphBounds();
-d.handleCustomLink(t,D);M=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(D))}catch(O){d.handleError(O)}return M};var x=k.parseBackgroundImage;k.parseBackgroundImage=function(t){var D=x.apply(this,arguments);null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src});return D};var z=k.setBackgroundImage;k.setBackgroundImage=function(t){null!=t&&null!=t.originalSrc&&(t=d.createImageForPageLink(t.originalSrc,d.currentPage,this));z.apply(this,
+d.handleCustomLink(t,D);M=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(D))}catch(O){d.handleError(O)}return M};var x=k.parseBackgroundImage;k.parseBackgroundImage=function(t){var D=x.apply(this,arguments);null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src});return D};var A=k.setBackgroundImage;k.setBackgroundImage=function(t){null!=t&&null!=t.originalSrc&&(t=d.createImageForPageLink(t.originalSrc,d.currentPage,this));A.apply(this,
arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){k.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){k.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(t,D){t=null!=k.backgroundImage?k.backgroundImage.originalSrc:null;if(null!=t){var M=t.indexOf(",");if(0<M)for(t=t.substring(M+1),D=D.getProperty("patches"),M=0;M<D.length;M++)if(null!=D[M][EditorUi.DIFF_UPDATE]&&null!=D[M][EditorUi.DIFF_UPDATE][t]||
null!=D[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(D[M][EditorUi.DIFF_REMOVE],t)){k.refreshBackgroundImage();break}}}));var B=k.getBackgroundImageObject;k.getBackgroundImageObject=function(t,D,M){var L=B.apply(this,arguments);null!=L&&null!=L.originalSrc&&(L=D?d.createImageForPageLink(L.originalSrc,M,null,!0):{src:L.originalSrc});return L};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||
-/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(t){t=null!=t?t:"";"1"==urlParams.dev&&(t+=(0<t.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var H=k.addClickHandler;k.addClickHandler=function(t,D,M){var L=D;D=function(O,P,T){if(null==P){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(P=V.getAttribute("href"))}null!=P&&k.isCustomLink(P)&&(mxEvent.isTouchEvent(O)||
-!mxEvent.isPopupTrigger(O))&&k.customLinkClicked(P,T)&&mxEvent.consume(O);null!=L&&L(O,P,T)};H.call(this,t,D,M)};q.apply(this,arguments);this.editor.graph.addSvgShadow(k.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(t,D,M){k.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(t,["zoomIn","zoomOut","-"],null,M);C.apply(this,arguments);k.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(t,
+/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(t){t=null!=t?t:"";"1"==urlParams.dev&&(t+=(0<t.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var G=k.addClickHandler;k.addClickHandler=function(t,D,M){var L=D;D=function(O,P,U){if(null==P){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(P=V.getAttribute("href"))}null!=P&&k.isCustomLink(P)&&(mxEvent.isTouchEvent(O)||
+!mxEvent.isPopupTrigger(O))&&k.customLinkClicked(P,U)&&mxEvent.consume(O);null!=L&&L(O,P,U)};G.call(this,t,D,M)};q.apply(this,arguments);this.editor.graph.addSvgShadow(k.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(t,D,M){k.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(t,["zoomIn","zoomOut","-"],null,M);C.apply(this,arguments);k.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(t,
["-","addToScratchpad"],null,M);k.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(t,["-","exitGroup","home"],null,M)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(t,D,M){if(d.editor.graph.isSelectionEmpty())R.apply(this,arguments),d.menus.addMenuItems(t,["copyAsImage","copyAsSvg"],null,M);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(t,D,M):this.addPopupMenuArrangeItems(t,D,M),this.addMenuItems(t,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),
null,M),this.isShowCellEditItems()||this.addPopupDeleteItem(t,D,M),this.addMenuItems(t,["lockUnlock","-"],null,M),!this.isShowStyleItems()){if(1==k.getSelectionCount()&&!k.isCellLocked(D)&&k.isCellEditable(D)&&(this.addSubmenu("editCell",t,null,mxResources.get("edit")),t.addSeparator(),k.getModel().isEdge(D))){this.addSubmenu("line",t);var L=k.getModel().getGeometry(D);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(t,["clearWaypoints"],null,M)}1==k.getSelectionCount()&&this.addMenuItems(t,
["enterGroup"],null,M);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(t,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(t,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,
-function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=k.getExportVariables;k.getExportVariables=function(){var t=U.apply(this,arguments),D=d.getCurrentFile();null!=D&&(t.filename=D.getTitle());t.pagecount=null!=d.pages?d.pages.length:1;t.page=null!=d.currentPage?d.currentPage.getName():"";t.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return t};var S=k.getGlobalVariable;k.getGlobalVariable=
+function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var T=k.getExportVariables;k.getExportVariables=function(){var t=T.apply(this,arguments),D=d.getCurrentFile();null!=D&&(t.filename=D.getTitle());t.pagecount=null!=d.pages?d.pages.length:1;t.page=null!=d.currentPage?d.currentPage.getName():"";t.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return t};var S=k.getGlobalVariable;k.getGlobalVariable=
function(t){var D=d.getCurrentFile();return"filename"==t&&null!=D?D.getTitle():"page"==t&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==t?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==t?null!=d.pages?d.pages.length:1:S.apply(this,arguments)};var Q=null,v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var t=this.getCurrentFile(),D=null!=t&&null!=t.getTitle()?t.getTitle():this.defaultFilename;Q!=D&&t==v&&(k.invalidateDescendantsWithPlaceholders(k.model.getRoot()),
-k.view.validate());Q=D;v=t}));var A=k.labelLinkClicked;k.labelLinkClicked=function(t,D,M){var L=D.getAttribute("href");if(null==L||!k.isCustomLink(L)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))A.apply(this,arguments);else{if(!k.isEnabled()||null!=t&&k.isCellLocked(t.cell))k.customLinkClicked(L),k.getRubberband().reset();mxEvent.consume(M)}};this.editor.getOrCreateFilename=function(){var t=d.defaultFilename,D=d.getCurrentFile();null!=D&&(t=null!=D.getTitle()?D.getTitle():t);return t};var N=
+k.view.validate());Q=D;v=t}));var z=k.labelLinkClicked;k.labelLinkClicked=function(t,D,M){var L=D.getAttribute("href");if(null==L||!k.isCustomLink(L)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))z.apply(this,arguments);else{if(!k.isEnabled()||null!=t&&k.isCellLocked(t.cell))k.customLinkClicked(L),k.getRubberband().reset();mxEvent.consume(M)}};this.editor.getOrCreateFilename=function(){var t=d.defaultFilename,D=d.getCurrentFile();null!=D&&(t=null!=D.getTitle()?D.getTitle():t);return t};var N=
this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone);N.visible=N.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,
!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),k.addListener(mxEvent.ESCAPE,function(t,D){null!=
D&&k.isEnabled()&&!k.isEditing()&&null!=D.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&k.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(t){var D=k.cellEditor.text2,M=null;null!=D&&(mxEvent.addListener(D,"dragleave",function(L){null!=M&&(M.parentNode.removeChild(M),M=null);L.stopPropagation();L.preventDefault()}),
-mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(L){null==M&&(M=this.highlightElement(D));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(L){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(P,T,V,X,W,Y){k.insertImage(P,W,Y)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var T=0;T<P.length;T++)P[T]()},mxEvent.isControlDown(L));
-else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var O=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(P){var T=Math.max(1,P.width);P=Math.max(1,P.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,T)),V/Math.max(1,P));k.insertImage(decodeURIComponent(O),T*V,P*V)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,
+mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(L){null==M&&(M=this.highlightElement(D));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(L){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(P,U,V,X,W,Y){k.insertImage(P,W,Y)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var U=0;U<P.length;U++)P[U]()},mxEvent.isControlDown(L));
+else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var O=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(P){var U=Math.max(1,P.width);P=Math.max(1,P.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,U)),V/Math.max(1,P));k.insertImage(decodeURIComponent(O),U*V,P*V)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,
"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){N=this.editor.graph.view;var J=mxSettings.getUnit();N.setUnit(J);Editor.pageSizeUnit=J==mxConstants.METERS?mxConstants.MILLIMETERS:J;N.addListener("unitChanged",function(t,D){t=D.getProperty("unit");mxSettings.setUnit(t);
mxSettings.save();Editor.pageSizeUnit=t==mxConstants.METERS?mxConstants.MILLIMETERS:t});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,N.unit);this.refresh()}if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",
this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,D){0<this.editor.graph.getSelectionCount()?
(t=this.editor.graph.getSelectionCell(),t=this.editor.graph.getModel().getStyle(t),this.styleInput.value=t||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==this.styleInput?!0:K.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var m=null;mxEvent.addListener(k.container,
"dragleave",function(t){k.isEnabled()&&(null!=m&&(m.parentNode.removeChild(m),m=null),t.stopPropagation(),t.preventDefault())});mxEvent.addListener(k.container,"dragover",mxUtils.bind(this,function(t){null==m&&(m=this.highlightElement(k.container));null!=this.sidebar&&this.sidebar.hideTooltip();t.stopPropagation();t.preventDefault()}));mxEvent.addListener(k.container,"drop",mxUtils.bind(this,function(t){null!=m&&(m.parentNode.removeChild(m),m=null);if(k.isEnabled()){var D=mxUtils.convertPoint(k.container,
-mxEvent.getClientX(t),mxEvent.getClientY(t)),M=t.dataTransfer.files,L=k.view.translate,O=k.view.scale,P=D.x/O-L.x,T=D.y/O-L.y;if(0<M.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(t)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(t)&&(T=P=null),this.importFiles(M,P,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(t),null,null,mxEvent.isShiftDown(t),t));else{mxEvent.isAltDown(t)&&(T=P=0);var V=0<=mxUtils.indexOf(t.dataTransfer.types,
-"text/uri-list")?t.dataTransfer.getData("text/uri-list"):null;D=this.extractGraphModelFromEvent(t,null!=this.pages);if(null!=D)k.setSelectionCells(this.importXml(D,P,T,!0));else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/html")){var X=t.dataTransfer.getData("text/html");D=document.createElement("div");D.innerHTML=Graph.sanitizeHtml(X);var W=null;M=D.getElementsByTagName("img");null!=M&&1==M.length?(X=M[0].getAttribute("src"),null==X&&(X=M[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||
-(W=!0)):(M=D.getElementsByTagName("a"),null!=M&&1==M.length?X=M[0].getAttribute("href"):(D=D.getElementsByTagName("pre"),null!=D&&1==D.length&&(X=mxUtils.getTextContent(D[0]))));var Y=!0,Z=mxUtils.bind(this,function(){k.setSelectionCells(this.insertTextAt(X,P,T,!0,W,null,Y,mxEvent.isControlDown(t)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(t)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),
-mxUtils.bind(this,function(aa){var fa=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,fa)),ea/Math.max(1,aa));k.setSelectionCell(k.insertVertex(null,null,"",P,T,fa*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(aa){k.setSelectionCells(this.insertTextAt(V,P,T,!0))})):0<=mxUtils.indexOf(t.dataTransfer.types,"text/plain")&&
-k.setSelectionCells(this.insertTextAt(t.dataTransfer.getData("text/plain"),P,T,!0))}}t.stopPropagation();t.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",
+mxEvent.getClientX(t),mxEvent.getClientY(t)),M=t.dataTransfer.files,L=k.view.translate,O=k.view.scale,P=D.x/O-L.x,U=D.y/O-L.y;if(0<M.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(t)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(t)&&(U=P=null),this.importFiles(M,P,U,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(t),null,null,mxEvent.isShiftDown(t),t));else{mxEvent.isAltDown(t)&&(U=P=0);var V=0<=mxUtils.indexOf(t.dataTransfer.types,
+"text/uri-list")?t.dataTransfer.getData("text/uri-list"):null;D=this.extractGraphModelFromEvent(t,null!=this.pages);if(null!=D)k.setSelectionCells(this.importXml(D,P,U,!0));else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/html")){var X=t.dataTransfer.getData("text/html");D=document.createElement("div");D.innerHTML=Graph.sanitizeHtml(X);var W=null;M=D.getElementsByTagName("img");null!=M&&1==M.length?(X=M[0].getAttribute("src"),null==X&&(X=M[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||
+(W=!0)):(M=D.getElementsByTagName("a"),null!=M&&1==M.length?X=M[0].getAttribute("href"):(D=D.getElementsByTagName("pre"),null!=D&&1==D.length&&(X=mxUtils.getTextContent(D[0]))));var Y=!0,Z=mxUtils.bind(this,function(){k.setSelectionCells(this.insertTextAt(X,P,U,!0,W,null,Y,mxEvent.isControlDown(t)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(t)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),
+mxUtils.bind(this,function(aa){var fa=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,fa)),ea/Math.max(1,aa));k.setSelectionCell(k.insertVertex(null,null,"",P,U,fa*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(aa){k.setSelectionCells(this.insertTextAt(V,P,U,!0))})):0<=mxUtils.indexOf(t.dataTransfer.types,"text/plain")&&
+k.setSelectionCells(this.insertTextAt(t.dataTransfer.getData("text/plain"),P,U,!0))}}t.stopPropagation();t.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",
function(){mxClient.IS_SF&&k.view.validateBackground()});k.addListener("enabledChanged",mxUtils.bind(this,function(){k.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var t=parseInt(this.div.offsetLeft),D=parseInt(this.div.offsetWidth),M=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),P=d.embedViewport.y+d.embedViewport.height;
this.div.style.left=Math.max(d.embedViewport.x,Math.min(t,M-D))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,P-O))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(N=Editor.currentTheme,"simple"==N||"sketch"==N)this.doSetCurrentTheme(N,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():
(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));N=!1;if(null!=urlParams.dark)N=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)N="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||N&&"auto"!=mxSettings.settings.darkMode||(N=mxSettings.settings.darkMode);"auto"==N&&this.isAutoDarkModeSupported()&&(N=window.matchMedia("(prefers-color-scheme: dark)").matches);
@@ -13126,16 +13128,16 @@ this.setDarkMode("string"===typeof N?"1"==N:N);if(this.isAutoDarkModeSupported()
Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(t,D){k.enableFlowAnimation=Editor.enableAnimations;k.refresh()}));k.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=
0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var u=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,k=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=k&&d<k?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<
k&&d>=k&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=d}u.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,k=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C)),
-this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var z=null,B=null,I=null,H=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){H=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(C);
-n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);z=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var R=!1;null!=z&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(C)-
-z)+"px",R=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,H+mxEvent.getClientY(C)-B)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(C){null==z&&null==B||mxEvent.consume(C);B=z=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility=
+this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var A=null,B=null,I=null,G=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(C);
+n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);A=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var R=!1;null!=A&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(C)-
+A)+"px",R=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-B)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(C){null==A&&null==B||mxEvent.consume(C);B=A=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility=
"hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";k.style.visibility="hidden";d.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(C){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility=
"hidden";this.rightResizer.style.visibility="hidden";k.style.visibility="hidden";d.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var k=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect",
"off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=
-!0;l.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(z){var B=mxEvent.getSource(z);null==k.container||!k.isEnabled()||k.isMouseDown||k.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=z.keyCode&&(mxClient.IS_MAC||17!=z.keyCode)&&(!mxClient.IS_MAC||91!=z.keyCode&&93!=z.keyCode)||
-n||(l.style.left=k.container.scrollLeft+10+"px",l.style.top=k.container.scrollTop+10+"px",z=k.container.scrollLeft,B=k.container.scrollTop,k.container.appendChild(l),n=!0,l.focus(),document.execCommand("selectAll",!1,null),k.container.scrollLeft=z,k.container.scrollTop=B)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(z){var B=z.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=B&&17!=B&&91!=B&&93!=B||(n=!1,k.isEditing()||null!=this.dialog||null==k.container||k.container.focus(),
-l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(z){if(k.isEnabled())try{mxClipboard.copy(k),this.copyCells(l),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(z){if(k.isEnabled())try{mxClipboard.copy(k),this.copyCells(l,!0),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(z){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent()))try{if(l.innerHTML=
-"&nbsp;",l.focus(),null!=z.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(z,l,!0,!0)),!mxEvent.isConsumed(z)){var B=k.container.scrollLeft,I=k.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{k.container.scrollLeft=B,k.container.scrollTop=I,Graph.removePasteFormatting(l.firstChild),this.pasteCells(z,l,!1,!0)}catch(H){this.handleError(H)}}),0)}}catch(H){this.handleError(H)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(z){return mxEvent.getSource(z)==
+!0;l.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(A){var B=mxEvent.getSource(A);null==k.container||!k.isEnabled()||k.isMouseDown||k.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=A.keyCode&&(mxClient.IS_MAC||17!=A.keyCode)&&(!mxClient.IS_MAC||91!=A.keyCode&&93!=A.keyCode)||
+n||(l.style.left=k.container.scrollLeft+10+"px",l.style.top=k.container.scrollTop+10+"px",A=k.container.scrollLeft,B=k.container.scrollTop,k.container.appendChild(l),n=!0,l.focus(),document.execCommand("selectAll",!1,null),k.container.scrollLeft=A,k.container.scrollTop=B)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(A){var B=A.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=B&&17!=B&&91!=B&&93!=B||(n=!1,k.isEditing()||null!=this.dialog||null==k.container||k.container.focus(),
+l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(A){if(k.isEnabled())try{mxClipboard.copy(k),this.copyCells(l),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(A){if(k.isEnabled())try{mxClipboard.copy(k),this.copyCells(l,!0),d()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(A){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent()))try{if(l.innerHTML=
+"&nbsp;",l.focus(),null!=A.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(A,l,!0,!0)),!mxEvent.isConsumed(A)){var B=k.container.scrollLeft,I=k.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{k.container.scrollLeft=B,k.container.scrollTop=I,Graph.removePasteFormatting(l.firstChild),this.pasteCells(A,l,!1,!0)}catch(G){this.handleError(G)}}),0)}}catch(G){this.handleError(G)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(A){return mxEvent.getSource(A)==
l?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,k){mxSettings.setUi(d);(k=this.doSetCurrentTheme(d)||k)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,k){if(null==d||""==d)d=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(d)||this.isDefaultTheme(Editor.currentTheme)&&
"simple"==d||d==Editor.currentTheme;if(l||k)k=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=d,this.switchTheme(d),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(k);return l};EditorUi.prototype.saveScrollState=function(d){var k=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?
(l-=this.embedViewport.x,n-=this.embedViewport.y):(l+=this.embedViewport.x,n+=this.embedViewport.y));k={x:l,y:n,tx:k.x,ty:k.y};d&&(k.boundingRect=this.diagramContainer.getBoundingClientRect());return k};EditorUi.prototype.restoreScrollState=function(d){var k=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=d.boundingRect){var n=this.diagramContainer.getBoundingClientRect();d.x-=d.boundingRect.x-n.x;d.y-=d.boundingRect.y-n.y}this.diagramContainer.scrollLeft=d.x+(l.x-d.tx)*k;
@@ -13151,17 +13153,17 @@ Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(d){};EditorU
k.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==k.sync||k.sync.isConnected()?k.isRealtimeEnabled()&&k.isRealtimeSupported()&&1<k.getRealtimeState()&&(d=k.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){null!=this.statusContainer&&
(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,
k,l,n){l=null!=l?l:"geButton";var x=this.menus.get(d);n=this.menubar.addMenu(mxResources.get(d),x.funct,null,n);n.className=l;n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(x,n,l);null!=k&&(n.style.backgroundImage="url("+k+")",n.innerText="");return n};EditorUi.prototype.addButton=function(d,k,l,n){d=this.createToolbarButton(d,k,l);n=null!=n?n:this.container;n.appendChild(d);return d};EditorUi.prototype.createToolbarButton=function(d,k,l){var n=document.createElement("a");n.className=
-"geButton";null!=d&&"data:"==d.substring(0,5)&&(n.style.backgroundImage="url("+d+")");null!=k&&n.setAttribute("title",k);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(d,k,l){var n=this.actions.get(d),x=null!=n?n.funct:null,z=this.createToolbarButton(k,mxResources.get(d)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(d=function(){n.isEnabled()?
-z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",d),n.addListener("stateChanged",d),d());return z};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=this,k=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),
-k,60,240,l,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=
-x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");d.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var z=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>z||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var y=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var k=this.formatWindow;null!=k?k.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):
-y.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){if(this.isShapesPanelVisible()!=d){var k=EditorUi.prototype.hsplitPosition;0==k&&(k=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),x=d?k:0,z=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");
-0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+z+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,
-"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*z)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var G=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():G.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var k=mxUtils.bind(this,function(B,I){var H=this.menus.get(B);B=this.createMenuElement(I,
-mxUtils.bind(this,function(){H.funct.apply(this,arguments)}));B.setAttribute("title",I);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";d.parentNode.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))k=document.createElement("div"),k.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",
+"geButton";null!=d&&"data:"==d.substring(0,5)&&(n.style.backgroundImage="url("+d+")");null!=k&&n.setAttribute("title",k);null!=l&&mxEvent.addListener(n,"click",function(x){"disabled"!=n.getAttribute("disabled")&&l(x);mxEvent.consume(x)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(d,k,l){var n=this.actions.get(d),x=null!=n?n.funct:null,A=this.createToolbarButton(k,mxResources.get(d)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),x);null==n||l||(d=function(){n.isEnabled()?
+A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",d),n.addListener("stateChanged",d),d());return A};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=this,k=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),
+k,60,240,l,mxUtils.bind(this,function(A){A.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,x=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=
+x+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");d.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(A){mxEvent.getSource(A)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var A=
+window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>A||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var y=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var k=this.formatWindow;null!=k?k.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):
+y.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){if(this.isShapesPanelVisible()!=d){var k=EditorUi.prototype.hsplitPosition;0==k&&(k=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),x=d?k:0,A=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");
+0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+A+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,
+"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*A)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var H=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var k=mxUtils.bind(this,function(B,I){var G=this.menus.get(B);B=this.createMenuElement(I,
+mxUtils.bind(this,function(){G.funct.apply(this,arguments)}));B.setAttribute("title",I);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";d.parentNode.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))k=document.createElement("div"),k.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",
k.className="geButton",k.style.left="0px",k.style.right="50%",mxUtils.write(k,mxResources.get("newLibrary")),d.appendChild(k),mxEvent.addListener(k,"click",this.actions.get("newLibrary").funct),k=k.cloneNode(!1),k.style.left="50%",k.style.right="0px",mxUtils.write(k,mxResources.get("openLibrary")),d.appendChild(k),mxEvent.addListener(k,"click",this.actions.get("openLibrary").funct);else{var l=k("newLibrary","");l.style.left="0px";l.style.right="50%";var n=document.createElement("span");l.appendChild(n);
-var x=k("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var z=document.createElement("span");x.appendChild(z);this.dependsOnLanguage(mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));z.innerHTML="";mxUtils.write(z,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);d.style.overflow=
+var x=k("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var A=document.createElement("span");x.appendChild(A);this.dependsOnLanguage(mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));A.innerHTML="";mxUtils.write(A,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);d.style.overflow=
"hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),k="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-
k)/2):56,d-6,k-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=
function(d){var k=d;"auto"==d&&(k=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(k);mxSettings.settings.darkMode=d;mxSettings.save();d=mxSettings.getUi();null==urlParams.ui&&"dark"==d&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(d){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(d),mxSettings.save(),mxClient.language=d,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,
@@ -13173,7 +13175,7 @@ null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TA
d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,k){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,Editor.isSettingsEnabled()&&k&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),
(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,k=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)k.style.left="10px",k.style.top="10px",l.style.left="10px",l.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",
this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");
-var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var z=parseInt(x[2]);x=parseInt(x[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,n.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||
+var x=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];var A=parseInt(x[2]);x=parseInt(x[3]);A=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,A):A,n.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,n.height-80);this.diagramContainer.style.width=A+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||
window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}k.style.left=this.diagramContainer.offsetLeft+"px";k.style.top=this.diagramContainer.offsetTop-k.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=k.style.top;d.style.right=
"";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-
this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;k.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=
@@ -13188,126 +13190,126 @@ k)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled())
d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(k,l){mxSettings.setPageFormat(d.pageFormat);mxSettings.save()}));d.view.defaultDarkGridColor=mxSettings.getGridColor(!0);d.view.defaultGridColor=mxSettings.getGridColor(!1);d.view.gridColor="light-dark("+d.view.defaultGridColor+", "+d.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(k,l){mxSettings.setGridColor(d.view.defaultGridColor,
!1);mxSettings.setGridColor(d.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(k,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",
mxUtils.bind(this,function(k,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
-mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.writeImageToClipboard=function(d,k,l,n,x,z){n=null!=n?n:"image/png";var B=null==k||null==l?'<img src="'+d+'">':'<img src="'+d+'" width="'+k+'" height="'+l+'">',I={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(I[n]=this.base64ToBlob(d.substring(d.indexOf(",")+1),n));var H=new ClipboardItem(I);
-navigator.clipboard.write([H]).then(x)["catch"](z);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[d],"w",k,"h",l,"type",n,"html",[B],"data",[I],"item",[H])};EditorUi.prototype.writeHtmlToClipboard=function(d,k){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(d)],{type:"text/plain"}),"text/html":new Blob([d],{type:"text/html"})})])["catch"](k)};EditorUi.prototype.writeTextToClipboard=function(d,k){navigator.clipboard.writeText(d)["catch"](k)};
-EditorUi.prototype.copySvg=function(d,k,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,null,0<d.length?d:null);n.setAttribute("content",k);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),z=parseInt(n.getAttribute("width")),B=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,z,B,"image/svg+xml",null,mxUtils.bind(this,function(I){this.handleError(I)}))}}catch(I){this.handleError(I)}};
-EditorUi.prototype.copyImage=function(d,k,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var z=this.createImageDataUri(n,k,"png"),B=Math.round(parseInt(x.getAttribute("width"))/l),I=Math.round(parseInt(x.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[d],"xml",[k],"scale",[l]);this.writeImageToClipboard(z,
-B,I,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var H=this.getBaseFilename(!1)+(null!=k?".drawio":"")+".png";this.saveLocalFile(z.substring(z.lastIndexOf(",")+1),H,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,
+mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.writeImageToClipboard=function(d,k,l,n,x,A){n=null!=n?n:"image/png";var B=null==k||null==l?'<img src="'+d+'">':'<img src="'+d+'" width="'+k+'" height="'+l+'">',I={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(n)&&(I[n]=this.base64ToBlob(d.substring(d.indexOf(",")+1),n));var G=new ClipboardItem(I);
+navigator.clipboard.write([G]).then(x)["catch"](A);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[d],"w",k,"h",l,"type",n,"html",[B],"data",[I],"item",[G])};EditorUi.prototype.writeHtmlToClipboard=function(d,k){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(d)],{type:"text/plain"}),"text/html":new Blob([d],{type:"text/html"})})])["catch"](k)};EditorUi.prototype.writeTextToClipboard=function(d,k){navigator.clipboard.writeText(d)["catch"](k)};
+EditorUi.prototype.copySvg=function(d,k,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var n=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,null,0<d.length?d:null);n.setAttribute("content",k);var x=Editor.createSvgDataUri(mxUtils.getXml(n)),A=parseInt(n.getAttribute("width")),B=parseInt(n.getAttribute("height"));this.writeImageToClipboard(x,A,B,"image/svg+xml",null,mxUtils.bind(this,function(I){this.handleError(I)}))}}catch(I){this.handleError(I)}};
+EditorUi.prototype.copyImage=function(d,k,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,x){try{this.spinner.stop();var A=this.createImageDataUri(n,k,"png"),B=Math.round(parseInt(x.getAttribute("width"))/l),I=Math.round(parseInt(x.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[d],"xml",[k],"scale",[l]);this.writeImageToClipboard(A,
+B,I,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var G=this.getBaseFilename(!1)+(null!=k?".drawio":"")+".png";this.saveLocalFile(A.substring(A.lastIndexOf(",")+1),G,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,
null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(d,k){var l=this.editor.graph;if(l.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),x=mxUtils.getXml(l.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(x));k?(l.removeCells(n,!1),l.lastPasteXml=null):(l.lastPasteXml=x,l.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=
-null;if(Editor.enableNativeClipboard){var k=this.editor.graph;k.isSelectionEmpty()||(d=mxUtils.sortCells(k.getExportableCells(k.model.getTopmostCells(k.getSelectionCells()))),k=mxUtils.getXml(k.encodeCells(d)),navigator.clipboard.writeText(k))}return d};EditorUi.prototype.pasteXml=function(d,k,l,n,x,z){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[d],"pasteAsLabel",[k],"compat",[l],"evt",[n],"html",[x],"pt",[z]);x=null!=x?x:!0;var B=this.editor.graph,I=null!=z?z:Editor.pasteAtMousePointer&&B.isMouseInsertPoint()?
-B.getInsertPoint():null;z=null;B.lastPasteXml==d?null==I&&B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var H=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d)){B.model.beginUpdate();try{if(z=this.importXml(d,H,H),null!=I){var C=B.getBoundingBoxFromGeometry(z,!0);if(null!=C){var R=Math.round(B.snap(I.x)),U=Math.round(B.snap(I.y));B.cellsMoved(z,R-C.x,U-C.y)}}}finally{B.model.endUpdate()}B.setSelectionCells(z)}else if(k&&1==B.getSelectionCount()){k=B.getStartEditingCell(B.getSelectionCell(),
-n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,d,[k]);else{B.model.beginUpdate();try{B.labelChanged(k,d),Graph.isLink(d)&&B.setLinkForCell(k,d)}finally{B.model.endUpdate()}}B.setSelectionCell(k)}else I=null!=I?I:B.getInsertPoint(),B.isMouseInsertPoint()&&(H=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),z=this.insertTextAt(d,I.x+H,I.y+H,x),B.setSelectionCells(z);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return z};EditorUi.prototype.pasteCells=function(d,k,l,n){if(!mxEvent.isConsumed(d)){var x=d.clipboardData,z=this.editor.graph,B=!1,I=k;if(l&&null!=x&&x.getData){var H=x.getData("text/plain"),C=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var R=decodeURIComponent(H);this.isCompatibleString(R)&&(C=!0,H=R)}catch(J){}C=C?null:x.getData("text/html");null!=C&&0<C.length?(I=this.parseHtmlData(C),
-B="text/plain"!=I.getAttribute("data-type")):null!=H&&0<H.length&&(I=document.createElement("div"),mxUtils.setTextContent(I,C))}H=I.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))l=H[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(J){var K=this.editor.graph;K.lastPasteXml==J?K.pasteCounter++:(K.lastPasteXml=J,K.pasteCounter=0);var m=K.pasteCounter*K.gridSize;
-K.setSelectionCells(this.importXml(J,m,m));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(J){this.handleError(J)})),mxEvent.consume(d));else{var U=!1,S="";S=B?null!=I.textContent&&"<mxfile"==I.textContent.substring(0,7)&&"</mxfile>"==I.textContent.substring(I.textContent.length-9)||"<mxGraphModel"==I.textContent.substring(0,13)&&"</mxGraphModel>"==I.textContent.substring(I.textContent.length-15)?I.textContent.replace(/\u00a0/g," "):I.innerHTML:mxUtils.trim(null==I.innerText?
-mxUtils.getTextContent(I):I.innerText);try{var Q=S.lastIndexOf("%3E");0<=Q&&Q<S.length-3&&(S=S.substring(0,Q+3))}catch(J){}try{H=I.getElementsByTagName("span"),(R=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(S))&&(this.isCompatibleString(R)||0==R.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(U=!0,S=R)}catch(J){}R=null;try{if(!U&&""==I.textContent)for(Q=0;Q<x.items.length;Q++){var v=x.items[Q];if("file"===v.kind){R=v.getAsFile();break}}}catch(J){}EditorUi.debug("EditorUi.pasteCells",
-[this],"evt",[d],"realElt",[k.outerHTML],"elt",[I.outerHTML],"useEvent",l,"pasteAsLabel",n,"xml",[S],"compat",U,"asHtml",B,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[R]);try{if(U||null==R)if(null!=S&&0<S.length){if(0==S.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var N=mxUtils.bind(this,function(){try{S=(new MiroImporter).importMiroJson(JSON.parse(S)),this.pasteXml(S,n,U,d)}catch(J){console.log("Miro import error:",J)}});
-"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",N):N()}else this.pasteXml(S,n,U,d,B);mxEvent.consume(d)}else l||(z.lastPasteXml=null,z.pasteCounter=0);else{var A=z.getInsertPoint();this.importFiles([R],A.x,A.y,this.maxImageSize);mxEvent.consume(d)}}catch(J){this.handleError(J)}}}k.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(d){var k=this.editor.graph;if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,
-function(l,n,x,z,B){if(null!=l){k.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,d)}finally{k.getModel().endUpdate()}}else l=null!=n?n:null!=x?x:z,null!=l?(d=null!=d?d:k.getInsertPoint(),this.importFiles([l],d.x,d.y,this.maxImageSize)):this.pasteFromLocalClipboard(d)})):this.pasteFromLocalClipboard(d)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(d){var k=this.editor.graph;k.getModel().beginUpdate();try{k.moveCellsTo(mxClipboard.paste(k),d)}finally{k.getModel().endUpdate()}};
-EditorUi.prototype.installImagePasteHandler=function(){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(k){for(var l=null!=k.clipboardData?k.clipboardData:k.originalEvent.clipboardData,n=!1,x=null,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){n=!0;break}for(z=0;z<l.items.length;z++){var B=l.items[z];if("file"===B.kind){x=B.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[k],"data",[l],"items",[l.items.length],"files",
-[l.files.length],"types",[JSON.stringify(l.types)],"containsText",n,"file",[x],"editing",d.isEditing());var I=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(d.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(C,R,U,S,Q,v){d.insertImage(C,Q,v)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var R=0;R<C.length;R++)C[R]()});else{var H=this.editor.graph.getInsertPoint();this.importFiles([x],H.x,H.y,this.maxImageSize)}mxEvent.consume(k)}}catch(C){}});
-if(!mxEvent.isConsumed(k)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(H){this.readTypeFromClipboardData(H,"image/svg+xml",mxUtils.bind(this,function(C){if(null!=C){C=new Blob([C],{type:"image/svg+xml"});var R=this.editor.graph.getInsertPoint();this.importFiles([C],R.x,R.y,this.maxImageSize)}else I()}),"image")}))["catch"](I);else I()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(d){navigator.clipboard.read().then(mxUtils.bind(this,
-function(k){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",k,"types",null!=k&&0<k.length?[JSON.stringify(k[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(k,mxUtils.bind(this,function(l,n){null!=l?d(l):this.readGraphModelFromImageClipboardData(k,mxUtils.bind(this,function(x,z,B){null!=x?d(x):this.readTypeFromClipboardData(k,"text/plain",mxUtils.bind(this,function(I){d(I,z,B,n,k)}))}))}))}catch(l){d(null)}}))["catch"](function(){d(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=
-function(d,k){this.readTypeFromClipboardData(d,"text/html",mxUtils.bind(this,function(l){var n=null,x=null;try{var z=this.parseHtmlData(l);if(null!=z){n="text/plain"!=z.getAttribute("data-type")?z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var B=n.lastIndexOf("%3E");0<=B&&B<n.length-3&&(n=n.substring(0,B+3))}catch(C){}try{null==n&&(l=null,""==z.textContent&&1==z.children.length&&"IMG"==z.firstChild.nodeName&&(l=z.firstChild.getAttribute("src")),null!=l&&0<
-l.length&&("data:image/png;base64,"==l.substring(0,22)?x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&(x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(C){}try{var I=z.getElementsByTagName("span"),H=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(n);this.isCompatibleString(H)&&(n=H)}catch(C){}}}catch(C){}k(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=
-function(d,k){this.readTypeFromClipboardData(d,"image/svg+xml",mxUtils.bind(this,function(l,n){var x=null;try{null!=l&&(x=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(z){}this.isCompatibleString(x)?k(x):this.readTypeFromClipboardData(d,"image/png",mxUtils.bind(this,function(z,B){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+z);this.isCompatibleString(x)?k(x):k(null,n,B)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(d,k,l){var n=!1;if(null!=d&&0<d.length)for(var x=
-0;x<d.length&&!n;x++)(function(z){0<=mxUtils.indexOf(z.types,k)&&(n=!0,z.getType(k).then(mxUtils.bind(this,function(B){if("image/png"==k)B.arrayBuffer().then(function(I){l(btoa(Graph.arrayBufferToString(I)),B)})["catch"](function(){l(null)});else B.text().then(mxUtils.bind(this,function(I){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[d],"type",[k],"result",[I]);l(I,B)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(d[x]);n||l()};EditorUi.prototype.parseHtmlData=
+null;if(Editor.enableNativeClipboard){var k=this.editor.graph;k.isSelectionEmpty()||(d=mxUtils.sortCells(k.getExportableCells(k.model.getTopmostCells(k.getSelectionCells()))),k=mxUtils.getXml(k.encodeCells(d)),navigator.clipboard.writeText(k))}return d};EditorUi.prototype.pasteXml=function(d,k,l,n,x,A){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[d],"pasteAsLabel",[k],"compat",[l],"evt",[n],"html",[x],"pt",[A]);x=null!=x?x:!0;var B=this.editor.graph,I=null!=A?A:Editor.pasteAtMousePointer&&B.isMouseInsertPoint()?
+B.getInsertPoint():null;A=null;B.lastPasteXml==d?null==I&&B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var G=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d)){B.model.beginUpdate();try{if(A=this.importXml(d,G,G),null!=I){var C=B.getBoundingBoxFromGeometry(A,!0);if(null!=C){var R=Math.round(B.snap(I.x)),T=Math.round(B.snap(I.y));B.cellsMoved(A,R-C.x,T-C.y)}}}finally{B.model.endUpdate()}B.setSelectionCells(A)}else if(k&&1==B.getSelectionCount()){k=B.getStartEditingCell(B.getSelectionCell(),
+n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,d,[k]);else{B.model.beginUpdate();try{B.labelChanged(k,d),Graph.isLink(d)&&B.setLinkForCell(k,d)}finally{B.model.endUpdate()}}B.setSelectionCell(k)}else I=null!=I?I:B.getInsertPoint(),B.isMouseInsertPoint()&&(G=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),A=this.insertTextAt(d,I.x+G,I.y+G,x),B.setSelectionCells(A);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,k,l,n){if(!mxEvent.isConsumed(d)){var x=d.clipboardData,A=this.editor.graph,B=!1,I=k;if(l&&null!=x&&x.getData){var G=x.getData("text/plain"),C=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var R=decodeURIComponent(G);this.isCompatibleString(R)&&(C=!0,G=R)}catch(J){}C=C?null:x.getData("text/html");null!=C&&0<C.length?(I=this.parseHtmlData(C),
+B="text/plain"!=I.getAttribute("data-type")):null!=G&&0<G.length&&(I=document.createElement("div"),mxUtils.setTextContent(I,C))}G=I.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))l=G[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(J){var K=this.editor.graph;K.lastPasteXml==J?K.pasteCounter++:(K.lastPasteXml=J,K.pasteCounter=0);var m=K.pasteCounter*K.gridSize;
+K.setSelectionCells(this.importXml(J,m,m));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(J){this.handleError(J)})),mxEvent.consume(d));else{var T=!1,S="";S=B?null!=I.textContent&&"<mxfile"==I.textContent.substring(0,7)&&"</mxfile>"==I.textContent.substring(I.textContent.length-9)||"<mxGraphModel"==I.textContent.substring(0,13)&&"</mxGraphModel>"==I.textContent.substring(I.textContent.length-15)?I.textContent.replace(/\u00a0/g," "):I.innerHTML:mxUtils.trim(null==I.innerText?
+mxUtils.getTextContent(I):I.innerText);try{var Q=S.lastIndexOf("%3E");0<=Q&&Q<S.length-3&&(S=S.substring(0,Q+3))}catch(J){}try{G=I.getElementsByTagName("span"),(R=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):decodeURIComponent(S))&&(this.isCompatibleString(R)||0==R.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(T=!0,S=R)}catch(J){}R=null;try{if(!T&&""==I.textContent)for(Q=0;Q<x.items.length;Q++){var v=x.items[Q];if("file"===v.kind){R=v.getAsFile();break}}}catch(J){}EditorUi.debug("EditorUi.pasteCells",
+[this],"evt",[d],"realElt",[k.outerHTML],"elt",[I.outerHTML],"useEvent",l,"pasteAsLabel",n,"xml",[S],"compat",T,"asHtml",B,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[R]);try{if(T||null==R)if(null!=S&&0<S.length){if(0==S.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var N=mxUtils.bind(this,function(){try{S=(new MiroImporter).importMiroJson(JSON.parse(S)),this.pasteXml(S,n,T,d)}catch(J){console.log("Miro import error:",J)}});
+"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",N):N()}else this.pasteXml(S,n,T,d,B);mxEvent.consume(d)}else l||(A.lastPasteXml=null,A.pasteCounter=0);else{var z=A.getInsertPoint();this.importFiles([R],z.x,z.y,this.maxImageSize);mxEvent.consume(d)}}catch(J){this.handleError(J)}}}k.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(d){var k=this.editor.graph;if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,
+function(l,n,x,A,B){if(null!=l){k.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,d)}finally{k.getModel().endUpdate()}}else l=null!=n?n:null!=x?x:A,null!=l?(d=null!=d?d:k.getInsertPoint(),this.importFiles([l],d.x,d.y,this.maxImageSize)):this.pasteFromLocalClipboard(d)})):this.pasteFromLocalClipboard(d)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(d){var k=this.editor.graph;k.getModel().beginUpdate();try{k.moveCellsTo(mxClipboard.paste(k),d)}finally{k.getModel().endUpdate()}};
+EditorUi.prototype.installImagePasteHandler=function(){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(k){for(var l=null!=k.clipboardData?k.clipboardData:k.originalEvent.clipboardData,n=!1,x=null,A=0;A<l.types.length;A++)if("text/"===l.types[A].substring(0,5)){n=!0;break}for(A=0;A<l.items.length;A++){var B=l.items[A];if("file"===B.kind){x=B.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[k],"data",[l],"items",[l.items.length],"files",
+[l.files.length],"types",[JSON.stringify(l.types)],"containsText",n,"file",[x],"editing",d.isEditing());var I=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(d.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(C,R,T,S,Q,v){d.insertImage(C,Q,v)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var R=0;R<C.length;R++)C[R]()});else{var G=this.editor.graph.getInsertPoint();this.importFiles([x],G.x,G.y,this.maxImageSize)}mxEvent.consume(k)}}catch(C){}});
+if(!mxEvent.isConsumed(k)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(G){this.readTypeFromClipboardData(G,"image/svg+xml",mxUtils.bind(this,function(C){if(null!=C){C=new Blob([C],{type:"image/svg+xml"});var R=this.editor.graph.getInsertPoint();this.importFiles([C],R.x,R.y,this.maxImageSize)}else I()}),"image")}))["catch"](I);else I()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(d){navigator.clipboard.read().then(mxUtils.bind(this,
+function(k){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",k,"types",null!=k&&0<k.length?[JSON.stringify(k[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(k,mxUtils.bind(this,function(l,n){null!=l?d(l):this.readGraphModelFromImageClipboardData(k,mxUtils.bind(this,function(x,A,B){null!=x?d(x):this.readTypeFromClipboardData(k,"text/plain",mxUtils.bind(this,function(I){d(I,A,B,n,k)}))}))}))}catch(l){d(null)}}))["catch"](function(){d(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=
+function(d,k){this.readTypeFromClipboardData(d,"text/html",mxUtils.bind(this,function(l){var n=null,x=null;try{var A=this.parseHtmlData(l);if(null!=A){n="text/plain"!=A.getAttribute("data-type")?A.innerHTML:mxUtils.trim(null==A.innerText?mxUtils.getTextContent(A):A.innerText);try{var B=n.lastIndexOf("%3E");0<=B&&B<n.length-3&&(n=n.substring(0,B+3))}catch(C){}try{null==n&&(l=null,""==A.textContent&&1==A.children.length&&"IMG"==A.firstChild.nodeName&&(l=A.firstChild.getAttribute("src")),null!=l&&0<
+l.length&&("data:image/png;base64,"==l.substring(0,22)?x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&(x=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(C){}try{var I=A.getElementsByTagName("span"),G=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(n);this.isCompatibleString(G)&&(n=G)}catch(C){}}}catch(C){}k(this.isCompatibleString(n)?n:null,x)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=
+function(d,k){this.readTypeFromClipboardData(d,"image/svg+xml",mxUtils.bind(this,function(l,n){var x=null;try{null!=l&&(x=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(A){}this.isCompatibleString(x)?k(x):this.readTypeFromClipboardData(d,"image/png",mxUtils.bind(this,function(A,B){x=Editor.extractGraphModelFromPng("data:image/png;base64,"+A);this.isCompatibleString(x)?k(x):k(null,n,B)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(d,k,l){var n=!1;if(null!=d&&0<d.length)for(var x=
+0;x<d.length&&!n;x++)(function(A){0<=mxUtils.indexOf(A.types,k)&&(n=!0,A.getType(k).then(mxUtils.bind(this,function(B){if("image/png"==k)B.arrayBuffer().then(function(I){l(btoa(Graph.arrayBufferToString(I)),B)})["catch"](function(){l(null)});else B.text().then(mxUtils.bind(this,function(I){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[d],"type",[k],"result",[I]);l(I,B)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(d[x]);n||l()};EditorUi.prototype.parseHtmlData=
function(d){var k=null;if(null!=d&&0<d.length){var l="<meta "==d.substring(0,6);k=document.createElement("div");k.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(d);asHtml=!0;l=k.getElementsByTagName("style");if(null!=l)for(;0<l.length;)l[0].parentNode.removeChild(l[0]);if(null!=k.firstChild&&k.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=k.firstChild.nextSibling&&k.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==k.firstChild.nodeName&&"A"==k.firstChild.nextSibling.nodeName&&
null==k.firstChild.nextSibling.nextSibling){var n=null==k.firstChild.nextSibling.innerText?mxUtils.getTextContent(k.firstChild.nextSibling):k.firstChild.nextSibling.innerText;n==k.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(k,n),asHtml=!1)}if(""==k.textContent&&(l=k.getElementsByTagName("img"),1==l.length&&(n=l[0].getAttribute("src"),l=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(l=x)}else if("data:image/svg+xml;base64,"==
-n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(l=x)}catch(z){}}null!=l&&(mxUtils.setTextContent(k,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(k):k.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[d],"elt",[k],"asHtml",asHtml);return k};EditorUi.prototype.showPrintDialog=function(d,k,l){var n=
-330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==k||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,d,k,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(d,k){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),z=null!=x?x+1:1,B=mxUtils.bind(this,function(J,K,m,t){var D=J.useCssTransforms,M=J.currentTranslate,L=J.currentScale,O=J.view.translate,
-P=J.view.scale;J.useCssTransforms&&(J.useCssTransforms=!1,J.currentTranslate=new mxPoint(0,0),J.currentScale=1,J.view.translate=new mxPoint(0,0),J.view.scale=1);var T=J.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(J.pageFormat),Y=k.fit||k.crop||!J.pageVisible,Z=k.scale;W.width=Math.ceil(W.width*J.pageScale);W.height=Math.ceil(W.height*J.pageScale);var aa=1;if(k.fit){aa=k.sheetsAcross;var fa=k.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*
-fa/(T.height/J.view.scale),W.width*aa/(T.width/J.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&J.pageVisible?(Z=J.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;k.crop&&(k.selection&&(T=n.getBoundingBox(n.getSelectionCells())),W.width=(T.width+1)*aa/J.view.scale,W.height=(T.height+1)*aa/J.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);t=null!=t?"page/id,"+t:null;if(null==K){K=PrintDialog.createPrintPreview(J,aa,null,0,V,X,Y);K.title=this.getBaseFilename(!0);K.pageSelector=
-!1;K.mathEnabled=!1;V=k.border;isNaN(V)||(K.pageMargin=V);k.selection&&(K.isCellVisible=function(ka){return J.isCellSelected(ka)});var ea=K.writeHead;K.writeHead=function(ka,ba){ba=null!=ba?ba:"";k.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ba+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(ba+=l.fontCss);ea.apply(this,arguments);for(var ha=J.getCustomFonts(),ma=0;ma<ha.length;ma++){var da=ha[ma].name,
-va=ha[ma].url;Graph.isCssFontUrl(va)?ka.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(va))+'" charset="UTF-8" type="text/css">'):(ka.writeln('<style type="text/css">'),ka.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(da)+'";\nsrc: url("'+mxUtils.htmlEntities(va)+'");\n}'),ka.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=K.drawBackgroundImage;K.drawBackgroundImage=function(ka){ca.apply(this,arguments);null!=ka.node&&(EditorUi.embedSvgImages(ka.node),
-n.disableSvgLinks(ka.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var ia=K.addGraphFragment;K.addGraphFragment=function(ka,ba,ha,ma,da,va){ia.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:da.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var ra=da.getElementsByTagName("svg"),wa=0;wa<ra.length;wa++)J.addSvgShadow(ra[wa])};k.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
-J.view.gridColor);K.open(null,null,m,!0,t,W,k.selection?J.getSelectionCells():null)}else{T=J.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";K.backgroundColor=T;K.autoOrigin=Y;k.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:J.view.gridColor);K.appendGraph(J,aa,V,X,m,!0,t,W,k.selection?J.getSelectionCells():null);m=J.getCustomFonts();if(null!=K.wnd)for(W=0;W<m.length;W++)V=m[W].name,X=m[W].url,Graph.isCssFontUrl(X)?
-K.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(K.wnd.document.writeln('<style type="text/css">'),K.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),K.wnd.document.writeln("</style>"))}D&&(J.useCssTransforms=D,J.currentTranslate=M,J.currentScale=L,J.view.translate=O,J.view.scale=P);return K}),I=k.pagesFrom,H=k.pagesTo,C=!k.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
-k);else{C&&(C=k.selection||I==z&&H==z);if(!C&&null!=this.pages&&this.pages.length){C=0;z=this.pages.length-1;k.allPages||(C=parseInt(I)-1,z=parseInt(H)-1);for(var R=C;R<=z;R++){var U=this.pages[R];I=U==this.currentPage?n:null;if(null==I){I=this.createTemporaryGraph(n.stylesheet);I.shapeForegroundColor=n.shapeForegroundColor;I.shapeBackgroundColor=n.shapeBackgroundColor;H=!0;var S=C=!1,Q=null,v=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(H=U.viewState.pageVisible,
-C=U.viewState.mathEnabled,S=U.viewState.shadowVisible,Q=U.viewState.background,v=U.viewState.backgroundImage,I.pageFormat=U.viewState.pageFormat,I.gridSize=U.viewState.gridSize);null!=v&&null!=v.originalSrc&&(v=this.createImageForPageLink(v.originalSrc,U));I.background=Q;I.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height,v.x,v.y):null;I.pageVisible=H;I.mathEnabled=C;I.shadowVisible=S;var A=I.getGraphBounds;I.getGraphBounds=function(){var J=A.apply(this,arguments),K=this.backgroundImage;
-if(null!=K&&null!=K.width&&null!=K.height){var m=this.view.translate,t=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((m.x+K.x)*t,(m.y+K.y)*t,K.width*t,K.height*t))}return J};var N=I.getGlobalVariable;I.getGlobalVariable=function(J){return"page"==J?U.getName():"pagenumber"==J?R+1:"pagecount"==J?null!=this.pages?this.pages.length:1:N.apply(this,arguments)};document.body.appendChild(I.container);this.updatePageRoot(U);I.model.setRoot(U.root)}x=B(I,x,R!=z,U.getId());I!=n&&I.container.parentNode.removeChild(I.container)}}else x=
+n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(l=x)}catch(A){}}null!=l&&(mxUtils.setTextContent(k,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(k):k.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[d],"elt",[k],"asHtml",asHtml);return k};EditorUi.prototype.showPrintDialog=function(d,k,l){var n=
+330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==k||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,d,k,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(d,k){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),A=null!=x?x+1:1,B=mxUtils.bind(this,function(J,K,m,t){var D=J.useCssTransforms,M=J.currentTranslate,L=J.currentScale,O=J.view.translate,
+P=J.view.scale;J.useCssTransforms&&(J.useCssTransforms=!1,J.currentTranslate=new mxPoint(0,0),J.currentScale=1,J.view.translate=new mxPoint(0,0),J.view.scale=1);var U=J.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(J.pageFormat),Y=k.fit||k.crop||!J.pageVisible,Z=k.scale;W.width=Math.ceil(W.width*J.pageScale);W.height=Math.ceil(W.height*J.pageScale);var aa=1;if(k.fit){aa=k.sheetsAcross;var fa=k.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*
+fa/(U.height/J.view.scale),W.width*aa/(U.width/J.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&J.pageVisible?(Z=J.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;k.crop&&(k.selection&&(U=n.getBoundingBox(n.getSelectionCells())),W.width=(U.width+1)*aa/J.view.scale,W.height=(U.height+1)*aa/J.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);t=null!=t?"page/id,"+t:null;if(null==K){K=PrintDialog.createPrintPreview(J,aa,null,0,V,X,Y);K.title=this.getBaseFilename(!0);K.pageSelector=
+!1;K.mathEnabled=!1;V=k.border;isNaN(V)||(K.pageMargin=V);k.selection&&(K.isCellVisible=function(ka){return J.isCellSelected(ka)});var ea=K.writeHead;K.writeHead=function(ka,ba){ba=null!=ba?ba:"";k.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ba+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(ba+=l.fontCss);ea.apply(this,arguments);for(var ia=J.getCustomFonts(),la=0;la<ia.length;la++){var da=ia[la].name,
+ra=ia[la].url;Graph.isCssFontUrl(ra)?ka.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(ra))+'" charset="UTF-8" type="text/css">'):(ka.writeln('<style type="text/css">'),ka.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(da)+'";\nsrc: url("'+mxUtils.htmlEntities(ra)+'");\n}'),ka.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=K.drawBackgroundImage;K.drawBackgroundImage=function(ka){ca.apply(this,arguments);null!=ka.node&&(EditorUi.embedSvgImages(ka.node),
+n.disableSvgLinks(ka.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var ha=K.addGraphFragment;K.addGraphFragment=function(ka,ba,ia,la,da,ra){ha.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:da.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var pa=da.getElementsByTagName("svg"),sa=0;sa<pa.length;sa++)J.addSvgShadow(pa[sa])};k.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
+J.view.gridColor);K.open(null,null,m,!0,t,W,k.selection?J.getSelectionCells():null)}else{U=J.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";K.backgroundColor=U;K.autoOrigin=Y;k.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:J.view.gridColor);K.appendGraph(J,aa,V,X,m,!0,t,W,k.selection?J.getSelectionCells():null);m=J.getCustomFonts();if(null!=K.wnd)for(W=0;W<m.length;W++)V=m[W].name,X=m[W].url,Graph.isCssFontUrl(X)?
+K.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(K.wnd.document.writeln('<style type="text/css">'),K.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),K.wnd.document.writeln("</style>"))}D&&(J.useCssTransforms=D,J.currentTranslate=M,J.currentScale=L,J.view.translate=O,J.view.scale=P);return K}),I=k.pagesFrom,G=k.pagesTo,C=!k.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
+k);else{C&&(C=k.selection||I==A&&G==A);if(!C&&null!=this.pages&&this.pages.length){C=0;A=this.pages.length-1;k.allPages||(C=parseInt(I)-1,A=parseInt(G)-1);for(var R=C;R<=A;R++){var T=this.pages[R];I=T==this.currentPage?n:null;if(null==I){I=this.createTemporaryGraph(n.stylesheet);I.shapeForegroundColor=n.shapeForegroundColor;I.shapeBackgroundColor=n.shapeBackgroundColor;G=!0;var S=C=!1,Q=null,v=null;null==T.viewState&&null==T.root&&this.updatePageRoot(T);null!=T.viewState&&(G=T.viewState.pageVisible,
+C=T.viewState.mathEnabled,S=T.viewState.shadowVisible,Q=T.viewState.background,v=T.viewState.backgroundImage,I.pageFormat=T.viewState.pageFormat,I.gridSize=T.viewState.gridSize);null!=v&&null!=v.originalSrc&&(v=this.createImageForPageLink(v.originalSrc,T));I.background=Q;I.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height,v.x,v.y):null;I.pageVisible=G;I.mathEnabled=C;I.shadowVisible=S;var z=I.getGraphBounds;I.getGraphBounds=function(){var J=z.apply(this,arguments),K=this.backgroundImage;
+if(null!=K&&null!=K.width&&null!=K.height){var m=this.view.translate,t=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((m.x+K.x)*t,(m.y+K.y)*t,K.width*t,K.height*t))}return J};var N=I.getGlobalVariable;I.getGlobalVariable=function(J){return"page"==J?T.getName():"pagenumber"==J?R+1:"pagecount"==J?null!=this.pages?this.pages.length:1:N.apply(this,arguments)};document.body.appendChild(I.container);this.updatePageRoot(T);I.model.setRoot(T.root)}x=B(I,x,R!=A,T.getId());I!=n&&I.container.parentNode.removeChild(I.container)}}else x=
B(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(x.mathEnabled&&(B=x.wnd.document,d||(x.wnd.IMMEDIATE_PRINT=!0),B.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||d||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var k=null,l=0;l<d.length;l++)mxEvent.addListener(d[l],"dragleave",function(n){null!=
k&&(k.parentNode.removeChild(k),k=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[l],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==k&&(k=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(d[l],"drop",mxUtils.bind(this,function(n){null!=k&&(k.parentNode.removeChild(k),k=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
-this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var x=this.extractGraphModelFromEvent(n);if(null==x){var z=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=z&&(10==document.documentMode||11==document.documentMode?x=z.getData("Text"):(x=null,x=0<=mxUtils.indexOf(z.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(z.types,"text/html")?
-z.getData("text/html"):null,null!=x&&0<x.length?(z=document.createElement("div"),z.innerHTML=Graph.sanitizeHtml(x),z=z.getElementsByTagName("img"),0<z.length&&(x=z[0].getAttribute("src"))):0<=mxUtils.indexOf(z.types,"text/plain")&&(x=z.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,
+this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var x=this.extractGraphModelFromEvent(n);if(null==x){var A=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=A&&(10==document.documentMode||11==document.documentMode?x=A.getData("Text"):(x=null,x=0<=mxUtils.indexOf(A.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(A.types,"text/html")?
+A.getData("text/html"):null,null!=x&&0<x.length?(A=document.createElement("div"),A.innerHTML=Graph.sanitizeHtml(x),A=A.getElementsByTagName("img"),0<A.length&&(x=A[0].getAttribute("src"))):0<=mxUtils.indexOf(A.types,"text/plain")&&(x=A.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,
"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,function(B){200<=B.getStatus()&&299>=B.getStatus()?this.openLocalFile(B.getText(),null,!0):this.showError(mxResources.get("error"),413==B.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
-"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var k=0,l=0;if(null==d){var n=document.body;var x=document.documentElement;var z=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=d.getBoundingClientRect(),k=n.top,l=n.left,z=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";
-x.style.pointerEvents="none";x.style.position="absolute";x.style.top=k+"px";x.style.left=l+"px";x.style.width=Math.max(0,z-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var k=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=k){var l=new mxCodec(k.ownerDocument),n=new mxGraphModel;l.decode(k,
-n);k=n.getChildAt(n.getRoot(),0);for(l=0;l<n.getChildCount(k);l++)d.push(n.getChildAt(k,l))}return d};EditorUi.prototype.openFileHandle=function(d,k,l,n,x,z){if(null!=k&&0<k.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(k)||/(\.pdf)$/i.test(k))k=k.substring(0,k.length-4),/(\.drawio)$/i.test(k)||(k+=".drawio");var B=mxUtils.bind(this,function(H){k=0<=k.lastIndexOf(".")?k.substring(0,k.lastIndexOf("."))+".drawio":k+".drawio";if("<mxlibrary"==H.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,H,k)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(H,k,n)});if(EditorUi.isVisioFilename(k))this.importVisio(l,mxUtils.bind(this,function(H){this.spinner.stop();B(H)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(H){this.spinner.stop();B(H)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,k))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(H){4==H.readyState&&(this.spinner.stop(),200<=H.status&&299>=H.status?B(H.responseText):this.handleError({message:mxResources.get(413==H.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(k)&&(k=k.substring(0,k.length-5)+".drawio"),
-this.convertLucidChart(d,mxUtils.bind(this,function(H){this.spinner.stop();this.openLocalFile(H,k,n)}),mxUtils.bind(this,function(H){this.spinner.stop();this.handleError(H)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,l.name)),this.showSidebar()}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(H){this.spinner.stop();B(H)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,k,n)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==l.type){var I=Editor.extractGraphModelFromPdf(d);null!=I&&(x=null,n=!0,d=I)}this.spinner.stop();this.openLocalFile(d,k,n,x,null!=x?l:null,z)}}};EditorUi.prototype.openFiles=function(d,k){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=
-0;l<d.length;l++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=mxUtils.bind(this,function(z){try{this.openFileHandle(z.target.result,n.name,n,k)}catch(B){this.handleError(B)}});x.onerror=mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(d[l])};EditorUi.prototype.openLocalFile=function(d,k,l,n,x,z){var B=this.getCurrentFile(),
-I=mxUtils.bind(this,function(){window.openFile=null;if(null==k&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var H=mxUtils.parseXml(d);null!=H&&(this.editor.setGraphXml(H.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,k||this.defaultFilename,l,n,x,z))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var k=0,l=0;if(null==d){var n=document.body;var x=document.documentElement;var A=(n.clientWidth||x.clientWidth)-3;n=Math.max(n.clientHeight||0,x.clientHeight)-3}else n=d.getBoundingClientRect(),k=n.top,l=n.left,A=n.width,n=n.height;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";
+x.style.pointerEvents="none";x.style.position="absolute";x.style.top=k+"px";x.style.left=l+"px";x.style.width=Math.max(0,A-3)+"px";x.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var k=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=k){var l=new mxCodec(k.ownerDocument),n=new mxGraphModel;l.decode(k,
+n);k=n.getChildAt(n.getRoot(),0);for(l=0;l<n.getChildCount(k);l++)d.push(n.getChildAt(k,l))}return d};EditorUi.prototype.openFileHandle=function(d,k,l,n,x,A){if(null!=k&&0<k.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(k)||/(\.pdf)$/i.test(k))k=k.substring(0,k.length-4),/(\.drawio)$/i.test(k)||(k+=".drawio");var B=mxUtils.bind(this,function(G){k=0<=k.lastIndexOf(".")?k.substring(0,k.lastIndexOf("."))+".drawio":k+".drawio";if("<mxlibrary"==G.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,G,k)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(G,k,n)});if(EditorUi.isVisioFilename(k))this.importVisio(l,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,k))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(G){4==G.readyState&&(this.spinner.stop(),200<=G.status&&299>=G.status?B(G.responseText):this.handleError({message:mxResources.get(413==G.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(k)&&(k=k.substring(0,k.length-5)+".drawio"),
+this.convertLucidChart(d,mxUtils.bind(this,function(G){this.spinner.stop();this.openLocalFile(G,k,n)}),mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,l.name)),this.showSidebar()}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else if(0==
+d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,k,n)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==l.type){var I=Editor.extractGraphModelFromPdf(d);null!=I&&(x=null,n=!0,d=I)}this.spinner.stop();this.openLocalFile(d,k,n,x,null!=x?l:null,A)}}};EditorUi.prototype.openFiles=function(d,k){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=
+0;l<d.length;l++)mxUtils.bind(this,function(n){var x=new FileReader;x.onload=mxUtils.bind(this,function(A){try{this.openFileHandle(A.target.result,n.name,n,k)}catch(B){this.handleError(B)}});x.onerror=mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?x.readAsText(n):x.readAsDataURL(n)})(d[l])};EditorUi.prototype.openLocalFile=function(d,k,l,n,x,A){var B=this.getCurrentFile(),
+I=mxUtils.bind(this,function(){window.openFile=null;if(null==k&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var G=mxUtils.parseXml(d);null!=G&&(this.editor.setGraphXml(G.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,k||this.defaultFilename,l,n,x,A))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,k),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var k=
0;k<this.pages.length;k++)this.updatePageRoot(this.pages[k]),this.addBasenamesForCell(this.pages[k].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);k=[];for(var l in d)k.push(l);return k};EditorUi.prototype.addBasenamesForCell=function(d,k){function l(B){if(null!=B){var I=B.lastIndexOf(".");0<I&&(B=B.substring(I+1,B.length));null==k[B]&&(k[B]=!0)}}var n=this.editor.graph,x=n.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&
-(l(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(d);for(var z=0;z<x;z++)this.addBasenamesForCell(n.model.getChildAt(d,z),k)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
+(l(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=n.model.getChildCount(d);for(var A=0;A<x;A++)this.addBasenamesForCell(n.model.getChildAt(d,A),k)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
this.editor.graph.setEnabled(d);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);d||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(k,l,n,x){d||(d=!0,this.spinner.stop(),
-this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==k||0==k.length)k=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,k,{}));this.mode=App.MODE_EMBED;this.setFileData(k);if(x)try{var z=this.editor.graph;z.setGridEnabled(!1);z.pageVisible=!1;var B=z.model.cells,I;for(I in B){var H=B[I];null!=H&&null!=H.style&&(H.style+=";sketch=1;"+(-1==H.style.indexOf("fontFamily=")||-1<H.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==k||0==k.length)k=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,k,{}));this.mode=App.MODE_EMBED;this.setFileData(k);if(x)try{var A=this.editor.graph;A.setGridEnabled(!1);A.pageVisible=!1;var B=A.model.cells,I;for(I in B){var G=B[I];null!=G&&null!=G.style&&(G.style+=";sketch=1;"+(-1==G.style.indexOf("fontFamily=")||-1<G.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
""))}}catch(C){console.log(C)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,k){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();k(l)})):k(null)};EditorUi.prototype.createLoadMessage=function(d){var k=this.editor.graph;return{event:d,pageVisible:k.pageVisible,translate:k.view.translate,bounds:k.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:k.view.scale,
page:k.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var k=this.editor.graph;k.isEditing()&&k.stopEditing(!k.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var n=k.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),k,null,!0,mxUtils.bind(this,function(x){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
exit:null!=d?!d:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else d||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,k.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(x){d||this.handleError(x)}};
-EditorUi.prototype.installMessageHandler=function(d){var k=null,l=!1,n=!1,x=null,z=mxUtils.bind(this,function(H,C){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,z);mxEvent.addListener(window,"message",mxUtils.bind(this,function(H){if(H.source==(window.opener||window.parent)){var C=
-H.data,R=null,U=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(ha){}return ba});if("json"==urlParams.proto){var S=
-!1;try{C=JSON.parse(C),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[H],"data",[C])}catch(ba){C=null}try{if(null==C)return;if("dialog"==C.action){this.showError(null!=C.titleKey?mxResources.get(C.titleKey):C.title,null!=C.messageKey?mxResources.get(C.messageKey):mxUtils.htmlEntities(C.message),null!=C.buttonKey?mxResources.get(C.buttonKey):C.button);null!=C.modified&&(this.editor.modified=C.modified);return}if("layout"==C.action){this.executeLayouts(this.editor.graph.createLayouts(C.layouts));
+EditorUi.prototype.installMessageHandler=function(d){var k=null,l=!1,n=!1,x=null,A=mxUtils.bind(this,function(G,C){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,A);mxEvent.addListener(window,"message",mxUtils.bind(this,function(G){if(G.source==(window.opener||window.parent)){var C=
+G.data,R=null,T=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(ia){}return ba});if("json"==urlParams.proto){var S=
+!1;try{C=JSON.parse(C),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[G],"data",[C])}catch(ba){C=null}try{if(null==C)return;if("dialog"==C.action){this.showError(null!=C.titleKey?mxResources.get(C.titleKey):C.title,null!=C.messageKey?mxResources.get(C.messageKey):mxUtils.htmlEntities(C.message),null!=C.buttonKey?mxResources.get(C.buttonKey):C.button);null!=C.modified&&(this.editor.modified=C.modified);return}if("layout"==C.action){this.executeLayouts(this.editor.graph.createLayouts(C.layouts));
return}if("prompt"==C.action){this.spinner.stop();var Q=new FilenameDialog(this,C.defaultValue||"",null!=C.okKey?mxResources.get(C.okKey):C.ok,function(ba){null!=ba?B.postMessage(JSON.stringify({event:"prompt",value:ba,message:C}),"*"):B.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")},null!=C.titleKey?mxResources.get(C.titleKey):C.title,null,null,null,null,function(){B.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")});this.showDialog(Q.container,300,80,!0,!1);
-Q.init();return}if("draft"==C.action){var v=U(C.xml);this.spinner.stop();Q=new DraftDialog(this,mxResources.get("draftFound",[C.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"edit",message:C}),"*")}),mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"discard",message:C}),"*")}),C.editKey?mxResources.get(C.editKey):null,C.discardKey?mxResources.get(C.discardKey):null,C.ignore?
-mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"ignore",message:C}),"*")}):null);this.showDialog(Q.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));try{Q.init()}catch(ba){B.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:C}),"*")}return}if("template"==C.action){this.spinner.stop();var A=1==C.enableRecent,N=1==C.enableSearch,J=1==C.enableCustomTemp;Q=new NewDialog(this,!1,C.templatesOnly?
-!1:null!=C.callback,mxUtils.bind(this,function(ba,ha,ma,da){ba=ba||this.emptyDiagramXml;null!=C.callback?B.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:ha,tempUrl:ma,libs:da,builtIn:!0,message:C}),"*"):(d(ba,H,ba!=this.emptyDiagramXml,C.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,A?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,
-N?mxUtils.bind(this,function(ba,ha){this.remoteInvoke("searchDiagrams",[ba,null],null,ha,function(){ha(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,ha,ma){B.postMessage(JSON.stringify({event:"template",docUrl:ba,info:ha,name:ma}),"*")}),null,null,J?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==C.withoutType,null,C.templatesOnly);this.showDialog(Q.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&
+Q.init();return}if("draft"==C.action){var v=T(C.xml);this.spinner.stop();Q=new DraftDialog(this,mxResources.get("draftFound",[C.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"edit",message:C}),"*")}),mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"discard",message:C}),"*")}),C.editKey?mxResources.get(C.editKey):null,C.discardKey?mxResources.get(C.discardKey):null,C.ignore?
+mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"ignore",message:C}),"*")}):null);this.showDialog(Q.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));try{Q.init()}catch(ba){B.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:C}),"*")}return}if("template"==C.action){this.spinner.stop();var z=1==C.enableRecent,N=1==C.enableSearch,J=1==C.enableCustomTemp;Q=new NewDialog(this,!1,C.templatesOnly?
+!1:null!=C.callback,mxUtils.bind(this,function(ba,ia,la,da){ba=ba||this.emptyDiagramXml;null!=C.callback?B.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:ia,tempUrl:la,libs:da,builtIn:!0,message:C}),"*"):(d(ba,G,ba!=this.emptyDiagramXml,C.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,z?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,
+N?mxUtils.bind(this,function(ba,ia){this.remoteInvoke("searchDiagrams",[ba,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,ia,la){B.postMessage(JSON.stringify({event:"template",docUrl:ba,info:ia,name:la}),"*")}),null,null,J?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==C.withoutType,null,C.templatesOnly);this.showDialog(Q.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&
this.sidebar.hideTooltip();ba&&this.actions.get("exit").funct()}));Q.init();return}if("textContent"==C.action){var K=this.getDiagramTextContent();B.postMessage(JSON.stringify({event:"textContent",data:K,message:C}),"*");return}if("status"==C.action){this.updateStatus(mxUtils.bind(this,function(){null!=C.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(C.messageKey))):null!=C.message&&this.editor.setStatus(mxUtils.htmlEntities(C.message))}));null!=C.modified&&(this.editor.modified=
C.modified);return}if("spinner"==C.action){var m=null!=C.messageKey?mxResources.get(C.messageKey):C.message;null==C.show||C.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("exit"==C.action){this.actions.get("exit").funct();return}if("viewport"==C.action){if(null!=C.viewport){var t=this.editor.graph,D=t.view.translate.x,M=t.view.translate.y;this.embedViewport=C.viewport;t.refresh();this.diagramContainer.scrollTop-=(M-t.view.translate.y)*t.view.scale;this.diagramContainer.scrollLeft-=
(D-t.view.translate.x)*t.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==C.action){Q=null;try{var L=this.diagramContainer.getAttribute("data-scrollState");null!=L&&(this.diagramContainer.removeAttribute("data-scrollState"),Q=JSON.parse(L))}catch(ba){}Editor.inlineFullscreen=C.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=Q&&this.restoreScrollState(Q);return}if("snapshot"==C.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
-C.action){if("png"==C.format||"xmlpng"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){var O=null!=C.xml?C.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);t=this.editor.graph;var P=mxUtils.bind(this,function(ba,ha){if(C.withSvg)C.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(da){P(ba,da)},null,null,C.embedImages,this.editor.graph.background,C.scale,C.border,C.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var ma=this.createLoadMessage("export");ma.format=C.format;ma.message=C;ma.data=ba;ma.svg=ha;ma.xml=O;B.postMessage(JSON.stringify(ma),"*")}}),T=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==C.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(O)));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);P(ba)}),V=C.pageId||(null!=this.pages?C.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());for(var ha,ma=0;ma<this.pages.length;ma++)if(this.pages[ma].getId()==V){ha=this.updatePageRoot(this.pages[ma]);break}null==ha&&(ha=this.currentPage);t.getGlobalVariable=function(wa){return"page"==wa?ha.getName():"pagenumber"==wa?1:ba.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(ha.root)}if(null!=C.layerIds){var da=
-t.model,va=da.getChildCells(da.getRoot()),ra={};for(ma=0;ma<C.layerIds.length;ma++)ra[C.layerIds[ma]]=!0;for(ma=0;ma<va.length;ma++)da.setVisible(va[ma],ra[va[ma].id]||!1)}ma=null;C.keepTheme&&(ma=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){T(wa.toDataURL("image/png"))}),C.width,null,C.background,mxUtils.bind(this,function(){T(null)}),null,null,C.scale,C.transparent,C.shadow,null,t,C.border,null,C.grid,ma)});null!=C.xml&&0<C.xml.length&&(l=!0,this.setFileData(O),
-l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==C.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=C.layerIds&&0<C.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:C.layerIds})):"")+(null!=C.scale?"&scale="+C.scale:"")+"&base64=1&xml="+encodeURIComponent(O))).send(mxUtils.bind(this,function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?P("data:image/png;base64,"+ba.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(X=mxUtils.bind(this,
-function(){var ba=this.createLoadMessage("export");ba.message=C;if("html2"==C.format||"html"==C.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ha=this.getXmlFileData();ba.xml=mxUtils.getXml(ha);ba.data=this.getFileData(null,null,!0,null,null,null,ha);ba.format=C.format}else if("html"==C.format)ha=this.editor.getGraphXml(),ba.data=this.getHtml(ha,this.editor.graph),ba.xml=mxUtils.getXml(ha),ba.format=C.format;else{mxSvgCanvas2D.prototype.foAltText=null;ha=null!=C.background?
-C.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var ma=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();ba.data=C.asText?va:Editor.createSvgDataUri(va);B.postMessage(JSON.stringify(ba),"*")}),da="auto";C.keepTheme&&(da=Editor.isDarkMode()?"dark":"light");null!=C.theme&&(da=C.theme);if("xmlsvg"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,
-null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){da=null;if(this.isAutoDarkMode()||Editor.isDarkMode())da="auto";null!=C.theme&&(da=C.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,ma,null,null,C.embedImages,ha,C.scale,C.border,C.shadow,da)}}else if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin))this.editor.graph.setEnabled(!1),ha=this.editor.graph.getSvg(ha,C.scale,C.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-C.shadow,null,da),(this.editor.graph.shadowVisible||C.shadow)&&this.editor.graph.addSvgShadow(ha),this.embedFonts(ha,mxUtils.bind(this,function(va){C.embedImages||null==C.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(ra){ma(mxUtils.getXml(ra))})):ma(mxUtils.getXml(va))}));return}B.postMessage(JSON.stringify(ba),"*")}),null!=C.xml&&0<C.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}l=!0;this.setFileData(C.xml);
+C.action){if("png"==C.format||"xmlpng"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){var O=null!=C.xml?C.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);t=this.editor.graph;var P=mxUtils.bind(this,function(ba,ia){if(C.withSvg)C.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(da){P(ba,da)},null,null,C.embedImages,this.editor.graph.background,C.scale,C.border,C.shadow,"auto");else{this.editor.graph.setEnabled(!0);
+this.spinner.stop();var la=this.createLoadMessage("export");la.format=C.format;la.message=C;la.data=ba;la.svg=ia;la.xml=O;B.postMessage(JSON.stringify(la),"*")}}),U=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==C.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(O)));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);P(ba)}),V=C.pageId||(null!=this.pages?C.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());for(var ia,la=0;la<this.pages.length;la++)if(this.pages[la].getId()==V){ia=this.updatePageRoot(this.pages[la]);break}null==ia&&(ia=this.currentPage);t.getGlobalVariable=function(sa){return"page"==sa?ia.getName():"pagenumber"==sa?1:ba.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(ia.root)}if(null!=C.layerIds){var da=
+t.model,ra=da.getChildCells(da.getRoot()),pa={};for(la=0;la<C.layerIds.length;la++)pa[C.layerIds[la]]=!0;for(la=0;la<ra.length;la++)da.setVisible(ra[la],pa[ra[la].id]||!1)}la=null;C.keepTheme&&(la=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(sa){U(sa.toDataURL("image/png"))}),C.width,null,C.background,mxUtils.bind(this,function(){U(null)}),null,null,C.scale,C.transparent,C.shadow,null,t,C.border,null,C.grid,la)});null!=C.xml&&0<C.xml.length&&(l=!0,this.setFileData(O),
+l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==C.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=C.layerIds&&0<C.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:C.layerIds})):"")+(null!=C.scale?"&scale="+C.scale:"")+"&base64=1&xml="+encodeURIComponent(O))).send(mxUtils.bind(this,function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?P("data:image/png;base64,"+ba.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(X=mxUtils.bind(this,
+function(){var ba=this.createLoadMessage("export");ba.message=C;if("html2"==C.format||"html"==C.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();ba.xml=mxUtils.getXml(ia);ba.data=this.getFileData(null,null,!0,null,null,null,ia);ba.format=C.format}else if("html"==C.format)ia=this.editor.getGraphXml(),ba.data=this.getHtml(ia,this.editor.graph),ba.xml=mxUtils.getXml(ia),ba.format=C.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=C.background?
+C.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var la=mxUtils.bind(this,function(ra){this.editor.graph.setEnabled(!0);this.spinner.stop();ba.data=C.asText?ra:Editor.createSvgDataUri(ra);B.postMessage(JSON.stringify(ba),"*")}),da="auto";C.keepTheme&&(da=Editor.isDarkMode()?"dark":"light");null!=C.theme&&(da=C.theme);if("xmlsvg"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,
+null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){da=null;if(this.isAutoDarkMode()||Editor.isDarkMode())da="auto";null!=C.theme&&(da=C.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,la,null,null,C.embedImages,ia,C.scale,C.border,C.shadow,da)}}else if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,C.scale,C.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
+C.shadow,null,da),(this.editor.graph.shadowVisible||C.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(ra){C.embedImages||null==C.embedImages?this.editor.convertImages(ra,mxUtils.bind(this,function(pa){la(mxUtils.getXml(pa))})):la(mxUtils.getXml(ra))}));return}B.postMessage(JSON.stringify(ba),"*")}),null!=C.xml&&0<C.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}l=!0;this.setFileData(C.xml);
l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==C.action){S=C.toSketch;n=1==C.autosave;this.hideDialog();null!=C.modified&&null==urlParams.modified&&(urlParams.modified=C.modified);null!=C.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=C.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&
(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=C.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=C.noSaveBtn);if(null!=C.rough){var Y=Editor.sketchMode;this.doSetSketchMode(C.rough);Y!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=C.dark&&this.setDarkMode(C.dark);null!=C.border&&(this.embedExportBorder=C.border);null!=C.theme&&(this.embedExportTheme=C.theme);null!=C.background&&
(this.embedExportBackground=C.background);null!=C.viewport&&(this.embedViewport=C.viewport);this.embedExitPoint=null;if(null!=C.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,C.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,C.rect.top)+"px";this.minInlineWidth=C.minWidth;this.minInlineHeight=C.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var aa=C.maxFitScale,
-fa=C.rect.width+2*Z,ea=C.rect.height+2*Z;R=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();fa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,fa):fa,ba.width-80);ba=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,ba.height-80);this.diagramContainer.style.width=fa+"px";this.diagramContainer.style.height=ba+"px";var ha=this.editor.graph;ba=ha.maxFitScale;ha.maxFitScale=aa;ha.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=
-this.minInlineWidth&&ha.getGraphBounds().width<this.minInlineWidth){var ma=ha.container.scrollTop;this.resetScrollbars();ha.container.scrollTop=ma}ha.maxFitScale=ba;ha.container.scrollTop-=Z;ha.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[C]));ha.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ha.container.style.top);
-var da=ha.getGraphBounds();ha.container.clientWidth>da.width+2*Z&&(ha.container.scrollLeft=da.x+(da.width+Z-ha.container.clientWidth)/2)}),10)})}null!=C.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=C.noExitBtn);null!=C.title&&null!=this.buttonContainer&&this.setEmbedTitle(C.title);try{C.libs&&this.sidebar.showEntries(C.libs)}catch(ba){}C=null!=C.xmlpng?this.extractGraphModelFromPng(C.xmlpng):null!=C.descriptor?C.descriptor:C.xml}else{if("merge"==C.action){var ca=this.getCurrentFile();
-null!=ca&&(v=U(C.xml),null!=v&&""!=v&&ca.mergeFile(new LocalFile(this,v),function(){B.postMessage(JSON.stringify({event:"merge",message:C}),"*")},function(ba){B.postMessage(JSON.stringify({event:"merge",message:C,error:ba}),"*")}))}else"remoteInvokeReady"==C.action?this.handleRemoteInvokeReady(B):"remoteInvoke"==C.action?this.handleRemoteInvoke(C,H.origin):"remoteInvokeResponse"==C.action?this.handleRemoteInvokeResponse(C):B.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(C)}),
-"*");return}}catch(ba){this.handleError(ba)}}var ia=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ka=mxUtils.bind(this,function(ba,ha){l=!0;try{d(ba,ha,null,S)}catch(ma){this.handleError(ma)}l=!1;null!=urlParams.modified&&this.clearStatus();x=ia();n&&null==k&&(k=mxUtils.bind(this,function(ma,da){ma=ia();ma==x||l||(da=this.createLoadMessage("autosave"),da.xml=ma,(window.opener||window.parent).postMessage(JSON.stringify(da),
-"*"));x=ma}),this.editor.graph.model.addListener(mxEvent.CHANGE,k),this.editor.graph.addListener("gridSizeChanged",k),this.editor.graph.addListener("shadowVisibleChanged",k),this.addListener("pageFormatChanged",k),this.addListener("pageScaleChanged",k),this.addListener("backgroundColorChanged",k),this.addListener("backgroundImageChanged",k),this.addListener("foldingEnabledChanged",k),this.addListener("mathEnabledChanged",k),this.addListener("gridEnabledChanged",k),this.addListener("guidesEnabledChanged",
-k),this.addListener("pageViewChanged",k));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ha=this.createLoadMessage("load"),ha.xml=ba,B.postMessage(JSON.stringify(ha),"*");null!=R&&R()});null!=C&&"function"===typeof C.substring&&"data:application/vnd.visio;base64,"==C.substring(0,34)?(U="0M8R4KGxGuE"==C.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(C.substring(C.indexOf(",")+1)),function(ba){ka(ba,H)},mxUtils.bind(this,function(ba){this.handleError(ba)}),U)):null!=
-C&&"function"===typeof C.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(C,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(C,mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?ka(ba.responseText,H):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=C&&"function"===typeof C.substring&&
-this.isLucidChartData(C)?this.convertLucidChart(C,mxUtils.bind(this,function(ba){ka(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==C||"object"!==typeof C||null==C.format||null==C.data&&null==C.url?(C=U(C),ka(C,H)):this.loadDescriptor(C,mxUtils.bind(this,function(ba){ka(ia(),H)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var B=window.opener||window.parent;z="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
-"ready";B.postMessage(z,"*");if("json"==urlParams.proto){var I=this.editor.graph.openLink;this.editor.graph.openLink=function(H,C,R){I.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",href:H,target:C,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,k,l,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",d+(null!=l?" ("+l+")":""));mxUtils.write(x,d);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",
+fa=C.rect.width+2*Z,ea=C.rect.height+2*Z;R=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();fa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,fa):fa,ba.width-80);ba=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,ba.height-80);this.diagramContainer.style.width=fa+"px";this.diagramContainer.style.height=ba+"px";var ia=this.editor.graph;ba=ia.maxFitScale;ia.maxFitScale=aa;ia.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=
+this.minInlineWidth&&ia.getGraphBounds().width<this.minInlineWidth){var la=ia.container.scrollTop;this.resetScrollbars();ia.container.scrollTop=la}ia.maxFitScale=ba;ia.container.scrollTop-=Z;ia.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[C]));ia.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ia.container.style.top);
+var da=ia.getGraphBounds();ia.container.clientWidth>da.width+2*Z&&(ia.container.scrollLeft=da.x+(da.width+Z-ia.container.clientWidth)/2)}),10)})}null!=C.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=C.noExitBtn);null!=C.title&&null!=this.buttonContainer&&this.setEmbedTitle(C.title);try{C.libs&&this.sidebar.showEntries(C.libs)}catch(ba){}C=null!=C.xmlpng?this.extractGraphModelFromPng(C.xmlpng):null!=C.descriptor?C.descriptor:C.xml}else{if("merge"==C.action){var ca=this.getCurrentFile();
+null!=ca&&(v=T(C.xml),null!=v&&""!=v&&ca.mergeFile(new LocalFile(this,v),function(){B.postMessage(JSON.stringify({event:"merge",message:C}),"*")},function(ba){B.postMessage(JSON.stringify({event:"merge",message:C,error:ba}),"*")}))}else"remoteInvokeReady"==C.action?this.handleRemoteInvokeReady(B):"remoteInvoke"==C.action?this.handleRemoteInvoke(C,G.origin):"remoteInvokeResponse"==C.action?this.handleRemoteInvokeResponse(C):B.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(C)}),
+"*");return}}catch(ba){this.handleError(ba)}}var ha=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ka=mxUtils.bind(this,function(ba,ia){l=!0;try{d(ba,ia,null,S)}catch(la){this.handleError(la)}l=!1;null!=urlParams.modified&&this.clearStatus();x=ha();n&&null==k&&(k=mxUtils.bind(this,function(la,da){la=ha();la==x||l||(da=this.createLoadMessage("autosave"),da.xml=la,(window.opener||window.parent).postMessage(JSON.stringify(da),
+"*"));x=la}),this.editor.graph.model.addListener(mxEvent.CHANGE,k),this.editor.graph.addListener("gridSizeChanged",k),this.editor.graph.addListener("shadowVisibleChanged",k),this.addListener("pageFormatChanged",k),this.addListener("pageScaleChanged",k),this.addListener("backgroundColorChanged",k),this.addListener("backgroundImageChanged",k),this.addListener("foldingEnabledChanged",k),this.addListener("mathEnabledChanged",k),this.addListener("gridEnabledChanged",k),this.addListener("guidesEnabledChanged",
+k),this.addListener("pageViewChanged",k));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),ia.xml=ba,B.postMessage(JSON.stringify(ia),"*");null!=R&&R()});null!=C&&"function"===typeof C.substring&&"data:application/vnd.visio;base64,"==C.substring(0,34)?(T="0M8R4KGxGuE"==C.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(C.substring(C.indexOf(",")+1)),function(ba){ka(ba,G)},mxUtils.bind(this,function(ba){this.handleError(ba)}),T)):null!=
+C&&"function"===typeof C.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(C,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(C,mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?ka(ba.responseText,G):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=C&&"function"===typeof C.substring&&
+this.isLucidChartData(C)?this.convertLucidChart(C,mxUtils.bind(this,function(ba){ka(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==C||"object"!==typeof C||null==C.format||null==C.data&&null==C.url?(C=T(C),ka(C,G)):this.loadDescriptor(C,mxUtils.bind(this,function(ba){ka(ha(),G)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var B=window.opener||window.parent;A="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
+"ready";B.postMessage(A,"*");if("json"==urlParams.proto){var I=this.editor.graph.openLink;this.editor.graph.openLink=function(G,C,R){I.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",href:G,target:C,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,k,l,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",d+(null!=l?" ("+l+")":""));mxUtils.write(x,d);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",
k);return x};EditorUi.prototype.setEmbedTitle=function(d){d=this.createStatusDiv(d);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(d):this.buttonContainer.appendChild(d);this.embedFilenameSpan=d};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var d=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==
this.buttonContainer;this.buttonContainer.innerText="";d&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),
mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};
EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(d){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var k=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(l){if(0<l.length)try{var n=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(l,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var z=n.value;n.value=JSON.stringify(JSON.parse(z));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=z}catch(B){this.handleError(B)}}));x.setAttribute("title","copy");x.className="geBtn";l.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(k.container,620,460,!0,!0);k.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(k){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
+function(){var k=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(l){if(0<l.length)try{var n=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(x){this.handleError(x)}}),null,null,null,null,mxUtils.bind(this,function(l,n){var x=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var A=n.value;n.value=JSON.stringify(JSON.parse(A));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=A}catch(B){this.handleError(B)}}));x.setAttribute("title","copy");x.className="geBtn";l.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(k.container,620,460,!0,!0);k.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(k){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
!1;k.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;k.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(d,k){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,k)}))};EditorUi.prototype.doImportCsv=function(d,k){try{var l=d.split("\n"),n=[],x=[],z=[],B={};if(0<l.length){var I={},H=this.editor.graph,C=null,R=null,U=null,S=null,
-Q=null,v=null,A=null,N="whiteSpace=wrap;html=1;",J=null,K=null,m="",t="auto",D="auto",M=!1,L=null,O=null,P=40,T=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=k?k(Ma):(H.setSelectionCells(Ma),H.scrollCellToVisible(H.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=H.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var fa=null,ea="auto";K=null;for(var ca=[],ia=null,ka=null,ba=0;ba<l.length&&"#"==l[ba].charAt(0);){d=l[ba].replace(/\r$/,
-"");for(ba++;ba<l.length&&"\\"==d.charAt(d.length-1)&&"#"==l[ba].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(l[ba].substring(1)),ba++;if("#"!=d.charAt(1)){var ha=d.indexOf(":");if(0<ha){var ma=mxUtils.trim(d.substring(1,ha)),da=mxUtils.trim(d.substring(ha+1));"label"==ma?fa=Graph.sanitizeHtml(da):"labelname"==ma&&0<da.length&&"-"!=da?Q=da:"labels"==ma&&0<da.length&&"-"!=da?A=JSON.parse(da):"style"==ma?R=da:"parentstyle"==ma?N=da:"unknownStyle"==ma&&"-"!=da?v=da:"stylename"==ma&&0<da.length&&
-"-"!=da?S=da:"styles"==ma&&0<da.length&&"-"!=da?U=JSON.parse(da):"vars"==ma&&0<da.length&&"-"!=da?C=JSON.parse(da):"identity"==ma&&0<da.length&&"-"!=da?J=da:"parent"==ma&&0<da.length&&"-"!=da?K=da:"namespace"==ma&&0<da.length&&"-"!=da?m=da:"width"==ma?t=da:"height"==ma?D=da:"collapsed"==ma&&"-"!=da?M="true"==da:"left"==ma&&0<da.length?L=da:"top"==ma&&0<da.length?O=da:"ignore"==ma?ka=da.split(","):"connect"==ma?ca.push(JSON.parse(da)):"link"==ma?ia=da:"padding"==ma?X=parseFloat(da):"edgespacing"==
-ma?P=parseFloat(da):"nodespacing"==ma?T=parseFloat(da):"levelspacing"==ma?V=parseFloat(da):"layout"==ma&&(ea=da)}}}if(null==l[ba])throw Error(mxResources.get("invalidOrMissingFile"));var va=this.editor.csvToArray(l[ba].replace(/\r$/,""));ha=d=null;ma=[];for(da=0;da<va.length;da++)J==va[da]&&(d=da),K==va[da]&&(ha=da),ma.push(mxUtils.trim(va[da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+ma[0]+"%");if(null!=ca)for(var ra=0;ra<ca.length;ra++)null==I[ca[ra].to]&&
-(I[ca[ra].to]={});J=[];for(da=ba+1;da<l.length;da++){var wa=this.editor.csvToArray(l[da].replace(/\r$/,""));if(null==wa){var oa=40<l[da].length?l[da].substring(0,40)+"...":l[da];throw Error(oa+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<wa.length&&J.push(wa)}H.model.beginUpdate();try{for(da=0;da<J.length;da++){wa=J[da];var ja=null,na=null!=d?m+wa[d]:null;l=!1;null!=na&&(ja=H.model.getCell(na),l=null==ja||0<=mxUtils.indexOf(n,ja));var ua=new mxCell(fa,new mxGeometry(Z,Y,0,0),R||
-"whiteSpace=wrap;html=1;");ua.collapsed=M;ua.vertex=!0;ua.id=na;null==ja||l||H.model.setCollapsed(ja,M);for(var qa=0;qa<wa.length;qa++)H.setAttributeForCell(ua,ma[qa],wa[qa]),null==ja||l||H.setAttributeForCell(ja,ma[qa],wa[qa]);if(null!=Q&&null!=A){var Aa=A[ua.getAttribute(Q)];null!=Aa&&(H.labelChanged(ua,Aa),null==ja||l||H.cellLabelChanged(ja,Aa))}if(null!=S&&null!=U){var Ca=U[ua.getAttribute(S)];null!=Ca&&(ua.style=Ca)}H.setAttributeForCell(ua,"placeholders","1");ua.style=H.replacePlaceholders(ua,
-ua.style,C);null==ja||l?H.fireEvent(new mxEventObject("cellsInserted","cells",[ua])):(H.model.setStyle(ja,ua.style),0>mxUtils.indexOf(z,ja)&&z.push(ja),H.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));l=null!=ja;ja=ua;if(!l)for(ra=0;ra<ca.length;ra++)I[ca[ra].to][ja.getAttribute(ca[ra].to)]=ja;null!=ia&&"link"!=ia&&(H.setLinkForCell(ja,ja.getAttribute(ia)),H.setAttributeForCell(ja,ia,null));var Da=this.editor.graph.getPreferredSizeForCell(ja);K=null!=ha?H.model.getCell(m+wa[ha]):null;
-if(ja.vertex){oa=null!=K?0:Z;ba=null!=K?0:aa;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=oa+parseFloat(ja.getAttribute(L)));null!=O&&null!=ja.getAttribute(O)&&(ja.geometry.y=ba+parseFloat(ja.getAttribute(O)));var za="@"==t.charAt(0)?ja.getAttribute(t.substring(1)):null;ja.geometry.width=null!=za&&"auto"!=za?parseFloat(ja.getAttribute(t.substring(1))):"auto"==t||"auto"==za?Da.width+X:parseFloat(t);var Ba="@"==D.charAt(0)?ja.getAttribute(D.substring(1)):null;ja.geometry.height=null!=Ba&&"auto"!=
-Ba&&"width"!=D?parseFloat(Ba):"auto"==D||"auto"==Ba?Da.height+X:"width"==D?ja.geometry.width:parseFloat(D);Y+=ja.geometry.height+T}l?(null==B[na]&&(B[na]=[]),B[na].push(ja)):(n.push(ja),null!=K?(K.style=H.replacePlaceholders(K,N,C),H.addCell(ja,K),x.push(K)):z.push(H.addCell(ja)))}for(da=0;da<x.length;da++)za="@"==t.charAt(0)?x[da].getAttribute(t.substring(1)):null,Ba="@"==D.charAt(0)?x[da].getAttribute(D.substring(1)):null,"auto"!=t&&"auto"!=za||"auto"!=D&&"auto"!=Ba||H.updateGroupBounds([x[da]],
-X,!0);var Ka=z.slice(),Ma=z.slice();for(ra=0;ra<ca.length;ra++){var Ea=ca[ra];for(da=0;da<n.length;da++){ja=n[da];var Ia=mxUtils.bind(this,function(Ta,Wa,la){var xa=Wa.getAttribute(la.from);if(null!=xa&&""!=xa){xa=xa.split(",");for(var sa=0;sa<xa.length;sa++){var pa=I[la.to][xa[sa]];if(null==pa&&null!=v){pa=new mxCell(xa[sa],new mxGeometry(Z,aa,0,0),v);pa.style=H.replacePlaceholders(Wa,pa.style,C);var ta=this.editor.graph.getPreferredSizeForCell(pa);pa.geometry.width=ta.width+X;pa.geometry.height=
-ta.height+X;I[la.to][xa[sa]]=pa;pa.vertex=!0;pa.id=xa[sa];z.push(H.addCell(pa))}if(null!=pa){ta=la.label;null!=la.fromlabel&&(ta=(Wa.getAttribute(la.fromlabel)||"")+(ta||""));null!=la.sourcelabel&&(ta=H.replacePlaceholders(Wa,la.sourcelabel,C)+(ta||""));null!=la.tolabel&&(ta=(ta||"")+(pa.getAttribute(la.tolabel)||""));null!=la.targetlabel&&(ta=(ta||"")+H.replacePlaceholders(pa,la.targetlabel,C));var ya="target"==la.placeholders==!la.invert?pa:Ta;ya=null!=la.style?H.replacePlaceholders(ya,la.style,
-C):H.createCurrentEdgeStyle();ta=H.insertEdge(null,null,ta||"",la.invert?pa:Ta,la.invert?Ta:pa,ya);if(null!=la.labels)for(ya=0;ya<la.labels.length;ya++){var Ga=la.labels[ya],Ja=new mxCell(Ga.label||ya,new mxGeometry(null!=Ga.x?Ga.x:0,null!=Ga.y?Ga.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Ga.placeholders&&(Ja.value=H.replacePlaceholders("target"==Ga.placeholders==!la.invert?pa:Ta,Ja.value,C));if(null!=Ga.dx||null!=Ga.dy)Ja.geometry.offset=new mxPoint(null!=
-Ga.dx?Ga.dx:0,null!=Ga.dy?Ga.dy:0);ta.insert(Ja)}if(null!=la.data)for(var Na in la.data)H.setAttributeForCell(ta,Na,la.data[Na]);Ma.push(ta);mxUtils.remove(la.invert?Ta:pa,Ka)}}}});Ia(ja,ja,Ea);if(null!=B[ja.id])for(qa=0;qa<B[ja.id].length;qa++)Ia(ja,B[ja.id][qa],Ea)}}if(null!=ka)for(da=0;da<n.length;da++)for(ja=n[da],qa=0;qa<ka.length;qa++)H.setAttributeForCell(ja,mxUtils.trim(ka[qa]),null);if(0<z.length){var Qa=new mxParallelEdgeLayout(H);Qa.spacing=P;Qa.checkOverlap=!0;var La=function(){0<Qa.spacing&&
-Qa.execute(H.getDefaultParent());for(var Ta=0;Ta<z.length;Ta++){var Wa=H.getCellGeometry(z[Ta]);Wa.x=Math.round(H.snap(Wa.x));Wa.y=Math.round(H.snap(Wa.y));"auto"==t&&(Wa.width=Math.round(H.snap(Wa.width)));"auto"==D&&(Wa.height=Math.round(H.snap(Wa.height)))}};if("["==ea.charAt(0)){var Ha=W;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(ea)),function(){La();Ha()});W=null}else if("circle"==ea){var Sa=new mxCircleLayout(H);Sa.disableEdgeStyle=!1;Sa.resetEdges=!1;var $a=Sa.isVertexIgnored;
-Sa.isVertexIgnored=function(Ta){return $a.apply(this,arguments)||0>mxUtils.indexOf(z,Ta)};this.executeLayout(function(){Sa.execute(H.getDefaultParent());La()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Ma.length==2*z.length-1&&1==Ka.length){H.view.validate();var db=new mxCompactTreeLayout(H,"horizontaltree"==ea);db.levelDistance=T;db.edgeRouting=!1;db.resetEdges=!1;db.sortEdges=!0;this.executeLayout(function(){db.execute(H.getDefaultParent(),0<Ka.length?Ka[0]:null)},
-!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==Ka.length){H.view.validate();var fb=new mxHierarchicalLayout(H,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=T;fb.parallelEdgeSpacing=P;fb.interRankCellSpacing=V;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(H.getDefaultParent(),Ma);H.moveCells(Ma,Z,aa)},!0,W);W=null}else if("orgchart"==ea){H.view.validate();var Ya=new mxOrgChartLayout(H,2,V,T),eb=Ya.isVertexIgnored;
-Ya.isVertexIgnored=function(Ta){return eb.apply(this,arguments)||0>mxUtils.indexOf(z,Ta)};this.executeLayout(function(){Ya.execute(H.getDefaultParent());La()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Ma.length>z.length){H.view.validate();var Xa=new mxFastOrganicLayout(H);Xa.forceConstant=3*T;Xa.disableEdgeStyle=!1;Xa.resetEdges=!1;var jb=Xa.isVertexIgnored;Xa.isVertexIgnored=function(Ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(z,Ta)};this.executeLayout(function(){Xa.execute(H.getDefaultParent());
-La()},!0,W);W=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=W&&W()}}catch(Ta){this.handleError(Ta)}};EditorUi.prototype.getSearch=function(d){var k="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var l="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(k+=l+n+"="+urlParams[n],l="&")}else k=window.location.search;return k};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var k=0<d.indexOf("?")?1:0;
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(d,k){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,k)}))};EditorUi.prototype.doImportCsv=function(d,k){try{var l=d.split("\n"),n=[],x=[],A=[],B={};if(0<l.length){var I={},G=this.editor.graph,C=null,R=null,T=null,S=null,
+Q=null,v=null,z=null,N="whiteSpace=wrap;html=1;",J=null,K=null,m="",t="auto",D="auto",M=!1,L=null,O=null,P=40,U=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=k?k(Ba):(G.setSelectionCells(Ba),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var fa=null,ea="auto";K=null;for(var ca=[],ha=null,ka=null,ba=0;ba<l.length&&"#"==l[ba].charAt(0);){d=l[ba].replace(/\r$/,
+"");for(ba++;ba<l.length&&"\\"==d.charAt(d.length-1)&&"#"==l[ba].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(l[ba].substring(1)),ba++;if("#"!=d.charAt(1)){var ia=d.indexOf(":");if(0<ia){var la=mxUtils.trim(d.substring(1,ia)),da=mxUtils.trim(d.substring(ia+1));"label"==la?fa=Graph.sanitizeHtml(da):"labelname"==la&&0<da.length&&"-"!=da?Q=da:"labels"==la&&0<da.length&&"-"!=da?z=JSON.parse(da):"style"==la?R=da:"parentstyle"==la?N=da:"unknownStyle"==la&&"-"!=da?v=da:"stylename"==la&&0<da.length&&
+"-"!=da?S=da:"styles"==la&&0<da.length&&"-"!=da?T=JSON.parse(da):"vars"==la&&0<da.length&&"-"!=da?C=JSON.parse(da):"identity"==la&&0<da.length&&"-"!=da?J=da:"parent"==la&&0<da.length&&"-"!=da?K=da:"namespace"==la&&0<da.length&&"-"!=da?m=da:"width"==la?t=da:"height"==la?D=da:"collapsed"==la&&"-"!=da?M="true"==da:"left"==la&&0<da.length?L=da:"top"==la&&0<da.length?O=da:"ignore"==la?ka=da.split(","):"connect"==la?ca.push(JSON.parse(da)):"link"==la?ha=da:"padding"==la?X=parseFloat(da):"edgespacing"==
+la?P=parseFloat(da):"nodespacing"==la?U=parseFloat(da):"levelspacing"==la?V=parseFloat(da):"layout"==la&&(ea=da)}}}if(null==l[ba])throw Error(mxResources.get("invalidOrMissingFile"));var ra=this.editor.csvToArray(l[ba].replace(/\r$/,""));ia=d=null;la=[];for(da=0;da<ra.length;da++)J==ra[da]&&(d=da),K==ra[da]&&(ia=da),la.push(mxUtils.trim(ra[da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+la[0]+"%");if(null!=ca)for(var pa=0;pa<ca.length;pa++)null==I[ca[pa].to]&&
+(I[ca[pa].to]={});J=[];for(da=ba+1;da<l.length;da++){var sa=this.editor.csvToArray(l[da].replace(/\r$/,""));if(null==sa){var va=40<l[da].length?l[da].substring(0,40)+"...":l[da];throw Error(va+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<sa.length&&J.push(sa)}G.model.beginUpdate();try{for(da=0;da<J.length;da++){sa=J[da];var ja=null,ma=null!=d?m+sa[d]:null;l=!1;null!=ma&&(ja=G.model.getCell(ma),l=null==ja||0<=mxUtils.indexOf(n,ja));var wa=new mxCell(fa,new mxGeometry(Z,Y,0,0),R||
+"whiteSpace=wrap;html=1;");wa.collapsed=M;wa.vertex=!0;wa.id=ma;null==ja||l||G.model.setCollapsed(ja,M);for(var oa=0;oa<sa.length;oa++)G.setAttributeForCell(wa,la[oa],sa[oa]),null==ja||l||G.setAttributeForCell(ja,la[oa],sa[oa]);if(null!=Q&&null!=z){var ya=z[wa.getAttribute(Q)];null!=ya&&(G.labelChanged(wa,ya),null==ja||l||G.cellLabelChanged(ja,ya))}if(null!=S&&null!=T){var Ca=T[wa.getAttribute(S)];null!=Ca&&(wa.style=Ca)}G.setAttributeForCell(wa,"placeholders","1");wa.style=G.replacePlaceholders(wa,
+wa.style,C);null==ja||l?G.fireEvent(new mxEventObject("cellsInserted","cells",[wa])):(G.model.setStyle(ja,wa.style),0>mxUtils.indexOf(A,ja)&&A.push(ja),G.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));l=null!=ja;ja=wa;if(!l)for(pa=0;pa<ca.length;pa++)I[ca[pa].to][ja.getAttribute(ca[pa].to)]=ja;null!=ha&&"link"!=ha&&(G.setLinkForCell(ja,ja.getAttribute(ha)),G.setAttributeForCell(ja,ha,null));var Fa=this.editor.graph.getPreferredSizeForCell(ja);K=null!=ia?G.model.getCell(m+sa[ia]):null;
+if(ja.vertex){va=null!=K?0:Z;ba=null!=K?0:aa;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=va+parseFloat(ja.getAttribute(L)));null!=O&&null!=ja.getAttribute(O)&&(ja.geometry.y=ba+parseFloat(ja.getAttribute(O)));var Aa="@"==t.charAt(0)?ja.getAttribute(t.substring(1)):null;ja.geometry.width=null!=Aa&&"auto"!=Aa?parseFloat(ja.getAttribute(t.substring(1))):"auto"==t||"auto"==Aa?Fa.width+X:parseFloat(t);var Ea="@"==D.charAt(0)?ja.getAttribute(D.substring(1)):null;ja.geometry.height=null!=Ea&&"auto"!=
+Ea&&"width"!=D?parseFloat(Ea):"auto"==D||"auto"==Ea?Fa.height+X:"width"==D?ja.geometry.width:parseFloat(D);Y+=ja.geometry.height+U}l?(null==B[ma]&&(B[ma]=[]),B[ma].push(ja)):(n.push(ja),null!=K?(K.style=G.replacePlaceholders(K,N,C),G.addCell(ja,K),x.push(K)):A.push(G.addCell(ja)))}for(da=0;da<x.length;da++)Aa="@"==t.charAt(0)?x[da].getAttribute(t.substring(1)):null,Ea="@"==D.charAt(0)?x[da].getAttribute(D.substring(1)):null,"auto"!=t&&"auto"!=Aa||"auto"!=D&&"auto"!=Ea||G.updateGroupBounds([x[da]],
+X,!0);var Oa=A.slice(),Ba=A.slice();for(pa=0;pa<ca.length;pa++){var Da=ca[pa];for(da=0;da<n.length;da++){ja=n[da];var Ia=mxUtils.bind(this,function(Sa,db,La){var hb=db.getAttribute(La.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var ob=0;ob<hb.length;ob++){var Ja=I[La.to][hb[ob]];if(null==Ja&&null!=v){Ja=new mxCell(hb[ob],new mxGeometry(Z,aa,0,0),v);Ja.style=G.replacePlaceholders(db,Ja.style,C);var Wa=this.editor.graph.getPreferredSizeForCell(Ja);Ja.geometry.width=Wa.width+X;Ja.geometry.height=
+Wa.height+X;I[La.to][hb[ob]]=Ja;Ja.vertex=!0;Ja.id=hb[ob];A.push(G.addCell(Ja))}if(null!=Ja){Wa=La.label;null!=La.fromlabel&&(Wa=(db.getAttribute(La.fromlabel)||"")+(Wa||""));null!=La.sourcelabel&&(Wa=G.replacePlaceholders(db,La.sourcelabel,C)+(Wa||""));null!=La.tolabel&&(Wa=(Wa||"")+(Ja.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(Wa=(Wa||"")+G.replacePlaceholders(Ja,La.targetlabel,C));var gb="target"==La.placeholders==!La.invert?Ja:Sa;gb=null!=La.style?G.replacePlaceholders(gb,La.style,
+C):G.createCurrentEdgeStyle();Wa=G.insertEdge(null,null,Wa||"",La.invert?Ja:Sa,La.invert?Sa:Ja,gb);if(null!=La.labels)for(gb=0;gb<La.labels.length;gb++){var ab=La.labels[gb],pb=new mxCell(ab.label||gb,new mxGeometry(null!=ab.x?ab.x:0,null!=ab.y?ab.y:0,0,0),"resizable=0;html=1;");pb.vertex=!0;pb.connectable=!1;pb.geometry.relative=!0;null!=ab.placeholders&&(pb.value=G.replacePlaceholders("target"==ab.placeholders==!La.invert?Ja:Sa,pb.value,C));if(null!=ab.dx||null!=ab.dy)pb.geometry.offset=new mxPoint(null!=
+ab.dx?ab.dx:0,null!=ab.dy?ab.dy:0);Wa.insert(pb)}if(null!=La.data)for(var cb in La.data)G.setAttributeForCell(Wa,cb,La.data[cb]);Ba.push(Wa);mxUtils.remove(La.invert?Sa:Ja,Oa)}}}});Ia(ja,ja,Da);if(null!=B[ja.id])for(oa=0;oa<B[ja.id].length;oa++)Ia(ja,B[ja.id][oa],Da)}}if(null!=ka)for(da=0;da<n.length;da++)for(ja=n[da],oa=0;oa<ka.length;oa++)G.setAttributeForCell(ja,mxUtils.trim(ka[oa]),null);if(0<A.length){var Pa=new mxParallelEdgeLayout(G);Pa.spacing=P;Pa.checkOverlap=!0;var Ha=function(){0<Pa.spacing&&
+Pa.execute(G.getDefaultParent());for(var Sa=0;Sa<A.length;Sa++){var db=G.getCellGeometry(A[Sa]);db.x=Math.round(G.snap(db.x));db.y=Math.round(G.snap(db.y));"auto"==t&&(db.width=Math.round(G.snap(db.width)));"auto"==D&&(db.height=Math.round(G.snap(db.height)))}};if("["==ea.charAt(0)){var Ka=W;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(ea)),function(){Ha();Ka()});W=null}else if("circle"==ea){var Xa=new mxCircleLayout(G);Xa.disableEdgeStyle=!1;Xa.resetEdges=!1;var qb=Xa.isVertexIgnored;
+Xa.isVertexIgnored=function(Sa){return qb.apply(this,arguments)||0>mxUtils.indexOf(A,Sa)};this.executeLayout(function(){Xa.execute(G.getDefaultParent());Ha()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Ba.length==2*A.length-1&&1==Oa.length){G.view.validate();var bb=new mxCompactTreeLayout(G,"horizontaltree"==ea);bb.levelDistance=U;bb.edgeRouting=!1;bb.resetEdges=!1;bb.sortEdges=!0;this.executeLayout(function(){bb.execute(G.getDefaultParent(),0<Oa.length?Oa[0]:null)},
+!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==Oa.length){G.view.validate();var rb=new mxHierarchicalLayout(G,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);rb.intraCellSpacing=U;rb.parallelEdgeSpacing=P;rb.interRankCellSpacing=V;rb.disableEdgeStyle=!1;this.executeLayout(function(){rb.execute(G.getDefaultParent(),Ba);G.moveCells(Ba,Z,aa)},!0,W);W=null}else if("orgchart"==ea){G.view.validate();var Va=new mxOrgChartLayout(G,2,V,U),fb=Va.isVertexIgnored;
+Va.isVertexIgnored=function(Sa){return fb.apply(this,arguments)||0>mxUtils.indexOf(A,Sa)};this.executeLayout(function(){Va.execute(G.getDefaultParent());Ha()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Ba.length>A.length){G.view.validate();var $a=new mxFastOrganicLayout(G);$a.forceConstant=3*U;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var jb=$a.isVertexIgnored;$a.isVertexIgnored=function(Sa){return jb.apply(this,arguments)||0>mxUtils.indexOf(A,Sa)};this.executeLayout(function(){$a.execute(G.getDefaultParent());
+Ha()},!0,W);W=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=W&&W()}}catch(Sa){this.handleError(Sa)}};EditorUi.prototype.getSearch=function(d){var k="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var l="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(k+=l+n+"="+urlParams[n],l="&")}else k=window.location.search;return k};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var k=0<d.indexOf("?")?1:0;
if("1"==urlParams.offline)d+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(l,n)&&(d=0==k?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+urlParams[n],k++))}return d};EditorUi.prototype.showLinkDialog=function(d,k,l,n,x){d=new LinkDialog(this,d,k,l,!0,n,x);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var k=1;null==this.drive&&
"function"!==typeof window.DriveClient||k++;null==this.dropbox&&"function"!==typeof window.DropboxClient||k++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||k++;null!=this.gitHub&&k++;null!=this.gitLab&&k++;d&&isLocalStorage&&"1"==urlParams.browser&&k++;return k};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),k=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(k);
this.menus.get("viewZoom").setEnabled(k);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));
@@ -13319,79 +13321,79 @@ this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").se
this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=k);this.actions.get("makeCopy").setEnabled(null!=k&&!k.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==k||!k.isRestricted()));this.actions.get("publishLink").setEnabled(null!=k&&!k.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=
this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=k&&k.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=k);this.actions.get("properties").setEnabled(null!=k);this.menus.get("publish").setEnabled(null!=k&&!k.isRestricted());k=this.actions.get("findReplace");k.setEnabled("none"!=this.diagramContainer.style.display);k.label=mxResources.get("find")+(d.isEnabled()?
"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var F=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);F.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,k,l,n,
-x,z,B,I){var H=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(k,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(k,"svg",mxUtils.getXml(H.getSvg(n,x,z)),"image/svg+xml");else{var C=d.getFileData(!0,null,null,null,null,!0),R=H.getGraphBounds(),U=Math.floor(R.width*x/H.view.scale),S=Math.floor(R.height*x/H.view.scale);if(C.length<=MAX_REQUEST_SIZE&&U*S<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.editor.isExportToCanvas()){var Q=
-{globalVars:H.getExportVariables()};I&&(Q.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(k,l,function(v,A){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(A||"0")+(null!=v?"&filename="+encodeURIComponent(v):"")+"&extras="+encodeURIComponent(JSON.stringify(Q))+(0<B?"&dpi="+B:"")+"&bg="+(null!=n?n:"none")+"&w="+U+"&h="+S+"&border="+z+"&xml="+encodeURIComponent(C))})}else"png"==l?d.exportImage(x,null==n||"none"==n,!0,!1,!1,z,!0,!1,null,I,B):d.exportImage(x,
-!1,!0,!1,!1,z,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,k="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=d;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else k=d.getIndexableText();
+x,A,B,I){var G=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(k,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(k,"svg",mxUtils.getXml(G.getSvg(n,x,A)),"image/svg+xml");else{var C=d.getFileData(!0,null,null,null,null,!0),R=G.getGraphBounds(),T=Math.floor(R.width*x/G.view.scale),S=Math.floor(R.height*x/G.view.scale);if(C.length<=MAX_REQUEST_SIZE&&T*S<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.editor.isExportToCanvas()){var Q=
+{globalVars:G.getExportVariables()};I&&(Q.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});d.saveRequest(k,l,function(v,z){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(z||"0")+(null!=v?"&filename="+encodeURIComponent(v):"")+"&extras="+encodeURIComponent(JSON.stringify(Q))+(0<B?"&dpi="+B:"")+"&bg="+(null!=n?n:"none")+"&w="+T+"&h="+S+"&border="+A+"&xml="+encodeURIComponent(C))})}else"png"==l?d.exportImage(x,null==n||"none"==n,!0,!1,!1,A,!0,!1,null,I,B):d.exportImage(x,
+!1,!0,!1,!1,A,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,k="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=d;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else k=d.getIndexableText();
this.editor.graph.setEnabled(!0);return k};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var k={},l=document.createElement("div");l.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var z={};try{var B=mxSettings.getCustomLibraries();for(d=0;d<B.length;d++){var I=B[d];if("R"==I.substring(0,1)){var H=JSON.parse(decodeURIComponent(I.substring(1)));z[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){x.innerText="";if(0==C.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<
-C.length;R++){var U=C[R];z[U.id]&&(k[U.id]=U);var S=this.addCheckbox(x,U.title,z[U.id]);(function(Q,v){mxEvent.addListener(v,"change",function(){this.checked?k[Q.id]=Q:delete k[Q.id]})})(U,S)}},mxUtils.bind(this,function(C){x.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=C&&null!=C.message?C.message:mxResources.get("unknownError"));x.appendChild(R)}));l.appendChild(x);l=new CustomDialog(this,
-l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var C=0,R;for(R in k)null==z[R]&&(C++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(S){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,S,U)),this.showSidebar()}catch(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(k[R]));
-for(R in z)k[R]||this.closeLibrary(new RemoteLibrary(this,null,z[R]));0==C&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
+IMAGE_PATH+'/spin.gif"></div>';var A={};try{var B=mxSettings.getCustomLibraries();for(d=0;d<B.length;d++){var I=B[d];if("R"==I.substring(0,1)){var G=JSON.parse(decodeURIComponent(I.substring(1)));A[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){x.innerText="";if(0==C.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<
+C.length;R++){var T=C[R];A[T.id]&&(k[T.id]=T);var S=this.addCheckbox(x,T.title,A[T.id]);(function(Q,v){mxEvent.addListener(v,"change",function(){this.checked?k[Q.id]=Q:delete k[Q.id]})})(T,S)}},mxUtils.bind(this,function(C){x.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=C&&null!=C.message?C.message:mxResources.get("unknownError"));x.appendChild(R)}));l.appendChild(x);l=new CustomDialog(this,
+l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var C=0,R;for(R in k)null==A[R]&&(C++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",[T.downloadUrl],null,mxUtils.bind(this,function(S){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,S,T)),this.showSidebar()}catch(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(k[R]));
+for(R in A)k[R]||this.closeLibrary(new RemoteLibrary(this,null,A[R]));0==C&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var k=0;k<this.remoteInvokeQueue.length;k++)d.postMessage(this.remoteInvokeQueue[k],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var k=d.msgMarkers,l=this.remoteInvokeCallbacks[k.callbackId];if(null==l)throw Error("No callback for "+(null!=k?k.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):
-l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[k.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,k,l,n,x){var z=!0,B=window.setTimeout(mxUtils.bind(this,function(){z=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),I=mxUtils.bind(this,function(){window.clearTimeout(B);z&&n.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(B);z&&x.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:I,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:k,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,k){var l=mxUtils.bind(this,function(C,R){var U={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=R?U.error={errResp:R}:null!=C&&(U.resp=C);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var n=d.funtionName,x=
-this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var z=!1,B=0;B<x.allowedDomains.length;B++)if(k=="https://"+x.allowedDomains[B]){z=!0;break}if(!z){l(null,"Invalid Call: "+n+" is not allowed.");return}}var I=d.functionArgs;Array.isArray(I)||(I=[]);if(x.isAsync)I.push(function(){l(Array.prototype.slice.apply(arguments))}),I.push(function(C){l(null,C||"Unkown Error")}),this[n].apply(this,I);else{var H=this[n].apply(this,I);l([H])}}else l(null,"Invalid Call: "+
-n+" is not found.")}catch(C){l(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(d,k){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var n=l.open("database",2);n.onupgradeneeded=function(x){try{var z=n.result;1>x.oldVersion&&z.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(z.createObjectStore("files",{keyPath:"title"}),z.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(B){null!=k&&k(B)}};n.onsuccess=mxUtils.bind(this,function(x){try{var z=n.result;this.database=z;EditorUi.migrateStorageFiles&&(StorageFile.migrate(z),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(B){if((!B||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var I=document.createElement("iframe");I.style.display="none";
-I.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(I);var H=!0,C=!1,R,U=0,S=mxUtils.bind(this,function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Q=mxUtils.bind(this,function(){U++;v()}),v=mxUtils.bind(this,function(){try{if(U>=R.length)S();else{var N=R[U];StorageFile.getFileContent(this,N,mxUtils.bind(this,
-function(J){null==J||".scratchpad"==N&&J==this.emptyLibraryXml?I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[N]}),"*"):Q()}),Q)}}catch(J){console.log(J)}}),A=mxUtils.bind(this,function(N){try{this.setDatabaseItem(null,[{title:N.title,size:N.data.length,lastModified:Date.now(),type:N.isLib?"L":"F"},{title:N.title,data:N.data}],Q,Q,["filesInfo","files"])}catch(J){console.log(J)}});B=mxUtils.bind(this,function(N){try{if(N.source==I.contentWindow){var J=
-{};try{J=JSON.parse(N.data)}catch(K){}"init"==J.event?(I.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=J.event||C||(H?null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?(R=J.resp[0],H=!1,v()):S():null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?A(J.resp[0]):Q())}}catch(K){console.log(K)}});window.addEventListener("message",B)}})));d(z);z.onversionchange=
-function(){z.close()}}catch(B){null!=k?k(B):null!=window.console&&console.warn(B)}});n.onerror=k;n.onblocked=function(){}}catch(x){null!=k?k(x):null!=window.console&&console.error(x)}else null!=k&&k(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,k,l,n,x){this.openDatabase(mxUtils.bind(this,function(z){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],k=[k]);var B=z.transaction(x,"readwrite");B.oncomplete=l;B.onerror=n;for(z=0;z<x.length;z++)B.objectStore(x[z]).put(null!=
-d&&null!=d[z]?{key:d[z],data:k[z]}:k[z])}catch(I){null!=n&&n(I)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,k,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);var z=x.transaction(n,"readwrite");z.oncomplete=k;z.onerror=l;for(x=0;x<n.length;x++)z.objectStore(n[x]).delete(d[x])}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItem=function(d,k,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var z=x.transaction([n],
-"readonly").objectStore(n).get(d);z.onsuccess=function(){k(z.result)};z.onerror=l}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItems=function(d,k,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),z=[];x.onsuccess=function(B){null==B.target.result?d(z):(z.push(B.target.result.value),B.target.result.continue())};x.onerror=k}catch(B){null!=k&&k(B)}}),k)};EditorUi.prototype.getDatabaseItemKeys=
-function(d,k,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).getAllKeys();x.onsuccess=function(){d(x.result)};x.onerror=k}catch(z){null!=k&&k(z)}}),k)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
+l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[k.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,k,l,n,x){var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),I=mxUtils.bind(this,function(){window.clearTimeout(B);A&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(B);A&&x.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:I,error:G});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:k,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,k){var l=mxUtils.bind(this,function(C,R){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=R?T.error={errResp:R}:null!=C&&(T.resp=C);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var n=d.funtionName,x=
+this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var A=!1,B=0;B<x.allowedDomains.length;B++)if(k=="https://"+x.allowedDomains[B]){A=!0;break}if(!A){l(null,"Invalid Call: "+n+" is not allowed.");return}}var I=d.functionArgs;Array.isArray(I)||(I=[]);if(x.isAsync)I.push(function(){l(Array.prototype.slice.apply(arguments))}),I.push(function(C){l(null,C||"Unkown Error")}),this[n].apply(this,I);else{var G=this[n].apply(this,I);l([G])}}else l(null,"Invalid Call: "+
+n+" is not found.")}catch(C){l(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(d,k){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var n=l.open("database",2);n.onupgradeneeded=function(x){try{var A=n.result;1>x.oldVersion&&A.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(A.createObjectStore("files",{keyPath:"title"}),A.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
+isLocalStorage)}catch(B){null!=k&&k(B)}};n.onsuccess=mxUtils.bind(this,function(x){try{var A=n.result;this.database=A;EditorUi.migrateStorageFiles&&(StorageFile.migrate(A),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(B){if((!B||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var I=document.createElement("iframe");I.style.display="none";
+I.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(I);var G=!0,C=!1,R,T=0,S=mxUtils.bind(this,function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Q=mxUtils.bind(this,function(){T++;v()}),v=mxUtils.bind(this,function(){try{if(T>=R.length)S();else{var N=R[T];StorageFile.getFileContent(this,N,mxUtils.bind(this,
+function(J){null==J||".scratchpad"==N&&J==this.emptyLibraryXml?I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[N]}),"*"):Q()}),Q)}}catch(J){console.log(J)}}),z=mxUtils.bind(this,function(N){try{this.setDatabaseItem(null,[{title:N.title,size:N.data.length,lastModified:Date.now(),type:N.isLib?"L":"F"},{title:N.title,data:N.data}],Q,Q,["filesInfo","files"])}catch(J){console.log(J)}});B=mxUtils.bind(this,function(N){try{if(N.source==I.contentWindow){var J=
+{};try{J=JSON.parse(N.data)}catch(K){}"init"==J.event?(I.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=J.event||C||(G?null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?(R=J.resp[0],G=!1,v()):S():null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?z(J.resp[0]):Q())}}catch(K){console.log(K)}});window.addEventListener("message",B)}})));d(A);A.onversionchange=
+function(){A.close()}}catch(B){null!=k?k(B):null!=window.console&&console.warn(B)}});n.onerror=k;n.onblocked=function(){}}catch(x){null!=k?k(x):null!=window.console&&console.error(x)}else null!=k&&k(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,k,l,n,x){this.openDatabase(mxUtils.bind(this,function(A){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],k=[k]);var B=A.transaction(x,"readwrite");B.oncomplete=l;B.onerror=n;for(A=0;A<x.length;A++)B.objectStore(x[A]).put(null!=
+d&&null!=d[A]?{key:d[A],data:k[A]}:k[A])}catch(I){null!=n&&n(I)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,k,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);var A=x.transaction(n,"readwrite");A.oncomplete=k;A.onerror=l;for(x=0;x<n.length;x++)A.objectStore(n[x]).delete(d[x])}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItem=function(d,k,l,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var A=x.transaction([n],
+"readonly").objectStore(n).get(d);A.onsuccess=function(){k(A.result)};A.onerror=l}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItems=function(d,k,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),A=[];x.onsuccess=function(B){null==B.target.result?d(A):(A.push(B.target.result.value),B.target.result.continue())};x.onerror=k}catch(B){null!=k&&k(B)}}),k)};EditorUi.prototype.getDatabaseItemKeys=
+function(d,k,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var x=n.transaction([l],"readonly").objectStore(l).getAllKeys();x.onsuccess=function(){d(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,k){var l=this.getCurrentFile();null!=l?l.getComments(d,k):d([])};EditorUi.prototype.addComment=function(d,k,l){var n=this.getCurrentFile();null!=n?n.addComment(d,k,l):k(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=
d?d.canComment():!0};EditorUi.prototype.newComment=function(d,k){var l=this.getCurrentFile();return null!=l?l.newComment(d,k):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,k)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,k){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(d,k):k({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=
-function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,k,l,n,x,z,B,I){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(d,k,l,n,x,z,B,I)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,k){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,k)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,k,l,n,x,z,B,I,H,C,R,U,S,Q,v,A){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,k,l,n,x,z,B,I,H,C,R,U,S,Q,v,A)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,k,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,k,l,n,x,A,B,I){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(d,k,l,n,x,A,B,I)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,k){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,k)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,k,l,n,x,A,B,I,G,C,R,T,S,Q,v,z)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,k,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(d,k,l,n)};EditorUi.prototype.convertImageToDataUri=function(d,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,k)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,k,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,k,l,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,k,l,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,k,l,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],k=0;k<localStorage.length;k++){var l=localStorage.key(k),n=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<n.length){var x=
"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&d.push(l)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var k=localStorage.getItem(d);return{title:d,data:k,isLib:"<mxlibrary>"===k.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,g,c,p,q){function u(){for(var A=I.getElementsByTagName("div"),N=0,J=0;J<A.length;J++)"none"!=A[J].style.display&&A[J].parentNode==I&&N++;H.style.display=0==N?"block":"none"}function y(A,N,J,K){function m(){N.removeChild(M);N.removeChild(L);D.style.display="block";t.style.display="block"}x={div:N,comment:A,saveCallback:J,deleteOnCancel:K};var t=N.querySelector(".geCommentTxt"),D=N.querySelector(".geCommentActionsList"),M=document.createElement("textarea");M.className=
-"geCommentEditTxtArea";M.style.minHeight=t.offsetHeight+"px";M.value=A.content;N.insertBefore(M,t);var L=document.createElement("div");L.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){K?(N.parentNode.removeChild(N),u()):m();x=null});O.className="geCommentEditBtn";L.appendChild(O);var P=mxUtils.button(mxResources.get("save"),function(){t.innerText="";A.content=M.value;mxUtils.write(t,A.content);m();J(A);x=null});mxEvent.addListener(M,"keydown",mxUtils.bind(this,
-function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(O.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";L.appendChild(P);N.insertBefore(L,t);D.style.display="none";t.style.display="none";M.focus()}function G(A,N){N.innerText="";A=new Date(A.modifiedDate);var J=b.timeSince(A);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(N,mxResources.get("timeAgo",
-[J],"{1} ago"));N.setAttribute("title",A.toLocaleDateString()+" "+A.toLocaleTimeString())}function E(A){var N=document.createElement("img");N.className="geCommentBusyImg";N.src=IMAGE_PATH+"/spin.gif";A.appendChild(N);A.busyImg=N}function F(A){A.style.border="1px solid red";A.busyImg.parentNode==A&&A.removeChild(A.busyImg)}function d(A){A.style.border="";A.busyImg.parentNode==A&&A.removeChild(A.busyImg)}function k(A,N,J,K,m){function t(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
-var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(fa){W(fa,A);fa.preventDefault();mxEvent.consume(fa)});V.appendChild(Z);Y&&(Z.style.display="none")}function D(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=L;X(A);return{pdiv:Y,replies:W}}function M(X,W,Y,Z,aa){function fa(){E(ka);A.addReply(ia,function(ba){ia.id=ba;A.replies.push(ia);
-d(ka);Y&&Y()},function(ba){ea();F(ka);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){y(ia,ka,function(ba){fa()},!0)}var ca=D().pdiv,ia=b.newComment(X,b.getCurrentUser());ia.pCommentId=A.id;null==A.replies&&(A.replies=[]);var ka=k(ia,A.replies,ca,K+1);W?ea():fa()}if(m||!A.isResolved){H.style.display="none";var L=document.createElement("div");L.className="geCommentContainer";L.setAttribute("data-commentId",A.id);L.style.marginLeft=20*K+
-5+"px";A.isResolved&&(z.style.opacity="0.7");var O=document.createElement("div");O.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=A.user&&null!=A.user.pictureUrl?A.user.pictureUrl:Editor.userImage;O.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";O.appendChild(P);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,null!=A.user?A.user.displayName:mxResources.get("unknownUser"));
-P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",A.id);G(A,T);P.appendChild(T);L.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,A.content||"");L.appendChild(O);A.isLocked&&(L.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);l||A.isLocked||0!=K&&!n||t(mxResources.get("reply"),
-function(){M("",!0)},A.isResolved);P=b.getCurrentUser();null==P||null==A.user||P.id!=A.user.id||l||A.isLocked||(t(mxResources.get("edit"),function(){function X(){y(A,L,function(){E(L);A.editComment(A.content,function(){d(L)},function(W){F(L);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},A.isResolved),t(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(L);A.deleteComment(function(X){if(!0===X){X=L.querySelector(".geCommentTxt");
-X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=L.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);d(L);L.style.opacity="0.5"}else{W=D(A).replies;for(X=0;X<W.length;X++)I.removeChild(W[X]);for(X=0;X<N.length;X++)if(N[X]==A){N.splice(X,1);break}H.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(X){F(L);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},A.isResolved));
-l||A.isLocked||0!=K||t(A.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";A.isResolved=!A.isResolved;mxUtils.write(Y,A.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=A.isResolved?"none":"",aa=D(A).replies,fa="light-dark("+(A.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=fa;for(var ca=aa[ea].querySelectorAll(".geCommentAction"),ia=0;ia<ca.length;ia++)ca[ia]!=
-Y.parentNode&&(ca[ia].style.display=Z);S||(aa[ea].style.display="none")}u()}A.isResolved?M(mxResources.get("reOpened")+": ",!0,W,!1,!0):M(mxResources.get("markedAsResolved"),!1,W,!0)});L.appendChild(O);null!=J?I.insertBefore(L,J.nextSibling):I.appendChild(L);for(J=0;null!=A.replies&&J<A.replies.length;J++)O=A.replies[J],O.isResolved=A.isResolved,k(O,A.replies,null,K+1,m);null!=x&&(x.comment.id==A.id?(m=A.content,A.content=x.comment.content,y(A,L,x.saveCallback,x.deleteOnCancel),A.content=m):null==
-x.comment.id&&x.comment.pCommentId==A.id&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return L}}var l=!b.canComment(),n=b.canReplyToReplies(),x=null,z=document.createElement("div");z.className="geCommentsWin";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.bottom=parseInt(B)+7+"px";z.appendChild(I);var H=document.createElement("span");H.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(H,
-mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=B;C.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var R=B.cloneNode();R.style.backgroundImage="url("+Editor.plusImage+")";R.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(R,"click",function(A){function N(){y(J,K,function(m){E(K);b.addComment(m,function(t){m.id=t;Q.push(m);d(K)},function(t){F(K);
-N();b.handleError(t,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),K=k(J,Q,null,0);N();A.preventDefault();mxEvent.consume(A)});C.appendChild(R)}var U=B.cloneNode();U.style.backgroundImage="url("+Editor.checkImage+")";U.setAttribute("title",mxResources.get("showResolved"));var S=!1;mxEvent.addListener(U,"click",function(A){(S=!S)?U.classList.add("geActiveItem"):U.classList.remove("geActiveItem");v();A.preventDefault();mxEvent.consume(A)});
-C.appendChild(U);b.commentsRefreshNeeded()&&(R=B.cloneNode(),R.style.backgroundImage="url("+Editor.refreshImage+")",R.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(R,"click",function(A){v();A.preventDefault();mxEvent.consume(A)}),C.appendChild(R));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geButton geAdaptiveAsset",mxEvent.addListener(B,
-"click",function(A){q();A.preventDefault();mxEvent.consume(A)}),C.appendChild(B));z.appendChild(C);var Q=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var A=x.div.querySelector(".geCommentEditTxtArea"),N=x.div.querySelector(".geCommentEditBtns");x.comment.content=A.value;A.parentNode.removeChild(A);N.parentNode.removeChild(N)}catch(J){b.handleError(J)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function K(m){if(null!=m){m.sort(function(D,M){return new Date(D.modifiedDate)-new Date(M.modifiedDate)});for(var t=0;t<m.length;t++)K(m[t].replies)}}J.sort(function(m,t){return new Date(m.modifiedDate)-new Date(t.modifiedDate)});I.innerText="";I.appendChild(H);H.style.display="block";Q=J;for(J=0;J<Q.length;J++)K(Q[J].replies),k(Q[J],Q,null,0,S);null!=x&&null==x.comment.id&&
-null==x.comment.pCommentId&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(J){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});v();this.refreshComments=v;C=mxUtils.bind(this,function(){function A(t){var D=J[t.id];if(null!=D)for(G(t,D),D=0;null!=t.replies&&D<t.replies.length;D++)A(t.replies[D])}if(this.window.isVisible()){for(var N=
-I.querySelectorAll(".geCommentDate"),J={},K=0;K<N.length;K++){var m=N[K];J[m.getAttribute("data-commentId")]=m}for(K=0;K<Q.length;K++)A(Q[K])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),z,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
-function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,g,c,p,q,u,y,G,E,F){var d=document.createElement("div");d.style.textAlign="center";F=null!=F?F:44;var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight=F+"px";k.style.lineHeight="1.2em";mxUtils.write(k,f);d.appendChild(k);null!=E&&(k=document.createElement("div"),k.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),k.appendChild(f),
+var CommentsWindow=function(b,f,g,c,p,q){function u(){for(var z=I.getElementsByTagName("div"),N=0,J=0;J<z.length;J++)"none"!=z[J].style.display&&z[J].parentNode==I&&N++;G.style.display=0==N?"block":"none"}function y(z,N,J,K){function m(){N.removeChild(M);N.removeChild(L);D.style.display="block";t.style.display="block"}x={div:N,comment:z,saveCallback:J,deleteOnCancel:K};var t=N.querySelector(".geCommentTxt"),D=N.querySelector(".geCommentActionsList"),M=document.createElement("textarea");M.className=
+"geCommentEditTxtArea";M.style.minHeight=t.offsetHeight+"px";M.value=z.content;N.insertBefore(M,t);var L=document.createElement("div");L.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){K?(N.parentNode.removeChild(N),u()):m();x=null});O.className="geCommentEditBtn";L.appendChild(O);var P=mxUtils.button(mxResources.get("save"),function(){t.innerText="";z.content=M.value;mxUtils.write(t,z.content);m();J(z);x=null});mxEvent.addListener(M,"keydown",mxUtils.bind(this,
+function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(O.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";L.appendChild(P);N.insertBefore(L,t);D.style.display="none";t.style.display="none";M.focus()}function H(z,N){N.innerText="";z=new Date(z.modifiedDate);var J=b.timeSince(z);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(N,mxResources.get("timeAgo",
+[J],"{1} ago"));N.setAttribute("title",z.toLocaleDateString()+" "+z.toLocaleTimeString())}function E(z){var N=document.createElement("img");N.className="geCommentBusyImg";N.src=IMAGE_PATH+"/spin.gif";z.appendChild(N);z.busyImg=N}function F(z){z.style.border="1px solid red";z.busyImg.parentNode==z&&z.removeChild(z.busyImg)}function d(z){z.style.border="";z.busyImg.parentNode==z&&z.removeChild(z.busyImg)}function k(z,N,J,K,m){function t(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
+var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(fa){W(fa,z);fa.preventDefault();mxEvent.consume(fa)});V.appendChild(Z);Y&&(Z.style.display="none")}function D(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=L;X(z);return{pdiv:Y,replies:W}}function M(X,W,Y,Z,aa){function fa(){E(ka);z.addReply(ha,function(ba){ha.id=ba;z.replies.push(ha);
+d(ka);Y&&Y()},function(ba){ea();F(ka);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){y(ha,ka,function(ba){fa()},!0)}var ca=D().pdiv,ha=b.newComment(X,b.getCurrentUser());ha.pCommentId=z.id;null==z.replies&&(z.replies=[]);var ka=k(ha,z.replies,ca,K+1);W?ea():fa()}if(m||!z.isResolved){G.style.display="none";var L=document.createElement("div");L.className="geCommentContainer";L.setAttribute("data-commentId",z.id);L.style.marginLeft=20*K+
+5+"px";z.isResolved&&(A.style.opacity="0.7");var O=document.createElement("div");O.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=z.user&&null!=z.user.pictureUrl?z.user.pictureUrl:Editor.userImage;O.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";O.appendChild(P);var U=document.createElement("div");U.className="geCommentUsername";mxUtils.write(U,null!=z.user?z.user.displayName:mxResources.get("unknownUser"));
+P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",z.id);H(z,U);P.appendChild(U);L.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,z.content||"");L.appendChild(O);z.isLocked&&(L.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);l||z.isLocked||0!=K&&!n||t(mxResources.get("reply"),
+function(){M("",!0)},z.isResolved);P=b.getCurrentUser();null==P||null==z.user||P.id!=z.user.id||l||z.isLocked||(t(mxResources.get("edit"),function(){function X(){y(z,L,function(){E(L);z.editComment(z.content,function(){d(L)},function(W){F(L);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},z.isResolved),t(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(L);z.deleteComment(function(X){if(!0===X){X=L.querySelector(".geCommentTxt");
+X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=L.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);d(L);L.style.opacity="0.5"}else{W=D(z).replies;for(X=0;X<W.length;X++)I.removeChild(W[X]);for(X=0;X<N.length;X++)if(N[X]==z){N.splice(X,1);break}G.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(X){F(L);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},z.isResolved));
+l||z.isLocked||0!=K||t(z.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";z.isResolved=!z.isResolved;mxUtils.write(Y,z.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=z.isResolved?"none":"",aa=D(z).replies,fa="light-dark("+(z.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=fa;for(var ca=aa[ea].querySelectorAll(".geCommentAction"),ha=0;ha<ca.length;ha++)ca[ha]!=
+Y.parentNode&&(ca[ha].style.display=Z);S||(aa[ea].style.display="none")}u()}z.isResolved?M(mxResources.get("reOpened")+": ",!0,W,!1,!0):M(mxResources.get("markedAsResolved"),!1,W,!0)});L.appendChild(O);null!=J?I.insertBefore(L,J.nextSibling):I.appendChild(L);for(J=0;null!=z.replies&&J<z.replies.length;J++)O=z.replies[J],O.isResolved=z.isResolved,k(O,z.replies,null,K+1,m);null!=x&&(x.comment.id==z.id?(m=z.content,z.content=x.comment.content,y(z,L,x.saveCallback,x.deleteOnCancel),z.content=m):null==
+x.comment.id&&x.comment.pCommentId==z.id&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return L}}var l=!b.canComment(),n=b.canReplyToReplies(),x=null,A=document.createElement("div");A.className="geCommentsWin";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.bottom=parseInt(B)+7+"px";A.appendChild(I);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,
+mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=B;C.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var R=B.cloneNode();R.style.backgroundImage="url("+Editor.plusImage+")";R.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(R,"click",function(z){function N(){y(J,K,function(m){E(K);b.addComment(m,function(t){m.id=t;Q.push(m);d(K)},function(t){F(K);
+N();b.handleError(t,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),K=k(J,Q,null,0);N();z.preventDefault();mxEvent.consume(z)});C.appendChild(R)}var T=B.cloneNode();T.style.backgroundImage="url("+Editor.checkImage+")";T.setAttribute("title",mxResources.get("showResolved"));var S=!1;mxEvent.addListener(T,"click",function(z){(S=!S)?T.classList.add("geActiveItem"):T.classList.remove("geActiveItem");v();z.preventDefault();mxEvent.consume(z)});
+C.appendChild(T);b.commentsRefreshNeeded()&&(R=B.cloneNode(),R.style.backgroundImage="url("+Editor.refreshImage+")",R.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(R,"click",function(z){v();z.preventDefault();mxEvent.consume(z)}),C.appendChild(R));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geButton geAdaptiveAsset",mxEvent.addListener(B,
+"click",function(z){q();z.preventDefault();mxEvent.consume(z)}),C.appendChild(B));A.appendChild(C);var Q=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var z=x.div.querySelector(".geCommentEditTxtArea"),N=x.div.querySelector(".geCommentEditBtns");x.comment.content=z.value;z.parentNode.removeChild(z);N.parentNode.removeChild(N)}catch(J){b.handleError(J)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function K(m){if(null!=m){m.sort(function(D,M){return new Date(D.modifiedDate)-new Date(M.modifiedDate)});for(var t=0;t<m.length;t++)K(m[t].replies)}}J.sort(function(m,t){return new Date(m.modifiedDate)-new Date(t.modifiedDate)});I.innerText="";I.appendChild(G);G.style.display="block";Q=J;for(J=0;J<Q.length;J++)K(Q[J].replies),k(Q[J],Q,null,0,S);null!=x&&null==x.comment.id&&
+null==x.comment.pCommentId&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(J){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});v();this.refreshComments=v;C=mxUtils.bind(this,function(){function z(t){var D=J[t.id];if(null!=D)for(H(t,D),D=0;null!=t.replies&&D<t.replies.length;D++)z(t.replies[D])}if(this.window.isVisible()){for(var N=
+I.querySelectorAll(".geCommentDate"),J={},K=0;K<N.length;K++){var m=N[K];J[m.getAttribute("data-commentId")]=m}for(K=0;K<Q.length;K++)z(Q[K])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),A,f,g,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
+function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,g,c,p,q,u,y,H,E,F){var d=document.createElement("div");d.style.textAlign="center";F=null!=F?F:44;var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight=F+"px";k.style.lineHeight="1.2em";mxUtils.write(k,f);d.appendChild(k);null!=E&&(k=document.createElement("div"),k.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),k.appendChild(f),
d.appendChild(k));E=document.createElement("div");E.style.textAlign="center";E.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(l.checked)});q.className="geBtn";null!=y&&(q.innerHTML=y+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&E.appendChild(q);
-var n=mxUtils.button(p||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(l.checked)});E.appendChild(n);null!=u?(n.innerHTML=u+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);d.appendChild(E);G?(E.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.style.marginBottom=
+var n=mxUtils.button(p||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(l.checked)});E.appendChild(n);null!=u?(n.innerHTML=u+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);d.appendChild(E);H?(E.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.style.marginBottom=
"0px",k.appendChild(l),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),k.appendChild(p),d.appendChild(k),mxEvent.addListener(p,"click",function(x){l.checked=!l.checked;mxEvent.consume(x)})):E.style.marginTop="12px";this.init=function(){n.focus()};this.container=d},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,g,c,p){if(null!=f)for(var q=0;q<f.length;q++)null!=f[q]&&(b=this.patchPages(b,f[q],g,c,p));return b};
-EditorUi.prototype.patchPages=function(b,f,g,c,p){var q={},u=[],y={},G={},E={},F={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var d in c[EditorUi.DIFF_UPDATE])q[d]=c[EditorUi.DIFF_UPDATE][d];if(null!=f[EditorUi.DIFF_REMOVE])for(c=0;c<f[EditorUi.DIFF_REMOVE].length;c++)G[f[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(c=0;c<f[EditorUi.DIFF_INSERT].length;c++)y[f[EditorUi.DIFF_INSERT][c].previous]=f[EditorUi.DIFF_INSERT][c];if(null!=f[EditorUi.DIFF_UPDATE])for(d in f[EditorUi.DIFF_UPDATE])c=
-f[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(F[c.previous]=d);if(null!=b){var k="";for(c=0;c<b.length;c++){var l=b[c].getId();E[l]=b[c];null!=F[k]||G[l]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][l]&&null!=f[EditorUi.DIFF_UPDATE][l].previous||(F[k]=l);k=l}}var n={},x=mxUtils.bind(this,function(B){var I=null!=B?B.getId():"";if(null!=B&&!n[I]){n[I]=!0;u.push(B);var H=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][I]:null;null!=H&&(this.updatePageRoot(B),null!=H.name&&B.setName(H.name),
-null!=H.view&&this.patchViewState(B,H.view),null!=H.cells&&this.patchPage(B,H.cells,q[B.getId()],p),!g||null==H.cells&&null==H.view||(B.needsUpdate=!0))}B=F[I];null!=B&&(delete F[I],x(E[B]));B=y[I];null!=B&&(delete y[I],z(B))}),z=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var I=E[B.getId()];null==I?x(B):(this.patchPage(I,this.diffPages([I],[B]),q[I.getId()],p),g&&(I.needsUpdate=!0))});x();for(d in F)x(E[F[d]]),delete F[d];for(d in y)z(y[d]),
+EditorUi.prototype.patchPages=function(b,f,g,c,p){var q={},u=[],y={},H={},E={},F={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var d in c[EditorUi.DIFF_UPDATE])q[d]=c[EditorUi.DIFF_UPDATE][d];if(null!=f[EditorUi.DIFF_REMOVE])for(c=0;c<f[EditorUi.DIFF_REMOVE].length;c++)H[f[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(c=0;c<f[EditorUi.DIFF_INSERT].length;c++)y[f[EditorUi.DIFF_INSERT][c].previous]=f[EditorUi.DIFF_INSERT][c];if(null!=f[EditorUi.DIFF_UPDATE])for(d in f[EditorUi.DIFF_UPDATE])c=
+f[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(F[c.previous]=d);if(null!=b){var k="";for(c=0;c<b.length;c++){var l=b[c].getId();E[l]=b[c];null!=F[k]||H[l]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][l]&&null!=f[EditorUi.DIFF_UPDATE][l].previous||(F[k]=l);k=l}}var n={},x=mxUtils.bind(this,function(B){var I=null!=B?B.getId():"";if(null!=B&&!n[I]){n[I]=!0;u.push(B);var G=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][I]:null;null!=G&&(this.updatePageRoot(B),null!=G.name&&B.setName(G.name),
+null!=G.view&&this.patchViewState(B,G.view),null!=G.cells&&this.patchPage(B,G.cells,q[B.getId()],p),!g||null==G.cells&&null==G.view||(B.needsUpdate=!0))}B=F[I];null!=B&&(delete F[I],x(E[B]));B=y[I];null!=B&&(delete y[I],A(B))}),A=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var I=E[B.getId()];null==I?x(B):(this.patchPage(I,this.diffPages([I],[B]),q[I.getId()],p),g&&(I.needsUpdate=!0))});x();for(d in F)x(E[F[d]]),delete F[d];for(d in y)A(y[d]),
delete y[d];return u};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var g in f)try{this.patchViewStateProperty(b,f,g)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,g){b.viewState[g]=JSON.parse(f[g])};
-EditorUi.prototype.createParentLookup=function(b,f){function g(E){var F=c[E];null==F&&(F={inserted:[],moved:{}},c[E]=F);return F}var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++){var q=f[EditorUi.DIFF_INSERT][p],u=null!=q.parent?q.parent:"",y=null!=q.previous?q.previous:"";g(u).inserted[y]=q}if(null!=f[EditorUi.DIFF_UPDATE])for(var G in f[EditorUi.DIFF_UPDATE])q=f[EditorUi.DIFF_UPDATE][G],null!=q.previous&&(u=q.parent,null==u&&(p=b.getCell(G),null!=p&&(p=
-b.getParent(p),null!=p&&(u=p.getId()))),null!=u&&(g(u).moved[q.previous]=G));return c};
-EditorUi.prototype.patchPage=function(b,f,g,c){var p=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),q=this.createParentLookup(p,f);p.beginUpdate();try{var u=p.updateEdgeParent,y=new mxDictionary,G=[];p.updateEdgeParent=function(z,B){!y.get(z)&&c&&(y.put(z,!0),G.push(z))};var E=q[""],F=null!=E&&null!=E.inserted?E.inserted[""]:null,d=null;null!=F&&(d=this.getCellForJson(F));if(null==d){var k=null!=E&&null!=E.moved?E.moved[""]:null;null!=k&&(d=p.getCell(k))}null!=d&&(p.setRoot(d),
+EditorUi.prototype.createParentLookup=function(b,f){function g(E){var F=c[E];null==F&&(F={inserted:[],moved:{}},c[E]=F);return F}var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++){var q=f[EditorUi.DIFF_INSERT][p],u=null!=q.parent?q.parent:"",y=null!=q.previous?q.previous:"";g(u).inserted[y]=q}if(null!=f[EditorUi.DIFF_UPDATE])for(var H in f[EditorUi.DIFF_UPDATE])q=f[EditorUi.DIFF_UPDATE][H],null!=q.previous&&(u=q.parent,null==u&&(p=b.getCell(H),null!=p&&(p=
+b.getParent(p),null!=p&&(u=p.getId()))),null!=u&&(g(u).moved[q.previous]=H));return c};
+EditorUi.prototype.patchPage=function(b,f,g,c){var p=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),q=this.createParentLookup(p,f);p.beginUpdate();try{var u=p.updateEdgeParent,y=new mxDictionary,H=[];p.updateEdgeParent=function(A,B){!y.get(A)&&c&&(y.put(A,!0),H.push(A))};var E=q[""],F=null!=E&&null!=E.inserted?E.inserted[""]:null,d=null;null!=F&&(d=this.getCellForJson(F));if(null==d){var k=null!=E&&null!=E.moved?E.moved[""]:null;null!=k&&(d=p.getCell(k))}null!=d&&(p.setRoot(d),
b.root=d,EditorUi.debug("EditorUi.patchPage: Root changed",d.id));this.patchCellRecursive(b,p,p.root,q,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var l=0;l<f[EditorUi.DIFF_REMOVE].length;l++){k=f[EditorUi.DIFF_REMOVE][l];var n=p.getCell(k);null!=n&&p.remove(n)}if(null!=f[EditorUi.DIFF_UPDATE]){var x=null!=g&&null!=g.cells?g.cells[EditorUi.DIFF_UPDATE]:null;for(k in f[EditorUi.DIFF_UPDATE])n=p.getCell(k),null!=n?this.patchCell(p,n,f[EditorUi.DIFF_UPDATE][k],null!=x?x[k]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
-k,"diff",[f[EditorUi.DIFF_UPDATE][k]])}if(null!=f[EditorUi.DIFF_INSERT])for(l=0;l<f[EditorUi.DIFF_INSERT].length;l++)F=f[EditorUi.DIFF_INSERT][l],n=p.getCell(F.id),null!=n&&(p.setTerminal(n,p.getCell(F.source),!0),p.setTerminal(n,p.getCell(F.target),!1));p.updateEdgeParent=u;if(c&&0<G.length)for(l=0;l<G.length;l++)p.contains(G[l])&&p.updateEdgeParent(G[l])}finally{p.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,g,c,p){if(null!=g){var q=c[g.getId()],u=null!=q&&null!=q.inserted?q.inserted:{};q=null!=q&&null!=q.moved?q.moved:{};for(var y=0,G=f.getChildCount(g),E="",F=0;F<G;F++){var d=f.getChildAt(g,F).getId();null==q[E]&&(null==p[EditorUi.DIFF_UPDATE]||null==p[EditorUi.DIFF_UPDATE][d]||null==p[EditorUi.DIFF_UPDATE][d].previous&&null==p[EditorUi.DIFF_UPDATE][d].parent)&&(q[E]=d);E=d}G=mxUtils.bind(this,function(k,l){var n=null!=k?k.getId():"";null==n&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",k);null!=k&&l&&(l=f.getCell(n),null!=l&&l!=k&&(k=null));null!=k&&(f.getChildAt(g,y)!=k&&f.add(g,k,y),this.patchCellRecursive(b,f,k,c,p),y++);return n});for(E=[null];0<E.length;)if(F=E.shift(),F=G(null!=F?F.child:null,null!=F?F.insert:!1),d=q[F],null!=d&&(delete q[F],E.push({child:f.getCell(d)})),d=u[F],null!=d&&(delete u[F],E.push({child:this.getCellForJson(d),insert:!0})),0==E.length){for(F in q)E.push({child:f.getCell(q[F])}),delete q[F];for(F in u)E.push({child:this.getCellForJson(u[F]),
+k,"diff",[f[EditorUi.DIFF_UPDATE][k]])}if(null!=f[EditorUi.DIFF_INSERT])for(l=0;l<f[EditorUi.DIFF_INSERT].length;l++)F=f[EditorUi.DIFF_INSERT][l],n=p.getCell(F.id),null!=n&&(p.setTerminal(n,p.getCell(F.source),!0),p.setTerminal(n,p.getCell(F.target),!1));p.updateEdgeParent=u;if(c&&0<H.length)for(l=0;l<H.length;l++)p.contains(H[l])&&p.updateEdgeParent(H[l])}finally{p.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,g,c,p){if(null!=g){var q=c[g.getId()],u=null!=q&&null!=q.inserted?q.inserted:{};q=null!=q&&null!=q.moved?q.moved:{};for(var y=0,H=f.getChildCount(g),E="",F=0;F<H;F++){var d=f.getChildAt(g,F).getId();null==q[E]&&(null==p[EditorUi.DIFF_UPDATE]||null==p[EditorUi.DIFF_UPDATE][d]||null==p[EditorUi.DIFF_UPDATE][d].previous&&null==p[EditorUi.DIFF_UPDATE][d].parent)&&(q[E]=d);E=d}H=mxUtils.bind(this,function(k,l){var n=null!=k?k.getId():"";null==n&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",k);null!=k&&l&&(l=f.getCell(n),null!=l&&l!=k&&(k=null));null!=k&&(f.getChildAt(g,y)!=k&&f.add(g,k,y),this.patchCellRecursive(b,f,k,c,p),y++);return n});for(E=[null];0<E.length;)if(F=E.shift(),F=H(null!=F?F.child:null,null!=F?F.insert:!1),d=q[F],null!=d&&(delete q[F],E.push({child:f.getCell(d)})),d=u[F],null!=d&&(delete u[F],E.push({child:this.getCellForJson(d),insert:!0})),0==E.length){for(F in q)E.push({child:f.getCell(q[F])}),delete q[F];for(F in u)E.push({child:this.getCellForJson(u[F]),
insert:!0}),delete u[F]}}};
EditorUi.prototype.patchCell=function(b,f,g,c){if(null!=f&&null!=g){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in g?b.setValue(f,g.value):null!=g.xmlValue&&b.setValue(f,mxUtils.parseXml(g.xmlValue).documentElement);null!=c&&null!=c.style||null==g.style||b.setStyle(f,g.style);null!=g.visible&&b.setVisible(f,1==g.visible);null!=g.collapsed&&b.setCollapsed(f,1==g.collapsed);null!=g.vertex&&(f.vertex=1==g.vertex);null!=g.edge&&(f.edge=1==g.edge);null!=g.connectable&&(f.connectable=
1==g.connectable);null!=g.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(g.geometry).documentElement));null!=g.source&&b.setTerminal(f,b.getCell(g.source),!0);null!=g.target&&b.setTerminal(f,b.getCell(g.target),!1);for(var p in g)this.cellProperties[p]||(f[p]=g[p])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var g=0;g<b.length;g++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[g].root));this.editor.graph.saveViewState(b[g].viewState,c);var p=b[g].node.cloneNode(!1);p.appendChild(c);f.appendChild(p)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
EditorUi.prototype.getPagesForNode=function(b,f){var g=this.editor.extractGraphModel(b,!0,!0);null!=g&&(b=g);f=b.getElementsByTagName(f||"diagram");g=[];if(0<f.length)for(b=0;b<f.length;b++){var c=new DiagramPage(f[b]);this.updatePageRoot(c,!0);g.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),c.node.appendChild(b.cloneNode(!0)),g.push(c));return g};
-EditorUi.prototype.diffPages=function(b,f){var g=[],c=[],p={},q={},u={},y=null;if(null!=b&&null!=f){for(var G=0;G<f.length;G++)q[f[G].getId()]={page:f[G],prev:y},y=f[G];y=null;for(G=0;G<b.length;G++){var E=b[G].getId();f=q[E];if(null==f)c.push(E);else{this.updatePageRoot(b[G]);this.updatePageRoot(f.page);var F=this.diffCells(b[G].root,f.page.root),d={};mxUtils.isEmptyObject(F)||(d.cells=F);F=this.diffViewState(b[G],f.page);mxUtils.isEmptyObject(F)||(d.view=F);if((null!=f.prev?null==y:null!=y)||null!=
-y&&null!=f.prev&&y.getId()!=f.prev.getId())d.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[G].getName()!=f.page.getName()&&(d.name=f.page.getName());mxUtils.isEmptyObject(d)||(u[E]=d)}delete q[b[G].getId()];y=b[G]}for(E in q)f=q[E],g.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(u)||(p[EditorUi.DIFF_UPDATE]=u);0<c.length&&(p[EditorUi.DIFF_REMOVE]=c);0<g.length&&(p[EditorUi.DIFF_INSERT]=g)}return p};
+EditorUi.prototype.diffPages=function(b,f){var g=[],c=[],p={},q={},u={},y=null;if(null!=b&&null!=f){for(var H=0;H<f.length;H++)q[f[H].getId()]={page:f[H],prev:y},y=f[H];y=null;for(H=0;H<b.length;H++){var E=b[H].getId();f=q[E];if(null==f)c.push(E);else{this.updatePageRoot(b[H]);this.updatePageRoot(f.page);var F=this.diffCells(b[H].root,f.page.root),d={};mxUtils.isEmptyObject(F)||(d.cells=F);F=this.diffViewState(b[H],f.page);mxUtils.isEmptyObject(F)||(d.view=F);if((null!=f.prev?null==y:null!=y)||null!=
+y&&null!=f.prev&&y.getId()!=f.prev.getId())d.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[H].getName()!=f.page.getName()&&(d.name=f.page.getName());mxUtils.isEmptyObject(d)||(u[E]=d)}delete q[b[H].getId()];y=b[H]}for(E in q)f=q[E],g.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(u)||(p[EditorUi.DIFF_UPDATE]=u);0<c.length&&(p[EditorUi.DIFF_REMOVE]=c);0<g.length&&(p[EditorUi.DIFF_INSERT]=g)}return p};
EditorUi.prototype.createCellLookup=function(b,f,g){g=null!=g?g:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):g[b.getId()]={cell:b,prev:f};var c=b.getChildCount();f=null;for(var p=0;p<c;p++){var q=b.getChildAt(p);this.createCellLookup(q,f,g);f=q}return g};
EditorUi.prototype.diffCellRecursive=function(b,f,g,c,p){c=null!=c?c:{};var q=g[b.getId()];delete g[b.getId()];if(null==q)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):p.push(b.getId());else{var u=this.diffCell(b,q.cell);if(null!=u.parent||(null!=q.prev?null==f:null!=f)||null!=f&&null!=q.prev&&f.getId()!=q.prev.getId())u.previous=null!=q.prev?q.prev.getId():"";mxUtils.isEmptyObject(u)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
b,"diff",u):c[b.getId()]=u)}q=b.getChildCount();f=null;for(u=0;u<q;u++){var y=b.getChildAt(u);this.diffCellRecursive(y,f,g,c,p);f=y}return c};
@@ -13413,18 +13415,18 @@ EditorUi.prototype.resolveOwnUpdatedCells=function(b,f,g,c){if(null!=b)for(var p
EditorUi.prototype.adoptParentCell=function(b,f,g,c){var p=g[b],q=null!=f?f.parent:null!=p?p.parent:null;null!=q&&this.adoptParentCell(q,null,g,c);null!=p?c.inserted[b]||(c.cells[EditorUi.DIFF_INSERT].push(p),c.inserted[b]=!0):null!=f&&(null==c.cells[EditorUi.DIFF_UPDATE][b]&&(c.cells[EditorUi.DIFF_UPDATE][b]={}),c.cells[EditorUi.DIFF_UPDATE][b]=f)};
EditorUi.prototype.adoptTerminalCell=function(b,f,g,c,p){f=c?f.source:f.target;g=g[f];null!=g&&(p.inserted[f]||(p.cells[EditorUi.DIFF_INSERT].push(g),p.inserted[f]=!0),null==p.cells[EditorUi.DIFF_UPDATE][b]&&(p.cells[EditorUi.DIFF_UPDATE][b]={}),p.cells[EditorUi.DIFF_UPDATE][b][c?"source":"target"]=f)};
EditorUi.prototype.isObjectEqual=function(b,f,g){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var c=function(p,q){return null==g||g[p]!=q?!0===q?1:q:void 0};return JSON.stringify(b,c)==JSON.stringify(f,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
-mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var f=mxSettings.getMainSettings();f.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,
-f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},setCustomFonts:function(b){mxSettings.settings.customFonts=
-b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,
-0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(b){mxSettings.settings.recentColors=
-b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=
-b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,
-createTarget:"1"==urlParams.sketch,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!1,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,darkMode:"auto",autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,
-mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(b){}},load:function(){try{isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key))}catch(b){null!=window.console&&console.log("Error loading settings:",mxSettings.key,b)}null==mxSettings.settings&&mxSettings.init()},parse:function(b){b=null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!=Editor.config&&
-Editor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),
-null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&
-(mxSettings.settings.showStartScreen=!1),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=
-!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,f){this.file=b;this.sync=f};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;
+mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var f=mxSettings.getMainSettings();f.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){var f=b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor;mxUtils.isLightDarkColor(f)&&
+(f=mxUtils.getLightDarkColor(f),f=b?f.dark:f.light);return f},setGridColor:function(b,f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
+b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
+b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},
+setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||
+mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
+plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarget:"1"==urlParams.sketch,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!1,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,darkMode:"auto",autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},
+save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(b){}},load:function(){try{isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key))}catch(b){null!=window.console&&console.log("Error loading settings:",mxSettings.key,b)}null==mxSettings.settings&&mxSettings.init()},parse:function(b){b=
+null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!=Editor.config&&Editor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),
+null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),
+null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!1),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&
+(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,f){this.file=b;this.sync=f};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;
DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var f=mxUtils.bind(this,function(){this.poll(0,g)}),g=mxUtils.bind(this,function(){this.thread=setTimeout(f,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});g();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};
DrawioFilePolling.prototype.updateStatus=function(){this.hasOtherWriters()&&(this.sync.lastMessage=mxResources.get("otherUsersEditing"));this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()};
DrawioFilePolling.prototype.poll=function(b,f){b=null!=b?b:0;var g=mxUtils.bind(this,function(c){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,f)})):f()});this.file.getLatestVersionId(mxUtils.bind(this,function(c){if(-1!=c){var p=this.file.getCurrentRevisionId();c!=p?this.file.getLatestVersion(mxUtils.bind(this,function(q){this.file.mergeFile(q,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();f()}),g)}),g):
@@ -13471,8 +13473,8 @@ DrawioFileSync.prototype.patchRealtime=function(b,f,g,c){var p=null;if(this.file
"all",p,"local",q,"applied",u,"immediate",c)}return p};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;var g=this.ui.resolveCrossReferences(f,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,g,!0);this.isRealtimeActive()&&this.doSendLocalChanges([g,f])}this.localFileWasChanged=
!1}catch(c){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,c)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,f,g,c,p,q,u){try{this.file.stats.merged++;this.lastModified=new Date;var y=this.file.getDescriptorRevisionId(g);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var G=this.ui.clonePages(this.file.getShadowPages()),E=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(G,this.ui.pages):null,F=this.file.isRealtime()?this.ui.diffPages(G,this.file.ownPages):null;G=this.ui.applyPatches(G,b);var d=null==f?null:this.ui.getHashValueForPages(G);
-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",E,"pending",F,"checksum",f,"current",d,"valid",f==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",y,"etag",this.file.getDescriptorEtag(g),"immediate",u);if(null!=f&&f!=d){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=p&&p()}),q,null,u);return}this.file.setShadowPages(G);null==this.patchRealtime(b,null,F,u)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
+DrawioFileSync.prototype.merge=function(b,f,g,c,p,q,u){try{this.file.stats.merged++;this.lastModified=new Date;var y=this.file.getDescriptorRevisionId(g);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var H=this.ui.clonePages(this.file.getShadowPages()),E=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(H,this.ui.pages):null,F=this.file.isRealtime()?this.ui.diffPages(H,this.file.ownPages):null;H=this.ui.applyPatches(H,b);var d=null==f?null:this.ui.getHashValueForPages(H);
+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",E,"pending",F,"checksum",f,"current",d,"valid",f==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",y,"etag",this.file.getDescriptorEtag(g),"immediate",u);if(null!=f&&f!=d){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=p&&p()}),q,null,u);return}this.file.setShadowPages(H);null==this.patchRealtime(b,null,F,u)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
E:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),g);null!=c&&c(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=p&&p(n);try{var k=this.file.getCurrentUser(),l=null!=k?k.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),l,n)}catch(x){}}};
DrawioFileSync.prototype.fileChanged=function(b,f,g,c,p){var q=window.setTimeout(mxUtils.bind(this,function(){null!=g&&g()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",p,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(u){null!=g&&g()||(this.isValidState()?this.catchup(u,b,f,g,p):null!=f&&f())}),f)):null!=f&&f())}),c?this.cacheReadyDelay:0);return this.notifyThread=
q};
@@ -13481,19 +13483,19 @@ this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fast
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,f,g,c,p){if(null!=b&&(null==c||!c())){var q=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",q,"to",u,"immediate",p,"valid",this.isValidState());if(q==u)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var y=this.file.getDescriptorChecksum(b),G=this.file.getDescriptorSecret(b);if(null!=y&&y==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=G&&"1"!=urlParams.lockdown){var E=0,F=!1,d=mxUtils.bind(this,function(){if(null==c||!c())if(q!=this.file.getCurrentRevisionId())null!=f&&
-f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,g,c,null,p)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(q)+"&to="+encodeURIComponent(u)+(null!=G?"&secret="+encodeURIComponent(G):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(l);if(k&&(null==c||!c()))if(q!=this.file.getCurrentRevisionId())null!=
-f&&f(!0);else if(this.isValidState()){var x=null,z=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[n],"status",n.getStatus(),"cacheReadyRetryCount",E,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var B=JSON.parse(n.getText());if(null!=B&&0<B.length)for(var I=0;I<B.length;I++){var H=this.stringToObject(B[I]);if(H.v>DrawioFileSync.PROTOCOL){F=!0;z=[];break}else if(H.v===DrawioFileSync.PROTOCOL&&null!=H.d)x=H.d.checksum,
-z.push(H.d.patch);else{F=!0;z=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",F?"failed":"ok","temp",z,"checksum",x)}catch(C){z=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<z.length?(this.file.stats.cacheHits++,this.merge(z,x,b,f,g,c,p)):E<=this.maxCacheReadyRetries-1&&!F&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(E++,this.file.stats.cacheMiss++,window.setTimeout(d,(E+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var y=this.file.getDescriptorChecksum(b),H=this.file.getDescriptorSecret(b);if(null!=y&&y==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=H&&"1"!=urlParams.lockdown){var E=0,F=!1,d=mxUtils.bind(this,function(){if(null==c||!c())if(q!=this.file.getCurrentRevisionId())null!=f&&
+f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,g,c,null,p)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(q)+"&to="+encodeURIComponent(u)+(null!=H?"&secret="+encodeURIComponent(H):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(l);if(k&&(null==c||!c()))if(q!=this.file.getCurrentRevisionId())null!=
+f&&f(!0);else if(this.isValidState()){var x=null,A=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[n],"status",n.getStatus(),"cacheReadyRetryCount",E,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var B=JSON.parse(n.getText());if(null!=B&&0<B.length)for(var I=0;I<B.length;I++){var G=this.stringToObject(B[I]);if(G.v>DrawioFileSync.PROTOCOL){F=!0;A=[];break}else if(G.v===DrawioFileSync.PROTOCOL&&null!=G.d)x=G.d.checksum,
+A.push(G.d.patch);else{F=!0;A=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",F?"failed":"ok","temp",A,"checksum",x)}catch(C){A=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<A.length?(this.file.stats.cacheHits++,this.merge(A,x,b,f,g,c,p)):E<=this.maxCacheReadyRetries-1&&!F&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(E++,this.file.stats.cacheMiss++,window.setTimeout(d,(E+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
this.reload(f,g,c,null,p))}catch(C){null!=g&&g(C)}}else null!=g&&g()}),g)}else null!=g&&g()});window.setTimeout(d,this.cacheReadyDelay)}else this.reload(f,g,c,null,p)}else null!=g&&g()}};DrawioFileSync.prototype.reload=function(b,f,g,c,p){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",p);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(q){null!=f&&f(q)}),g,c,p)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),g=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(g)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",g)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,f,g){var c=!0,p=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(q){window.clearTimeout(p);c&&(200<=q.getStatus()&&299>=q.getStatus()?f(q.getText()):g({code:q.getStatus(),message:"Token Error "+q.getStatus()}))}),g)};
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,f,g,c,p,q){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var u=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.createMessage({m:this.lastModified.getTime()}),G=this.file.getDescriptorRevisionId(f),E=this.file.getCurrentRevisionId();if(null!=u&&null!=p&&
+DrawioFileSync.prototype.fileSaved=function(b,f,g,c,p,q){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var u=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.createMessage({m:this.lastModified.getTime()}),H=this.file.getDescriptorRevisionId(f),E=this.file.getCurrentRevisionId();if(null!=u&&null!=p&&
"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var F=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);q=null!=q?q:this.ui.getHashValueForPages(b);var d=this.objectToString(this.createMessage({patch:F,checksum:q}));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(G)+"&to="+encodeURIComponent(E)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(y)))+(null!=u?"&secret="+encodeURIComponent(u):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(d.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(d):"")+(null!=p?"&token="+encodeURIComponent(p):""),mxUtils.bind(this,function(n){window.clearTimeout(l);k&&(200<=n.getStatus()&&299>=n.getStatus()?(Editor.p2pSyncNotify&&this.notify(y),null!=g&&g()):c({message:mxResources.get("realtimeCollaboration")+
-(0!=n.getStatus()?": "+n.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",E,"etag",this.file.getCurrentEtag(),"diff",F,d.length,"bytes","msg",y,"checksum",q)}else this.notify(y),null!=g&&g(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",E,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+"&from="+encodeURIComponent(H)+"&to="+encodeURIComponent(E)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(y)))+(null!=u?"&secret="+encodeURIComponent(u):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(d.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(d):"")+(null!=p?"&token="+encodeURIComponent(p):""),mxUtils.bind(this,function(n){window.clearTimeout(l);k&&(200<=n.getStatus()&&299>=n.getStatus()?(Editor.p2pSyncNotify&&this.notify(y),null!=g&&g()):c({message:mxResources.get("realtimeCollaboration")+
+(0!=n.getStatus()?": "+n.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",E,"etag",this.file.getCurrentEtag(),"diff",F,d.length,"bytes","msg",y,"checksum",q)}else this.notify(y),null!=g&&g(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",E,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,g){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,g):this.fileChanged(f,g)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=g&&g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
@@ -13506,12 +13508,12 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,f,g,c){};mxAsyncCanvas.prototype.roundrect=function(b,f,g,c,p,q){};mxAsyncCanvas.prototype.ellipse=function(b,f,g,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
mxAsyncCanvas.prototype.image=function(b,f,g,c,p,q,u,y){p=this.rewriteImageSource(p);b=this.htmlCanvas.images[p];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[p]=b,b.src=p)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,f,g,c,p,q,u,y,G,E,F,d){if(null!=p&&0!=p.length&&(b=this.state.scale,"html"==G&&"function"===typeof html2canvas)){this.incWaitCounter();var k=this.canvasIndex++;html2canvas(p,{onrendered:mxUtils.bind(this,function(l){this.htmlCanvas.subCanvas[k]=l;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.text=function(b,f,g,c,p,q,u,y,H,E,F,d){if(null!=p&&0!=p.length&&(b=this.state.scale,"html"==H&&"function"===typeof html2canvas)){this.incWaitCounter();var k=this.canvasIndex++;html2canvas(p,{onrendered:mxUtils.bind(this,function(l){this.htmlCanvas.subCanvas[k]=l;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(f,g,c,p){return g+g+c+c+p+p});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,f){this.state.dx+=b;this.state.dy+=f;this.ctx.translate(b,f)};
mxJsCanvas.prototype.rotate=function(b,f,g,c,p){c-=this.state.dx;p-=this.state.dy;this.ctx.translate(c,p);(f||g)&&this.ctx.scale(f?-1:1,g?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-p)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,f,g,c,p,q,u,y,G){g=this.ctx.createLinearGradient(0,c,0,c+q);c=this.state;c.fillColor=b;c.fillAlpha=null!=y?y:1;c.gradientColor=f;c.gradientAlpha=null!=G?G:1;c.gradientDirection=u;b=this.hexToRgb(b);f=this.hexToRgb(f);null!=b&&g.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=f&&g.addColorStop(1,"rgba("+f.r+","+f.g+","+f.b+","+c.gradientAlpha+")");this.ctx.fillStyle=g};
+mxJsCanvas.prototype.setGradient=function(b,f,g,c,p,q,u,y,H){g=this.ctx.createLinearGradient(0,c,0,c+q);c=this.state;c.fillColor=b;c.fillAlpha=null!=y?y:1;c.gradientColor=f;c.gradientAlpha=null!=H?H:1;c.gradientDirection=u;b=this.hexToRgb(b);f=this.hexToRgb(f);null!=b&&g.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=f&&g.addColorStop(1,"rgba("+f.r+","+f.g+","+f.b+","+c.gradientAlpha+")");this.ctx.fillStyle=g};
mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var f=0;f<b.length;f++)b[f]=parseInt(b[f],10);this.setLineDash(b)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(f){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var f=0;f<b.length;f++)b[f]=parseInt(b[f],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
@@ -13521,13 +13523,13 @@ mxJsCanvas.prototype.setShadowOffset=function(b,f){this.state.shadowDx=b;this.st
mxJsCanvas.prototype.arcTo=function(b,f,g,c,p,q,u){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,f,g,c,p,q,u);if(null!=b)for(f=0;f<b.length;f+=6)this.curveTo(b[f],b[f+1],b[f+2],b[f+3],b[f+4],b[f+5])};mxJsCanvas.prototype.curveTo=function(b,f,g,c,p,q){this.ctx.bezierCurveTo(b,f,g,c,p,q);this.lastMoveX=p;this.lastMoveY=q};mxJsCanvas.prototype.rect=function(b,f,g,c){this.begin();this.moveTo(b,f);this.lineTo(b+g,f);this.lineTo(b+g,f+c);this.lineTo(b,f+c);this.close()};
mxJsCanvas.prototype.roundrect=function(b,f,g,c,p,q){this.begin();this.moveTo(b+p,f);this.lineTo(b+g-p,f);this.quadTo(b+g,f,b+g,f+q);this.lineTo(b+g,f+c-q);this.quadTo(b+g,f+c,b+g-p,f+c);this.lineTo(b+p,f+c);this.quadTo(b,f+c,b,f+c-q);this.lineTo(b,f+q);this.quadTo(b,f,b+p,f)};mxJsCanvas.prototype.ellipse=function(b,f,g,c){this.ctx.save();this.ctx.translate(b+g/2,f+c/2);this.ctx.scale(g/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,f,g,c,p,q,u,y){p=this.rewriteImageSource(p);p=this.images[p];if(null!=p&&0<p.height&&0<p.width){var G=this.ctx;G.save();if(q){q=p.width;var E=p.height,F=Math.min(g/q,c/E);b+=(g-q*F)/2;f+=(c-E*F)/2;g=q*F;c=E*F}u&&(G.translate(2*b+g,0),G.scale(-1,1));y&&(G.translate(0,2*f+c),G.scale(1,-1));G.drawImage(p,b,f,g,c);G.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(b,f,g,c,p,q,u,y){p=this.rewriteImageSource(p);p=this.images[p];if(null!=p&&0<p.height&&0<p.width){var H=this.ctx;H.save();if(q){q=p.width;var E=p.height,F=Math.min(g/q,c/E);b+=(g-q*F)/2;f+=(c-E*F)/2;g=q*F;c=E*F}u&&(H.translate(2*b+g,0),H.scale(-1,1));y&&(H.translate(0,2*f+c),H.scale(1,-1));H.drawImage(p,b,f,g,c);H.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,f=this.ctx.shadowOffsetX,g=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=f;this.ctx.shadowOffsetY=g}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,f,g,c,p,q,u,y,G,E,F,d){if(null!=p&&0!=p.length){g=this.state.scale;0!=d&&(this.ctx.translate(Math.round(b),Math.round(f)),this.ctx.rotate(d*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-f)));if("html"==G){p=this.subCanvas[this.canvasIndex++];G=p.height;d=p.width;switch(u){case mxConstants.ALIGN_MIDDLE:f-=G/2/g;break;case mxConstants.ALIGN_BOTTOM:f-=G/g}switch(q){case mxConstants.ALIGN_CENTER:b-=d/2/g;break;case mxConstants.ALIGN_RIGHT:b-=d/g}this.ctx.save();
+mxJsCanvas.prototype.text=function(b,f,g,c,p,q,u,y,H,E,F,d){if(null!=p&&0!=p.length){g=this.state.scale;0!=d&&(this.ctx.translate(Math.round(b),Math.round(f)),this.ctx.rotate(d*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-f)));if("html"==H){p=this.subCanvas[this.canvasIndex++];H=p.height;d=p.width;switch(u){case mxConstants.ALIGN_MIDDLE:f-=H/2/g;break;case mxConstants.ALIGN_BOTTOM:f-=H/g}switch(q){case mxConstants.ALIGN_CENTER:b-=d/2/g;break;case mxConstants.ALIGN_RIGHT:b-=d/g}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/g),Math.round(p.height/g))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/g),Math.round(p.height/g)));this.ctx.scale(1/g,1/g);this.ctx.drawImage(p,
-Math.round(b*g),Math.round(f*g))}else{this.ctx.save();this.updateFont();d=document.createElement("div");d.innerHTML=p;d.style.position="absolute";d.style.top="-9999px";d.style.left="-9999px";d.style.fontFamily=this.state.fontFamily;d.style.fontWeight="bold";d.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(d);G=[d.offsetWidth,d.offsetHeight];document.body.removeChild(d);p=p.split("\n");d=G[1];this.ctx.textBaseline="top";G=f;switch(u){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";f-=(p.length-1)*d/2;G=f-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",f-=d*(p.length-1),G=f-this.state.fontSize}u=[];d=[];for(g=0;g<p.length;g++)d[g]=b,u[g]=this.ctx.measureText(p[g]).width,null!=q&&q!=mxConstants.ALIGN_LEFT&&(d[g]-=u[g],q==mxConstants.ALIGN_CENTER&&(d[g]+=u[g]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=d[0];q=u[0];for(g=1;g<p.length;g++)b=Math.min(b,d[g]),q=Math.max(q,u[g]);this.ctx.save();
-b=Math.round(b)-.5;G=Math.round(G)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,G,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,G,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));this.ctx.restore()}for(g=0;g<p.length;g++)this.ctx.fillText(p[g],d[g],f),f+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(b*g),Math.round(f*g))}else{this.ctx.save();this.updateFont();d=document.createElement("div");d.innerHTML=p;d.style.position="absolute";d.style.top="-9999px";d.style.left="-9999px";d.style.fontFamily=this.state.fontFamily;d.style.fontWeight="bold";d.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(d);H=[d.offsetWidth,d.offsetHeight];document.body.removeChild(d);p=p.split("\n");d=H[1];this.ctx.textBaseline="top";H=f;switch(u){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";f-=(p.length-1)*d/2;H=f-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",f-=d*(p.length-1),H=f-this.state.fontSize}u=[];d=[];for(g=0;g<p.length;g++)d[g]=b,u[g]=this.ctx.measureText(p[g]).width,null!=q&&q!=mxConstants.ALIGN_LEFT&&(d[g]-=u[g],q==mxConstants.ALIGN_CENTER&&(d[g]+=u[g]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=d[0];q=u[0];for(g=1;g<p.length;g++)b=Math.min(b,d[g]),q=Math.max(q,u[g]);this.ctx.save();
+b=Math.round(b)-.5;H=Math.round(H)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,H,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,H,q,this.state.fontSize*mxConstants.LINE_HEIGHT*p.length));this.ctx.restore()}for(g=0;g<p.length;g++)this.ctx.fillText(p[g],d[g],f),f+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,f){mxEventSource.call(this);this.ui=b;this.cookieName=f;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(b){var f=null;isLocalStorage&&(f=localStorage.getItem("."+this.cookieName),null==f&&b&&(f=sessionStorage.getItem("."+this.cookieName)));if(null==f&&"undefined"!=typeof Storage){var g=document.cookie;b=this.cookieName+"=";var c=g.indexOf(b);0<=c&&(c+=b.length,f=g.indexOf(";",c),0>f?f=g.length:postCookie=g.substring(f),f=g.substring(c,f),f=0<f.length?f:null,null!=f&&isLocalStorage&&(g=new Date,g.setYear(g.getFullYear()-1),document.cookie=b+"; expires="+
@@ -13536,9 +13538,9 @@ DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b
DriveFile.prototype.getFolderUrl=function(){return null!=this.desc.labels&&this.desc.labels.trashed?"https://drive.google.com/drive/trash":null!=this.desc.parents&&0<this.desc.parents.length?"https://drive.google.com/drive/folders/"+this.desc.parents[0].id:null};
DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(f){if(null!=f&&null!=f.items)for(var g=0;g<f.items.length;g++)if("anyoneWithLink"===f.items[g].id||"anyone"===f.items[g].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,f,g,c,p){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,f,g,c,p)}),g,c,p])};
-DriveFile.prototype.saveFile=function(b,f,g,c,p,q){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(u,y){var G=mxUtils.bind(this,function(E,F){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,F,mxUtils.bind(this,function(k,l,n,x){try{this.savingFile=!1,0!=k?(this.setModified(this.getShadowModified()),f&&(this.lastAutosaveRevision=(new Date).getTime()),
-this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=k,this.fileSaved(l,d,mxUtils.bind(this,function(){this.contentChanged();null!=g&&g(k)}),c,y,n,x)):null!=c&&c(k)}catch(z){if(this.savingFile=!1,null!=c)c(z);else throw z;}}),mxUtils.bind(this,function(k,l){try{this.savingFile=!1,this.isConflict(k)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(l,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();this.setShadowModified(!1);G(E,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(k)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}}),p,p,E,null,u)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}});G(q,f)}))):null!=g&&g()}catch(u){if(null!=c)c(u);else throw u;}};
+DriveFile.prototype.saveFile=function(b,f,g,c,p,q){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(u,y){var H=mxUtils.bind(this,function(E,F){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,F,mxUtils.bind(this,function(k,l,n,x){try{this.savingFile=!1,0!=k?(this.setModified(this.getShadowModified()),f&&(this.lastAutosaveRevision=(new Date).getTime()),
+this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=k,this.fileSaved(l,d,mxUtils.bind(this,function(){this.contentChanged();null!=g&&g(k)}),c,y,n,x)):null!=c&&c(k)}catch(A){if(this.savingFile=!1,null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(k,l){try{this.savingFile=!1,this.isConflict(k)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(l,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+function(){this.updateFileData();this.setShadowModified(!1);H(E,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(k)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}}),p,p,E,null,u)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}});H(q,f)}))):null!=g&&g()}catch(u){if(null!=c)c(u);else throw u;}};
DriveFile.prototype.copyFile=function(b,f,g){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,f)}catch(c){f(c)}}),f,null!=g?g:this.ui.getCopyFilename(this,!0))};
DriveFile.prototype.makeCopy=function(b,f,g){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(g,mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=f&&f()}))};DriveFile.prototype.saveAs=function(b,f,g){this.ui.drive.copyFile(this.getId(),b,f,g)};
DriveFile.prototype.rename=function(b,f,g){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(p){this.hasSameExtension(b,this.getTitle())?(this.desc=p,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=f&&f(p)):(this.desc=p,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,f,g))}),g)};
@@ -13560,89 +13562,89 @@ DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="app.diagrams.net";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=4;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(g){this.user=g;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=g.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(g){this.userId=g;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
function(){return this.user};DriveClient.prototype.getUsersList=function(){var g=[],c=JSON.parse(this.getPersistentToken(!0)),p=null;if(null!=c){null!=c.current&&(p=c.current.userId,g.push(c[p].user),g[0].isCurrent=!0);for(var q in c)"current"!=q&&q!=p&&g.push(c[q].user)}return g};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();
-this.setUser(null);b=null};DriveClient.prototype.execute=function(g){var c=mxUtils.bind(this,function(p){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,u){this.authorize(!1,mxUtils.bind(this,function(){null!=u&&u();g()}),mxUtils.bind(this,function(y){var G=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(G=y.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-G,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),q)}))});this.authorize(!0,g,c)};DriveClient.prototype.executeRequest=function(g,c,p){try{var q=!0,u=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var G=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=g;null!=u&&window.clearTimeout(u);u=window.setTimeout(mxUtils.bind(this,
-function(){q=!1;null!=p&&p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})}),this.ui.timeout);var E=null,F=!1;"string"===typeof g.params?E=g.params:null!=g.params&&(E=JSON.stringify(g.params),F=!0);var d=g.fullUrl||this.GDriveBaseUrl+g.url;F&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var k=new mxXmlRequest(d,E,g.method||"GET");k.setRequestHeaders=mxUtils.bind(this,function(l,n){if(null!=g.headers)for(var x in g.headers)l.setRequestHeader(x,g.headers[x]);else null!=g.contentType?
-l.setRequestHeader("Content-Type",g.contentType):F&&l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b)});k.send(mxUtils.bind(this,function(l){try{if(window.clearTimeout(u),q){try{var n=JSON.parse(l.getText())}catch(B){n=null}if(200<=l.getStatus()&&299>=l.getStatus())null!=c&&c(n);else{var x=null!=n&&null!=n.error?null!=n.error.data?n.error.data:n.error.errors:null,z=null!=x&&0<x.length?x[0].reason:null;null==p||null==n||null==n.error||-1!=n.error.code&&
-(403!=n.error.code||"domainPolicy"!=z&&"The requested mime type change is forbidden."!=n.error.message)?null!=n&&null!=n.error&&(401==n.error.code||403==n.error.code&&"rateLimitExceeded"!=z)?403==n.error.code&&this.retryAuth||401==n.error.code&&this.retryAuth&&"authError"==z?(null!=p&&p(n),this.retryAuth=!1):(this.retryAuth=!0,this.execute(G)):null!=n&&null!=n.error&&412!=n.error.code&&404!=n.error.code&&400!=n.error.code&&this.currentRequest==g&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(G,
-Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=p&&p(n):p(n)}}}catch(B){if(null!=p)p(B);else throw B;}}))}catch(l){if(null!=p)p(l);else throw l;}});null!=b&&this.authCalled?G():this.execute(G)}catch(E){if(null!=p)p(E);else throw E;}};DriveClient.prototype.createAuthWin=function(g){return window.open(g?g:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+this.setUser(null);b=null};DriveClient.prototype.execute=function(g){var c=mxUtils.bind(this,function(p){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,u){this.authorize(!1,mxUtils.bind(this,function(){null!=u&&u();g()}),mxUtils.bind(this,function(y){var H=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(H=y.error.message);this.logout();this.ui.showError(mxResources.get("error"),
+H,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),q)}))});this.authorize(!0,g,c)};DriveClient.prototype.executeRequest=function(g,c,p){try{var q=!0,u=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var H=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=g;null!=u&&window.clearTimeout(u);u=window.setTimeout(mxUtils.bind(this,
+function(){q=!1;null!=p&&p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:H})}),this.ui.timeout);var E=null,F=!1;"string"===typeof g.params?E=g.params:null!=g.params&&(E=JSON.stringify(g.params),F=!0);var d=g.fullUrl||this.GDriveBaseUrl+g.url;F&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var k=new mxXmlRequest(d,E,g.method||"GET");k.setRequestHeaders=mxUtils.bind(this,function(l,n){if(null!=g.headers)for(var x in g.headers)l.setRequestHeader(x,g.headers[x]);else null!=g.contentType?
+l.setRequestHeader("Content-Type",g.contentType):F&&l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b)});k.send(mxUtils.bind(this,function(l){try{if(window.clearTimeout(u),q){try{var n=JSON.parse(l.getText())}catch(B){n=null}if(200<=l.getStatus()&&299>=l.getStatus())null!=c&&c(n);else{var x=null!=n&&null!=n.error?null!=n.error.data?n.error.data:n.error.errors:null,A=null!=x&&0<x.length?x[0].reason:null;null==p||null==n||null==n.error||-1!=n.error.code&&
+(403!=n.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=n.error.message)?null!=n&&null!=n.error&&(401==n.error.code||403==n.error.code&&"rateLimitExceeded"!=A)?403==n.error.code&&this.retryAuth||401==n.error.code&&this.retryAuth&&"authError"==A?(null!=p&&p(n),this.retryAuth=!1):(this.retryAuth=!0,this.execute(H)):null!=n&&null!=n.error&&412!=n.error.code&&404!=n.error.code&&400!=n.error.code&&this.currentRequest==g&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(H,
+Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=p&&p(n):p(n)}}}catch(B){if(null!=p)p(B);else throw B;}}))}catch(l){if(null!=p)p(l);else throw l;}});null!=b&&this.authCalled?H():this.execute(H)}catch(E){if(null!=p)p(E);else throw E;}};DriveClient.prototype.createAuthWin=function(g){return window.open(g?g:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(g,c,p,q,u){this.isExtAuth&&!g?window.parent.driveAuth(mxUtils.bind(this,function(y){this.updateAuthInfo(y,!0,!0,c,p)}),p):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.authorizeStep2(y.getText(),g,c,p,q,u):null!=p&&p(y)}),p)};DriveClient.prototype.updateAuthInfo=function(g,c,p,q,u){b=g.access_token;delete g.access_token;g.expires=Date.now()+1E3*parseInt(g.expires_in);
-g.remember=c;this.resetTokenRefresh(g);this.authCalled=!0;if(p||null==this.user){var y=JSON.stringify(g);this.updateUser(mxUtils.bind(this,function(){var G=JSON.parse(y);this.setPersistentToken(G,!c);null!=q&&q()}),u)}else null!=q&&(this.setPersistentToken(g,!c),q())};DriveClient.prototype.authorizeStep2=function(g,c,p,q,u,y){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var G=
-JSON.parse(this.getPersistentToken(!0));G&&null!=G.current&&(this.userId=G.current.userId)}if(c&&null==this.userId)null!=q&&q();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+g)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(F){try{if(200<=F.getStatus()&&299>=F.getStatus()){var d=JSON.parse(F.getText());this.updateAuthInfo(d,!0,!1,p,q)}else 0!=F.getStatus()&&this.logout(),null!=q&&q(F)}catch(k){if(null!=
+g.remember=c;this.resetTokenRefresh(g);this.authCalled=!0;if(p||null==this.user){var y=JSON.stringify(g);this.updateUser(mxUtils.bind(this,function(){var H=JSON.parse(y);this.setPersistentToken(H,!c);null!=q&&q()}),u)}else null!=q&&(this.setPersistentToken(g,!c),q())};DriveClient.prototype.authorizeStep2=function(g,c,p,q,u,y){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var H=
+JSON.parse(this.getPersistentToken(!0));H&&null!=H.current&&(this.userId=H.current.userId)}if(c&&null==this.userId)null!=q&&q();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+g)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(F){try{if(200<=F.getStatus()&&299>=F.getStatus()){var d=JSON.parse(F.getText());this.updateAuthInfo(d,!0,!1,p,q)}else 0!=F.getStatus()&&this.logout(),null!=q&&q(F)}catch(k){if(null!=
window.console&&console.log("DriveClient.authorizeStep2",k),null!=q)q(k);else throw k;}}),q);else{var E="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(u?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+g+(this.sameWinRedirectUrl?
"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(E),y=null):null==y?y=this.createAuthWin(E):y.location=E;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(F,d){window.onGoogleDriveCallback=null;try{null==F?null!=q&&q({message:mxResources.get("accessDenied")}):this.updateAuthInfo(F,u,!0,p,q)}catch(k){null!=q&&q(k)}finally{null!=d&&d.close()}}),y.focus()):null!=q&&q({message:mxResources.get("allowPopups")})}}catch(F){if(null!=q)q(F);else throw F;
}};DriveClient.prototype.resetTokenRefresh=function(g){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=g&&null==g.error&&0<g.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(g.expires_in),this.lastTokenRefresh=Date.now(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*g.expires_in))};DriveClient.prototype.checkToken=function(g){var c=
-0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){g();c&&this.fireEvent(new mxEventObject("disconnected"))})):g()};DriveClient.prototype.updateUser=function(g,c){try{var p={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(q){try{var u=JSON.parse(q);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var G=
-mxResources.get("notAvailable"),E=G,F=null;null!=y&&null!=y.user&&(G=y.user.emailAddress,E=y.user.displayName,F=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(u.id,G,E,F,u.locale));this.userId=u.id;null!=g&&g()}),c)}catch(y){null!=c&&c(y)}}),c,null,null,null,null,p)}catch(q){if(null!=c)c(q);else throw q;}};DriveClient.prototype.copyFile=function(g,c,p,q){null!=g&&null!=c&&this.executeRequest({url:"/files/"+g+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",
+0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){g();c&&this.fireEvent(new mxEventObject("disconnected"))})):g()};DriveClient.prototype.updateUser=function(g,c){try{var p={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(q){try{var u=JSON.parse(q);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var H=
+mxResources.get("notAvailable"),E=H,F=null;null!=y&&null!=y.user&&(H=y.user.emailAddress,E=y.user.displayName,F=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(u.id,H,E,F,u.locale));this.userId=u.id;null!=g&&g()}),c)}catch(y){null!=c&&c(y)}}),c,null,null,null,null,p)}catch(q){if(null!=c)c(q);else throw q;}};DriveClient.prototype.copyFile=function(g,c,p,q){null!=g&&null!=c&&this.executeRequest({url:"/files/"+g+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",
method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},p,q)};DriveClient.prototype.renameFile=function(g,c,p,q){null!=g&&null!=c&&this.executeRequest(this.createDriveRequest(g,{title:c}),p,q)};DriveClient.prototype.moveFile=function(g,c,p,q){null!=g&&null!=c&&this.executeRequest(this.createDriveRequest(g,{parents:[{kind:"drive#fileLink",id:c}]}),p,q)};DriveClient.prototype.createDriveRequest=function(g,c){return{url:"/files/"+g+"?uploadType=multipart&supportsAllDrives=true",
method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(g,c,p){return this.getFile(g,c,p,!0,!0)};DriveClient.prototype.loadDescriptor=function(g,c,p,q){this.executeRequest({url:"/files/"+g+"?supportsAllDrives=true&fields="+(null!=q?q:this.allFields)},c,p)};DriveClient.prototype.listFiles=function(g,c,p,q,u){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+
"') "+(g?" and (title contains '"+g+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(p?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},q,u)};DriveClient.prototype.getCustomProperty=function(g,c){g=g.properties;var p=null;if(null!=g)for(var q=0;q<g.length;q++)if(g[q].key==c){p=g[q].value;break}return p};DriveClient.prototype.getFile=function(g,c,p,q,u){q=null!=q?q:!1;u=null!=u?u:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+g+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},
-mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=g;this.getXmlFile(y,c,p)}),p):this.loadDescriptor(g,mxUtils.bind(this,function(y){try{if(null!=this.user){var G=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!Editor.useCanvasForExport&&G?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,p,null,{Authorization:"Bearer "+b}):q||u||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,
-c,p,!0,u):this.getXmlFile(y,c,p)}else p({message:mxResources.get("loggedOut")})}catch(E){if(null!=p)p(E);else throw E;}}),p)};DriveClient.prototype.isGoogleRealtimeMimeType=function(g){return null!=g&&"application/vnd.jgraph.mxfile."==g.substring(0,30)};DriveClient.prototype.getXmlFile=function(g,c,p,q,u){try{var y={Authorization:"Bearer "+b},G=g.downloadUrl;if(null==G)null!=p&&p({message:mxResources.get("exportOptionsDisabledDetails")});else{var E=0,F=mxUtils.bind(this,function(){this.ui.editor.loadUrl(G,
+mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=g;this.getXmlFile(y,c,p)}),p):this.loadDescriptor(g,mxUtils.bind(this,function(y){try{if(null!=this.user){var H=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!Editor.useCanvasForExport&&H?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,p,null,{Authorization:"Bearer "+b}):q||u||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,
+c,p,!0,u):this.getXmlFile(y,c,p)}else p({message:mxResources.get("loggedOut")})}catch(E){if(null!=p)p(E);else throw E;}}),p)};DriveClient.prototype.isGoogleRealtimeMimeType=function(g){return null!=g&&"application/vnd.jgraph.mxfile."==g.substring(0,30)};DriveClient.prototype.getXmlFile=function(g,c,p,q,u){try{var y={Authorization:"Bearer "+b},H=g.downloadUrl;if(null==H)null!=p&&p({message:mxResources.get("exportOptionsDisabledDetails")});else{var E=0,F=mxUtils.bind(this,function(){this.ui.editor.loadUrl(H,
mxUtils.bind(this,function(d){try{if(null==d)p({message:mxResources.get("invalidOrMissingFile")});else if(g.mimeType==this.libraryMimeType||u)g.mimeType!=this.libraryMimeType||u?c(new DriveLibrary(this.ui,d,g)):p({message:mxResources.get("notADiagramFile")});else{var k=!1;if(/\.png$/i.test(g.title)){var l=d.lastIndexOf(",");if(0<l){var n=this.ui.extractGraphModelFromPng(d);if(null!=n&&0<n.length)d=n;else try{n=d.substring(l+1);var x=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):
-atob(n),z=this.ui.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0);null==z||0<z.getElementsByTagName("parsererror").length?k=!0:d=x}catch(B){k=!0}}}else/\.pdf$/i.test(g.title)?(n=Editor.extractGraphModelFromPdf(d),null!=n&&0<n.length&&(k=!0,d=n)):"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(x=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(x):Base64.decode(x));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,G)?this.ui.parseFileData(d,mxUtils.bind(this,
+atob(n),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?k=!0:d=x}catch(B){k=!0}}}else/\.pdf$/i.test(g.title)?(n=Editor.extractGraphModelFromPdf(d),null!=n&&0<n.length&&(k=!0,d=n)):"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(x=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(x):Base64.decode(x));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,H)?this.ui.parseFileData(d,mxUtils.bind(this,
function(B){try{4==B.readyState&&(200<=B.status&&299>=B.status?c(new LocalFile(this.ui,B.responseText,g.title+this.extension,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}catch(I){if(null!=p)p(I);else throw I;}}),g.title):c(k?new LocalFile(this.ui,d,g.title,!0):new DriveFile(this.ui,d,g))}}catch(B){if(null!=p)p(B);else throw B;}}),mxUtils.bind(this,function(d,k){if(E<this.maxRetries&&null!=k&&403==k.getStatus())E++,window.setTimeout(F,2*E*this.coolOff*(1+.1*(Math.random()-.5)));
-else if(null!=p)p(d);else throw d;}),null!=g.mimeType&&"image/"==g.mimeType.substring(0,6)&&"image/svg"!=g.mimeType.substring(0,9)||/\.png$/i.test(g.title)||/\.jpe?g$/i.test(g.title)||/\.pdf$/i.test(g.title),null,null,null,y)});F()}}catch(d){if(null!=p)p(d);else throw d;}};DriveClient.prototype.saveFile=function(g,c,p,q,u,y,G,E,F){try{var d=0;g.saveLevel=1;var k=mxUtils.bind(this,function(S){if(null!=q)q(S);else throw S;}),l=mxUtils.bind(this,function(S){k(S);try{EditorUi.logError(S.message,null,
-null,null,S)}catch(Q){}});if(g.isEditable()&&null!=g.desc){var n=Date.now(),x=g.desc.etag,z=g.desc.modifiedDate,B=g.desc.headRevisionId,I=Editor.useCanvasForExport&&/(\.png)$/i.test(g.getTitle());y=null!=y?y:!1;var H=null,C=!1,R={mimeType:g.desc.mimeType,title:g.getTitle()};if(this.isGoogleRealtimeMimeType(R.mimeType))R.mimeType=this.xmlMimeType,H=g.desc,C=c=!0;else if("application/octet-stream"==R.mimeType||"1"==urlParams["override-mime"]&&R.mimeType!=this.xmlMimeType)R.mimeType=this.xmlMimeType;
-var U=mxUtils.bind(this,function(S,Q,v){try{g.saveLevel=3;var A=g.getData(),N=null,J=null;g.constructor==DriveFile&&(null==E&&(E=[]),null==g.getChannelId()&&E.push({key:"channel",value:Editor.guid(32)}),null==g.getChannelKey()&&E.push({key:"key",value:Editor.guid(32)}),F=null!=F?F:Editor.guid(32),E.push({key:"secret",value:F}),J=this.ui.getPagesForXml(A),N=this.ui.getHashValueForPages(J),E.push({key:"checksum",value:F+":"+N}));v||(null!=S||y||(S=this.placeholderThumbnail,Q=this.placeholderMimeType),
-null!=S&&null!=Q&&(R.thumbnail={image:S,mimeType:Q}));var K=mxUtils.bind(this,function(D){try{if(g.saveDelay=Date.now()-n,g.saveLevel=null,p(D,A,J,N),null!=H){this.executeRequest({url:"/files/"+H.id+"/revisions/"+H.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(M){M.pinned=!0;this.executeRequest({url:"/files/"+H.id+"/revisions/"+H.headRevisionId,method:"PUT",params:M})})));try{EditorUi.logEvent({category:g.convertedFrom+"-CONVERT-FILE-"+g.getHash(),action:"from_"+
-H.id+"."+H.headRevisionId+"-to_"+g.desc.id+"."+g.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=g.sync?"-client_"+g.sync.clientId:"nosync")})}catch(M){}}}catch(M){l(M)}}),m=mxUtils.bind(this,function(D,M){g.saveLevel=4;try{null!=E&&(R.properties=E);var L=G||g.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:g.getCurrentEtag(),O=mxUtils.bind(this,function(V){g.saveLevel=5;try{var X=g.desc.mimeType!=this.xmlMimeType&&g.desc.mimeType!=this.mimeType&&
-g.desc.mimeType!=this.libraryMimeType,W=!0,Y=null;try{Y=window.setTimeout(mxUtils.bind(this,function(){W=!1;k({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(g.getId(),R,D,c||V||X,M,V?null:L,C),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){var aa=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(z)).getTime():0;if(0>=aa||x==Z.etag||c&&B==Z.headRevisionId){var fa=[];null==Z?fa.push("Empty response"):(0>=aa&&fa.push("Invalid modified time"),
+else if(null!=p)p(d);else throw d;}),null!=g.mimeType&&"image/"==g.mimeType.substring(0,6)&&"image/svg"!=g.mimeType.substring(0,9)||/\.png$/i.test(g.title)||/\.jpe?g$/i.test(g.title)||/\.pdf$/i.test(g.title),null,null,null,y)});F()}}catch(d){if(null!=p)p(d);else throw d;}};DriveClient.prototype.saveFile=function(g,c,p,q,u,y,H,E,F){try{var d=0;g.saveLevel=1;var k=mxUtils.bind(this,function(S){if(null!=q)q(S);else throw S;}),l=mxUtils.bind(this,function(S){k(S);try{EditorUi.logError(S.message,null,
+null,null,S)}catch(Q){}});if(g.isEditable()&&null!=g.desc){var n=Date.now(),x=g.desc.etag,A=g.desc.modifiedDate,B=g.desc.headRevisionId,I=Editor.useCanvasForExport&&/(\.png)$/i.test(g.getTitle());y=null!=y?y:!1;var G=null,C=!1,R={mimeType:g.desc.mimeType,title:g.getTitle()};if(this.isGoogleRealtimeMimeType(R.mimeType))R.mimeType=this.xmlMimeType,G=g.desc,C=c=!0;else if("application/octet-stream"==R.mimeType||"1"==urlParams["override-mime"]&&R.mimeType!=this.xmlMimeType)R.mimeType=this.xmlMimeType;
+var T=mxUtils.bind(this,function(S,Q,v){try{g.saveLevel=3;var z=g.getData(),N=null,J=null;g.constructor==DriveFile&&(null==E&&(E=[]),null==g.getChannelId()&&E.push({key:"channel",value:Editor.guid(32)}),null==g.getChannelKey()&&E.push({key:"key",value:Editor.guid(32)}),F=null!=F?F:Editor.guid(32),E.push({key:"secret",value:F}),J=this.ui.getPagesForXml(z),N=this.ui.getHashValueForPages(J),E.push({key:"checksum",value:F+":"+N}));v||(null!=S||y||(S=this.placeholderThumbnail,Q=this.placeholderMimeType),
+null!=S&&null!=Q&&(R.thumbnail={image:S,mimeType:Q}));var K=mxUtils.bind(this,function(D){try{if(g.saveDelay=Date.now()-n,g.saveLevel=null,p(D,z,J,N),null!=G){this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(M){M.pinned=!0;this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId,method:"PUT",params:M})})));try{EditorUi.logEvent({category:g.convertedFrom+"-CONVERT-FILE-"+g.getHash(),action:"from_"+
+G.id+"."+G.headRevisionId+"-to_"+g.desc.id+"."+g.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=g.sync?"-client_"+g.sync.clientId:"nosync")})}catch(M){}}}catch(M){l(M)}}),m=mxUtils.bind(this,function(D,M){g.saveLevel=4;try{null!=E&&(R.properties=E);var L=H||g.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:g.getCurrentEtag(),O=mxUtils.bind(this,function(V){g.saveLevel=5;try{var X=g.desc.mimeType!=this.xmlMimeType&&g.desc.mimeType!=this.mimeType&&
+g.desc.mimeType!=this.libraryMimeType,W=!0,Y=null;try{Y=window.setTimeout(mxUtils.bind(this,function(){W=!1;k({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(g.getId(),R,D,c||V||X,M,V?null:L,C),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){var aa=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(A)).getTime():0;if(0>=aa||x==Z.etag||c&&B==Z.headRevisionId){var fa=[];null==Z?fa.push("Empty response"):(0>=aa&&fa.push("Invalid modified time"),
x==Z.etag&&fa.push("Stale etag"),c&&B==Z.headRevisionId&&fa.push("Stale revision"),L=Z.etag);0==fa.length&&fa.push(mxResources.get("unknownError"));aa=fa.join(", ");if(d<this.staleEtagMaxRetries)d++,fa=Math.round(Math.pow(2,d)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(O,fa),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",d,"delay",fa,"rev",null!=Z?Z.headRevisionId:"null","errors",aa);else{g.saveLevel=12;k({message:mxResources.get("error")+": "+aa},Z);try{EditorUi.logError("Saving to Google Drive failed",
-null,"id-"+g.desc.id+"-from-"+B+"."+z+"-"+this.ui.hashValue(x)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<aa.length?"-errors-"+aa:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=g.sync?"-client_"+g.sync.clientId:"-nosync")+"-retries-"+d+"-delay-"+(Date.now()-n))}catch(ea){}}}else K(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){g.saveLevel=6;try{g.isConflict(Z)?this.executeRequest({url:"/files/"+g.getId()+"?supportsAllDrives=true&fields="+
+null,"id-"+g.desc.id+"-from-"+B+"."+A+"-"+this.ui.hashValue(x)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<aa.length?"-errors-"+aa:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=g.sync?"-client_"+g.sync.clientId:"-nosync")+"-retries-"+d+"-delay-"+(Date.now()-n))}catch(ea){}}}else K(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){g.saveLevel=6;try{g.isConflict(Z)?this.executeRequest({url:"/files/"+g.getId()+"?supportsAllDrives=true&fields="+
this.catchupFields},mxUtils.bind(this,function(aa){g.saveLevel=7;try{if(null!=aa&&aa.etag==L)if(d<this.staleEtagMaxRetries){d++;var fa=Math.round(2*d*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(P,fa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",fa)}else{P(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+g.getHash(),action:"rev_"+g.desc.headRevisionId+"-mod_"+g.desc.modifiedDate+"-size_"+g.getSize()+"-mime_"+g.desc.mimeType+(this.ui.editor.autosave?
"":"-nosave")+(g.isAutosave()?"":"-noauto")+(g.changeListenerEnabled?"":"-nolisten")+(g.inConflictState?"-conflict":"")+(g.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=g.sync?"-client_"+g.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&aa.headRevisionId==B&&EditorUi.debug("DriveClient: Remote Etag Changed","local",L,"remote",aa.etag,"rev",g.desc.headRevisionId,"response",[aa],"file",[g]),k(Z,aa)}catch(ea){l(ea)}}),mxUtils.bind(this,function(){k(Z)})):
k(Z)}catch(aa){l(aa)}}}))}catch(Z){l(Z)}}),P=mxUtils.bind(this,function(V){g.saveLevel=9;if(V||null==L)O(V);else{var X=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){X=!1;k({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(Y){}this.executeRequest({url:"/files/"+g.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Y){window.clearTimeout(W);if(X){g.saveLevel=10;try{null!=Y&&Y.headRevisionId==B?("1"==urlParams.test&&L!=Y.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
-"from",L,"to",Y.etag,"rev",g.desc.headRevisionId,"response",[Y],"file",[g]),L=Y.etag,O(V)):k({error:{code:412}},Y)}catch(Z){l(Z)}}}),mxUtils.bind(this,function(Y){window.clearTimeout(W);X&&(g.saveLevel=11,k(Y))}))}});if(I&&null==S){g.saveLevel=8;var T=new Image;T.onload=mxUtils.bind(this,function(){try{var V=this.thumbnailWidth/T.width,X=document.createElement("canvas");X.width=this.thumbnailWidth;X.height=Math.floor(T.height*V);X.getContext("2d").drawImage(T,0,0,X.width,X.height);var W=X.toDataURL();
-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");R.thumbnail={image:W,mimeType:"image/png"};P(!1)}catch(Y){try{P(!1)}catch(Z){l(Z)}}});T.src="data:image/png;base64,"+D}else P(!1)}catch(V){l(V)}});if(I){var t=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){m(D,!0)}),k,this.ui.getCurrentFile()!=g?A:null,t.scale,t.border)}else m(A,!1)}catch(D){l(D)}});try{g.saveLevel=2,(y||I||g.constructor==DriveLibrary||!this.enableThumbnails||
-"0"==urlParams.thumb||null!=R.mimeType&&"application/vnd.jgraph.mxfile"!=R.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(S){try{var Q=null;try{null!=S&&(Q=S.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(v){Q=null}U(Q,"image/png")}catch(v){l(v)}}),20))&&U(null,null,g.constructor!=DriveLibrary)}catch(S){l(S)}}else this.ui.editor.graph.reset(),k({message:mxResources.get("readOnly")})}catch(S){l(S)}};
-DriveClient.prototype.insertFile=function(g,c,p,q,u,y,G){y=null!=y?y:this.xmlMimeType;g={mimeType:y,title:g};null!=p&&(g.parents=[{kind:"drive#fileLink",id:p}]);this.executeRequest(this.createUploadRequest(null,g,c,!1,G),mxUtils.bind(this,function(E){y==this.libraryMimeType?q(new DriveLibrary(this.ui,c,E)):0==E?null!=u&&u({message:mxResources.get("errorSavingFile")}):q(new DriveFile(this.ui,c,E))}),u)};DriveClient.prototype.createUploadRequest=function(g,c,p,q,u,y,G){u=null!=u?u:!1;var E={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};
+"from",L,"to",Y.etag,"rev",g.desc.headRevisionId,"response",[Y],"file",[g]),L=Y.etag,O(V)):k({error:{code:412}},Y)}catch(Z){l(Z)}}}),mxUtils.bind(this,function(Y){window.clearTimeout(W);X&&(g.saveLevel=11,k(Y))}))}});if(I&&null==S){g.saveLevel=8;var U=new Image;U.onload=mxUtils.bind(this,function(){try{var V=this.thumbnailWidth/U.width,X=document.createElement("canvas");X.width=this.thumbnailWidth;X.height=Math.floor(U.height*V);X.getContext("2d").drawImage(U,0,0,X.width,X.height);var W=X.toDataURL();
+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");R.thumbnail={image:W,mimeType:"image/png"};P(!1)}catch(Y){try{P(!1)}catch(Z){l(Z)}}});U.src="data:image/png;base64,"+D}else P(!1)}catch(V){l(V)}});if(I){var t=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){m(D,!0)}),k,this.ui.getCurrentFile()!=g?z:null,t.scale,t.border)}else m(z,!1)}catch(D){l(D)}});try{g.saveLevel=2,(y||I||g.constructor==DriveLibrary||!this.enableThumbnails||
+"0"==urlParams.thumb||null!=R.mimeType&&"application/vnd.jgraph.mxfile"!=R.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(S){try{var Q=null;try{null!=S&&(Q=S.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(v){Q=null}T(Q,"image/png")}catch(v){l(v)}}),20))&&T(null,null,g.constructor!=DriveLibrary)}catch(S){l(S)}}else this.ui.editor.graph.reset(),k({message:mxResources.get("readOnly")})}catch(S){l(S)}};
+DriveClient.prototype.insertFile=function(g,c,p,q,u,y,H){y=null!=y?y:this.xmlMimeType;g={mimeType:y,title:g};null!=p&&(g.parents=[{kind:"drive#fileLink",id:p}]);this.executeRequest(this.createUploadRequest(null,g,c,!1,H),mxUtils.bind(this,function(E){y==this.libraryMimeType?q(new DriveLibrary(this.ui,c,E)):0==E?null!=u&&u({message:mxResources.get("errorSavingFile")}):q(new DriveFile(this.ui,c,E))}),u)};DriveClient.prototype.createUploadRequest=function(g,c,p,q,u,y,H){u=null!=u?u:!1;var E={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};
null!=y&&(E["If-Match"]=y);g={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=g?"/"+g:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=g?"PUT":"POST",headers:E,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=p?u?p:!window.btoa||
-mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(p):Graph.base64EncodeUnicode(p):"")+"\r\n---------314159265358979323846--"};q||(g.fullUrl+="&newRevision=false");G&&(g.fullUrl+="&pinned=true");return g};DriveClient.prototype.createLinkPicker=function(){var g=f.linkPicker;if(null==g||f.linkPickerToken!=b){f.linkPickerToken=b;g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),
+mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(p):Graph.base64EncodeUnicode(p):"")+"\r\n---------314159265358979323846--"};q||(g.fullUrl+="&newRevision=false");H&&(g.fullUrl+="&pinned=true");return g};DriveClient.prototype.createLinkPicker=function(){var g=f.linkPicker;if(null==g||f.linkPickerToken!=b){f.linkPickerToken=b;g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),
p=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);g=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(f.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(g).addView(c).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED)}return g};DriveClient.prototype.pickFile=function(g,c,p){this.filePickerCallback=null!=g?g:mxUtils.bind(this,function(q){this.ui.loadFile("G"+q)});this.filePicked=
mxUtils.bind(this,function(q){q.action==google.picker.Action.PICKED&&this.filePickerCallback(q.docs[0].id,q.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=c?"genericPicker":"filePicker",u=mxUtils.bind(this,function(k){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(k).className&&(mxEvent.removeListener(document,"click",u),this[q].setVisible(!1),p&&p())});if(null==f[q]||f[q+"Token"]!=
-b){f[q+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),G=(new google.picker.DocsView).setIncludeFolders(!0),E=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),F=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),G.setMimeTypes("*/*"),E.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),G.setMimeTypes(this.mimeTypes),E.setMimeTypes(this.mimeTypes));f[q]=(new google.picker.PickerBuilder).setOAuthToken(f[q+
-"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(G).addView(E).addView(google.picker.ViewId.RECENTLY_PICKED).addView(F);if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");f[q]=f[q].setSize(d[0],d[1])}urlParams.topBaseUrl&&(f[q]=f[q].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f[q]=f[q].setCallback(mxUtils.bind(this,function(k){if(k.action==google.picker.Action.PICKED||k.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,
+b){f[q+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),H=(new google.picker.DocsView).setIncludeFolders(!0),E=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),F=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),H.setMimeTypes("*/*"),E.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes),E.setMimeTypes(this.mimeTypes));f[q]=(new google.picker.PickerBuilder).setOAuthToken(f[q+
+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(H).addView(E).addView(google.picker.ViewId.RECENTLY_PICKED).addView(F);if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");f[q]=f[q].setSize(d[0],d[1])}urlParams.topBaseUrl&&(f[q]=f[q].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f[q]=f[q].setCallback(mxUtils.bind(this,function(k){if(k.action==google.picker.Action.PICKED||k.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,
"click",u),p&&k.action==google.picker.Action.CANCEL&&p();k.action==google.picker.Action.PICKED&&this.filePicked(k)})).build()}mxEvent.addListener(document,"click",u);f[q].setVisible(!0)}catch(k){this.ui.spinner.stop(),this.ui.handleError(k)}}))};DriveClient.prototype.pickFolder=function(g,c){this.folderPickerCallback=g;var p=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=
mxUtils.bind(this,function(F){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(F).className&&(mxEvent.removeListener(document,"click",q),f.folderPicker.setVisible(!1))});if(null==f.folderPicker||f.folderPickerToken!=b){f.folderPickerToken=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),y=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-G=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");f.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(f.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(y).addView(G).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+H=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");f.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(f.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(y).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
if(urlParams.gPickerSize){var E=urlParams.gPickerSize.split(",");f.folderPicker=f.folderPicker.setSize(E[0],E[1])}urlParams.topBaseUrl&&(f.folderPicker=f.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.folderPicker=f.folderPicker.setCallback(mxUtils.bind(this,function(F){F.action!=google.picker.Action.PICKED&&F.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",q);this.folderPickerCallback(F)})).build()}mxEvent.addListener(document,"click",q);f.folderPicker.setVisible(!0)}catch(F){this.ui.spinner.stop(),
this.ui.handleError(F)}}))}catch(q){this.ui.handleError(q)}});c?p():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){p()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(q){this.ui.handleError(q)}}))};
DriveClient.prototype.pickLibrary=function(g){this.filePickerCallback=g;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(E){"picker modal-dialog-bg picker-dialog-bg"==
mxEvent.getSource(E).className&&(mxEvent.removeListener(document,"click",c),f.libraryPicker.setVisible(!1))});if(null==f.libraryPicker||f.libraryPickerToken!=b){f.libraryPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),q=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-u=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),y=(new google.picker.DocsUploadView).setIncludeFolders(!0);f.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(f.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(q).addView(u).addView(google.picker.ViewId.RECENTLY_PICKED).addView(y);if(urlParams.gPickerSize){var G=
-urlParams.gPickerSize.split(",");f.libraryPicker=f.libraryPicker.setSize(G[0],G[1])}urlParams.topBaseUrl&&(f.libraryPicker=f.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.libraryPicker=f.libraryPicker.setCallback(mxUtils.bind(this,function(E){E.action!=google.picker.Action.PICKED&&E.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);E.action==google.picker.Action.PICKED&&this.filePicked(E)})).build()}mxEvent.addListener(document,"click",c);f.libraryPicker.setVisible(!0)}catch(E){this.ui.spinner.stop(),
+u=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),y=(new google.picker.DocsUploadView).setIncludeFolders(!0);f.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(f.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(q).addView(u).addView(google.picker.ViewId.RECENTLY_PICKED).addView(y);if(urlParams.gPickerSize){var H=
+urlParams.gPickerSize.split(",");f.libraryPicker=f.libraryPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(f.libraryPicker=f.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.libraryPicker=f.libraryPicker.setCallback(mxUtils.bind(this,function(E){E.action!=google.picker.Action.PICKED&&E.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);E.action==google.picker.Action.PICKED&&this.filePicked(E)})).build()}mxEvent.addListener(document,"click",c);f.libraryPicker.setVisible(!0)}catch(E){this.ui.spinner.stop(),
this.ui.handleError(E)}}))};DriveClient.prototype.showPermissions=function(g,c){var p=mxUtils.bind(this,function(){var q=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var u=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+g;this.ui.editor.graph.openLink(u)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(q.container,400,150,!0,!0);q.init()});this.sharingFailed?p():this.checkToken(mxUtils.bind(this,
-function(){try{var q=new gapi.drive.share.ShareClient(this.appId);q.setOAuthToken(b);q.setItemIds([g]);q.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(u){for(var y=!1,G=0;G<u.length;G++)for(var E=0;E<u[G].addedNodes.length;E++){var F=u[G].addedNodes[E];"BUTTON"==F.nodeName&&"ok"==F.getAttribute("name")&&null!=F.parentNode&&null!=F.parentNode.parentNode&&
+function(){try{var q=new gapi.drive.share.ShareClient(this.appId);q.setOAuthToken(b);q.setItemIds([g]);q.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(u){for(var y=!1,H=0;H<u.length;H++)for(var E=0;E<u[H].addedNodes.length;E++){var F=u[H].addedNodes[E];"BUTTON"==F.nodeName&&"ok"==F.getAttribute("name")&&null!=F.parentNode&&null!=F.parentNode.parentNode&&
"dialog"==F.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,F.click(),p(),y=!0):"DIV"==F.nodeName&&"shr-q-shr-r-shr-xb"==F.className&&(y=!0)}y&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(u){this.ui.handleError(u)}}))};DriveClient.prototype.clearPersistentToken=function(){var g=JSON.parse(this.getPersistentToken(!0))||{};delete g.current;delete g[this.userId];for(var c in g){g.current={userId:c,
expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(g))};DriveClient.prototype.setPersistentToken=function(g,c){var p=JSON.parse(this.getPersistentToken(!0))||{};g.userId=this.userId;p.current=g;p[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(p),c)}})();DropboxFile=function(b,f,g){DrawioFile.call(this,b,f);this.stat=g};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};DropboxFile.prototype.getFileUrl=function(){return"https://www.dropbox.com/home/Apps"+this.ui.dropbox.appPath+this.stat.path_display};DropboxFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};
-DropboxFile.prototype.getRevisions=function(b,f){var g=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});g.then(mxUtils.bind(this,function(c){try{for(var p=[],q=c.entries.length-1;0<=q;q--)mxUtils.bind(this,function(u){p.push({modifiedDate:u.client_modified,fileSize:u.size,getXml:mxUtils.bind(this,function(y,G){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:u.rev},y,G)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+
+DropboxFile.prototype.getRevisions=function(b,f){var g=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});g.then(mxUtils.bind(this,function(c){try{for(var p=[],q=c.entries.length-1;0<=q;q--)mxUtils.bind(this,function(u){p.push({modifiedDate:u.client_modified,fileSize:u.size,getXml:mxUtils.bind(this,function(y,H){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:u.rev},y,H)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+
u.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=y?"&page="+y:""))+window.location.hash})})})(c.entries[q]);b(p)}catch(u){f(u)}}));g["catch"](function(c){f(c)})};DropboxFile.prototype.getLatestVersion=function(b,f){this.ui.dropbox.getFile(this.getId(),b,f)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,f,g,c,p){this.doSave(this.getTitle(),b,f,g,c,p)};DropboxFile.prototype.saveAs=function(b,f,g){this.doSave(b,!1,f,g)};
DropboxFile.prototype.doSave=function(b,f,g,c,p,q){var u=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=u;this.saveFile(b,f,g,c,p,q)}),c,p,q])};
-DropboxFile.prototype.saveFile=function(b,f,g,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(f=mxUtils.bind(this,function(p){if(p)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var q=mxUtils.bind(this,function(y){var G=this.stat.path_display.lastIndexOf("/");G=1<G?this.stat.path_display.substring(1,G+1):null;this.ui.dropbox.saveFile(b,y,mxUtils.bind(this,function(E){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=E;this.contentChanged();
-null!=g&&g()}),mxUtils.bind(this,function(E){this.savingFile=!1;null!=c&&c(E)}),G)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(y){q(this.ui.base64ToBlob(y,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,u.scale,u.border)}else q(this.getData())}catch(y){if(this.savingFile=!1,null!=c)c(y);else throw y;}else null!=c&&c()}),this.getTitle()==b?f(!0):this.ui.dropbox.checkExists(b,
+DropboxFile.prototype.saveFile=function(b,f,g,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(f=mxUtils.bind(this,function(p){if(p)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var q=mxUtils.bind(this,function(y){var H=this.stat.path_display.lastIndexOf("/");H=1<H?this.stat.path_display.substring(1,H+1):null;this.ui.dropbox.saveFile(b,y,mxUtils.bind(this,function(E){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=E;this.contentChanged();
+null!=g&&g()}),mxUtils.bind(this,function(E){this.savingFile=!1;null!=c&&c(E)}),H)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(y){q(this.ui.base64ToBlob(y,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,u.scale,u.border)}else q(this.getData())}catch(y){if(this.savingFile=!1,null!=c)c(y);else throw y;}else null!=c&&c()}),this.getTitle()==b?f(!0):this.ui.dropbox.checkExists(b,
f)):null!=g&&g()};DropboxFile.prototype.rename=function(b,f,g){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=f&&f()):(this.stat=c,this.descriptorChanged(),this.save(!0,f,g))}),g)};DropboxLibrary=function(b,f,g){DropboxFile.call(this,b,f,g)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(f){DrawioClient.call(this,f,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"dropbox";DropboxClient.prototype.logout=
function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(f,g,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),u=this.client.usersGetCurrentAccount();
u.then(mxUtils.bind(this,function(y){window.clearTimeout(q);p&&(this.setUser(new DrawioUser(y.account_id,y.email,y.name.display_name)),f())}));u["catch"](mxUtils.bind(this,function(y){window.clearTimeout(q);p&&(null==y||401!==y.status||c?g({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,g,!0)}),g)))}))};DropboxClient.prototype.authenticate=function(f,g){(new mxXmlRequest(this.redirectUri+
"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,g):null!=g&&g(c)}),g)};DropboxClient.prototype.authenticateStep2=function(f,g,c){if(null==window.onDropboxCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=
u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),g()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,y){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
-(u?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(G,E){if(q){window.onDropboxCallback=null;q=!1;try{null==G?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=G.access_token,this.client.setAccessToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),g())}catch(F){c(F)}finally{null!=
-E&&E.close()}}else null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onDropboxCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(f,g,c){var p=mxUtils.bind(this,function(u){var y=!0,G=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),E=f();E.then(mxUtils.bind(this,
-function(F){window.clearTimeout(G);y&&null!=g&&g(F)}));E["catch"](mxUtils.bind(this,function(F){window.clearTimeout(G);y&&(null==F||500!=F.status&&400!=F.status&&401!=F.status?c({message:mxResources.get("error")+" "+F.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c)))}))}),q=mxUtils.bind(this,function(u){null==this.user?
+(u?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(H,E){if(q){window.onDropboxCallback=null;q=!1;try{null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.client.setAccessToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),g())}catch(F){c(F)}finally{null!=
+E&&E.close()}}else null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onDropboxCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(f,g,c){var p=mxUtils.bind(this,function(u){var y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),E=f();E.then(mxUtils.bind(this,
+function(F){window.clearTimeout(H);y&&null!=g&&g(F)}));E["catch"](mxUtils.bind(this,function(F){window.clearTimeout(H);y&&(null==F||500!=F.status&&400!=F.status&&401!=F.status?c({message:mxResources.get("error")+" "+F.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c)))}))}),q=mxUtils.bind(this,function(u){null==this.user?
this.updateUser(function(){q(!0)},c,u):p(u)});null==b?this.authenticate(function(){q(!0)},c):q(!1)};DropboxClient.prototype.getLibrary=function(f,g,c){this.getFile(f,g,c,!0)};DropboxClient.prototype.getFile=function(f,g,c,p){p=null!=p?p:!1;var q=/\.png$/i.test(f);if(/^https:\/\//i.test(f)||/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&q){var u=mxUtils.bind(this,function(){var y=f.split("/");this.ui.convertFile(f,0<y.length?y[y.length-1]:f,null,this.extension,
-g,c)});null!=b?u():this.authenticate(u,c)}else u={path:"/"+f},null!=urlParams.rev&&(u.rev=urlParams.rev),this.readFile(u,mxUtils.bind(this,function(y,G){var E=null;if(0<(q?y.lastIndexOf(","):-1)){var F=this.ui.extractGraphModelFromPng(y);null!=F&&0<F.length?y=F:E=new LocalFile(this,y,f,!0)}g(null!=E?E:p?new DropboxLibrary(this.ui,y,G):new DropboxFile(this.ui,y,G))}),c,q)};DropboxClient.prototype.readFile=function(f,g,c,p){var q=mxUtils.bind(this,function(y){var G=!0,E=window.setTimeout(mxUtils.bind(this,
-function(){G=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),F=this.client.filesGetMetadata({path:"/"+f.path.substring(1),include_deleted:!1});F.then(mxUtils.bind(this,function(d){}));F["catch"](function(d){window.clearTimeout(E);G&&null!=d&&409==d.status&&(G=!1,c({message:mxResources.get("fileNotFound")}))});F=this.client.filesDownload(f);F.then(mxUtils.bind(this,function(d){window.clearTimeout(E);if(G){G=!1;try{var k=new FileReader;k.onload=mxUtils.bind(this,function(l){g(k.result,d)});p?k.readAsDataURL(d.fileBlob):
-k.readAsText(d.fileBlob)}catch(l){c(l)}}}));F["catch"](mxUtils.bind(this,function(d){window.clearTimeout(E);G&&(G=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c)))}))}),u=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){u(!0)},
+g,c)});null!=b?u():this.authenticate(u,c)}else u={path:"/"+f},null!=urlParams.rev&&(u.rev=urlParams.rev),this.readFile(u,mxUtils.bind(this,function(y,H){var E=null;if(0<(q?y.lastIndexOf(","):-1)){var F=this.ui.extractGraphModelFromPng(y);null!=F&&0<F.length?y=F:E=new LocalFile(this,y,f,!0)}g(null!=E?E:p?new DropboxLibrary(this.ui,y,H):new DropboxFile(this.ui,y,H))}),c,q)};DropboxClient.prototype.readFile=function(f,g,c,p){var q=mxUtils.bind(this,function(y){var H=!0,E=window.setTimeout(mxUtils.bind(this,
+function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),F=this.client.filesGetMetadata({path:"/"+f.path.substring(1),include_deleted:!1});F.then(mxUtils.bind(this,function(d){}));F["catch"](function(d){window.clearTimeout(E);H&&null!=d&&409==d.status&&(H=!1,c({message:mxResources.get("fileNotFound")}))});F=this.client.filesDownload(f);F.then(mxUtils.bind(this,function(d){window.clearTimeout(E);if(H){H=!1;try{var k=new FileReader;k.onload=mxUtils.bind(this,function(l){g(k.result,d)});p?k.readAsDataURL(d.fileBlob):
+k.readAsText(d.fileBlob)}catch(l){c(l)}}}));F["catch"](mxUtils.bind(this,function(d){window.clearTimeout(E);H&&(H=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c)))}))}),u=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){u(!0)},
c,y):q(y)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};DropboxClient.prototype.checkExists=function(f,g,c){var p=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+f.toLowerCase(),include_deleted:!1})});this.executePromise(p,mxUtils.bind(this,function(q){c?g(!1,!0,q):this.ui.confirm(mxResources.get("replaceIt",[f]),function(){g(!0,!0,q)},function(){g(!1,!0,q)})}),function(q){g(!0,!1)})};DropboxClient.prototype.renameFile=function(f,g,c,p){if(/[\\\/:\?\*"\|]/.test(g))p({message:mxResources.get("dropboxCharsNotAllowed")});
-else{if(null!=f&&null!=g){var q=f.stat.path_display.substring(1),u=q.lastIndexOf("/");0<u&&(g=q.substring(0,u+1)+g)}null!=f&&null!=g&&f.stat.path_lower.substring(1)!==g.toLowerCase()?this.checkExists(g,mxUtils.bind(this,function(y,G,E){y?(y=mxUtils.bind(this,function(F){F=mxUtils.bind(this,function(){return this.client.filesMove({from_path:f.stat.path_display,to_path:"/"+g,autorename:!1})});this.executePromise(F,c,p)}),G&&E.path_lower.substring(1)!==g.toLowerCase()?(G=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
-g.toLowerCase()})}),this.executePromise(G,y,p)):y()):p()})):p({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(f,g,c,p){this.insertFile(f,g,c,p,!0)};DropboxClient.prototype.insertFile=function(f,g,c,p,q){q=null!=q?q:!1;this.checkExists(f,mxUtils.bind(this,function(u){u?this.saveFile(f,g,mxUtils.bind(this,function(y){q?c(new DropboxLibrary(this.ui,g,y)):c(new DropboxFile(this.ui,g,y))}),p):p()}))};DropboxClient.prototype.saveFile=function(f,g,c,p,q){if(/[\\\/:\?\*"\|]/.test(f))p({message:mxResources.get("dropboxCharsNotAllowed")});
+else{if(null!=f&&null!=g){var q=f.stat.path_display.substring(1),u=q.lastIndexOf("/");0<u&&(g=q.substring(0,u+1)+g)}null!=f&&null!=g&&f.stat.path_lower.substring(1)!==g.toLowerCase()?this.checkExists(g,mxUtils.bind(this,function(y,H,E){y?(y=mxUtils.bind(this,function(F){F=mxUtils.bind(this,function(){return this.client.filesMove({from_path:f.stat.path_display,to_path:"/"+g,autorename:!1})});this.executePromise(F,c,p)}),H&&E.path_lower.substring(1)!==g.toLowerCase()?(H=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
+g.toLowerCase()})}),this.executePromise(H,y,p)):y()):p()})):p({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(f,g,c,p){this.insertFile(f,g,c,p,!0)};DropboxClient.prototype.insertFile=function(f,g,c,p,q){q=null!=q?q:!1;this.checkExists(f,mxUtils.bind(this,function(u){u?this.saveFile(f,g,mxUtils.bind(this,function(y){q?c(new DropboxLibrary(this.ui,g,y)):c(new DropboxFile(this.ui,g,y))}),p):p()}))};DropboxClient.prototype.saveFile=function(f,g,c,p,q){if(/[\\\/:\?\*"\|]/.test(f))p({message:mxResources.get("dropboxCharsNotAllowed")});
else if(15E7<=g.length)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 150 MB)"});else{q=null!=q?q:"";var u=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+q+f,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([g],{type:"text/plain"})})});this.executePromise(u,c,p)}};DropboxClient.prototype.pickLibrary=function(f){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(g){if(this.ui.spinner.spin(document.body,
-mxResources.get("loading"))){var c=mxUtils.bind(this,function(u){this.ui.spinner.stop();this.ui.handleError(u)}),p=null!=g[0].link?g[0].link.indexOf(this.appPath):-1;if(0<p){var q=decodeURIComponent(g[0].link.substring(p+this.appPath.length-1));this.readFile({path:q},mxUtils.bind(this,function(u,y){if(null!=y&&y.id==g[0].id)try{this.ui.spinner.stop(),f(q.substring(1),new DropboxLibrary(this.ui,u,y))}catch(G){this.ui.handleError(G)}else this.createLibrary(g[0],f,c)}),c)}else this.createLibrary(g[0],
+mxResources.get("loading"))){var c=mxUtils.bind(this,function(u){this.ui.spinner.stop();this.ui.handleError(u)}),p=null!=g[0].link?g[0].link.indexOf(this.appPath):-1;if(0<p){var q=decodeURIComponent(g[0].link.substring(p+this.appPath.length-1));this.readFile({path:q},mxUtils.bind(this,function(u,y){if(null!=y&&y.id==g[0].id)try{this.ui.spinner.stop(),f(q.substring(1),new DropboxLibrary(this.ui,u,y))}catch(H){this.ui.handleError(H)}else this.createLibrary(g[0],f,c)}),c)}else this.createLibrary(g[0],
f,c)}})})};DropboxClient.prototype.createLibrary=function(f,g,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(p){this.insertFile(f.name,p,mxUtils.bind(this,function(q){try{this.ui.spinner.stop(),g(q.getHash().substring(1),q)}catch(u){c(u)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(f,g){null!=
Dropbox.choose?(f=null!=f?f:mxUtils.bind(this,function(c,p){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):p.getHash(),null,p)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(g)this.ui.spinner.stop(),f(c[0].link);else{var p=mxUtils.bind(this,function(E){this.ui.spinner.stop();this.ui.handleError(E)}),q=mxUtils.bind(this,function(E,F){this.ui.spinner.stop();f(E,
-F)}),u=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!Editor.useCanvasForExport&&u)q(c[0].link);else{var y=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<y){var G=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:G},mxUtils.bind(this,function(E,F){if(null!=F&&F.id==c[0].id){var d=u?E.lastIndexOf(","):-1;this.ui.spinner.stop();var k=null;0<d&&(d=this.ui.extractGraphModelFromPng(E),null!=d&&0<d.length?E=d:k=new LocalFile(this,
-E,G,!0));f(G.substring(1),null!=k?k:new DropboxFile(this.ui,E,F))}else this.createFile(c[0],q,p)}),p,u)}else this.createFile(c[0],q,p)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(f,g,c){var p=/(\.png)$/i.test(f.name);this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(q){null!=q&&0<q.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,
+F)}),u=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!Editor.useCanvasForExport&&u)q(c[0].link);else{var y=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<y){var H=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:H},mxUtils.bind(this,function(E,F){if(null!=F&&F.id==c[0].id){var d=u?E.lastIndexOf(","):-1;this.ui.spinner.stop();var k=null;0<d&&(d=this.ui.extractGraphModelFromPng(E),null!=d&&0<d.length?E=d:k=new LocalFile(this,
+E,H,!0));f(H.substring(1),null!=k?k:new DropboxFile(this.ui,E,F))}else this.createFile(c[0],q,p)}),p,u)}else this.createFile(c[0],q,p)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(f,g,c){var p=/(\.png)$/i.test(f.name);this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(q){null!=q&&0<q.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,
function(){var u=p?q.lastIndexOf(","):-1;0<u&&(u=this.ui.extractGraphModelFromPng(q.substring(u+1)),null!=u&&0<u.length&&(q=u));this.insertFile(f.name,q,mxUtils.bind(this,function(y){g(f.name,y)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,p)}})();OneDriveFile=function(b,f,g){DrawioFile.call(this,b,f);this.meta=g};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
OneDriveFile.prototype.getFileUrl=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var f=this.meta.parentReference.path;f=f.substring(f.indexOf("/root:")+6);var g=this.meta.webUrl;b=g.substring(0,
g.length-f.length-encodeURIComponent(this.meta.name).length-1);g=g.substring(g.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+g+"&parent="+g.substring(0,g.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");f=g=this.meta.webUrl;g=g.substring(8);g=g.substring(g.indexOf("/"));f=f.substring(0,f.lastIndexOf("/"));f=f.substring(f.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+
@@ -13653,8 +13655,8 @@ OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?t
OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,f){b.eTag=f};OneDriveFile.prototype.loadPatchDescriptor=function(b,f){var g=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(g+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):f(this.ui.oneDrive.parseRequestText(c))}),f)};
OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,f,g,c,p){this.doSave(this.getTitle(),b,f,g,c,p)};OneDriveFile.prototype.saveAs=function(b,f,g){this.doSave(b,!1,f,g)};
OneDriveFile.prototype.doSave=function(b,f,g,c,p,q){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,f,g,c,p,q)}),c,p,q])};
-OneDriveFile.prototype.saveFile=function(b,f,g,c,p,q){if(!this.isEditable())null!=g&&g();else if(!this.savingFile)if(this.getTitle()==b){var u=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=q||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),G=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(E,F){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=E;this.fileSaved(F,G,mxUtils.bind(this,function(){this.contentChanged();null!=g&&g()}),c)}),mxUtils.bind(this,function(E,F){try{this.savingFile=!1,this.isConflict(F)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();u()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+OneDriveFile.prototype.saveFile=function(b,f,g,c,p,q){if(!this.isEditable())null!=g&&g();else if(!this.savingFile)if(this.getTitle()==b){var u=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=q||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),H=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(E,F){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=E;this.fileSaved(F,H,mxUtils.bind(this,function(){this.contentChanged();null!=g&&g()}),c)}),mxUtils.bind(this,function(E,F){try{this.savingFile=!1,this.isConflict(F)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();u()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
c(E)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}}),y)}catch(E){if(this.savingFile=!1,null!=c)c(E);else throw E;}});u()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=g&&g();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
OneDriveFile.prototype.rename=function(b,f,g){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(p){this.hasSameExtension(b,this.getTitle())?(this.meta=p,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=f&&f(p)):(this.meta=p,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,f,g))}),g)};
OneDriveFile.prototype.move=function(b,f,g){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=f&&f(c)}),g)};OneDriveLibrary=function(b,f,g){OneDriveFile.call(this,b,f,g)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,f,g){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=f&&f(c)}),g)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(f,g,c,p){null==g&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(g=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==p&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(p=!0);DrawioClient.call(this,f,g?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=g;this.inlinePicker=c;this.noLogout=p;f=JSON.parse(this.token);null!=f&&(this.endpointHint=null!=f.endpointHint?f.endpointHint.replace("/Documents",
@@ -13662,35 +13664,35 @@ OneDriveFile.prototype.move=function(b,f,g){this.ui.oneDrive.moveFile(this.getId
"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"microsoft";OneDriveClient.prototype.pickerRedirectUri=window.DRAWIO_SERVER_URL+"onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.rootId={id:"root",name:"root",
parentReference:{driveId:"me"}};OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.authUrl="https://login.microsoftonline.com/"+(window.DRAWIO_MSGRAPH_TENANT_ID||"common");OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=
function(f){if(null==f||""===f)return!1;for(var g=0;g<this.invalidFilenameRegExs.length;g++)if(this.invalidFilenameRegExs[g].test(f))return!1;return!0};OneDriveClient.prototype.get=function(f,g,c){f=new mxXmlRequest(f,null,"GET");f.setRequestHeaders=mxUtils.bind(this,function(p,q){p.setRequestHeader("Authorization","Bearer "+b)});f.send(g,c);return f};OneDriveClient.prototype.updateUser=function(f,g,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout);
-this.get(this.baseUrl+"/me",mxUtils.bind(this,function(u){window.clearTimeout(q);if(p)if(200>u.getStatus()||300<=u.getStatus())c?g({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,g,!0)}),g));else try{var y=JSON.parse(u.getText());this.setUser(new DrawioUser(y.id,y.mail,y.displayName));f()}catch(G){g(G)}}),mxUtils.bind(this,function(u){window.clearTimeout(q);p&&g(u)}))};OneDriveClient.prototype.resetTokenRefresh=function(f){null!=
+this.get(this.baseUrl+"/me",mxUtils.bind(this,function(u){window.clearTimeout(q);if(p)if(200>u.getStatus()||300<=u.getStatus())c?g({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,g,!0)}),g));else try{var y=JSON.parse(u.getText());this.setUser(new DrawioUser(y.id,y.mail,y.displayName));f()}catch(H){g(H)}}),mxUtils.bind(this,function(u){window.clearTimeout(q);p&&g(u)}))};OneDriveClient.prototype.resetTokenRefresh=function(f){null!=
this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<f&&(this.tokenRefreshInterval=1E3*f,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*f))};OneDriveClient.prototype.authenticate=function(f,g,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(p){this.updateAuthInfo(p,!0,null==this.endpointHint,f,g)}),g,null!=
window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(p){200<=p.getStatus()&&299>=p.getStatus()?this.authenticateStep2(p.getText(),f,g,c):null!=g&&g({message:mxResources.get("error")+" "+p.getStatus()})}),g)};OneDriveClient.prototype.updateAuthInfo=function(f,g,c,p,q){c&&this.setUser(null);b=f.access_token;delete f.access_token;f.expiresOn=Date.now()+1E3*f.expires_in;this.tokenExpiresOn=f.expiresOn;f.remember=
g;this.setPersistentToken(JSON.stringify(f),!g);this.resetTokenRefresh(f.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){p()}),q):p()};OneDriveClient.prototype.authenticateStep2=function(f,g,c,p){if(null==window.onOneDriveCallback){var q=mxUtils.bind(this,function(){var u=!0,y=JSON.parse(this.getPersistentToken(!0));null!=y?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,
-function(G){if(200<=G.getStatus()&&299>=G.getStatus())try{this.updateAuthInfo(JSON.parse(G.getText()),y.remember,!1,g,c)}catch(E){c({message:mxResources.get("authFailed"),retry:q})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=G.getStatus()&&400!=G.getStatus()||p?c({message:mxResources.get("accessDenied"),retry:q}):q()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(G,E){var F=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(G?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f);F=window.open(F,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=F&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,
-k){if(u){window.onOneDriveCallback=null;u=!1;try{null==d?c({message:mxResources.get("accessDenied"),retry:q}):(null!=E&&E(),this.updateAuthInfo(d,G,!0,g,c))}catch(l){c(l)}finally{null!=k&&k.close()}}else null!=k&&k.close()}),F.focus())}),mxUtils.bind(this,function(){u&&(window.onOneDriveCallback=null,u=!1,c({message:mxResources.get("accessDenied"),retry:q}))}))});q()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(f,g){this.get(this.baseUrl+"/me/drive/root",
+function(H){if(200<=H.getStatus()&&299>=H.getStatus())try{this.updateAuthInfo(JSON.parse(H.getText()),y.remember,!1,g,c)}catch(E){c({message:mxResources.get("authFailed"),retry:q})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=H.getStatus()&&400!=H.getStatus()||p?c({message:mxResources.get("accessDenied"),retry:q}):q()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(H,E){var F=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(H?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f);F=window.open(F,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=F&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,
+k){if(u){window.onOneDriveCallback=null;u=!1;try{null==d?c({message:mxResources.get("accessDenied"),retry:q}):(null!=E&&E(),this.updateAuthInfo(d,H,!0,g,c))}catch(l){c(l)}finally{null!=k&&k.close()}}else null!=k&&k.close()}),F.focus())}),mxUtils.bind(this,function(){u&&(window.onOneDriveCallback=null,u=!1,c({message:mxResources.get("accessDenied"),retry:q}))}))});q()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(f,g){this.get(this.baseUrl+"/me/drive/root",
mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var p=JSON.parse(c.getText());0<p.webUrl.indexOf(".sharepoint.com")?this.endpointHint=p.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var q=JSON.parse(this.getPersistentToken(!0));null!=q&&(q.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(q),!q.remember));f();return}}catch(u){}g({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),
-g)};OneDriveClient.prototype.executeRequest=function(f,g,c){var p=mxUtils.bind(this,function(q){var u=!0,y=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout);this.get(f,mxUtils.bind(this,function(G){window.clearTimeout(y);u&&(200<=G.getStatus()&&299>=G.getStatus()||404==G.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(G)):q||401!==G.getStatus()&&400!==G.getStatus()?c(this.parseRequestText(G)):this.authenticate(function(){p(!0)},
-c,q))}),mxUtils.bind(this,function(G){window.clearTimeout(y);u&&c(G)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){p(!0)},c):p(!1)};OneDriveClient.prototype.checkToken=function(f,g){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(f,null!=g?g:this.emptyFn):f()};OneDriveClient.prototype.getItemRef=function(f){var g=f.split("/");return 1<g.length?{driveId:g[0],id:g[1]}:{id:f}};OneDriveClient.prototype.getItemURL=function(f,
+g)};OneDriveClient.prototype.executeRequest=function(f,g,c){var p=mxUtils.bind(this,function(q){var u=!0,y=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout);this.get(f,mxUtils.bind(this,function(H){window.clearTimeout(y);u&&(200<=H.getStatus()&&299>=H.getStatus()||404==H.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(H)):q||401!==H.getStatus()&&400!==H.getStatus()?c(this.parseRequestText(H)):this.authenticate(function(){p(!0)},
+c,q))}),mxUtils.bind(this,function(H){window.clearTimeout(y);u&&c(H)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){p(!0)},c):p(!1)};OneDriveClient.prototype.checkToken=function(f,g){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(f,null!=g?g:this.emptyFn):f()};OneDriveClient.prototype.getItemRef=function(f){var g=f.split("/");return 1<g.length?{driveId:g[0],id:g[1]}:{id:f}};OneDriveClient.prototype.getItemURL=function(f,
g){var c=f.split("/");return 1<c.length?(f=c[1],(g?"":this.baseUrl)+"/drives/"+c[0]+("root"==f?"/root":"/items/"+f)):(g?"":this.baseUrl)+"/me/drive/items/"+f};OneDriveClient.prototype.getLibrary=function(f,g,c){this.getFile(f,g,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(f){var g=f.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<g&&(f=f.substring(0,g));return f};OneDriveClient.prototype.getFile=function(f,
-g,c,p,q){q=null!=q?q:!1;this.executeRequest(this.getItemURL(f),mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus()){var y=JSON.parse(u.getText()),G=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!Editor.useCanvasForExport&&G)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,g,c);else{var E=!0,F=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT})}),
-this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(d){try{if(window.clearTimeout(F),E){/\.html$/i.test(y.name)&&(d=this.removeExtraHtmlContent(d));var k=null;if(0<(G?d.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(d);null!=l&&0<l.length?d=l:k=new LocalFile(this.ui,d,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var n=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&
-(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,y["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(d,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?g(new LocalFile(this.ui,x.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),y.name):null!=k?g(k):q?g(new OneDriveLibrary(this.ui,d,y)):g(new OneDriveFile(this.ui,d,y))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,
-function(d){window.clearTimeout(F);E&&c(this.parseRequestText(d))}),G||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(u))}),function(u){null!=c&&(null!=u&&null!=u.error&&"ObjectHandle is Invalid"===u.error.message&&(u.error.message=
+g,c,p,q){q=null!=q?q:!1;this.executeRequest(this.getItemURL(f),mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus()){var y=JSON.parse(u.getText()),H=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!Editor.useCanvasForExport&&H)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,g,c);else{var E=!0,F=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT})}),
+this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(d){try{if(window.clearTimeout(F),E){/\.html$/i.test(y.name)&&(d=this.removeExtraHtmlContent(d));var k=null;if(0<(H?d.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(d);null!=l&&0<l.length?d=l:k=new LocalFile(this.ui,d,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var n=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&
+(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,y["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(d,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?g(new LocalFile(this.ui,x.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),y.name):null!=k?g(k):q?g(new OneDriveLibrary(this.ui,d,y)):g(new OneDriveFile(this.ui,d,y))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,
+function(d){window.clearTimeout(F);E&&c(this.parseRequestText(d))}),H||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(u))}),function(u){null!=c&&(null!=u&&null!=u.error&&"ObjectHandle is Invalid"===u.error.message&&(u.error.message=
mxResources.get("fileNotFoundOrDenied")),c(u))})};OneDriveClient.prototype.renameFile=function(f,g,c,p){null!=f&&null!=g&&(this.isValidFilename(g)?this.checkExists(f.getParentId(),g,!1,mxUtils.bind(this,function(q){q?this.writeFile(this.getItemURL(f.getId()),JSON.stringify({name:g}),"PATCH","application/json",c,p):p()})):p({message:this.invalidFilenameRegExs[0].test(g)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(f,
g,c,p){g=this.getItemRef(g);var q=this.getItemRef(f);g.driveId!=q.driveId?p({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(f),JSON.stringify({parentReference:g}),"PATCH","application/json",c,p)};OneDriveClient.prototype.insertLibrary=function(f,g,c,p,q){this.insertFile(f,g,c,p,!0,q)};OneDriveClient.prototype.insertFile=function(f,g,c,p,q,u){this.isValidFilename(f)?(q=null!=q?q:!1,this.checkExists(u,f,!0,mxUtils.bind(this,
-function(y){if(y){y="/me/drive/root";null!=u&&(y=this.getItemURL(u,!0));var G=mxUtils.bind(this,function(E){q?c(new OneDriveLibrary(this.ui,g,E)):c(new OneDriveFile(this.ui,g,E))});y=this.baseUrl+y+"/children/"+encodeURIComponent(f)+"/content";4E6<=g.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(E){this.writeLargeFile(this.getItemURL(E.id),g,G,p)}),p):this.writeFile(y,g,"PUT",null,G,p)}else p()}))):p({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):
+function(y){if(y){y="/me/drive/root";null!=u&&(y=this.getItemURL(u,!0));var H=mxUtils.bind(this,function(E){q?c(new OneDriveLibrary(this.ui,g,E)):c(new OneDriveFile(this.ui,g,E))});y=this.baseUrl+y+"/children/"+encodeURIComponent(f)+"/content";4E6<=g.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(E){this.writeLargeFile(this.getItemURL(E.id),g,H,p)}),p):this.writeFile(y,g,"PUT",null,H,p)}else p()}))):p({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):
mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(f,g,c,p){var q="/me/drive/root";null!=f&&(q=this.getItemURL(f,!0));this.executeRequest(this.baseUrl+q+"/children/"+encodeURIComponent(g),mxUtils.bind(this,function(u){404==u.getStatus()?p(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[g]),function(){p(!0)},function(){p(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),
-function(){p(!1)}))}),function(u){p(!1)},!0)};OneDriveClient.prototype.saveFile=function(f,g,c,p){try{var q=f.getData(),u=mxUtils.bind(this,function(G){var E=mxUtils.bind(this,function(d){g(d,q)}),F=this.getItemURL(f.getId());4E6<=G.length?this.writeLargeFile(F,G,E,c,p):this.writeFile(F+"/content/",G,"PUT",null,E,c,p)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(f.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){u(this.ui.base64ToBlob(G,
-"image/png"))}),c,this.ui.getCurrentFile()!=f?q:null,y.scale,y.border)}else u(q)}catch(G){c(G)}};OneDriveClient.prototype.writeLargeFile=function(f,g,c,p,q){try{if(null!=g){var u=(new TextEncoder).encode(g).length,y=mxUtils.bind(this,function(E,F,d,k){try{k=k||0;var l=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){l=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=g.substr(F,4194304),z=(new TextEncoder).encode(x).length,B=new mxXmlRequest(E,x,"PUT");B.setRequestHeaders=mxUtils.bind(this,
-function(I,H){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+z-1)+"/"+u)});B.send(mxUtils.bind(this,function(I){window.clearTimeout(n);if(l){var H=I.getStatus();200<=H&&299>=H?(H=F+x.length,H==g.length?c(JSON.parse(I.getText())):y(E,H,d+z,k)):500<=H&&599>=H&&2>k?(k++,y(E,F,d,k)):p(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(n);l&&p(this.parseRequestText(I))}))}catch(I){p(I)}}),G=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
+function(){p(!1)}))}),function(u){p(!1)},!0)};OneDriveClient.prototype.saveFile=function(f,g,c,p){try{var q=f.getData(),u=mxUtils.bind(this,function(H){var E=mxUtils.bind(this,function(d){g(d,q)}),F=this.getItemURL(f.getId());4E6<=H.length?this.writeLargeFile(F,H,E,c,p):this.writeFile(F+"/content/",H,"PUT",null,E,c,p)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(f.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){u(this.ui.base64ToBlob(H,
+"image/png"))}),c,this.ui.getCurrentFile()!=f?q:null,y.scale,y.border)}else u(q)}catch(H){c(H)}};OneDriveClient.prototype.writeLargeFile=function(f,g,c,p,q){try{if(null!=g){var u=(new TextEncoder).encode(g).length,y=mxUtils.bind(this,function(E,F,d,k){try{k=k||0;var l=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){l=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=g.substr(F,4194304),A=(new TextEncoder).encode(x).length,B=new mxXmlRequest(E,x,"PUT");B.setRequestHeaders=mxUtils.bind(this,
+function(I,G){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+A-1)+"/"+u)});B.send(mxUtils.bind(this,function(I){window.clearTimeout(n);if(l){var G=I.getStatus();200<=G&&299>=G?(G=F+x.length,G==g.length?c(JSON.parse(I.getText())):y(E,G,d+A,k)):500<=G&&599>=G&&2>k?(k++,y(E,F,d,k)):p(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(n);l&&p(this.parseRequestText(I))}))}catch(I){p(I)}}),H=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
function(){F=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var k=new mxXmlRequest(f+"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b);null!=q&&l.setRequestHeader("If-Match",q)});k.send(mxUtils.bind(this,function(l){window.clearTimeout(d);F&&(200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),y(l.uploadUrl,0,0)):E||401!==l.getStatus()?
-p(this.parseRequestText(l),l):this.authenticate(function(){G(!0)},p,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&p(this.parseRequestText(l))}))}catch(l){p(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},p):G(!1)}else p({message:mxResources.get("unknownError")})}catch(E){p(E)}};OneDriveClient.prototype.writeFile=function(f,g,c,p,q,u,y){try{if(null!=f&&null!=g){var G=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
+p(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},p,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&p(this.parseRequestText(l))}))}catch(l){p(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},p):H(!1)}else p({message:mxResources.get("unknownError")})}catch(E){p(E)}};OneDriveClient.prototype.writeFile=function(f,g,c,p,q,u,y){try{if(null!=f&&null!=g){var H=mxUtils.bind(this,function(E){try{var F=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,
function(){F=!1;u({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var k=new mxXmlRequest(f,g,c);k.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type",p||" ");l.setRequestHeader("Authorization","Bearer "+b);null!=y&&l.setRequestHeader("If-Match",y)});k.send(mxUtils.bind(this,function(l){window.clearTimeout(d);F&&(200<=l.getStatus()&&299>=l.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),q(JSON.parse(l.getText()))):E||401!==l.getStatus()?
-u(this.parseRequestText(l),l):this.authenticate(function(){G(!0)},u,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&u(this.parseRequestText(l))}))}catch(l){u(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},u):G(!1)}else u({message:mxResources.get("unknownError")})}catch(E){u(E)}};OneDriveClient.prototype.parseRequestText=function(f){var g={message:mxResources.get("unknownError")};try{g=JSON.parse(f.getText()),g.status=f.getStatus(),g.error&&(g.error.status=
+u(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},u,E))}),mxUtils.bind(this,function(l){window.clearTimeout(d);F&&u(this.parseRequestText(l))}))}catch(l){u(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},u):H(!1)}else u({message:mxResources.get("unknownError")})}catch(E){u(E)}};OneDriveClient.prototype.parseRequestText=function(f){var g={message:mxResources.get("unknownError")};try{g=JSON.parse(f.getText()),g.status=f.getStatus(),g.error&&(g.error.status=
g.status,g.error.code=g.status)}catch(c){}return g};OneDriveClient.prototype.pickLibrary=function(f){this.pickFile(function(g){f(g)})};OneDriveClient.prototype.createInlinePicker=function(f,g,c){return mxUtils.bind(this,function(){var p=null,q=document.createElement("div");q.style.position="relative";var u=new CustomDialog(this.ui,q,mxUtils.bind(this,function(){var y=p.getSelectedItem();if(null!=y)if(g&&"object"==typeof y.folder)f({value:[y]});else{if(!y.folder&&this.ui.spinner.spin(document.body,
-mxResources.get("loading"))){var G=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(G),mxUtils.bind(this,function(E){this.ui.spinner.stop();200<=E.getStatus()&&299>=E.getStatus()?(E=JSON.parse(E.getText()),f(G,{value:[E]})):this.ui.handleError({code:E.getStatus()})}),mxUtils.bind(this,function(E){this.ui.spinner.stop();this.ui.handleError(E)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(g?"select":"open"),null,null,null,null,!0);
-this.ui.showDialog(u.container,550,500,!0,!0);q.style.width=parseInt(u.container.parentNode.style.width)-60+"px";q.style.height=parseInt(u.container.parentNode.style.height)-120+"px";p=new mxODPicker(q,null,mxUtils.bind(this,function(y,G,E,F){this.executeRequest(F?y:this.baseUrl+y,function(d){G(JSON.parse(d.getText()))},E)}),mxUtils.bind(this,function(y,G,E,F){this.executeRequest(this.baseUrl+"/drives/"+G+"/items/"+y,function(d){E(JSON.parse(d.getText()))},F)}),null,null,function(y){g?f({value:[y]}):
+mxResources.get("loading"))){var H=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(H),mxUtils.bind(this,function(E){this.ui.spinner.stop();200<=E.getStatus()&&299>=E.getStatus()?(E=JSON.parse(E.getText()),f(H,{value:[E]})):this.ui.handleError({code:E.getStatus()})}),mxUtils.bind(this,function(E){this.ui.spinner.stop();this.ui.handleError(E)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(g?"select":"open"),null,null,null,null,!0);
+this.ui.showDialog(u.container,550,500,!0,!0);q.style.width=parseInt(u.container.parentNode.style.width)-60+"px";q.style.height=parseInt(u.container.parentNode.style.height)-120+"px";p=new mxODPicker(q,null,mxUtils.bind(this,function(y,H,E,F){this.executeRequest(F?y:this.baseUrl+y,function(d){H(JSON.parse(d.getText()))},E)}),mxUtils.bind(this,function(y,H,E,F){this.executeRequest(this.baseUrl+"/drives/"+H+"/items/"+y,function(d){E(JSON.parse(d.getText()))},F)}),null,null,function(y){g?f({value:[y]}):
f(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),g,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(f,g){var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("error"),q&&q.message?q.message:q)}),p=mxUtils.bind(this,function(q){var u=this.inlinePicker?this.createInlinePicker(f,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?
null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(y){f(y);mxClient.IS_IE11&&(b=y.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});q?u():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){f({value:[this.rootId]})}),u,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,
!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){p(this.inlinePicker&&g)}),c):p(g)};OneDriveClient.prototype.pickFile=function(f,g){f=null!=f?f:mxUtils.bind(this,function(q){this.ui.loadFile("W"+encodeURIComponent(q))});var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("authFailed"),q&&q.message?q.message:q)}),p=this.inlinePicker?this.createInlinePicker(f,null,g):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,
@@ -13702,125 +13704,125 @@ GitHubFile.prototype.getFolderUrl=function(){return"https://github.com/"+encodeU
GitHubFile.prototype.getPublicUrl=function(b){if(null!=this.meta.download_url)try{""!=(new URL(this.meta.download_url)).search?b(null):mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)}))}catch(f){b(null)}else b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};
GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,f){this.peer.getFile(this.getId(),b,f)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};
GitHubFile.prototype.setDescriptorEtag=function(b,f){b.sha=f};GitHubFile.prototype.save=function(b,f,g,c,p,q){this.doSave(this.getTitle(),f,g,c,p,q)};GitHubFile.prototype.saveAs=function(b,f,g){this.doSave(b,f,g)};GitHubFile.prototype.doSave=function(b,f,g,c,p,q){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,!1,f,g,c,p,q)}),g,c,p])};
-GitHubFile.prototype.saveFile=function(b,f,g,c,p,q,u){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(G){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var E=this.getCurrentEtag(),F=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,d);this.fileSaved(F,E,mxUtils.bind(this,function(){this.contentChanged();
-null!=g&&g()}),c)}),mxUtils.bind(this,function(d){this.savingFile=!1;this.isConflict(d)?(this.inConflictState=!0,null!=c&&(d.commitMessage=G,c(d))):null!=c&&c(d)}),q,G)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(d){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;
-null!=g&&g();this.ui.fileLoaded(k)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,d,G)}))});null!=u?y(u):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(G){y(G)}),c)}else null!=g&&g()};GitHubLibrary=function(b,f,g){GitHubFile.call(this,b,f,g)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(f,g){DrawioClient.call(this,f,g||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=
-5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(f){b=f};GitHubClient.prototype.updateUser=function(f,g,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),u=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;u.setRequestHeaders=function(G,E){G.setRequestHeader("Authorization",y)};u.send(mxUtils.bind(this,function(){window.clearTimeout(q);p&&(401===
+GitHubFile.prototype.saveFile=function(b,f,g,c,p,q,u){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(H){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var E=this.getCurrentEtag(),F=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,d);this.fileSaved(F,E,mxUtils.bind(this,function(){this.contentChanged();
+null!=g&&g()}),c)}),mxUtils.bind(this,function(d){this.savingFile=!1;this.isConflict(d)?(this.inConflictState=!0,null!=c&&(d.commitMessage=H,c(d))):null!=c&&c(d)}),q,H)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(d){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;
+null!=g&&g();this.ui.fileLoaded(k)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,d,H)}))});null!=u?y(u):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(H){y(H)}),c)}else null!=g&&g()};GitHubLibrary=function(b,f,g){GitHubFile.call(this,b,f,g)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(f,g){DrawioClient.call(this,f,g||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=
+5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(f){b=f};GitHubClient.prototype.updateUser=function(f,g,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),u=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;u.setRequestHeaders=function(H,E){H.setRequestHeader("Authorization",y)};u.send(mxUtils.bind(this,function(){window.clearTimeout(q);p&&(401===
u.getStatus()?c?g({code:u.getStatus(),message:this.getErrorMessage(u,mxResources.get("accessDenied"))}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,g,!0)}),g)):200>u.getStatus()||300<=u.getStatus()?g({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(u.getText()))),f()))}),g)};GitHubClient.prototype.createUser=function(f){return new DrawioUser(f.id,f.email,f.name)};GitHubClient.prototype.authenticate=function(f,g){(new mxXmlRequest(this.redirectUri+
"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,g):null!=g&&g(c)}),g)};GitHubClient.prototype.authenticateStep2=function(f,g,c){if(null==window.onGitHubCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=
u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.setUser(null),g()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,y){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+
-window.location.host+"&token="+f),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(G,E){q?(window.onGitHubCallback=null,q=!1,null==G?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=G.access_token,this.setUser(null),u&&this.setPersistentToken("remembered"),g(),null!=E&&E.close())):null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitHubCallback=null,q=!1,c({message:mxResources.get("accessDenied"),
+window.location.host+"&token="+f),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(H,E){q?(window.onGitHubCallback=null,q=!1,null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.setUser(null),u&&this.setPersistentToken("remembered"),g(),null!=E&&E.close())):null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitHubCallback=null,q=!1,c({message:mxResources.get("accessDenied"),
retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(f,g){try{var c=JSON.parse(f.getText());null!=c&&null!=c.message&&(g=c.message)}catch(p){}return g};GitHubClient.prototype.showAuthorizeDialog=function(f,g){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),f,mxResources.get("authorize"),
-mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),g,480,null,!1)};GitHubClient.prototype.executeRequest=function(f,g,c,p,q){var u=mxUtils.bind(this,function(G){var E=!0,F=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),d=this.authToken+" "+b;f.setRequestHeaders=function(k,l){k.setRequestHeader("Authorization",
-d)};f.send(mxUtils.bind(this,function(){window.clearTimeout(F);var k=mxUtils.bind(this,function(){var x=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){x();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(E)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())g(f);else if(401===f.getStatus())G?c({code:f.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},
+mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),g,480,null,!1)};GitHubClient.prototype.executeRequest=function(f,g,c,p,q){var u=mxUtils.bind(this,function(H){var E=!0,F=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),d=this.authToken+" "+b;f.setRequestHeaders=function(k,l){k.setRequestHeader("Authorization",
+d)};f.send(mxUtils.bind(this,function(){window.clearTimeout(F);var k=mxUtils.bind(this,function(){var x=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){x();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(E)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())g(f);else if(401===f.getStatus())H?c({code:f.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},
c)})}):this.authenticate(function(){u(!0)},c);else if(403===f.getStatus()){var l=!1;try{var n=JSON.parse(f.getText());null!=n&&"Resource not accessible by integration"==n.message?k():(null!=n&&null!=n.errors&&0<n.errors.length&&(l="too_large"==n.errors[0].code),c({message:mxResources.get(l?"drawingTooLarge":"forbidden")}))}catch(x){c({message:mxResources.get(l?"drawingTooLarge":"forbidden")})}}else 404===f.getStatus()?q?c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):
-k():409===f.getStatus()?c({code:f.getStatus(),status:409}):c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(F);E&&c(k)}))}),y=mxUtils.bind(this,function(G){null==this.user?this.updateUser(function(){y(!0)},c,G):u(G)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(f,g,c){this.getFile(f,g,c,!0)};GitHubClient.prototype.getSha=function(f,g,c,p,q,u,y){var G=
-"&t="+(new Date).getTime();f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+g+"/contents/"+c+"?ref="+p+G,null,"HEAD");this.executeRequest(f,mxUtils.bind(this,function(E){try{q(E.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(F){u(F)}}),u,null,y)};GitHubClient.prototype.getFile=function(f,g,c,p,q){p=null!=p?p:!1;var u=f.split("/"),y=u[0],G=u[1],E=u[2];f=u.slice(3,u.length).join("/");u=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&
-u))if(null!=b){q=this.baseUrl+"/repos/"+y+"/"+G+"/contents/"+f+"?ref="+E;var F={Authorization:"token "+b};u=f.split("/");this.ui.convertFile(q,0<u.length?u[u.length-1]:f,null,this.extension,g,c,null,F)}else c({message:mxResources.get("accessDenied")});else u="&t="+(new Date).getTime(),f=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+G+"/contents/"+f+"?ref="+E+u,null,"GET"),this.executeRequest(f,mxUtils.bind(this,function(d){try{var k=JSON.parse(d.getText());if(""==k.content&&null!=k.git_url){var l=
-new mxXmlRequest(k.git_url,null,"GET");this.executeRequest(l,mxUtils.bind(this,function(n){n=JSON.parse(n.getText());""!=n.content?(k.content=n.content,k.encoding=n.encoding,g(this.createGitHubFile(y,G,E,k,p))):c({message:mxResources.get("errorLoadingFile")})}),c)}else g(this.createGitHubFile(y,G,E,k,p))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(f,g,c,p,q){f={org:f,repo:g,ref:c,name:p.name,path:p.path,sha:p.sha,html_url:p.html_url,download_url:p.download_url};g=p.content;
+k():409===f.getStatus()?c({code:f.getStatus(),status:409}):c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(F);E&&c(k)}))}),y=mxUtils.bind(this,function(H){null==this.user?this.updateUser(function(){y(!0)},c,H):u(H)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(f,g,c){this.getFile(f,g,c,!0)};GitHubClient.prototype.getSha=function(f,g,c,p,q,u,y){var H=
+"&t="+(new Date).getTime();f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+g+"/contents/"+c+"?ref="+p+H,null,"HEAD");this.executeRequest(f,mxUtils.bind(this,function(E){try{q(E.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(F){u(F)}}),u,null,y)};GitHubClient.prototype.getFile=function(f,g,c,p,q){p=null!=p?p:!1;var u=f.split("/"),y=u[0],H=u[1],E=u[2];f=u.slice(3,u.length).join("/");u=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&
+u))if(null!=b){q=this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+E;var F={Authorization:"token "+b};u=f.split("/");this.ui.convertFile(q,0<u.length?u[u.length-1]:f,null,this.extension,g,c,null,F)}else c({message:mxResources.get("accessDenied")});else u="&t="+(new Date).getTime(),f=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+E+u,null,"GET"),this.executeRequest(f,mxUtils.bind(this,function(d){try{var k=JSON.parse(d.getText());if(""==k.content&&null!=k.git_url){var l=
+new mxXmlRequest(k.git_url,null,"GET");this.executeRequest(l,mxUtils.bind(this,function(n){n=JSON.parse(n.getText());""!=n.content?(k.content=n.content,k.encoding=n.encoding,g(this.createGitHubFile(y,H,E,k,p))):c({message:mxResources.get("errorLoadingFile")})}),c)}else g(this.createGitHubFile(y,H,E,k,p))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(f,g,c,p,q){f={org:f,repo:g,ref:c,name:p.name,path:p.path,sha:p.sha,html_url:p.html_url,download_url:p.download_url};g=p.content;
"base64"===p.encoding&&(/\.jpe?g$/i.test(p.name)?g="data:image/jpeg;base64,"+g:/\.gif$/i.test(p.name)?g="data:image/gif;base64,"+g:/\.png$/i.test(p.name)?(p=this.ui.extractGraphModelFromPng(g),g=null!=p&&0<p.length?p:"data:image/png;base64,"+g):g=Base64.decode(g));return q?new GitHubLibrary(this.ui,g,f):new GitHubFile(this.ui,g,f)};GitHubClient.prototype.insertLibrary=function(f,g,c,p,q){this.insertFile(f,g,c,p,!0,q,!1)};GitHubClient.prototype.insertFile=function(f,g,c,p,q,u,y){q=null!=q?q:!1;u=u.split("/");
-var G=u[0],E=u[1],F=u[2],d=u.slice(3,u.length).join("/");0<d.length&&(d+="/");d+=f;this.checkExists(G+"/"+E+"/"+F+"/"+d,!0,mxUtils.bind(this,function(k,l){k?q?(y||(g=Base64.encode(g)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(n){this.writeFile(G,E,F,d,n,g,l,mxUtils.bind(this,function(x){try{var z=JSON.parse(x.getText());c(this.createGitHubFile(G,E,F,z.content,q))}catch(B){p(B)}}),p)}),p)):c(new GitHubFile(this.ui,g,{org:G,repo:E,ref:F,name:f,path:d,sha:l,isNew:!0})):p()}))};GitHubClient.prototype.showCommitDialog=
-function(f,g,c,p){var q=this.ui.spinner.pause();f=new FilenameDialog(this.ui,mxResources.get(g?"addedFile":"updateFile",[f]),mxResources.get("ok"),mxUtils.bind(this,function(u){q(function(){c(u)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){p()}));this.ui.showDialog(f.container,400,80,!0,!1);f.init()};GitHubClient.prototype.writeFile=function(f,g,c,p,q,u,y,G,E){u.length>=this.maxFileSize?E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+
-" / 1 MB)"}):(c={path:p,branch:decodeURIComponent(c),message:q,content:u},null!=y&&(c.sha=y),f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+g+"/contents/"+p,JSON.stringify(c),"PUT"),this.executeRequest(f,mxUtils.bind(this,function(F){G(F)}),mxUtils.bind(this,function(F){404==F.code&&(F.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,F.code=null);E(F)})))};GitHubClient.prototype.checkExists=function(f,g,c){var p=f.split("/"),q=p[0],u=p[1],y=p[2];f=p.slice(3,p.length).join("/");
-this.getSha(q,u,f,y,mxUtils.bind(this,function(G){if(g){var E=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){E();c(!0,G)},function(){E();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(G){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(f,g,c,p,q){var u=f.meta.org,y=f.meta.repo,G=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(k,
-l){this.writeFile(u,y,G,E,q,l,k,mxUtils.bind(this,function(n){delete f.meta.isNew;g(JSON.parse(n.getText()).content.sha)}),mxUtils.bind(this,function(n){c(n)}))}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.sha,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,k.scale,k.border)}else F(f.meta.sha,Base64.encode(f.getData()))});p?this.getSha(u,y,E,
-G,mxUtils.bind(this,function(k){f.meta.sha=k;d()}),c):d()};GitHubClient.prototype.pickLibrary=function(f){this.pickFile(f)};GitHubClient.prototype.pickFolder=function(f){this.showGitHubDialog(!1,f,!0)};GitHubClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(g){this.ui.loadFile("H"+encodeURIComponent(g))});this.showGitHubDialog(!0,f)};GitHubClient.prototype.showGitHubDialog=function(f,g,c){var p=null,q=null,u=null,y=null,G=document.createElement("div");G.style.whiteSpace=
-"nowrap";G.style.overflow="hidden";G.style.height="320px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(E);E=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){C()}));E.style.position="absolute";E.style.right="40px";E.style.top="26px";G.appendChild(E);var F=document.createElement("div");F.style.whiteSpace=
-"nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="290px";G.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var k=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+y)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",
-null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(k.container,420,370,!0,!0);f&&k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(R,U,S,Q){var v=document.createElement("a");v.setAttribute("title",R);v.style.cursor="pointer";mxUtils.write(v,R);mxEvent.addListener(v,"click",
-U);Q&&(v.style.textDecoration="underline");null!=S&&(R=d.cloneNode(),R.style.padding=S,R.appendChild(v),v=R);return v}),n=mxUtils.bind(this,function(R){var U=document.createElement("div");U.style.marginBottom="8px";U.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));R||(mxUtils.write(U," / "),U.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){y=null;H()}),null,!0)));if(null!=y&&0<y.length){var S=y.split("/");for(R=0;R<S.length;R++)(function(Q){mxUtils.write(U,
-" / ");U.appendChild(l(S[Q],mxUtils.bind(this,function(){y=S.slice(0,Q+1).join("/");I()}),null,!0))})(R)}F.appendChild(U)}),x=mxUtils.bind(this,function(R){this.ui.handleError(R,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=u=q=p=null,C()):this.ui.hideDialog()}),null,{})}),z=null,B=null,I=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/contents/"+y+"?ref="+encodeURIComponent(u)+"&per_page=100&page="+
-R,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){I(R+1)});mxEvent.addListener(z,"click",S);this.executeRequest(U,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,
-function(){this.ui.spinner.stop();1==R&&(n(),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(Q.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var A=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t,D){if(K==("dir"==t.type)){D=d.cloneNode();D.style.backgroundColor=A?Editor.isDarkMode()?
-"#000000":"#eeeeee":"";A=!A;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("dir"==t.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(t.name+("dir"==t.type?"/":""),mxUtils.bind(this,function(){"dir"==t.type?(y=t.path,I()):f&&"file"==t.type&&(this.ui.hideDialog(),g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+t.path))})));F.appendChild(D);N++}})(v[m],m)});J(!0);f&&J(!1)}}))}),x,!0)}),
-H=mxUtils.bind(this,function(R,U){null==R&&(F.innerText="",R=1);var S=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/branches?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var Q=
-mxUtils.bind(this,function(){H(R+1)});mxEvent.addListener(z,"click",Q);this.executeRequest(S,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var A=JSON.parse(v.getText());if(null==A||0==A.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==A.length&&U)u=A[0].name,y="",I();else{for(var N=0;N<A.length;N++)mxUtils.bind(this,
-function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=J.name;y="";I()})));F.appendChild(m)})(A[N],N);100==A.length&&(F.appendChild(z),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",B))}}))}),x)}),C=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var U=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&mxEvent.removeListener(F,"scroll",B);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){C(R+1)});mxEvent.addListener(z,"click",S);this.executeRequest(U,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var v=JSON.parse(Q.getText());
-if(null==v||0==v.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else{1==R&&(F.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var m=K[1];3>K.length?(p=J,q=m,y=u=null,H()):this.ui.spinner.spin(F,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J+
-"/"+m+"/"+K,mxUtils.bind(this,function(t){this.ui.spinner.stop();p=t.meta.org;q=t.meta.repo;u=decodeURIComponent(t.meta.ref);y="";I()}),mxUtils.bind(this,function(t){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(F),mxUtils.br(F));for(var A=0;A<v.length;A++)mxUtils.bind(this,
-function(N,J){var K=d.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(l(N.full_name,mxUtils.bind(this,function(){p=N.owner.login;q=N.name;y="";H(null,!0)})));F.appendChild(K)})(v[A],A)}100==v.length&&(F.appendChild(z),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&S()},mxEvent.addListener(F,"scroll",B))}))}),x)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,f,g){DrawioFile.call(this,b,f);this.meta=g;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+var H=u[0],E=u[1],F=u[2],d=u.slice(3,u.length).join("/");0<d.length&&(d+="/");d+=f;this.checkExists(H+"/"+E+"/"+F+"/"+d,!0,mxUtils.bind(this,function(k,l){k?q?(y||(g=Base64.encode(g)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(n){this.writeFile(H,E,F,d,n,g,l,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitHubFile(H,E,F,A.content,q))}catch(B){p(B)}}),p)}),p)):c(new GitHubFile(this.ui,g,{org:H,repo:E,ref:F,name:f,path:d,sha:l,isNew:!0})):p()}))};GitHubClient.prototype.showCommitDialog=
+function(f,g,c,p){var q=this.ui.spinner.pause();f=new FilenameDialog(this.ui,mxResources.get(g?"addedFile":"updateFile",[f]),mxResources.get("ok"),mxUtils.bind(this,function(u){q(function(){c(u)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){p()}));this.ui.showDialog(f.container,400,80,!0,!1);f.init()};GitHubClient.prototype.writeFile=function(f,g,c,p,q,u,y,H,E){u.length>=this.maxFileSize?E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+
+" / 1 MB)"}):(c={path:p,branch:decodeURIComponent(c),message:q,content:u},null!=y&&(c.sha=y),f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+g+"/contents/"+p,JSON.stringify(c),"PUT"),this.executeRequest(f,mxUtils.bind(this,function(F){H(F)}),mxUtils.bind(this,function(F){404==F.code&&(F.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,F.code=null);E(F)})))};GitHubClient.prototype.checkExists=function(f,g,c){var p=f.split("/"),q=p[0],u=p[1],y=p[2];f=p.slice(3,p.length).join("/");
+this.getSha(q,u,f,y,mxUtils.bind(this,function(H){if(g){var E=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){E();c(!0,H)},function(){E();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(H){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(f,g,c,p,q){var u=f.meta.org,y=f.meta.repo,H=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(k,
+l){this.writeFile(u,y,H,E,q,l,k,mxUtils.bind(this,function(n){delete f.meta.isNew;g(JSON.parse(n.getText()).content.sha)}),mxUtils.bind(this,function(n){c(n)}))}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.sha,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,k.scale,k.border)}else F(f.meta.sha,Base64.encode(f.getData()))});p?this.getSha(u,y,E,
+H,mxUtils.bind(this,function(k){f.meta.sha=k;d()}),c):d()};GitHubClient.prototype.pickLibrary=function(f){this.pickFile(f)};GitHubClient.prototype.pickFolder=function(f){this.showGitHubDialog(!1,f,!0)};GitHubClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(g){this.ui.loadFile("H"+encodeURIComponent(g))});this.showGitHubDialog(!0,f)};GitHubClient.prototype.showGitHubDialog=function(f,g,c){var p=null,q=null,u=null,y=null,H=document.createElement("div");H.style.whiteSpace=
+"nowrap";H.style.overflow="hidden";H.style.height="320px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(E);E=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){C()}));E.style.position="absolute";E.style.right="40px";E.style.top="26px";H.appendChild(E);var F=document.createElement("div");F.style.whiteSpace=
+"nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="290px";H.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var k=new CustomDialog(this.ui,H,mxUtils.bind(this,function(){g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+y)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",
+null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(k.container,420,370,!0,!0);f&&k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(R,T,S,Q){var v=document.createElement("a");v.setAttribute("title",R);v.style.cursor="pointer";mxUtils.write(v,R);mxEvent.addListener(v,"click",
+T);Q&&(v.style.textDecoration="underline");null!=S&&(R=d.cloneNode(),R.style.padding=S,R.appendChild(v),v=R);return v}),n=mxUtils.bind(this,function(R){var T=document.createElement("div");T.style.marginBottom="8px";T.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));R||(mxUtils.write(T," / "),T.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){y=null;G()}),null,!0)));if(null!=y&&0<y.length){var S=y.split("/");for(R=0;R<S.length;R++)(function(Q){mxUtils.write(T,
+" / ");T.appendChild(l(S[Q],mxUtils.bind(this,function(){y=S.slice(0,Q+1).join("/");I()}),null,!0))})(R)}F.appendChild(T)}),x=mxUtils.bind(this,function(R){this.ui.handleError(R,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=u=q=p=null,C()):this.ui.hideDialog()}),null,{})}),A=null,B=null,I=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var T=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/contents/"+y+"?ref="+encodeURIComponent(u)+"&per_page=100&page="+
+R,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){I(R+1)});mxEvent.addListener(A,"click",S);this.executeRequest(T,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,
+function(){this.ui.spinner.stop();1==R&&(n(),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(Q.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var z=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t,D){if(K==("dir"==t.type)){D=d.cloneNode();D.style.backgroundColor=z?Editor.isDarkMode()?
+"#000000":"#eeeeee":"";z=!z;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("dir"==t.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(t.name+("dir"==t.type?"/":""),mxUtils.bind(this,function(){"dir"==t.type?(y=t.path,I()):f&&"file"==t.type&&(this.ui.hideDialog(),g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+t.path))})));F.appendChild(D);N++}})(v[m],m)});J(!0);f&&J(!1)}}))}),x,!0)}),
+G=mxUtils.bind(this,function(R,T){null==R&&(F.innerText="",R=1);var S=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/branches?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var Q=
+mxUtils.bind(this,function(){G(R+1)});mxEvent.addListener(A,"click",Q);this.executeRequest(S,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var z=JSON.parse(v.getText());if(null==z||0==z.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==z.length&&T)u=z[0].name,y="",I();else{for(var N=0;N<z.length;N++)mxUtils.bind(this,
+function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=J.name;y="";I()})));F.appendChild(m)})(z[N],N);100==z.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",B))}}))}),x)}),C=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var T=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&mxEvent.removeListener(F,"scroll",B);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){C(R+1)});mxEvent.addListener(A,"click",S);this.executeRequest(T,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var v=JSON.parse(Q.getText());
+if(null==v||0==v.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else{1==R&&(F.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var m=K[1];3>K.length?(p=J,q=m,y=u=null,G()):this.ui.spinner.spin(F,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J+
+"/"+m+"/"+K,mxUtils.bind(this,function(t){this.ui.spinner.stop();p=t.meta.org;q=t.meta.repo;u=decodeURIComponent(t.meta.ref);y="";I()}),mxUtils.bind(this,function(t){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(F),mxUtils.br(F));for(var z=0;z<v.length;z++)mxUtils.bind(this,
+function(N,J){var K=d.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(l(N.full_name,mxUtils.bind(this,function(){p=N.owner.login;q=N.name;y="";G(null,!0)})));F.appendChild(K)})(v[z],z)}100==v.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&S()},mxEvent.addListener(F,"scroll",B))}))}),x)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,f,g){DrawioFile.call(this,b,f);this.meta=g;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,f,g){this.doSave(this.getTitle(),f,g)};TrelloFile.prototype.saveAs=function(b,f,g){this.doSave(b,f,g)};TrelloFile.prototype.doSave=function(b,f,g){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,f,g)}),g])};
TrelloFile.prototype.saveFile=function(b,f,g,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(p){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=p;this.contentChanged();null!=g&&g();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,g,c))}),mxUtils.bind(this,
function(p){this.savingFile=!1;null!=c&&c(p)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(p){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(q){this.savingFile=!1;null!=g&&g();this.ui.fileLoaded(q);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,g,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,p)}))):null!=g&&g()};TrelloLibrary=function(b,f,g){TrelloFile.call(this,b,f,g)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(b,f,g){g&&this.logout();g=mxUtils.bind(this,function(c,p){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=p&&p();b()},error:function(){null!=p&&p();null!=f&&f(mxResources.get("loggedOut"))}})});this.isAuthorized()?g(!0):this.ui.showAuthDialog(this,!0,g)};
TrelloClient.prototype.getLibrary=function(b,f,g){this.getFile(b,f,g,!1,!0)};
-TrelloClient.prototype.getFile=function(b,f,g,c,p){p=null!=p?p:!1;var q=mxUtils.bind(this,function(){var u=b.split(this.SEPARATOR),y=!0,G=window.setTimeout(mxUtils.bind(this,function(){y=!1;g({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout);Trello.cards.get(u[0]+"/attachments/"+u[1],mxUtils.bind(this,function(E){window.clearTimeout(G);if(y){var F=/\.png$/i.test(E.name),d={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(E.name)||
-/\.gliffy$/i.test(E.name)||!Editor.useCanvasForExport&&F?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(E.url),E.name,E.mimeType,this.extension,f,g,null,d):(y=!0,G=window.setTimeout(mxUtils.bind(this,function(){y=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(E.url),mxUtils.bind(this,function(k){window.clearTimeout(G);if(y){E.compoundId=b;if(0<(F?k.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(k);null!=l&&0<l.length&&
-(k=l)}p?f(new TrelloLibrary(this.ui,k,E)):f(new TrelloFile(this.ui,k,E))}}),mxUtils.bind(this,function(k,l){window.clearTimeout(G);y&&(401==l.status?this.authenticate(q,g,!0):g())}),F||null!=E.mimeType&&"image/"==E.mimeType.substring(0,6),null,null,null,d))}}),mxUtils.bind(this,function(E){window.clearTimeout(G);y&&(null!=E&&401==E.status?this.authenticate(q,g,!0):g())}))});this.authenticate(q,g)};TrelloClient.prototype.insertLibrary=function(b,f,g,c,p){this.insertFile(b,f,g,c,!0,p)};
-TrelloClient.prototype.insertFile=function(b,f,g,c,p,q){p=null!=p?p:!1;var u=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(G){this.writeFile(b,G,q,mxUtils.bind(this,function(E){p?g(new TrelloLibrary(this.ui,f,E)):g(new TrelloFile(this.ui,f,E))}),c)});Editor.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){y(this.ui.base64ToBlob(G,"image/png"))}),c,f):y(f)});this.authenticate(u,c)};
-TrelloClient.prototype.saveFile=function(b,f,g){var c=b.meta.compoundId.split(this.SEPARATOR),p=mxUtils.bind(this,function(u){this.writeFile(b.meta.name,u,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){f(y)}),mxUtils.bind(this,function(G){null!=G&&401==G.status?this.authenticate(q,g,!0):g()}))},g)}),q=mxUtils.bind(this,function(){Editor.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){p(this.ui.base64ToBlob(u,
+TrelloClient.prototype.getFile=function(b,f,g,c,p){p=null!=p?p:!1;var q=mxUtils.bind(this,function(){var u=b.split(this.SEPARATOR),y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;g({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout);Trello.cards.get(u[0]+"/attachments/"+u[1],mxUtils.bind(this,function(E){window.clearTimeout(H);if(y){var F=/\.png$/i.test(E.name),d={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(E.name)||
+/\.gliffy$/i.test(E.name)||!Editor.useCanvasForExport&&F?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(E.url),E.name,E.mimeType,this.extension,f,g,null,d):(y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(E.url),mxUtils.bind(this,function(k){window.clearTimeout(H);if(y){E.compoundId=b;if(0<(F?k.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(k);null!=l&&0<l.length&&
+(k=l)}p?f(new TrelloLibrary(this.ui,k,E)):f(new TrelloFile(this.ui,k,E))}}),mxUtils.bind(this,function(k,l){window.clearTimeout(H);y&&(401==l.status?this.authenticate(q,g,!0):g())}),F||null!=E.mimeType&&"image/"==E.mimeType.substring(0,6),null,null,null,d))}}),mxUtils.bind(this,function(E){window.clearTimeout(H);y&&(null!=E&&401==E.status?this.authenticate(q,g,!0):g())}))});this.authenticate(q,g)};TrelloClient.prototype.insertLibrary=function(b,f,g,c,p){this.insertFile(b,f,g,c,!0,p)};
+TrelloClient.prototype.insertFile=function(b,f,g,c,p,q){p=null!=p?p:!1;var u=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(H){this.writeFile(b,H,q,mxUtils.bind(this,function(E){p?g(new TrelloLibrary(this.ui,f,E)):g(new TrelloFile(this.ui,f,E))}),c)});Editor.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){y(this.ui.base64ToBlob(H,"image/png"))}),c,f):y(f)});this.authenticate(u,c)};
+TrelloClient.prototype.saveFile=function(b,f,g){var c=b.meta.compoundId.split(this.SEPARATOR),p=mxUtils.bind(this,function(u){this.writeFile(b.meta.name,u,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){f(y)}),mxUtils.bind(this,function(H){null!=H&&401==H.status?this.authenticate(q,g,!0):g()}))},g)}),q=mxUtils.bind(this,function(){Editor.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){p(this.ui.base64ToBlob(u,
"image/png"))}),g,this.ui.getCurrentFile()!=b?b.getData():null):p(b.getData())});this.authenticate(q,g)};
-TrelloClient.prototype.writeFile=function(b,f,g,c,p){if(null!=b&&null!=f)if(f.length>=this.maxFileSize)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var q=mxUtils.bind(this,function(){var u=!0,y=window.setTimeout(mxUtils.bind(this,function(){u=!1;p({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),G=new FormData;G.append("key",Trello.key());G.append("token",Trello.token());G.append("file","string"===typeof f?new Blob([f]):f,b);G.append("name",
-b);var E=new XMLHttpRequest;E.responseType="json";E.onreadystatechange=mxUtils.bind(this,function(){if(4===E.readyState&&(window.clearTimeout(y),u))if(200==E.status){var F=E.response;F.compoundId=g+this.SEPARATOR+F.id;c(F)}else 401==E.status?this.authenticate(q,p,!0):p()});E.open("POST",this.baseUrl+"cards/"+g+"/attachments");E.send(G)});this.authenticate(q,p)}else p({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
+TrelloClient.prototype.writeFile=function(b,f,g,c,p){if(null!=b&&null!=f)if(f.length>=this.maxFileSize)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var q=mxUtils.bind(this,function(){var u=!0,y=window.setTimeout(mxUtils.bind(this,function(){u=!1;p({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),H=new FormData;H.append("key",Trello.key());H.append("token",Trello.token());H.append("file","string"===typeof f?new Blob([f]):f,b);H.append("name",
+b);var E=new XMLHttpRequest;E.responseType="json";E.onreadystatechange=mxUtils.bind(this,function(){if(4===E.readyState&&(window.clearTimeout(y),u))if(200==E.status){var F=E.response;F.compoundId=g+this.SEPARATOR+F.id;c(F)}else 401==E.status?this.authenticate(q,p,!0):p()});E.open("POST",this.baseUrl+"cards/"+g+"/attachments");E.send(H)});this.authenticate(q,p)}else p({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f)}))};TrelloClient.prototype.pickFile=function(b,f){b=null!=b?b:mxUtils.bind(this,function(g){this.ui.loadFile("T"+encodeURIComponent(g))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(g){this.ui.showError(mxResources.get("error"),g,mxResources.get("ok"))}))};
TrelloClient.prototype.showTrelloDialog=function(b,f){var g=null,c="@me",p=0,q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.overflow="hidden";q.style.height="224px";var u=document.createElement("h3");mxUtils.write(u,b?mxResources.get("selectFile"):mxResources.get("selectCard"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(u);var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="auto";y.style.height=
-"194px";q.appendChild(y);q=new CustomDialog(this.ui,q);this.ui.showDialog(q.container,340,290,!0,!0);q.okButton.parentNode.removeChild(q.okButton);var G=mxUtils.bind(this,function(n,x,z){p++;var B=document.createElement("div");B.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==p%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var I=document.createElement("a");I.style.cursor="pointer";if(null!=z){var H=document.createElement("img");
-H.src=z.url;H.width=z.width;H.height=z.height;H.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(H)}mxUtils.write(I,n);mxEvent.addListener(I,"click",x);B.appendChild(I);return B}),E=mxUtils.bind(this,function(n){this.ui.handleError(n,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),F=mxUtils.bind(this,function(){p=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var n=mxUtils.bind(this,function(){Trello.cards.get(g+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(x){this.ui.spinner.stop();y.appendChild(G("../ [Up]",mxUtils.bind(this,function(){l()})));mxUtils.br(y);null==x||0==x.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var z=0;z<x.length;z++)mxUtils.bind(this,function(B){y.appendChild(G(B.name,mxUtils.bind(this,function(){this.ui.hideDialog();f(g+this.SEPARATOR+B.id)}),null!=B.previews?B.previews[0]:null))})(x[z])})()}),mxUtils.bind(this,function(x){401==
-x.status?this.authenticate(n,E,!0):null!=E&&E(x)}))});n()}),d=null,k=null,l=mxUtils.bind(this,function(n){null==n&&(p=0,y.innerText="",n=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=d&&null!=d.parentNode&&d.parentNode.removeChild(d);d=document.createElement("a");d.style.display="block";d.style.cursor="pointer";mxUtils.write(d,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",k);l(n+1)});mxEvent.addListener(d,"click",x);var z=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:n-1},mxUtils.bind(this,function(B){this.ui.spinner.stop();B=null!=B?B.cards:null;if(null==B||0==B.length)mxUtils.write(y,mxResources.get("noFiles"));else{1==n&&(y.appendChild(G(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var H=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(C){null!=C&&(c=C,l())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(H.container,300,80,!0,!1);H.init()}))),mxUtils.br(y));for(var I=0;I<B.length;I++)mxUtils.bind(this,function(H){y.appendChild(G(H.name,mxUtils.bind(this,function(){b?(g=H.id,F()):(this.ui.hideDialog(),f(H.id))})))})(B[I]);100==B.length&&(y.appendChild(d),k=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&x()},mxEvent.addListener(y,"scroll",k))}}),mxUtils.bind(this,function(B){401==B.status?this.authenticate(z,E,!0):null!=E&&E({message:B.responseText})}))});z()});l()};
+"194px";q.appendChild(y);q=new CustomDialog(this.ui,q);this.ui.showDialog(q.container,340,290,!0,!0);q.okButton.parentNode.removeChild(q.okButton);var H=mxUtils.bind(this,function(n,x,A){p++;var B=document.createElement("div");B.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==p%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var I=document.createElement("a");I.style.cursor="pointer";if(null!=A){var G=document.createElement("img");
+G.src=A.url;G.width=A.width;G.height=A.height;G.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(G)}mxUtils.write(I,n);mxEvent.addListener(I,"click",x);B.appendChild(I);return B}),E=mxUtils.bind(this,function(n){this.ui.handleError(n,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),F=mxUtils.bind(this,function(){p=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var n=mxUtils.bind(this,function(){Trello.cards.get(g+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(x){this.ui.spinner.stop();y.appendChild(H("../ [Up]",mxUtils.bind(this,function(){l()})));mxUtils.br(y);null==x||0==x.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<x.length;A++)mxUtils.bind(this,function(B){y.appendChild(H(B.name,mxUtils.bind(this,function(){this.ui.hideDialog();f(g+this.SEPARATOR+B.id)}),null!=B.previews?B.previews[0]:null))})(x[A])})()}),mxUtils.bind(this,function(x){401==
+x.status?this.authenticate(n,E,!0):null!=E&&E(x)}))});n()}),d=null,k=null,l=mxUtils.bind(this,function(n){null==n&&(p=0,y.innerText="",n=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=d&&null!=d.parentNode&&d.parentNode.removeChild(d);d=document.createElement("a");d.style.display="block";d.style.cursor="pointer";mxUtils.write(d,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",k);l(n+1)});mxEvent.addListener(d,"click",x);var A=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:n-1},mxUtils.bind(this,function(B){this.ui.spinner.stop();B=null!=B?B.cards:null;if(null==B||0==B.length)mxUtils.write(y,mxResources.get("noFiles"));else{1==n&&(y.appendChild(H(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(C){null!=C&&(c=C,l())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(G.container,300,80,!0,!1);G.init()}))),mxUtils.br(y));for(var I=0;I<B.length;I++)mxUtils.bind(this,function(G){y.appendChild(H(G.name,mxUtils.bind(this,function(){b?(g=G.id,F()):(this.ui.hideDialog(),f(G.id))})))})(B[I]);100==B.length&&(y.appendChild(d),k=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&x()},mxEvent.addListener(y,"scroll",k))}}),mxUtils.bind(this,function(B){401==B.status?this.authenticate(A,E,!0):null!=E&&E({message:B.responseText})}))});A()});l()};
TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(f){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,f,g){GitHubFile.call(this,b,f,g);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+this.meta.org+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,f){b.last_commit_id=f};GitLabLibrary=function(b,f,g){GitLabFile.call(this,b,f,g)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,f,g){this.saveFile(b,!1,f,g)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(f){GitHubClient.call(this,f,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=
function(f,g){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,g):null!=g&&g(c)}),g)};GitLabClient.prototype.authenticateStep2=function(f,g,c){if(null==window.onGitLabCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+
f),null,"GET")).send(mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus())try{b=JSON.parse(u.getText()).access_token,this.setToken(b),this.setUser(null),g()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==u.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,y){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+
-this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(G,E){q?(window.onGitLabCallback=null,q=!1,null==G?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=G.access_token,this.setToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),g(),null!=E&&E.close())):
-null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitLabCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(f,g,c,p){var q=mxUtils.bind(this,function(y){var G=!0,E=window.setTimeout(mxUtils.bind(this,function(){G=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),F=this.authToken+
-" "+b;f.setRequestHeaders=function(d,k){d.setRequestHeader("Authorization",F);d.setRequestHeader("PRIVATE_TOKEN",F);d.setRequestHeader("Content-Type","application/json")};f.send(mxUtils.bind(this,function(){window.clearTimeout(E);if(G)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())g(f);else if(401===f.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c);else if(403===
-f.getStatus()){var d=!1;try{var k=JSON.parse(f.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(d="too_large"==k.errors[0].code)}catch(l){}c({message:mxResources.get(d?"drawingTooLarge":"forbidden")})}else 404===f.getStatus()?c({message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):c({status:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(E);G&&c(d)}))}),u=mxUtils.bind(this,function(y){null==
-this.user?this.updateUser(function(){u(!0)},c,y):q(y)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitLabClient.prototype.getRefIndex=function(f,g,c,p,q,u){if(null!=q)c(f,q);else{var y=f.length-2,G=mxUtils.bind(this,function(){if(2>y)p({message:mxResources.get("fileNotFound")});else{var E=Math.max(y-1,0),F=f.slice(0,E).join("/");E=f[E];var d=f[y],k=f.slice(y+1,f.length).join("/");F=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+E)+"/repository/"+(g?u?"branches?per_page=1&page=1&ref="+
-d:"tree?path="+k+"&ref="+d:"files/"+encodeURIComponent(k)+"?ref="+d);var l=new mxXmlRequest(F,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==l.getStatus()?c(f,y):p({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(y--,G()):p({message:mxResources.get("fileNotFound")})}))}});G()}};GitLabClient.prototype.getFile=function(f,g,c,p,q,u){p=null!=p?p:!1;this.getRefIndex(f.split("/"),!1,mxUtils.bind(this,function(y,G){var E=Math.max(G-1,0),
-F=y.slice(0,E).join("/"),d=y[E],k=y[G];f=y.slice(G+1,y.length).join("/");y=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&y))if(null!=b){E="&t="+(new Date).getTime();var l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+k;y=f.split("/");this.ui.convertFile(l+E,0<y.length?y[y.length-1]:f,null,this.extension,g,c,mxUtils.bind(this,function(n,x,z){n=new mxXmlRequest(n,null,
-"GET");this.executeRequest(n,mxUtils.bind(this,function(B){try{x(this.getFileContent(JSON.parse(B.getText())))}catch(I){z(I)}}),z)}))}else c({message:mxResources.get("accessDenied")});else E="&t="+(new Date).getTime(),l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+k,y=new mxXmlRequest(l+E,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(n){try{g(this.createGitLabFile(F,d,k,JSON.parse(n.getText()),p,G))}catch(x){c(x)}}),c)}),c,
+this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(H,E){q?(window.onGitLabCallback=null,q=!1,null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.setToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),g(),null!=E&&E.close())):
+null!=E&&E.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitLabCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(f,g,c,p){var q=mxUtils.bind(this,function(y){var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),F=this.authToken+
+" "+b;f.setRequestHeaders=function(d,k){d.setRequestHeader("Authorization",F);d.setRequestHeader("PRIVATE_TOKEN",F);d.setRequestHeader("Content-Type","application/json")};f.send(mxUtils.bind(this,function(){window.clearTimeout(E);if(H)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())g(f);else if(401===f.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){q(!0)},c);else if(403===
+f.getStatus()){var d=!1;try{var k=JSON.parse(f.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(d="too_large"==k.errors[0].code)}catch(l){}c({message:mxResources.get(d?"drawingTooLarge":"forbidden")})}else 404===f.getStatus()?c({message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):c({status:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(E);H&&c(d)}))}),u=mxUtils.bind(this,function(y){null==
+this.user?this.updateUser(function(){u(!0)},c,y):q(y)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitLabClient.prototype.getRefIndex=function(f,g,c,p,q,u){if(null!=q)c(f,q);else{var y=f.length-2,H=mxUtils.bind(this,function(){if(2>y)p({message:mxResources.get("fileNotFound")});else{var E=Math.max(y-1,0),F=f.slice(0,E).join("/");E=f[E];var d=f[y],k=f.slice(y+1,f.length).join("/");F=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+E)+"/repository/"+(g?u?"branches?per_page=1&page=1&ref="+
+d:"tree?path="+k+"&ref="+d:"files/"+encodeURIComponent(k)+"?ref="+d);var l=new mxXmlRequest(F,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==l.getStatus()?c(f,y):p({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(y--,H()):p({message:mxResources.get("fileNotFound")})}))}});H()}};GitLabClient.prototype.getFile=function(f,g,c,p,q,u){p=null!=p?p:!1;this.getRefIndex(f.split("/"),!1,mxUtils.bind(this,function(y,H){var E=Math.max(H-1,0),
+F=y.slice(0,E).join("/"),d=y[E],k=y[H];f=y.slice(H+1,y.length).join("/");y=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&y))if(null!=b){E="&t="+(new Date).getTime();var l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+k;y=f.split("/");this.ui.convertFile(l+E,0<y.length?y[y.length-1]:f,null,this.extension,g,c,mxUtils.bind(this,function(n,x,A){n=new mxXmlRequest(n,null,
+"GET");this.executeRequest(n,mxUtils.bind(this,function(B){try{x(this.getFileContent(JSON.parse(B.getText())))}catch(I){A(I)}}),A)}))}else c({message:mxResources.get("accessDenied")});else E="&t="+(new Date).getTime(),l=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+k,y=new mxXmlRequest(l+E,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(n){try{g(this.createGitLabFile(F,d,k,JSON.parse(n.getText()),p,H))}catch(x){c(x)}}),c)}),c,
u)};GitLabClient.prototype.getFileContent=function(f){var g=f.file_name,c=f.content;"base64"===f.encoding&&(/\.jpe?g$/i.test(g)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(g)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(g)?c="data:application/pdf;base64,"+c:/\.png$/i.test(g)?(f=this.ui.extractGraphModelFromPng(c),c=null!=f&&0<f.length?f:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(f,g,c,p,q,u){var y=DRAWIO_GITLAB_URL+"/";f={org:f,repo:g,
-ref:c,name:p.file_name,path:p.file_path,html_url:y+f+"/"+g+"/blob/"+c+"/"+p.file_path,download_url:y+f+"/"+g+"/raw/"+c+"/"+p.file_path+"?inline=false",last_commit_id:p.last_commit_id,refPos:u};p=this.getFileContent(p);return q?new GitLabLibrary(this.ui,p,f):new GitLabFile(this.ui,p,f)};GitLabClient.prototype.insertFile=function(f,g,c,p,q,u,y){q=null!=q?q:!1;u=u.split("/");this.getRefIndex(u,!0,mxUtils.bind(this,function(G,E){var F=Math.max(E-1,0),d=G.slice(0,F).join("/"),k=G[F],l=G[E];path=G.slice(E+
-1,G.length).join("/");0<path.length&&(path+="/");path+=f;this.checkExists(d+"/"+k+"/"+l+"/"+path,!0,mxUtils.bind(this,function(n,x){n?q?(y||(g=Base64.encode(g)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(z){this.writeFile(d,k,l,path,z,g,x,mxUtils.bind(this,function(B){try{var I=JSON.parse(B.getText());c(this.createGitLabFile(d,k,l,null!=I.content?I.content:I,q,E))}catch(H){p(H)}}),p)}),p)):(n=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,g,{org:d,repo:k,ref:l,name:f,path:path,html_url:n+
+ref:c,name:p.file_name,path:p.file_path,html_url:y+f+"/"+g+"/blob/"+c+"/"+p.file_path,download_url:y+f+"/"+g+"/raw/"+c+"/"+p.file_path+"?inline=false",last_commit_id:p.last_commit_id,refPos:u};p=this.getFileContent(p);return q?new GitLabLibrary(this.ui,p,f):new GitLabFile(this.ui,p,f)};GitLabClient.prototype.insertFile=function(f,g,c,p,q,u,y){q=null!=q?q:!1;u=u.split("/");this.getRefIndex(u,!0,mxUtils.bind(this,function(H,E){var F=Math.max(E-1,0),d=H.slice(0,F).join("/"),k=H[F],l=H[E];path=H.slice(E+
+1,H.length).join("/");0<path.length&&(path+="/");path+=f;this.checkExists(d+"/"+k+"/"+l+"/"+path,!0,mxUtils.bind(this,function(n,x){n?q?(y||(g=Base64.encode(g)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(A){this.writeFile(d,k,l,path,A,g,x,mxUtils.bind(this,function(B){try{var I=JSON.parse(B.getText());c(this.createGitLabFile(d,k,l,null!=I.content?I.content:I,q,E))}catch(G){p(G)}}),p)}),p)):(n=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,g,{org:d,repo:k,ref:l,name:f,path:path,html_url:n+
d+"/"+k+"/blob/"+l+"/"+path,download_url:n+d+"/"+k+"/raw/"+l+"/"+path+"?inline=false",refPos:E,last_commit_id:x,isNew:!0}))):p()}))}),p,null,4>=u.length)};GitLabClient.prototype.checkExists=function(f,g,c){this.getFile(f,mxUtils.bind(this,function(p){if(g){var q=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){q();c(!0,p.getCurrentEtag())},function(){q();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),
-mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(p){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(f,g,c,p,q,u,y,G,E){if(u.length>=this.maxFileSize)E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+" / 10 MB)"});else{var F="POST";c={path:encodeURIComponent(p),branch:decodeURIComponent(c),commit_message:q,content:u,encoding:"base64"};null!=y&&(c.last_commit_id=y,F="PUT");f=this.baseUrl+"/projects/"+encodeURIComponent(f+"/"+g)+"/repository/files/"+
-encodeURIComponent(p);F=new mxXmlRequest(f,JSON.stringify(c),F);this.executeRequest(F,mxUtils.bind(this,function(d){G(d)}),E)}};GitLabClient.prototype.saveFile=function(f,g,c,p,q){var u=f.meta.org,y=f.meta.repo,G=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(k,l){this.writeFile(u,y,G,E,q,l,k,mxUtils.bind(this,function(n){delete f.meta.isNew;this.getFile(u+"/"+y+"/"+G+"/"+E,mxUtils.bind(this,function(x){x.getData()==f.getData()?g(x.getCurrentEtag()):g({content:f.getCurrentEtag()})}),c,null,
-null,f.meta.refPos)}),c)}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.last_commit_id,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,k.scale,k.border)}else F(f.meta.last_commit_id,Base64.encode(f.getData()))});p?this.getFile(u+"/"+y+"/"+G+"/"+E,mxUtils.bind(this,function(k){f.meta.last_commit_id=k.meta.last_commit_id;d()}),c):d()};GitLabClient.prototype.pickFolder=
-function(f){this.showGitLabDialog(!1,f,!0)};GitLabClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(g){this.ui.loadFile("A"+encodeURIComponent(g))});this.showGitLabDialog(!0,f)};GitLabClient.prototype.showGitLabDialog=function(f,g,c){var p=null,q=null,u=null,y=null,G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));
-E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(E);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="274px";G.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width=
-"100%";var k=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+y)}));this.ui.showDialog(k.container,420,370,!0,!0);f&&k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(R,U,S,Q){var v=document.createElement("a");v.setAttribute("title",R);v.style.cursor="pointer";mxUtils.write(v,R);mxEvent.addListener(v,"click",U);Q&&(v.style.textDecoration="underline");null!=S&&(R=d.cloneNode(),R.style.padding=S,R.appendChild(v),v=R);return v}),
-n=mxUtils.bind(this,function(R){var U=document.createElement("div");U.style.marginBottom="8px";U.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));R||(mxUtils.write(U," / "),U.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){y=null;H()}),null,!0)));if(null!=y&&0<y.length){var S=y.split("/");for(R=0;R<S.length;R++)(function(Q){mxUtils.write(U," / ");U.appendChild(l(S[Q],mxUtils.bind(this,function(){y=S.slice(0,Q+1).join("/");I()}),null,!0))})(R)}F.appendChild(U)}),
-x=mxUtils.bind(this,function(R){this.ui.handleError(R,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=u=q=p=null,C()):this.ui.hideDialog()}))}),z=null,B=null,I=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/tree?path="+y+"&ref="+u+"&per_page=100&page="+R,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=B&&
-(mxEvent.removeListener(F,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){I(R+1)});mxEvent.addListener(z,"click",S);this.executeRequest(U,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!u),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==
-y||null==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(Q.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var A=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t){if(K==("tree"==t.type)){var D=d.cloneNode();D.style.backgroundColor=A?Editor.isDarkMode()?"#000000":"#eeeeee":"";A=!A;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("tree"==
-t.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(t.name+("tree"==t.type?"/":""),mxUtils.bind(this,function(){"tree"==t.type?(y=t.path,I()):f&&"blob"==t.type&&(this.ui.hideDialog(),g(p+"/"+q+"/"+u+"/"+t.path))})));F.appendChild(D);N++}})(v[m])});J(!0);f&&J(!1);100==N&&(F.appendChild(z),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&S()},mxEvent.addListener(F,"scroll",B))}}))}),
-x,!0)}),H=mxUtils.bind(this,function(R,U){null==R&&(F.innerText="",R=1);var S=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/branches?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,
-mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){H(R+1)});mxEvent.addListener(z,"click",Q);this.executeRequest(S,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var A=JSON.parse(v.getText());if(null==A||0==A.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==A.length&&U)u=A[0].name,y="",I();else{for(var N=
-0;N<A.length;N++)mxUtils.bind(this,function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=encodeURIComponent(J.name);y="";I()})));F.appendChild(m)})(A[N],N);100==A.length&&(F.appendChild(z),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",B))}}))}),x)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));
-var C=mxUtils.bind(this,function(R){var U=this.ui.spinner,S=0;this.ui.spinner.stop();var Q=function(){U.spin(F,mxResources.get("loading"));S+=1},v=function(){--S;0===S&&U.stop()};null==R&&(F.innerText="",R=1);null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){0===S&&C(R+1)});mxEvent.addListener(z,
-"click",A);var N=mxUtils.bind(this,function(K){Q();var m=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(m,mxUtils.bind(this,function(t){this.ui.tryAndHandle(mxUtils.bind(this,function(){K(JSON.parse(t.getText()));v()}))}),x)}),J=mxUtils.bind(this,function(K,m){Q();var t=new mxXmlRequest(this.baseUrl+"/groups/"+K.id+"/projects?per_page=100",null,"GET");this.executeRequest(t,mxUtils.bind(this,function(D){this.ui.tryAndHandle(mxUtils.bind(this,function(){m(K,JSON.parse(D.getText()));
+mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(p){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(f,g,c,p,q,u,y,H,E){if(u.length>=this.maxFileSize)E({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+" / 10 MB)"});else{var F="POST";c={path:encodeURIComponent(p),branch:decodeURIComponent(c),commit_message:q,content:u,encoding:"base64"};null!=y&&(c.last_commit_id=y,F="PUT");f=this.baseUrl+"/projects/"+encodeURIComponent(f+"/"+g)+"/repository/files/"+
+encodeURIComponent(p);F=new mxXmlRequest(f,JSON.stringify(c),F);this.executeRequest(F,mxUtils.bind(this,function(d){H(d)}),E)}};GitLabClient.prototype.saveFile=function(f,g,c,p,q){var u=f.meta.org,y=f.meta.repo,H=f.meta.ref,E=f.meta.path,F=mxUtils.bind(this,function(k,l){this.writeFile(u,y,H,E,q,l,k,mxUtils.bind(this,function(n){delete f.meta.isNew;this.getFile(u+"/"+y+"/"+H+"/"+E,mxUtils.bind(this,function(x){x.getData()==f.getData()?g(x.getCurrentEtag()):g({content:f.getCurrentEtag()})}),c,null,
+null,f.meta.refPos)}),c)}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(E)){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){F(f.meta.last_commit_id,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,k.scale,k.border)}else F(f.meta.last_commit_id,Base64.encode(f.getData()))});p?this.getFile(u+"/"+y+"/"+H+"/"+E,mxUtils.bind(this,function(k){f.meta.last_commit_id=k.meta.last_commit_id;d()}),c):d()};GitLabClient.prototype.pickFolder=
+function(f){this.showGitLabDialog(!1,f,!0)};GitLabClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(g){this.ui.loadFile("A"+encodeURIComponent(g))});this.showGitLabDialog(!0,f)};GitLabClient.prototype.showGitLabDialog=function(f,g,c){var p=null,q=null,u=null,y=null,H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.overflow="hidden";H.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(f?"selectFile":"selectFolder"));
+E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(E);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="274px";H.appendChild(F);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width=
+"100%";var k=new CustomDialog(this.ui,H,mxUtils.bind(this,function(){g(p+"/"+q+"/"+encodeURIComponent(u)+"/"+y)}));this.ui.showDialog(k.container,420,370,!0,!0);f&&k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(R,T,S,Q){var v=document.createElement("a");v.setAttribute("title",R);v.style.cursor="pointer";mxUtils.write(v,R);mxEvent.addListener(v,"click",T);Q&&(v.style.textDecoration="underline");null!=S&&(R=d.cloneNode(),R.style.padding=S,R.appendChild(v),v=R);return v}),
+n=mxUtils.bind(this,function(R){var T=document.createElement("div");T.style.marginBottom="8px";T.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));R||(mxUtils.write(T," / "),T.appendChild(l(decodeURIComponent(u),mxUtils.bind(this,function(){y=null;G()}),null,!0)));if(null!=y&&0<y.length){var S=y.split("/");for(R=0;R<S.length;R++)(function(Q){mxUtils.write(T," / ");T.appendChild(l(S[Q],mxUtils.bind(this,function(){y=S.slice(0,Q+1).join("/");I()}),null,!0))})(R)}F.appendChild(T)}),
+x=mxUtils.bind(this,function(R){this.ui.handleError(R,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=u=q=p=null,C()):this.ui.hideDialog()}))}),A=null,B=null,I=mxUtils.bind(this,function(R){null==R&&(F.innerText="",R=1);var T=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/tree?path="+y+"&ref="+u+"&per_page=100&page="+R,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=B&&
+(mxEvent.removeListener(F,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){I(R+1)});mxEvent.addListener(A,"click",S);this.executeRequest(T,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!u),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==
+y||null==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(Q.getText());if(null==v||0==v.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var z=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(t){if(K==("tree"==t.type)){var D=d.cloneNode();D.style.backgroundColor=z?Editor.isDarkMode()?"#000000":"#eeeeee":"";z=!z;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("tree"==
+t.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(t.name+("tree"==t.type?"/":""),mxUtils.bind(this,function(){"tree"==t.type?(y=t.path,I()):f&&"blob"==t.type&&(this.ui.hideDialog(),g(p+"/"+q+"/"+u+"/"+t.path))})));F.appendChild(D);N++}})(v[m])});J(!0);f&&J(!1);100==N&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&S()},mxEvent.addListener(F,"scroll",B))}}))}),
+x,!0)}),G=mxUtils.bind(this,function(R,T){null==R&&(F.innerText="",R=1);var S=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/branches?per_page=100&page="+R,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,
+mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){G(R+1)});mxEvent.addListener(A,"click",Q);this.executeRequest(S,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==R&&(n(!0),F.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var z=JSON.parse(v.getText());if(null==z||0==z.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==z.length&&T)u=z[0].name,y="",I();else{for(var N=
+0;N<z.length;N++)mxUtils.bind(this,function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){u=encodeURIComponent(J.name);y="";I()})));F.appendChild(m)})(z[N],N);100==z.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",B))}}))}),x)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));
+var C=mxUtils.bind(this,function(R){var T=this.ui.spinner,S=0;this.ui.spinner.stop();var Q=function(){T.spin(F,mxResources.get("loading"));S+=1},v=function(){--S;0===S&&T.stop()};null==R&&(F.innerText="",R=1);null!=B&&(mxEvent.removeListener(F,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var z=mxUtils.bind(this,function(){0===S&&C(R+1)});mxEvent.addListener(A,
+"click",z);var N=mxUtils.bind(this,function(K){Q();var m=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(m,mxUtils.bind(this,function(t){this.ui.tryAndHandle(mxUtils.bind(this,function(){K(JSON.parse(t.getText()));v()}))}),x)}),J=mxUtils.bind(this,function(K,m){Q();var t=new mxXmlRequest(this.baseUrl+"/groups/"+K.id+"/projects?per_page=100",null,"GET");this.executeRequest(t,mxUtils.bind(this,function(D){this.ui.tryAndHandle(mxUtils.bind(this,function(){m(K,JSON.parse(D.getText()));
v()}))}),x)});N(mxUtils.bind(this,function(K){if(null==this.user)mxUtils.write(F,mxResources.get("loggedOut"));else{Q();var m=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+R,null,"GET");this.executeRequest(m,mxUtils.bind(this,function(t){t=JSON.parse(t.getText());if(null!=t&&0!=t.length||null!=K&&0!=K.length){1==R&&(F.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===S){var L=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),
-mxUtils.bind(this,function(O){null!=O&&(O=O.split("/"),1<O.length?(p=O.slice(0,O.length-1).join("/"),q=O[O.length-1],y="",H(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(L.container,300,80,!0,!1);L.init()}}))),mxUtils.br(F),mxUtils.br(F));for(var D=!0,M=0;M<t.length;M++)mxUtils.bind(this,function(L){var O=d.cloneNode();O.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;O.appendChild(l(L.name_with_namespace,
-mxUtils.bind(this,function(){0===S&&(p=L.owner.username,q=L.path,y="",H(null,!0))})));F.appendChild(O)})(t[M]);for(M=0;M<K.length;M++)Q(),J(K[M],mxUtils.bind(this,function(L,O){v();for(var P=0;P<O.length;P++){var T=d.cloneNode();T.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;mxUtils.bind(this,function(V){T.appendChild(l(V.name_with_namespace,mxUtils.bind(this,function(){0===S&&(p=L.full_path,q=V.path,y="",H(null,!0))})));F.appendChild(T)})(O[P])}}));v()}else v(),mxUtils.br(F),
-mxUtils.write(F,mxResources.get("repositoryNotFound"));100==t.length&&(F.appendChild(z),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&A()},mxEvent.addListener(F,"scroll",B))}),x)}}))});b?this.user?C():this.updateUser(function(){C()},x,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},x,!0)}),x)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));
+mxUtils.bind(this,function(O){null!=O&&(O=O.split("/"),1<O.length?(p=O.slice(0,O.length-1).join("/"),q=O[O.length-1],y="",G(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(L.container,300,80,!0,!1);L.init()}}))),mxUtils.br(F),mxUtils.br(F));for(var D=!0,M=0;M<t.length;M++)mxUtils.bind(this,function(L){var O=d.cloneNode();O.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;O.appendChild(l(L.name_with_namespace,
+mxUtils.bind(this,function(){0===S&&(p=L.owner.username,q=L.path,y="",G(null,!0))})));F.appendChild(O)})(t[M]);for(M=0;M<K.length;M++)Q(),J(K[M],mxUtils.bind(this,function(L,O){v();for(var P=0;P<O.length;P++){var U=d.cloneNode();U.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;mxUtils.bind(this,function(V){U.appendChild(l(V.name_with_namespace,mxUtils.bind(this,function(){0===S&&(p=L.full_path,q=V.path,y="",G(null,!0))})));F.appendChild(U)})(O[P])}}));v()}else v(),mxUtils.br(F),
+mxUtils.write(F,mxResources.get("repositoryNotFound"));100==t.length&&(F.appendChild(A),B=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&z()},mxEvent.addListener(F,"scroll",B))}),x)}}))});b?this.user?C():this.updateUser(function(){C()},x,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},x,!0)}),x)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));
this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,f,g,c,p,q,u){this.file=b;this.id=f;this.content=g;this.modifiedDate=c;this.createdDate=p;this.isResolved=q;this.user=u;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,g,c,p){f()};DrawioComment.prototype.editComment=function(b,f,g){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DriveComment=function(b,f,g,c,p,q,u,y){DrawioComment.call(this,b,f,g,c,p,q,u);this.pCommentId=y};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,f,g,c,p){b={content:b.content};c?b.verb="resolve":p&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(q){f(q.replyId)}),g)};
DriveComment.prototype.editComment=function(b,f,g){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},f,g)};
-DriveComment.prototype.deleteComment=function(b,f){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,f)};function mxODPicker(b,f,g,c,p,q,u,y,G,E,F,d,k,l){function n(X,W){W=W||document;return W.querySelector(X)}function x(X,W,Y){if(null==X["@microsoft.graph.downloadUrl"])if(null==X.parentReference)Y();else{c(X.id,X.parentReference.driveId,function(fa){x(fa,W,Y)},Y);return}var Z=new XMLHttpRequest;Z.open("GET",X["@microsoft.graph.downloadUrl"]);var aa=X.file?"image/png"==X.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var fa=Z.responseText;
-aa?(fa="data:image/png;base64,"+Editor.base64Encode(fa),fa=Editor.extractGraphModelFromPng(fa)):/\.pdf$/.test(X.name)&&(fa="data:application/pdf;base64,"+Editor.base64Encode(fa),fa=Editor.extractGraphModelFromPdf(fa));var ea=mxUtils.parseXml(fa),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(ia){}Y()}};(aa||/\.pdf$/.test(X.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");
-Z.send()}function z(){d&&null!=N?A.exportToCanvas(function(X){X=EditorUi.prototype.createImageDataUri(X,null,"png");u(J,X);q(J)},400,null,null,function(X){console.log(X)},600,null,null,null,null,null,N):(u(J,void 0),q(J))}function B(X){function W(Y){P.style.background="transparent";P.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,Y);P.appendChild(Z);v.stop()}if(null!=P)if(P.style.background="transparent",P.innerText="",null==X||X.folder||/\.drawiolib$/.test(X.name))W(mxResources.get("noPreview"));
+DriveComment.prototype.deleteComment=function(b,f){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,f)};function mxODPicker(b,f,g,c,p,q,u,y,H,E,F,d,k,l){function n(X,W){W=W||document;return W.querySelector(X)}function x(X,W,Y){if(null==X["@microsoft.graph.downloadUrl"])if(null==X.parentReference)Y();else{c(X.id,X.parentReference.driveId,function(fa){x(fa,W,Y)},Y);return}var Z=new XMLHttpRequest;Z.open("GET",X["@microsoft.graph.downloadUrl"]);var aa=X.file?"image/png"==X.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var fa=Z.responseText;
+aa?(fa="data:image/png;base64,"+Editor.base64Encode(fa),fa=Editor.extractGraphModelFromPng(fa)):/\.pdf$/.test(X.name)&&(fa="data:application/pdf;base64,"+Editor.base64Encode(fa),fa=Editor.extractGraphModelFromPdf(fa));var ea=mxUtils.parseXml(fa),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(ha){}Y()}};(aa||/\.pdf$/.test(X.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");
+Z.send()}function A(){d&&null!=N?z.exportToCanvas(function(X){X=EditorUi.prototype.createImageDataUri(X,null,"png");u(J,X);q(J)},400,null,null,function(X){console.log(X)},600,null,null,null,null,null,N):(u(J,void 0),q(J))}function B(X){function W(Y){P.style.background="transparent";P.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,Y);P.appendChild(Z);v.stop()}if(null!=P)if(P.style.background="transparent",P.innerText="",null==X||X.folder||/\.drawiolib$/.test(X.name))W(mxResources.get("noPreview"));
else try{null!=X.remoteItem&&(X=X.remoteItem),M=X,v.spin(P),x(X,function(Y){v.stop();if(M==X)if("mxlibrary"==Y.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=Y.getElementsByTagName("diagram");N=AspectDialog.prototype.createViewer(P,0==Z.length?Y.documentElement:Z[0],null,"transparent")}},function(){J=null;W(mxResources.get("notADiagramFile"))})}catch(Y){J=null,W(mxResources.get("notADiagramFile"))}}function I(){var X=n(".odFilesBreadcrumb");if(null!=X){X.innerText="";for(var W=
-0;W<t.length-1;W++){var Y=document.createElement("span");Y.className="odBCFolder";Y.innerHTML=mxUtils.htmlEntities(t[W].name||mxResources.get("home"));X.appendChild(Y);(function(aa,fa){Y.addEventListener("click",function(){f(null);t=t.slice(0,fa);C(aa.driveId,aa.folderId,aa.siteId,aa.name)})})(t[W],W);var Z=document.createElement("span");Z.innerHTML=" &gt; ";X.appendChild(Z)}null!=t[t.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==t.length?mxResources.get(G?"selectFolder":
-"officeSelDiag"):t[t.length-1].name||mxResources.get("home")),X.appendChild(W))}}function H(){if(null!=J&&!m)if("sharepoint"==K)C("site",null,J.id,J.displayName);else if("site"==K)C("subsite",null,J.id,J.name);else{var X=J.folder;J=J.remoteItem?J.remoteItem:J;var W=(J.parentReference?J.parentReference.driveId:null)||K,Y=J.id;X?C(W,Y,null,J.name):z()}}function C(X,W,Y,Z,aa){function fa(wa){v.stop();var oa=document.createElement("table");oa.className="odFileListGrid";for(var ja=null,na=0,ua=0;null!=
-wa&&ua<wa.length;ua++){var qa=wa[ua];if(1!=ia||!qa.webUrl||0<qa.webUrl.indexOf("sharepoint.com/sites/")||0>qa.webUrl.indexOf("sharepoint.com/")){var Aa=qa.displayName||qa.name,Ca=mxUtils.htmlEntities(qa.description||Aa);ia&&(qa.folder=2==ia?{isRoot:!0}:!0);var Da=null!=qa.folder;if(!G||Da){var za=document.createElement("tr");za.className=na++%2?"odOddRow":"odEvenRow";var Ba=document.createElement("td");Ba.style.width="36px";var Ka=document.createElement("img");Ka.src="/images/"+(Da?"folder.png":"file.png");
-Ka.className="odFileImg";Ba.appendChild(Ka);za.appendChild(Ba);Ba=document.createElement("td");Da=document.createElement("div");Da.className="odFileTitle";Da.innerHTML=mxUtils.htmlEntities(Aa);Da.setAttribute("title",Ca);Ba.appendChild(Da);za.appendChild(Ba);oa.appendChild(za);null==ja&&(ja=za,ja.className+=" odRowSelected",J=qa,K=X,l||f(J));(function(Ma,Ea){za.addEventListener("dblclick",H);za.addEventListener("click",function(){ja!=Ea&&(ja.className=ja.className.replace("odRowSelected",""),ja=Ea,
-ja.className+=" odRowSelected",J=Ma,K=X,l||f(J))})})(qa,za)}}}0==na?(wa=document.createElement("div"),wa.className="odEmptyFolder",wa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ba.appendChild(wa)):ba.appendChild(oa);I();m=!1}function ea(wa){g(wa?wa:va,function(oa){if(ca){var ja=oa.value||[];if(l||ia)Array.prototype.push.apply(ra,ja);else{for(var na=0;na<ja.length;na++){var ua=ja[na],qa=ua.file?ua.file.mimeType:null;(ua.folder||"text/html"==qa||"text/xml"==
-qa||"application/xml"==qa||"image/png"==qa||/\.svg$/.test(ua.name)||/\.html$/.test(ua.name)||/\.xml$/.test(ua.name)||/\.png$/.test(ua.name)||/\.drawio$/.test(ua.name)||/\.drawiolib$/.test(ua.name)||/\.pdf$/.test(ua.name))&&ra.push(ua)}ra.sort(function(Aa,Ca){var Da=Aa.name.toLowerCase(),za=Ca.name.toLowerCase();return Aa.folder&&!Ca.folder?-1:!Aa.folder&&Ca.folder?1:Da<za?-1:Da>za?1:0})}oa["@odata.nextLink"]&&1E3>ra.length?ea(oa["@odata.nextLink"]):(clearTimeout(ka),fa(ra))}},function(oa){if(ca){clearTimeout(ka);
-var ja=null;try{ja=JSON.parse(oa.responseText).error.message}catch(na){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ja?" ("+ja+")":""));m=!1;v.stop()}},null!=wa)}if(!m){n(".odCatsList").style.display="block";n(".odFilesSec").style.display="block";null!=P&&(P.innerText="",P.style.top="50%");var ca=m=!0,ia=0;D=arguments;var ka=setTimeout(function(){m=ca=!1;v.stop();y(mxResources.get("timeout"))},2E4),ba=n(".odFilesList");ba.innerText="";v.spin(ba);switch(X){case "recent":t=
-[{name:mxResources.get("recent",null,"Recent"),driveId:X}];var ha=p()||{},ma=[],da;for(da in ha)ma.push(ha[da]);clearTimeout(ka);fa(ma);return;case "shared":var va="/me/drive/sharedWithMe";t=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:X}];break;case "sharepoint":va="/sites?search=";t=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:X}];ia=1;break;case "site":t.push({name:Z,driveId:X,folderId:W,siteId:Y});va="/sites/"+Y+"/drives";ia=2;break;case "subsite":t.push({name:Z,
-driveId:X,folderId:W,siteId:Y});va="/drives/"+Y+(W?"/items/"+W:"/root")+"/children";break;case "search":X=K;t=[{driveId:X,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));va=X?"/drives/"+X+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+aa+"')";break;default:null==W?t=[{driveId:X}]:t.push({name:Z,driveId:X,folderId:W}),va=(X?"/drives/"+X:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}ia||(va+=(0<va.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
-var ra=[];ea()}}function R(X){T.className=T.className.replace("odCatSelected","");T=X;T.className+=" odCatSelected"}function U(X){m||(V=null,C("search",null,null,null,X))}var S="";null==f&&(f=B,S='<div style="text-align: center;" class="odPreview"></div>');null==p&&(p=function(){var X=null;try{X=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return X});null==q&&(q=function(X){if(null!=X){var W=p()||{};delete X["@microsoft.graph.downloadUrl"];W[X.id]=X;localStorage.setItem("mxODPickerRecentList",
+0;W<t.length-1;W++){var Y=document.createElement("span");Y.className="odBCFolder";Y.innerHTML=mxUtils.htmlEntities(t[W].name||mxResources.get("home"));X.appendChild(Y);(function(aa,fa){Y.addEventListener("click",function(){f(null);t=t.slice(0,fa);C(aa.driveId,aa.folderId,aa.siteId,aa.name)})})(t[W],W);var Z=document.createElement("span");Z.innerHTML=" &gt; ";X.appendChild(Z)}null!=t[t.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==t.length?mxResources.get(H?"selectFolder":
+"officeSelDiag"):t[t.length-1].name||mxResources.get("home")),X.appendChild(W))}}function G(){if(null!=J&&!m)if("sharepoint"==K)C("site",null,J.id,J.displayName);else if("site"==K)C("subsite",null,J.id,J.name);else{var X=J.folder;J=J.remoteItem?J.remoteItem:J;var W=(J.parentReference?J.parentReference.driveId:null)||K,Y=J.id;X?C(W,Y,null,J.name):A()}}function C(X,W,Y,Z,aa){function fa(sa){v.stop();var va=document.createElement("table");va.className="odFileListGrid";for(var ja=null,ma=0,wa=0;null!=
+sa&&wa<sa.length;wa++){var oa=sa[wa];if(1!=ha||!oa.webUrl||0<oa.webUrl.indexOf("sharepoint.com/sites/")||0>oa.webUrl.indexOf("sharepoint.com/")){var ya=oa.displayName||oa.name,Ca=mxUtils.htmlEntities(oa.description||ya);ha&&(oa.folder=2==ha?{isRoot:!0}:!0);var Fa=null!=oa.folder;if(!H||Fa){var Aa=document.createElement("tr");Aa.className=ma++%2?"odOddRow":"odEvenRow";var Ea=document.createElement("td");Ea.style.width="36px";var Oa=document.createElement("img");Oa.src="/images/"+(Fa?"folder.png":"file.png");
+Oa.className="odFileImg";Ea.appendChild(Oa);Aa.appendChild(Ea);Ea=document.createElement("td");Fa=document.createElement("div");Fa.className="odFileTitle";Fa.innerHTML=mxUtils.htmlEntities(ya);Fa.setAttribute("title",Ca);Ea.appendChild(Fa);Aa.appendChild(Ea);va.appendChild(Aa);null==ja&&(ja=Aa,ja.className+=" odRowSelected",J=oa,K=X,l||f(J));(function(Ba,Da){Aa.addEventListener("dblclick",G);Aa.addEventListener("click",function(){ja!=Da&&(ja.className=ja.className.replace("odRowSelected",""),ja=Da,
+ja.className+=" odRowSelected",J=Ba,K=X,l||f(J))})})(oa,Aa)}}}0==ma?(sa=document.createElement("div"),sa.className="odEmptyFolder",sa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ba.appendChild(sa)):ba.appendChild(va);I();m=!1}function ea(sa){g(sa?sa:ra,function(va){if(ca){var ja=va.value||[];if(l||ha)Array.prototype.push.apply(pa,ja);else{for(var ma=0;ma<ja.length;ma++){var wa=ja[ma],oa=wa.file?wa.file.mimeType:null;(wa.folder||"text/html"==oa||"text/xml"==
+oa||"application/xml"==oa||"image/png"==oa||/\.svg$/.test(wa.name)||/\.html$/.test(wa.name)||/\.xml$/.test(wa.name)||/\.png$/.test(wa.name)||/\.drawio$/.test(wa.name)||/\.drawiolib$/.test(wa.name)||/\.pdf$/.test(wa.name))&&pa.push(wa)}pa.sort(function(ya,Ca){var Fa=ya.name.toLowerCase(),Aa=Ca.name.toLowerCase();return ya.folder&&!Ca.folder?-1:!ya.folder&&Ca.folder?1:Fa<Aa?-1:Fa>Aa?1:0})}va["@odata.nextLink"]&&1E3>pa.length?ea(va["@odata.nextLink"]):(clearTimeout(ka),fa(pa))}},function(va){if(ca){clearTimeout(ka);
+var ja=null;try{ja=JSON.parse(va.responseText).error.message}catch(ma){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ja?" ("+ja+")":""));m=!1;v.stop()}},null!=sa)}if(!m){n(".odCatsList").style.display="block";n(".odFilesSec").style.display="block";null!=P&&(P.innerText="",P.style.top="50%");var ca=m=!0,ha=0;D=arguments;var ka=setTimeout(function(){m=ca=!1;v.stop();y(mxResources.get("timeout"))},2E4),ba=n(".odFilesList");ba.innerText="";v.spin(ba);switch(X){case "recent":t=
+[{name:mxResources.get("recent",null,"Recent"),driveId:X}];var ia=p()||{},la=[],da;for(da in ia)la.push(ia[da]);clearTimeout(ka);fa(la);return;case "shared":var ra="/me/drive/sharedWithMe";t=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:X}];break;case "sharepoint":ra="/sites?search=";t=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:X}];ha=1;break;case "site":t.push({name:Z,driveId:X,folderId:W,siteId:Y});ra="/sites/"+Y+"/drives";ha=2;break;case "subsite":t.push({name:Z,
+driveId:X,folderId:W,siteId:Y});ra="/drives/"+Y+(W?"/items/"+W:"/root")+"/children";break;case "search":X=K;t=[{driveId:X,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));ra=X?"/drives/"+X+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+aa+"')";break;default:null==W?t=[{driveId:X}]:t.push({name:Z,driveId:X,folderId:W}),ra=(X?"/drives/"+X:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}ha||(ra+=(0<ra.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
+var pa=[];ea()}}function R(X){U.className=U.className.replace("odCatSelected","");U=X;U.className+=" odCatSelected"}function T(X){m||(V=null,C("search",null,null,null,X))}var S="";null==f&&(f=B,S='<div style="text-align: center;" class="odPreview"></div>');null==p&&(p=function(){var X=null;try{X=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return X});null==q&&(q=function(X){if(null!=X){var W=p()||{};delete X["@microsoft.graph.downloadUrl"];W[X.id]=X;localStorage.setItem("mxODPickerRecentList",
JSON.stringify(W))}});S='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+
mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+S+(E?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(F?'<button id="odSubmitBtn" class="odSubmitBtn">'+
-mxUtils.htmlEntities(mxResources.get(G?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+mxUtils.htmlEntities(mxResources.get(H?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(Q?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Q?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var v=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),A=new Editor,N=null,J=null,K=null,m=!1,t=[],D=null,M=null;this.getSelectedItem=function(){null!=J&&q(J);return J};if(null==n("#mxODPickerCss")){var L=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");L.appendChild(O);O.type="text/css";O.id="mxODPickerCss";O.appendChild(document.createTextNode(Q))}b.innerHTML=
-S;var P=n(".odPreview"),T=n("#odFiles");b=function(X,W){W=W||document;return W.querySelectorAll(X)}(".odCatListTitle");for(S=0;S<b.length;S++)b[S].addEventListener("click",function(){J=M=null;if(!m)switch(R(this),this.id){case "odFiles":C();break;case "odRecent":C("recent");break;case "odShared":C("shared");break;case "odSharepoint":C("sharepoint")}});var V=null;n("#odSearchBox").addEventListener("keyup",function(X){var W=this;null!=V&&clearTimeout(V);13==X.keyCode?U(W.value):V=setTimeout(function(){U(W.value)},
-500)});n("#refreshOD").addEventListener("click",function(){if(null!=D){f(null);var X=t.slice();C.apply(this,D);t=X}});E&&n("#odBackBtn").addEventListener("click",E);F&&n("#odSubmitBtn").addEventListener("click",z);null!=k?(E=k.pop(),"sharepoint"==k[0].driveId&&R(n("#odSharepoint")),t=k,C(E.driveId,E.folderId,E.siteId,E.name)):C()};App=function(b,f,g){EditorUi.call(this,b,f,null!=g?g:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+var v=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),z=new Editor,N=null,J=null,K=null,m=!1,t=[],D=null,M=null;this.getSelectedItem=function(){null!=J&&q(J);return J};if(null==n("#mxODPickerCss")){var L=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");L.appendChild(O);O.type="text/css";O.id="mxODPickerCss";O.appendChild(document.createTextNode(Q))}b.innerHTML=
+S;var P=n(".odPreview"),U=n("#odFiles");b=function(X,W){W=W||document;return W.querySelectorAll(X)}(".odCatListTitle");for(S=0;S<b.length;S++)b[S].addEventListener("click",function(){J=M=null;if(!m)switch(R(this),this.id){case "odFiles":C();break;case "odRecent":C("recent");break;case "odShared":C("shared");break;case "odSharepoint":C("sharepoint")}});var V=null;n("#odSearchBox").addEventListener("keyup",function(X){var W=this;null!=V&&clearTimeout(V);13==X.keyCode?T(W.value):V=setTimeout(function(){T(W.value)},
+500)});n("#refreshOD").addEventListener("click",function(){if(null!=D){f(null);var X=t.slice();C.apply(this,D);t=X}});E&&n("#odBackBtn").addEventListener("click",E);F&&n("#odSubmitBtn").addEventListener("click",A);null!=k?(E=k.pop(),"sharepoint"==k[0].driveId&&R(n("#odSharepoint")),t=k,C(E.driveId,E.folderId,E.siteId,E.name)):C()};App=function(b,f,g){EditorUi.call(this,b,f,null!=g?g:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,p,q){if("1"==urlParams.openInSameWin||navigator.standalone)null!=q&&q();else{var u=null;try{u=window.open(c)}catch(y){}null==u||void 0===u?this.showDialog((new PopupDialog(this,c,p,q)).container,340,140,!0,!0):null!=p&&p()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";
@@ -13843,7 +13845,7 @@ mxLanguage))}catch(k){document.body.innerHTML="",d=document.createElement("pre")
"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(B);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,B,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(I){EditorUi.isElectronApp?
(mxLog.show(),mxLog.debug(I.stack)):(EditorUi.logError(I.message,null,null,null,I),window.setTimeout(function(){alert(I.message)},1))}}mxResources.parse(d[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);if(null!=
-n)try{var x=JSON.parse(n),z;for(z in l.merge)x[z]=l.merge[z];l=x}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}1<d.length&&(Graph.prototype.defaultThemes["default-style2"]=d[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
+n)try{var x=JSON.parse(n),A;for(A in l.merge)x[A]=l.merge[A];l=x}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}1<d.length&&(Graph.prototype.defaultThemes["default-style2"]=d[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
d[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?k():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],k,function(B){document.body.innerHTML="";var I=document.createElement("pre");mxUtils.write(I,B.stack);document.body.appendChild(I)}))},function(d){d=document.getElementById("geStatus");null!=d&&(d.innerHTML="Error loading page. <a>Please try refreshing.</a>",d.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
"en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(Editor.loadCompatibleCss(),App.isMainCalled=!0,window.onerror=function(F,
d,k,l,n){EditorUi.logError("Global: "+(null!=F?F:""),d,k,l,n,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",F,"\nURL:",d,"\nLine:",k,"\nColumn:",l,"\nError:",n)):console.error("Message:",F,"\nURL:",d,"\nLine:",k,"\nColumn:",l,"\nError:",n);window.setTimeout(function(){alert("Error: "+(null!=F?F:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==
@@ -13852,8 +13854,8 @@ urlParams.embed||"1"==urlParams.lightbox){var p=document.getElementById("geInfo"
EditorUi.debug("App.main","Skipping service worker (first load)")})}catch(F){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var q=
null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var u=JSON.parse(localStorage.getItem(mxSettings.key));null!=u&&(q=u.plugins)}catch(F){}u=urlParams.p;App.initPluginCallback();null!=u&&App.loadPlugins(u.split(";"));if(null!=q&&0<q.length&&"0"!=urlParams.plugins)for(p=0;p<q.length;p++)try{("/"==q[p].charAt(0)&&(q[p]=PLUGINS_BASE_PATH+q[p]),App.isSameDomain(q[p]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(q[p])?null==
App.pluginsLoaded[q[p]]&&(App.pluginsLoaded[q[p]]=!0,App.embedModePluginsCount++,mxscript(q[p])):null!=window.console&&console.log("Unknown plugin:",q[p]):null!=window.console&&console.log("Blocked plugin:",q[p])}catch(F){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
-null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,G=function(F){if(F.source==y)try{var d=JSON.parse(F.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",G),Editor.configure(d.config),mxSettings.load(),null!=d.config.darkColor&&document.body.style.setProperty("--dark-color",d.config.darkColor),d.colorSchemeMeta&&mxmeta("color-scheme",
-"dark light"),g())}catch(k){null!=window.console&&console.log("Error in configure message: "+k,F.data)}};mxEvent.addListener(window,"message",G);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(F){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):console.error(F)}if(isLocalStorage&&
+null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,H=function(F){if(F.source==y)try{var d=JSON.parse(F.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",H),Editor.configure(d.config),mxSettings.load(),null!=d.config.darkColor&&document.body.style.setProperty("--dark-color",d.config.darkColor),d.colorSchemeMeta&&mxmeta("color-scheme",
+"dark light"),g())}catch(k){null!=window.console&&console.log("Error in configure message: "+k,F.data)}};mxEvent.addListener(window,"message",H);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(F){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):console.error(F)}if(isLocalStorage&&
null!=localStorage&&"1"!=urlParams.embed){var E=localStorage.getItem(Editor.configurationKey);if(null!=E)try{E=JSON.parse(E),null!=E&&(EditorUi.debug("Using local configuration",E),Editor.configure(E),mxSettings.load())}catch(F){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):console.error(F)}}}g()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(F){document.body.innerHTML="",q=
document.createElement("pre"),mxUtils.write(q,F.stack),document.body.appendChild(q)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var g=0;g<b.length;g++)if(null!=b[g]&&0<b[g].length)try{if(null!=App.pluginRegistry[b[g]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[g]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(c):mxscript(c):f?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[g])}catch(p){null!=window.console&&console.log("Error loading plugin:",
@@ -13894,11 +13896,11 @@ App.prototype.addRecent=function(b,f,g){if(isLocalStorage&&null!=localStorage){f
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(f){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");this.unloading=!0;var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,f=this.getCurrentFile();null==f||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
-App.prototype.getThumbnail=function(b,f,g){g=null!=g?g:0;var c=!1;try{var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(Q){window.clearTimeout(q);p&&f(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var y=this.editor.graph,G=y.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var E=y.getGlobalVariable;y=this.createTemporaryGraph(y.getStylesheet());y.setBackgroundImage=this.editor.graph.setBackgroundImage;
-var F=this.pages[0];this.currentPage==F?y.setBackgroundImage(G):null!=F.viewState&&null!=F.viewState&&(G=F.viewState.backgroundImage,y.setBackgroundImage(G));y.getGlobalVariable=function(Q){return"page"==Q?F.getName():"pagenumber"==Q?1:E.apply(this,arguments)};y.getGlobalVariable=E;document.body.appendChild(y.container);y.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{y!=this.editor.graph&&null!=y.container.parentNode&&
-y.container.parentNode.removeChild(y.container)}catch(v){Q=null}u(Q)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,y,g,null,null,null,"diagram",null),c=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),k=y.getGraphBounds(),l=y.view.translate,n=y.view.scale;null!=G&&(k=mxRectangle.fromRectangle(k),k.add(new mxRectangle((l.x+G.x)*n,(l.y+G.y)*n,G.width*n,G.height*n)));var x=b/k.width;x=Math.min(1,Math.min(3*b/(4*
-k.height),x));var z=Math.floor(k.x),B=Math.floor(k.y);d.setAttribute("width",Math.ceil(x*(k.width+4)));d.setAttribute("height",Math.ceil(x*(k.height+4)));var I=d.getContext("2d");I.scale(x,x);I.translate(-z,-B);var H=y.background;if(null==H||""==H||H==mxConstants.NONE)H="#ffffff";I.save();I.fillStyle=H;I.fillRect(z,B,Math.ceil(k.width+4),Math.ceil(k.height+4));I.restore();if(null!=G){var C=new Image;C.src=G.src;I.drawImage(C,G.x*x,G.y*x,G.width*x,G.height*x)}var R=new mxJsCanvas(d),U=new mxAsyncCanvas(this.thumbImageCache);
-R.images=this.thumbImageCache.images;var S=new mxImageExport;S.drawShape=function(Q,v){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(v.save(),v.translate(.5,.5),Q.shape.paint(v),v.translate(-.5,-.5),v.restore())};S.drawText=function(Q,v){};S.drawState(y.getView().getState(y.model.root),U);U.finish(mxUtils.bind(this,function(){try{S.drawState(y.getView().getState(y.model.root),R),y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}catch(Q){d=null}u(d)}));
+App.prototype.getThumbnail=function(b,f,g){g=null!=g?g:0;var c=!1;try{var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(Q){window.clearTimeout(q);p&&f(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var y=this.editor.graph,H=y.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var E=y.getGlobalVariable;y=this.createTemporaryGraph(y.getStylesheet());y.setBackgroundImage=this.editor.graph.setBackgroundImage;
+var F=this.pages[0];this.currentPage==F?y.setBackgroundImage(H):null!=F.viewState&&null!=F.viewState&&(H=F.viewState.backgroundImage,y.setBackgroundImage(H));y.getGlobalVariable=function(Q){return"page"==Q?F.getName():"pagenumber"==Q?1:E.apply(this,arguments)};y.getGlobalVariable=E;document.body.appendChild(y.container);y.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{y!=this.editor.graph&&null!=y.container.parentNode&&
+y.container.parentNode.removeChild(y.container)}catch(v){Q=null}u(Q)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,y,g,null,null,null,"diagram",null),c=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),k=y.getGraphBounds(),l=y.view.translate,n=y.view.scale;null!=H&&(k=mxRectangle.fromRectangle(k),k.add(new mxRectangle((l.x+H.x)*n,(l.y+H.y)*n,H.width*n,H.height*n)));var x=b/k.width;x=Math.min(1,Math.min(3*b/(4*
+k.height),x));var A=Math.floor(k.x),B=Math.floor(k.y);d.setAttribute("width",Math.ceil(x*(k.width+4)));d.setAttribute("height",Math.ceil(x*(k.height+4)));var I=d.getContext("2d");I.scale(x,x);I.translate(-A,-B);var G=y.background;if(null==G||""==G||G==mxConstants.NONE)G="#ffffff";I.save();I.fillStyle=G;I.fillRect(A,B,Math.ceil(k.width+4),Math.ceil(k.height+4));I.restore();if(null!=H){var C=new Image;C.src=H.src;I.drawImage(C,H.x*x,H.y*x,H.width*x,H.height*x)}var R=new mxJsCanvas(d),T=new mxAsyncCanvas(this.thumbImageCache);
+R.images=this.thumbImageCache.images;var S=new mxImageExport;S.drawShape=function(Q,v){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(v.save(),v.translate(.5,.5),Q.shape.paint(v),v.translate(-.5,-.5),v.restore())};S.drawText=function(Q,v){};S.drawState(y.getView().getState(y.model.root),T);T.finish(mxUtils.bind(this,function(){try{S.drawState(y.getView().getState(y.model.root),R),y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}catch(Q){d=null}u(d)}));
c=!0}}catch(Q){c=!1,null!=y&&y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}c||window.clearTimeout(q);return c};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,g){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();f=null!=c?c.getMode():f;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){f==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):f==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
mxResources.get("openIt",[mxResources.get("dropbox")])):f==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(g)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var p=new Date;p.setYear(p.getFullYear()+1);document.cookie="MODE="+f+"; expires="+
@@ -13914,27 +13916,27 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(g){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(g))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
2E3)},15E3)}};
-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(G,E,F,d,k){"ResizeObserver loop limit exceeded"!=G&&(EditorUi.logError("Uncaught: "+(null!=G?G:""),E,F,d,k,null,!0),b.handleError({message:G},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(G){var E=this.getCurrentFile();EditorUi.debug("storage event",[G],
-[E]);null!=E&&".draft-alive-check"==G.key&&null!=G.newValue&&null!=E.draftId&&(this.draftAliveCheck=G.newValue,E.saveDraft())}))}catch(G){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(G){try{var E=this.getDiagramId();if(E!=f){f=E;var F=this.getCurrentFile();null!=F&&F.getHash()==E||this.loadFile(E,!0)}else{var d=this.getHashObject();if(null!=d&&null!=d.pageId&&null!=this.currentPage&&d.pageId!=this.currentPage.getId()){var k=this.getPageById(d.pageId);
-null!=k&&this.selectPage(k)}}}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(G){this.handleError(G,mxResources.get("errorLoadingFile"))}))}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}else if((null==
-window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var g=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var G=mxUtils.bind(this,function(d){Editor.isPngDataUrl(d)&&(d=Editor.extractGraphModelFromPng(d));var k=urlParams.title;k=null!=k?decodeURIComponent(k):this.defaultFilename;d=new LocalFile(this,
-d,k,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(d.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(d);this.editor.chromeless||(d.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),E=window.opener||window.parent;if(E!=window){var F=urlParams.create;null!=F?G(E[decodeURIComponent(F)]):(F=urlParams.data,null!=F?G(decodeURIComponent(F)):this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.createTimeout(2E3,mxUtils.bind(this,function(d){this.installMessageHandler(mxUtils.bind(this,function(k,l){l.source==E&&d.clear()&&(this.spinner.stop(),G(k))}))}),mxUtils.bind(this,function(d){this.handleError(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,
+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(H,E,F,d,k){"ResizeObserver loop limit exceeded"!=H&&(EditorUi.logError("Uncaught: "+(null!=H?H:""),E,F,d,k,null,!0),b.handleError({message:H},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(H){var E=this.getCurrentFile();EditorUi.debug("storage event",[H],
+[E]);null!=E&&".draft-alive-check"==H.key&&null!=H.newValue&&null!=E.draftId&&(this.draftAliveCheck=H.newValue,E.saveDraft())}))}catch(H){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(H){try{var E=this.getDiagramId();if(E!=f){f=E;var F=this.getCurrentFile();null!=F&&F.getHash()==E||this.loadFile(E,!0)}else{var d=this.getHashObject();if(null!=d&&null!=d.pageId&&null!=this.currentPage&&d.pageId!=this.currentPage.getId()){var k=this.getPageById(d.pageId);
+null!=k&&this.selectPage(k)}}}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"))}))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}else if((null==
+window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var g=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var H=mxUtils.bind(this,function(d){Editor.isPngDataUrl(d)&&(d=Editor.extractGraphModelFromPng(d));var k=urlParams.title;k=null!=k?decodeURIComponent(k):this.defaultFilename;d=new LocalFile(this,
+d,k,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(d.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(d);this.editor.chromeless||(d.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),E=window.opener||window.parent;if(E!=window){var F=urlParams.create;null!=F?H(E[decodeURIComponent(F)]):(F=urlParams.data,null!=F?H(decodeURIComponent(F)):this.spinner.spin(document.body,mxResources.get("loading"))&&
+this.createTimeout(2E3,mxUtils.bind(this,function(d){this.installMessageHandler(mxUtils.bind(this,function(k,l){l.source==E&&d.clear()&&(this.spinner.stop(),H(k))}))}),mxUtils.bind(this,function(d){this.handleError(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,
!0),this.actions.get("insertTemplate").funct();else{F=!1;try{F=null!=window.opener&&null!=window.opener.openFile}catch(d){}F?this.spinner.spin(document.body,mxResources.get("loading")):(F=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=F&&0!=F.length||this.editor.isChromelessView()?null!=F&&0<F.length?this.loadFile(F,null,null,mxUtils.bind(this,function(){var d=decodeURIComponent(urlParams.viewbox||"");if(""!=d)try{var k=JSON.parse(d);this.editor.graph.fitWindow(k,
k.border)}catch(l){console.error(l)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(c=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,
-8))&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var p=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),q=mxUtils.bind(this,function(G){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,G,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var E=urlParams.title;E=null!=E?decodeURIComponent(E):this.defaultFilename;G=this.getServiceCount(!0);
-isLocalStorage&&G++;var F=4>=G?2:6<G?4:3;E=new CreateDialog(this,E,mxUtils.bind(this,function(d,k){if(null==k){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<d.length?d:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(k,mxUtils.bind(this,function(n){this.createFile(d,this.getFileData(!0),null,k,null,!0,n)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(E.container,
-420,G>F?390:280,!0,!1,mxUtils.bind(this,function(d){d&&null==this.getCurrentFile()&&this.showSplash()}));E.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0)){this.spinner.stop();c=JSON.parse(c);var u=mxUtils.bind(this,function(G){this.createFile(null!=G.filename?G.filename:this.defaultFilename,G,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+
-this.getSearch(["create"]));window.location.hash="R"+Graph.compress(G)}),!0,null,!0)}),y=c.data;c.compressed&&(y=Graph.decompress(y));"mermaid"==c.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(G){G!=this.emptyDiagramXml&&u(G)})),this.generateMermaidImage(y,null,function(){},mxUtils.bind(this,function(G){for(var E=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),F=0;F<E.length;F++)E[F].parentNode.removeChild(E[F]);mxMermaidToDrawio.resetListeners();
-this.handleError(G)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):"generate"==c.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+y+"'")&&this.generateDiagram(y,mxUtils.bind(this,function(G){this.spinner.stop();u(G)}),mxUtils.bind(this,function(G){this.handleError(G,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[c]?q(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(G){this.handleError(G,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(G){q(G)},mxUtils.bind(this,function(G){this.handleError(G,mxResources.get("errorLoadingFile"),p)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash=
+8))&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var p=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),q=mxUtils.bind(this,function(H){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,H,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var E=urlParams.title;E=null!=E?decodeURIComponent(E):this.defaultFilename;H=this.getServiceCount(!0);
+isLocalStorage&&H++;var F=4>=H?2:6<H?4:3;E=new CreateDialog(this,E,mxUtils.bind(this,function(d,k){if(null==k){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<d.length?d:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(k,mxUtils.bind(this,function(n){this.createFile(d,this.getFileData(!0),null,k,null,!0,n)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(E.container,
+420,H>F?390:280,!0,!1,mxUtils.bind(this,function(d){d&&null==this.getCurrentFile()&&this.showSplash()}));E.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0)){this.spinner.stop();c=JSON.parse(c);var u=mxUtils.bind(this,function(H){this.createFile(null!=H.filename?H.filename:this.defaultFilename,H,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+
+this.getSearch(["create"]));window.location.hash="R"+Graph.compress(H)}),!0,null,!0)}),y=c.data;c.compressed&&(y=Graph.decompress(y));"mermaid"==c.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(H){H!=this.emptyDiagramXml&&u(H)})),this.generateMermaidImage(y,null,function(){},mxUtils.bind(this,function(H){for(var E=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),F=0;F<E.length;F++)E[F].parentNode.removeChild(E[F]);mxMermaidToDrawio.resetListeners();
+this.handleError(H)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):"generate"==c.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+y+"'")&&this.generateDiagram(y,mxUtils.bind(this,function(H){this.spinner.stop();u(H)}),mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[c]?q(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(H){this.handleError(H,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(H){q(H)},mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"),p)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash=
"G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&
-window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),g())}}catch(G){this.handleError(G)}};
-App.prototype.openTemplateDialog=function(b){var f=this.editor.graph;f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(g){this.hideDialog();if(null!=g){var c=this.editor.graph.getFreeInsertPoint();f.setSelectionCells(this.importXml(g,Math.max(c.x,20),Math.max(c.y,20),!0,null,null,!0));f.scrollCellToVisible(f.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
+window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),g())}}catch(H){this.handleError(H)}};
+App.prototype.openTemplateDialog=function(b){var f=this.editor.graph;f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(g){this.hideDialog();if(null!=g){var c=this.editor.graph.getFreeInsertPoint(!0);f.setSelectionCells(this.importXml(g,Math.max(c.x,20),Math.max(c.y,20),!0,null,null,!0));f.scrollCellToVisible(f.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
620,460,!0,!0,mxUtils.bind(this,function(){this.sidebar.hideTooltip()})),b.init())};
-App.prototype.generateDiagram=function(b,f,g){var c=!1,p=null,q='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(u){u!=this.emptyDiagramXml&&(c=!0,p=u)}));this.generateOpenAiMermaidDiagram(q,function(u,y,G,E){p=c?p:this.createMermaidXml(u,EditorUi.defaultMermaidConfig,y,G,E,b);
+App.prototype.generateDiagram=function(b,f,g){var c=!1,p=null,q='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(u){u!=this.emptyDiagramXml&&(c=!0,p=u)}));this.generateOpenAiMermaidDiagram(q,function(u,y,H,E){p=c?p:this.createMermaidXml(u,EditorUi.defaultMermaidConfig,y,H,E,b);
f(p,y)},g)};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var g=this.getCurrentFile();null!=g&&(g.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,g){function c(){g(p)}var p=[];try{this.getDatabaseItems(mxUtils.bind(this,function(q){EditorUi.debug("App.filterDrafts",[this],"items",q);for(var u=0;u<q.length;u++)try{var y=q[u].key;if(null!=y&&".draft_"==y.substring(0,7)){var G=JSON.parse(q[u].data);null!=G&&"draft"==G.type&&G.aliveCheck!=f&&(null==b&&null==G.fileObject||null!=G.fileObject&&G.fileObject.path==b)&&(G.key=y,p.push(G))}}catch(E){}c()}),c)}catch(q){c()}};
+App.prototype.filterDrafts=function(b,f,g){function c(){g(p)}var p=[];try{this.getDatabaseItems(mxUtils.bind(this,function(q){EditorUi.debug("App.filterDrafts",[this],"items",q);for(var u=0;u<q.length;u++)try{var y=q[u].key;if(null!=y&&".draft_"==y.substring(0,7)){var H=JSON.parse(q[u].data);null!=H&&"draft"==H.type&&H.aliveCheck!=f&&(null==b&&null==H.fileObject||null!=H.fileObject&&H.fileObject.path==b)&&(H.key=y,p.push(H))}}catch(E){}c()}),c)}catch(q){c()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var g=new Date(f[0].modified);g=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
[g.toLocaleDateString()+" "+g.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c&&null!=f[c]?c:0;this.loadDraft(f[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[c].key)}))}),mxUtils.bind(this,function(c,p){this.removeDatabaseItem(f[""!=c?c:0].key);null!=p&&p()}),null,null,null,1<f.length?f:null);this.showDialog(g.container,640,480,!0,!1,mxUtils.bind(this,function(c){c&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0))}));g.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
@@ -13943,87 +13945,87 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash
App.prototype.addLanguageMenu=function(b,f,g){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),this.setElementTitle(c,"language"),c.className="geAdaptiveAsset",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right=
null!=g?g:"22px",f&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=g?g:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),c.appendChild(f),f.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(p){this.editor.graph.popupMenuHandler.hideMenu();var q=new mxPopupMenu(this.menus.get("language").funct);
q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);q.destroy()});var u=mxUtils.getOffset(c);q.popup(u.x,u.y+c.offsetHeight,null,p);this.setCurrentMenu(q)})),b.appendChild(c));return c};
-App.prototype.loadFileSystemEntry=function(b,f,g){g=null!=g?g:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var p=new FileReader;p.onload=mxUtils.bind(this,function(q){var u=mxUtils.bind(this,function(y){try{if(null!=f){var G=q.target.result;"image/png"==c.type&&(G=this.extractGraphModelFromPng(G));f(new LocalFile(this,G,c.name,null,b,c,y))}else this.openFileHandle(q.target.result,c.name,c,!1,b,y)}catch(E){g(E)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
+App.prototype.loadFileSystemEntry=function(b,f,g){g=null!=g?g:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var p=new FileReader;p.onload=mxUtils.bind(this,function(q){var u=mxUtils.bind(this,function(y){try{if(null!=f){var H=q.target.result;"image/png"==c.type&&(H=this.extractGraphModelFromPng(H));f(new LocalFile(this,H,c.name,null,b,c,y))}else this.openFileHandle(q.target.result,c.name,c,!1,b,y)}catch(E){g(E)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
function(y){u("denied"!==y)})):b.createWritable().then(mxUtils.bind(this,function(){u(!0)}),mxUtils.bind(this,function(y){u(!1)}))});p.onerror=g;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?p.readAsText(c):p.readAsDataURL(c)}),g)}catch(c){g(c)}};
App.prototype.createFileSystemOptions=function(b){var f=[],g=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(g=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var p={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};p.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==g?f.splice(0,0,
p):this.editor.diagramFileTypes[c].extension==g?f.splice(0,0,p):f.push(p)}return{types:f,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,f,g){f=null!=f?f:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});g=null!=g?g:this.createFileSystemOptions();window.showSaveFilePicker(g).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(p){b(c,p)}),f)}),f)};
App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getServiceForName(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(u){null!=u&&0<u.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(u[0])}),
mxUtils.bind(this,function(u){"AbortError"!=u.name&&this.handleError(u)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.openFiles(g.files),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.openFileInputElt=g}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(u,y){StorageFile.listFiles(this,"F",u,y)});window.openBrowserFile=mxUtils.bind(this,function(u,y,G){StorageFile.getFileContent(this,u,y,G)});window.deleteBrowserFile=mxUtils.bind(this,function(u,y,G){StorageFile.deleteFile(this,u,y,G)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(u,y){var G=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,u,y):new LocalFile(this,u,y))}),E=this.getCurrentFile();null!=E&&E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()}));var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(u){Editor.useLocalStorage=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(u,y){StorageFile.listFiles(this,"F",u,y)});window.openBrowserFile=mxUtils.bind(this,function(u,y,H){StorageFile.getFileContent(this,u,y,H)});window.deleteBrowserFile=mxUtils.bind(this,function(u,y,H){StorageFile.deleteFile(this,u,y,H)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(u,y){var H=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,u,y):new LocalFile(this,u,y))}),E=this.getCurrentFile();null!=E&&E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()}));var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(u){Editor.useLocalStorage=
c;q.apply(p,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(u){this.handleError(u)}};
App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var f=mxUtils.bind(this,function(q){try{this.loadLibrary(q);this.showSidebar();try{this.sidebar.palettes[q.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(u){}}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var g=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=g&&g.pickLibrary(mxUtils.bind(this,function(q,u){null!=u?f(u):this.spinner.spin(document.body,mxResources.get("loading"))&&g.getLibrary(q,mxUtils.bind(this,function(y){this.spinner.stop();f(y)}),mxUtils.bind(this,function(y){this.handleError(y,null!=y?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");
-c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var q=0;q<c.files.length;q++)mxUtils.bind(this,function(u){var y=new FileReader;y.onload=mxUtils.bind(this,function(G){f(new LocalLibrary(this,G.target.result,u.name))});y.readAsText(u)})(c.files[q]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var q=0;q<c.files.length;q++)mxUtils.bind(this,function(u){var y=new FileReader;y.onload=mxUtils.bind(this,function(H){f(new LocalLibrary(this,H.target.result,u.name))});y.readAsText(u)})(c.files[q]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
mxUtils.bind(this,function(q,u){StorageFile.listFiles(this,"L",q,u)});window.openBrowserFile=mxUtils.bind(this,function(q,u,y){StorageFile.getFileContent(this,q,u,y)});window.deleteBrowserFile=mxUtils.bind(this,function(q,u,y){StorageFile.deleteFile(this,q,u,y)});var p=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(q){this.hideDialog(q)}));window.openFile.setConsumer(mxUtils.bind(this,function(q,u){f(b==App.MODE_BROWSER?new StorageLibrary(this,
q,u):new LocalLibrary(this,q,u))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=p;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,f,g,c,p,q,u){try{c=null!=c?c:this.mode;p=null!=p?p:!1;q=null!=q?q:!1;var y=this.createLibraryDataFromImages(f),G=mxUtils.bind(this,function(d){this.spinner.stop();null!=u&&u();this.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)});null==g&&c==App.MODE_DEVICE&&(g=new LocalLibrary(this,y,b));if(null==g)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,y,d,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),G,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),G,d):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),G,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),G,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(k,f)}),G,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),G,d):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,y,b),mxUtils.bind(this,function(k){this.hideDialog(!0);this.libraryLoaded(k,f)}),G):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
-else if(p||this.spinner.spin(document.body,mxResources.get("saving"))){g.setData(y);var E=mxUtils.bind(this,function(){g.save(!0,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);q||this.libraryLoaded(g,f);null!=u&&u()}),G)});if(b!=g.getTitle()){var F=g.getHash();g.rename(b,mxUtils.bind(this,function(d){g.constructor!=LocalLibrary&&F!=g.getHash()&&(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(g.getHash()));this.removeLibrarySidebar(F);E()}),G)}else E()}}catch(d){this.handleError(d)}};
+App.prototype.saveLibrary=function(b,f,g,c,p,q,u){try{c=null!=c?c:this.mode;p=null!=p?p:!1;q=null!=q?q:!1;var y=this.createLibraryDataFromImages(f),H=mxUtils.bind(this,function(d){this.spinner.stop();null!=u&&u();this.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)});null==g&&c==App.MODE_DEVICE&&(g=new LocalLibrary(this,y,b));if(null==g)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,y,d,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(k,f)}),H,d):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,y,b),mxUtils.bind(this,function(k){this.hideDialog(!0);this.libraryLoaded(k,f)}),H):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
+else if(p||this.spinner.spin(document.body,mxResources.get("saving"))){g.setData(y);var E=mxUtils.bind(this,function(){g.save(!0,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);q||this.libraryLoaded(g,f);null!=u&&u()}),H)});if(b!=g.getTitle()){var F=g.getHash();g.rename(b,mxUtils.bind(this,function(d){g.constructor!=LocalLibrary&&F!=g.getHash()&&(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(g.getHash()));this.removeLibrarySidebar(F);E()}),H)}else E()}}catch(d){this.handleError(d)}};
App.prototype.saveFile=function(b,f){var g=this.getCurrentFile(),c=this.mode;if(null!=g){var p=mxUtils.bind(this,function(){EditorUi.enableDrafts&&g.removeDraft();this.getCurrentFile()==g||g.isModified()||(g.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=f&&f()});if(b||null==g.getTitle()||null!=g.invalidFileHandle||null==this.mode)if(null!=g&&g.constructor==LocalFile&&
-null!=g.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(y,G){g.invalidFileHandle=null;g.fileHandle=y;g.title=G.name;g.desc=G;g.editable=null;this.save(G.name,p)}),null,this.createFileSystemOptions(g.getTitle()));else{b=null!=g.getTitle()?g.getTitle():this.defaultFilename;var q=mxUtils.bind(this,function(y,G,E,F){if(null!=y&&0<y.length)if(/(\.pdf)$/i.test(y))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
-mxUtils.bind(this,function(){E.value=y.split(".").slice(0,-1).join(".");E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&G==App.MODE_DEVICE)null!=g&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,l){g.fileHandle=k;g.mode=App.MODE_DEVICE;g.title=l.name;g.desc=l;this.setMode(App.MODE_DEVICE);this.save(l.name,p)}),mxUtils.bind(this,
-function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(y)):(this.setMode(App.MODE_DEVICE),this.save(y,p));else if("download"==G)(new LocalFile(this,null,y)).save();else if("_blank"==G)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=G){var d=mxUtils.bind(this,function(k){var l=this.editor.graph,n=l.getSelectionCells(),x=l.getViewState(),
-z=this.currentPage;this.createFile(y,this.getFileData(/(\.xml)$/i.test(y)||0>y.indexOf(".")||/(\.drawio)$/i.test(y),/(\.svg)$/i.test(y),/(\.html)$/i.test(y)),null,G,p,null==this.mode,k,null,null,mxUtils.bind(this,function(){this.restoreViewState(z,x,n)}))});null!=F?d(F):this.pickFolder(G,d)}else null!=G&&this.save(y,p)}),u=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(y,G,E){q(y.value,G,y,E);this.hideDialog()}),u?null:["_blank"]);this.showDialog(b.container,
+null!=g.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(y,H){g.invalidFileHandle=null;g.fileHandle=y;g.title=H.name;g.desc=H;g.editable=null;this.save(H.name,p)}),null,this.createFileSystemOptions(g.getTitle()));else{b=null!=g.getTitle()?g.getTitle():this.defaultFilename;var q=mxUtils.bind(this,function(y,H,E,F){if(null!=y&&0<y.length)if(/(\.pdf)$/i.test(y))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
+mxUtils.bind(this,function(){E.value=y.split(".").slice(0,-1).join(".");E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&H==App.MODE_DEVICE)null!=g&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,l){g.fileHandle=k;g.mode=App.MODE_DEVICE;g.title=l.name;g.desc=l;this.setMode(App.MODE_DEVICE);this.save(l.name,p)}),mxUtils.bind(this,
+function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(y)):(this.setMode(App.MODE_DEVICE),this.save(y,p));else if("download"==H)(new LocalFile(this,null,y)).save();else if("_blank"==H)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=H){var d=mxUtils.bind(this,function(k){var l=this.editor.graph,n=l.getSelectionCells(),x=l.getViewState(),
+A=this.currentPage;this.createFile(y,this.getFileData(/(\.xml)$/i.test(y)||0>y.indexOf(".")||/(\.drawio)$/i.test(y),/(\.svg)$/i.test(y),/(\.html)$/i.test(y)),null,H,p,null==this.mode,k,null,null,mxUtils.bind(this,function(){this.restoreViewState(A,x,n)}))});null!=F?d(F):this.pickFolder(H,d)}else null!=H&&this.save(y,p)}),u=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(y,H,E){q(y.value,H,y,E);this.hideDialog()}),u?null:["_blank"]);this.showDialog(b.container,
420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(g.getTitle(),p)}};
-App.prototype.loadTemplate=function(b,f,g,c,p){var q=!1,u=b,y=null!=c?c:b;c=/\.png$/i.test(y)||/\.pdf$/i.test(y);var G=EditorUi.isVisioFilename(y);this.editor.isCorsEnabledForUrl(u)||(q=c||G,u="t="+(new Date).getTime(),u=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+u+(q?"&base64=1":""));this.editor.loadUrl(u,mxUtils.bind(this,function(E){try{var F=q?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(E):atob(E):E;if(G||this.isVisioData(F))G||(y=p?this.isRemoteVisioData(F)?"raw.vss":"raw.vssx":
+App.prototype.loadTemplate=function(b,f,g,c,p){var q=!1,u=b,y=null!=c?c:b;c=/\.png$/i.test(y)||/\.pdf$/i.test(y);var H=EditorUi.isVisioFilename(y);this.editor.isCorsEnabledForUrl(u)||(q=c||H,u="t="+(new Date).getTime(),u=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+u+(q?"&base64=1":""));this.editor.loadUrl(u,mxUtils.bind(this,function(E){try{var F=q?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(E):atob(E):E;if(H||this.isVisioData(F))H||(y=p?this.isRemoteVisioData(F)?"raw.vss":"raw.vssx":
this.isRemoteVisioData(F)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(d){f(d)},g,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,y))this.isExternalDataComms()?this.parseFileData(F,mxUtils.bind(this,function(d){4==d.readyState&&200<=d.status&&299>=d.status&&"<mxGraphModel"==d.responseText.substring(0,13)&&f(d.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g);else if(this.isLucidChartData(F))this.convertLucidChart(F,
-mxUtils.bind(this,function(d){f(d)}),mxUtils.bind(this,function(d){g(d)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(E);f(F)}}catch(d){g(d)}}),g,/(\.png)($|\?)/i.test(y)||G,null,null,q)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
+mxUtils.bind(this,function(d){f(d)}),mxUtils.bind(this,function(d){g(d)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(E);f(F)}}catch(d){g(d)}}),g,/(\.png)($|\?)/i.test(y)||H,null,null,q)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===
typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};
App.prototype.uncompressPages=function(b){if(null!=b)try{var f=mxUtils.parseXml(b);if("mxfile"==f.documentElement.nodeName){for(var g=f.documentElement.getElementsByTagName("diagram"),c=0;c<g.length;c++){var p=Editor.parseDiagramNode(g[c],!0);null!=p&&(mxUtils.setTextContent(g[c],""),g[c].appendChild(p))}b=mxUtils.getPrettyXml(f.documentElement)}}catch(q){}return b};
-App.prototype.createFile=function(b,f,g,c,p,q,u,y,G,E){EditorUi.debug("App.createFile",[this],"title",[b],"data",[f],"libs",[g],"mode",[c]);c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var F=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){F();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
-null!=l&&this.handleError(l)});try{var k=mxUtils.bind(this,function(l){F();this.fileCreated(l,g,q,p,G,E)});c==App.MODE_GOOGLE&&null!=this.drive?(null==u&&null!=this.stateArg&&null!=this.stateArg.folderId&&(u=this.stateArg.folderId),this.drive.insertFile(b,f,u,k,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,k,d,!1,u):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,k,d,!1,u):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,k,d,!1,u):c==App.MODE_DROPBOX&&
-null!=this.dropbox?this.dropbox.insertFile(b,f,k,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,k,d,!1,u):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,k,d):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(F(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,g,q,p,G,E)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):
-(F(),this.fileCreated(new LocalFile(this,f,b,null==c),g,q,p,G,E))}catch(l){F(),this.handleError(l)}}};
-App.prototype.fileCreated=function(b,f,g,c,p,q){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[f],"replace",[g]);var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=p&&0<p.length&&(u+="?clibs="+p);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var G=window.location.protocol+
-"//"+window.location.hostname+u,E=y,F=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(F=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(F.container),E=this.decodeNodeIntoGraph(E,F));b.setData(this.createFileData(y,F,b,G));null!=F&&F.container.parentNode.removeChild(F.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==g&&null!=l&&(g=!l.isModified()&&(null==l.getMode()||EditorUi.isElectronApp));
-var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);g&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=p){for(var z=[],B=p.split(";"),I=0;I<B.length;I++)z.push(decodeURIComponent(B[I]));this.loadLibraries(z)}null!=c&&c()}),x=mxUtils.bind(this,function(){g||null==l||!l.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});
+App.prototype.createFile=function(b,f,g,c,p,q,u,y,H,E){EditorUi.debug("App.createFile",[this],"title",[b],"data",[f],"libs",[g],"mode",[c]);c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var F=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){F();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
+null!=l&&this.handleError(l)});try{var k=mxUtils.bind(this,function(l){F();this.fileCreated(l,g,q,p,H,E)});c==App.MODE_GOOGLE&&null!=this.drive?(null==u&&null!=this.stateArg&&null!=this.stateArg.folderId&&(u=this.stateArg.folderId),this.drive.insertFile(b,f,u,k,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,k,d,!1,u):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,k,d,!1,u):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,k,d,!1,u):c==App.MODE_DROPBOX&&
+null!=this.dropbox?this.dropbox.insertFile(b,f,k,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,k,d,!1,u):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,k,d):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(F(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,g,q,p,H,E)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):
+(F(),this.fileCreated(new LocalFile(this,f,b,null==c),g,q,p,H,E))}catch(l){F(),this.handleError(l)}}};
+App.prototype.fileCreated=function(b,f,g,c,p,q){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[f],"replace",[g]);var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=p&&0<p.length&&(u+="?clibs="+p);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var H=window.location.protocol+
+"//"+window.location.hostname+u,E=y,F=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(F=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(F.container),E=this.decodeNodeIntoGraph(E,F));b.setData(this.createFileData(y,F,b,H));null!=F&&F.container.parentNode.removeChild(F.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==g&&null!=l&&(g=!l.isModified()&&(null==l.getMode()||EditorUi.isElectronApp));
+var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);g&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=p){for(var A=[],B=p.split(";"),I=0;I<B.length;I++)A.push(decodeURIComponent(B[I]));this.loadLibraries(A)}null!=c&&c()}),x=mxUtils.bind(this,function(){g||null==l||!l.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});
null==g||g?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(u,null,x))});b.constructor==LocalFile?k():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){k()}),mxUtils.bind(this,function(l){d();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};
-App.prototype.loadFile=function(b,f,g,c,p){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var q=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var G=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=
-null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=c&&c()):G({message:mxResources.get("fileNotFound")})}),G)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}));else if(null!=g)this.spinner.stop(),this.fileLoaded(g),
+App.prototype.loadFile=function(b,f,g,c,p){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var q=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var H=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=
+null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=c&&c()):H({message:mxResources.get("fileNotFound")})}),H)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}));else if(null!=g)this.spinner.stop(),this.fileLoaded(g),
null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var E=decodeURIComponent(b.substring(1));"<"!=E.charAt(0)&&(E=Graph.decompress(E));E=new LocalFile(this,E,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
!0);E.getHash=function(){return b};this.fileLoaded(E);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(l,n){this.spinner.stop();this.fileLoaded(new EmbedFile(this,l,n));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
else if("U"==b.charAt(0)){var F=decodeURIComponent(b.substring(1)),d=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=F.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var l=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=F.substring(31,F.lastIndexOf("&ex"));this.loadFile("G"+n,f,null,mxUtils.bind(this,function(){var x=this.getCurrentFile();null!=x&&this.editor.chromeless&&!this.editor.editable&&(x.getHash=
-function(){return"G"+n},window.location.hash="#"+x.getHash());null!=c&&c()}));return!0}return!1});!l()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",l);return!0});this.loadTemplate(F,mxUtils.bind(this,function(l){this.spinner.stop();if(null!=l&&0<l.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var x=F,z=F.lastIndexOf("."),B=x.lastIndexOf("/");z>B&&0<B&&(x=x.substring(B+1,z),z=F.substring(z),Editor.useCanvasForExport||
-".png"!=z||(z=".drawio"),".svg"===z||".xml"===z||".html"===z||".png"===z||".drawio"===z)&&(n=x+z)}l=new LocalFile(this,l,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);l.getHash=function(){return b};this.fileLoaded(l,!0)?null!=c&&c():d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){d()||(this.spinner.stop(),
+function(){return"G"+n},window.location.hash="#"+x.getHash());null!=c&&c()}));return!0}return!1});!l()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",l);return!0});this.loadTemplate(F,mxUtils.bind(this,function(l){this.spinner.stop();if(null!=l&&0<l.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var x=F,A=F.lastIndexOf("."),B=x.lastIndexOf("/");A>B&&0<B&&(x=x.substring(B+1,A),A=F.substring(A),Editor.useCanvasForExport||
+".png"!=A||(A=".drawio"),".svg"===A||".xml"===A||".html"===A||".png"===A||".drawio"===A)&&(n=x+A)}l=new LocalFile(this,l,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);l.getHash=function(){return b};this.fileLoaded(l,!0)?null!=c&&c():d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){d()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var k=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var l=this.getServiceForName(k);if(null==l)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=
-x?x.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));l.getFile(b,mxUtils.bind(this,function(x){this.spinner.stop();this.fileLoaded(x);var z=this.getCurrentFile();if(null==z)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){z.getHash=function(){return n+b};x="#"+z.getHash();try{var B=this.getHashObject();null==B||mxUtils.isEmptyObject(B)||(x=x+"#"+encodeURIComponent(JSON.stringify(B)))}catch(I){}window.location.replace(x)}else x==
-z&&null==x.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var I=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+I+'" class="geStatusAlert">'+I+"</div>")}));null!=c&&c()}),mxUtils.bind(this,function(x){null!=window.console&&null!=x&&console.log("error in loadFile:",b,x);var z=mxUtils.bind(this,function(){var B=this.getCurrentFile();null==B?(window.location.hash="",this.showSplash()):window.location.hash="#"+B.getHash()});null==x||"AbortError"!=x.name?this.handleError(x,
-null!=x?mxResources.get("errorLoadingFile"):null,z,null,null,"#"+n+b):z()}))}})()}}),u=this.getCurrentFile(),y=mxUtils.bind(this,function(){p||null==u||!u.isModified()?q():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=u&&(window.location.hash=u.getHash())}),q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==f&&null!=u&&!u.isModified()&&this.isBlankFile()?y():null==u||f?y():this.showDialog((new PopupDialog(this,this.getUrl()+
+x?x.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));l.getFile(b,mxUtils.bind(this,function(x){this.spinner.stop();this.fileLoaded(x);var A=this.getCurrentFile();if(null==A)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){A.getHash=function(){return n+b};x="#"+A.getHash();try{var B=this.getHashObject();null==B||mxUtils.isEmptyObject(B)||(x=x+"#"+encodeURIComponent(JSON.stringify(B)))}catch(I){}window.location.replace(x)}else x==
+A&&null==x.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var I=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+I+'" class="geStatusAlert">'+I+"</div>")}));null!=c&&c()}),mxUtils.bind(this,function(x){null!=window.console&&null!=x&&console.log("error in loadFile:",b,x);var A=mxUtils.bind(this,function(){var B=this.getCurrentFile();null==B?(window.location.hash="",this.showSplash()):window.location.hash="#"+B.getHash()});null==x||"AbortError"!=x.name?this.handleError(x,
+null!=x?mxResources.get("errorLoadingFile"):null,A,null,null,"#"+n+b):A()}))}})()}}),u=this.getCurrentFile(),y=mxUtils.bind(this,function(){p||null==u||!u.isModified()?q():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=u&&(window.location.hash=u.getHash())}),q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==f&&null!=u&&!u.isModified()&&this.isBlankFile()?y():null==u||f?y():this.showDialog((new PopupDialog(this,this.getUrl()+
"#"+b,null,y)).container,340,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(g){for(var c=0;c<g.length;c++)""!=g[c]&&0>mxUtils.indexOf(f,g[c])&&f.push(g[c])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var g=mxUtils.bind(this,function(E,F){F||mxSettings.removeCustomLibrary(E);delete this.loadedLibraries[E]}),c=0,p=[],q=0<b.length&&"L.scratchpad"==b[0]?1:0,u=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var E=b.length-1;0<=E;E--)null!=p[E]&&this.loadLibrary(p[E],E<=q);null!=f&&f()}});if(null!=b)for(var y=0;y<b.length;y++){var G=encodeURIComponent(decodeURIComponent(b[y]));
+App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var g=mxUtils.bind(this,function(E,F){F||mxSettings.removeCustomLibrary(E);delete this.loadedLibraries[E]}),c=0,p=[],q=0<b.length&&"L.scratchpad"==b[0]?1:0,u=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var E=b.length-1;0<=E;E--)null!=p[E]&&this.loadLibrary(p[E],E<=q);null!=f&&f()}});if(null!=b)for(var y=0;y<b.length;y++){var H=encodeURIComponent(decodeURIComponent(b[y]));
mxUtils.bind(this,function(E,F){if(null!=E&&0<E.length&&null==this.loadedLibraries[E]&&null==this.sidebar.palettes[E]){this.loadedLibraries[E]=!0;c++;var d=mxUtils.bind(this,function(B){p[F]=B;c--;u()}),k=mxUtils.bind(this,function(B){g(E,B);c--;u()}),l=E.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var B=decodeURIComponent(E.substring(1));StorageFile.getFileContent(this,B,mxUtils.bind(this,function(I){".scratchpad"==B&&null==
I&&(I=this.emptyLibraryXml);null!=I?d(new StorageLibrary(this,I,B)):k()}),k)}catch(I){k()}}),0);else if("U"==l){var n=decodeURIComponent(E.substring(1));this.isOffline()?k(!0):this.loadTemplate(n,mxUtils.bind(this,function(B){null!=B&&0<B.length?d(new UrlLibrary(this,B,n)):k()}),function(){k()},null,!0)}else if("R"==l){l=decodeURIComponent(E.substring(1));try{l=JSON.parse(l);var x={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[x.downloadUrl],null,mxUtils.bind(this,function(B){try{d(new RemoteLibrary(this,
-B,x))}catch(I){k()}}),function(){k()})}catch(B){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(E.substring(1)),function(B){d(B)},k)}catch(B){k()}else{var z=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(z=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(z=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(z=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(z=this.dropbox):"W"==l&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(z=this.oneDrive);null!=z?z.getLibrary(decodeURIComponent(E.substring(1)),mxUtils.bind(this,function(B){try{d(B)}catch(I){k()}}),function(B){k()}):k(!0)}}})(G,y)}u()}};
+B,x))}catch(I){k()}}),function(){k()})}catch(B){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(E.substring(1)),function(B){d(B)},k)}catch(B){k()}else{var A=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==l&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(E.substring(1)),mxUtils.bind(this,function(B){try{d(B)}catch(I){k()}}),function(B){k()}):k(!0)}}})(H,y)}u()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(EditorUi.isElectronApp||this.isOffline()||(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
else{this.buttonContainer.style.display="";var b=this.getCurrentFile();null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.buttonContainer&&this.buttonContainer.appendChild(this.notificationBtn);"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(null==this.commentButton&&(this.commentButton=document.createElement("a"),this.setElementTitle(this.commentButton,"comments"),this.commentButton.className="geButton geRoundButton",this.commentButton.style.backgroundImage="url("+Editor.commentImage+
")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var f=document.createElement("div");f.className="geButton";f.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(f);
this.dependsOnLanguage(mxUtils.bind(this,function(){f.innerHTML="";mxUtils.write(f,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
-document.createElement("a");this.userButton.className="geButton geRoundButton";var g=document.createElement("img");this.userButton.appendChild(g);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(y){this.toggleUserPanel();var G=this.userButton.getBoundingClientRect(),E=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=G.bottom+"px";this.userPanel.style.right=E-G.right+"px";mxEvent.consume(y)}));var c=document.createElement("img");c.style.position=
+document.createElement("a");this.userButton.className="geButton geRoundButton";var g=document.createElement("img");this.userButton.appendChild(g);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(y){this.toggleUserPanel();var H=this.userButton.getBoundingClientRect(),E=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=H.bottom+"px";this.userPanel.style.right=E-H.right+"px";mxEvent.consume(y)}));var c=document.createElement("img");c.style.position=
"absolute";c.style.width="10px";this.userButton.appendChild(c);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){g=this.userButton.getElementsByTagName("img")[0];c=this.userButton.getElementsByTagName("img")[1];var p=mxResources.get("changeUser"),q=this.getMainUser();null!=q&&null!=q.displayName&&(p=q.displayName);null!=q&&null!=q.pictureUrl?(g.classList.remove("geAdaptiveAsset"),g.src=q.pictureUrl,c.style.top="3px",c.style.right="0"):(g.classList.add("geAdaptiveAsset"),g.src=
Editor.userImage,c.style.top="6px",c.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){c.style.display="";g=b.getRealtimeError();var u=b.getRealtimeState();p+=" (";1==u?(c.src=Editor.syncImage,p+=mxResources.get("online")):(c.src=Editor.syncProblemImage,p=null!=g&&null!=g.message?p+g.message:p+mxResources.get("disconnected"));p+=")"}else c.style.display="none",c.src=Editor.cloudImage;this.userButton.setAttribute("title",p);this.userButton.style.display="draw.io"!=this.getServiceName()||
null==q||"1"==urlParams.embed||this.isStandaloneApp()||null==b?"none":""}}}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var g=null,c=mxUtils.bind(this,function(p){p=p.filter(function(G){return!G.targets||-1<G.targets.indexOf(b)||null!=f&&-1<G.targets.indexOf(f)});for(var q=b+"NotifReadTS",u=isLocalStorage?parseInt(localStorage.getItem(q)):!0,y=0;y<p.length;y++)p[y].isNew=!u||p[y].timestamp>u;this.showNotification(p,q)});try{isLocalStorage&&(g=JSON.parse(localStorage.getItem(".notifCache")))}catch(p){}null==
+App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var g=null,c=mxUtils.bind(this,function(p){p=p.filter(function(H){return!H.targets||-1<H.targets.indexOf(b)||null!=f&&-1<H.targets.indexOf(f)});for(var q=b+"NotifReadTS",u=isLocalStorage?parseInt(localStorage.getItem(q)):!0,y=0;y<p.length;y++)p[y].isNew=!u||p[y].timestamp>u;this.showNotification(p,q)});try{isLocalStorage&&(g=JSON.parse(localStorage.getItem(".notifCache")))}catch(p){}null==
g||g.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{var q=JSON.parse(p.getText());q.sort(function(u,y){return y.timestamp-u.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:q}));this.fetchingNotif=!1;c(q)}catch(u){}}))):c(g.notifs)}};
App.prototype.showNotification=function(b,f){function g(E){var F=document.querySelector(".geNotification-count");null!=F&&(F.innerHTML=E,F.style.display=0==E?"none":"",F=document.querySelector(".geNotification-bell"),F.style.animation=0==E?"none":"",F.className="geNotification-bell"+(0==E?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==E?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var p=c=0;p<b.length;p++)b[p].isNew&&
c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var q=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var E=this.notificationWin.querySelectorAll(".circle.active"),F=0;F<E.length;F++)E[F].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
"geNotification-box";c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);this.notifCount=c;c=document.createElement("div");c.className="geNotification-bell";p=document.createElement("span");p.className="geBell-top";c.appendChild(p);p=document.createElement("span");p.className="geBell-middle";c.appendChild(p);p=document.createElement("span");p.className="geBell-bottom";c.appendChild(p);p=document.createElement("span");p.className="geBell-rad";c.appendChild(p);
this.notificationBtn.appendChild(c);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);p=document.createElement("div");p.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");p.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";p.appendChild(c);this.notificationWin.appendChild(p);
p=document.createElement("div");p.className="notifications clearfix";var u=document.createElement("div");u.setAttribute("id","geNotifList");u.style.position="relative";p.appendChild(u);this.notificationWin.appendChild(p);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var E=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=
-E.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=E.right-this.notificationWin.clientWidth+"px";g(0)}else q()}));mxEvent.addListener(c,"click",q)}else this.notificationBtn.style.display="";var y=0,G=document.getElementById("geNotifList");if(null!=G){G.innerHTML='<div class="line"></div>';for(p=0;p<b.length;p++)(function(E,F){F.isNew&&y++;var d=document.createElement("div");d.className="notification";E=E.timeSince(new Date(F.timestamp));null==E&&(E=mxResources.get("lessThanAMinute"));
-d.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[E],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(d,"click",function(){window.open(F.link,"notifWin")});G.appendChild(d)})(this,b[p]);g(y)}}};
-App.prototype.save=function(b,f){var g=this.getCurrentFile(),c=!0,p=mxUtils.bind(this,function(){c&&(c=!1,g.handleFileSuccess(!0),null!=f&&f())}),q=mxUtils.bind(this,function(u){if(c){c=!1;Editor.addRetryToError(u,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=u&&null!=u.retry){var y=u.retry;u.retry=function(){c=!0;try{g.isModified()?y():p()}catch(G){q(G)}}}g.handleFileError(u,null==u||"AbortError"!=u.name)}});if(null!=g&&this.spinner.spin(document.body,mxResources.get("saving"),q,3*this.timeout))try{this.clearStatus(),
+E.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=E.right-this.notificationWin.clientWidth+"px";g(0)}else q()}));mxEvent.addListener(c,"click",q)}else this.notificationBtn.style.display="";var y=0,H=document.getElementById("geNotifList");if(null!=H){H.innerHTML='<div class="line"></div>';for(p=0;p<b.length;p++)(function(E,F){F.isNew&&y++;var d=document.createElement("div");d.className="notification";E=E.timeSince(new Date(F.timestamp));null==E&&(E=mxResources.get("lessThanAMinute"));
+d.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[E],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(d,"click",function(){window.open(F.link,"notifWin")});H.appendChild(d)})(this,b[p]);g(y)}}};
+App.prototype.save=function(b,f){var g=this.getCurrentFile(),c=!0,p=mxUtils.bind(this,function(){c&&(c=!1,g.handleFileSuccess(!0),null!=f&&f())}),q=mxUtils.bind(this,function(u){if(c){c=!1;Editor.addRetryToError(u,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=u&&null!=u.retry){var y=u.retry;u.retry=function(){c=!0;try{g.isModified()?y():p()}catch(H){q(H)}}}g.handleFileError(u,null==u||"AbortError"!=u.name)}});if(null!=g&&this.spinner.spin(document.body,mxResources.get("saving"),q,3*this.timeout))try{this.clearStatus(),
this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==g.getTitle()?g.save(!0,p,q):g.saveAs(b,p,q)}catch(u){q(u)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};
-App.prototype.pickFolder=function(b,f,g,c,p,q){g=null!=g?g:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var u=this.spinner.pause();g&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(y){u();if(y.action==google.picker.Action.PICKED){var G=null;null!=y.docs&&0<y.docs.length&&"folder"==y.docs[0].type&&(G=y.docs[0].id);f(q?y:G)}}),p):g&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(y){u();
-if(null!=y&&null!=y.value&&0<y.value.length){var G=OneDriveFile.prototype.getIdOf(y.value[0]);f(q?y:G)}}),c):g&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):g&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):g&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.pickFolder=function(b,f,g,c,p,q){g=null!=g?g:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var u=this.spinner.pause();g&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(y){u();if(y.action==google.picker.Action.PICKED){var H=null;null!=y.docs&&0<y.docs.length&&"folder"==y.docs[0].type&&(H=y.docs[0].id);f(q?y:H)}}),p):g&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(y){u();
+if(null!=y&&null!=y.value&&0<y.value.length){var H=OneDriveFile.prototype.getIdOf(y.value[0]);f(q?y:H)}}),c):g&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):g&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):g&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(y){u();f(y)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
App.prototype.exportFile=function(b,f,g,c,p,q){p==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,c?this.base64ToBlob(b,g):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)})):p==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,q,mxUtils.bind(this,function(u){this.spinner.stop()}),
mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),g,c):p==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,c?this.base64ToBlob(b,g):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!1,q):p==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!0,q,c):p==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!0,q,c):p==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,c?this.base64ToBlob(b,
@@ -14032,9 +14034,9 @@ function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?g():this.co
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f)}f=this.editor.graph;var g=b.isEditable();f.isEnabled()&&!g&&f.reset();f.setEnabled(g);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?(f!=this.getDiagramId()&&(window.location.hash=f),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=
""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
App.prototype.showAuthDialog=function(b,f,g,c){var p=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(q){try{null!=g&&g(q,mxUtils.bind(this,function(){this.hideDialog();p()}))}catch(u){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(u.message))}))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(q){null!=c&&c(q);q&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,f,g,c,p,q,u,y){var G=f;/\.svg$/i.test(G)||(G=G.substring(0,f.lastIndexOf("."))+c);var E=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(E=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);E||(F.responseType="blob");if(y)for(var d in y)F.setRequestHeader(d,y[d]);F.onload=mxUtils.bind(this,function(){if(200<=
-F.status&&299>=F.status){var l=null;E?(l=JSON.parse(F.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(n){p(new LocalFile(this,n,G,!0))}),q,f)}else null!=q&&q({message:mxResources.get("errorLoadingFile")})});F.onerror=q;F.send()}else{var k=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(l);null!=n&&0<n.length&&p(new LocalFile(this,
-n,G,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(l),null!=n?p(new LocalFile(this,n,G,!0)):p(new LocalFile(this,l,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,b)?this.parseFileData(l,mxUtils.bind(this,function(x){4==x.readyState&&(200<=x.status&&299>=x.status?p(new LocalFile(this,x.responseText,G,!0)):null!=q&&q({message:mxResources.get("errorLoadingFile")}))}),f):p(new LocalFile(this,l,G,!0))}catch(x){null!=q&&q(x)}});g=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+App.prototype.convertFile=function(b,f,g,c,p,q,u,y){var H=f;/\.svg$/i.test(H)||(H=H.substring(0,f.lastIndexOf("."))+c);var E=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(E=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);E||(F.responseType="blob");if(y)for(var d in y)F.setRequestHeader(d,y[d]);F.onload=mxUtils.bind(this,function(){if(200<=
+F.status&&299>=F.status){var l=null;E?(l=JSON.parse(F.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(n){p(new LocalFile(this,n,H,!0))}),q,f)}else null!=q&&q({message:mxResources.get("errorLoadingFile")})});F.onerror=q;F.send()}else{var k=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(l);null!=n&&0<n.length&&p(new LocalFile(this,
+n,H,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(l),null!=n?p(new LocalFile(this,n,H,!0)):p(new LocalFile(this,l,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,b)?this.parseFileData(l,mxUtils.bind(this,function(x){4==x.readyState&&(200<=x.status&&299>=x.status?p(new LocalFile(this,x.responseText,H,!0)):null!=q&&q({message:mxResources.get("errorLoadingFile")}))}),f):p(new LocalFile(this,l,H,!0))}catch(x){null!=q&&q(x)}});g=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
/\.pdf$/i.test(f)||null!=g&&"image/"==g.substring(0,6);E?mxUtils.get(b,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus()){if(null!=p){l=JSON.parse(l.getText());var n=l.content;"base64"===l.encoding&&(n=/\.png$/i.test(f)?"data:image/png;base64,"+n:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));k(n)}}else null!=q&&q({code:App.ERROR_UNKNOWN})}),function(){null!=q&&q({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=q&&q({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=u?u(b,k,q,g):this.editor.loadUrl(b,k,q,g,null,null,null,y)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(u){this.appIconClicked(u)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var u=this.getCurrentFile();null!=u&&(u=u.getMode(),u==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
@@ -14051,16 +14053,16 @@ function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",nul
App.prototype.getMainUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());return b};
App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};
App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(u){mxEvent.isConsumed(u)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var f=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
-mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var g=this.drive.getUsersList();if(0<g.length){var c=mxUtils.bind(this,function(u,y){var G=this.getCurrentFile();null!=G&&G.constructor==DriveFile?(this.spinner.spin(document.body,y),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
-function(){this.spinner.stop();u()}),2E3)):u()});b=mxUtils.bind(this,function(u){var y=document.createElement("tr"),G=document.createElement("td");G.setAttribute("valig","middle");G.style.height="59px";G.style.width="66px";var E=document.createElement("img");E.setAttribute("width","50");E.setAttribute("height","50");E.setAttribute("border","0");E.setAttribute("src",null!=u.pictureUrl?u.pictureUrl:Editor.userImage);E.style.borderRadius="50%";E.style.margin="4px 8px 0 8px";G.appendChild(E);y.appendChild(G);
-G=document.createElement("td");G.setAttribute("valign","middle");G.style.whiteSpace="nowrap";G.style.paddingTop="4px";G.style.maxWidth="0";G.style.overflow="hidden";G.style.textOverflow="ellipsis";mxUtils.write(G,u.displayName+(u.isCurrent&&1<g.length?" ("+mxResources.get("default")+")":""));null!=u.email&&(mxUtils.br(G),E=document.createElement("small"),E.style.color="gray",mxUtils.write(E,u.email),G.appendChild(E));E=document.createElement("div");E.style.marginTop="4px";var F=document.createElement("i");
-mxUtils.write(F,mxResources.get("googleDrive"));E.appendChild(F);G.appendChild(E);y.appendChild(G);u.isCurrent?y.setAttribute("title","User ID: "+u.id):(y.setAttribute("title",mxResources.get("login")+" (User ID: "+u.id+")"),y.style.cursor="pointer",y.style.opacity="0.3",mxEvent.addListener(y,"mouseenter",mxUtils.bind(this,function(){y.style.opacity="1"})),mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(){y.style.opacity="0.3"})),mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){this.hideUserPanel();
+mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var g=this.drive.getUsersList();if(0<g.length){var c=mxUtils.bind(this,function(u,y){var H=this.getCurrentFile();null!=H&&H.constructor==DriveFile?(this.spinner.spin(document.body,y),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
+function(){this.spinner.stop();u()}),2E3)):u()});b=mxUtils.bind(this,function(u){var y=document.createElement("tr"),H=document.createElement("td");H.setAttribute("valig","middle");H.style.height="59px";H.style.width="66px";var E=document.createElement("img");E.setAttribute("width","50");E.setAttribute("height","50");E.setAttribute("border","0");E.setAttribute("src",null!=u.pictureUrl?u.pictureUrl:Editor.userImage);E.style.borderRadius="50%";E.style.margin="4px 8px 0 8px";H.appendChild(E);y.appendChild(H);
+H=document.createElement("td");H.setAttribute("valign","middle");H.style.whiteSpace="nowrap";H.style.paddingTop="4px";H.style.maxWidth="0";H.style.overflow="hidden";H.style.textOverflow="ellipsis";mxUtils.write(H,u.displayName+(u.isCurrent&&1<g.length?" ("+mxResources.get("default")+")":""));null!=u.email&&(mxUtils.br(H),E=document.createElement("small"),E.style.color="gray",mxUtils.write(E,u.email),H.appendChild(E));E=document.createElement("div");E.style.marginTop="4px";var F=document.createElement("i");
+mxUtils.write(F,mxResources.get("googleDrive"));E.appendChild(F);H.appendChild(E);y.appendChild(H);u.isCurrent?y.setAttribute("title","User ID: "+u.id):(y.setAttribute("title",mxResources.get("login")+" (User ID: "+u.id+")"),y.style.cursor="pointer",y.style.opacity="0.3",mxEvent.addListener(y,"mouseenter",mxUtils.bind(this,function(){y.style.opacity="1"})),mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(){y.style.opacity="0.3"})),mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){this.hideUserPanel();
c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(u);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(d)})));return y});f=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";for(var q=0;q<g.length;q++)p.appendChild(b(g[q]));
this.userPanel.appendChild(p);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";p=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));
p.className="geBtn";p.style.float="right";b.appendChild(p);p=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var u=this.drive.createAuthWin();u.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(y){this.handleError(y)}),!0,u)}),mxResources.get("closingFile")+"...")}));p.className="geBtn";p.style.margin="0px";
-b.appendChild(p);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(u,y,G,E){if(null!=u){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var F=document.createElement("table");F.style.borderSpacing="0";F.style.fontSize="10pt";F.style.width="100%";F.style.padding="10px";var d=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=y){var n=document.createElement("img");n.setAttribute("width",
+b.appendChild(p);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(u,y,H,E){if(null!=u){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var F=document.createElement("table");F.style.borderSpacing="0";F.style.fontSize="10pt";F.style.width="100%";F.style.padding="10px";var d=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=y){var n=document.createElement("img");n.setAttribute("width",
"40");n.setAttribute("height","40");n.setAttribute("border","0");n.setAttribute("src",y);n.style.marginRight="6px";l.appendChild(n)}k.appendChild(l);l=document.createElement("td");l.setAttribute("valign","middle");l.style.whiteSpace="nowrap";l.style.maxWidth="0";l.style.overflow="hidden";l.style.textOverflow="ellipsis";mxUtils.write(l,u.displayName);null!=u.email&&(mxUtils.br(l),y=document.createElement("small"),y.style.color="gray",mxUtils.write(y,u.email),l.appendChild(y));null!=E&&(u=document.createElement("div"),
-u.style.marginTop="4px",y=document.createElement("i"),mxUtils.write(y,E),u.appendChild(y),l.appendChild(u));k.appendChild(l);d.appendChild(k);F.appendChild(d);this.userPanel.appendChild(F);u=document.createElement("div");u.style.textAlign="center";u.style.padding="10px";u.style.whiteSpace="nowrap";null!=G&&(G=mxUtils.button(mxResources.get("signOut"),G),G.className="geBtn",u.appendChild(G));this.userPanel.appendChild(u)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
+u.style.marginTop="4px",y=document.createElement("i"),mxUtils.write(y,E),u.appendChild(y),l.appendChild(u));k.appendChild(l);d.appendChild(k);F.appendChild(d);this.userPanel.appendChild(F);u=document.createElement("div");u.style.textAlign="center";u.style.padding="10px";u.style.whiteSpace="nowrap";null!=H&&(H=mxUtils.button(mxResources.get("signOut"),H),H.className="geBtn",u.appendChild(H));this.userPanel.appendChild(u)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==DropboxFile){var y=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var u=
this.getCurrentFile();if(null!=u&&u.constructor==OneDriveFile){var y=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==GitHubFile){var y=
mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var u=this.getCurrentFile();if(null!=u&&u.constructor==GitLabFile){var y=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
@@ -14070,185 +14072,185 @@ null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else thi
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(g){return this.editorUi.createHelpIcon(g)};Menus.prototype.addLinkToItem=function(g,c){null!=g&&g.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
Menus.prototype.removeCustomFont=function(g,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==g&&this.customFonts[p].url==c){this.customFonts.splice(p,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(g,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==g&&this.customFonts[p].url==c)return!0;for(p=0;p<this.defaultFonts.length;p++){var q=this.defaultFonts[p];
-if("string"!==typeof q&&q.fontFamily==g&&q.fontUrl==c||"string"===typeof q&&q==g&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(g,c){null==g||this.containsFont(g,c)||(this.customFonts.push({name:g,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function g(v,A,N){c.editor.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
-"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(J,K,m,t,D,M,L,O,P,T,V,X,W){var Y=parseInt(J);!isNaN(Y)&&0<Y&&(c.exportImage(Y/100,K&&"png"==v,m,t,D&&"png"==v,L,!O,P,v,V,null,X,W),null!=N&&N(J,K,m,t,D,M,L,O,P,T,V,X,W))}),!0,A,v,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,K,m,t,D){c.downloadFile(K&&"png"==v?"xmlpng":v,null,null,J,null,null,m,t,D)}),!1,!0)}f.apply(this,arguments);
-var c=this.editorUi,p=c.editor.graph,q=mxUtils.bind(p,p.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline(),A=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(A.container,v?350:620,v?70:460,!0,!0,function(N){null!=c.sidebar&&c.sidebar.hideTooltip();N&&null==c.getCurrentFile()&&c.showSplash()});A.init()});Editor.enableChatGpt&&
+if("string"!==typeof q&&q.fontFamily==g&&q.fontUrl==c||"string"===typeof q&&q==g&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(g,c){null==g||this.containsFont(g,c)||(this.customFonts.push({name:g,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function g(v,z,N){c.editor.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
+"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(J,K,m,t,D,M,L,O,P,U,V,X,W){var Y=parseInt(J);!isNaN(Y)&&0<Y&&(c.exportImage(Y/100,K&&"png"==v,m,t,D&&"png"==v,L,!O,P,v,V,null,X,W),null!=N&&N(J,K,m,t,D,M,L,O,P,U,V,X,W))}),!0,z,v,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,K,m,t,D){c.downloadFile(K&&"png"==v?"xmlpng":v,null,null,J,null,null,m,t,D)}),!1,!0)}f.apply(this,arguments);
+var c=this.editorUi,p=c.editor.graph,q=mxUtils.bind(p,p.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline(),z=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(z.container,v?350:620,v?70:460,!0,!0,function(N){null!=c.sidebar&&c.sidebar.hideTooltip();N&&null==c.getCurrentFile()&&c.showSplash()});z.init()});Editor.enableChatGpt&&
c.isExternalDataComms()&&"draw.io"==c.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(c.actions.put("generate",new Action("generate...",function(){c.openTemplateDialog("")})).isEnabled=q);c.actions.put("insertTemplate",new Action("template...",function(){c.openTemplateDialog()})).isEnabled=q;var u=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isShareCursorPosition()});
u=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isShowRemoteCursors()});u=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});u=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});u.setToggleAction(!0);
u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});u=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});u=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});
-this.put("units",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["points","inches","millimeters","meters"],A);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||c.menus.addMenuItems(v,["-","pageScale"],A)})));u=c.actions.addAction("pageTabs",function(){c.setTabContainerVisible(!c.isTabContainerVisible(),!0)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isTabContainerVisible()});u=c.actions.addAction("ruler",function(){c.setRulerVisible(!c.isRulerVisible())});
+this.put("units",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["points","inches","millimeters","meters"],z);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||c.menus.addMenuItems(v,["-","pageScale"],z)})));u=c.actions.addAction("pageTabs",function(){c.setTabContainerVisible(!c.isTabContainerVisible(),!0)});u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isTabContainerVisible()});u=c.actions.addAction("ruler",function(){c.setRulerVisible(!c.isRulerVisible())});
u.setEnabled(Editor.canvasSupported&&9!=document.documentMode);u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isRulerVisible()});u=c.actions.addAction("fullscreen",function(){if("1"==urlParams.embedInline)c.setInlineFullscreen(!Editor.inlineFullscreen);else{var v=mxUtils.isAncestorNode(document.body,c.container)?c.container:c.editor.graph.container;null!=v&&(null==document.fullscreenElement?(document.body.requestFullscreen(),v.classList.add("geFullscreen")):(document.exitFullscreen(),
v.classList.remove("geFullscreen")))}});u.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;u.setToggleAction(!0);u.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});u=c.actions.put("lightMode",new Action("light",function(v){c.setAndPersistDarkMode(!1)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&!Editor.isDarkMode()});
u=c.actions.put("darkMode",new Action("dark",function(v){c.setAndPersistDarkMode(!0)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&Editor.isDarkMode()});u=c.actions.put("autoMode",new Action("automatic",function(v){c.setAndPersistDarkMode("auto")}));u.setToggleAction(!0);u.setSelectedCallback(function(){return c.isAutoDarkMode(!0)});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){v=new FilePropertiesDialog(c,v);
c.showDialog(v.container,340,200,!0,!0);v.init()})}).isEnabled=q;window.mxFreehand&&(u=c.actions.put("insertFreehand",new Action("freehand...",function(){p.isEnabled()&&(null==c.freehandWindow&&(c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,180,126,!0)),p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing(),c.freehandWindow.window.setVisible(p.freehand.isDrawing()))},null,null,"X")),u.isEnabled=function(){return q()},u.setToggleAction(!0),u.setSelectedCallback(function(){return null!=
-c.freehandWindow&&c.freehandWindow.window.isVisible()}));c.actions.put("exportXml",new Action("formatXml...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=null==c.pages||1>=c.pages.length,N=document.createElement("h3");mxUtils.write(N,mxResources.get("formatXml"));N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(N);var J=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,p.isSelectionEmpty()),K=c.addCheckbox(v,mxResources.get("compressed"),
-Editor.defaultCompressed),m=c.addCheckbox(v,mxResources.get("allPages"),!A,A);m.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?m.setAttribute("disabled","disabled"):m.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!K.checked,null,!J.checked,A||!m.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action("url...",function(){c.showPublishLinkDialog(mxResources.get("url"),
-null,null,null,null,null,null,null,function(v,A,N,J,K,m,t,D,M,L,O,P,T){t=[];J&&M&&t.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,A,T,J,K,m,null,!0,t,null,N,null,P));c.showDialog(v.container,450,270,!0,!0);v.init()},null,!0,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("export"),null,v,function(A,N,J,K,m,t,D,M,L,O,P,T){c.createHtml(A,N,J,K,m,t,D,M,L,O,P,mxUtils.bind(this,function(V,
-X){var W=c.getBaseFilename(D);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";c.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),T)})})}));c.actions.put("exportPdf",new Action("formatPdf...",function(){c.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||
-!c.isOffline()&&!c.printPdfExport?mxUtils.bind(this,function(v,A){v=null!=c.pages?c.pages.length:1;var N=null==c.pages||1>=c.pages.length,J=c.getPageIndex(c.currentPage);J=null!=J?J+1:1;c.downloadFile("pdf",null,null,!A.selection,N||!A.allPages&&A.pagesFrom==J&&A.pagesTo==J,!A.crop,A.transparent,A.scale,null,A.grid,A.includeCopy,A.allPages||A.pagesFrom==J&&A.pagesTo==J?null:{from:Math.max(0,Math.min(v-1,A.pagesFrom-1)),to:Math.max(0,Math.min(v-1,A.pagesTo-1))},A.border,A.fit,A.sheetsAcross,A.sheetsDown,
-A.shadows)}):null,mxResources.get("export"))}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function v(){null!=A&&A.removeDraft();c.fileLoaded(new LocalFile(c,c.emptyDiagramXml))}var A=c.getCurrentFile();null!=A&&A.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==p.getSelectionCount()){var v=p.getSelectionCell(),
-A=p.view.getState(v);null!=A&&null!=A.shape&&null!=A.shape.stencil&&(v=new EditShapeDialog(c,v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(v,A){c.spinner.stop();v=new RevisionDialog(c,v,A);c.showDialog(v.container,640,480,!0,!0);v.init()}),mxUtils.bind(this,function(v){c.handleError(null!=
+c.freehandWindow&&c.freehandWindow.window.isVisible()}));c.actions.put("exportXml",new Action("formatXml...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var z=null==c.pages||1>=c.pages.length,N=document.createElement("h3");mxUtils.write(N,mxResources.get("formatXml"));N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(N);var J=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,p.isSelectionEmpty()),K=c.addCheckbox(v,mxResources.get("compressed"),
+Editor.defaultCompressed),m=c.addCheckbox(v,mxResources.get("allPages"),!z,z);m.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?m.setAttribute("disabled","disabled"):m.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!K.checked,null,!J.checked,z||!m.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action("url...",function(){c.showPublishLinkDialog(mxResources.get("url"),
+null,null,null,null,null,null,null,function(v,z,N,J,K,m,t,D,M,L,O,P,U){t=[];J&&M&&t.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,z,U,J,K,m,null,!0,t,null,N,null,P));c.showDialog(v.container,450,270,!0,!0);v.init()},null,!0,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("export"),null,v,function(z,N,J,K,m,t,D,M,L,O,P,U){c.createHtml(z,N,J,K,m,t,D,M,L,O,P,mxUtils.bind(this,function(V,
+X){var W=c.getBaseFilename(D);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";c.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),U)})})}));c.actions.put("exportPdf",new Action("formatPdf...",function(){c.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||
+!c.isOffline()&&!c.printPdfExport?mxUtils.bind(this,function(v,z){v=null!=c.pages?c.pages.length:1;var N=null==c.pages||1>=c.pages.length,J=c.getPageIndex(c.currentPage);J=null!=J?J+1:1;c.downloadFile("pdf",null,null,!z.selection,N||!z.allPages&&z.pagesFrom==J&&z.pagesTo==J,!z.crop,z.transparent,z.scale,null,z.grid,z.includeCopy,z.allPages||z.pagesFrom==J&&z.pagesTo==J?null:{from:Math.max(0,Math.min(v-1,z.pagesFrom-1)),to:Math.max(0,Math.min(v-1,z.pagesTo-1))},z.border,z.fit,z.sheetsAcross,z.sheetsDown,
+z.shadows)}):null,mxResources.get("export"))}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function v(){null!=z&&z.removeDraft();c.fileLoaded(new LocalFile(c,c.emptyDiagramXml))}var z=c.getCurrentFile();null!=z&&z.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==p.getSelectionCount()){var v=p.getSelectionCell(),
+z=p.view.getState(v);null!=z&&null!=z.shape&&null!=z.shape.stencil&&(v=new EditShapeDialog(c,v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(v,z){c.spinner.stop();v=new RevisionDialog(c,v,z);c.showDialog(v.container,640,480,!0,!0);v.init()}),mxUtils.bind(this,function(v){c.handleError(null!=
v?v:mxResources.get("notAvailable"))})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");u=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");"none"==DrawioFile.SYNC&&(u.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var v=
c.getCurrentFile();null!=v&&(window.drawdata=c.getFileData(),v=null!=v.getTitle()?v.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(v),null,!0))},null,null,null,navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown);"undefined"!==typeof MathJax&&(u=c.actions.addAction("mathematicalTypesetting",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;
v.ignoreImage=!0;v.mathEnabled=!c.isMathEnabled();p.model.execute(v)}),u.setToggleAction(!0),u.setSelectedCallback(function(){return c.isMathEnabled()}),u.isEnabled=q);u=c.actions.put("defaultAdaptiveColors",new Action("defaultAdaptiveColors",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="default";p.model.execute(v)}));u.getTitle=function(){return mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")"};u.setToggleAction(!0);
u.setSelectedCallback(function(){return null==p.adaptiveColors});u=c.actions.put("automaticAdaptiveColors",new Action("automatic",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="auto";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"auto"==p.adaptiveColors});u=c.actions.put("simpleAdaptiveColors",new Action("simple",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="simple";p.model.execute(v)}));
-u.setToggleAction(!0);u.setSelectedCallback(function(){return"simple"==p.adaptiveColors});u=c.actions.put("noAdaptiveColors",new Action("none",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="none";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"none"==p.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors",
-"noAdaptiveColors"],A)})));isLocalStorage&&(u=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var y=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});y.setToggleAction(!0);y.setSelectedCallback(function(){return y.isEnabled()&&
-c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=p.getSelectionCells(),A=[],N=0;N<v.length;N++)p.getModel().isVertex(v[N])&&A.push(v[N]);0<A.length&&(v=new EditGeometryDialog(c,A),c.showDialog(v.container,200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");c.actions.addAction("copyStyle",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var v=p.getSelectionCell(),A=p.getCellStyle(v,!1);c.copiedStyle={};var N=[],J=[],K;for(K in A)N.push(A[K]),
+u.setToggleAction(!0);u.setSelectedCallback(function(){return"simple"==p.adaptiveColors});u=c.actions.put("noAdaptiveColors",new Action("none",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="none";p.model.execute(v)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return"none"==p.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors",
+"noAdaptiveColors"],z)})));isLocalStorage&&(u=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var y=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});y.setToggleAction(!0);y.setSelectedCallback(function(){return y.isEnabled()&&
+c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=p.getSelectionCells(),z=[],N=0;N<v.length;N++)p.getModel().isVertex(v[N])&&z.push(v[N]);0<z.length&&(v=new EditGeometryDialog(c,z),c.showDialog(v.container,200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");c.actions.addAction("copyStyle",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var v=p.getSelectionCell(),z=p.getCellStyle(v,!1);c.copiedStyle={};var N=[],J=[],K;for(K in z)N.push(z[K]),
J.push(K);p.copyCellStyles([v],J,N,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,Editor.altKey+"+C");c.actions.addAction("pasteStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&null!=c.copiedStyle&&p.pasteCellStyles(p.includeDescendants(p.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,Editor.altKey+"+V");c.actions.put("exportSvg",new Action("formatSvg...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",
-mxUtils.bind(this,function(v,A,N,J,K,m,t,D,M,L,O,P,T,V){v=parseInt(v);c.lastExportSvgEditable=K;!isNaN(v)&&0<v&&c.exportSvg(v/100,A,N,J,K,m,t,!D,M,L,P,T,V)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){g("png",c.lastExportPngEditable,function(v,A,N,J,K){c.lastExportPngEditable=K})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){g("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",function(){g("webp")}));u=c.actions.addAction("copyAsImage",
-mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),A=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));c.copyImage(v,A)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();u=c.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),A=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));
-c.copySvg(v,A)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();u=c.actions.put("shadowVisible",new Action("shadow",function(){p.setShadowVisible(!p.shadowVisible)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return p.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(v,A){c.isOwnGDriveDomain()&&mxEvent.isShiftDown(A)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),
+mxUtils.bind(this,function(v,z,N,J,K,m,t,D,M,L,O,P,U,V){v=parseInt(v);c.lastExportSvgEditable=K;!isNaN(v)&&0<v&&c.exportSvg(v/100,z,N,J,K,m,t,!D,M,L,P,U,V)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){g("png",c.lastExportPngEditable,function(v,z,N,J,K){c.lastExportPngEditable=K})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){g("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",function(){g("webp")}));u=c.actions.addAction("copyAsImage",
+mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),z=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));c.copyImage(v,z)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();u=c.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),z=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));
+c.copySvg(v,z)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");u.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();u=c.actions.put("shadowVisible",new Action("shadow",function(){p.setShadowVisible(!p.shadowVisible)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return p.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(v,z){c.isOwnGDriveDomain()&&mxEvent.isShiftDown(z)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),
urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||navigator.standalone?c.openLink("https://app.diagrams.net/shortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});u=c.actions.addAction("tags",mxUtils.bind(this,
function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");u.setToggleAction(!0);
u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(u=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),
-this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),u.setToggleAction(!0),u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));u=c.actions.addAction("findReplace",mxUtils.bind(this,function(v,A){c.showSearchWindow(p.isEnabled()&&(null==A||!mxEvent.isShiftDown(A)))}),
-null,null,Editor.ctrlKey+"+F");u=new Action("exportVsdx",function(){var v=null==c.pages||1>=c.pages.length;if(v)c.exportVisio();else{var A=document.createElement("div");A.style.whiteSpace="nowrap";var N=document.createElement("h3");mxUtils.write(N,mxResources.get("formatVsdx"));N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";A.appendChild(N);var J=c.addCheckbox(A,mxResources.get("allPages"),!v,v);J.style.marginBottom="16px";v=new CustomDialog(c,A,mxUtils.bind(this,
+this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),u.setToggleAction(!0),u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));u=c.actions.addAction("findReplace",mxUtils.bind(this,function(v,z){c.showSearchWindow(p.isEnabled()&&(null==z||!mxEvent.isShiftDown(z)))}),
+null,null,Editor.ctrlKey+"+F");u=new Action("exportVsdx",function(){var v=null==c.pages||1>=c.pages.length;if(v)c.exportVisio();else{var z=document.createElement("div");z.style.whiteSpace="nowrap";var N=document.createElement("h3");mxUtils.write(N,mxResources.get("formatVsdx"));N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(N);var J=c.addCheckbox(z,mxResources.get("allPages"),!v,v);J.style.marginBottom="16px";v=new CustomDialog(c,z,mxUtils.bind(this,
function(){c.exportVisio(!J.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,130,!0,!0)}});u.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};c.actions.put("exportVsdx",u);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="8px";v.checked=mxSettings.getShowStartScreen();v.defaultChecked=v.checked;if(Editor.isSettingsEnabled()&&
-("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var A=document.createElement("span");A.style.display="flex";A.style.alignItems="center";A.style.cssFloat="right";A.style.cursor="pointer";A.style.userSelect="none";A.style.marginTop="-3px";A.appendChild(v);mxUtils.write(A,mxResources.get("showStartScreen"));mxEvent.addListener(A,"click",function(J){mxEvent.getSource(J)!=v&&(v.checked=!v.checked)});header=A}A=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),
-function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var N=c.actions.get("plugins");null==N||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||A.push([mxResources.get("plugins"),N.funct])}EditorUi.isElectronApp||A.push([mxResources.get("link"),function(J,K){if(0<K.value.length)try{var m=
-JSON.parse(K.value),t=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(m)),D=new EmbedDialog(c,t);c.showDialog(D.container,450,240,!0);D.init()}catch(M){c.handleError(M)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&A.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
-function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,A,v.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save())})});
-(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(v,A){var N=mxLanguage;null==urlParams.lang&&isLocalStorage&&(N=mxSettings.settings.language);var J=mxUtils.bind(this,function(m){var t=""==m?mxResources.get("automatic"):mxLanguageMap[m],D=null;""!=t&&(D=v.addItem(t,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(m)}),A),(m==N||""==m&&null==N)&&v.addCheckmark(D,Editor.checkmarkImage));return D});J("");v.addSeparator(A);for(var K in mxLanguageMap)J(K)})));
+("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var z=document.createElement("span");z.style.display="flex";z.style.alignItems="center";z.style.cssFloat="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-3px";z.appendChild(v);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(J){mxEvent.getSource(J)!=v&&(v.checked=!v.checked)});header=z}z=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),
+function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var N=c.actions.get("plugins");null==N||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||z.push([mxResources.get("plugins"),N.funct])}EditorUi.isElectronApp||z.push([mxResources.get("link"),function(J,K){if(0<K.value.length)try{var m=
+JSON.parse(K.value),t=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(m)),D=new EmbedDialog(c,t);c.showDialog(D.container,450,240,!0);D.init()}catch(M){c.handleError(M)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&z.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
+function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,z,v.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save())})});
+(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(v,z){var N=mxLanguage;null==urlParams.lang&&isLocalStorage&&(N=mxSettings.settings.language);var J=mxUtils.bind(this,function(m){var t=""==m?mxResources.get("automatic"):mxLanguageMap[m],D=null;""!=t&&(D=v.addItem(t,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(m)}),z),(m==N||""==m&&null==N)&&v.addCheckmark(D,Editor.checkmarkImage));return D});J("");v.addSeparator(z);for(var K in mxLanguageMap)J(K)})));
c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(v){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));c.adaptiveColorsWindow.window.setVisible(!0)}));
-u=this.get("viewZoom");var G=u.funct;u.funct=mxUtils.bind(this,function(v,A){G.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","outline","fullscreen"],A)});u=this.get("layout");var E=u.funct;u.funct=function(v,A){E.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var N=null,J=20,K=20,m=function(){"undefined"!==typeof mxOrgChartLayout&&null!=N&&c.tryAndHandle(mxUtils.bind(this,function(){var V=c.editor.graph,X=new mxOrgChartLayout(V,
+u=this.get("viewZoom");var H=u.funct;u.funct=mxUtils.bind(this,function(v,z){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","outline","fullscreen"],z)});u=this.get("layout");var E=u.funct;u.funct=function(v,z){E.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var N=null,J=20,K=20,m=function(){"undefined"!==typeof mxOrgChartLayout&&null!=N&&c.tryAndHandle(mxUtils.bind(this,function(){var V=c.editor.graph,X=new mxOrgChartLayout(V,
N,J,K),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(W=V.getSelectionCell());X.execute(W)}))},t=document.createElement("div"),D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("orgChartType")+": ");t.appendChild(D);var M=document.createElement("select");M.style.width="160px";M.style.boxSizing="border-box";D=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<D.length;L++){var O=document.createElement("option");mxUtils.write(O,D[L]);O.value=L;2==L&&O.setAttribute("selected","selected");M.appendChild(O)}mxEvent.addListener(M,"change",function(){N=M.value});t.appendChild(M);D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,
-mxResources.get("parentChildSpacing")+": ");t.appendChild(D);var P=document.createElement("input");P.type="number";P.value=J;P.style.width="160px";P.style.boxSizing="border-box";t.appendChild(P);mxEvent.addListener(P,"change",function(){J=P.value});D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("siblingSpacing")+": ");t.appendChild(D);var T=document.createElement("input");T.type="number";T.value=K;T.style.width=
-"160px";T.style.boxSizing="border-box";t.appendChild(T);mxEvent.addListener(T,"change",function(){K=T.value});D=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(M.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(T.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(V,null,2))});D.className="geBtn";t=new CustomDialog(c,t,function(){null==N&&(N=2);c.loadOrgChartLayouts(m)},null,null,null,D);c.showDialog(t.container,
-355,140,!0,!0)},A,null,q());v.addSeparator(A);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var N=new mxParallelEdgeLayout(p);N.checkOverlap=!0;c.prompt(mxResources.get("spacing"),N.spacing,mxUtils.bind(this,function(J){c.tryAndHandle(mxUtils.bind(this,function(){N.spacing=J;c.executeLayout(function(){N.execute(p.getDefaultParent(),p.isSelectionEmpty()?null:p.getSelectionCells())},!1)}))}))}))}),A);v.addSeparator(A);c.menus.addMenuItem(v,
-"runLayout",A,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,A){if(mxClient.IS_CHROMEAPP||!c.isOffline()&&!navigator.standalone){var N=v.addItem(mxResources.get("search")+":",null,null,A,null,null,!1);N.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.borderWidth="1px";J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(K){var m=mxUtils.trim(J.value);
+mxResources.get("parentChildSpacing")+": ");t.appendChild(D);var P=document.createElement("input");P.type="number";P.value=J;P.style.width="160px";P.style.boxSizing="border-box";t.appendChild(P);mxEvent.addListener(P,"change",function(){J=P.value});D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("siblingSpacing")+": ");t.appendChild(D);var U=document.createElement("input");U.type="number";U.value=K;U.style.width=
+"160px";U.style.boxSizing="border-box";t.appendChild(U);mxEvent.addListener(U,"change",function(){K=U.value});D=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(M.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(U.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(V,null,2))});D.className="geBtn";t=new CustomDialog(c,t,function(){null==N&&(N=2);c.loadOrgChartLayouts(m)},null,null,null,D);c.showDialog(t.container,
+355,140,!0,!0)},z,null,q());v.addSeparator(z);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var N=new mxParallelEdgeLayout(p);N.checkOverlap=!0;c.prompt(mxResources.get("spacing"),N.spacing,mxUtils.bind(this,function(J){c.tryAndHandle(mxUtils.bind(this,function(){N.spacing=J;c.executeLayout(function(){N.execute(p.getDefaultParent(),p.isSelectionEmpty()?null:p.getSelectionCells())},!1)}))}))}))}),z);v.addSeparator(z);c.menus.addMenuItem(v,
+"runLayout",z,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,z){if(mxClient.IS_CHROMEAPP||!c.isOffline()&&!navigator.standalone){var N=v.addItem(mxResources.get("search")+":",null,null,z,null,null,!1);N.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.borderWidth="1px";J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(K){var m=mxUtils.trim(J.value);
13==K.keyCode&&0<m.length?(this.editorUi.searchHelp(m),J.value="",window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==K.keyCode&&(J.value="")}));N.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(K){document.activeElement!=J&&J.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),
-c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action("zoomIn",function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action("zoomOut",function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action("actualSize",function(){c.desktopResetZoom()})),this.addMenuItems(v,"- keyboardShortcuts quickStart website support -".split(" "),A),"1"!=urlParams.disableUpdate&&this.addMenuItems(v,["check4Updates","-"],A),this.addMenuItems(v,
-"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),A)):this.addMenuItems(v,"- keyboardShortcuts quickStart downloadDesktop support - about".split(" "),A)}else this.addMenuItems(v,["keyboardShortcuts","-","about"],A);"1"==urlParams.test&&(v.addSeparator(A),this.addSubmenu("testDevelop",v,A))})));c.actions.addAction("languageCode...",function(){var v=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(A){null!=A&&(Graph.diagramLanguage=
-0<A.length?A:null,Graph.translateDiagram=!0,p.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(v.container,340,80,!0,!0);v.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["languageCode","-"],A);A=v.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;p.refresh()},A);Graph.translateDiagram||v.addCheckmark(A,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
+c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action("zoomIn",function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action("zoomOut",function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action("actualSize",function(){c.desktopResetZoom()})),this.addMenuItems(v,"- keyboardShortcuts quickStart website support -".split(" "),z),"1"!=urlParams.disableUpdate&&this.addMenuItems(v,["check4Updates","-"],z),this.addMenuItems(v,
+"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),z)):this.addMenuItems(v,"- keyboardShortcuts quickStart downloadDesktop support - about".split(" "),z)}else this.addMenuItems(v,["keyboardShortcuts","-","about"],z);"1"==urlParams.test&&(v.addSeparator(z),this.addSubmenu("testDevelop",v,z))})));c.actions.addAction("languageCode...",function(){var v=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(z){null!=z&&(Graph.diagramLanguage=
+0<z.length?z:null,Graph.translateDiagram=!0,p.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(v.container,340,80,!0,!0);v.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["languageCode","-"],z);z=v.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;p.refresh()},z);Graph.translateDiagram||v.addCheckmark(z,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");
-mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var v=p.cloneCells(p.getSelectionCells()),A=p.getBoundingBoxFromGeometry(v,!0);v=p.moveCells(v,-A.x,-A.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+A.width+", "+A.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(p.encodeCells(v)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function v(t){return null==
-t||null==t.boundingBox||!isNaN(t.boundingBox.x)&&!isNaN(t.boundingBox.y)&&!isNaN(t.boundingBox.width)&&!isNaN(t.boundingBox.height)}var A=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),N=p.view.translate,J=p.view.scale;p.insertVertex(p.getDefaultParent(),null,"",A.x/J-N.x,A.y/J-N.y,A.width/J,A.height/J,"fillColor=none;strokeColor=red;");var K=0,m=0;p.view.states.visit(function(t,D){t=!0;v(D.shape)||(console.log("invalid shape",D.cell.id,D.shape),t=!1);v(D.text)||(console.log("invalid text",
-D.cell.id,D.text),t=!1);t||K++;m++});console.log("states checked",m,"invalid",K)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var v=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";v=new TextareaDialog(c,"Paste Data:",v,function(A){if(0<A.length)try{var N=function(D){function M(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=P[aa]){for(;0<P[aa].length;){var fa=P[aa].pop();M(fa)}delete P[aa]}}else mxLog.debug(L+": Visited: "+aa)}var L=D.parentNode.id,
-O=D.childNodes;D={};for(var P={},T=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==D[W.id]){D[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=T?mxLog.debug(L+": Multiple roots: "+W.id):T=W.id:(null==P[Y]&&(P[Y]=[]),P[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=L+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(L+": Checked");var Z={};null==T?mxLog.debug(L+": No root"):(M(T),Object.keys(Z).length!=Object.keys(D).length&&
-(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",P)))};"<"!=A.charAt(0)&&(A=Graph.decompress(A),mxLog.debug("See console for uncompressed XML"),console.log("xml",A));var J=mxUtils.parseXml(A),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var m=c.getHashValueForPages(K);mxLog.debug("Checksum: ",m)}catch(D){mxLog.debug("Error: ",D.message)}else mxLog.debug("No pages found for checksum");var t=J.getElementsByTagName("root");for(A=0;A<t.length;A++)N(t[A]);
-mxLog.show()}catch(D){c.handleError(D),null!=window.console&&console.error(D)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var F=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(A){var N=c.getCurrentFile();if(0<A.length&&null!=N)try{var J=JSON.parse(A);N.patch([J],null,!0,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(A,N){F=c.getPagesForXml(c.getFileData(!0));
-v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(F)}],["Diff",function(A,N){try{v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==F?(F=c.getPagesForXml(c.getFileData(!0)),v.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(F)):v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));
-c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=c.pages&&null!=v?c.spinner.spin(document.body,mxResources.get("loading"))&&v.getLatestVersion(function(A){c.spinner.stop();var N=c.getHashValueForPages(c.pages),J=v.getCurrentRevisionId(),K=c.getHashValueForPages(A.getShadowPages()),m=A.getDescriptorChecksum(A.getDescriptor()),t=A.getCurrentRevisionId();console.log("Local File",[v],"modified",v.isModified(),"checksum",N);console.log("Remote File",[A],"rev",
-t==J,"desc",m==K,"checksum",K);c.alert("Checksums "+(K==N?"match":"no not match"))},function(A){console.log("Error getLatestVersion",A);c.handleError(A)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var v=c.getCurrentFile();console.log("editorUi",c,"file",v);if(null!=v&&v.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(v.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(v.theirPages));console.log("diff ownPages/theirPages",
-c.diffPages(v.ownPages,v.theirPages));var A=v.getShadowPages();null!=A&&(console.log("Checksum shadowPages",c.getHashValueForPages(A)),console.log("diff shadowPages/ownPages",c.diffPages(A,v.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(v.ownPages,A)),console.log("diff theirPages/shadowPages",c.diffPages(v.theirPages,A)));null!=v.sync&&null!=v.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(v.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(v.ownPages,
+mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var v=p.cloneCells(p.getSelectionCells()),z=p.getBoundingBoxFromGeometry(v,!0);v=p.moveCells(v,-z.x,-z.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+z.width+", "+z.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(p.encodeCells(v)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function v(t){return null==
+t||null==t.boundingBox||!isNaN(t.boundingBox.x)&&!isNaN(t.boundingBox.y)&&!isNaN(t.boundingBox.width)&&!isNaN(t.boundingBox.height)}var z=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),N=p.view.translate,J=p.view.scale;p.insertVertex(p.getDefaultParent(),null,"",z.x/J-N.x,z.y/J-N.y,z.width/J,z.height/J,"fillColor=none;strokeColor=red;");var K=0,m=0;p.view.states.visit(function(t,D){t=!0;v(D.shape)||(console.log("invalid shape",D.cell.id,D.shape),t=!1);v(D.text)||(console.log("invalid text",
+D.cell.id,D.text),t=!1);t||K++;m++});console.log("states checked",m,"invalid",K)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var v=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";v=new TextareaDialog(c,"Paste Data:",v,function(z){if(0<z.length)try{var N=function(D){function M(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=P[aa]){for(;0<P[aa].length;){var fa=P[aa].pop();M(fa)}delete P[aa]}}else mxLog.debug(L+": Visited: "+aa)}var L=D.parentNode.id,
+O=D.childNodes;D={};for(var P={},U=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==D[W.id]){D[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=U?mxLog.debug(L+": Multiple roots: "+W.id):U=W.id:(null==P[Y]&&(P[Y]=[]),P[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=L+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(L+": Checked");var Z={};null==U?mxLog.debug(L+": No root"):(M(U),Object.keys(Z).length!=Object.keys(D).length&&
+(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",P)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var J=mxUtils.parseXml(z),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var m=c.getHashValueForPages(K);mxLog.debug("Checksum: ",m)}catch(D){mxLog.debug("Error: ",D.message)}else mxLog.debug("No pages found for checksum");var t=J.getElementsByTagName("root");for(z=0;z<t.length;z++)N(t[z]);
+mxLog.show()}catch(D){c.handleError(D),null!=window.console&&console.error(D)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var F=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(z){var N=c.getCurrentFile();if(0<z.length&&null!=N)try{var J=JSON.parse(z);N.patch([J],null,!0,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(z,N){F=c.getPagesForXml(c.getFileData(!0));
+v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(F)}],["Diff",function(z,N){try{v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==F?(F=c.getPagesForXml(c.getFileData(!0)),v.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(F)):v.textarea.value=JSON.stringify(c.diffPages(F,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));
+c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=c.pages&&null!=v?c.spinner.spin(document.body,mxResources.get("loading"))&&v.getLatestVersion(function(z){c.spinner.stop();var N=c.getHashValueForPages(c.pages),J=v.getCurrentRevisionId(),K=c.getHashValueForPages(z.getShadowPages()),m=z.getDescriptorChecksum(z.getDescriptor()),t=z.getCurrentRevisionId();console.log("Local File",[v],"modified",v.isModified(),"checksum",N);console.log("Remote File",[z],"rev",
+t==J,"desc",m==K,"checksum",K);c.alert("Checksums "+(K==N?"match":"no not match"))},function(z){console.log("Error getLatestVersion",z);c.handleError(z)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var v=c.getCurrentFile();console.log("editorUi",c,"file",v);if(null!=v&&v.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(v.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(v.theirPages));console.log("diff ownPages/theirPages",
+c.diffPages(v.ownPages,v.theirPages));var z=v.getShadowPages();null!=z&&(console.log("Checksum shadowPages",c.getHashValueForPages(z)),console.log("diff shadowPages/ownPages",c.diffPages(z,v.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(v.ownPages,z)),console.log("diff theirPages/shadowPages",c.diffPages(v.theirPages,z)));null!=v.sync&&null!=v.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(v.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(v.ownPages,
v.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(v.theirPages,v.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(v.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(v.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(v.theirPages,c.pages)))}null!=v&&console.log("Shadow pages",[c.getXmlForPages(v.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));
c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var v=c.getCurrentFile();null!=v&&v.isRealtime()&&null!=v.shadowPages&&(console.log("patching actualPages to shadowPages",v.patch([c.diffPages(v.shadowPages,c.pages)])),v.ownPages=c.clonePages(c.pages),v.theirPages=c.clonePages(c.pages),v.shadowPages=c.clonePages(c.pages),null!=v.sync&&(v.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){p.model.beginUpdate();
-try{var v=p.model.cells,A=0,N=[],J=[],K;for(K in v){var m=v[K],t=p.getCurrentCellStyle(m)[mxConstants.STYLE_IMAGE];null!=t&&"data:"==t.substring(0,5)&&(null==N[t]&&(N[t]=(N[t]||0)+1,A++),J.push(m))}p.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",A,"image(s) from",J.length,"cell(s): ",[J,N])}finally{p.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,p.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var v=
-new mxImageExport,A=p.getGraphBounds(),N=p.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-A.x)/N),Math.floor((1-A.y)/N));J.scale(1/N);var m=0,t=J.save;J.save=function(){m++;t.apply(this,arguments)};var D=J.restore;J.restore=function(){m--;D.apply(this,arguments)};var M=v.drawShape;v.drawShape=function(L){mxLog.debug("entering shape",L,m);M.apply(this,arguments);mxLog.debug("leaving shape",L,m)};v.drawState(p.getView().getState(p.model.root),
-J);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",m)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var d=null,k=null,l=null,n=null,x=null,z=null,B=null,I=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(p.view.revalidate=d,d=null):(d=p.view.revalidate,p.view.revalidate=function(){var v=Date.now(),A=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
-[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=k?(c.selectPage=k,k=null):(k=c.selectPage,c.selectPage=function(){var v=Date.now(),A=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=l?(c.diffPages=l,l=null):(l=c.diffPages,c.diffPages=function(){var v=Date.now(),A=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-v+" ms","args",arguments);
-return A});null!=n?(c.patchPages=n,n=null):(n=c.patchPages,c.patchPages=function(){var v=Date.now(),A=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=x?(c.clonePages=x,x=null):(x=c.clonePages,c.clonePages=function(){var v=Date.now(),A=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=B?(c.getHashValueForPages=B,
-B=null):(B=c.getHashValueForPages,c.getHashValueForPages=function(){var v=Date.now(),A=B.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=I?(c.resolveCrossReferences=I,I=null):(I=c.resolveCrossReferences,c.resolveCrossReferences=function(){var v=Date.now(),A=I.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-v+" ms","args",arguments);return A});
-null!=z?(c.getFileData=z,z=null):(z=c.getFileData,c.getFileData=function(){var v=Date.now(),A=z.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-v+" ms","args",arguments);return A});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),
-A);var N=v.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},A);null!=d&&v.addCheckmark(N,Editor.checkmarkImage);this.addMenuItems(v,["-","testShowConsole"],A)})))}c.actions.put("shapes",new Action("moreShapes...",function(v){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?
+try{var v=p.model.cells,z=0,N=[],J=[],K;for(K in v){var m=v[K],t=p.getCurrentCellStyle(m)[mxConstants.STYLE_IMAGE];null!=t&&"data:"==t.substring(0,5)&&(null==N[t]&&(N[t]=(N[t]||0)+1,z++),J.push(m))}p.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",z,"image(s) from",J.length,"cell(s): ",[J,N])}finally{p.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,p.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var v=
+new mxImageExport,z=p.getGraphBounds(),N=p.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-z.x)/N),Math.floor((1-z.y)/N));J.scale(1/N);var m=0,t=J.save;J.save=function(){m++;t.apply(this,arguments)};var D=J.restore;J.restore=function(){m--;D.apply(this,arguments)};var M=v.drawShape;v.drawShape=function(L){mxLog.debug("entering shape",L,m);M.apply(this,arguments);mxLog.debug("leaving shape",L,m)};v.drawState(p.getView().getState(p.model.root),
+J);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",m)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var d=null,k=null,l=null,n=null,x=null,A=null,B=null,I=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(p.view.revalidate=d,d=null):(d=p.view.revalidate,p.view.revalidate=function(){var v=Date.now(),z=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
+[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=k?(c.selectPage=k,k=null):(k=c.selectPage,c.selectPage=function(){var v=Date.now(),z=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=l?(c.diffPages=l,l=null):(l=c.diffPages,c.diffPages=function(){var v=Date.now(),z=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-v+" ms","args",arguments);
+return z});null!=n?(c.patchPages=n,n=null):(n=c.patchPages,c.patchPages=function(){var v=Date.now(),z=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=x?(c.clonePages=x,x=null):(x=c.clonePages,c.clonePages=function(){var v=Date.now(),z=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=B?(c.getHashValueForPages=B,
+B=null):(B=c.getHashValueForPages,c.getHashValueForPages=function(){var v=Date.now(),z=B.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-v+" ms","args",arguments);return z});null!=I?(c.resolveCrossReferences=I,I=null):(I=c.resolveCrossReferences,c.resolveCrossReferences=function(){var v=Date.now(),z=I.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-v+" ms","args",arguments);return z});
+null!=A?(c.getFileData=A,A=null):(A=c.getFileData,c.getFileData=function(){var v=Date.now(),z=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-v+" ms","args",arguments);return z});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),
+z);var N=v.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},z);null!=d&&v.addCheckmark(N,Editor.checkmarkImage);this.addMenuItems(v,["-","testShowConsole"],z)})))}c.actions.put("shapes",new Action("moreShapes...",function(v){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?
300:280:260,!0,!0)}));c.actions.put("createShape",new Action("shape...",function(v){p.isEnabled()&&(v=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),v.vertex=!0,v=new EditShapeDialog(c,v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())})).isEnabled=q;c.isOffline()||("1"!=urlParams.embed&&(c.actions.put("embedNotion",new Action("notion...",function(){var v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";
-v.style.textAlign="center";v.style.width="100%";v.style.left="0px";var A=document.createElement("a");A.setAttribute("href","javascript:void(0);");A.setAttribute("target","_blank");A.style.cursor="pointer";mxUtils.write(A,mxResources.get("getNotionChromeExtension"));v.appendChild(A);mxUtils.setPrefixedStyle(A.style,"transition","all 1s ease");mxUtils.setOpacity(A,0);window.setTimeout(function(){mxUtils.setOpacity(A,100)},300);mxEvent.addListener(A,"click",function(N){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(N)});c.getPublicUrl(c.getCurrentFile(),function(N){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",v,N,c.getCurrentFile(),function(J,K,m,t,D,M,L,O,P,T,V,X){L=["border=0"];P&&L.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,K,!0,t,D,M,"public"==T?N:null,null,L,null,m,null,X));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})})),c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")})),
-c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",v,function(A,N,J,K,m,t,D,M,L,O,P,T){c.createHtml(A,N,J,K,m,t,D,M,L,O,P,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
+v.style.textAlign="center";v.style.width="100%";v.style.left="0px";var z=document.createElement("a");z.setAttribute("href","javascript:void(0);");z.setAttribute("target","_blank");z.style.cursor="pointer";mxUtils.write(z,mxResources.get("getNotionChromeExtension"));v.appendChild(z);mxUtils.setPrefixedStyle(z.style,"transition","all 1s ease");mxUtils.setOpacity(z,0);window.setTimeout(function(){mxUtils.setOpacity(z,100)},300);mxEvent.addListener(z,"click",function(N){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(N)});c.getPublicUrl(c.getCurrentFile(),function(N){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",v,N,c.getCurrentFile(),function(J,K,m,t,D,M,L,O,P,U,V,X){L=["border=0"];P&&L.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,K,!0,t,D,M,"public"==U?N:null,null,L,null,m,null,X));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})})),c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")})),
+c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",v,function(z,N,J,K,m,t,D,M,L,O,P,U){c.createHtml(z,N,J,K,m,t,D,M,L,O,P,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var fa=Y.document.createElement("div");fa.marginLeft="26px";fa.marginTop="26px";mxUtils.write(fa,mxResources.get("updatingDocument"));var ea=Y.document.createElement("img");
ea.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ea.style.marginLeft="6px";fa.appendChild(ea);Y.document.body.insertBefore(fa,Y.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(ca);fa.parentNode.removeChild(fa)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ca){c.handleError(ca)}});
-c.showDialog(W.container,450,240,!0,!0);W.init()}),T)})})})),c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.getPublicUrl(v,function(A){null!=A?(A=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?A:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(A.container,450,240,!0,!0),A.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})})),c.actions.put("embedImage",new Action("image...",function(){c.showEmbedImageDialog(function(v,
-A,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,A,N,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("image"),mxResources.get("retina"),c.editor.isExportToCanvas())})),c.actions.put("embedSvg",new Action("formatSvg...",function(){c.showEmbedImageDialog(function(v,A,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,
-A,N,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),c.actions.put("embedIframe",new Action("iframe...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){var A=p.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,A.height/p.view.scale))+
-2,null,null,null,v,c.getCurrentFile(),function(N,J,K,m,t,D,M,L,O,P,T,V){var X=[];O&&X.push("tags=%7B%7D");N=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+M+";height:"+L+';" src="'+c.createLink(N,J,!0,m,t,D,"public"==P?v:null,null,X,null,K,T,V)+'"'+(T?' allowtransparency="true"':"")+"></iframe>");c.showDialog(N.container,450,240,!0,!0);N.init()},!0,!0)})})));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showPublishLinkDialog(null,
-null,null,null,null,null,v,c.getCurrentFile(),function(A,N,J,K,m,t,D,M,L,O,P,T){D=[];K&&L&&D.push("tags=%7B%7D");A=new EmbedDialog(c,c.createLink(A,N,!0,K,m,t,"public"==O?v:null,null,D,null,J,null,T));c.showDialog(A.container,450,240,!0,!0);A.init()},null,!0)})},null,null,null,!c.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)u=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&
+c.showDialog(W.container,450,240,!0,!0);W.init()}),U)})})})),c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.getPublicUrl(v,function(z){null!=z?(z=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?z:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(z.container,450,240,!0,!0),z.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})})),c.actions.put("embedImage",new Action("image...",function(){c.showEmbedImageDialog(function(v,
+z,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,z,N,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("image"),mxResources.get("retina"),c.editor.isExportToCanvas())})),c.actions.put("embedSvg",new Action("formatSvg...",function(){c.showEmbedImageDialog(function(v,z,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,
+z,N,J,K,m,function(t){c.spinner.stop();t=new EmbedDialog(c,t);c.showDialog(t.container,450,240,!0,!0);t.init()},function(t){c.spinner.stop();c.handleError(t)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),c.actions.put("embedIframe",new Action("iframe...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){var z=p.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,z.height/p.view.scale))+
+2,null,null,null,v,c.getCurrentFile(),function(N,J,K,m,t,D,M,L,O,P,U,V){var X=[];O&&X.push("tags=%7B%7D");N=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+M+";height:"+L+';" src="'+c.createLink(N,J,!0,m,t,D,"public"==P?v:null,null,X,null,K,U,V)+'"'+(U?' allowtransparency="true"':"")+"></iframe>");c.showDialog(N.container,450,240,!0,!0);N.init()},!0,!0)})})));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showPublishLinkDialog(null,
+null,null,null,null,null,v,c.getCurrentFile(),function(z,N,J,K,m,t,D,M,L,O,P,U){D=[];K&&L&&D.push("tags=%7B%7D");z=new EmbedDialog(c,c.createLink(z,N,!0,K,m,t,"public"==O?v:null,null,D,null,J,null,U));c.showDialog(z.container,450,240,!0,!0);z.init()},null,!0)})},null,null,null,!c.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)u=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),u.setToggleAction(!0),u.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&
c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(u=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),u.setToggleAction(!0),u.setSelectedCallback(function(){return c.isHighContrast()}));u=c.actions.addAction("search",function(){if(null!=c.sidebar){var v=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",
!v);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!v,mxSettings.save())}});u.label=mxResources.get("searchShapes");u.setToggleAction(!0);u.setSelectedCallback(function(){return null!=c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(v){p.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(v){p.isEditing()&&p.stopEditing();
-var A="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var N=c.createLoadMessage("save");N.xml=A;!0!==v||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(N.exit=!0);A=JSON.stringify(N)}(window.opener||window.parent).postMessage(A,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.clearStatus());v=c.getCurrentFile();null==v||v.constructor==EmbedFile||v.constructor==LocalFile&&
-null==v.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var v=function(){c.editor.modified=!1;var A="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
-"";(window.opener||window.parent).postMessage(A,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,A){c.editor.isExportToCanvas()?(this.addMenuItems(v,["exportPng"],A),Editor.jpgSupported&&this.addMenuItems(v,["exportJpg"],A),Editor.webpSupported&&this.addMenuItems(v,["exportWebp"],A)):c.isOffline()||
-mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],A);this.addMenuItems(v,["exportSvg","-"],A);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],A):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],A);!c.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],A);this.addMenuItems(v,["-","exportHtml","exportXml","exportUrl"],A);c.isOffline()||(v.addSeparator(A),
-this.addMenuItem(v,"export",A).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||c.isOffline()||this.addMenuItems(v,["publishLink"],A);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||c.isOffline()||(v.addSeparator(A),c.menus.addSubmenu("embed",v,A))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,A){function N(m){m.pickFile(function(t){c.spinner.spin(document.body,
+var z="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var N=c.createLoadMessage("save");N.xml=z;!0!==v||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(N.exit=!0);z=JSON.stringify(N)}(window.opener||window.parent).postMessage(z,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.clearStatus());v=c.getCurrentFile();null==v||v.constructor==EmbedFile||v.constructor==LocalFile&&
+null==v.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var v=function(){c.editor.modified=!1;var z="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
+"";(window.opener||window.parent).postMessage(z,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,z){c.editor.isExportToCanvas()?(this.addMenuItems(v,["exportPng"],z),Editor.jpgSupported&&this.addMenuItems(v,["exportJpg"],z),Editor.webpSupported&&this.addMenuItems(v,["exportWebp"],z)):c.isOffline()||
+mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],z);this.addMenuItems(v,["exportSvg","-"],z);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],z):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],z);!c.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],z);this.addMenuItems(v,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(v.addSeparator(z),
+this.addMenuItem(v,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||c.isOffline()||this.addMenuItems(v,["publishLink"],z);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||c.isOffline()||(v.addSeparator(z),c.menus.addSubmenu("embed",v,z))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,z){function N(m){m.pickFile(function(t){c.spinner.spin(document.body,
mxResources.get("loading"))&&m.getFile(t,function(D){var M="data:image/"==D.getData().substring(0,11)?K(D.getTitle()):"text/xml";/\.svg$/i.test(D.getTitle())&&!c.editor.isDataSvg(D.getData())&&(D.setData(Editor.createSvgDataUri(D.getData())),M="image/svg+xml");J(D.getData(),M,D.getTitle())},function(D){c.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)},m==c.drive)},!0)}var J=mxUtils.bind(this,function(m,t,D){var M=p.view,L=p.getGraphBounds(),O=p.snap(Math.ceil(Math.max(0,L.x/M.scale-
-M.translate.x)+4*p.gridSize)),P=p.snap(Math.ceil(Math.max(0,(L.y+L.height)/M.scale-M.translate.y)+4*p.gridSize));"data:image/"==m.substring(0,11)?c.loadImage(m,mxUtils.bind(this,function(T){var V=!0,X=mxUtils.bind(this,function(){c.resizeImage(T,m,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(c.maxImageSize/Y,c.maxImageSize/Z)):1;c.importFile(m,t,O,P,Math.round(Y*W),Math.round(Z*W),D,function(aa){c.spinner.stop();p.setSelectionCells(aa);p.scrollCellToVisible(p.getSelectionCell())})}),
-V)});m.length>c.resampleThreshold?c.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(m,t,O,P,0,0,D,function(T){c.spinner.stop();p.setSelectionCells(T);p.scrollCellToVisible(p.getSelectionCell())})}),K=mxUtils.bind(this,function(m){var t="text/xml";/\.png$/i.test(m)?t="image/png":/\.jpe?g$/i.test(m)?t="image/jpg":/\.gif$/i.test(m)?t="image/gif":/\.pdf$/i.test(m)&&(t="application/pdf");return t});"undefined"!=
-typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){N(c.drive)},A):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){N(c.oneDrive)},A):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},A,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){N(c.dropbox)},A):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){N(c.gitHub)},A);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){N(c.gitLab)},
-A);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){N(c.trello)},A):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},A);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},A);c.isOffline()||
-(v.addSeparator(A),v.addItem(mxResources.get("url")+"...",null,function(){var m=new FilenameDialog(c,"",mxResources.get("import"),function(t){if(null!=t&&0<t.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var D=/(\.png)($|\?)/i.test(t)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(t),function(M){J(M,D,t)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==D)}},mxResources.get("url"));c.showDialog(m.container,
-300,80,!0,!0);m.init()},A))}))).isEnabled=q;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(v,A){var N=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>N&&this.addSubmenu("viewZoom",v,A,mxResources.get("zoom")),460>N&&c.isPageMenuVisible()&&this.addSubmenu("pages",v,A),320>N&&this.addSubmenu("insert",v,A),360>N&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",v,A))})));this.put("appearance",
-new Menu(mxUtils.bind(this,function(v,A){if(c.isAutoDarkModeSupported()){var N=c.menus.addMenuItem(v,"autoMode",A);null!=N&&N.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(v,["lightMode","darkMode","-"],A);N=c.menus.addMenuItem(v,"highContrast",A);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(N,"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",
-function(v){p.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(v)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(v,A){var N="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=v.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},A),K=v.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme("kennedy")},
-A),m=!1;if("kennedy"==N||"dark"==N)v.addCheckmark(K,Editor.checkmarkImage),m=!0;for(var t=0;t<Editor.themes.length;t++)mxUtils.bind(this,function(D){K=v.addItem(mxResources.get("min"==D?"minimal":D),null,function(){c.setCurrentTheme(D)},A);N==D&&(v.addCheckmark(K,Editor.checkmarkImage),m=!0);"simple"==D&&v.addSeparator(A)})(Editor.themes[t]);m||v.addCheckmark(J,Editor.checkmarkImage)})));u=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();
-if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(N,J){v.invalidFileHandle=null;v.fileHandle=N;v.title=J.name;v.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var A=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename;A=new FilenameDialog(this.editorUi,A,mxResources.get("rename"),mxUtils.bind(this,function(N){null!=N&&0<N.length&&null!=v&&N!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
-v.rename(N,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(N){if(null!=N&&0<N.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(A.container,
-340,100,!0,!0);A.init()}}));u.isEnabled=function(){return this.enabled&&q.apply(this,arguments)};u.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var A=c.getCopyFilename(v);v.constructor==DriveFile?(A=new SaveDialog(c,A,mxUtils.bind(this,function(N,J,K){c.hideDialog();v.copyFile(mxUtils.bind(this,function(m){v.move(K,mxUtils.bind(this,function(t){c.spinner.stop()}),mxUtils.bind(this,function(t){c.handleError(t)}))}),
-mxUtils.bind(this,function(m){c.handleError(m)}),N.value)}),null,null,null,null,null,null,[App.MODE_GOOGLE],mxResources.get("ok")),c.showDialog(A.container,420,150,!0,!1,mxUtils.bind(this,function(){c.hideDialog()})),A.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),A)}}));u=new Action("openFolder",function(v,A){v=c.getCurrentFile();null!=v&&c.openLink(v.getFolderUrl())});u.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};c.actions.put("openFolder",
-u);c.actions.addAction("openFile...",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=v&&c.openLink(v.getFileUrl())}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var A=new SaveDialog(c,"",mxUtils.bind(this,function(N,J,K){c.hideDialog();c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(K,mxUtils.bind(this,function(m){c.spinner.stop()}),mxUtils.bind(this,function(m){c.handleError(m)}))}),
-null,null,null,null,null,v.getMode());c.showDialog(A.container,420,70,!0,!1,mxUtils.bind(this,function(){c.hideDialog()}));A.init()}}));this.put("publish",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["publishLink","presentationMode"],A)})));EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||c.actions.put("presentationMode",new Action("presentationMode...",function(){var v=null!=c.getCurrentFile()?c.getCurrentFile().getTitle():null;
-c.editor.editAsNew(c.getFileData(!0),v,!0,null!=c.currentPage?c.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(A){c.handleError(A)}})).isEnabled=q;this.put("embed",new Menu(mxUtils.bind(this,function(v,A){var N=c.getCurrentFile();null==N||N.getMode()!=App.MODE_GOOGLE&&N.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(N.getTitle())||this.addMenuItems(v,["liveImage","-"],A);this.addMenuItems(v,
-["embedImage","embedSvg","-","embedHtml"],A);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],A);this.addMenuItems(v,["-","microsoftOffice","-","embedNotion"],A)})));u=function(v){var A=mxResources.get(v)+"...";c.actions.put(v,new Action(A,function(N){if("fromText"==v||"formatSql"==v||"plantUml"==v||"mermaid"==v){var J=new ParseDialog(c,A,v);c.showDialog(J.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else J=new CreateGraphDialog(c,A,v),c.showDialog(J.container,
+M.translate.x)+4*p.gridSize)),P=p.snap(Math.ceil(Math.max(0,(L.y+L.height)/M.scale-M.translate.y)+4*p.gridSize));"data:image/"==m.substring(0,11)?c.loadImage(m,mxUtils.bind(this,function(U){var V=!0,X=mxUtils.bind(this,function(){c.resizeImage(U,m,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(c.maxImageSize/Y,c.maxImageSize/Z)):1;c.importFile(m,t,O,P,Math.round(Y*W),Math.round(Z*W),D,function(aa){c.spinner.stop();p.setSelectionCells(aa);p.scrollCellToVisible(p.getSelectionCell())})}),
+V)});m.length>c.resampleThreshold?c.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(m,t,O,P,0,0,D,function(U){c.spinner.stop();p.setSelectionCells(U);p.scrollCellToVisible(p.getSelectionCell())})}),K=mxUtils.bind(this,function(m){var t="text/xml";/\.png$/i.test(m)?t="image/png":/\.jpe?g$/i.test(m)?t="image/jpg":/\.gif$/i.test(m)?t="image/gif":/\.pdf$/i.test(m)&&(t="application/pdf");return t});"undefined"!=
+typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){N(c.drive)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){N(c.oneDrive)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){N(c.dropbox)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){N(c.gitHub)},z);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){N(c.gitLab)},
+z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){N(c.trello)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},z);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},z);c.isOffline()||
+(v.addSeparator(z),v.addItem(mxResources.get("url")+"...",null,function(){var m=new FilenameDialog(c,"",mxResources.get("import"),function(t){if(null!=t&&0<t.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var D=/(\.png)($|\?)/i.test(t)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(t),function(M){J(M,D,t)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==D)}},mxResources.get("url"));c.showDialog(m.container,
+300,80,!0,!0);m.init()},z))}))).isEnabled=q;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(v,z){var N=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>N&&this.addSubmenu("viewZoom",v,z,mxResources.get("zoom")),460>N&&c.isPageMenuVisible()&&this.addSubmenu("pages",v,z),320>N&&this.addSubmenu("insert",v,z),360>N&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",v,z))})));this.put("appearance",
+new Menu(mxUtils.bind(this,function(v,z){if(c.isAutoDarkModeSupported()){var N=c.menus.addMenuItem(v,"autoMode",z);null!=N&&N.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(v,["lightMode","darkMode","-"],z);N=c.menus.addMenuItem(v,"highContrast",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(N,"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",
+function(v){p.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(v)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(v,z){var N="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=v.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},z),K=v.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme("kennedy")},
+z),m=!1;if("kennedy"==N||"dark"==N)v.addCheckmark(K,Editor.checkmarkImage),m=!0;for(var t=0;t<Editor.themes.length;t++)mxUtils.bind(this,function(D){K=v.addItem(mxResources.get("min"==D?"minimal":D),null,function(){c.setCurrentTheme(D)},z);N==D&&(v.addCheckmark(K,Editor.checkmarkImage),m=!0);"simple"==D&&v.addSeparator(z)})(Editor.themes[t]);m||v.addCheckmark(J,Editor.checkmarkImage)})));u=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();
+if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(N,J){v.invalidFileHandle=null;v.fileHandle=N;v.title=J.name;v.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var z=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename;z=new FilenameDialog(this.editorUi,z,mxResources.get("rename"),mxUtils.bind(this,function(N){null!=N&&0<N.length&&null!=v&&N!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
+v.rename(N,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(N){if(null!=N&&0<N.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(z.container,
+340,100,!0,!0);z.init()}}));u.isEnabled=function(){return this.enabled&&q.apply(this,arguments)};u.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var z=c.getCopyFilename(v);v.constructor==DriveFile?(z=new SaveDialog(c,z,mxUtils.bind(this,function(N,J,K){c.hideDialog();v.copyFile(mxUtils.bind(this,function(m){v.move(K,mxUtils.bind(this,function(t){c.spinner.stop()}),mxUtils.bind(this,function(t){c.handleError(t)}))}),
+mxUtils.bind(this,function(m){c.handleError(m)}),N.value)}),null,null,null,null,null,null,[App.MODE_GOOGLE],mxResources.get("ok")),c.showDialog(z.container,420,150,!0,!1,mxUtils.bind(this,function(){c.hideDialog()})),z.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),z)}}));u=new Action("openFolder",function(v,z){v=c.getCurrentFile();null!=v&&c.openLink(v.getFolderUrl())});u.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};c.actions.put("openFolder",
+u);c.actions.addAction("openFile...",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=v&&c.openLink(v.getFileUrl())}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var z=new SaveDialog(c,"",mxUtils.bind(this,function(N,J,K){c.hideDialog();c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(K,mxUtils.bind(this,function(m){c.spinner.stop()}),mxUtils.bind(this,function(m){c.handleError(m)}))}),
+null,null,null,null,null,v.getMode());c.showDialog(z.container,420,70,!0,!1,mxUtils.bind(this,function(){c.hideDialog()}));z.init()}}));this.put("publish",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,["publishLink","presentationMode"],z)})));EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||c.actions.put("presentationMode",new Action("presentationMode...",function(){var v=null!=c.getCurrentFile()?c.getCurrentFile().getTitle():null;
+c.editor.editAsNew(c.getFileData(!0),v,!0,null!=c.currentPage?c.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(z){c.handleError(z)}})).isEnabled=q;this.put("embed",new Menu(mxUtils.bind(this,function(v,z){var N=c.getCurrentFile();null==N||N.getMode()!=App.MODE_GOOGLE&&N.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(N.getTitle())||this.addMenuItems(v,["liveImage","-"],z);this.addMenuItems(v,
+["embedImage","embedSvg","-","embedHtml"],z);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],z);this.addMenuItems(v,["-","microsoftOffice","-","embedNotion"],z)})));u=function(v){var z=mxResources.get(v)+"...";c.actions.put(v,new Action(z,function(N){if("fromText"==v||"formatSql"==v||"plantUml"==v||"mermaid"==v){var J=new ParseDialog(c,z,v);c.showDialog(J.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else J=new CreateGraphDialog(c,z,v),c.showDialog(J.container,
620,420,!0,!1,function(K,m){if(m)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=J.graph&&(null!=J.graph.container.parentNode&&J.graph.container.parentNode.removeChild(J.graph.container),J.graph.destroy(),J.graph=null)});J.init()})).isEnabled=q};u("mermaid");u("horizontalFlow");u("verticalFlow");u("horizontalTree");u("verticalTree");u("radialTree");u("organic");u("circle");u("fromText");u("formatSql");("https://plant-aws.diagrams.net"!=window.PLANT_URL||EditorUi.enablePlantUml&&
-!c.isOffline())&&u("plantUml");var H=function(v){p.getModel().beginUpdate();try{v=p.addCell(v),p.fireEvent(new mxEventObject("cellsInserted","cells",[v])),p.model.isVertex(v)&&p.isAutoSizeCell(v)&&p.updateCellSize(v)}finally{p.getModel().endUpdate()}p.scrollCellToVisible(v);p.setSelectionCell(v);p.container.focus();p.editAfterInsert&&p.startEditing(v);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(p.view.getState(v))},0);return v},C=function(v,A,N,J,K){v=new mxCell(v,new mxGeometry(0,
-0,A,N),J);v.vertex=!0;null==K&&(K=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=K.x;v.geometry.y=K.y;return H(v)};c.actions.put("insertText",new Action("text",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&p.startEditingAtCell(C("Text",60,30,p.appendFontSize(Editor.defaultTextStyle,p.vertexFontSize),null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint()))},null,null,"A")).isEnabled=q;c.actions.put("insertRectangle",
+!c.isOffline())&&u("plantUml");var G=function(v){p.getModel().beginUpdate();try{v=p.addCell(v),p.fireEvent(new mxEventObject("cellsInserted","cells",[v])),p.model.isVertex(v)&&p.isAutoSizeCell(v)&&p.updateCellSize(v)}finally{p.getModel().endUpdate()}p.scrollCellToVisible(v);p.setSelectionCell(v);p.container.focus();p.editAfterInsert&&p.startEditing(v);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(p.view.getState(v))},0);return v},C=function(v,z,N,J,K){v=new mxCell(v,new mxGeometry(0,
+0,z,N),J);v.vertex=!0;null==K&&(K=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=K.x;v.geometry.y=K.y;return G(v)};c.actions.put("insertText",new Action("text",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&p.startEditingAtCell(C("Text",60,30,p.appendFontSize(Editor.defaultTextStyle,p.vertexFontSize),null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint()))},null,null,"A")).isEnabled=q;c.actions.put("insertRectangle",
new Action("rectangle",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&C("",120,60,"whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"D")).isEnabled=q;c.actions.put("insertNote",new Action("note",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&C("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"S")).isEnabled=q;c.actions.put("insertEllipse",new Action("ellipse",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&C("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"F")).isEnabled=q;c.actions.put("insertRhombus",new Action("rhombus",function(v){p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&C("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"R")).isEnabled=q;c.actions.put("insertEdge",new Action("line",function(v){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var A=p.defaultEdgeLength;v=null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint();null==v&&(v=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([N],
-!0)));var N=new mxCell("",new mxGeometry(0,0,A,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");N.geometry.setTerminalPoint(v,!0);N.geometry.setTerminalPoint(new mxPoint(v.x+N.geometry.width,v.y),!1);N.geometry.points=[];N.geometry.relative=!0;N.edge=!0;H(N)}},null,null,"C")).isEnabled=q;u=c.actions.put("toggleShapes",new Action("shapes",function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},
-null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+K"));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==c.sidebarWindow&&0<c.hsplitPosition}));this.put("insert",new Menu(mxUtils.bind(this,function(v,A){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(v,["toggleShapes"],A),c.menus.addSubmenu("table",v,A),v.addSeparator(A),c.menus.addMenuItems(v,["insertImage","insertLink","-"],A),c.insertTemplateEnabled&&
-!c.isOffline()&&c.menus.addMenuItems(v,["insertTemplate"],A),c.menus.addMenuItems(v,["generate"],A),window.isMermaidEnabled&&c.menus.addMenuItems(v,["mermaid"],A),v.addSeparator(A),c.menus.addSubmenu("insertAdvanced",v,A,mxResources.get("advanced")),c.menus.addSubmenu("layout",v,A)):(this.addMenuItems(v,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),A),window.isMermaidEnabled&&this.addMenuItems(v,
-["mermaid"],A),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(v,["-","insertTemplate"],A),c.menus.addMenuItems(v,["generate","-"],A),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",v,A),this.addSubmenu("insertLayout",v,A,mxResources.get("insert")),v.addSeparator(A),this.addSubmenu("table",v,A)):this.addSubmenu("insertLayout",v,A,mxResources.get("layout")),this.addSubmenu("insertAdvanced",v,A,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,
-function(v,A){c.menus.addInsertTableCellItem(v,A)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),A)})));c.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){p.popupMenuHandler.hideMenu();c.showImportCsvDialog()})).isEnabled=q;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["fromText","plantUml","formatSql",
-"csv"],A);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","createShape","editDiagram"],A)})));this.put("openRecent",new Menu(function(v,A){var N=c.getRecent();if(null!=N){for(var J=0;J<N.length;J++)(function(K){var m=K.mode;m==App.MODE_GOOGLE?m="googleDrive":m==App.MODE_ONEDRIVE&&(m="oneDrive");v.addItem(K.title+" ("+mxResources.get(m)+")",null,function(){c.loadFile(K.id)},A)})(N[J]);v.addSeparator(A)}v.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},
-A)}));this.put("openFrom",new Menu(function(v,A){null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},A):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},A):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},A):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},A);c.isModeReady(App.MODE_GITLAB)&&
-v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},A);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},A):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},A);"1"!=
-urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},A);c.isOffline()||(v.addSeparator(A),v.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://app.diagrams.net/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},
-mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},A))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(v,A){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},A):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1));
-c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},A):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},A):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},A);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},A);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,
-null,null,null,App.MODE_TRELLO)},A):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},A);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},A);"1"==
-urlParams.confLib&&v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showLibraryDialog(null,null,null,null,"CONF_LIB")},A)})),this.put("openLibraryFrom",new Menu(function(v,A){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},A):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-A,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},A):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},A):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
-"...)",null,function(){},A,null,!1);v.addSeparator(A);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},A);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},A);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},A):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+
-mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},A);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},A);c.isOffline()||(v.addSeparator(A),v.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("open"),function(J){if(null!=J&&
+!p.isCellLocked(p.getDefaultParent())&&C("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint())},null,null,"R")).isEnabled=q;c.actions.put("insertEdge",new Action("line",function(v){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var z=p.defaultEdgeLength;v=null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint();null==v&&(v=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([N],
+!0)));var N=new mxCell("",new mxGeometry(0,0,z,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");N.geometry.setTerminalPoint(v,!0);N.geometry.setTerminalPoint(new mxPoint(v.x+N.geometry.width,v.y),!1);N.geometry.points=[];N.geometry.relative=!0;N.edge=!0;G(N)}},null,null,"C")).isEnabled=q;u=c.actions.put("toggleShapes",new Action("shapes",function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},
+null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+K"));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==c.sidebarWindow&&0<c.hsplitPosition}));this.put("insert",new Menu(mxUtils.bind(this,function(v,z){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(v,["toggleShapes"],z),c.menus.addSubmenu("table",v,z),v.addSeparator(z),c.menus.addMenuItems(v,["insertImage","insertLink","-"],z),c.insertTemplateEnabled&&
+!c.isOffline()&&c.menus.addMenuItems(v,["insertTemplate"],z),c.menus.addMenuItems(v,["generate"],z),window.isMermaidEnabled&&c.menus.addMenuItems(v,["mermaid"],z),v.addSeparator(z),c.menus.addSubmenu("insertAdvanced",v,z,mxResources.get("advanced")),c.menus.addSubmenu("layout",v,z)):(this.addMenuItems(v,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),z),window.isMermaidEnabled&&this.addMenuItems(v,
+["mermaid"],z),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(v,["-","insertTemplate"],z),c.menus.addMenuItems(v,["generate","-"],z),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",v,z),this.addSubmenu("insertLayout",v,z,mxResources.get("insert")),v.addSeparator(z),this.addSubmenu("table",v,z)):this.addSubmenu("insertLayout",v,z,mxResources.get("layout")),this.addSubmenu("insertAdvanced",v,z,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,
+function(v,z){c.menus.addInsertTableCellItem(v,z)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),z)})));c.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){p.popupMenuHandler.hideMenu();c.showImportCsvDialog()})).isEnabled=q;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(v,z){var N=["fromText","plantUml","formatSql","csv"];EditorUi.enablePlantUml||
+N.splice(1,1);this.addMenuItems(v,N,z);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","createShape","editDiagram"],z)})));this.put("openRecent",new Menu(function(v,z){var N=c.getRecent();if(null!=N){for(var J=0;J<N.length;J++)(function(K){var m=K.mode;m==App.MODE_GOOGLE?m="googleDrive":m==App.MODE_ONEDRIVE&&(m="oneDrive");v.addItem(K.title+" ("+mxResources.get(m)+")",null,function(){c.loadFile(K.id)},z)})(N[J]);v.addSeparator(z)}v.addItem(mxResources.get("reset"),
+null,function(){c.resetRecent()},z)}));this.put("openFrom",new Menu(function(v,z){null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&
+v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},z);"1"!=
+urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},z);c.isOffline()||(v.addSeparator(z),v.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://app.diagrams.net/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},
+mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},z))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(v,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));
+c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,
+null,null,null,App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},z);"1"==
+urlParams.confLib&&v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showLibraryDialog(null,null,null,null,"CONF_LIB")},z)})),this.put("openLibraryFrom",new Menu(function(v,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
+z,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
+"...)",null,function(){},z,null,!1);v.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+
+mxResources.get("loading")+"...)",null,function(){},z,null,!1);v.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},z);c.isOffline()||(v.addSeparator(z),v.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("open"),function(J){if(null!=J&&
0<J.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var K=J;c.editor.isCorsEnabledForUrl(J)||(K=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(K,function(m){if(200<=m.getStatus()&&299>=m.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(c,m.getText(),J)),c.showSidebar()}catch(t){c.handleError(t,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},
-mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},A));"1"==urlParams.confLib&&(v.addSeparator(A),v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},A))})));this.put("edit",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,"undo redo - cut copy copyAsImage copyAsSvg paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},z));"1"==urlParams.confLib&&(v.addSeparator(z),v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},z))})));this.put("edit",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"undo redo - cut copy copyAsImage copyAsSvg paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
u=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var v=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(v);this.commentsWindow.refreshCommentsTime();v&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(v,A){var N=
-c.getCurrentFile();c.menus.addMenuItems(v,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),A);c.commentsSupported()&&c.menus.addMenuItems(v,["-","comments"],A);null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&c.menus.addMenuItems(v,["-","showRemoteCursors","shareCursor"],A);c.menus.addMenuItems(v,["-","fullscreen"],A)};this.put("view",new Menu(mxUtils.bind(this,function(v,A){if("simple"==Editor.currentTheme){var N=c.getCurrentFile();c.menus.addMenuItems(v,
-["toggleShapes","format"],A);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],A);c.menus.addMenuItems(v,["ruler","-","search"],A);if(isLocalStorage||mxClient.IS_CHROMEAPP){var J=c.menus.addMenuItem(v,"scratchpad",A);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(v,"- findReplace layers tags chatWindowTitle outline -".split(" "),A);c.commentsSupported()&&c.menus.addMenuItems(v,["comments"],
-A);null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],A);this.addMenuItems(v,["-","fullscreen"],A)}else{this.addMenuItems(v,["format","outline","layers","tags","chatWindowTitle"].concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(v,["-","search"],A);if(isLocalStorage||mxClient.IS_CHROMEAPP)J=this.addMenuItem(v,"scratchpad",A),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad");
-this.addMenuItems(v,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",v,A);v.addSeparator(A);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],A);this.addMenuItems(v,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),A);"1"!=urlParams.sketch&&this.addMenuItems(v,["-","fullscreen"],A)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
-A)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(v,A){var N=c.currentPage;null!=N&&(v.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(N,N.getName())}),A),v.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(N)}),A),1<c.pages.length&&(c.menus.addSubmenu("movePage",v,A,mxResources.get("move")),v.addSeparator(A)),v.addSeparator(A),v.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(N,
-mxResources.get("copyOf",[N.getName()]))}),A),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||v.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),A)))})));this.put("pages",new Menu(mxUtils.bind(this,function(v,A){var N=c.currentPage;c.editor.graph.isLightboxView()||(v.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(K){c.handleError(K)}}),
-A,null,c.editor.graph.isEnabled()),v.addSeparator(A));if(null!=c.pages)for(var J=0;J<c.pages.length;J++)mxUtils.bind(this,function(K){var m=null;m=c.pages[K]==N&&!c.editor.graph.isLightboxView()&&c.editor.graph.isEnabled()?c.menus.addSubmenu("currentPage",v,A,c.getShortPageName(N)):v.addItem(c.getShortPageName(c.pages[K]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[K])}),A);var t=c.pages[K].getId();m.setAttribute("title",c.pages[K].getName()+" ("+(K+1)+"/"+c.pages.length+")"+(null!=t?" ["+
-t+"]":""));c.pages[K]==N&&v.addCheckmark(m,Editor.checkmarkImage)})(J)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;u=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;u=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();U=!U});u.setToggleAction(!0);u.setSelectedCallback(function(){return U});
-var S="1"==urlParams.isGoogleFontsEnabled;u=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();S=!S;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return S});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var v=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(A){A=parseInt(A);0<=A&&(EditorUi.draftSaveDelay=
-1E3*A,EditorUi.enableDrafts=0<A,mxSettings.setDraftSaveDelay(A),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(v.container,320,80,!0,!0);v.init()})}var Q=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(v,A){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==Q||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",v,A);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
-"1"==urlParams.embedInline||c.menus.addSubmenu("appearance",v,A);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",v,A);v.addSeparator(A);c.menus.addSubmenu("units",v,A);c.menus.addMenuItems(v,"- copyConnect collapseExpand - tooltips animations -".split(" "),A);var N=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],A),c.menus.addMenuItems(v,["ruler","-"],
-A));EditorUi.isElectronApp&&c.menus.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),A);this.addSubmenu("diagramLanguage",v,A);v.addSeparator(A);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(v,"configuration",A);v.addSeparator(A)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",v,A),"1"==urlParams.embed&&"1"!=urlParams.atlas||c.menus.addSubmenu("appearance",v,A),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",
-v,A),EditorUi.isElectronApp&&this.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),A),v.addSeparator(A),N=this.addSubmenu("adaptiveColors",v,A),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(N,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(N=this.addMenuItem(v,"mathematicalTypesetting",A),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(N,"https://www.drawio.com/doc/faq/math-typesetting")),
-"1"!=urlParams.embed&&(N=c.getCurrentFile(),null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["-","showRemoteCursors","shareCursor"],A),v.addSeparator(A),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(v,["showStartScreen"],A),this.addMenuItems(v,["autosave"],A)),this.addMenuItems(v,["-","copyConnect","collapseExpand","-"],A),this.addSubmenu("diagramLanguage",v,A),this.addMenuItems(v,["editDiagram","-"],A),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(v,
-"plugins",A),this.addMenuItems(v,["configuration"],A)})));this.put("movePage",new Menu(mxUtils.bind(this,function(v,A){var N=c.currentPage,J=c.getPageIndex(N);if(null!=c.pages)for(var K=0;K<c.pages.length;K++)K!=J&&function(m){v.addItem(c.getShortPageName(c.pages[m]),null,function(){c.movePage(J,m);c.scrollToPage(N,!0)},A)}(K)})));this.put("share",new Menu(mxUtils.bind(this,function(v,A){if(!c.isStandaloneApp()){var N=c.isOffline(!0)?mxResources.get("offline"):c.getNetworkStatus();null!=N&&(v.addItem(N,
-null,null,A,null,!1),v.addSeparator(A));c.menus.addMenuItems(v,["share"],A)}this.addMenuItem(v,"publishLink",A,null,null,mxResources.get("publish")+"...");EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",A);null!=c.getMainUser()&&this.addMenuItems(v,["accounts"],A)})));this.put("diagram",new Menu(mxUtils.bind(this,function(v,A){var N=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",
-v,A,mxResources.get("settings")),v.addSeparator(A));var J="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(v,["new","open"],A),c.menus.addSubmenu("openRecent",v,A),c.menus.addMenuItems(v,"- synchronize properties - save saveAs -".split(" "),A);else if(c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["-","save"],A);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&
-"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(v,["saveAndExit"],A),null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],A);v.addSeparator(A)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(v,["save","synchronize","-"],A):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",v,A),v.addSeparator(A),"min"==Editor.currentTheme&&(c.menus.addMenuItems(v,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),A),c.commentsSupported()&&
-c.menus.addMenuItems(v,["comments"],A),v.addSeparator(A)));c.menus.addSubmenu("exportAs",v,A);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==c.getServiceName()?c.menus.addMenuItems(v,["import"],A):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",v,A);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(c.menus.addMenuItems(v,["-","findReplace"],A),c.commentsSupported()&&c.menus.addMenuItems(v,["comments","-"],A),c.menus.addMenuItems(v,"toggleShapes format layers tags chatWindowTitle -".split(" "),
-A),c.menus.addMenuItems(v,["pageSetup"],A)):"min"!=Editor.currentTheme&&(this.addMenuItems(v,["-"],A),this.addSubmenu("newLibrary",v,A),this.addSubmenu("openLibraryFrom",v,A));v.addSeparator(A);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(v,["print"],A);J||"min"==Editor.currentTheme||null==N||null==c.fileNode||"1"==urlParams.embedInline||(J=null!=N.getTitle()?N.getTitle():c.defaultFilename,/(\.html)$/i.test(J)||this.addMenuItems(v,["-","properties"]));v.addSeparator(A);
-"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",v,A,mxResources.get("settings")),v.addSeparator(A));c.menus.addSubmenu("help",v,A);v.addSeparator(A);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["save"],A),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(v,["saveAndExit"],A),null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],A));"1"!=urlParams.embed&&
-c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(v,["exit"],A);"1"!=urlParams.embed&&null!=N&&"undefined"==typeof AtlasFile&&c.menus.addMenuItems(v,["-","close"],A)})));this.put("save",new Menu(mxUtils.bind(this,function(v,A){var N=c.getCurrentFile();null==N||N.constructor!=DriveFile&&N.constructor!=OneDriveFile?(c.menus.addMenuItems(v,["save","saveAs","-","rename"],A),this.addMenuItems(v,[c.isOfflineApp()?"upload":"makeCopy"],A)):c.menus.addMenuItems(v,
-["save","makeCopy","-","rename","moveToFolder"],A);c.menus.addMenuItems(v,["-","autosave"],A);null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["-","revisionHistory"],A)})));this.put("file",new Menu(mxUtils.bind(this,function(v,A){var N="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",v,A),this.addSubmenu("exportAs",v,A),this.addSubmenu("embed",v,A),"1"==urlParams.libraries&&(this.addMenuItems(v,
-["-"],A),this.addSubmenu("newLibrary",v,A),this.addSubmenu("openLibraryFrom",v,A)),c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],A),this.addMenuItems(v,["-","pageSetup","print","-","rename"],A),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],A):(this.addMenuItems(v,["save"],A),"1"==urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],A))),"1"!=urlParams.noExitBtn&&this.addMenuItems(v,["exit"],
-A);else if(N){N=c.getCurrentFile();c.menus.addMenuItems(v,["new"],A);c.menus.addSubmenu("openFrom",v,A);isLocalStorage&&this.addSubmenu("openRecent",v,A);v.addSeparator(A);c.menus.addMenuItems(v,["-","save"],A);null!=N&&N.constructor==DriveFile||c.menus.addMenuItems(v,["saveAs"],A);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==N||N.constructor==LocalFile&&null==N.fileHandle||c.menus.addMenuItems(v,["synchronize"],A);v.addSeparator(A);null!=N&&("simple"==Editor.currentTheme||N.constructor!=
-DriveFile&&N.constructor!=GitHubFile&&N.constructor!=OneDriveFile||c.menus.addMenuItems(v,["share"],A),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItem(v,"publishLink",A,null,null,mxResources.get("publish")+"..."),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",A));v.addSeparator(A);
-null!=N&&N.isRenamable()&&this.addMenuItems(v,["rename"],A);c.isOfflineApp()?this.addMenuItems(v,["upload"],A):(c.menus.addMenuItems(v,["makeCopy"],A),null!=N&&(N.constructor!=OneDriveFile&&N.constructor!=DriveFile||c.menus.addMenuItems(v,["moveToFolder"],A),v.addSeparator(A),null!=N.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],A),null!=N.getFileUrl()&&c.menus.addMenuItems(v,["openFile"],A)));v.addSeparator(A);null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],
-A);if(null!=N&&null!=c.fileNode&&"1"!=urlParams.embedInline){var J=null!=N.getTitle()?N.getTitle():c.defaultFilename;(N.constructor==DriveFile&&null!=N.sync&&N.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["properties"],A)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(v,["-","autosave"],A)}else N=this.editorUi.getCurrentFile(),null!=N&&N.constructor==DriveFile?(N.isRestricted()&&this.addMenuItems(v,["exportOptionsDisabled"],A),this.addMenuItems(v,["save","-","share"],A),J=
-this.addMenuItem(v,"synchronize",A),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize"),v.addSeparator(A)):this.addMenuItems(v,["new"],A),this.addSubmenu("openFrom",v,A),isLocalStorage&&this.addSubmenu("openRecent",v,A),null!=N&&N.constructor==DriveFile?this.addMenuItems(v,"new - rename makeCopy openFolder moveToFolder".split(" "),A):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==N||N.constructor==LocalFile&&null==
-N.fileHandle||(v.addSeparator(A),J=this.addMenuItem(v,"synchronize",A),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs","-"],A),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==N||this.addMenuItems(v,["share","-"],A),null!=N&&N.isRenamable()&&this.addMenuItems(v,["rename"],A),c.isOfflineApp()?this.addMenuItems(v,["upload"],
-A):(this.addMenuItems(v,["makeCopy"],A),null!=N&&(N.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],A),null!=N.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],A)))),v.addSeparator(A),this.addSubmenu("importFrom",v,A),this.addSubmenu("exportAs",v,A),c.isOffline()||(v.addSeparator(A),this.addSubmenu("embed",v,A),this.addSubmenu("publish",v,A)),v.addSeparator(A),this.addSubmenu("newLibrary",v,A),this.addSubmenu("openLibraryFrom",v,A),c.isRevisionHistorySupported()&&this.addMenuItems(v,
-["-","revisionHistory"],A),null!=N&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=N.getTitle()?N.getTitle():c.defaultFilename,(N.constructor==DriveFile&&null!=N.sync&&N.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["-","properties"])),this.addMenuItems(v,["-","pageSetup"],A),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],A),this.addMenuItems(v,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,A){function N(O){var P=encodeURIComponent(O.name)+
-(null==O.url?"":"@"+encodeURIComponent(O.url));if(!K[P]){for(var T=O.name,V=0;null!=M[T.toLowerCase()];)T=O.name+" ("+ ++V+")";null==D[P]&&(L.push({name:O.name,url:O.url,label:T,title:O.url}),M[T.toLowerCase()]=O,D[P]=O)}}for(var J=mxUtils.bind(this,function(O,P,T,V,X){var W=c.editor.graph,Y=this.styleChange(v,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=P?encodeURIComponent(P):null,null],null,A,function(){W.setFont(O,P);c.fireEvent(new mxEventObject("styleChanged","keys",
-[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=P?encodeURIComponent(P):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});T&&(T=document.createElement("img"),T.className="geAdaptiveAsset",T.setAttribute("src",Editor.crossImage),T.setAttribute("title",mxResources.get("delete")),T.setAttribute("valign","absmiddle"),
-T.setAttribute("border","0"),T.style.position="relative",T.style.top="2px",T.style.width="14px",T.style.cursor="default",T.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(T),mxEvent.addListener(T,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,P);this.editorUi.hideCurrentMenu();mxEvent.consume(Z)})));Graph.addFont(O,P);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=P&&(X+=" ("+P+")");Y.setAttribute("title",X)}),
-K={},m=0;m<this.defaultFonts.length;m++){var t=this.defaultFonts[m];"string"===typeof t?J(t):null!=t.fontFamily&&null!=t.fontUrl&&(K[encodeURIComponent(t.fontFamily)+"@"+encodeURIComponent(t.fontUrl)]=!0,J(t.fontFamily,t.fontUrl))}v.addSeparator(A);var D={},M={},L=[];for(m=0;m<this.customFonts.length;m++)N(this.customFonts[m]);L.sort(function(O,P){return O.label<P.label?-1:O.label>P.label?1:0});if(0<L.length){for(m=0;m<L.length;m++)J(L[m].name,L[m].url,!0,L[m].label);v.addSeparator(A)}v.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),A);v.addSeparator(A);v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,P=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],T="s",V=null;if(O.isEditing()){var X=O.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){P=mxUtils.getCssFontFamily(W.fontFamily);W=O.getView().getState(O.cellEditor.getEditingCell());
-V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=O.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==P){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,T="g"):T="w")}}}else W=O.getView().getState(O.getSelectionCell()),null!=W&&(P=W.style[mxConstants.STYLE_FONTFAMILY]||P,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),
-Graph.isGoogleFontUrl(X)?T="g":(T="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,V,T,mxUtils.bind(this,function(Z,aa,fa){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),O.isEditing())O.setFont(Z,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1),
-O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),A,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+this.commentsWindow.window.setVisible(v);this.commentsWindow.refreshCommentsTime();v&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));u.setToggleAction(!0);u.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(v,z){var N=
+c.getCurrentFile();c.menus.addMenuItems(v,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),z);c.commentsSupported()&&c.menus.addMenuItems(v,["-","comments"],z);null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&c.menus.addMenuItems(v,["-","showRemoteCursors","shareCursor"],z);c.menus.addMenuItems(v,["-","fullscreen"],z)};this.put("view",new Menu(mxUtils.bind(this,function(v,z){if("simple"==Editor.currentTheme){var N=c.getCurrentFile();c.menus.addMenuItems(v,
+["toggleShapes","format"],z);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],z);c.menus.addMenuItems(v,["ruler","-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP){var J=c.menus.addMenuItem(v,"scratchpad",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(v,"- findReplace layers tags chatWindowTitle outline -".split(" "),z);c.commentsSupported()&&c.menus.addMenuItems(v,["comments"],
+z);null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],z);this.addMenuItems(v,["-","fullscreen"],z)}else{this.addMenuItems(v,["format","outline","layers","tags","chatWindowTitle"].concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(v,["-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP)J=this.addMenuItem(v,"scratchpad",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/scratchpad");
+this.addMenuItems(v,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",v,z);v.addSeparator(z);c.isPageMenuVisible()&&c.menus.addMenuItems(v,["pageTabs"],z);this.addMenuItems(v,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),z);"1"!=urlParams.sketch&&this.addMenuItems(v,["-","fullscreen"],z)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(v,z){this.addMenuItems(v,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
+z)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(v,z){var N=c.currentPage;null!=N&&(v.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(N,N.getName())}),z),v.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(N)}),z),1<c.pages.length&&(c.menus.addSubmenu("movePage",v,z,mxResources.get("move")),v.addSeparator(z)),v.addSeparator(z),v.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(N,
+mxResources.get("copyOf",[N.getName()]))}),z),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||v.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),z)))})));this.put("pages",new Menu(mxUtils.bind(this,function(v,z){var N=c.currentPage;c.editor.graph.isLightboxView()||(v.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(K){c.handleError(K)}}),
+z,null,c.editor.graph.isEnabled()),v.addSeparator(z));if(null!=c.pages)for(var J=0;J<c.pages.length;J++)mxUtils.bind(this,function(K){var m=null;m=c.pages[K]==N&&!c.editor.graph.isLightboxView()&&c.editor.graph.isEnabled()?c.menus.addSubmenu("currentPage",v,z,c.getShortPageName(N)):v.addItem(c.getShortPageName(c.pages[K]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[K])}),z);var t=c.pages[K].getId();m.setAttribute("title",c.pages[K].getName()+" ("+(K+1)+"/"+c.pages.length+")"+(null!=t?" ["+
+t+"]":""));c.pages[K]==N&&v.addCheckmark(m,Editor.checkmarkImage)})(J)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;u=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return R});var T="1"==urlParams.enableStoreBkp;u=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();T=!T});u.setToggleAction(!0);u.setSelectedCallback(function(){return T});
+var S="1"==urlParams.isGoogleFontsEnabled;u=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();S=!S;c.alert(mxResources.get("restartForChangeRequired"))});u.setToggleAction(!0);u.setSelectedCallback(function(){return S});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var v=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(z){z=parseInt(z);0<=z&&(EditorUi.draftSaveDelay=
+1E3*z,EditorUi.enableDrafts=0<z,mxSettings.setDraftSaveDelay(z),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(v.container,320,80,!0,!0);v.init()})}var Q=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(v,z){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==Q||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",v,z);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
+"1"==urlParams.embedInline||c.menus.addSubmenu("appearance",v,z);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",v,z);v.addSeparator(z);c.menus.addSubmenu("units",v,z);c.menus.addMenuItems(v,"- copyConnect collapseExpand - tooltips animations -".split(" "),z);var N=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors"],z),c.menus.addMenuItems(v,["ruler","-"],
+z));EditorUi.isElectronApp&&c.menus.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),z);this.addSubmenu("diagramLanguage",v,z);v.addSeparator(z);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(v,"configuration",z);v.addSeparator(z)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",v,z),"1"==urlParams.embed&&"1"!=urlParams.atlas||c.menus.addSubmenu("appearance",v,z),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",
+v,z),EditorUi.isElectronApp&&this.addMenuItems(v,"- googleFonts spellCheck autoBkp drafts -".split(" "),z),v.addSeparator(z),N=this.addSubmenu("adaptiveColors",v,z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(N,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(N=this.addMenuItem(v,"mathematicalTypesetting",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(N,"https://www.drawio.com/doc/faq/math-typesetting")),
+"1"!=urlParams.embed&&(N=c.getCurrentFile(),null!=N&&N.isRealtimeEnabled()&&N.isRealtimeSupported()&&this.addMenuItems(v,["-","showRemoteCursors","shareCursor"],z),v.addSeparator(z),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(v,["showStartScreen"],z),this.addMenuItems(v,["autosave"],z)),this.addMenuItems(v,["-","copyConnect","collapseExpand","-"],z),this.addSubmenu("diagramLanguage",v,z),this.addMenuItems(v,["editDiagram","-"],z),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(v,
+"plugins",z),this.addMenuItems(v,["configuration"],z)})));this.put("movePage",new Menu(mxUtils.bind(this,function(v,z){var N=c.currentPage,J=c.getPageIndex(N);if(null!=c.pages)for(var K=0;K<c.pages.length;K++)K!=J&&function(m){v.addItem(c.getShortPageName(c.pages[m]),null,function(){c.movePage(J,m);c.scrollToPage(N,!0)},z)}(K)})));this.put("share",new Menu(mxUtils.bind(this,function(v,z){if(!c.isStandaloneApp()){var N=c.isOffline(!0)?mxResources.get("offline"):c.getNetworkStatus();null!=N&&(v.addItem(N,
+null,null,z,null,!1),v.addSeparator(z));c.menus.addMenuItems(v,["share"],z)}this.addMenuItem(v,"publishLink",z,null,null,mxResources.get("publish")+"...");EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",z);null!=c.getMainUser()&&this.addMenuItems(v,["accounts"],z)})));this.put("diagram",new Menu(mxUtils.bind(this,function(v,z){var N=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",
+v,z,mxResources.get("settings")),v.addSeparator(z));var J="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(v,["new","open"],z),c.menus.addSubmenu("openRecent",v,z),c.menus.addMenuItems(v,"- synchronize properties - save saveAs -".split(" "),z);else if(c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["-","save"],z);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&
+"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(v,["saveAndExit"],z),null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],z);v.addSeparator(z)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(v,["save","synchronize","-"],z):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",v,z),v.addSeparator(z),"min"==Editor.currentTheme&&(c.menus.addMenuItems(v,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),z),c.commentsSupported()&&
+c.menus.addMenuItems(v,["comments"],z),v.addSeparator(z)));c.menus.addSubmenu("exportAs",v,z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==c.getServiceName()?c.menus.addMenuItems(v,["import"],z):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",v,z);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(c.menus.addMenuItems(v,["-","findReplace"],z),c.commentsSupported()&&c.menus.addMenuItems(v,["comments","-"],z),c.menus.addMenuItems(v,"toggleShapes format layers tags chatWindowTitle -".split(" "),
+z),c.menus.addMenuItems(v,["pageSetup"],z)):"min"!=Editor.currentTheme&&(this.addMenuItems(v,["-"],z),this.addSubmenu("newLibrary",v,z),this.addSubmenu("openLibraryFrom",v,z));v.addSeparator(z);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(v,["print"],z);J||"min"==Editor.currentTheme||null==N||null==c.fileNode||"1"==urlParams.embedInline||(J=null!=N.getTitle()?N.getTitle():c.defaultFilename,/(\.html)$/i.test(J)||this.addMenuItems(v,["-","properties"]));v.addSeparator(z);
+"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",v,z,mxResources.get("settings")),v.addSeparator(z));c.menus.addSubmenu("help",v,z);v.addSeparator(z);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(v,["save"],z),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(v,["saveAndExit"],z),null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],z));"1"!=urlParams.embed&&
+c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(v,["exit"],z);"1"!=urlParams.embed&&null!=N&&"undefined"==typeof AtlasFile&&c.menus.addMenuItems(v,["-","close"],z)})));this.put("save",new Menu(mxUtils.bind(this,function(v,z){var N=c.getCurrentFile();null==N||N.constructor!=DriveFile&&N.constructor!=OneDriveFile?(c.menus.addMenuItems(v,["save","saveAs","-","rename"],z),this.addMenuItems(v,[c.isOfflineApp()?"upload":"makeCopy"],z)):c.menus.addMenuItems(v,
+["save","makeCopy","-","rename","moveToFolder"],z);c.menus.addMenuItems(v,["-","autosave"],z);null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["-","revisionHistory"],z)})));this.put("file",new Menu(mxUtils.bind(this,function(v,z){var N="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",v,z),this.addSubmenu("exportAs",v,z),this.addSubmenu("embed",v,z),"1"==urlParams.libraries&&(this.addMenuItems(v,
+["-"],z),this.addSubmenu("newLibrary",v,z),this.addSubmenu("openLibraryFrom",v,z)),c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],z),this.addMenuItems(v,["-","pageSetup","print","-","rename"],z),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],z):(this.addMenuItems(v,["save"],z),"1"==urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],z))),"1"!=urlParams.noExitBtn&&this.addMenuItems(v,["exit"],
+z);else if(N){N=c.getCurrentFile();c.menus.addMenuItems(v,["new"],z);c.menus.addSubmenu("openFrom",v,z);isLocalStorage&&this.addSubmenu("openRecent",v,z);v.addSeparator(z);c.menus.addMenuItems(v,["-","save"],z);null!=N&&N.constructor==DriveFile||c.menus.addMenuItems(v,["saveAs"],z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==N||N.constructor==LocalFile&&null==N.fileHandle||c.menus.addMenuItems(v,["synchronize"],z);v.addSeparator(z);null!=N&&("simple"==Editor.currentTheme||N.constructor!=
+DriveFile&&N.constructor!=GitHubFile&&N.constructor!=OneDriveFile||c.menus.addMenuItems(v,["share"],z),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItem(v,"publishLink",z,null,null,mxResources.get("publish")+"..."),"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||this.addMenuItem(v,"presentationMode",z));v.addSeparator(z);
+null!=N&&N.isRenamable()&&this.addMenuItems(v,["rename"],z);c.isOfflineApp()?this.addMenuItems(v,["upload"],z):(c.menus.addMenuItems(v,["makeCopy"],z),null!=N&&(N.constructor!=OneDriveFile&&N.constructor!=DriveFile||c.menus.addMenuItems(v,["moveToFolder"],z),v.addSeparator(z),null!=N.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],z),null!=N.getFileUrl()&&c.menus.addMenuItems(v,["openFile"],z)));v.addSeparator(z);null!=N&&N.isRevisionHistorySupported()&&c.menus.addMenuItems(v,["revisionHistory"],
+z);if(null!=N&&null!=c.fileNode&&"1"!=urlParams.embedInline){var J=null!=N.getTitle()?N.getTitle():c.defaultFilename;(N.constructor==DriveFile&&null!=N.sync&&N.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["properties"],z)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(v,["-","autosave"],z)}else N=this.editorUi.getCurrentFile(),null!=N&&N.constructor==DriveFile?(N.isRestricted()&&this.addMenuItems(v,["exportOptionsDisabled"],z),this.addMenuItems(v,["save","-","share"],z),J=
+this.addMenuItem(v,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize"),v.addSeparator(z)):this.addMenuItems(v,["new"],z),this.addSubmenu("openFrom",v,z),isLocalStorage&&this.addSubmenu("openRecent",v,z),null!=N&&N.constructor==DriveFile?this.addMenuItems(v,"new - rename makeCopy openFolder moveToFolder".split(" "),z):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==N||N.constructor==LocalFile&&null==
+N.fileHandle||(v.addSeparator(z),J=this.addMenuItem(v,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs","-"],z),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==N||this.addMenuItems(v,["share","-"],z),null!=N&&N.isRenamable()&&this.addMenuItems(v,["rename"],z),c.isOfflineApp()?this.addMenuItems(v,["upload"],
+z):(this.addMenuItems(v,["makeCopy"],z),null!=N&&(N.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],z),null!=N.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],z)))),v.addSeparator(z),this.addSubmenu("importFrom",v,z),this.addSubmenu("exportAs",v,z),c.isOffline()||(v.addSeparator(z),this.addSubmenu("embed",v,z),this.addSubmenu("publish",v,z)),v.addSeparator(z),this.addSubmenu("newLibrary",v,z),this.addSubmenu("openLibraryFrom",v,z),c.isRevisionHistorySupported()&&this.addMenuItems(v,
+["-","revisionHistory"],z),null!=N&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=N.getTitle()?N.getTitle():c.defaultFilename,(N.constructor==DriveFile&&null!=N.sync&&N.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["-","properties"])),this.addMenuItems(v,["-","pageSetup"],z),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],z),this.addMenuItems(v,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,z){function N(O){var P=encodeURIComponent(O.name)+
+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!K[P]){for(var U=O.name,V=0;null!=M[U.toLowerCase()];)U=O.name+" ("+ ++V+")";null==D[P]&&(L.push({name:O.name,url:O.url,label:U,title:O.url}),M[U.toLowerCase()]=O,D[P]=O)}}for(var J=mxUtils.bind(this,function(O,P,U,V,X){var W=c.editor.graph,Y=this.styleChange(v,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=P?encodeURIComponent(P):null,null],null,z,function(){W.setFont(O,P);c.fireEvent(new mxEventObject("styleChanged","keys",
+[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=P?encodeURIComponent(P):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});U&&(U=document.createElement("img"),U.className="geAdaptiveAsset",U.setAttribute("src",Editor.crossImage),U.setAttribute("title",mxResources.get("delete")),U.setAttribute("valign","absmiddle"),
+U.setAttribute("border","0"),U.style.position="relative",U.style.top="2px",U.style.width="14px",U.style.cursor="default",U.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,P);this.editorUi.hideCurrentMenu();mxEvent.consume(Z)})));Graph.addFont(O,P);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=P&&(X+=" ("+P+")");Y.setAttribute("title",X)}),
+K={},m=0;m<this.defaultFonts.length;m++){var t=this.defaultFonts[m];"string"===typeof t?J(t):null!=t.fontFamily&&null!=t.fontUrl&&(K[encodeURIComponent(t.fontFamily)+"@"+encodeURIComponent(t.fontUrl)]=!0,J(t.fontFamily,t.fontUrl))}v.addSeparator(z);var D={},M={},L=[];for(m=0;m<this.customFonts.length;m++)N(this.customFonts[m]);L.sort(function(O,P){return O.label<P.label?-1:O.label>P.label?1:0});if(0<L.length){for(m=0;m<L.length;m++)J(L[m].name,L[m].url,!0,L[m].label);v.addSeparator(z)}v.addItem(mxResources.get("reset"),
+null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),z);v.addSeparator(z);v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,P=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",V=null;if(O.isEditing()){var X=O.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){P=mxUtils.getCssFontFamily(W.fontFamily);W=O.getView().getState(O.cellEditor.getEditingCell());
+V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=O.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==P){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,U="g"):U="w")}}}else W=O.getView().getState(O.getSelectionCell()),null!=W&&(P=W.style[mxConstants.STYLE_FONTFAMILY]||P,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),
+Graph.isGoogleFontUrl(X)?U="g":(U="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,V,U,mxUtils.bind(this,function(Z,aa,fa){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),O.isEditing())O.setFont(Z,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1),
+O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),z,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,g){this.ui=b;this.page=f;this.previous=this.name=g}
RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,f,g){this.ui=b;this.oldIndex=f;this.newIndex=g}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,f,g){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=g&&(f.viewState=g))}
@@ -14268,7 +14270,7 @@ function(){var u=g.apply(this,arguments);null!=p.currentPage&&c!=p.currentPage&&
this.editor.addListener("pageSelected",mxUtils.bind(this,function(u,y){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(u,y){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
EditorUi.prototype.scrollToPage=function(b,f){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),c=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(c!=this.lastScrollPage||f)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=c)};
EditorUi.prototype.restoreViewState=function(b,f,g){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(c.setViewState(f),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+f.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+f.scrollTop,c.restoreSelection(g))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),p=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),u=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(G){G=G.split("^");return{name:G[0],url:G[1]}})}catch(G){console.log("ExtFonts format error: "+G.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),p=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),u=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(H){H=H.split("^");return{name:H[0],url:H[1]}})}catch(H){console.log("ExtFonts format error: "+H.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:u,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(c)||isNaN(p)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,c,p),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:y||[]}};
Graph.prototype.saveViewState=function(b,f,g,c,p){g||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
@@ -14292,7 +14294,7 @@ EditorUi.prototype.insertPage=function(b,f,g){this.editor.graph.isEnabled()&&(th
EditorUi.prototype.createPage=function(b,f,g){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,g);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var g=this.pages[f].getName();null!=g&&0<g.length&&(b[g]=g)}f=this.pages.length;do g=mxResources.get("pageWithNumber",[++f]);while(null!=b[g]);return g};
EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,c=this.pages[g]):1>=this.pages.length&&(c=this.insertPage(),f.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,c))}finally{f.model.endUpdate()}}}catch(p){this.handleError(p)}return b};
EditorUi.prototype.duplicatePage=function(b,f){var g=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var p=b.node.cloneNode(!1);p.removeAttribute("id");var q={},u=c.createCellLookup([c.model.root]);g=new DiagramPage(p);g.root=c.cloneCell(c.model.root,null,q);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(g.root);c.updateCustomLinks(c.createCellMapping(q,u),[g.root]);g.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(g);
-g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(f);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(G){this.handleError(G)}return g};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
+g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(f);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(H){this.handleError(H)}return g};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
EditorUi.prototype.clonePages=function(b){for(var f=[],g=[],c=0;c<b.length;c++)try{g.push(this.clonePage(b[c]))}catch(p){f.push(mxResources.get("pageWithNumber",[c+1])+": "+p.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(p){}throw b;}return g};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
@@ -14309,59 +14311,59 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(n
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(p,q){this.menus.get("pages").funct(p,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var g=mxEvent.getClientX(b),c=mxEvent.getClientY(b);f.popup(g,
c,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var g=this.createTab(),c=b.getName()||mxResources.get("untitled"),p=b.getId();g.setAttribute("title",c+(null!=p?" ("+p+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,c);g.appendChild(f);this.addTabListeners(b,g);return g};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var g=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(G){this.renamePage(b);mxEvent.consume(G)}));var c=document.createElement("div");c.style.backgroundImage="url("+Editor.thinExpandImage+")";c.className="geButton";f.appendChild(c);var p=!1,q=!1,u=mxUtils.bind(this,function(G){p=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||q||this.selectPage(b)}),y=mxUtils.bind(this,
-function(G){if(!g.isMouseDown&&(q&&(mxEvent.isTouchEvent(G)||mxEvent.getSource(G)==c)||mxEvent.isPopupTrigger(G))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(G)||!p)){var E=new mxPopupMenu(this.createPageMenu(b));E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var F=mxEvent.getClientX(G),d=mxEvent.getClientY(G);E.popup(F,d,null,G);
-this.setCurrentMenu(E,f)}mxEvent.consume(G)});mxEvent.addGestureListeners(c,u,null,y);mxEvent.addGestureListeners(f,u,null,y)};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var g=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(H){this.renamePage(b);mxEvent.consume(H)}));var c=document.createElement("div");c.style.backgroundImage="url("+Editor.thinExpandImage+")";c.className="geButton";f.appendChild(c);var p=!1,q=!1,u=mxUtils.bind(this,function(H){p=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||q||this.selectPage(b)}),y=mxUtils.bind(this,
+function(H){if(!g.isMouseDown&&(q&&(mxEvent.isTouchEvent(H)||mxEvent.getSource(H)==c)||mxEvent.isPopupTrigger(H))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(H)||!p)){var E=new mxPopupMenu(this.createPageMenu(b));E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var F=mxEvent.getClientX(H),d=mxEvent.getClientY(H);E.popup(F,d,null,H);
+this.setCurrentMenu(E,f)}mxEvent.consume(H)});mxEvent.addGestureListeners(c,u,null,y);mxEvent.addGestureListeners(f,u,null,y)};
EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(g,c){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),c));this.editor.graph.isEnabled()&&(g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),c),g.addSeparator(c),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,c,mxResources.get("move")),g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c),g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),c))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,p,q,u,y){p=null!=p?p:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var G=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(c,q[E]);q=G;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(c,p){this.model.beginUpdate();try{var q=
-[];this.traverse(p,!0,mxUtils.bind(this,function(y,G){var E=null!=G&&this.isTreeEdge(G);E&&q.push(G);y==p||null!=G&&!E||q.push(y);return(null==G||E)&&(y==p||!this.model.isCollapsed(y))}));this.model.setCollapsed(p,c);for(var u=0;u<q.length;u++)this.model.setVisible(q[u],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,p,q,u,y,G){return this.model.filterCells(this.getEdges(c,p,q,u,y,G),mxUtils.bind(this,
+[b.getName()]))}),c),g.addSeparator(c),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,c,mxResources.get("move")),g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c),g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),c))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,p,q,u,y){p=null!=p?p:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var H=q.slice(),E=0;E<q.length;E++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[E]),"treeFolding","0")&&this.foldTreeCell(c,q[E]);q=H;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(c,p){this.model.beginUpdate();try{var q=
+[];this.traverse(p,!0,mxUtils.bind(this,function(y,H){var E=null!=H&&this.isTreeEdge(H);E&&q.push(H);y==p||null!=H&&!E||q.push(y);return(null==H||E)&&(y==p||!this.model.isCollapsed(y))}));this.model.setCollapsed(p,c);for(var u=0;u<q.length;u++)this.model.setVisible(q[u],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,p,q,u,y,H){return this.model.filterCells(this.getEdges(c,p,q,u,y,H),mxUtils.bind(this,
function(E){return this.isTreeEdge(E)}))};Graph.prototype.getIncomingTreeEdges=function(c,p){return this.getTreeEdges(c,p,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,p){return this.getTreeEdges(c,p,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(K){return x.isVertex(K)&&q(K)}function p(K){var m=!1;null!=K&&(m="1"==
n.getCurrentCellStyle(K).treeMoving);return m}function q(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),m="tree"==(null!=m?m.style:n.getCellStyle(K)).containerType);return m}function u(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),n.view.getState(K),m=null!=(null!=m?m.style:n.getCellStyle(K)).childLayout);return m}function y(K){K=n.view.getState(K);if(null!=K){var m=n.getIncomingTreeEdges(K.cell);if(0<m.length&&(m=n.view.getState(m[0]),null!=m&&(m=m.absolutePoints,null!=
-m&&0<m.length&&(m=m[m.length-1],null!=m)))){if(m.y==K.y&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_SOUTH;if(m.y==K.y+K.height&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_NORTH;if(m.x>K.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function G(K,m){m=null!=m?m:!0;n.model.beginUpdate();try{var t=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=n.cloneCells([D[0],K]);n.model.setTerminal(M[0],n.model.getTerminal(D[0],
-!0),!0);var L=y(K),O=t.geometry;L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?M[1].geometry.x+=m?K.geometry.width+10:-M[1].geometry.width-10:M[1].geometry.y+=m?K.geometry.height+10:-M[1].geometry.height-10;n.view.currentRoot!=t&&(M[1].geometry.x-=O.x,M[1].geometry.y-=O.y);var P=n.view.getState(K),T=n.view.scale;if(null!=P){var V=mxRectangle.fromRectangle(P);L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?V.x+=(m?K.geometry.width+10:-M[1].geometry.width-10)*T:V.y+=(m?
-K.geometry.height+10:-M[1].geometry.height-10)*T;var X=n.getOutgoingTreeEdges(n.model.getTerminal(D[0],!0));if(null!=X){for(var W=L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH,Y=O=D=0;Y<X.length;Y++){var Z=n.model.getTerminal(X[Y],!1);if(L==y(Z)){var aa=n.view.getState(Z);Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<P.getCenterX()||!W&&m!=aa.getCenterY()<P.getCenterY())&&mxUtils.intersects(V,aa)&&(D=10+Math.max(D,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/T),O=10+Math.max(O,
-(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/T))}}W?O=0:D=0;for(Y=0;Y<X.length;Y++)if(Z=n.model.getTerminal(X[Y],!1),L==y(Z)&&(aa=n.view.getState(Z),Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<P.getCenterX()||!W&&m!=aa.getCenterY()<P.getCenterY()))){var fa=[];n.traverse(aa.cell,!0,function(ea,ca){var ia=null!=ca&&n.isTreeEdge(ca);ia&&fa.push(ca);(null==ca||ia)&&fa.push(ea);return null==ca||ia});n.moveCells(fa,(m?1:-1)*D,(m?1:-1)*O)}}}return n.addCells(M,t)}finally{n.model.endUpdate()}}function E(K){n.model.beginUpdate();
-try{var m=y(K),t=n.getIncomingTreeEdges(K),D=n.cloneCells([t[0],K]);n.model.setTerminal(t[0],D[1],!1);n.model.setTerminal(D[0],D[1],!0);n.model.setTerminal(D[0],K,!1);var M=n.model.getParent(K),L=M.geometry,O=[];n.view.currentRoot!=M&&(D[1].geometry.x-=L.x,D[1].geometry.y-=L.y);n.traverse(K,!0,function(V,X){var W=null!=X&&n.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var P=K.geometry.width+40,T=K.geometry.height+40;m==mxConstants.DIRECTION_SOUTH?P=0:m==mxConstants.DIRECTION_NORTH?
-(P=0,T=-T):m==mxConstants.DIRECTION_WEST?(P=-P,T=0):m==mxConstants.DIRECTION_EAST&&(T=0);n.moveCells(O,P,T);return n.addCells(D,M)}finally{n.model.endUpdate()}}function F(K,m){n.model.beginUpdate();try{var t=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=y(K);0==D.length&&(D=[n.createEdge(t,null,"",null,null,n.createCurrentEdgeStyle())],M=m);var L=n.cloneCells([D[0],K]);n.model.setTerminal(L[0],K,!0);null==n.model.getTerminal(L[0],!1)&&(n.model.setTerminal(L[0],L[1],!1),n.applyNewEdgeStyle(L[1],
-[L[0]],M));D=n.getOutgoingTreeEdges(K);var O=t.geometry;m=[];n.view.currentRoot==t&&(O=new mxRectangle);for(var P=0;P<D.length;P++){var T=n.model.getTerminal(D[P],!1);null!=T&&m.push(T)}var V=n.view.getBounds(m),X=n.view.translate,W=n.view.scale;M==mxConstants.DIRECTION_SOUTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-L[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,L[1].geometry.y+=L[1].geometry.height-O.y+40):M==mxConstants.DIRECTION_NORTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-
+m&&0<m.length&&(m=m[m.length-1],null!=m)))){if(m.y==K.y&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_SOUTH;if(m.y==K.y+K.height&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_NORTH;if(m.x>K.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function H(K,m){m=null!=m?m:!0;n.model.beginUpdate();try{var t=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=n.cloneCells([D[0],K]);n.model.setTerminal(M[0],n.model.getTerminal(D[0],
+!0),!0);var L=y(K),O=t.geometry;L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?M[1].geometry.x+=m?K.geometry.width+10:-M[1].geometry.width-10:M[1].geometry.y+=m?K.geometry.height+10:-M[1].geometry.height-10;n.view.currentRoot!=t&&(M[1].geometry.x-=O.x,M[1].geometry.y-=O.y);var P=n.view.getState(K),U=n.view.scale;if(null!=P){var V=mxRectangle.fromRectangle(P);L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?V.x+=(m?K.geometry.width+10:-M[1].geometry.width-10)*U:V.y+=(m?
+K.geometry.height+10:-M[1].geometry.height-10)*U;var X=n.getOutgoingTreeEdges(n.model.getTerminal(D[0],!0));if(null!=X){for(var W=L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH,Y=O=D=0;Y<X.length;Y++){var Z=n.model.getTerminal(X[Y],!1);if(L==y(Z)){var aa=n.view.getState(Z);Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<P.getCenterX()||!W&&m!=aa.getCenterY()<P.getCenterY())&&mxUtils.intersects(V,aa)&&(D=10+Math.max(D,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/U),O=10+Math.max(O,
+(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/U))}}W?O=0:D=0;for(Y=0;Y<X.length;Y++)if(Z=n.model.getTerminal(X[Y],!1),L==y(Z)&&(aa=n.view.getState(Z),Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<P.getCenterX()||!W&&m!=aa.getCenterY()<P.getCenterY()))){var fa=[];n.traverse(aa.cell,!0,function(ea,ca){var ha=null!=ca&&n.isTreeEdge(ca);ha&&fa.push(ca);(null==ca||ha)&&fa.push(ea);return null==ca||ha});n.moveCells(fa,(m?1:-1)*D,(m?1:-1)*O)}}}return n.addCells(M,t)}finally{n.model.endUpdate()}}function E(K){n.model.beginUpdate();
+try{var m=y(K),t=n.getIncomingTreeEdges(K),D=n.cloneCells([t[0],K]);n.model.setTerminal(t[0],D[1],!1);n.model.setTerminal(D[0],D[1],!0);n.model.setTerminal(D[0],K,!1);var M=n.model.getParent(K),L=M.geometry,O=[];n.view.currentRoot!=M&&(D[1].geometry.x-=L.x,D[1].geometry.y-=L.y);n.traverse(K,!0,function(V,X){var W=null!=X&&n.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var P=K.geometry.width+40,U=K.geometry.height+40;m==mxConstants.DIRECTION_SOUTH?P=0:m==mxConstants.DIRECTION_NORTH?
+(P=0,U=-U):m==mxConstants.DIRECTION_WEST?(P=-P,U=0):m==mxConstants.DIRECTION_EAST&&(U=0);n.moveCells(O,P,U);return n.addCells(D,M)}finally{n.model.endUpdate()}}function F(K,m){n.model.beginUpdate();try{var t=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=y(K);0==D.length&&(D=[n.createEdge(t,null,"",null,null,n.createCurrentEdgeStyle())],M=m);var L=n.cloneCells([D[0],K]);n.model.setTerminal(L[0],K,!0);null==n.model.getTerminal(L[0],!1)&&(n.model.setTerminal(L[0],L[1],!1),n.applyNewEdgeStyle(L[1],
+[L[0]],M));D=n.getOutgoingTreeEdges(K);var O=t.geometry;m=[];n.view.currentRoot==t&&(O=new mxRectangle);for(var P=0;P<D.length;P++){var U=n.model.getTerminal(D[P],!1);null!=U&&m.push(U)}var V=n.view.getBounds(m),X=n.view.translate,W=n.view.scale;M==mxConstants.DIRECTION_SOUTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-L[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,L[1].geometry.y+=L[1].geometry.height-O.y+40):M==mxConstants.DIRECTION_NORTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-
L[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,L[1].geometry.y-=L[1].geometry.height+O.y+40):(L[1].geometry.x=M==mxConstants.DIRECTION_WEST?L[1].geometry.x-(L[1].geometry.width+O.x+40):L[1].geometry.x+(L[1].geometry.width-O.x+40),L[1].geometry.y=null==V?K.geometry.y+(K.geometry.height-L[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return n.addCells(L,t)}finally{n.model.endUpdate()}}function d(K,m,t){K=n.getOutgoingTreeEdges(K);t=n.view.getState(t);var D=[];if(null!=t&&null!=K){for(var M=
0;M<K.length;M++){var L=n.view.getState(n.model.getTerminal(K[M],!1));null!=L&&(!m&&Math.min(L.x+L.width,t.x+t.width)>=Math.max(L.x,t.x)||m&&Math.min(L.y+L.height,t.y+t.height)>=Math.max(L.y,t.y))&&D.push(L)}D.sort(function(O,P){return m?O.x+O.width-P.x-P.width:O.y+O.height-P.y-P.height})}return D}function k(K,m){var t=y(K),D=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;(t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST)==D&&t!=m?l.actions.get("selectParent").funct():t==
-m?(m=n.getOutgoingTreeEdges(K),null!=m&&0<m.length&&n.setSelectionCell(n.model.getTerminal(m[0],!1))):(t=n.getIncomingTreeEdges(K),null!=t&&0<t.length&&(D=d(n.model.getTerminal(t[0],!0),D,K),K=n.view.getState(K),null!=K&&(K=mxUtils.indexOf(D,K),0<=K&&(K+=m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_WEST?-1:1,0<=K&&K<=D.length-1&&n.setSelectionCell(D[K].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),z=l.menus.createPopupMenu;l.menus.createPopupMenu=function(K,m,t){z.apply(this,arguments);
+m?(m=n.getOutgoingTreeEdges(K),null!=m&&0<m.length&&n.setSelectionCell(n.model.getTerminal(m[0],!1))):(t=n.getIncomingTreeEdges(K),null!=t&&0<t.length&&(D=d(n.model.getTerminal(t[0],!0),D,K),K=n.view.getState(K),null!=K&&(K=mxUtils.indexOf(D,K),0<=K&&(K+=m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_WEST?-1:1,0<=K&&K<=D.length-1&&n.setSelectionCell(D[K].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),A=l.menus.createPopupMenu;l.menus.createPopupMenu=function(K,m,t){A.apply(this,arguments);
if(1==n.getSelectionCount()){m=n.getSelectionCell();var D=n.getOutgoingTreeEdges(m);K.addSeparator();0<D.length&&(c(n.getSelectionCell())&&this.addMenuItems(K,["selectChildren"],null,t),this.addMenuItems(K,["selectDescendants"],null,t));c(n.getSelectionCell())?(K.addSeparator(),0<n.getIncomingTreeEdges(m).length&&this.addMenuItems(K,["selectSiblings","selectParent"],null,t)):0<n.model.getEdgeCount(m)&&this.addMenuItems(K,["selectConnections"],null,t)}};l.actions.addAction("selectChildren",function(K){if(n.isEnabled()&&
1==n.getSelectionCount()){var m=n.getSelectionCell();K=mxEvent.isControlDown(K)?null:n.getOutgoingTreeEdges(m);if(null!=K&&0<K.length){m=[];for(var t=0;t<K.length;t++)m.push(n.model.getTerminal(K[t],!1));n.setSelectionCells(m)}else n.setSelectionCells(n.model.getChildren(m))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(K){var m=n.getSelectionCell();if(n.isEnabled()&&null!=m){var t=[];mxEvent.isControlDown(K)||n.traverse(m,!0,function(D,M){var L=
null!=M&&n.isTreeEdge(M);L&&mxEvent.isControlDown(K)&&t.push(M);(null==M||L)&&t.push(D);return null==M||L});if(0==t.length||1==t.length&&t[0]==m)t=n.model.getDescendants(m);n.setSelectionCells(t)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(K){var m=n.getSelectionCell();n.isEnabled()&&null!=m&&(K=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m),null!=K&&0<K.length?n.setSelectionCell(n.model.getTerminal(K[0],!0)):n.selectParentCell())},null,
null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(K){if(n.isEnabled()&&1==n.getSelectionCount()){var m=n.getSelectionCell(),t=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m);K=[];if(null!=t&&0<t.length&&(t=n.getOutgoingTreeEdges(n.model.getTerminal(t[0],!0)),null!=t))for(var D=0;D<t.length;D++)K.push(n.model.getTerminal(t[D],!1));0==K.length&&(K=n.model.getChildren(n.model.getParent(m)));n.setSelectionCells(K)}},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+S");var B=n.removeCells;n.removeCells=function(K,m){m=null!=m?m:!0;null==K&&(K=this.getDeletableCells(this.getSelectionCells()));m&&(K=this.getDeletableCells(this.addAllEdges(K)));for(var t=[],D=0;D<K.length;D++){var M=K[D];x.isEdge(M)&&q(M)&&(t.push(M),M=x.getTerminal(M,!1));if(c(M)){var L=[];n.traverse(M,!0,function(O,P){var T=null!=P&&n.isTreeEdge(P);T&&L.push(P);(null==P||T)&&L.push(O);return null==P||T});0<L.length&&(t=t.concat(L),M=n.getIncomingTreeEdges(K[D]),K=K.concat(M))}else null!=M&&
+"+S");var B=n.removeCells;n.removeCells=function(K,m){m=null!=m?m:!0;null==K&&(K=this.getDeletableCells(this.getSelectionCells()));m&&(K=this.getDeletableCells(this.addAllEdges(K)));for(var t=[],D=0;D<K.length;D++){var M=K[D];x.isEdge(M)&&q(M)&&(t.push(M),M=x.getTerminal(M,!1));if(c(M)){var L=[];n.traverse(M,!0,function(O,P){var U=null!=P&&n.isTreeEdge(P);U&&L.push(P);(null==P||U)&&L.push(O);return null==P||U});0<L.length&&(t=t.concat(L),M=n.getIncomingTreeEdges(K[D]),K=K.concat(M))}else null!=M&&
t.push(K[D])}K=t;return B.apply(this,arguments)};l.hoverIcons.getStateAt=function(K,m,t){return c(K.cell)?null:this.graph.view.getState(this.graph.getCellAt(m,t))};var I=n.duplicateCells;n.duplicateCells=function(K,m){K=null!=K?K:this.getSelectionCells();for(var t=K.slice(0),D=0;D<t.length;D++){var M=n.view.getState(t[D]);if(null!=M&&c(M.cell)){var L=n.getIncomingTreeEdges(M.cell);for(M=0;M<L.length;M++)mxUtils.remove(L[M],K)}}this.model.beginUpdate();try{var O=I.call(this,K,m);if(O.length==K.length)for(D=
-0;D<K.length;D++)if(c(K[D])){var P=n.getIncomingTreeEdges(O[D]);L=n.getIncomingTreeEdges(K[D]);if(0==P.length&&0<L.length){var T=this.cloneCell(L[0]);this.addEdge(T,n.getDefaultParent(),this.model.getTerminal(L[0],!0),O[D])}}}finally{this.model.endUpdate()}return O};var H=n.moveCells;n.moveCells=function(K,m,t,D,M,L,O){for(var P=null,T=[],V=0;V<K.length;V++)(p(K[V])||c(K[V]))&&!u(K[V])&&this.isCellCollapsed(K[V])?T=T.concat(this.getSubtree(K[V])):T.push(K[V]);K=mxUtils.removeDuplicates(T);this.model.beginUpdate();
-try{T=M;var X=this.getCurrentCellStyle(M);if(null!=K&&c(M)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<K.length;V++)if(c(K[V])||n.model.isEdge(K[V])&&null==n.model.getTerminal(K[V],!0)){M=n.model.getParent(K[V]);break}if(null!=T&&M!=T&&null!=this.view.getState(K[0])){var W=n.getIncomingTreeEdges(K[0]);if(0<W.length){var Y=n.view.getState(n.model.getTerminal(W[0],!0));if(null!=Y){var Z=n.view.getState(T);null!=Z&&(m=(Z.getCenterX()-Y.getCenterX())/n.view.scale,t=(Z.getCenterY()-Y.getCenterY())/
-n.view.scale)}}}}P=H.apply(this,arguments);if(null!=P&&null!=K&&P.length==K.length)for(V=0;V<P.length;V++)if(this.model.isEdge(P[V]))c(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[V],!0))&&this.model.setTerminal(P[V],T,!0);else if(c(K[V])&&(W=n.getIncomingTreeEdges(K[V]),0<W.length))if(!D)c(T)&&0>mxUtils.indexOf(K,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],T,!0);else if(0==n.getIncomingTreeEdges(P[V]).length){X=T;if(null==X||X==n.model.getParent(K[V]))X=n.model.getTerminal(W[0],
+0;D<K.length;D++)if(c(K[D])){var P=n.getIncomingTreeEdges(O[D]);L=n.getIncomingTreeEdges(K[D]);if(0==P.length&&0<L.length){var U=this.cloneCell(L[0]);this.addEdge(U,n.getDefaultParent(),this.model.getTerminal(L[0],!0),O[D])}}}finally{this.model.endUpdate()}return O};var G=n.moveCells;n.moveCells=function(K,m,t,D,M,L,O){for(var P=null,U=[],V=0;V<K.length;V++)(p(K[V])||c(K[V]))&&!u(K[V])&&this.isCellCollapsed(K[V])?U=U.concat(this.getSubtree(K[V])):U.push(K[V]);K=mxUtils.removeDuplicates(U);this.model.beginUpdate();
+try{U=M;var X=this.getCurrentCellStyle(M);if(null!=K&&c(M)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<K.length;V++)if(c(K[V])||n.model.isEdge(K[V])&&null==n.model.getTerminal(K[V],!0)){M=n.model.getParent(K[V]);break}if(null!=U&&M!=U&&null!=this.view.getState(K[0])){var W=n.getIncomingTreeEdges(K[0]);if(0<W.length){var Y=n.view.getState(n.model.getTerminal(W[0],!0));if(null!=Y){var Z=n.view.getState(U);null!=Z&&(m=(Z.getCenterX()-Y.getCenterX())/n.view.scale,t=(Z.getCenterY()-Y.getCenterY())/
+n.view.scale)}}}}P=G.apply(this,arguments);if(null!=P&&null!=K&&P.length==K.length)for(V=0;V<P.length;V++)if(this.model.isEdge(P[V]))c(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[V],!0))&&this.model.setTerminal(P[V],U,!0);else if(c(K[V])&&(W=n.getIncomingTreeEdges(K[V]),0<W.length))if(!D)c(U)&&0>mxUtils.indexOf(K,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],U,!0);else if(0==n.getIncomingTreeEdges(P[V]).length){X=U;if(null==X||X==n.model.getParent(K[V]))X=n.model.getTerminal(W[0],
!0);D=this.cloneCell(W[0]);this.addEdge(D,n.getDefaultParent(),X,P[V])}}finally{this.model.endUpdate()}return P};if(null!=l.sidebar){var C=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(K,m,t,D){var M=n.model,L=null;M.beginUpdate();try{if(L=C.apply(this,arguments),c(K))for(var O=0;O<L.length;O++)if(M.isEdge(L[O])&&null==M.getTerminal(L[O],!0)){M.setTerminal(L[O],K,!0);var P=n.getCellGeometry(L[O]);P.points=null;null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{M.endUpdate()}return L}}var R=
-{67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},U={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},S=l.onKeyDown;l.onKeyDown=function(K){try{var m=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=m){var t=mxEvent.isAltDown(K)&&mxEvent.isShiftDown(K)?R[K.keyCode]:mxEvent.isAltDown(K)?U[K.keyCode]:null;null!=t?(t.funct(K),mxEvent.consume(K)):c(m)&&(t=null,0<n.getIncomingTreeEdges(m).length&&
-(9==K.which?t=mxEvent.isShiftDown(K)?E(m):F(m):13==K.which&&(t=G(m,!mxEvent.isShiftDown(K)))),null!=t&&0<t.length?(1==t.length&&n.model.isEdge(t[0])?n.setSelectionCell(n.model.getTerminal(t[0],!1)):n.setSelectionCell(t[t.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(m)),n.startEditingAtCell(m),mxEvent.consume(K)):37==K.keyCode?(k(m,mxConstants.DIRECTION_WEST),mxEvent.consume(K)):38==K.keyCode?(k(m,mxConstants.DIRECTION_NORTH),mxEvent.consume(K)):39==K.keyCode?(k(m,mxConstants.DIRECTION_EAST),
-mxEvent.consume(K)):40==K.keyCode&&(k(m,mxConstants.DIRECTION_SOUTH),mxEvent.consume(K)))}}catch(D){l.handleError(D)}mxEvent.isConsumed(K)||S.apply(this,arguments)};var Q=n.connectVertex;n.connectVertex=function(K,m,t,D,M,L,O){var P=n.getIncomingTreeEdges(K);if(c(K)){var T=y(K),V=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,X=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;return T==m||0==P.length?F(K,m):V==X?E(K):G(K,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return Q.apply(this,
+{67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},T={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},S=l.onKeyDown;l.onKeyDown=function(K){try{var m=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=m){var t=mxEvent.isAltDown(K)&&mxEvent.isShiftDown(K)?R[K.keyCode]:mxEvent.isAltDown(K)?T[K.keyCode]:null;null!=t?(t.funct(K),mxEvent.consume(K)):c(m)&&(t=null,0<n.getIncomingTreeEdges(m).length&&
+(9==K.which?t=mxEvent.isShiftDown(K)?E(m):F(m):13==K.which&&(t=H(m,!mxEvent.isShiftDown(K)))),null!=t&&0<t.length?(1==t.length&&n.model.isEdge(t[0])?n.setSelectionCell(n.model.getTerminal(t[0],!1)):n.setSelectionCell(t[t.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(m)),n.startEditingAtCell(m),mxEvent.consume(K)):37==K.keyCode?(k(m,mxConstants.DIRECTION_WEST),mxEvent.consume(K)):38==K.keyCode?(k(m,mxConstants.DIRECTION_NORTH),mxEvent.consume(K)):39==K.keyCode?(k(m,mxConstants.DIRECTION_EAST),
+mxEvent.consume(K)):40==K.keyCode&&(k(m,mxConstants.DIRECTION_SOUTH),mxEvent.consume(K)))}}catch(D){l.handleError(D)}mxEvent.isConsumed(K)||S.apply(this,arguments)};var Q=n.connectVertex;n.connectVertex=function(K,m,t,D,M,L,O){var P=n.getIncomingTreeEdges(K);if(c(K)){var U=y(K),V=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,X=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;return U==m||0==P.length?F(K,m):V==X?E(K):H(K,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return Q.apply(this,
arguments)};n.getSubtree=function(K){var m=[K];!p(K)&&!c(K)||u(K)||n.traverse(K,!0,function(t,D){var M=null!=D&&n.isTreeEdge(D);M&&0>mxUtils.indexOf(m,D)&&m.push(D);(null==D||M)&&0>mxUtils.indexOf(m,t)&&m.push(t);return null==D||M});return m};var v=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){v.apply(this,arguments);(p(this.state.cell)||c(this.state.cell))&&!u(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?
null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(K){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(K),mxEvent.getClientY(K),
-this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(K);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(K)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var A=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){A.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=
+this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(K);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(K)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var z=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){z.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=
this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var N=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(K){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=K?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(K,m){J.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=g.apply(this,arguments),p=this.graph,q=this;return c.concat([this.addEntry("tree container",function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var y=new mxCell("Parent",
-new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var G=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);G.insertEdge(E,!1);u.insert(E);u.insert(y);u.insert(G);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var y=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-y.vertex=!0;var G=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);G.insertEdge(E,!1);var F=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var H=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);H.insertEdge(E,!1);u.insert(E);u.insert(y);u.insert(H);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var y=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+y.vertex=!0;var H=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);H.insertEdge(E,!1);var F=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
F.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),E.style);d.geometry.relative=!0;d.edge=!0;y.insertEdge(d,!0);F.insertEdge(d,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),E.style);l.geometry.relative=!0;l.edge=!0;y.insertEdge(l,!0);k.insertEdge(l,!1);var n=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;y.insertEdge(x,!0);n.insertEdge(x,!1);u.insert(E);u.insert(d);u.insert(l);u.insert(x);u.insert(y);u.insert(G);u.insert(F);u.insert(k);u.insert(n);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),E.style);x.geometry.relative=!0;x.edge=!0;y.insertEdge(x,!0);n.insertEdge(x,!1);u.insert(E);u.insert(d);u.insert(l);u.insert(x);u.insert(y);u.insert(H);u.insert(F);u.insert(k);u.insert(n);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
u.vertex=!0;return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var u=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);return q.createVertexTemplateFromCells([u,y],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var u=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);return q.createVertexTemplateFromCells([u,y],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree orgchart organization division",function(){var u=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var y=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;var G=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);G.insertEdge(E,!1);var F=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");d.geometry.relative=
-!0;d.edge=!0;y.insertEdge(d,!0);F.insertEdge(d,!1);u.insert(E);u.insert(d);u.insert(y);u.insert(G);u.insert(F);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;return q.createVertexTemplateFromCells([u],
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;var H=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+E.geometry.relative=!0;E.edge=!0;y.insertEdge(E,!0);H.insertEdge(E,!1);var F=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");d.geometry.relative=
+!0;d.edge=!0;y.insertEdge(d,!0);F.insertEdge(d,!1);u.insert(E);u.insert(d);u.insert(y);u.insert(H);u.insert(F);return q.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;return q.createVertexTemplateFromCells([u],
u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree division",function(){var u=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
y.geometry.setTerminalPoint(new mxPoint(0,0),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);return q.createVertexTemplateFromCells([u,y],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-y.geometry.setTerminalPoint(new mxPoint(110,-40),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);var G=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");G.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),y.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;G.insertEdge(E,!1);return q.createVertexTemplateFromCells([y,E,u,G],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+y.geometry.setTerminalPoint(new mxPoint(110,-40),!0);y.geometry.relative=!0;y.edge=!0;u.insertEdge(y,!1);var H=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");H.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),y.style);E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!1);return q.createVertexTemplateFromCells([y,E,u,H],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(E,F){if(EditorUi.windowed){var d=E.editor.graph;d.popupMenuHandler.hideMenu();null==E.formatWindow?(E.formatWindow=new WrapperWindow(E,"",Math.max(10,E.diagramContainer.clientWidth-248),60,240,Math.min(566,d.container.clientHeight-10),function(k){k.className="geSidebarContainer geFormatContainer";E.createFormat(k).init()}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.formatWindow.window.setTitle(mxResources.get("format"))})),E.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){E.formatWindow.window.fit()})),E.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):E.formatWindow.window.setVisible(null!=F?F:!E.formatWindow.window.isVisible())}else null==E.formatElt&&(E.formatElt=E.createSidebarContainer(),E.createFormat(E.formatElt).init(),E.formatElt.style.border="none",E.formatElt.style.width="240px",E.formatElt.style.borderLeftWidth="1px",E.formatElt.style.borderLeftStyle="solid",E.formatElt.style.right="0px"),F=E.diagramContainer.parentNode,
null!=E.formatElt.parentNode?(E.formatElt.parentNode.removeChild(E.formatElt),F.style.right="0px"):(F.parentNode.appendChild(E.formatElt),F.style.right=E.formatElt.style.width)}function f(E,F){if(EditorUi.windowed){var d=E.editor.graph;d.popupMenuHandler.hideMenu();null==E.sidebarWindow?(E.sidebarWindow=new WrapperWindow(E,"",10,56,Math.min(d.container.clientWidth-10,218)-6,Math.min(d.container.clientHeight-40,650)-6,function(k){E.createShapesPanel(k)}),E.dependsOnLanguage(mxUtils.bind(this,function(){E.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
@@ -14374,73 +14376,73 @@ function(E){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=E?
arguments);if(E){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=F&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=F&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};EditorUi.prototype.installFormatToolbar=function(E){var F=
this.editor.graph,d=document.createElement("div");d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";F.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,l){0<F.getSelectionCount()?(E.appendChild(d),d.innerHTML="Selected: "+F.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var y=!1;EditorUi.prototype.initFormatWindow=
function(){if(!y&&null!=this.formatWindow){y=!0;var E=this.formatWindow.window.toggleMinimized,F=240;this.formatWindow.window.toggleMinimized=function(){E.apply(this,arguments);this.minimized?(F=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+F-140+"px"):(this.div.style.width=F+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-F+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(d){mxEvent.getSource(d)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(D,M,L){var O=n.menus.get(D);M=B.addMenu(mxResources.get(D),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));M.className="geButton";M.setAttribute("title",mxResources.get(D));n.menus.menuCreated(O,M,"geButton");null!=L&&
-(M.style.backgroundImage="url("+L+")",M.innerText="");return M}function F(D,M,L,O,P,T){var V=document.createElement("a");V.className="geButton";z.appendChild(V);null!=T?V.style.backgroundImage="url("+T+")":mxUtils.write(V,D);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&M(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=P&&(D=function(){P.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},P.addListener("stateChanged",
-D),x.addListener("enabledChanged",D),D());return V}function d(D,M,L){M=document.createElement("div");M.className="geButtonGroup";for(L=0;L<D.length;L++)null!=D[L]&&M.appendChild(D[L]);z.appendChild(M);return M}function k(){g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;z.innerHTML="";var D=1E3>g,M=E("diagram",null,D?Editor.menuImage:null);d([M,F(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),
-D?Editor.shapesImage:null),F(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),D?Editor.formatImage:null)]);M=E("insert",!0,D?U:null);d([M,F(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),D?Editor.trashImage:null)]);x.isEnabled()||M.setAttribute("disabled","disabled");K.setAttribute("title",mxResources.get("undo")+" ("+N.shortcut+")");
-m.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");t.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(d([K,m]),520<=g&&d([t,640<=g?F("",v.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",v,Editor.zoomInImage):null,640<=g?F("",A.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",A,Editor.zoomOutImage):null]));z.appendChild(n.statusContainer);z.appendChild(n.buttonContainer)}G.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(d){mxEvent.getSource(d)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(D,M,L){var O=n.menus.get(D);M=B.addMenu(mxResources.get(D),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));M.className="geButton";M.setAttribute("title",mxResources.get(D));n.menus.menuCreated(O,M,"geButton");null!=L&&
+(M.style.backgroundImage="url("+L+")",M.innerText="");return M}function F(D,M,L,O,P,U){var V=document.createElement("a");V.className="geButton";A.appendChild(V);null!=U?V.style.backgroundImage="url("+U+")":mxUtils.write(V,D);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&M(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=P&&(D=function(){P.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},P.addListener("stateChanged",
+D),x.addListener("enabledChanged",D),D());return V}function d(D,M,L){M=document.createElement("div");M.className="geButtonGroup";for(L=0;L<D.length;L++)null!=D[L]&&M.appendChild(D[L]);A.appendChild(M);return M}function k(){g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;A.innerHTML="";var D=1E3>g,M=E("diagram",null,D?Editor.menuImage:null);d([M,F(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),
+D?Editor.shapesImage:null),F(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),D?Editor.formatImage:null)]);M=E("insert",!0,D?T:null);d([M,F(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),D?Editor.trashImage:null)]);x.isEnabled()||M.setAttribute("disabled","disabled");K.setAttribute("title",mxResources.get("undo")+" ("+N.shortcut+")");
+m.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");t.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(d([K,m]),520<=g&&d([t,640<=g?F("",v.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",v,Editor.zoomInImage):null,640<=g?F("",z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",z,Editor.zoomOutImage):null]));A.appendChild(n.statusContainer);A.appendChild(n.buttonContainer)}H.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,
this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=g||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&
-1E3<=g&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var z=document.createElement("div");z.className="geMenubarContainer";var B=new Menubar(n,z),I=n.hideCurrentMenu;n.hideCurrentMenu=function(){I.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var H=n.descriptorChanged;n.descriptorChanged=function(){H.apply(this,arguments);var D=n.getCurrentFile();if(null!=D&&null!=D.getTitle()){var M=D.getMode();
-"google"==M?M="googleDrive":"github"==M?M="gitHub":"gitlab"==M?M="gitLab":"onedrive"==M&&(M="oneDrive");M=mxResources.get(M);z.setAttribute("title",D.getTitle()+(null!=M?" ("+M+")":""))}else z.removeAttribute("title")};n.setStatusText(n.editor.getStatus());z.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();z.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var C=this.createZoomInput(!0),R=n.updateTabContainer;
-n.updateTabContainer=function(){R.apply(this,arguments);n.tabContainer.appendChild(C)};var U=Editor.addBoxImage;if(null!=n.hoverIcons){var S=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=x.freehand){var Q=x.freehand.createStyle;x.freehand.createStyle=function(D){return Q.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
-var v=n.actions.get("zoomIn"),A=n.actions.get("zoomOut");l=n.actions.get("resetView");var N=n.actions.get("undo"),J=n.actions.get("redo"),K=F("",N.funct,null,"",N,Editor.undoImage),m=F("",J.funct,null,"",J,Editor.redoImage),t=F("",function(D){mxEvent.isAltDown(D)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(D)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});
-n.container.appendChild(n.tabContainer);n.container.appendChild(z);n.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);k();n.addListener("lockedChanged",k);n.addListener("languageChanged",k);n.editor.graph.addListener("enabledChanged",k);mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();
-null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,p,q,u){var y=p.y,G=p.x,E=!1,F=!1;if(null!=this.states&&null!=c&&null!=p){var d=this,k=new mxCellState,l=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);k.x=c.x+G;k.y=c.y+y;k.width=c.width;k.height=c.height;for(var x=[],z=[],B=0;B<this.states.length;B++){var I=this.states[B];I instanceof mxCellState&&(u||!this.graph.isCellSelected(I.cell))&&((k.x>=I.x&&k.x<=I.x+I.width||I.x>=k.x&&I.x<=k.x+k.width)&&(k.y>
-I.y+I.height+4||k.y+k.height+4<I.y)?x.push(I):(k.y>=I.y&&k.y<=I.y+I.height||I.y>=k.y&&I.y<=k.y+k.height)&&(k.x>I.x+I.width+4||k.x+k.width+4<I.x)&&z.push(I))}var H=0,C=0,R=I=0,U=0,S=0,Q=0,v=0,A=5*l;if(1<x.length){x.push(k);x.sort(function(m,t){return m.y-t.y});var N=!1;B=k==x[0];l=k==x[x.length-1];if(!B&&!l)for(B=1;B<x.length-1;B++)if(k==x[B]){l=x[B-1];B=x[B+1];I=C=R=(B.y-l.y-l.height-k.height)/2;break}for(B=0;B<x.length-1;B++){l=x[B];var J=x[B+1],K=k==l||k==J;J=J.y-l.y-l.height;N|=k==l;if(0==C&&0==
-H)C=J,H=1;else if(Math.abs(C-J)<=(K||1==B&&N?n:0))H+=1;else if(1<H&&N){x=x.slice(0,B+1);break}else if(3<=x.length-B&&!N)H=0,I=C=0!=R?R:0,x.splice(0,0==B?1:B),B=-1;else break;0!=I||K||(C=I=J)}3==x.length&&x[1]==k&&(I=0)}if(1<z.length){z.push(k);z.sort(function(m,t){return m.x-t.x});N=!1;B=k==z[0];l=k==z[z.length-1];if(!B&&!l)for(B=1;B<z.length-1;B++)if(k==z[B]){l=z[B-1];B=z[B+1];Q=S=v=(B.x-l.x-l.width-k.width)/2;break}for(B=0;B<z.length-1;B++){l=z[B];J=z[B+1];K=k==l||k==J;J=J.x-l.x-l.width;N|=k==l;
-if(0==S&&0==U)S=J,U=1;else if(Math.abs(S-J)<=(K||1==B&&N?n:0))U+=1;else if(1<U&&N){z=z.slice(0,B+1);break}else if(3<=z.length-B&&!N)U=0,Q=S=0!=v?v:0,z.splice(0,0==B?1:B),B=-1;else break;0!=Q||K||(S=Q=J)}3==z.length&&z[1]==k&&(Q=0)}n=function(m,t,D,M){var L=[];if(M){M=A;var O=0}else M=0,O=A;L.push(new mxPoint(m.x-M,m.y-O));L.push(new mxPoint(m.x+M,m.y+O));L.push(m);L.push(t);L.push(new mxPoint(t.x-M,t.y-O));L.push(new mxPoint(t.x+M,t.y+O));if(null!=D)return D.points=L,D;m=new mxPolyline(L,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);m.dialect=mxConstants.DIALECT_SVG;m.pointerEvents=!1;m.init(d.graph.getView().getOverlayPane());return m};S=function(m,t){if(m&&null!=d.guidesArrHor)for(m=0;m<d.guidesArrHor.length;m++)d.guidesArrHor[m].node.style.visibility="hidden";if(t&&null!=d.guidesArrVer)for(m=0;m<d.guidesArrVer.length;m++)d.guidesArrVer[m].node.style.visibility="hidden"};if(1<U&&U==z.length-1){U=[];v=d.guidesArrHor;E=[];G=0;B=z[0]==k?1:0;N=z[B].y+z[B].height;if(0<Q)for(B=0;B<z.length-1;B++)l=
-z[B],J=z[B+1],k==l?(G=J.x-l.width-Q,E.push(new mxPoint(G+l.width+A,N)),E.push(new mxPoint(J.x-A,N))):k==J?(E.push(new mxPoint(l.x+l.width+A,N)),G=l.x+l.width+Q,E.push(new mxPoint(G-A,N))):(E.push(new mxPoint(l.x+l.width+A,N)),E.push(new mxPoint(J.x-A,N)));else l=z[0],B=z[2],G=l.x+l.width+(B.x-l.x-l.width-k.width)/2,E.push(new mxPoint(l.x+l.width+A,N)),E.push(new mxPoint(G-A,N)),E.push(new mxPoint(G+k.width+A,N)),E.push(new mxPoint(B.x-A,N));for(B=0;B<E.length;B+=2)z=E[B],Q=E[B+1],z=n(z,Q,null!=v?
-v[B/2]:null),z.node.style.visibility="visible",z.redraw(),U.push(z);for(B=E.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrHor=U;G-=c.x;E=!0}else S(!0);if(1<H&&H==x.length-1){U=[];v=d.guidesArrVer;F=[];y=0;B=x[0]==k?1:0;H=x[B].x+x[B].width;if(0<I)for(B=0;B<x.length-1;B++)l=x[B],J=x[B+1],k==l?(y=J.y-l.height-I,F.push(new mxPoint(H,y+l.height+A)),F.push(new mxPoint(H,J.y-A))):k==J?(F.push(new mxPoint(H,l.y+l.height+A)),y=l.y+l.height+I,F.push(new mxPoint(H,y-A))):(F.push(new mxPoint(H,l.y+
-l.height+A)),F.push(new mxPoint(H,J.y-A)));else l=x[0],B=x[2],y=l.y+l.height+(B.y-l.y-l.height-k.height)/2,F.push(new mxPoint(H,l.y+l.height+A)),F.push(new mxPoint(H,y-A)),F.push(new mxPoint(H,y+k.height+A)),F.push(new mxPoint(H,B.y-A));for(B=0;B<F.length;B+=2)z=F[B],Q=F[B+1],z=n(z,Q,null!=v?v[B/2]:null,!0),z.node.style.visibility="visible",z.redraw(),U.push(z);for(B=F.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrVer=U;y-=c.y;F=!0}else S(!1,!0)}if(E||F)return k=new mxPoint(G,y),x=b.call(this,
+1E3<=g&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var A=document.createElement("div");A.className="geMenubarContainer";var B=new Menubar(n,A),I=n.hideCurrentMenu;n.hideCurrentMenu=function(){I.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var G=n.descriptorChanged;n.descriptorChanged=function(){G.apply(this,arguments);var D=n.getCurrentFile();if(null!=D&&null!=D.getTitle()){var M=D.getMode();
+"google"==M?M="googleDrive":"github"==M?M="gitHub":"gitlab"==M?M="gitLab":"onedrive"==M&&(M="oneDrive");M=mxResources.get(M);A.setAttribute("title",D.getTitle()+(null!=M?" ("+M+")":""))}else A.removeAttribute("title")};n.setStatusText(n.editor.getStatus());A.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();A.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var C=this.createZoomInput(!0),R=n.updateTabContainer;
+n.updateTabContainer=function(){R.apply(this,arguments);n.tabContainer.appendChild(C)};var T=Editor.addBoxImage;if(null!=n.hoverIcons){var S=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=x.freehand){var Q=x.freehand.createStyle;x.freehand.createStyle=function(D){return Q.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());
+var v=n.actions.get("zoomIn"),z=n.actions.get("zoomOut");l=n.actions.get("resetView");var N=n.actions.get("undo"),J=n.actions.get("redo"),K=F("",N.funct,null,"",N,Editor.undoImage),m=F("",J.funct,null,"",J,Editor.redoImage),t=F("",function(D){mxEvent.isAltDown(D)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(D)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});
+n.container.appendChild(n.tabContainer);n.container.appendChild(A);n.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);k();n.addListener("lockedChanged",k);n.addListener("languageChanged",k);n.editor.graph.addListener("enabledChanged",k);mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();
+null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,p,q,u){var y=p.y,H=p.x,E=!1,F=!1;if(null!=this.states&&null!=c&&null!=p){var d=this,k=new mxCellState,l=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);k.x=c.x+H;k.y=c.y+y;k.width=c.width;k.height=c.height;for(var x=[],A=[],B=0;B<this.states.length;B++){var I=this.states[B];I instanceof mxCellState&&(u||!this.graph.isCellSelected(I.cell))&&((k.x>=I.x&&k.x<=I.x+I.width||I.x>=k.x&&I.x<=k.x+k.width)&&(k.y>
+I.y+I.height+4||k.y+k.height+4<I.y)?x.push(I):(k.y>=I.y&&k.y<=I.y+I.height||I.y>=k.y&&I.y<=k.y+k.height)&&(k.x>I.x+I.width+4||k.x+k.width+4<I.x)&&A.push(I))}var G=0,C=0,R=I=0,T=0,S=0,Q=0,v=0,z=5*l;if(1<x.length){x.push(k);x.sort(function(m,t){return m.y-t.y});var N=!1;B=k==x[0];l=k==x[x.length-1];if(!B&&!l)for(B=1;B<x.length-1;B++)if(k==x[B]){l=x[B-1];B=x[B+1];I=C=R=(B.y-l.y-l.height-k.height)/2;break}for(B=0;B<x.length-1;B++){l=x[B];var J=x[B+1],K=k==l||k==J;J=J.y-l.y-l.height;N|=k==l;if(0==C&&0==
+G)C=J,G=1;else if(Math.abs(C-J)<=(K||1==B&&N?n:0))G+=1;else if(1<G&&N){x=x.slice(0,B+1);break}else if(3<=x.length-B&&!N)G=0,I=C=0!=R?R:0,x.splice(0,0==B?1:B),B=-1;else break;0!=I||K||(C=I=J)}3==x.length&&x[1]==k&&(I=0)}if(1<A.length){A.push(k);A.sort(function(m,t){return m.x-t.x});N=!1;B=k==A[0];l=k==A[A.length-1];if(!B&&!l)for(B=1;B<A.length-1;B++)if(k==A[B]){l=A[B-1];B=A[B+1];Q=S=v=(B.x-l.x-l.width-k.width)/2;break}for(B=0;B<A.length-1;B++){l=A[B];J=A[B+1];K=k==l||k==J;J=J.x-l.x-l.width;N|=k==l;
+if(0==S&&0==T)S=J,T=1;else if(Math.abs(S-J)<=(K||1==B&&N?n:0))T+=1;else if(1<T&&N){A=A.slice(0,B+1);break}else if(3<=A.length-B&&!N)T=0,Q=S=0!=v?v:0,A.splice(0,0==B?1:B),B=-1;else break;0!=Q||K||(S=Q=J)}3==A.length&&A[1]==k&&(Q=0)}n=function(m,t,D,M){var L=[];if(M){M=z;var O=0}else M=0,O=z;L.push(new mxPoint(m.x-M,m.y-O));L.push(new mxPoint(m.x+M,m.y+O));L.push(m);L.push(t);L.push(new mxPoint(t.x-M,t.y-O));L.push(new mxPoint(t.x+M,t.y+O));if(null!=D)return D.points=L,D;m=new mxPolyline(L,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);m.dialect=mxConstants.DIALECT_SVG;m.pointerEvents=!1;m.init(d.graph.getView().getOverlayPane());return m};S=function(m,t){if(m&&null!=d.guidesArrHor)for(m=0;m<d.guidesArrHor.length;m++)d.guidesArrHor[m].node.style.visibility="hidden";if(t&&null!=d.guidesArrVer)for(m=0;m<d.guidesArrVer.length;m++)d.guidesArrVer[m].node.style.visibility="hidden"};if(1<T&&T==A.length-1){T=[];v=d.guidesArrHor;E=[];H=0;B=A[0]==k?1:0;N=A[B].y+A[B].height;if(0<Q)for(B=0;B<A.length-1;B++)l=
+A[B],J=A[B+1],k==l?(H=J.x-l.width-Q,E.push(new mxPoint(H+l.width+z,N)),E.push(new mxPoint(J.x-z,N))):k==J?(E.push(new mxPoint(l.x+l.width+z,N)),H=l.x+l.width+Q,E.push(new mxPoint(H-z,N))):(E.push(new mxPoint(l.x+l.width+z,N)),E.push(new mxPoint(J.x-z,N)));else l=A[0],B=A[2],H=l.x+l.width+(B.x-l.x-l.width-k.width)/2,E.push(new mxPoint(l.x+l.width+z,N)),E.push(new mxPoint(H-z,N)),E.push(new mxPoint(H+k.width+z,N)),E.push(new mxPoint(B.x-z,N));for(B=0;B<E.length;B+=2)A=E[B],Q=E[B+1],A=n(A,Q,null!=v?
+v[B/2]:null),A.node.style.visibility="visible",A.redraw(),T.push(A);for(B=E.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrHor=T;H-=c.x;E=!0}else S(!0);if(1<G&&G==x.length-1){T=[];v=d.guidesArrVer;F=[];y=0;B=x[0]==k?1:0;G=x[B].x+x[B].width;if(0<I)for(B=0;B<x.length-1;B++)l=x[B],J=x[B+1],k==l?(y=J.y-l.height-I,F.push(new mxPoint(G,y+l.height+z)),F.push(new mxPoint(G,J.y-z))):k==J?(F.push(new mxPoint(G,l.y+l.height+z)),y=l.y+l.height+I,F.push(new mxPoint(G,y-z))):(F.push(new mxPoint(G,l.y+
+l.height+z)),F.push(new mxPoint(G,J.y-z)));else l=x[0],B=x[2],y=l.y+l.height+(B.y-l.y-l.height-k.height)/2,F.push(new mxPoint(G,l.y+l.height+z)),F.push(new mxPoint(G,y-z)),F.push(new mxPoint(G,y+k.height+z)),F.push(new mxPoint(G,B.y-z));for(B=0;B<F.length;B+=2)A=F[B],Q=F[B+1],A=n(A,Q,null!=v?v[B/2]:null,!0),A.node.style.visibility="visible",A.redraw(),T.push(A);for(B=F.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrVer=T;y-=c.y;F=!0}else S(!1,!0)}if(E||F)return k=new mxPoint(H,y),x=b.call(this,
c,k,q,u),E&&!F?k.y=x.y:F&&!E&&(k.x=x.x),x.y!=k.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=k.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),k;S(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){f.call(this,c);var p=this.guidesArrVer,q=this.guidesArrHor;if(null!=p)for(var u=0;u<p.length;u++)p[u].node.style.visibility=c?"visible":"hidden";if(null!=
-q)for(u=0;u<q.length;u++)q[u].node.style.visibility=c?"visible":"hidden"};var g=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){g.call(this);var c=this.guidesArrVer,p=this.guidesArrHor;if(null!=c){for(var q=0;q<c.length;q++)c[q].destroy();this.guidesArrVer=null}if(null!=p){for(q=0;q<p.length;q++)p[q].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,g,c){function p(){var H=b.getDiagramContainerOffset(),C=b.diagramContainer;d.style.top=C.offsetTop-H.y+"px";d.style.left=C.offsetLeft-H.x+"px";d.style.width=(g?0:C.offsetWidth)+G+"px";d.style.height=(g?C.offsetHeight:0)+G+"px"}function q(H,C,R){if(null!=u)return H;var U;return function(){var S=this,Q=arguments,v=R&&!U;clearTimeout(U);U=setTimeout(function(){U=null;R||H.apply(S,Q)},C);v&&H.apply(S,Q)}}var u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
-window.msRequestAnimationFrame,y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,G=this.RULER_THICKNESS,E=this;this.unit=f;var F=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},d=document.createElement("div");d.className="geRuler";d.style.position="fixed";this.updateStyle=mxUtils.bind(this,
-function(){F=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[g?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;d.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(H){E.editorUiRefresh.apply(b,
-arguments);p()};p();var k=document.createElement("canvas");k.width=d.offsetWidth;k.height=d.offsetHeight;d.style.overflow="hidden";k.style.position="relative";d.appendChild(k);var l=k.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=d;this.canvas=k;var x=function(H,C,R,U,S){H=Math.round(H);C=Math.round(C);R=Math.round(R);U=Math.round(U);l.beginPath();l.moveTo(H+.5,C+.5);l.lineTo(R+.5,U+.5);l.stroke();S&&(g?(l.save(),l.translate(H,C),l.rotate(-Math.PI/2),l.fillText(S,0,0),
-l.restore()):l.fillText(S,H,C))},z=function(){l.clearRect(0,0,k.width,k.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=F.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var H=n.view.scale,C=n.view.getBackgroundPageBounds(),R=n.view.translate,U=n.pageVisible;R=U?G+(g?C.y-n.container.scrollTop:C.x-n.container.scrollLeft):G+(g?R.y*H-n.container.scrollTop:R.x*H-n.container.scrollLeft);var S=0;U&&(S=n.getPageLayout(),S=g?S.y*n.pageFormat.height:S.x*n.pageFormat.width);var Q;switch(E.unit){case mxConstants.POINTS:var v=
-Q=10;var A=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;v=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;v=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:Q=.5>=H||4<=H?8:16,v=mxConstants.PIXELS_PER_INCH/Q,A=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var N=v;2<=H?N=v/(2*Math.floor(H/2)):.5>=H&&(N=v*Math.floor(1/H/2)*(E.unit==mxConstants.MILLIMETERS?2:1));v=null;C=U?Math.min(R+(g?C.height:C.width),g?
-k.height:k.width):g?k.height:k.width;if(U)if(l.fillStyle=F.outBkgClr,g){var J=R-G;0<J&&l.fillRect(0,G,G,J);C<k.height&&l.fillRect(0,C,G,k.height)}else J=R-G,0<J&&l.fillRect(G,0,J,G),C<k.width&&l.fillRect(C,0,k.width,G);l.fillStyle=F.fontClr;for(U=U?R:R%(N*H);U<=C;U+=N*H)if(J=Math.round((U-R)/H/N),!(U<G||J==v)){v=J;var K=null;0==J%Q&&(K=E.formatText(S+J*N)+"");g?x(G-A[Math.abs(J)%Q],U,G,U,K):x(U,G-A[Math.abs(J)%Q],U,G,K)}l.lineWidth=1;x(g?0:G,g?G:0,G,G);l.fillStyle=F.cornerClr;l.fillRect(0,0,G,G)},
-B=-1,I=function(){null!=u?(null!=y&&y(B),B=u(z)):z()};this.drawRuler=I;this.sizeListener=f=q(function(){var H=n.container;g?(H=H.offsetHeight+G,k.height!=H&&(k.height=H,d.style.height=H+"px",I())):(H=H.offsetWidth+G,k.width!=H&&(k.width=H,d.style.width=H+"px",I()))},10);this.pageListener=function(){I()};this.scrollListener=c=q(function(){var H=g?n.container.scrollTop:n.container.scrollLeft;E.lastScroll!=H&&(E.lastScroll=H,I())},10);this.unitListener=function(H,C){E.setUnit(C.getProperty("unit"))};
-n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",c);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(H){F=H;d.style.background=F.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(H,C,R,U){if(g&&4<H.height||!g&&4<H.width){if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,
-E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3)}catch(M){}var S=E.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=F.guideClr;l.setLineDash([2]);if(g){var Q=H.y+S.y+G-this.graph.container.scrollTop;var v=0;var A=Q+H.height/2;var N=G/2;var J=Q+H.height;var K=0;var m=l.getImageData(v,Q-1,G,3);x(v,Q,G,Q);Q--;var t=l.getImageData(N,A-1,G,3);x(N,A,G,A);A--;var D=l.getImageData(K,
-J-1,G,3);x(K,J,G,J);J--}else Q=0,v=H.x+S.x+G-this.graph.container.scrollLeft,A=G/2,N=v+H.width/2,J=0,K=v+H.width,m=l.getImageData(v-1,Q,3,G),x(v,Q,v,G),v--,t=l.getImageData(N-1,A,3,G),x(N,A,N,G),N--,D=l.getImageData(K-1,J,3,G),x(K,J,K,G),K--;if(null==E.guidePart||E.guidePart.x1!=v||E.guidePart.y1!=Q)E.guidePart={imgData1:m,x1:v,y1:Q,imgData2:t,x2:N,y2:A,imgData3:D,x3:K,y3:J}}catch(M){}}else S=E.origGuideMove.apply(this,arguments);return S};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
-function(){var H=E.origGuideDestroy.apply(this,arguments);if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3),E.guidePart=null}catch(C){}return H}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+q)for(u=0;u<q.length;u++)q[u].node.style.visibility=c?"visible":"hidden"};var g=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){g.call(this);var c=this.guidesArrVer,p=this.guidesArrHor;if(null!=c){for(var q=0;q<c.length;q++)c[q].destroy();this.guidesArrVer=null}if(null!=p){for(q=0;q<p.length;q++)p[q].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,g,c){function p(){var G=b.getDiagramContainerOffset(),C=b.diagramContainer;d.style.top=C.offsetTop-G.y+"px";d.style.left=C.offsetLeft-G.x+"px";d.style.width=(g?0:C.offsetWidth)+H+"px";d.style.height=(g?C.offsetHeight:0)+H+"px"}function q(G,C,R){if(null!=u)return G;var T;return function(){var S=this,Q=arguments,v=R&&!T;clearTimeout(T);T=setTimeout(function(){T=null;R||G.apply(S,Q)},C);v&&G.apply(S,Q)}}var u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
+window.msRequestAnimationFrame,y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,H=this.RULER_THICKNESS,E=this;this.unit=f;var F=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},d=document.createElement("div");d.className="geRuler";d.style.position="fixed";this.updateStyle=mxUtils.bind(this,
+function(){F=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[g?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;d.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(G){E.editorUiRefresh.apply(b,
+arguments);p()};p();var k=document.createElement("canvas");k.width=d.offsetWidth;k.height=d.offsetHeight;d.style.overflow="hidden";k.style.position="relative";d.appendChild(k);var l=k.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=d;this.canvas=k;var x=function(G,C,R,T,S){G=Math.round(G);C=Math.round(C);R=Math.round(R);T=Math.round(T);l.beginPath();l.moveTo(G+.5,C+.5);l.lineTo(R+.5,T+.5);l.stroke();S&&(g?(l.save(),l.translate(G,C),l.rotate(-Math.PI/2),l.fillText(S,0,0),
+l.restore()):l.fillText(S,G,C))},A=function(){l.clearRect(0,0,k.width,k.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=F.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var G=n.view.scale,C=n.view.getBackgroundPageBounds(),R=n.view.translate,T=n.pageVisible;R=T?H+(g?C.y-n.container.scrollTop:C.x-n.container.scrollLeft):H+(g?R.y*G-n.container.scrollTop:R.x*G-n.container.scrollLeft);var S=0;T&&(S=n.getPageLayout(),S=g?S.y*n.pageFormat.height:S.x*n.pageFormat.width);var Q;switch(E.unit){case mxConstants.POINTS:var v=
+Q=10;var z=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;v=mxConstants.PIXELS_PER_MM;z=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;v=mxConstants.PIXELS_PER_MM;z=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:Q=.5>=G||4<=G?8:16,v=mxConstants.PIXELS_PER_INCH/Q,z=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var N=v;2<=G?N=v/(2*Math.floor(G/2)):.5>=G&&(N=v*Math.floor(1/G/2)*(E.unit==mxConstants.MILLIMETERS?2:1));v=null;C=T?Math.min(R+(g?C.height:C.width),g?
+k.height:k.width):g?k.height:k.width;if(T)if(l.fillStyle=F.outBkgClr,g){var J=R-H;0<J&&l.fillRect(0,H,H,J);C<k.height&&l.fillRect(0,C,H,k.height)}else J=R-H,0<J&&l.fillRect(H,0,J,H),C<k.width&&l.fillRect(C,0,k.width,H);l.fillStyle=F.fontClr;for(T=T?R:R%(N*G);T<=C;T+=N*G)if(J=Math.round((T-R)/G/N),!(T<H||J==v)){v=J;var K=null;0==J%Q&&(K=E.formatText(S+J*N)+"");g?x(H-z[Math.abs(J)%Q],T,H,T,K):x(T,H-z[Math.abs(J)%Q],T,H,K)}l.lineWidth=1;x(g?0:H,g?H:0,H,H);l.fillStyle=F.cornerClr;l.fillRect(0,0,H,H)},
+B=-1,I=function(){null!=u?(null!=y&&y(B),B=u(A)):A()};this.drawRuler=I;this.sizeListener=f=q(function(){var G=n.container;g?(G=G.offsetHeight+H,k.height!=G&&(k.height=G,d.style.height=G+"px",I())):(G=G.offsetWidth+H,k.width!=G&&(k.width=G,d.style.width=G+"px",I()))},10);this.pageListener=function(){I()};this.scrollListener=c=q(function(){var G=g?n.container.scrollTop:n.container.scrollLeft;E.lastScroll!=G&&(E.lastScroll=G,I())},10);this.unitListener=function(G,C){E.setUnit(C.getProperty("unit"))};
+n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",c);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(G){F=G;d.style.background=F.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(G,C,R,T){if(g&&4<G.height||!g&&4<G.width){if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,
+E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3)}catch(M){}var S=E.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=F.guideClr;l.setLineDash([2]);if(g){var Q=G.y+S.y+H-this.graph.container.scrollTop;var v=0;var z=Q+G.height/2;var N=H/2;var J=Q+G.height;var K=0;var m=l.getImageData(v,Q-1,H,3);x(v,Q,H,Q);Q--;var t=l.getImageData(N,z-1,H,3);x(N,z,H,z);z--;var D=l.getImageData(K,
+J-1,H,3);x(K,J,H,J);J--}else Q=0,v=G.x+S.x+H-this.graph.container.scrollLeft,z=H/2,N=v+G.width/2,J=0,K=v+G.width,m=l.getImageData(v-1,Q,3,H),x(v,Q,v,H),v--,t=l.getImageData(N-1,z,3,H),x(N,z,N,H),N--,D=l.getImageData(K-1,J,3,H),x(K,J,K,H),K--;if(null==E.guidePart||E.guidePart.x1!=v||E.guidePart.y1!=Q)E.guidePart={imgData1:m,x1:v,y1:Q,imgData2:t,x2:N,y2:z,imgData3:D,x3:K,y3:J}}catch(M){}}else S=E.origGuideMove.apply(this,arguments);return S};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+function(){var G=E.origGuideDestroy.apply(this,arguments);if(null!=E.guidePart)try{l.putImageData(E.guidePart.imgData1,E.guidePart.x1,E.guidePart.y1),l.putImageData(E.guidePart.imgData2,E.guidePart.x2,E.guidePart.y2),l.putImageData(E.guidePart.imgData3,E.guidePart.x3,E.guidePart.y3),E.guidePart=null}catch(C){}return G}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,f){var g=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return g};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(c){var p=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(q){p=null!=b.currentMenu;mxEvent.consume(q)}),null,mxUtils.bind(this,function(q){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(q)||mxEvent.isPopupTrigger(q))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(q)||!p){var u=new mxPopupMenu(mxUtils.bind(this,function(E,F){b.menus.addMenuItems(E,["points","inches","millimeters","meters"],F)}));u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,
-function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);b.resetCurrentMenu();u.destroy()});var y=mxEvent.getClientX(q),G=mxEvent.getClientY(q);u.popup(y,G,null,q);b.setCurrentMenu(u,c)}mxEvent.consume(q)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var g=mxFreehand.prototype.MILD_SMOOTHING,c=null,p=[],q,u=[],y,G=!1,E=!0,F=!0,d=!0,k=!0,l=[],n=!1,x=!1,z=!1,B="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},H=!0;this.setClosedPath=function(A){G=A};this.setAutoClose=function(A){E=A};this.setAutoInsert=
-function(A){F=A};this.setAutoScroll=function(A){d=A};this.setOpenFill=function(A){k=A};this.setStopClickEnabled=function(A){x=A};this.setSelectInserted=function(A){z=A};this.setSmoothing=function(A){g=A};this.getSmoothing=function(){return g};this.setPerfectFreehandMode=function(A){H=A};this.isPerfectFreehandMode=function(){return H};this.setBrushSize=function(A){I.size=A};this.getBrushSize=function(){return I.size};var C=function(A){n=A;b.getRubberband().setEnabled(!A);b.graphHandler.setSelectEnabled(!A);
-b.graphHandler.setMoveEnabled(!A);b.container.style.cursor=A?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return n};var R=mxUtils.bind(this,function(A){if(c){var N=y.length,J=x&&0<u.length&&null!=y&&2>y.length;J||u.push.apply(u,y);y=[];u.push(null);p.push(c);c=null;(J||F)&&this.stopDrawing();F&&(!J||2<=N)&&this.startDrawing();mxEvent.consume(A)}}),U=new mxCell;U.edge=!0;this.getStrokeColor=function(A){var N=null!=
-B?B:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(U),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=N||A||(N=b.shapeForegroundColor);return N};this.setStrokeColor=function(A){B=A};this.createStyle=function(A){var N=";fillColor=none;";H&&(N=";lineShape=1;");N+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+A+N};this.stopDrawing=function(){if(0<p.length){if(H){for(var A=[],N=0;N<u.length;N++)null!=u[N]&&A.push([u[N].x,
-u[N].y]);A=PerfectFreehand.getStroke(A,I);u=[];for(N=0;N<A.length;N++)u.push({x:A[N][0],y:A[N][1]});u.push(null)}A=u[0].x;var J=u[0].x,K=u[0].y,m=u[0].y;for(N=1;N<u.length;N++)null!=u[N]&&(A=Math.max(A,u[N].x),J=Math.min(J,u[N].x),K=Math.max(K,u[N].y),m=Math.min(m,u[N].y));A-=J;K-=m;if(0<A&&0<K){var t=100/A,D=100/K;u.map(function(T){if(null==T)return T;T.x=(T.x-J)*t;T.y=(T.y-m)*D;return T});var M='<shape strokewidth="inherit"><foreground>',L=0;for(N=0;N<u.length;N++){var O=u[N];if(null==O){O=!1;L=
-u[L];var P=u[N-1];!G&&E&&(O=L.x-P.x,P=L.y-P.y,O=Math.sqrt(O*O+P*P)<=b.tolerance);if(G||O)M+='<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>';M+="</path>"+(k||G||O?"<fillstroke/>":"<stroke/>");L=N+1}else M=N==L?M+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):M+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}M+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=this.createStyle("stencil("+Graph.compress(M)+")");M=b.view.scale;L=b.view.translate;
-N=new mxCell("",new mxGeometry(J/M-L.x,m/M-L.y,A/M,K/M),N);N.vertex=1;b.model.beginUpdate();try{N=b.addCell(N),b.fireEvent(new mxEventObject("cellsInserted","cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}z&&b.setSelectionCells([N])}}for(N=0;N<p.length;N++)p[N].parentNode.removeChild(p[N]);c=null;p=[];u=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(A,N){A=N.getProperty("eventName");N=N.getProperty("event");A==mxEvent.MOUSE_MOVE&&
-n&&(null!=N.sourceState&&N.sourceState.setCursor("crosshair"),N.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(A,N){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(A=N.getEvent(),n&&!mxEvent.isPopupTrigger(A)&&!mxEvent.isMiddleMouseButton(A)&&!mxEvent.isMultiTouchEvent(A))){var J=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var K=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");
-c.setAttribute("fill",H?K:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",K);c.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(K=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",K=K.split(" ").map(function(m){return parseFloat(m)*J}).join(" "),c.setAttribute("stroke-dasharray",K));l=[];A=S(A);Q(A);q="M"+A.x+" "+A.y;u.push(A);y=[];c.setAttribute("d",H?PerfectFreehand.getSvgPathFromStroke([[A.x,A.y]],I):q);f.appendChild(c);N.consume()}}),
-mouseMove:mxUtils.bind(this,function(A,N){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){A=N.getEvent();A=S(A);Q(A);var J=v(0);if(J)if(u.push(J),H){var K=[];for(J=0;J<u.length;J++)K.push([u[J].x,u[J].y]);y=[];for(var m=2;m<l.length;m+=2)J=v(m),K.push([J.x,J.y]),y.push(J);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(K,I))}else{q+=" L"+J.x+" "+J.y;K="";y=[];for(m=2;m<l.length;m+=2)J=v(m),K+=" L"+J.x+" "+J.y,y.push(J);c.setAttribute("d",q+K)}d&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(A.x-
-J.x,A.y-J.y)).grow(20)));N.consume()}}),mouseUp:mxUtils.bind(this,function(A,N){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(R(N.getEvent()),N.consume())})});var S=function(A){return mxUtils.convertPoint(b.container,mxEvent.getClientX(A),mxEvent.getClientY(A))},Q=function(A){for(l.push(A);l.length>g;)l.shift()},v=function(A){var N=l.length;if(1===N%2||N>=g){var J=0,K=0,m,t=0;for(m=A;m<N;m++)t++,A=l[m],J+=A.x,K+=A.y;return{x:J/t,y:K/t}}return null}}}
-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,f,g){function c(L,O){try{if(!v){var P=f.file.getCurrentUser();if(Q&&null!=P&&null!=P.displayName){var T={from:C,id:x,type:L,sessionId:f.clientId,userId:P.id,username:P.displayName,data:O,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};T={bytes:f.objectToString(T),data:"aes"};T=JSON.stringify(T);A&&"cursor"!=L&&EditorUi.debug("P2PCollab: sending to socket server",[T]);x++;P=!A&&("cursor"==L||"selectionChange"==L);S&&!P&&m("message",T);if(P)for(p2pId in U)U[p2pId].send(T)}}}catch(V){null!=
-window.console&&console.error(V,L,O)}}function p(L){if(b.shareCursorPosition&&!F.isMouseDown){var O=mxUtils.getOffset(F.container),P=F.view.translate,T=F.view.scale,V=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:V,x:Math.round((L.getX()-O.x+F.container.scrollLeft)/T-P.x),y:Math.round((L.getY()-O.y+F.container.scrollTop)/T-P.y)})}}function q(L,O){var P=null!=b.currentPage?b.currentPage.getId():null;if(null!=L&&null!=L.cursor&&null!=L.lastCursor)if(null!=L.lastCursor.hide||!b.isShowRemoteCursors()||
-null!=L.lastCursor.pageId&&L.lastCursor.pageId!=P)L.cursor.style.display="none";else{P=function(){var Z=Math.max(F.container.scrollLeft,Math.min(F.container.scrollLeft+F.container.clientWidth-L.cursor.clientWidth,X)),aa=Math.max(F.container.scrollTop-22,Math.min(F.container.scrollTop+F.container.clientHeight-L.cursor.clientHeight,W));Y.style.opacity=Z!=X||aa!=W?0:1;L.cursor.style.left=Z+"px";L.cursor.style.top=aa+"px";L.cursor.style.display=""};var T=F.view.translate,V=F.view.scale,X=(T.x+L.lastCursor.x)*
-V+8,W=(T.y+L.lastCursor.y)*V-12,Y=L.cursor.getElementsByTagName("img")[0];O?(mxUtils.setPrefixedStyle(L.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(Y.style,"transition","all 900ms ease-out"),window.setTimeout(P,0)):(mxUtils.setPrefixedStyle(L.cursor.style,"transition",null),mxUtils.setPrefixedStyle(Y.style,"transition",null),P())}}function u(L,O){try{var P=function(){if(null==n[V]){var ca=H[V];null==ca&&(ca=d%l.length,H[V]=ca,d++);var ia=l[ca];ca=11<ca?"black":"white";
-n[V]={cursor:document.createElement("div"),color:ia,selection:{}};B[O]=V;X=n[V].cursor;X.style.pointerEvents="none";X.style.position="absolute";X.style.display="none";X.style.opacity="0.9";var ka=document.createElement("img");mxUtils.setPrefixedStyle(ka.style,"transform","rotate(-45deg)translateX(-14px)");ka.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ia+'" fill="'+ia+'"/>').src);ka.style.width="10px";X.appendChild(ka);ka=document.createElement("div");
-ka.style.backgroundColor=ia;ka.style.color=ca;ka.style.fontSize="9pt";ka.style.padding="3px 7px";ka.style.marginTop="8px";ka.style.borderRadius="10px";ka.style.maxWidth="100px";ka.style.overflow="hidden";ka.style.textOverflow="ellipsis";ka.style.whiteSpace="nowrap";mxUtils.write(ka,T);X.appendChild(ka);b.diagramContainer.appendChild(X)}else X=n[V].cursor;W=n[V].selection};if(!v){L=JSON.parse(L);null!=L.bytes&&(L=f.stringToObject(L.bytes));A&&"cursor"!=L.type&&EditorUi.debug("P2PCollab: msg received",
-[L]);if(null!=O){if(L.from==C||z[L.from]>=L.id){EditorUi.debug("P2PCollab: Dropped Message",L,C,z[L.from]);return}z[L.from]=L.id}var T=L.username?L.username:"Anonymous",V=L.sessionId,X,W;null!=n[V]&&(clearTimeout(n[V].inactiveTO),n[V].inactiveTO=setTimeout(function(){G(null,V)},12E4));var Y=L.data;switch(L.type){case "cursor":P();n[V].lastCursor=Y;q(n[V],!0);break;case "diff":try{L=null!=Y.patch?f.stringToObject(decodeURIComponent(Y.patch)):Y.diff,f.receiveRemoteChanges(L.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",
+function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);b.resetCurrentMenu();u.destroy()});var y=mxEvent.getClientX(q),H=mxEvent.getClientY(q);u.popup(y,H,null,q);b.setCurrentMenu(u,c)}mxEvent.consume(q)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var g=mxFreehand.prototype.MILD_SMOOTHING,c=null,p=[],q,u=[],y,H=!1,E=!0,F=!0,d=!0,k=!0,l=[],n=!1,x=!1,A=!1,B="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},G=!0;this.setClosedPath=function(z){H=z};this.setAutoClose=function(z){E=z};this.setAutoInsert=
+function(z){F=z};this.setAutoScroll=function(z){d=z};this.setOpenFill=function(z){k=z};this.setStopClickEnabled=function(z){x=z};this.setSelectInserted=function(z){A=z};this.setSmoothing=function(z){g=z};this.getSmoothing=function(){return g};this.setPerfectFreehandMode=function(z){G=z};this.isPerfectFreehandMode=function(){return G};this.setBrushSize=function(z){I.size=z};this.getBrushSize=function(){return I.size};var C=function(z){n=z;b.getRubberband().setEnabled(!z);b.graphHandler.setSelectEnabled(!z);
+b.graphHandler.setMoveEnabled(!z);z?b.container.classList.add("geFreehandMode"):b.container.classList.remove("geFreehandMode");b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return n};var R=mxUtils.bind(this,function(z){if(c){var N=y.length,J=x&&0<u.length&&null!=y&&2>y.length;J||u.push.apply(u,y);y=[];u.push(null);p.push(c);c=null;(J||F)&&this.stopDrawing();F&&(!J||2<=N)&&this.startDrawing();mxEvent.consume(z)}}),T=new mxCell;
+T.edge=!0;this.getStrokeColor=function(z){var N=null!=B?B:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(T),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=N||z||(N=b.shapeForegroundColor);return N};this.setStrokeColor=function(z){B=z};this.createStyle=function(z){var N=";fillColor=none;";G&&(N=";lineShape=1;");N+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+z+N};this.stopDrawing=function(){if(0<p.length){if(G){for(var z=
+[],N=0;N<u.length;N++)null!=u[N]&&z.push([u[N].x,u[N].y]);z=PerfectFreehand.getStroke(z,I);u=[];for(N=0;N<z.length;N++)u.push({x:z[N][0],y:z[N][1]});u.push(null)}z=u[0].x;var J=u[0].x,K=u[0].y,m=u[0].y;for(N=1;N<u.length;N++)null!=u[N]&&(z=Math.max(z,u[N].x),J=Math.min(J,u[N].x),K=Math.max(K,u[N].y),m=Math.min(m,u[N].y));z-=J;K-=m;if(0<z&&0<K){var t=100/z,D=100/K;u.map(function(U){if(null==U)return U;U.x=(U.x-J)*t;U.y=(U.y-m)*D;return U});var M='<shape strokewidth="inherit"><foreground>',L=0;for(N=
+0;N<u.length;N++){var O=u[N];if(null==O){O=!1;L=u[L];var P=u[N-1];!H&&E&&(O=L.x-P.x,P=L.y-P.y,O=Math.sqrt(O*O+P*P)<=b.tolerance);if(H||O)M+='<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>';M+="</path>"+(k||H||O?"<fillstroke/>":"<stroke/>");L=N+1}else M=N==L?M+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):M+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}M+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=this.createStyle("stencil("+
+Graph.compress(M)+")");M=b.view.scale;L=b.view.translate;N=new mxCell("",new mxGeometry(J/M-L.x,m/M-L.y,z/M,K/M),N);N.vertex=1;b.model.beginUpdate();try{N=b.addCell(N),b.fireEvent(new mxEventObject("cellsInserted","cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}A&&b.setSelectionCells([N])}}for(N=0;N<p.length;N++)p[N].parentNode.removeChild(p[N]);c=null;p=[];u=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(z,N){n&&N.getProperty("event").consume()}));
+b.addMouseListener({mouseDown:mxUtils.bind(this,function(z,N){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(z=N.getEvent(),n&&!mxEvent.isPopupTrigger(z)&&!mxEvent.isMiddleMouseButton(z)&&!mxEvent.isMultiTouchEvent(z))){var J=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var K=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",G?K:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",
+K);c.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(K=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",K=K.split(" ").map(function(m){return parseFloat(m)*J}).join(" "),c.setAttribute("stroke-dasharray",K));l=[];z=S(z);Q(z);q="M"+z.x+" "+z.y;u.push(z);y=[];c.setAttribute("d",G?PerfectFreehand.getSvgPathFromStroke([[z.x,z.y]],I):q);f.appendChild(c);N.consume()}}),mouseMove:mxUtils.bind(this,function(z,N){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){z=
+N.getEvent();z=S(z);Q(z);var J=v(0);if(J)if(u.push(J),G){var K=[];for(J=0;J<u.length;J++)K.push([u[J].x,u[J].y]);y=[];for(var m=2;m<l.length;m+=2)J=v(m),K.push([J.x,J.y]),y.push(J);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(K,I))}else{q+=" L"+J.x+" "+J.y;K="";y=[];for(m=2;m<l.length;m+=2)J=v(m),K+=" L"+J.x+" "+J.y,y.push(J);c.setAttribute("d",q+K)}d&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(z.x-J.x,z.y-J.y)).grow(20)));N.consume()}}),mouseUp:mxUtils.bind(this,function(z,
+N){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(R(N.getEvent()),N.consume())})});var S=function(z){return mxUtils.convertPoint(b.container,mxEvent.getClientX(z),mxEvent.getClientY(z))},Q=function(z){for(l.push(z);l.length>g;)l.shift()},v=function(z){var N=l.length;if(1===N%2||N>=g){var J=0,K=0,m,t=0;for(m=z;m<N;m++)t++,z=l[m],J+=z.x,K+=z.y;return{x:J/t,y:K/t}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;
+mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,f,g){function c(L,O){try{if(!v){var P=f.file.getCurrentUser();if(Q&&null!=P&&null!=P.displayName){var U={from:C,id:x,type:L,sessionId:f.clientId,userId:P.id,username:P.displayName,data:O,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};U={bytes:f.objectToString(U),data:"aes"};U=JSON.stringify(U);z&&"cursor"!=L&&EditorUi.debug("P2PCollab: sending to socket server",[U]);x++;P=!z&&("cursor"==L||"selectionChange"==L);S&&!P&&m("message",U);if(P)for(p2pId in T)T[p2pId].send(U)}}}catch(V){null!=
+window.console&&console.error(V,L,O)}}function p(L){if(b.shareCursorPosition&&!F.isMouseDown){var O=mxUtils.getOffset(F.container),P=F.view.translate,U=F.view.scale,V=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:V,x:Math.round((L.getX()-O.x+F.container.scrollLeft)/U-P.x),y:Math.round((L.getY()-O.y+F.container.scrollTop)/U-P.y)})}}function q(L,O){var P=null!=b.currentPage?b.currentPage.getId():null;if(null!=L&&null!=L.cursor&&null!=L.lastCursor)if(null!=L.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=L.lastCursor.pageId&&L.lastCursor.pageId!=P)L.cursor.style.display="none";else{P=function(){var Z=Math.max(F.container.scrollLeft,Math.min(F.container.scrollLeft+F.container.clientWidth-L.cursor.clientWidth,X)),aa=Math.max(F.container.scrollTop-22,Math.min(F.container.scrollTop+F.container.clientHeight-L.cursor.clientHeight,W));Y.style.opacity=Z!=X||aa!=W?0:1;L.cursor.style.left=Z+"px";L.cursor.style.top=aa+"px";L.cursor.style.display=""};var U=F.view.translate,V=F.view.scale,X=(U.x+L.lastCursor.x)*
+V+8,W=(U.y+L.lastCursor.y)*V-12,Y=L.cursor.getElementsByTagName("img")[0];O?(mxUtils.setPrefixedStyle(L.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(Y.style,"transition","all 900ms ease-out"),window.setTimeout(P,0)):(mxUtils.setPrefixedStyle(L.cursor.style,"transition",null),mxUtils.setPrefixedStyle(Y.style,"transition",null),P())}}function u(L,O){try{var P=function(){if(null==n[V]){var ca=G[V];null==ca&&(ca=d%l.length,G[V]=ca,d++);var ha=l[ca];ca=11<ca?"black":"white";
+n[V]={cursor:document.createElement("div"),color:ha,selection:{}};B[O]=V;X=n[V].cursor;X.style.pointerEvents="none";X.style.position="absolute";X.style.display="none";X.style.opacity="0.9";var ka=document.createElement("img");mxUtils.setPrefixedStyle(ka.style,"transform","rotate(-45deg)translateX(-14px)");ka.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ha+'" fill="'+ha+'"/>').src);ka.style.width="10px";X.appendChild(ka);ka=document.createElement("div");
+ka.style.backgroundColor=ha;ka.style.color=ca;ka.style.fontSize="9pt";ka.style.padding="3px 7px";ka.style.marginTop="8px";ka.style.borderRadius="10px";ka.style.maxWidth="100px";ka.style.overflow="hidden";ka.style.textOverflow="ellipsis";ka.style.whiteSpace="nowrap";mxUtils.write(ka,U);X.appendChild(ka);b.diagramContainer.appendChild(X)}else X=n[V].cursor;W=n[V].selection};if(!v){L=JSON.parse(L);null!=L.bytes&&(L=f.stringToObject(L.bytes));z&&"cursor"!=L.type&&EditorUi.debug("P2PCollab: msg received",
+[L]);if(null!=O){if(L.from==C||A[L.from]>=L.id){EditorUi.debug("P2PCollab: Dropped Message",L,C,A[L.from]);return}A[L.from]=L.id}var U=L.username?L.username:"Anonymous",V=L.sessionId,X,W;null!=n[V]&&(clearTimeout(n[V].inactiveTO),n[V].inactiveTO=setTimeout(function(){H(null,V)},12E4));var Y=L.data;switch(L.type){case "cursor":P();n[V].lastCursor=Y;q(n[V],!0);break;case "diff":try{L=null!=Y.patch?f.stringToObject(decodeURIComponent(Y.patch)):Y.diff,f.receiveRemoteChanges(L.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",
ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=Y.pageId&&Y.pageId==Z){P();for(P=0;P<Y.removed.length;P++){var aa=Y.removed[P];if(null!=aa){var fa=W[aa];delete W[aa];null!=fa&&fa.destroy()}}for(P=0;P<Y.added.length;P++)if(aa=Y.added[P],null!=aa){var ea=F.model.getCell(aa);null!=ea&&(W[aa]=F.highlightCell(ea,n[V].color,6E4,70,3))}}}break;case "notify":L=null!=Y.data?f.stringToObject(decodeURIComponent(Y.data)):
-Y.msg,f.handleMessageData(L.d)}f.file.fireEvent(new mxEventObject("realtimeMessage","message",L))}}catch(ca){null!=window.console&&console.warn(ca,L,O)}}function y(L,O){if(!A&&SimplePeer.WEBRTC_SUPPORT){var P=new SimplePeer({initiator:O,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});P.on("signal",function(T){m("sendSignal",{to:L,from:C,signal:T})});P.on("error",function(T){delete R[L];EditorUi.debug("P2PCollab: p2p socket error",T);!v&&O&&P.destroyed&&I[L]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
-L),y(L,!0))});P.on("connect",function(){delete R[L];null==U[L]||U[L].destroyed?(U[L]=P,I[L]=!0,EditorUi.debug("P2PCollab: p2p socket connected",L)):(P.noP2PMapDel=!0,P.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",L))});P.on("close",function(){P.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",L),E(B[L]),delete U[L])});P.on("data",u);return R[L]=P}}function G(L,O){E(O||B[L]);null!=L&&(delete B[L],I[L]=!1)}function E(L){var O=n[L];if(null!=O){var P=O.selection,T;for(T in P)null!=
-P[T]&&P[T].destroy();null!=O.cursor&&null!=O.cursor.parentNode&&O.cursor.parentNode.removeChild(O.cursor);clearTimeout(O.inactiveTO);delete n[L]}}var F=b.editor.graph,d=0,k=null,l="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),n={},x=1,z={},B={},I={},H={},C,R={},U={},S=!0,Q=!1,v=!1,A="0"!=urlParams["no-p2p"],N=!1,J=0,K=null,m=mxUtils.bind(this,function(L,O){if(!v)try{null!=
-k?(k.send(JSON.stringify({action:L,msg:O})),A||EditorUi.debug("P2PCollab: sending to socket server",[L],[O])):this.joinFile(!0)}catch(P){K=P,f.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,P)}});this.sendMessage=c;this.sendDiff=function(L){this.sendMessage("diff",{diff:L})};this.sendNotification=function(L){this.sendMessage("notify",{msg:L})};this.getState=function(){return null!=k?k.readyState:3};this.getLastError=function(){return K};
-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(L,O){},mouseMove:function(L,O){var P,T=-1;return function(){clearTimeout(P);var V=this,X=arguments,W=function(){P=null;T=Date.now();L.apply(V,X)};Date.now()-T>O?W():P=setTimeout(W,O)}}(function(L,O){p(O)},300),mouseUp:function(L,O){p(O)}};F.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
-var t=mxGraphHandler.prototype.maxCells,D=null,M={};this.selectionChangeListener=function(L,O){var P=function(T){return null!=T?T.id:null};null!=D&&window.clearTimeout(D);D=window.setTimeout(function(){for(var T=F.getSelectionCount()>t?[]:F.getSelectionCells().map(P),V=null!=b.currentPage?b.currentPage.getId():null,X={},W=[],Y=[],Z=0;Z<T.length;Z++){var aa=T[Z];null!=aa&&(X[aa]=!0,null==M[aa]&&Y.push(aa))}for(aa in M)X[aa]||W.push(aa);M=X;c("selectionChange",{pageId:V,removed:W,added:Y})},300)};F.getSelectionModel().addListener(mxEvent.CHANGE,
+Y.msg,f.handleMessageData(L.d)}f.file.fireEvent(new mxEventObject("realtimeMessage","message",L))}}catch(ca){null!=window.console&&console.warn(ca,L,O)}}function y(L,O){if(!z&&SimplePeer.WEBRTC_SUPPORT){var P=new SimplePeer({initiator:O,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});P.on("signal",function(U){m("sendSignal",{to:L,from:C,signal:U})});P.on("error",function(U){delete R[L];EditorUi.debug("P2PCollab: p2p socket error",U);!v&&O&&P.destroyed&&I[L]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
+L),y(L,!0))});P.on("connect",function(){delete R[L];null==T[L]||T[L].destroyed?(T[L]=P,I[L]=!0,EditorUi.debug("P2PCollab: p2p socket connected",L)):(P.noP2PMapDel=!0,P.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",L))});P.on("close",function(){P.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",L),E(B[L]),delete T[L])});P.on("data",u);return R[L]=P}}function H(L,O){E(O||B[L]);null!=L&&(delete B[L],I[L]=!1)}function E(L){var O=n[L];if(null!=O){var P=O.selection,U;for(U in P)null!=
+P[U]&&P[U].destroy();null!=O.cursor&&null!=O.cursor.parentNode&&O.cursor.parentNode.removeChild(O.cursor);clearTimeout(O.inactiveTO);delete n[L]}}var F=b.editor.graph,d=0,k=null,l="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),n={},x=1,A={},B={},I={},G={},C,R={},T={},S=!0,Q=!1,v=!1,z="0"!=urlParams["no-p2p"],N=!1,J=0,K=null,m=mxUtils.bind(this,function(L,O){if(!v)try{null!=
+k?(k.send(JSON.stringify({action:L,msg:O})),z||EditorUi.debug("P2PCollab: sending to socket server",[L],[O])):this.joinFile(!0)}catch(P){K=P,f.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,P)}});this.sendMessage=c;this.sendDiff=function(L){this.sendMessage("diff",{diff:L})};this.sendNotification=function(L){this.sendMessage("notify",{msg:L})};this.getState=function(){return null!=k?k.readyState:3};this.getLastError=function(){return K};
+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(L,O){},mouseMove:function(L,O){var P,U=-1;return function(){clearTimeout(P);var V=this,X=arguments,W=function(){P=null;U=Date.now();L.apply(V,X)};Date.now()-U>O?W():P=setTimeout(W,O)}}(function(L,O){p(O)},300),mouseUp:function(L,O){p(O)}};F.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
+var t=mxGraphHandler.prototype.maxCells,D=null,M={};this.selectionChangeListener=function(L,O){var P=function(U){return null!=U?U.id:null};null!=D&&window.clearTimeout(D);D=window.setTimeout(function(){for(var U=F.getSelectionCount()>t?[]:F.getSelectionCells().map(P),V=null!=b.currentPage?b.currentPage.getId():null,X={},W=[],Y=[],Z=0;Z<U.length;Z++){var aa=U[Z];null!=aa&&(X[aa]=!0,null==M[aa]&&Y.push(aa))}for(aa in M)X[aa]||W.push(aa);M=X;c("selectionChange",{pageId:V,removed:W,added:Y})},300)};F.getSelectionModel().addListener(mxEvent.CHANGE,
this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var L in n)q(n[L])});mxEvent.addListener(F.container,"scroll",this.cursorHandler);F.getView().addListener(mxEvent.SCALE,this.cursorHandler);F.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);F.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(L){if(!v)try{N&&
-(EditorUi.debug("P2PCollab: joinInProgress on",N),K="busy");N=++J;try{null!=k&&1==k.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",k.joinId),k.close(1E3),k=null)}catch(T){EditorUi.debug("P2PCollab: closing socket error",T)}var O=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+g);null==k&&(k=O);O.addEventListener("open",function(T){k=O;k.joinId=N;N=!1;f.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",k.joinId);Editor.enableRealtimeCache||
-window.setTimeout(function(){f.sendJoinMessage()},0);L&&f.scheduleCleanup()});O.addEventListener("message",function(T){try{A||EditorUi.debug("P2PCollab: msg received",[T]);var V=JSON.parse(T.data);A&&"message"!=V.action&&EditorUi.debug("P2PCollab: msg received",[T]);switch(V.action){case "message":u(V.msg,V.from);break;case "clientsList":var X=V.msg;C=X.cId;Q=!0;for(V=0;V<X.list.length;V++)y(X.list[V],!0);break;case "signal":var W=V.msg;if(!A){if(R[W.from])var Y=R[W.from];else Y=y(W.from,!1),S=!0;
-Y.signal(W.signal)}break;case "newClient":S=!0;break;case "clientLeft":G(V.msg);break;case "sendSignalFailed":var Z=V.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete R[Z.to];I[Z.to]=!1}}catch(aa){null!=window.console&&console.warn(aa,T)}});var P=!1;O.addEventListener("close",mxUtils.bind(this,function(T){EditorUi.debug("P2PCollab: WebSocket closed",O.joinId,"reconnecting",T.code,T.reason);EditorUi.debug("P2PCollab: closing socket on",O.joinId);v||1E3==T.code||
-J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in close on",O.joinId),N=!1),P||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),window.setTimeout(mxUtils.bind(this,function(){P=!0;this.joinFile(!0)}),500)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));O.addEventListener("error",mxUtils.bind(this,function(T){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",T);EditorUi.debug("P2PCollab: error socket on",O.joinId);v||J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
-O.joinId),N=!1),P||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),P=!0,this.joinFile(!0)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(T){K=T,f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!v){EditorUi.debug("P2PCollab: destroyed");v=!0;for(sessionId in n)E(sessionId);null!=this.mouseListeners&&F.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
-F.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(F.container,"scroll",this.cursorHandler),F.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=k&&1<=k.readyState&&(k.close(1E3),k=null);for(var L in U)null!=U[L]&&U[L].destroy();f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+(EditorUi.debug("P2PCollab: joinInProgress on",N),K="busy");N=++J;try{null!=k&&1==k.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",k.joinId),k.close(1E3),k=null)}catch(U){EditorUi.debug("P2PCollab: closing socket error",U)}var O=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+g);null==k&&(k=O);O.addEventListener("open",function(U){k=O;k.joinId=N;N=!1;f.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",k.joinId);Editor.enableRealtimeCache||
+window.setTimeout(function(){f.sendJoinMessage()},0);L&&f.scheduleCleanup()});O.addEventListener("message",function(U){try{z||EditorUi.debug("P2PCollab: msg received",[U]);var V=JSON.parse(U.data);z&&"message"!=V.action&&EditorUi.debug("P2PCollab: msg received",[U]);switch(V.action){case "message":u(V.msg,V.from);break;case "clientsList":var X=V.msg;C=X.cId;Q=!0;for(V=0;V<X.list.length;V++)y(X.list[V],!0);break;case "signal":var W=V.msg;if(!z){if(R[W.from])var Y=R[W.from];else Y=y(W.from,!1),S=!0;
+Y.signal(W.signal)}break;case "newClient":S=!0;break;case "clientLeft":H(V.msg);break;case "sendSignalFailed":var Z=V.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete R[Z.to];I[Z.to]=!1}}catch(aa){null!=window.console&&console.warn(aa,U)}});var P=!1;O.addEventListener("close",mxUtils.bind(this,function(U){EditorUi.debug("P2PCollab: WebSocket closed",O.joinId,"reconnecting",U.code,U.reason);EditorUi.debug("P2PCollab: closing socket on",O.joinId);v||1E3==U.code||
+J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in close on",O.joinId),N=!1),P||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),window.setTimeout(mxUtils.bind(this,function(){P=!0;this.joinFile(!0)}),500)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));O.addEventListener("error",mxUtils.bind(this,function(U){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",U);EditorUi.debug("P2PCollab: error socket on",O.joinId);v||J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
+O.joinId),N=!1),P||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),P=!0,this.joinFile(!0)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(U){K=U,f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!v){EditorUi.debug("P2PCollab: destroyed");v=!0;for(sessionId in n)E(sessionId);null!=this.mouseListeners&&F.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
+F.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(F.container,"scroll",this.cursorHandler),F.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=k&&1<=k.readyState&&(k.close(1E3),k=null);for(var L in T)null!=T[L]&&T[L].destroy();f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index fd542a9fe..254f3867e 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -3708,7 +3708,7 @@ App.prototype.openTemplateDialog = function(generatePrompt)
if (xml != null)
{
- var insertPoint = this.editor.graph.getFreeInsertPoint();
+ var insertPoint = this.editor.graph.getFreeInsertPoint(true);
graph.setSelectionCells(this.importXml(xml,
Math.max(insertPoint.x, 20),
Math.max(insertPoint.y, 20),
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 6d8290bdf..471b0c478 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -2513,6 +2513,9 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
rightHighlightBorder = (rightHighlightBorder != null) ? rightHighlightBorder :
'2px dashed light-dark(#29b6f2, #00a8ff)';
templateFile = (templateFile != null) ? templateFile : EditorUi.templateFile;
+
+ // Handles click on insert while entering generate prompt
+ var insertWasPressed = false;
var outer = document.createElement('div');
outer.style.userSelect = 'none';
@@ -3176,58 +3179,82 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
function create()
{
- if (templateExtUrl && openExtDocCallback != null)
+ if (selectedElt == generateElt && templateXml == null &&
+ generateButton != null && generateInput != null)
{
- if (!showName)
+ if (callback && editorUi.spinner.spin(document.body,
+ mxResources.get('generate') + ' \''+
+ generateInput.value + '\''))
{
+ insertWasPressed = true;
editorUi.hideDialog();
}
-
- openExtDocCallback(templateExtUrl, templateInfoObj, nameInput.value);
+
+ generateButton.click();
}
- else if (callback)
+ else
{
- if (!showName)
+ if (insertWasPressed)
{
- editorUi.hideDialog();
+ editorUi.spinner.stop();
}
- callback(templateXml, nameInput.value, templateRealUrl, templateLibs);
- }
- else
- {
- var title = nameInput.value;
+ if (templateExtUrl && openExtDocCallback != null)
+ {
+ if (!showName && !insertWasPressed)
+ {
+ editorUi.hideDialog();
+ }
- if (title != null && title.length > 0)
+ openExtDocCallback(templateExtUrl, templateInfoObj, nameInput.value);
+ }
+ else if (callback)
{
- function doSave(mode, folderId, filename)
+ if (!showName && !insertWasPressed)
{
- editorUi.createFile(filename, templateXml, (templateLibs != null &&
- templateLibs.length > 0) ? templateLibs : null, mode, function()
- {
- editorUi.hideDialog();
- }, null, folderId, null, (templateClibs != null &&
- templateClibs.length > 0) ? templateClibs : null);
- };
+ editorUi.hideDialog();
+ }
- if (editorUi.mode == App.MODE_GOOGLE || editorUi.mode == App.MODE_ONEDRIVE)
+ callback(templateXml, nameInput.value, templateRealUrl, templateLibs);
+ }
+ else
+ {
+ var title = nameInput.value;
+
+ if (title != null && title.length > 0)
{
- var dlg = new SaveDialog(editorUi, title, mxUtils.bind(this, function(input, mode, folderId)
+ function doSave(mode, folderId, filename)
{
- doSave(mode, folderId, input.value);
- }), null, null, null, null, editorUi.mode);
+ editorUi.createFile(filename, templateXml, (templateLibs != null &&
+ templateLibs.length > 0) ? templateLibs : null, mode, function()
+ {
+ if (!insertWasPressed)
+ {
+ editorUi.hideDialog();
+ }
+ }, null, folderId, null, (templateClibs != null &&
+ templateClibs.length > 0) ? templateClibs : null);
+ };
- editorUi.showDialog(dlg.container, 420, 150, true, false);
- dlg.init();
- }
- else
- {
- editorUi.pickFolder(editorUi.mode, function(folderId)
+ if (editorUi.mode == App.MODE_GOOGLE || editorUi.mode == App.MODE_ONEDRIVE)
+ {
+ var dlg = new SaveDialog(editorUi, title, mxUtils.bind(this, function(input, mode, folderId)
+ {
+ doSave(mode, folderId, input.value);
+ }), null, null, null, null, editorUi.mode);
+
+ editorUi.showDialog(dlg.container, 420, 150, true, false);
+ dlg.init();
+ }
+ else
{
- doSave(editorUi.mode, folderId, title);
- }, editorUi.mode != App.MODE_GOOGLE ||
- editorUi.stateArg == null ||
- editorUi.stateArg.folderId == null);
+ editorUi.pickFolder(editorUi.mode, function(folderId)
+ {
+ doSave(editorUi.mode, folderId, title);
+ }, editorUi.mode != App.MODE_GOOGLE ||
+ editorUi.stateArg == null ||
+ editorUi.stateArg.folderId == null);
+ }
}
}
}
@@ -3486,8 +3513,16 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
magnifyGenerate.style.visibility = 'visible';
};
+ var generatingDiagram = false;
+
function generateDiagram(cancel)
{
+ if (generatingDiagram)
+ {
+ return;
+ }
+
+ generatingDiagram = true;
var desc = mxUtils.trim(generateInput.value);
if (!cancel && desc != '')
@@ -3499,6 +3534,8 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
editorUi.generateDiagram(desc, mxUtils.bind(this, function(xml, imageData)
{
+ generatingDiagram = false;
+
if (selectedElt == generateElt && generateForm.style.display == 'none')
{
generateBackground = 'url(' + 'data:image/svg+xml;base64,' +
@@ -3510,17 +3547,24 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
lastAiTitle = desc;
stopInput();
+
+ if (insertWasPressed)
+ {
+ create();
+ }
}
}), mxUtils.bind(this, function(e)
{
- if (selectedElt == generateElt)
- {
- generateForm.style.display = '';
- generatePreview.style.display = 'none';
- editGenerate.style.visibility = 'hidden';
- magnifyGenerate.style.visibility = 'hidden';
- editorUi.handleError(e);
- }
+ generatingDiagram = false;
+
+ if (selectedElt == generateElt)
+ {
+ generateForm.style.display = '';
+ generatePreview.style.display = 'none';
+ editGenerate.style.visibility = 'hidden';
+ magnifyGenerate.style.visibility = 'hidden';
+ editorUi.handleError(e);
+ }
}));
}
else if (lastAiTitle != null)
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index ec9597f3a..79d5eb1fa 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -6593,9 +6593,9 @@
var getInsertPoint = this.getInsertPoint;
- this.getInsertPoint = function()
+ this.getInsertPoint = function(ignoreMouseEvent)
{
- if (mouseEvent != null)
+ if (mouseEvent != null && !ignoreMouseEvent)
{
return this.getPointForEvent(mouseEvent);
}
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 46e2c0093..c175e0d9c 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -27,7 +27,8 @@
*/
EditorUi.enableLogging = urlParams['stealth'] != '1' && urlParams['lockdown'] != '1' &&
(/.*\.draw\.io$/.test(window.location.hostname) ||
- /.*\.diagrams\.net$/.test(window.location.hostname)) &&
+ /.*\.diagrams\.net$/.test(window.location.hostname) ||
+ /.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname)) && // Forge app
window.location.hostname != 'https://preprod.diagrams.net/' &&
window.location.hostname != 'support.draw.io' &&
window.location.hostname != 'test.draw.io';
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index c2fa04d12..22afb43a3 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -3705,7 +3705,14 @@
this.put('insertAdvanced', new Menu(mxUtils.bind(this, function(menu, parent)
{
- this.addMenuItems(menu, ['fromText', 'plantUml', 'formatSql', 'csv'], parent);
+ var insertMenuItems = ['fromText', 'plantUml', 'formatSql', 'csv'];
+
+ if (!EditorUi.enablePlantUml)
+ {
+ insertMenuItems.splice(1, 1);
+ }
+
+ this.addMenuItems(menu, insertMenuItems, parent);
if (Editor.currentTheme == 'simple' || Editor.currentTheme == 'min')
{
diff --git a/src/main/webapp/js/diagramly/Settings.js b/src/main/webapp/js/diagramly/Settings.js
index 5c369536d..b12e6a667 100644
--- a/src/main/webapp/js/diagramly/Settings.js
+++ b/src/main/webapp/js/diagramly/Settings.js
@@ -75,7 +75,16 @@ var mxSettings =
},
getGridColor: function(darkMode)
{
- return (darkMode) ? mxSettings.settings.darkGridColor : mxSettings.settings.gridColor;
+ var result = (darkMode) ? mxSettings.settings.darkGridColor :
+ mxSettings.settings.gridColor;
+
+ if (mxUtils.isLightDarkColor(result))
+ {
+ var ld = mxUtils.getLightDarkColor(result);
+ result = (darkMode) ? ld.dark : ld.light;
+ }
+
+ return result;
},
setGridColor: function(gridColor, darkMode)
{
diff --git a/src/main/webapp/js/diagramly/mxFreehand.js b/src/main/webapp/js/diagramly/mxFreehand.js
index 4464f61d6..cb7bb1f9e 100644
--- a/src/main/webapp/js/diagramly/mxFreehand.js
+++ b/src/main/webapp/js/diagramly/mxFreehand.js
@@ -126,7 +126,16 @@ function mxFreehand(graph)
graph.getRubberband().setEnabled(!isEnabled);
graph.graphHandler.setSelectEnabled(!isEnabled);
graph.graphHandler.setMoveEnabled(!isEnabled);
- graph.container.style.cursor = (isEnabled) ? 'crosshair' : '';
+
+ if (isEnabled)
+ {
+ graph.container.classList.add('geFreehandMode');
+ }
+ else
+ {
+ graph.container.classList.remove('geFreehandMode');
+ }
+
graph.fireEvent(new mxEventObject('freehandStateChanged'));
};
@@ -351,20 +360,12 @@ function mxFreehand(graph)
setEnabled(false);
};
- // Stops all interactions if freehand is enabled
+ // Stops all shape interactions if freehand is enabled
graph.addListener(mxEvent.FIRE_MOUSE_EVENT, mxUtils.bind(this, function(sender, evt)
{
- var evtName = evt.getProperty('eventName');
- var me = evt.getProperty('event');
-
- if (evtName == mxEvent.MOUSE_MOVE && enabled)
+ if (enabled)
{
- if (me.sourceState != null)
- {
- me.sourceState.setCursor('crosshair');
- }
-
- me.consume();
+ evt.getProperty('event').consume();
}
}));
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index 93b6cff49..c11a75043 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -1274,6 +1274,7 @@ EditorUi.prototype.findCommonProperties = function(cell, properties, addAll, sst
state.shape.stencil.desc != null)
{
var stencil = state.shape.stencil
+ var handledKeys = [];
var getStencilColors = mxUtils.bind(this, function(nodeName)
{
@@ -1284,8 +1285,9 @@ EditorUi.prototype.findCommonProperties = function(cell, properties, addAll, sst
{
var name = nodes[i].getAttribute('color');
- if (!mxUtils.isValidColor(name))
+ if (!mxUtils.isValidColor(name) && !handledKeys[name])
{
+ handledKeys[name] = true;
var label = nodes[i].getAttribute('name');
label = (label != null) ? label :
Editor.getLabelForStylename(name);
@@ -1303,9 +1305,11 @@ EditorUi.prototype.findCommonProperties = function(cell, properties, addAll, sst
});
Array.prototype.push.apply(state.shape.customProperties,
- getStencilColors('fillcolor'))
+ getStencilColors('fillcolor'));
Array.prototype.push.apply(state.shape.customProperties,
- getStencilColors('strokecolor'))
+ getStencilColors('strokecolor'));
+ Array.prototype.push.apply(state.shape.customProperties,
+ getStencilColors('fontcolor'));
}
// Adds common vertex/edge properties
diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js
index 0f85648e9..4a6b120be 100644
--- a/src/main/webapp/js/grapheditor/Graph.js
+++ b/src/main/webapp/js/grapheditor/Graph.js
@@ -11461,7 +11461,7 @@ if (typeof mxVertexHandler !== 'undefined')
/**
* Returns a point that specifies the location for inserting cells.
*/
- Graph.prototype.getInsertPoint = function()
+ Graph.prototype.getInsertPoint = function(ignoreMouseEvent)
{
var gs = this.getGridSize();
var dx = this.container.scrollLeft / this.view.scale - this.view.translate.x;
@@ -11481,11 +11481,11 @@ if (typeof mxVertexHandler !== 'undefined')
/**
*
*/
- Graph.prototype.getFreeInsertPoint = function()
+ Graph.prototype.getFreeInsertPoint = function(ignoreMouseEvent)
{
var view = this.view;
var bds = this.getGraphBounds();
- var pt = this.getInsertPoint();
+ var pt = this.getInsertPoint(ignoreMouseEvent);
// Places at same x-coord and 2 grid sizes below existing graph
var x = this.snap(Math.round(Math.max(pt.x, bds.x / view.scale - view.translate.x +
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 17656b7d2..f7da0779c 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -1,7 +1,8 @@
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...M,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Ie=!1,Me=!0,ke=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,M),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...I]),yt=w({},[...M,...k]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Ie&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!Me&&S(/\/>/i,m)){At(a,e);continue}ke&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),s||(s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const u=w(Array.prototype.forEach),m=w(Array.prototype.lastIndexOf),p=w(Array.prototype.pop),f=w(Array.prototype.push),d=w(Array.prototype.splice),h=w(String.prototype.toLowerCase),g=w(String.prototype.toString),T=w(String.prototype.match),y=w(String.prototype.replace),E=w(String.prototype.indexOf),A=w(String.prototype.trim),_=w(Object.prototype.hasOwnProperty),b=w(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function R(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function D(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function C(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=D(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=C(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=o(e)}return function(){return null}}const O=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),x=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:W});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.3.0",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:w,Element:D,NodeFilter:B,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Y,trustedTypes:j}=n,q=D.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:be}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const we=R({},[...O,...x,...L,...I,...U]);let Re=null;const De=R({},[...z,...P,...F,...H]);let Ce=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Oe=null;const xe=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,ke=!0,Ie=!1,Me=!0,Ue=!1,ze=!0,Pe=!1,Fe=!1,He=!1,Be=!1,Ge=!1,We=!1,Ye=!0,je=!1,Xe=!0,qe=!1,$e={},Ke=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=R({},["audio","video","img","source","image","track"]);let Qe=null;const et=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let rt=ot,it=!1,at=null;const lt=R({},[tt,nt,ot],g);let ct=R({},["mi","mo","mn","ms","mtext"]),st=R({},["annotation-xml"]);const ut=R({},["title","style","font","a","script"]);let mt=null;const pt=["application/xhtml+xml","text/html"];let ft=null,dt=null;const ht=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),mt=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===mt?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ft):we,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ft):De,at=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):lt,Qe=_(e,"ADD_URI_SAFE_ATTR")?R(C(et),e.ADD_URI_SAFE_ATTR,ft):et,Ze=_(e,"ADD_DATA_URI_TAGS")?R(C(Je),e.ADD_DATA_URI_TAGS,ft):Je,Ke=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ft):Ve,ve=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ft):C({}),Oe=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ft):C({}),$e=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ge=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Xe=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,rt=e.NAMESPACE||ot,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(ke=!1),Ge&&(Be=!0),$e&&(Ne=R({},U),Re=[],!0===$e.html&&(R(Ne,O),R(Re,z)),!0===$e.svg&&(R(Ne,x),R(Re,P),R(Re,H)),!0===$e.svgFilters&&(R(Ne,L),R(Re,P),R(Re,H)),!0===$e.mathMl&&(R(Ne,I),R(Re,F),R(Re,H))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?xe.tagCheck=e.ADD_TAGS:(Ne===we&&(Ne=C(Ne)),R(Ne,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?xe.attributeCheck=e.ADD_ATTR:(Re===De&&(Re=C(Re)),R(Re,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&R(Qe,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.FORBID_CONTENTS,ft)),Xe&&(Ne["#text"]=!0),Pe&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),dt=e}},yt=R({},[...x,...L,...k]),Et=R({},[...I,...M]),At=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},_t=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Ge)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(rt===ot)try{t=(new Y).parseFromString(o,mt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(rt,"template",null);try{t.documentElement.innerHTML=it?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===ot?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},wt=function(e){return"function"==typeof w&&e instanceof w};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,dt)}))}const Dt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return At(e),!0;const n=ft(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),ze&&e.hasChildNodes()&&!wt(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return At(e),!0;if(e.nodeType===ee)return At(e),!0;if(ze&&e.nodeType===te&&b(/<[/\w]/g,e.data))return At(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(n))&&(!Ne[n]||ve[n])){if(!ve[n]&&vt(n)){if(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Xe&&!Ke[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return At(e),!0}return e instanceof D&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===ot?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===ot?"math"===n:t.namespaceURI===nt?"math"===n&&st[o]:Boolean(Et[n]):e.namespaceURI===ot?!(t.namespaceURI===nt&&!st[o])&&!(t.namespaceURI===tt&&!ct[o])&&!Et[n]&&(ut[n]||!yt[n]):!("application/xhtml+xml"!==mt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(At(e),!0)},Ct=function(e,t,n){if(Ye&&("id"===t||"name"===t)&&(n in r||n in ht))return!1;if(ke&&!Oe[t]&&b(ye,t));else if(Le&&b(Ee,t));else if(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e));else if(!Re[t]||Oe[t]){if(!(vt(e)&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&b(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Qe[t]);else if(b(Se,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ze[e]){if(Ie&&!b(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&T(e,be)},Ot=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ft(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!je||"id"!==s&&"name"!==s||(_t(a,e),f="user-content-"+f),ze&&b(/((--!?|])>)|<\/(style|title|textarea)/i,f)){_t(a,e);continue}if("attributename"===s&&T(f,"href")){_t(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(a,e);continue}if(!Me&&b(/\/>/i,f)){_t(a,e);continue}Ue&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=ft(e.nodeName);if(Ct(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Nt(e)?At(e):p(o.removed)}catch(t){_t(a,e)}}else _t(a,e)}Rt(de.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),Dt(n),Ot(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!wt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Fe||Tt(t),o.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=ft(e.nodeName);if(!Ne[t]||ve[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=bt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Be&&!Ue&&!Pe&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=bt(e),!n)return Be?null:We?ce:""}n&&He&&At(n.firstChild);const c=St(qe?e:n);for(;i=c.nextNode();)Dt(i),Ot(i),i.content instanceof s&&xt(i.content);if(qe)return e;if(Be){if(Ge)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ue&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},o.clearConfig=function(){dt=null,Fe=!1},o.isValidAttribute=function(e,t,n){dt||Tt({});const o=ft(e),r=ft(t);return Ct(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+//# sourceMappingURL=purify.min.js.map
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
@@ -67,7 +68,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -2036,8 +2037,8 @@ this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,b);y.setAttribute("title",b);w.appendChild(y)}b=
document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.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!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
var A=mxUtils.button(f,function(){p&&a.hideDialog();null!=g&&g()});A.className="geBtn";e.appendChild(A);null!=h&&(f=mxUtils.button(h,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){A.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e,f){this.create(a,b,e,f)};
-PrintDialog.prototype.create=function(a){function b(A){var E=h.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(E){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*D);F.height=Math.ceil(F.height*D);H*=D;!E&&e.pageVisible?(D=e.getPageLayout(),M-=D.x*F.width,N-=D.y*F.height):
-E=!0;E=PrintDialog.createPrintPreview(e,H,F,0,M,N,E);E.open();A&&PrintDialog.printPreview(E)}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 m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
+PrintDialog.prototype.create=function(a){function b(A){var D=h.checked||k.checked,E=parseInt(w.value)/100;isNaN(E)&&(E=1,w.value="100%");mxClient.IS_SF&&(E*=.75);var F=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/e.pageScale;if(D){var M=h.checked?1:parseInt(u.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,e,F))}var N=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*E);F.height=Math.ceil(F.height*E);H*=E;!D&&e.pageVisible?(E=e.getPageLayout(),M-=E.x*F.width,N-=E.y*F.height):
+D=!0;D=PrintDialog.createPrintPreview(e,H,F,0,M,N,D);D.open();A&&PrintDialog.printPreview(D)}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 m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(h);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
m.appendChild(p);mxEvent.addListener(p,"click",function(A){h.checked=!h.checked;k.checked=!h.checked;mxEvent.consume(A)});mxEvent.addListener(h,"change",function(){k.checked=!h.checked});d.appendChild(m);g.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,
"click",function(A){k.checked=!k.checked;h.checked=!k.checked;mxEvent.consume(A)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);g.appendChild(d);mxEvent.addListener(k,"change",
function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");h.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);g.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
@@ -2045,18 +2046,18 @@ m.style.paddingTop="20px";m.setAttribute("align","right");p=mxUtils.button(mxRes
m.appendChild(p);d.appendChild(m);g.appendChild(d);f.appendChild(g);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}};
PrintDialog.createPrintPreview=function(a,b,e,f,g,d,h){b=new mxPrintPreview(a,b,e,f,g,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=h;h=a.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";b.backgroundColor=h;var m=b.isTextLabel;b.isTextLabel=function(k){return"geHint"==!k.className&&m.apply(this,arguments)};var p=b.getLinkForCellState;b.getLinkForCellState=function(k){return a.getAbsoluteUrl(p.apply(this,arguments))};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
+var PageSetupDialog=function(a){function b(){var E=w;null!=E&&null!=E.originalSrc&&(E=a.createImageForPageLink(E.originalSrc,null));null!=E&&null!=E.src?(u.style.backgroundImage="url("+E.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=y&&y!=mxConstants.NONE&&(u.style.backgroundColor=y,u.style.display="inline-block")}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("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 m=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 p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.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")+":");
+h=document.createElement("td");h.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();h.appendChild(p);mxEvent.addListener(p,"change",function(){var E=parseInt(p.value);p.value=Math.max(1,isNaN(E)?e.getGridSize():E)});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 k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";
-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();h.appendChild(u);h.appendChild(k);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");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,y,w,m.get());D.ignoreColor=e.background==y;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
-(D.shadowVisible=A);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";h.appendChild(E);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,y=e.background,A=e.shadowVisible,D=function(E){a.showBackgroundImageDialog(function(F,H,M,N){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),w=F,A=N);y=M;b()},w,y,!0);mxEvent.consume(E)};mxEvent.addListener(k,"click",D);mxEvent.addListener(u,"click",D);b();h.appendChild(u);h.appendChild(k);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");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&h.appendChild(k);D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(p.value);isNaN(E)||e.gridSize===E||e.setGridSize(E);E=new ChangePageSetup(a,y,w,m.get());E.ignoreColor=e.background==y;E.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=A&&
+(E.shadowVisible=A);e.pageFormat.width==E.previousFormat.width&&e.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage&&E.shadowVisible==e.shadowVisible||e.model.execute(E)});D.className="geBtn gePrimaryBtn";h.appendChild(D);a.editor.cancelFirst||h.appendChild(k);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var g=document.createElement("input");g.setAttribute("name",b);g.setAttribute("type","radio");g.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var h=document.createElement("select");h.style.position="relative";h.style.marginBottom="4px";h.style.borderRadius="4px";h.style.borderWidth="1px";h.style.borderStyle="solid";
h.style.boxSizing="border-box";h.style.padding="2px";h.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";g.style.marginRight="6px";m.appendChild(g);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,
mxResources.get("landscape"));m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign=
-"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<A.length;E++){var D=document.createElement("option");D.setAttribute("value",A[E].unit);mxUtils.write(D,A[E].label);y.appendChild(D)}y.value=Editor.pageSizeUnit;k.appendChild(y);
-m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(E=0;E<H.length;E++)A=H[E],F[A.key]=A,D=document.createElement("option"),D.setAttribute("value",A.key),mxUtils.write(D,A.title),h.appendChild(D);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
+"right";k.appendChild(w);var y=document.createElement("select");y.style.marginLeft="4px";y.style.maxWidth="78px";y.style.width="78px";for(var A=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],D=0;D<A.length;D++){var E=document.createElement("option");E.setAttribute("value",A[D].unit);mxUtils.write(E,A[D].label);y.appendChild(E)}y.value=Editor.pageSizeUnit;k.appendChild(y);
+m.style.display="none";k.style.display="none";var F={},H=PageSetupDialog.getFormats();for(D=0;D<H.length;D++)A=H[D],F[A.key]=A,E=document.createElement("option"),E.setAttribute("value",A.key),mxUtils.write(E,A.title),h.appendChild(E);var M=function(){h.value="custom";for(var J=0;J<H.length;J++){var V=H[J];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==V.format.width&&e.height==V.format.height?(h.value=V.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==V.format.height&&e.height==V.format.width&&(h.value=V.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
h.value?(u.value=Editor.toUnit(e.width,y.value),w.value=Editor.toUnit(e.height,y.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};M();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var N=function(J,V){J=F[h.value];null!=J.format?(u.value=Editor.toUnit(d.checked?J.format.height:J.format.width,y.value),w.value=Editor.toUnit(d.checked?J.format.width:J.format.height,y.value),k.style.display=
"none",m.style.display=""):(m.style.display="none",k.style.display="");J=parseFloat(u.value);if(isNaN(J)||0>=J)u.value=Editor.toUnit(e.width,y.value);J=parseFloat(w.value);if(isNaN(J)||0>=J)w.value=Editor.toUnit(e.height,y.value);J=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),y.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),y.value)));V||J.width==e.width&&J.height==e.height||(e=J,null!=f&&f(e))};mxEvent.addListener(b,"click",function(J){g.checked=!0;N(J);mxEvent.consume(J)});
@@ -2065,28 +2066,28 @@ Editor.pageSizeUnit),y.value);Editor.pageSizeUnit=y.value;N(J,!0);mxEvent.consum
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,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
-E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(E,(g||mxResources.get("filename"))+":");A.appendChild(E);y.appendChild(A);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-g||null==h)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=D,M.style.backgroundColor=
-"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(D);y.appendChild(A);
-null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),
+var FilenameDialog=function(a,b,e,f,g,d,h,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),y=document.createElement("div");y.style.width="100%";y.style.display="grid";y.style.gap="5px 8px";y.style.gridAutoColumns="auto 1fr";y.style.boxSizing="border-box";y.style.padding="3px";var A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.justifyContent="flex-end";A.style.minWidth="0";var D=document.createElement("div");D.style.display="inline-block";
+D.style.textOverflow="ellipsis";D.style.whiteSpace="nowrap";D.style.overflow="hidden";D.style.fontSize="10pt";D.style.padding="2px 0";D.setAttribute("title",g||mxResources.get("filename"));mxUtils.write(D,(g||mxResources.get("filename"))+":");A.appendChild(D);y.appendChild(A);var E=document.createElement("input");E.setAttribute("value",b||"");E.style.flexGrow="1";var F=mxUtils.button(e,function(){if(null==d||d(E.value))p&&a.hideDialog(),f(E.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+g||null==h)if(null!=u?Editor.selectFilename(E):(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=y.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(N){null!=M&&(M.style.backgroundColor="",M=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(N){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=E,M.style.backgroundColor=
+"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(N){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),F.click());N.stopPropagation();N.preventDefault()}))}}};A=document.createElement("div");A.style.display="inline-flex";A.style.alignItems="center";A.style.gap="4px";A.style.whiteSpace="nowrap";A.appendChild(E);y.appendChild(A);
+null==g&&null!=h||null==u||null==a.editor.diagramFileTypes||(A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.textOverflow="ellipsis",A.style.justifyContent="flex-end",A.style.fontSize="10pt",mxUtils.write(A,mxResources.get("type")+":"),y.appendChild(A),A=document.createElement("div"),A.style.display="inline-flex",A.style.alignItems="center",A.style.whiteSpace="nowrap",y.appendChild(A),b=FilenameDialog.createFileTypes(a,E,a.editor.diagramFileTypes),
b.style.width="100%",A.appendChild(b));null!=h&&y.appendChild(h);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});A.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));
-a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(D,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
+a.editor.cancelFirst&&row.appendChild(A);mxEvent.addListener(E,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);a.editor.cancelFirst||row.appendChild(A);y.appendChild(row);w.appendChild(y);this.container=w};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(g)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var h=b.value.lastIndexOf(".drawio.");h=0<h?h:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<h?b.value.substring(0,h+1)+d:b.value+"."+d;"createEvent"in
document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var h=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){h=m;break}}f.value=h};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};
var WrapperWindow=function(a,b,e,f,g,d,h,m){m=null!=m?m:document.createElement("div");this.window=new mxWindow(b,m,e,f,g,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);h(m)};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph;if(null!=h.container&&!h.transparentBackground){if(h.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=h.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(h.container),p.style.position="absolute",h.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){h.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=
h.tooltipHandler&&h.tooltipHandler.isHideOnHover()&&h.tooltipHandler.hide();h.isMouseDown&&!mxEvent.isConsumed(k)&&h.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){h.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
-10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",E=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var D=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),y=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
-this.scale-y+m,E)+H*h)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
-"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=E,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
+mxGraphView.prototype.validateBackgroundStyles=function(h,m,p){var k=this.graph;h=null!=h?h:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,y=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",A="none",D="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){D=
+10;mxClient.IS_SVG?(A=unescape(encodeURIComponent(this.createSvgGrid(y,h))),A=window.btoa?btoa(A):Base64.encode(A,!0),A="url(data:image/svg+xml;base64,"+A+")",D=k.gridSize*this.scale*this.gridSteps*h):A="url("+this.gridImage+")";var E=y=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var F=k.gridSize*this.scale*this.gridSteps,H=m%F;F=p%F;null!=k.view.backgroundPageShape&&(E=this.getBackgroundPageBounds(),y=1+E.x,E=1+E.y);D=-Math.round(D-mxUtils.mod(this.translate.x*
+this.scale-y+m,D)+H*h)+"px "+-Math.round(D-mxUtils.mod(this.translate.y*this.scale-E+p,D)+F*h)+"px"}h=k.view.canvas;null!=h.ownerSVGElement&&(h=h.ownerSVGElement);y=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=D,k.view.backgroundPageShape.node.style.backgroundImage=A,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
+"none"==k.getAdaptiveColors()?"light":"",h.style.backgroundImage="none",h.style.backgroundColor="",k.container.style.backgroundColor=y?k.diagramBackgroundColor:""):(h.style.backgroundPosition=D,h.style.backgroundImage=A,"1"==urlParams.transparent?k.container.style.background="transparent":!y||null!=k.background&&k.background!=mxConstants.NONE?h.style.backgroundColor=u:(h.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h,
m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}h=mxUtils.getLightDarkColor(h);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){a.apply(this,arguments);
if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+h,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(h,m,p){var k=this.view.scale,u=this.view.translate,w=this.pageFormat,y=k*this.pageScale,A=this.view.getBackgroundPageBounds();
-m=A.width;p=A.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),D=(h=h&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,F=h?Math.ceil(m/E.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?D:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
-Math.round(A.y+(V+1)*E.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*E.height))]:[new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*E.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
+m=A.width;p=A.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*y,w.height*y),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(p/D.height)-1:0,F=h?Math.ceil(m/D.width)-1:0,H=A.x+m,M=A.y+p;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(N){if(null!=N){for(var J=N==this.horizontalPageBreaks?E:F,V=0;V<=J;V++){var W=N==this.horizontalPageBreaks?[new mxPoint(Math.round(A.x),
+Math.round(A.y+(V+1)*D.height)),new mxPoint(Math.round(H),Math.round(A.y+(V+1)*D.height))]:[new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(A.y)),new mxPoint(Math.round(A.x+(V+1)*D.width),Math.round(M))];null!=N[V]?(N[V].points=W,N[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),N[V]=W)}for(V=J;V<N.length;V++)null!=N[V]&&N[V].destroy();N.splice(J,N.length-J)}});h(this.horizontalPageBreaks);
h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var h=
e.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),m=0<h.width?h.x/this.scale-this.translate.x:0,p=0<h.height?h.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var y=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+y*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+h.height/this.scale)/k)-y)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2103,10 +2104,10 @@ navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{Y=[parseInt(ba[1],10),p
(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(Y){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(Y)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(Y)-ba.y-this.diagramContainer.clientHeight?
this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(Y,ba){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(Y){16==Y.which?this.shiftDown=!0:32!=Y.which||g.isEditing()?mxEvent.isConsumed(Y)||27!=Y.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||
mxEvent.getSource(Y)!=g.container||mxEvent.consume(Y))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(Y){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(Y){return y.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(Y.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(Y.getEvent()))&&
-(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var E=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=mxUtils.bind(this,
+(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(Y){return A.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,
function(){if(null!=this.toolbar)for(var Y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ba=this.toolbar.container.firstChild;null!=ba;){var L=ba.getAttribute("data-min-width");null!=L&&parseInt(L)>Y?ba.style.display="none":ba.style.display="";ba=ba.nextSibling}}),F=!1,H=null,M=null,N=null,J=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=g.cellEditor.isContentEditing()){for(var Y=this.toolbar.container.firstChild,ba=[];null!=Y;){var L=Y.nextSibling;Y.parentNode.removeChild(Y);
-ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;D()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",D);mxEvent.addListener(window,"resize",
-D);D();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
+ba.push(Y);Y=L}Y=this.toolbar.fontMenu;L=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var U=0;U<N.length;U++)this.toolbar.container.appendChild(N[U]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=M}F=g.cellEditor.isContentEditing();H=Y;M=L;N=ba;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,"resize",
+E);E();g.isTouchPopupMenuEnabled=function(){return null==f.dialog};var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);J();if(g.cellEditor.isContentEditing()){var Y=!1,ba=function(){Y||(Y=!0,window.setTimeout(function(){var L=g.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(L.fontFamily)),f.toolbar.setFontSize(parseInt(L.fontSize))));Y=!1},0))};mxEvent.addListener(g.cellEditor.textarea,
"input",ba);mxEvent.addListener(g.cellEditor.textarea,"touchend",ba);mxEvent.addListener(g.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(g.cellEditor.textarea,"keyup",ba);ba()}};var W=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(Y,ba){try{W.apply(this,arguments),J()}catch(L){f.handleError(L)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(Y){}var T=g.fireMouseEvent;
g.fireMouseEvent=function(Y,ba,L){try{Y==mxEvent.MOUSE_DOWN&&this.container.focus(),T.apply(this,arguments)}catch(U){f.handleError(U)}};var O=g.foldCells;g.foldCells=function(Y,ba,L,U,X){try{O.apply(this,arguments)}catch(ia){f.handleError(ia)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(Y,ba,L){this.menus.createPopupMenu(Y,ba,L)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(Y){g.popupMenuHandler.hideMenu()}));
this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(Y,ba){var L=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(L.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(L[L.length-1]))},0));g.pasteCellStyles(L)});var fa=null,S=null;a=mxUtils.bind(this,function(){if(null!=this.toolbar){var Y=this.getSelectionState();g.isEnabled()&&
@@ -2125,32 +2126,32 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
arguments);e.updateActionStates()};a.showLinkDialog=mxUtils.bind(e,e.showLinkDialog);a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),e=this.initSelectionState(),f=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(e,b[g],b,f),f=!1)}this.updateSelectionStateForTableCells(e);if(Editor.enableCustomProperties){e.customProperties={};a=e.vertices;b=e.edges;for(g=0;g<a.length;g++)this.findCommonProperties(a[g],e.customProperties,0==g,e);
for(g=0;g<b.length;g++)this.findCommonProperties(b[g],e.customProperties,0==a.length&&0==g,e)}return e};
-EditorUi.prototype.findCommonProperties=function(a,b,e,f){f=mxUtils.bind(this,function(p){if(null!=p)if(e)for(var k=0;k<p.length;k++)b[p[k].name]=p[k];else for(var u in b)if(null!=u){var w=!1;for(k=0;k<p.length;k++)if(p[k].name==u&&p[k].type==b[u].type){w=!0;break}w||delete b[u]}});var g=this.editor.graph,d=g.view.getState(a);if(null!=d&&null!=d.shape){if(!d.shape.commonCustomPropAdded){d.shape.commonCustomPropAdded=!0;d.shape.customProperties=d.shape.customProperties||[];if(null!=d.shape&&null!=
-d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=mxUtils.bind(this,function(p){p=h.desc.getElementsByTagName(p);for(var k=[],u=0;u<p.length;u++){var w=p[u].getAttribute("color");if(!mxUtils.isValidColor(w)){var y=p[u].getAttribute("name");y=null!=y?y:Editor.getLabelForStylename(w);var A=p[u].getAttribute("default");A=null!=A?A:h.getDefaultColorValue(p[u],g);k.push({name:w,type:"color",primary:"false"!=p[u].getAttribute("primary"),defVal:A,defaultColor:A,undefinedColor:A,dispName:y})}}return k});
-Array.prototype.push.apply(d.shape.customProperties,m("fillcolor"));Array.prototype.push.apply(d.shape.customProperties,m("strokecolor"))}d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)}f(d.shape.customProperties)}a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(p){}};
+EditorUi.prototype.findCommonProperties=function(a,b,e,f){f=mxUtils.bind(this,function(k){if(null!=k)if(e)for(var u=0;u<k.length;u++)b[k[u].name]=k[u];else for(var w in b)if(null!=w){var y=!1;for(u=0;u<k.length;u++)if(k[u].name==w&&k[u].type==b[w].type){y=!0;break}y||delete b[w]}});var g=this.editor.graph,d=g.view.getState(a);if(null!=d&&null!=d.shape){if(!d.shape.commonCustomPropAdded){d.shape.commonCustomPropAdded=!0;d.shape.customProperties=d.shape.customProperties||[];if(null!=d.shape&&null!=
+d.shape.stencil&&null!=d.shape.stencil.desc){var h=d.shape.stencil,m=[],p=mxUtils.bind(this,function(k){k=h.desc.getElementsByTagName(k);for(var u=[],w=0;w<k.length;w++){var y=k[w].getAttribute("color");if(!mxUtils.isValidColor(y)&&!m[y]){m[y]=!0;var A=k[w].getAttribute("name");A=null!=A?A:Editor.getLabelForStylename(y);var D=k[w].getAttribute("default");D=null!=D?D:h.getDefaultColorValue(k[w],g);u.push({name:y,type:"color",primary:"false"!=k[w].getAttribute("primary"),defVal:D,defaultColor:D,undefinedColor:D,
+dispName:A})}}return u});Array.prototype.push.apply(d.shape.customProperties,p("fillcolor"));Array.prototype.push.apply(d.shape.customProperties,p("strokecolor"));Array.prototype.push.apply(d.shape.customProperties,p("fontcolor"))}d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)}f(d.shape.customProperties)}a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(k){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),g=e.getParent(f);if(null!=f&&null!=g){for(var d=f.getIndex(b[0]),h=g.getIndex(f),m=null,p=1,k=1,u=0,w=h<g.getChildCount()-1?e.getChildAt(e.getChildAt(g,h+1),d):null;u<b.length-1;){var y=b[++u];null==w||w!=y||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(w),w=h+k<g.getChildCount()?e.getChildAt(e.getChildAt(g,h+k),d):null);var A=this.editor.graph.view.getState(y);
if(y==e.getChildAt(f,d+p)&&null!=A&&1==mxUtils.getValue(A.style,"colspan",1)&&1==mxUtils.getValue(A.style,"rowspan",1))p++;else break}u==k*p-1&&(a.mergeCell=b[0],a.colspan=p,a.rowspan=k)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
EditorUi.prototype.createTimeout=function(a,b,e){var f=!0,g=null,d=mxUtils.bind(this,function(m){g.clear()&&(f=!1,m=null!=m?m:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(a,b,e)})},null!=e?e(m):this.handleError(m))}),h=window.setTimeout(d,null!=a?a:this.timeout);g={clear:function(){window.clearTimeout(h);return f},isAlive:function(){return f}};null!=b&&this.tryAndHandle(mxUtils.bind(this,function(){b(g)}),d);return g};
EditorUi.prototype.tryAndHandle=function(a,b){try{a()}catch(e){null!=b?b(e):this.handleError(e)}};
EditorUi.prototype.removeUserDefinedDarkColors=function(a,b,e){var f=this.editor.graph;a=null!=a?a:f.getSelectionCells();var g=Graph.colorStyles,d=document.createElement("div");f.model.beginUpdate();try{for(var h=0;h<a.length;h++)if(f.model.isEdge(a[h])||f.model.isVertex(a[h])){var m=f.getCellStyle(a[h],!1);if(null!=m)for(var p=0;p<g.length;p++)try{var k=m[g[p]];if(mxUtils.isLightDarkColor(k)){var u=mxUtils.getLightDarkColor(k);f.setCellStyles(g[p],u.light,[a[h]])}}catch(y){}b&&f.isHtmlLabel(a[h])&&
-"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),y.style.setProperty(A,E.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
+"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[h])),Graph.addLightDarkColors(d,null,null,function(y,A,D){return mxUtils.isLightDarkColor(D)?(D=mxUtils.getLightDarkColor(D),y.style.setProperty(A,D.light),!0):!1})&&f.cellLabelChanged(a[h],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
EditorUi.prototype.updateSelectionStateForCell=function(a,b,e,f){e=this.editor.graph;a.cells.push(b);if(e.getModel().isVertex(b)){a.connections=0<e.model.getEdgeCount(b);a.unlocked=a.unlocked&&!e.isCellLocked(b);a.resizable=a.resizable&&e.isCellResizable(b);a.rotatable=a.rotatable&&e.isCellRotatable(b);a.movable=a.movable&&e.isCellMovable(b)&&!e.isTableRow(b)&&!e.isTableCell(b);a.swimlane=a.swimlane||e.isSwimlane(b);a.table=a.table||e.isTable(b);a.cell=a.cell||e.isTableCell(b);a.row=a.row||e.isTableRow(b);
a.vertices.push(b);var g=e.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else e.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
!1);d=e.view.getState(b);null!=d&&(a.html=a.html&&e.isHtmlLabel(b),a.autoSize=a.autoSize||e.isAutoSizeState(d),a.glass=a.glass&&e.isGlassState(d),a.rounded=a.rounded&&e.isRoundedState(d),a.lineJumps=a.lineJumps&&e.isLineJumpState(d),a.image=a.image||e.isImageState(d),a.shadow=a.shadow&&e.isShadowState(d),a.fill=a.fill&&e.isFillState(d),a.gradient=a.fill&&e.isGradientState(d),a.stroke=a.stroke&&e.isStrokeState(d),b=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||
"image"==b,e.mergeStyle(d.style,a.style,f))};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(p,k){"mouseDown"==k.getProperty("eventName")&&b.hideShapePicker()}));var e=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",e);a.addListener(mxEvent.ESCAPE,e);a.view.addListener(mxEvent.SCALE,e);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);a.getSelectionModel().addListener(mxEvent.CHANGE,e);var f=a.popupMenuHandler.isMenuShowing;
a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var g=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,E){var D=a.getCompositeParent(p.cell);y=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=y&&y.relative;)cell=
-D,D=a.model.getParent(cell),y=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(F){E(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
-k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(E,A,D,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(D,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
-function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,E,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
+e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var h=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?h.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(y,A,D){var E=a.getCompositeParent(p.cell);y=a.getCellGeometry(E);for(u.consume();null!=E&&a.model.isVertex(E)&&null!=y&&y.relative;)cell=
+E,E=a.model.getParent(cell),y=a.getCellGeometry(E);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),E,mxUtils.bind(this,function(F){D(F);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(F))}),k)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
+k.getProperty("arrow"),w=k.getProperty("direction"),y=k.getProperty("event");u=u.getBoundingClientRect();var A=mxUtils.getOffset(a.container),D=a.container.scrollLeft+u.x-A.x;A=a.container.scrollTop+u.y-A.y;var E=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=b.showShapePicker(D,A,E,mxUtils.bind(this,function(H){null!=H&&a.connectVertex(E,w,a.defaultEdgeLength,y,!0,!1,function(M,N,J){J(H);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(H))},
+function(M){a.selectCellsForConnectVertex(M)},y,this.hoverIcons)}),w,!0);null!=F&&(this.centerShapePicker(F,u,D,A,w),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
EditorUi.prototype.centerShapePicker=function(a,b,e,f,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):g==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};
EditorUi.prototype.showShapePicker=function(a,b,e,f,g,d,h,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,h,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};
-EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(D){D=D[0];var F=0,H=0,M=D.geometry;null!=M&&(w.model.isEdge(D)&&(D=M.getTerminalPoint(!1),M=new mxRectangle(0,0,D.x,D.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
-g=w.view.getState(e);var E=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(D){var F=document.createElement("a");y.appendChild(F);null!=E&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var H=D.geometry;w.model.isEdge(D)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([D],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(D);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
-N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
+EditorUi.prototype.createShapePicker=function(a,b,e,f,g,d,h,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,y=null;p=null!=p?p:function(E){E=E[0];var F=0,H=0,M=E.geometry;null!=M&&(w.model.isEdge(E)&&(E=M.getTerminalPoint(!1),M=new mxRectangle(0,0,E.x,E.y)),F=M.width/2,H=M.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-F),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-H))};if(null!=h&&0<h.length){var A=this;w=this.editor.graph;y=document.createElement("div");
+g=w.view.getState(e);var D=null==e||null!=g&&w.isTransparentState(g)?null:w.copyStyle(e);y.className="geShapePicker";y.setAttribute("title",mxResources.get("sidebarTooltip"));y.style.left=Math.round(a)+"px";y.style.top=Math.round(b)+"px";mxClient.IS_POINTER&&(y.style.touchAction="none");m||mxUtils.setPrefixedStyle(y.style,"transform","translate(-22px,-22px)");w.container.appendChild(y);g=mxUtils.bind(this,function(E){var F=document.createElement("a");y.appendChild(F);null!=D&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(D,[E]):this.sidebar.graph.pasteCellStyles([E],w.currentVertexStyle,w.currentEdgeStyle);var H=E.geometry;w.model.isEdge(E)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([E],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=w.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==e&&w.isSelectionEmpty()){var N=w.cloneCell(E);if(null!=f)f(N);else{var J=p([N]);w.model.isEdge(N)?
+N.geometry.translate(J.x,J.y):(N.geometry.x=J.x,N.geometry.y=J.y);w.model.beginUpdate();try{w.addCell(N),w.model.isVertex(N)&&w.isAutoSizeCell(N)&&w.updateCellSize(N)}finally{w.model.endUpdate()}w.setSelectionCell(N);w.scrollCellToVisible(N);u&&w.startEditing(N);null!=A.hoverIcons&&A.hoverIcons.update(w.view.getState(N))}}else N=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(E,N);null!=d&&d(M);mxEvent.consume(M)}}),25,25,null,null,e),H.style.display="flex",H.style.alignItems=
"center",H.style.justifyContent="center",F.appendChild(H))});for(k=0;k<(m?Math.min(h.length,4):h.length);k++)g(h[k]);h=y.offsetTop+y.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<h&&(y.style.top=Math.max(w.container.scrollTop+22,b-h)+"px");h=y.offsetLeft+y.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<h&&(y.style.left=Math.max(w.container.scrollLeft+22,a-h)+"px")}return y};
EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,g=mxUtils.bind(this,function(d,h,m,p){return f.createVertex(null,null,p||"",0,0,h||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,h,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=h?h:0),!1);d.geometry.points=null!=h?[new mxPoint(d.geometry.width/2,h)]:[];d.geometry.relative=!0;d.edge=
!0;return d});if(null!=a)try{a=f.cloneCell(a),f.model.isVertex(a)&&null!=a.geometry&&(a.geometry.x=0,a.geometry.y=0)}catch(d){a=null}null==a&&(a=g(f.appendFontSize(Editor.defaultTextStyle,f.vertexFontSize),60,30,"Text"));a=[a,g("whiteSpace=wrap;html=1;"),g("ellipse;whiteSpace=wrap;html=1;",80,80),g("rhombus;whiteSpace=wrap;html=1;",80,80),g("rounded=1;whiteSpace=wrap;html=1;"),g("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),g("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2170,7 +2171,7 @@ EditorUi.prototype.getImageForEdgeStyle=function(a){var b=Format.orthogonalImage
null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==e&&(b="vertical"==mxUtils.getValue(a,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return b};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var h=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{h=h||d.getSelectionCells();h=d.getExportableCells(d.model.getTopmostCells(h));for(var m={},p=d.createCellLookup(h),k=d.cloneCells(h,null,m),u=new mxGraphModel,w=u.getChildAt(u.getRoot(),
-0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var E=d.getCellGeometry(k[y]);null!=E&&E.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(E.offset=null,E.relative=!1,E.x=A.x/A.view.scale-A.view.translate.x,E.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
+0),y=0;y<k.length;y++){u.add(w,k[y]);var A=d.view.getState(h[y]);if(null!=A){var D=d.getCellGeometry(k[y]);null!=D&&D.relative&&!u.isEdge(h[y])&&null==p[mxObjectIdentity.get(u.getParent(h[y]))]&&(D.offset=null,D.relative=!1,D.x=A.x/A.view.scale-A.view.translate.x,D.y=A.y/A.view.scale-A.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=e.apply(this,arguments);a.updatePasteActionStates();return h};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*P.width),this.scale*(this.translate.y+ca.y*P.height),this.scale*ca.width*
@@ -2186,8 +2187,8 @@ mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appe
": "+this.currentPage.getName());p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(ca-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(ca+1,this.pages.length)].getName())}});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var y=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display=
"",k.style.display="inline-block"):(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var A=this.menus.get("pages");null!=A&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(ca){var P=new mxPopupMenu(A.funct);P.smartSeparators=!0;P.showDisabled=!0;P.autoExpand=!0;P.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(P,arguments);P.destroy()});var da=mxUtils.getOffset(k);P.popup(da.x,da.y+k.offsetHeight,null,ca);mxEvent.addListener(P.div,
"mouseleave",mxUtils.bind(this,function(){P.hideMenu()}))}))}this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ca){a.isLightboxView()?
-(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,F=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),
-600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,F=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
+600)}),ca||200)}),H=mxUtils.bind(this,function(ca){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=M.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
P.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){M.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(ca){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();
@@ -2282,14 +2283,14 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&"undefined"!==typeof wind
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(f){f=new ChangePageSetup(this,null,f);f.ignoreColor=!0;this.editor.graph.model.execute(f)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward",88:"copyAsSvg"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(A){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var F=f.getCellGeometry(E[D]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(E[D],
-F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(D);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(D),37==w||38==w?f.model.add(F,D,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,D,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(D,0,0,f.getMovableCells(E)),null!=M.first&&(D=
-E=0,37==w?E=-y:38==w?D=-y:39==w?E=y:40==w&&(D=y),M.currentDx+=E*H,M.currentDy+=D*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
+EditorUi.prototype.createKeyHandler=function(a){function b(w,y,A){if(!f.isSelectionEmpty()&&f.isEnabled()){y=null!=y?y:1;var D=f.getCompositeParents(f.getSelectionCells()),E=0<D.length?D[0]:null;if(null!=E)if(A){f.getModel().beginUpdate();try{for(E=0;E<D.length;E++)if(f.getModel().isVertex(D[E])&&f.isCellResizable(D[E])){var F=f.getCellGeometry(D[E]);null!=F&&(F=F.clone(),37==w?F.width=Math.max(0,F.width-y):38==w?F.height=Math.max(0,F.height-y):39==w?F.width+=y:40==w&&(F.height+=y),f.getModel().setGeometry(D[E],
+F))}}finally{f.getModel().endUpdate()}}else{F=f.model.getParent(E);var H=f.getView().scale;A=null;1==f.getSelectionCount()&&f.model.isVertex(E)&&null!=f.layoutManager&&!f.isCellLocked(E)&&(A=f.layoutManager.getLayout(F));if(null!=A&&A.constructor==mxStackLayout)y=F.getIndex(E),37==w||38==w?f.model.add(F,E,Math.max(0,y-1)):(39==w||40==w)&&f.model.add(F,E,Math.min(f.model.getChildCount(F),y+1));else{var M=f.graphHandler;null!=M&&(null==M.first&&M.start(E,0,0,f.getMovableCells(D)),null!=M.first&&(E=
+D=0,37==w?D=-y:38==w?E=-y:39==w?D=y:40==w&&(E=y),M.currentDx+=D*H,M.currentDy+=E*H,M.checkPreview(),M.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=M.first){var N=M.roundLength(M.currentDx/H),J=M.roundLength(M.currentDy/H);M.moveCells(M.cells,N,J);M.reset()}},400))}}}}var e=this,f=this.editor.graph,g=new mxKeyHandler(f),d=g.isEventIgnored;g.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&
(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var h=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=g.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var y=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?y=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?
y=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(y=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=y)return y.funct;if("/"==w.key&&!this.isControlDown(w)&&!mxEvent.isAltDown(w))return function(){var A=document.getElementById("geOmniSearch");null!=A&&30<A.clientWidth&&A.focus()};if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var A=
f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=A&&0<A.length&&(1==A.length&&f.model.isEdge(A[0])?f.setSelectionCell(f.model.getTerminal(A[0],!1)):f.setSelectionCell(A[A.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(w)?function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null,!0)}:function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null)}}return p.apply(this,
-arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,E){var D=this.actions.get(A);null!=D&&(A=function(){D.isEnabled()&&D.funct.apply(this,arguments)},y?E?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):E?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
+arguments)};g.bindAction=mxUtils.bind(this,function(w,y,A,D){var E=this.actions.get(A);null!=E&&(A=function(){E.isEnabled()&&E.funct.apply(this,arguments)},y?D?g.bindControlShiftKey(w,A):g.bindControlKey(w,A):D?g.bindShiftKey(w,A):g.bindKey(w,A))});var k=this,u=g.escape;g.escape=function(w){u.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){f.exitGroup()});g.bindControlShiftKey(35,function(){f.enterGroup()});g.bindShiftKey(36,function(){f.home()});g.bindKey(35,function(){f.refresh()});
g.bindAction(80,!0,"print");g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(61,!0,"zoomIn");g.bindAction(187,!0,"zoomIn");g.bindAction(222,!0,"zoomIn");g.bindAction(173,!0,"zoomOut");g.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)g.bindAction(79,!0,"outline",!0),g.bindControlKey(36,function(){f.isEnabled()&&f.foldCells(!0)}),g.bindControlKey(35,function(){f.isEnabled()&&f.foldCells(!1)}),g.bindControlKey(13,function(){k.ctrlEnter()}),g.bindAction(8,
!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),
g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(90,!0,"redo",!0),g.bindAction(89,!0,"redo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,
@@ -2347,20 +2348,20 @@ Sidebar.prototype.isEntryIgnored=function(a,b){b=!b;if(null!=a.parentLibraries&&
Sidebar.prototype.searchEntries=function(a,b,e,f,g,d){if(null!=this.taglist&&null!=a){"mxgraph."==a.substring(0,8)&&0>a.indexOf(" ")&&8<a.lastIndexOf(".")&&(a=a.substring(8).replace(/\./g," "));var h=a.toLowerCase().split(" ");a=new mxDictionary;g=(e+1)*b;for(var m=[],p=0,k=0;k<h.length;k++){var u=Editor.soundex(h[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[h[k]];var w=null!=m?m.entries.slice():[];m=this.taglist[u];w=null!=m?w.concat(m.entries):w;u=new mxDictionary;if(0<w.length){m=[];
for(var y=0;y<w.length;y++){var A=w[y];if(0==p==(null==a.get(A))&&null==u.get(A)&&(u.put(A,A),!this.isEntryIgnored(A,d)&&(m.push(A),k==h.length-1&&m.length==g))){f(m.slice(e*b,g),g,!0,h);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,h)}else f([],null,null,h)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};
Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};
-Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){D=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
+Sidebar.prototype.addSearchPalette=function(a){function b(S,aa){E=aa;S=S.firstChild.nextSibling.nextSibling;aa=document.createElement("span");aa.style.color="gray";aa.innerHTML="Enter";S.appendChild(aa)}function e(){k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));F.style.display="none";M=p.value="";O()}var f=this.editorUi,g=f.editor.graph,d=document.createElement("div");d.style.visibility="hidden";this.appendChild(d);var h=document.createElement("div");
h.className="geSidebar geSearchSidebar";a||(h.style.display="none");var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";var p=document.createElement("input");p.setAttribute("id","geOmniSearch");p.setAttribute("placeholder",mxResources.get("typeSlashToSearch"));p.setAttribute("type","text");m.appendChild(p);var k=document.createElement("img");k.setAttribute("src",Editor.magnifyImage);k.setAttribute("title",mxResources.get("search"));
k.className="geAdaptiveAsset";m.appendChild(k);h.appendChild(m);var u=!1;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(S){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(S)!=p||document.activeElement==p||(p.focus(),mxClient.IS_GC||mxClient.IS_FF?p.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(S){mxEvent.getSource(S)==p&&u&&mxEvent.consume(S)}),mxUtils.bind(this,function(S){u&&(mxEvent.consume(S),u=!1)}));var w=[],y=mxUtils.bind(this,function(S,aa){f.hideCurrentMenu();
-mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),E=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
-0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),D=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=D||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
-p.value.toLowerCase();D=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
-null,mxUtils.bind(this,function(){f.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?E(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
-function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==D&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
-f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==D&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
+mxUtils.remove(S,w);w.unshift(S);5<w.length&&w.pop();S.funct.apply(this,aa);p.value=null}),A="about deleteAll showBoundingBox createSidebarEntry downloadDesktop toggleGoogleFonts".split(" "),D=mxUtils.bind(this,function(S){var aa=null,Y;for(Y in f.actions.actions){var ba=0>A.indexOf(Y)&&"test"!=Y.substring(0,4)?f.actions.get(Y):null;if(null!=ba&&ba.isEnabled()&&ba.visible){if(Y.toLowerCase()==S)return ba;for(var L=S.toLowerCase().split(" "),U=0,X=0;X<L.length;X++)0==L[X].length?U++:(0<=Y.toLowerCase().indexOf(L[X])||
+0<=ba.getTitle().toLowerCase().indexOf(L[X]))&&U++;U==L.length&&(0>w.indexOf(aa)||null!=aa&&!aa.isEnabled())&&(aa=ba)}}return aa}),E=null;f.addMenuHandler(p,mxUtils.bind(this,function(S,aa){function Y(ja){if(null!=ja&&ja.visible){var ta=S.addItem(ja.getTitle(),null,function(){y(ja,arguments)},aa,null,ja.isEnabled());ja.toggleAction&&ja.isSelected()&&S.addCheckmark(ta,Editor.checkmarkImage);null!=E||!ja.isEnabled()||0!=p.value.length&&U!=ja||b(ta,function(){y(ja,arguments);g.container.focus()})}}var ba=
+p.value.toLowerCase();E=null;var L=S.addItem(mxResources.get("searchShapes"),null,mxUtils.bind(this,function(){fa()}),aa);b(L,function(){fa()});S.addItem(mxResources.get("findInDiagram"),null,mxUtils.bind(this,function(){f.hideCurrentMenu();f.showSearchWindow(!0,p.value);p.value=""}),aa);Editor.enableChatGpt&&!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&"draw.io"==f.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&S.addItem(mxResources.get("generate"),
+null,mxUtils.bind(this,function(){f.openTemplateDialog(encodeURIComponent(p.value));p.value=""}),aa);!f.isOffline()&&f.isOwnGDriveDomain()&&f.isExternalDataComms()&&S.addItem(mxResources.get("help"),null,mxUtils.bind(this,function(){f.searchHelp(p.value);p.value=""}),aa);S.addSeparator();var U=0<p.value.length?D(ba):null;Y(U);for(L=0;L<w.length;L++)w[L]!=U&&Y(w[L]);if(0<ba.length&&null!=f.pages)for(S.addSeparator(),L=0;L<f.pages.length&&!function(ja){if(null!=ja.getName()&&0<=ja.getName().toLowerCase().indexOf(ba)){var ta=
+function(){f.selectPage(ja);g.container.focus();p.value=""},ca=S.addItem(ja.getName()+" ("+mxResources.get("page")+")",null,ta,aa);null==E&&b(ca,ta);return!0}return!1}(f.pages[L]);L++);if(0<ba.length&&null!=f.sidebar&&null!=f.sidebar.entries)for(S.addSeparator(),L=0;L<f.sidebar.entries.length;L++)for(var X=f.sidebar.entries[L].entries,ia=0;ia<X.length;ia++)(function(ja){var ta=f.sidebar.getConfigurationById(ja.id),ca=ja.title.toLowerCase().split(" ");null!=ta&&0<=mxUtils.indexOf(ca,ba)&&(ca=function(){var P=
+f.sidebar.showPalettes(ta.prefix||"",ta.libs||[ta.id],!0);p.value="";null!=P&&1<P.length&&(null==P[1].firstChild||null!=P[1].firstChild.firstChild&&"none"!=P[1].firstChild.style.display||P[0].click(),P[0].scrollIntoView({behavior:"smooth"}))},ja=S.addItem(ja.title+" ("+mxResources.get("openLibrary")+")",null,ca,aa),null==E&&b(ja,ca));return!0})(X[ia])}),null,!0);var F=document.createElement("div");F.style.display="none";F.style.paddingTop="8px";F.style.alignItems="center";F.style.justifyContent="center";
var H=mxUtils.button(mxResources.get("moreResults"),function(){fa()});H.setAttribute("title",mxResources.get("moreResults"));H.className="geBtn gePrimaryBtn";H.style.borderRadius="16px";H.style.padding="8px 12px";F.appendChild(H);h.appendChild(F);var M="",N=!1,J=!1,V=0,W={},T=12,O=mxUtils.bind(this,function(){N=!1;this.currentSearch=null;for(var S=h.firstChild;null!=S;){var aa=S.nextSibling;S!=m&&S!=F&&S.parentNode.removeChild(S);S=aa}});mxEvent.addListener(k,"click",function(){k.getAttribute("src")!=
Editor.magnifyImage&&e();p.focus()});var fa=mxUtils.bind(this,function(){f.hideCurrentMenu();T=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=p.value){if(null!=F.parentNode&&(M!=p.value&&(O(),M=p.value,W={},J=!1,V=0),!N&&!J)){H.setAttribute("disabled","true");F.style.display="flex";H.style.cursor="wait";H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");N=!0;var S={};this.currentSearch=S;try{this.searchEntries(M,T,V,mxUtils.bind(this,
function(aa,Y,ba,L){if(this.currentSearch==S){aa=null!=aa?aa:[];N=!1;V++;this.insertSearchHint(h,M,T,V,aa,Y,ba,L);0==aa.length&&1==V&&(M="");null!=F.parentNode&&F.parentNode.removeChild(F);for(Y=0;Y<aa.length;Y++)mxUtils.bind(this,function(U){try{var X=U();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(U,!1)&&(X.style.opacity=this.closedLibraryOpacity);null==W[X.innerHTML]?(W[X.innerHTML]=null!=U.parentLibraries?U.parentLibraries.slice():[],h.appendChild(X)):null!=
U.parentLibraries&&(W[X.innerHTML]=W[X.innerHTML].concat(U.parentLibraries));mxEvent.addGestureListeners(X,null,null,mxUtils.bind(this,function(ia){var ja=W[X.innerHTML];mxEvent.isPopupTrigger(ia)&&this.showPopupMenuForEntry(X,ja,ia)}));mxEvent.disableContextMenu(X)}catch(ia){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(ia.stack)):console.error(ia))}})(aa[Y]);ba?(H.removeAttribute("disabled"),H.innerHTML="",mxUtils.write(H,mxResources.get("moreResults"))):
-(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=D?(D(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
+(H.innerHTML=mxResources.get("reset"),F.style.display="none",J=!0);H.style.cursor="";h.appendChild(F)}}),mxUtils.bind(this,function(){H.style.cursor=""}),this.searchClosedLibraries)}catch(aa){f.handleError(aa)}}}else O(),M=p.value="",W={},F.style.display="none",J=!1,p.focus()});this.searchShapes=function(S){p.value=S;fa()};mxEvent.addListener(p,"keydown",mxUtils.bind(this,function(S){13==S.keyCode&&null!=E?(E(S,S),mxEvent.consume(S)):9==S.keyCode?(g.container.focus(),mxEvent.consume(S)):27==S.keyCode&&
(e(),mxEvent.consume(S))}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==p.value?(k.setAttribute("src",Editor.magnifyImage),k.setAttribute("title",mxResources.get("search"))):(k.setAttribute("src",Editor.crossImage),k.setAttribute("title",mxResources.get("reset")));""==p.value?(J=!0,F.style.display="none"):p.value!=M?(F.style.display="none",J=!1):N||(F.style.display=J?"none":"flex")}),0)});mxEvent.addListener(p,"keyup",a);mxEvent.addListener(p,"paste",a);mxEvent.addListener(p,
"cut",a);mxEvent.addListener(p,"mousedown",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});mxEvent.addListener(p,"selectstart",function(S){S.stopPropagation&&S.stopPropagation();S.cancelBubble=!0});a=document.createElement("div");a.appendChild(h);this.appendChild(a);this.palettes.search=[d,a]};
Sidebar.prototype.insertSearchHint=function(a,b,e,f,g,d,h,m){0==g.length&&1==f&&(e=document.createElement("div"),e.className="geSidebarText",b=mxResources.get("noResultsFor",[b]),e.setAttribute("title",b),mxUtils.write(e,b),a.appendChild(e))};
@@ -2473,17 +2474,17 @@ a.width,(e-2*this.thumbBorder)/a.height))/100,this.graph.view.scaleAndTranslate(
null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder-1)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=g&&0!=h&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",
b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),f.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a"),D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";mxEvent.addListener(E,"click",function(H){mxEvent.consume(H)});var F=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
-null!=w?(E.className="geButton",E.style.backgroundImage="url("+w+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):(E.className="geItem",this.createThumb(D,k,u,E,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(E,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
-null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(H){mxEvent.isMouseEvent(H)&&this.showTooltip(E,a,F.width,F.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};
+Sidebar.prototype.createItem=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var D=document.createElement("a"),E=2*this.thumbBorder;D.style.width=k+E+"px";D.style.height=u+E+"px";mxEvent.addListener(D,"click",function(H){mxEvent.consume(H)});var F=new mxRectangle(0,0,g,d);null!=a&&0<a.length?(E=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(E),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),
+null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.backgroundRepeat="no-repeat",D.style.backgroundPosition="center",D.style.backgroundSize="24px 24px"):(D.className="geItem",this.createThumb(E,k,u,D,b,e,f,g,d)),1<a.length||a[0].vertex?(f=this.createDragSource(D,this.createDropHandler(a,!0,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p,y),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
+null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,F,y,A),this.createDragPreview(g,d),a,F,y),this.addClickHandler(D,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(H){mxEvent.isMouseEvent(H)&&this.showTooltip(D,a,F.width,F.height,b,e)}))):(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
Sidebar.prototype.createDropHandler=function(a,b,e,f,g,d){e=null!=e?e:!0;return mxUtils.bind(this,function(h,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&h.isEnabled()){a=h.getImportableCells(a);if(0<a.length){h.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:h.isValidDropTarget(p,a,m);var y=null;null==p||w||(p=null);if(!h.isCellLocked(p||
-h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,E=h.view.translate,D=(k+E.x)*A,F=(u+E.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,D,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
-h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;E=h.view.translate;D=(k+E.x)*A;F=(u+E.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],D,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
+h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(p,a,m)){var A=h.view.scale,D=h.view.translate,E=(k+D.x)*A,F=(u+D.y)*A,H=h.cloneCells(a);h.splitEdge(p,H,null,k-f.width/2,u-f.height/2,E,F);y=H}else if(0<a.length&&(y=h.importCells(a,k,u,p),h.model.isVertex(d)&&1==y.length&&h.model.isVertex(y[0]))){var M=h.insertEdge(h.model.getParent(d),null,"",d,y[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[M]);y.push(M);h.connectionHandler.insertBeforeSource&&
+h.insertEdgeBeforeCell(M,d)}if(null!=h.layoutManager){var N=h.layoutManager.getLayout(p);if(null!=N){A=h.view.scale;D=h.view.translate;E=(k+D.x)*A;F=(u+D.y)*A;for(var J=0;J<y.length;J++)N.moveCell(y[J],E,F)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",y));for(J=0;J<y.length;J++)h.model.isVertex(y[J])&&h.isAutoSizeCell(y[J])&&h.updateCellSize(y[J])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=y&&0<y.length&&(h.scrollCellToVisible(y[0]),
h.setSelectionCells(y));(g||h.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=y&&1==y.length)&&window.setTimeout(function(){h.startEditing(y[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
-Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(A);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=D=0;if(null!=k){var H=k.origin;D=H.x;
-F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),N=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-D,p.y-=H.y-F));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=F;D=y.x;F=y.y;m.model.isEdge(b[f])&&(F=D=0);k=b=m.importCells(b,p.x-(M?D:0),p.y-
+Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:h;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),y=m.getCellGeometry(b[f]),A=m.model.getParent(a),D=!0;if(null!=m.layoutManager){var E=m.layoutManager.getLayout(A);null!=E&&E.constructor==mxStackLayout&&(D=!1)}k=m.model.isEdge(a)?null:m.view.getState(A);var F=E=0;if(null!=k){var H=k.origin;E=H.x;
+F=H.y}var M=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),N=m.getCellAt((p.x+E+m.view.translate.x)*m.view.scale,(p.y+F+m.view.translate.y)*m.view.scale,null,null,null,function(fa,S,aa){return!m.isContainer(fa.cell)});if(null!=N&&N!=A)k=m.view.getState(N),null!=k&&(H=k.origin,A=N,M=!0,m.model.isEdge(a)||(p.x-=H.x-E,p.y-=H.y-F));else if(!D||m.isTableRow(a)||m.isTableCell(a))p.x+=E,p.y+=F;E=y.x;F=y.y;m.model.isEdge(b[f])&&(F=E=0);k=b=m.importCells(b,p.x-(M?E:0),p.y-
(M?F:0),M?A:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var J=m.getCellGeometry(b[f]),V=null!=J?J.getTerminalPoint(!0):null;J.points=null;if(null!=V)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var W=m.getCellGeometry(b[e]),T=null!=W?W.getTerminalPoint(!0):null;null!=T&&T.x==V.x&&T.y==V.y&&m.model.setTerminal(b[e],
-a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),D=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
+a,!0)}if(null!=J.getTerminalPoint(!1))J.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(M&&m.model.isVertex(A)){var O=m.view.getState(A);H=O.cell!=m.view.currentRoot?O.origin:new mxPoint(0,0);m.cellsMoved(b,H.x,H.y,null,null,!0)}}else null!=d&&(y=m.getCellGeometry(b[d]),E=p.x-Math.round(y.x),F=p.y-Math.round(y.y),p.x=Math.round(y.x),p.y=Math.round(y.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,E,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(fa){this.editorUi.handleError(fa)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var g=this.editorUi.editor.graph,d=g.view,h=1<f.length,m=g.view.getState(a),p=g.getCellGeometry(a);f=g.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),g.model.isEdge(a)?(p=m.absolutePoints,b=p[0],g=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=g.x/d.scale-d.translate.x-f.width/2,f.y=g.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),
p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),g=f.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+
@@ -2492,7 +2493,7 @@ f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+p.height/2+f.height/2+d:e==mx
2):e==mxConstants.DIRECTION_WEST&&(f.x-=p.getCenterX()+p.width/2,f.y-=p.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(oa,za){var Aa=mxUtils.createImage(oa.src);Aa.style.width=oa.width+"px";Aa.style.height=oa.height+"px";null!=za&&Aa.setAttribute("title",za);mxUtils.setOpacity(Aa,oa==this.refreshTarget?30:20);Aa.style.position="absolute";Aa.style.cursor="crosshair";return Aa}function m(oa,za,Aa,Ma){null!=Ma.parentNode&&(mxUtils.contains(Aa,oa,za)?(mxUtils.setOpacity(Ma,100),U=Ma):mxUtils.setOpacity(Ma,Ma==S?30:20));return Aa}var p=this.editorUi,k=
-p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,E=0;E<f.length&&A;E++)d+=k.model.getDescendants(f[E]).length,A=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+p.editor.graph,u=null,w=null,y=this;d=0;for(var A=this.livePreview,D=0;D<f.length&&A;D++)d+=k.model.getDescendants(f[D]).length,A=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),F=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(oa,za,Aa,Ma,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
J&&U==S){var Ka=oa.isCellSelected(J.cell)?oa.getSelectionCells():[J.cell];oa.updateShapes(oa.model.isEdge(J.cell)?f[0]:f[w],Ka,!0);oa.setSelectionCells(Ka)}else null!=f&&null!=U&&null!=M&&U!=S?(Ka=oa.model.isEdge(M.cell)||null==u?w:u,oa.setSelectionCells(this.dropAndConnect(M.cell,f,L,Ka,za,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(oa.view.getState(oa.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);A&&(F.createDragElement=mxUtils.bind(this,function(){return F.createPreviewElement(this.graph)}),
F.createPreviewElement=mxUtils.bind(this,function(oa){var za=document.createElement("a");za.className="geItem";za.style.overflow="visible";oa=oa.view.scale;za.style.width=oa*Math.max(1,g.width)+"px";za.style.height=oa*Math.max(1,g.height)+"px";mxUtils.setOpacity(za,50);var Aa=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Aa),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);y.createThumb(Aa,oa*Math.max(1,g.width),oa*Math.max(1,g.height),za,null,null,null,null,null,k.shapeBackgroundColor,
0,oa);return za}));var H=F.mouseDown;F.mouseDown=function(oa){mxEvent.isPopupTrigger(oa)||mxEvent.isMultiTouchEvent(oa)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),H.apply(this,arguments))};var M=null,N=null,J=null,V=!1,W=h(this.triangleUp,mxResources.get("connect")),T=h(this.triangleRight,mxResources.get("connect")),O=h(this.triangleDown,mxResources.get("connect")),fa=h(this.triangleLeft,mxResources.get("connect")),S=h(this.refreshTarget,mxResources.get("replace")),aa=null,Y=h(this.roundDrop),
@@ -2502,7 +2503,7 @@ null:oa.getCellGeometry(M.cell),Ja=oa.getCellGeometry(f[Ma]),ra=oa.model.getPare
Pa.height*Aa.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=F.currentHighlight&&null!=F.currentHighlight.state&&oa.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*Aa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
g.height*Aa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),ca=0,P=null,da=this.editorUi.editor.graph.getCellStyle(f[0]);F.getDropTarget=mxUtils.bind(this,function(oa,za,Aa,Ma){var Pa=mxEvent.isAltDown(Ma)||
null==f?null:oa.getCellAt(za,Aa,null,null,null,function(Wa,Xa,bb){return oa.isContainer(Wa.cell)&&"0"!=mxUtils.getValue(Wa.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ka=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ka)&&this.graph.isCellConnectable(Ka)&&(Pa=Ka)}oa.isCellLocked(Pa)&&(Pa=null);var Ja=oa.view.getState(Pa);Ka=U=null;P!=Ja?(ta=(new Date).getTime(),ca=0,P=Ja,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(D&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
+null!=Ja&&(this.updateThread=window.setTimeout(function(){null==U&&(P=Ja,F.getDropTarget(oa,za,Aa,Ma))},this.dropTargetDelay+10))):ca=(new Date).getTime()-ta;if(E&&2500>ca&&null!=Ja&&!mxEvent.isShiftDown(Ma)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(da,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(da,mxConstants.STYLE_SHAPE)||1500<ca||oa.model.isEdge(Ja.cell))&&ca>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ja)&&(oa.model.isVertex(Ja.cell)&&null!=w||oa.model.isEdge(Ja.cell)&&oa.model.isEdge(f[0]))){if(oa.isCellEditable(Ja.cell)){J=Ja;var ra=oa.model.isEdge(Ja.cell)?oa.view.getPoint(Ja):new mxPoint(Ja.getCenterX(),Ja.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height);S.style.left=Math.floor(ra.x)+"px";S.style.top=Math.floor(ra.y)+"px";null==aa&&(oa.container.appendChild(S),aa=S.parentNode);m(za,Aa,ra,S)}}else null==J||!mxUtils.contains(J,za,Aa)||1500<ca&&!mxEvent.isShiftDown(Ma)?(J=null,null!=aa&&(S.parentNode.removeChild(S),aa=null)):null!=J&&null!=aa&&(ra=oa.model.isEdge(J.cell)?oa.view.getPoint(J):new mxPoint(J.getCenterX(),J.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
2,this.refreshTarget.width,this.refreshTarget.height),m(za,Aa,ra,S));if(V&&null!=M&&!mxEvent.isAltDown(Ma)&&null==U){Ka=mxRectangle.fromRectangle(M);if(oa.model.isEdge(M.cell)){var Da=M.absolutePoints;null!=Y.parentNode&&(ra=Da[0],Ka.add(m(za,Aa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),Y)));null!=ba.parentNode&&(Da=Da[Da.length-1],Ka.add(m(za,Aa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
@@ -2518,7 +2519,7 @@ Ka.length;ra++)null!=Ka[ra].parentNode&&Ka[ra].parentNode.removeChild(Ka[ra]);V|
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()){for(var g=b=null,d=0;d<a.length&&(null==g&&f.model.isVertex(a[d])?g=d:null==b&&f.model.isEdge(a[d])&&null==f.model.getTerminal(a[d],!0)&&(b=d),null==g||null==b);d++);d=null==b?g:b;f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:
mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,d,e,g,b));f.scrollCellToVisible(f.getSelectionCell())}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,b,e,f){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,y=null;b.getGraphForEvent=function(A){return k?g.apply(this,arguments):null};b.mouseDown=function(A){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(A),mxEvent.getClientY(A));y=a.style.opacity;k=!1;""==y&&(y="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(A){(k=null!=u&&(Math.abs(u.x-
-mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(E){b.reset(),w.editorUi.handleError(E)}}};
+mxEvent.getClientX(A))>p||Math.abs(u.y-mxEvent.getClientY(A))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="");h.apply(this,arguments)};b.mouseUp=function(A){try{mxEvent.isPopupTrigger(A)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(A),mxEvent.isConsumed(A)||w.itemClicked(e,b,A,a)),m.apply(b,arguments),u=null,w.currentElt=a}catch(D){b.reset(),w.editorUi.handleError(D)}}};
Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,g,d,h,m){null!=m&&null!=g&&(m+=" "+g);m=null!=m&&0<m.length?m:null!=g?g.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,g,d,h)}))};Sidebar.prototype.createVertexTemplate=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,g,d,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,g,d,h,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),w=new mxGraphModel;u.decode(k.documentElement,w);p=this.graph.cloneCells(w.root.getChildAt(0).children)}catch(y){f=mxResources.get("error")+": "+y.message}return this.createVertexTemplateFromCells(p,b,e,f,g,d,h,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A){return this.createItem(a,f,g,d,b,e,h,m,p,k,u,w,y,A)};
Sidebar.prototype.createEdgeTemplateEntry=function(a,b,e,f,g,d,h,m,p){h=null!=h&&0<h.length?h:g.toLowerCase();return this.addEntry(h,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,e,f,g,d,m,p)}))};
@@ -2531,8 +2532,8 @@ Sidebar.prototype.setContentVisible=function(a,b){var e=Editor.transitionDelay;m
(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",null);a.style.display="none"}),1E3*e))};Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
Sidebar.prototype.addImagePalette=function(a,b,e,f,g,d,h){for(var m=[],p=0;p<g.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var y=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=y?y:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(g[p],null!=d?d[p]:null,null!=h?h[g[p]]:null);this.addPaletteFunctions(a,
b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,E,D){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(E*h),Math.round(D*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,E,D,F,H){(null==g||0>mxUtils.indexOf(g,E))&&w.appendChild(this.createVertexTemplate("shape="+A+E.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",E.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,b,e,f,g,d,h,m,p,k){h=null!=h?h:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,y,A,D,E){if(null==g||0>mxUtils.indexOf(g,y)){A=this.getTagsForStencil(w,y);var F=null!=m?m[y]:null;null!=F&&A.push(F);u.push(this.createVertexTemplateEntry("shape="+w+y.toLowerCase()+f,Math.round(D*h),Math.round(E*h),"",y.replace(/_/g," "),null,null,this.filterTags(A.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var y=0;y<p.length;y++)p[y](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(A,D,E,F,H){(null==g||0>mxUtils.indexOf(g,D))&&w.appendChild(this.createVertexTemplate("shape="+A+D.toLowerCase()+f,Math.round(F*h),Math.round(H*h),"",D.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.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.refreshListener&&(this.editorUi.removeListener(this.refreshListener),this.refreshListener=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(f){for(var g=0;g<a.length;g++)f=f.replace(new RegExp("&"+a[g][0]+";","g"),"&#"+a[g][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,g,d,h){return e(Graph.sanitizeHtml(f),g,d,h)}})();
@@ -2563,8 +2564,8 @@ mouseUp:mxUtils.bind(this,function(L,U){k=h=m=p=null})})}this.cellRenderer.minSv
null,"simple"==L.view.graph.getAdaptiveColors())&&(L.lastSanitizedLabelValue=y.innerHTML)),U=L.lastSanitizedLabelValue));return U};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);
this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(L,U){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var A=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=A.apply(this,arguments);if(this.graph.pageVisible){var U=[],X=this.graph.pageFormat,ia=this.graph.pageScale,ja=X.width*ia;X=X.height*ia;ia=this.graph.view.translate;for(var ta=this.graph.view.scale,ca=this.graph.getPageLayout(),P=0;P<ca.width;P++)U.push(new mxRectangle(((ca.x+
P)*ja+ia.x)*ta,(ca.y*X+ia.y)*ta,ja*ta,X*ta));for(P=1;P<ca.height;P++)U.push(new mxRectangle((ca.x*ja+ia.x)*ta,((ca.y+P)*X+ia.y)*ta,ja*ta,X*ta));L=U.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,U){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=E.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var D=this.graphHandler.start;
-this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
+arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var U=D.apply(this,arguments),X=new mxDictionary,ia=[],ja=0;ja<U.length;ja++){var ta=this.graph.isTableCell(L)&&this.graph.isTableCell(U[ja])&&this.graph.isCellSelected(U[ja])?this.graph.model.getParent(U[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(U[ja])&&this.graph.isCellSelected(U[ja])?U[ja]:this.graph.getCompositeParent(U[ja]);null==ta||X.get(ta)||(X.put(ta,!0),ia.push(ta))}return ia};var E=this.graphHandler.start;
+this.graphHandler.start=function(L,U,X,ia){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(L,U,X,ia,ja,ta){var ca=
mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=ia&&this.graph.applyNewEdgeStyle(ia,[ca]);return ca};var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),M=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;N.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),M=0):M=(new Date).getTime()-H};var J=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<M||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&J.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(L){return V.apply(this,arguments)||mxEvent.isShiftDown(L)};var W=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(W=this.container.style.cursor,
this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=W)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var T=this.click;this.click=function(L){var U=null==L.state&&null!=L.sourceState&&this.isCellLocked(this.getLayerForCell(L.sourceState.cell));if(this.isEnabled()&&!U||L.isConsumed())return T.apply(this,arguments);
@@ -2589,7 +2590,7 @@ Graph.createSvgNode=function(a,b,e,f,g){var d=mxUtils.createXmlDocument(),h=null
e+"px");h.setAttribute("height",f+"px");h.setAttribute("viewBox",a+" "+b+" "+e+" "+f);d.appendChild(h);return h};
Graph.htmlToPng=function(a,b,e,f,g,d){g=null!=g?g:"";d=null!=d?d:Editor.htmlRasterScale;var h=document.createElement("canvas");h.width=b*d;h.height=e*d;var m=document.createElement("img");m.onload=mxUtils.bind(this,function(){try{var k=h.getContext("2d");k.scale(d,d);k.drawImage(m,0,0);f(h.toDataURL())}catch(u){f(null)}});var p=mxUtils.createXmlDocument();p=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");a=(new mxSvgCanvas2D(p)).convertHtml(a);m.onerror=
function(k){f(null)};m.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+b+'" height="'+e+'">'+(""!=g?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+g+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+a+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,E){return null!=f?f(y,A,E):mxUtils.isValidColor(E)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),E=mxUtils.getLightDarkColor(E,null,null,e),y.style.setProperty(A,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
+Graph.addLightDarkColors=function(a,b,e,f){function g(y,A,D){return null!=f?f(y,A,D):mxUtils.isValidColor(D)?(null==h&&null!=b&&(h={}),null!=h&&(h[A]=y.style.getPropertyValue(A)),D=mxUtils.getLightDarkColor(D,null,null,e),y.style.setProperty(A,D.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),h=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){h=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=g(d[p],u,w)||m}"FONT"==d[p].nodeName&&
""==d[p].style.getPropertyValue("color")&&(w=d[p].getAttribute("color"),m=g(d[p],"color",w)||m);null!=b&&null!=h&&d[p].setAttribute(b,JSON.stringify(h))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var g=a[f].getAttribute(b);if(null!=g){a[f].removeAttribute(b);var d=JSON.parse(g),h;for(h in d){var m=d[h];""==m?(a[f].style[h]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[h]=m;e=!0}}}catch(p){}return e};
Graph.getGivenColor=function(a,b){var e=null;if(a.nodeType==mxConstants.NODETYPE_ELEMENT){try{var f=a.getAttribute(Graph.backupStyleAttribute);if(null!=f){var g=JSON.parse(f);null!=g&&null!=g[b]&&("color"==b&&"FONT"==a.nodeName&&""==g[b]&&null!=a.getAttribute("color")?e=a.getAttribute("color"):""!=g[b]&&(e=g[b]))}}catch(d){}null==e&&""!=a.style[b]&&(e=a.style[b])}return e};
Graph.setTextColor=function(a,b,e){for(var f=e?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,g=e?"color":"background-color",d=a.getElementsByTagName("*"),h=[],m=0;m<d.length;m++)h.push({node:d[m],value:d[m].style[g]});document.execCommand(e?"forecolor":"backcolor",!1,f);a=a.getElementsByTagName("*");for(m=0;m<a.length;m++){if(m<h.length&&h[m].node==a[m]&&h[m].value!=a[m].style[g]&&""==a[m].style[g])try{if(d=a[m].getAttribute(Graph.backupStyleAttribute),null!=d){var p=JSON.parse(d);p[g]=
@@ -2600,16 +2601,16 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.b
Graph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),g=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,e,f,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},g)},0)};
-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,E=w.container.offsetHeight/2;w.rootCell=
-y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var D=y.referenceCell||y,F=f.model.getCell(D.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
-M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(D,
+Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(w){w.view.states.visit(function(y,A){null!=A.shape&&w.model.isEdge(w.model.getParent(A.cell))?A.shape.node.parentNode.appendChild(A.shape.node):null!=A.text&&w.model.isEdge(A.cell)&&A.text.node.parentNode.appendChild(A.text.node)})}function h(w,y){if(w.getModel().isVertex(y)){var A=w.container.offsetWidth/2,D=w.container.offsetHeight/2;w.rootCell=
+y.referenceCell||y;w.getModel().beginUpdate();try{pageSize=null!=e&&null!=e.pageSize?e.pageSize:8+Math.max(0,Math.floor(Math.min(w.container.offsetWidth-800/120,w.container.offsetHeight-600)/30));for(var E=y.referenceCell||y,F=f.model.getCell(E.sourceCellId),H=f.getEdges(F,null,!0,!0,!1,!0),M=[],N=0;N<H.length;N++)null!=H[N].getTerminal(!0)&&null!=H[N].getTerminal(!1)&&f.isCellVisible(H[N])&&!f.isEdgeIgnored(H[N])&&f.isCellVisible(H[N].getTerminal(!0))&&f.isCellVisible(H[N].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(H[N]))&&
+M.push(H[N]);M=H=M;if(null!=y.startIndex||0<pageSize&&H.length>pageSize){var J=y.startIndex||0;M=H.slice(Math.max(0,J),Math.min(H.length,J+pageSize))}M=f.getOpposites(M,F).concat(M);var V=w.cloneCells(M);for(N=0;N<M.length;N++)if(V[N].sourceCellId=M[N].id,w.model.isEdge(V[N]))for(V[N].geometry.x=0,V[N].geometry.y=0,V[N].geometry.points=null,V[N].setStyle(V[N].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),V[N].setTerminal(E,
null==V[N].getTerminal(!0)),F=0;F<V[N].getChildCount();F++){var W=V[N].getChildAt(F);null!=W.geometry&&W.geometry.relative&&(W.setStyle(W.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),W.geometry.offset=new mxPoint(0,0),W.geometry.y=0,W.geometry.x=.5>W.geometry.x?-.8:.5<W.geometry.x?.8:0)}if(0<y.startIndex){var T=w.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((y.startIndex||0)/pageSize)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-T.referenceCell=D;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=D;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
-S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=E-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=E-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
+T.referenceCell=E;T.startIndex=Math.max(0,(y.startIndex||0)-pageSize);V.splice(0,0,T)}if(H.length>(y.startIndex||0)+pageSize){var O=w.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((y.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=E;O.startIndex=(y.startIndex||0)+pageSize;V.splice(0,0,O)}for(var fa in w.getModel().cells){var S=w.getModel().getCell(fa);S!=w.rootCell&&!w.getModel().isAncestor(w.rootCell,
+S)&&w.getModel().isVertex(S)&&w.removeCells([S])}w.addCells(V);var aa=w.getModel().getGeometry(w.rootCell);null!=aa&&(aa=aa.clone(),aa.x=A-aa.width/2,aa.y=D-aa.height/3,w.getModel().setGeometry(w.rootCell,aa));y=[];for(fa in w.getModel().cells)S=w.getModel().getCell(fa),S!=w.rootCell&&w.getModel().isVertex(S)&&w.getModel().getParent(S)==w.getDefaultParent()&&(y.push(S),aa=w.getModel().getGeometry(S),null!=aa&&(aa.x=A-aa.width/2,aa.y=D-aa.height/2));var Y=y.length,ba=2*Math.PI/Y,L=Math.max(minSize,
Math.min(w.container.offsetWidth/2-40,w.container.offsetHeight/2-80));for(A=0;A<Y;A++)aa=w.getModel().getGeometry(y[A]),null!=aa&&(aa=aa.clone(),aa.x+=L*Math.sin(A*ba),aa.y+=L*Math.cos(A*ba),w.getModel().setGeometry(y[A],aa))}finally{w.getModel().endUpdate()}}}var m=document.createElement("div");m.style.position="absolute";m.style.display="block";m.style.overflow="auto";m.style.width="100%";m.style.height="100%";m.style.left="0px";m.style.top="0px";m.style.zIndex=2;m.style.background=f.background==
mxConstants.NONE||null==f.background?"light-dark(#ffffff,"+Editor.darkColor+")":f.background;var p=document.createElement("img");p.setAttribute("src",Editor.closeBlackImage);p.style.position="absolute";p.style.cursor="pointer";p.style.right="10px";p.style.top="10px";m.appendChild(p);var k=document.createElement("div");k.style.position="absolute";k.style.cursor="pointer";k.style.right="38px";k.style.top="14px";k.style.textAlign="right";k.style.verticalAlign="top";mxUtils.write(k,mxResources.get("close"));
m.appendChild(k);document.body.appendChild(m);var u=function(w){27==w.keyCode&&p.click()};mxEvent.addListener(document,"keydown",u);(function(w){var y=new Graph(w);y.keepEdgesInBackground=!0;y.isCellResizable=function(){return!1};y.isCellRotatable=function(){return!1};y.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};y.getFoldingImage=function(){return null};var A=function(){mxEvent.removeListener(document,"keydown",u);w.parentNode.removeChild(w);f.scrollCellToVisible(g)};
-mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var E=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):E.apply(this,arguments)};A=y.container.offsetWidth/2;var D=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=D-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
+mxEvent.addListener(p,"click",A);mxEvent.addListener(k,"click",A);y.setEnabled(!1);var D=y.click;y.click=function(M){var N=M.getCell(),J=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&0<y.getEdges(J).length?h(y,N):D.apply(this,arguments)};A=y.container.offsetWidth/2;var E=y.container.offsetHeight/3;y.model.beginUpdate();var F=y.importCells([g])[0];F.sourceCellId=g.id;F.geometry.x=A-F.geometry.width/2;F.geometry.y=E-F.geometry.height/2;y.model.endUpdate();var H=!1;y.getModel().addListener(mxEvent.CHANGE,
function(M,N){H||(M=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,y.labelsVisible=!1,H=!0,mxEffects.animateChanges(y,M,function(){var J=new mxParallelEdgeLayout(y);J.spacing=60;var V=J.layout;J.layout=function(W){J.spacing=Math.min(60,Math.max(30,60-5*W.length));V.apply(this,arguments)};J.execute(y.getDefaultParent());mxText.prototype.enableBoundingBox=!0;y.labelsVisible=!0;y.tooltipHandler.hide();y.refresh();d(y);H=!1}))});h(y,F)})(m)})(a,b)};
Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
@@ -2636,14 +2637,14 @@ h.shape?h.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.ge
mxUtils.getValue(h.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(h){return!0};Graph.prototype.getVerticesAndEdges=function(h,m){h=null!=h?h:!0;m=null!=m?m:!0;var p=this.model;return p.filterDescendants(function(k){return h&&p.isVertex(k)||m&&p.isEdge(k)},p.getRoot())};Graph.prototype.applyNewEdgeStyle=function(h,m,p){h=this.getCellStyle(h).newEdgeStyle;if(null!=h){this.model.beginUpdate();try{var k=JSON.parse(h),u;for(u in k)this.setCellStyles(u,k[u],m),"edgeStyle"==
u&&"elbowEdgeStyle"==k[u]&&null!=p&&this.setCellStyles("elbow",p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",m)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(h){for(var m={},p=0;p<h.length;p++){var k=this.view.getState(h[p]);null!=k&&this.mergeStyle(k.style,m,0==p)}return m};Graph.prototype.mergeStyle=function(h,m,p){if(null!=h){var k={},u;for(u in h){var w=h[u];null!=w&&(k[u]=!0,null==m[u]&&p?m[u]=w:m[u]!=w&&delete m[u])}for(u in m)k[u]||
delete m[u]}};Graph.prototype.getStartEditingCell=function(h,m){m=this.getCellStyle(h);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h)&&(h=this.model.getChildAt(h,0),m=this.getCellStyle(h),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(h)&&(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(m=0;m<this.model.getChildCount(h);m++){var p=
-this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,E=!1;if(0<h.length)for(var D=0;D<h.length&&(A=this.getModel().isVertex(h[D])||A,!(E=this.getModel().isEdge(h[D])||
-E)||!A);D++);else E=A=!0;A=A&&!w;E=E&&!y;for(D=0;D<m.length;D++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(A||h)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||h)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
-m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),E=!1;null!=y.style&&(pairs=y.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(D,J);0<=V&&D.splice(V,
-1);for(E=0;E<Graph.cellStyleGroups.length;E++){var W=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(D,W[T]);0<=O&&D.splice(O,1)}}}}var fa=this.model.isEdge(y);E=fa?p:m;for(H=0;H<D.length;H++){J=D[H];var S=E[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==E.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==E.curved&&(A=mxUtils.setStyle(A,
+this.model.getChildAt(h,m);if(this.isCellEditable(p)){h=p;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,p,k){null!=h&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,D=!1;if(0<h.length)for(var E=0;E<h.length&&(A=this.getModel().isVertex(h[E])||A,!(D=this.getModel().isEdge(h[E])||
+D)||!A);E++);else D=A=!0;A=A&&!w;D=D&&!y;for(E=0;E<m.length;E++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[E]),"strokeColor"!=m[E]||null!=p[E]&&"none"!=p[E])if(0<=mxUtils.indexOf(Graph.cellStyles,m[E])||"shape"==m[E])if("shape"!=m[E]&&(A||h)&&(null==p[E]?delete k[m[E]]:k[m[E]]=p[E]),D||h)null==p[E]?delete u[m[E]]:u[m[E]]=p[E]};Graph.prototype.includeDescendants=function(h){for(var m=[],p=0;p<h.length;p++)m=m.concat(this.model.getDescendants(h[p]));return m};Graph.prototype.pasteCellStyles=function(h,
+m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var y=h[w],A=this.model.getStyle(y),D=!1;null!=y.style&&(pairs=y.style.split(";"),D=D||0<=mxUtils.indexOf(pairs,"text"));if(D)var E=Graph.textStyles;else if(E=Graph.cellStyles.slice(),!k)for(var F=null!=A?A.split(";"):[],H=0;H<F.length;H++){var M=F[H],N=M.indexOf("=");if(0<=N){var J=M.substring(0,N),V=mxUtils.indexOf(E,J);0<=V&&E.splice(V,
+1);for(D=0;D<Graph.cellStyleGroups.length;D++){var W=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(W,J))for(var T=0;T<W.length;T++){var O=mxUtils.indexOf(E,W[T]);0<=O&&E.splice(O,1)}}}}var fa=this.model.isEdge(y);D=fa?p:m;for(H=0;H<E.length;H++){J=E[H];var S=D[J];null!=S&&("edgeStyle"!=J||u)&&(fa||!fa&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(A=mxUtils.setStyle(A,J,S),"fontFamily"==J&&null==D.fontSource&&(A=mxUtils.setStyle(A,"fontSource",null)),fa&&"rounded"==J&&"1"==S&&null==D.curved&&(A=mxUtils.setStyle(A,
"curved",null)))}Editor.simpleLabels&&(A=mxUtils.setStyle(mxUtils.setStyle(A,"html",null),"whiteSpace",null));this.model.setStyle(y,A)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(A in h){var y=h[A];if(k[A]!=y){if(A==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[A]&&"umlLifeline"!=
y){w=!0;var A="participant"}this.setCellStyles(A,y,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=
-function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),E=this.getScaledCellAt(h,m,A,k,u,w);if(null!=E)return E;if(this.isCellVisible(A)&&
-(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(E=this.view.getState(A),null!=E&&(null==w||!w(E,h,m))&&this.intersects(E,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
+function(h,m,p,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var y=this.model.getChildCount(p)-1;0<=y;y--){var A=this.model.getChildAt(p,y),D=this.getScaledCellAt(h,m,A,k,u,w);if(null!=D)return D;if(this.isCellVisible(A)&&
+(u&&this.model.isEdge(A)||k&&this.model.isVertex(A))&&(D=this.view.getState(A),null!=D&&(null==w||!w(D,h,m))&&this.intersects(D,h,m)))return A}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var m=this.getCellGeometry(h);null!=m&&
m.relative;)h=this.getModel().getParent(h),m=this.getCellGeometry(h);return h};Graph.prototype.isPart=function(h){return"1"==mxUtils.getValue(this.getCurrentCellStyle(h),"part","0")||this.isTableCell(h)||this.isTableRow(h)};Graph.prototype.getCompositeParents=function(h){for(var m=new mxDictionary,p=[],k=0;k<h.length;k++){var u=this.getCompositeParent(h[k]);this.isTableCell(u)&&(u=this.graph.model.getParent(u));this.isTableRow(u)&&(u=this.graph.model.getParent(u));null==u||m.get(u)||(m.put(u,!0),
p.push(u))}return p};Graph.prototype.getReferenceTerminal=function(h){if(null!=h){var m=this.getCellGeometry(h);null!=m&&m.relative&&(h=this.model.getParent(h))}null!=h&&this.model.isEdge(h)&&(h=this.model.getParent(h));null!=h&&(h=this.getCompositeParent(h));return h};Graph.prototype.getCompositeParent=function(h){for(;this.isPart(h);){var m=this.model.getParent(h);if(!this.model.isVertex(m))break;h=m}return h};Graph.prototype.filterSelectionCells=function(h){var m=this.getSelectionCells();if(null!=
h){for(var p=[],k=0;k<m.length;k++)h(m[k])||p.push(m[k]);m=p}return m};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(h){if(this.useCssTransforms){var m=this.currentScale,p=this.currentTranslate;h=new mxRectangle((h.x+2*p.x)*m-p.x,(h.y+2*p.y)*m-p.y,h.width*m,h.height*m)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(h){h=this.strokeWidth;this.graph.useCssTransforms&&(h/=this.graph.currentScale);return h};mxGraphView.prototype.getGraphBounds=
@@ -2681,8 +2682,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);ret
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,h=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
-12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:E,ss:h(E),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+h(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),y=a[m+"Hours"](),A=a[m+"Minutes"](),D=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var E=e?0:a.getTimezoneOffset(),F={d:p,dd:h(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:h(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
+12],yy:String(w).slice(2),yyyy:w,h:y%12||12,hh:h(y%12||12),H:y,HH:h(y),M:A,MM:h(A),s:D,ss:h(D),l:h(m,3),L:h(99<m?Math.round(m/10):m),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<E?"-":"+")+h(100*Math.floor(Math.abs(E)/60)+Math.abs(E)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),g=f.getChildCount(f.root),d=0;d<g;d++)mxUtils.bind(this,function(h){function m(){f.isVisible(h)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(h)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(h)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);
@@ -2701,11 +2702,11 @@ Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.mo
Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};
Graph.prototype.connectVertex=function(a,b,e,f,g,d,h,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var y=this.view.translate;k=y.x*e;y=y.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,y=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,y+u.y*e)).grow(40*e);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==A||d[D]==this.model.getParent(a)))A=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var F=this.view.getState(d[D]);null==w||null==F||mxUtils.intersects(w,F)||(E=d[D])}}var H=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=E;E=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==E&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
-!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),E=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&H||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==E&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==E&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==E&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var A=null,D=null;if(null!=d){d=d.reverse();for(var E=0;E<d.length;E++)if(!this.isCellLocked(d[E])&&!this.model.isEdge(d[E])&&d[E]!=a)if(!this.model.isAncestor(a,d[E])&&this.isContainer(d[E])&&(null==A||d[E]==this.model.getParent(a)))A=d[E];else if(null==D&&this.isCellConnectable(d[E])&&!this.model.isAncestor(d[E],a)&&!this.isSwimlane(d[E])){var F=this.view.getState(d[E]);null==w||null==F||mxUtils.intersects(w,F)||(D=d[E])}}var H=
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;H&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var M=[],N=D;D=A;g=mxUtils.bind(this,function(J){if(null==h||null!=J||null==D&&p){this.model.beginUpdate();try{if(null==N&&H){var V=this.getAbsoluteParent(null!=J?J:a);V=p?a:this.getCompositeParent(V);N=null!=J?J:this.duplicateCells([V],
+!1)[0];null!=J&&this.addCells([N],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(N);null!=W&&(null!=J&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=A?(this.addCells([N],A,null,null,null,!0),D=null):H&&!p&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var T=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&H||null==D&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,N,this.createCurrentEdgeStyle());null!=T&&(M.push(T),this.applyNewEdgeStyle(a,[T],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(T,a));if(null==D&&null!=N&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var O=a.parent.getIndex(a);this.model.add(a.parent,N,O)}null==D&&null!=N&&M.push(N);null==N&&null!=T&&T.geometry.setTerminalPoint(u,!1);null!=T&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[T]))}finally{this.model.endUpdate()}}if(null!=m)m(M);else return M});if(null==h||null!=N||!H||null==D&&p)return g(N);h(k+u.x*e,y+u.y*e,g)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,g=0;g<a.length;g++)if(f=a[g],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2791,25 +2792,25 @@ TableLayout.prototype.getRowLayout=function(a,b){var e=this.graph.model.getChild
TableLayout.prototype.layoutRow=function(a,b,e,f){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var h=a.x,m=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var p=0;p<d.length;p++){var k=this.graph.getCellGeometry(d[p]);null!=k&&(k=k.clone(),k.y=a.y,k.height=e-a.y-a.height,null!=b?(k.x=b[p],k.width=b[p+1]-k.x,p==d.length-1&&p<b.length-2&&(k.width=f-k.x-a.x-a.width)):(k.x=h,h+=k.width,p==d.length-1?k.width=f-a.x-a.width-m:m+=k.width),k.alternateBounds=new mxRectangle(0,
0,k.width,k.height),g.setGeometry(d[p],k))}return m};
TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var h=this.graph.getModel(),m=0;h.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=h.getChildCells(a,!0),w=0;w<u.length;w++)h.setVisible(u[w],!0);var y=this.getSize(u,!1);if(0<p&&0<k&&0<
-u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var E=d?null:this.getRowLayout(u[0],k),D=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],E,A.height,k,D));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
+u.length&&0<y){if(g){var A=this.graph.getCellGeometry(u[u.length-1]);null!=A&&(A=A.clone(),A.height=p-y+A.height,h.setGeometry(u[u.length-1],A))}var D=d?null:this.getRowLayout(u[0],k),E=[],F=b.y;for(w=0;w<u.length;w++)A=this.graph.getCellGeometry(u[w]),null!=A&&(A=A.clone(),A.x=b.x,A.width=k,A.y=Math.round(F),F=g||f?F+A.height:F+A.height/y*p,A.height=Math.round(F)-A.y,h.setGeometry(u[w],A)),m=Math.max(m,this.layoutRow(u[w],D,A.height,k,E));f&&p<y&&(e=e.clone(),e.height=F+b.height,h.setGeometry(a,
e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,h.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(H){h.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(w=0;w<u.length;w++)h.setVisible(u[w],
!1)}finally{h.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,y){y=null!=y?y:!0;var A=this.getState(w);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&!A.invalid&&this.updateLineJumps(A)&&this.graph.cellRenderer.redraw(A,!1,this.isRendering());A=b.apply(this,
arguments);null!=A&&y&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(A);return A};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(w){var y=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-y)for(var A=null,E=0;E<y.length;E++)if("hidden"!=y[E].getAttribute("visibility")){if(!(null!=A&&A!=y[E].getAttribute("d")||null!=w&&0!=--w))return y[E]}else null==A&&(A=y[E].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
+y)for(var A=null,D=0;D<y.length;D++)if("hidden"!=y[D].getAttribute("visibility")){if(!(null!=A&&A!=y[D].getAttribute("d")||null!=w&&0!=--w))return y[D]}else null==A&&(A=y[D].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,
arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,y){return g.apply(this,arguments)||null!=w.routedPoints&&null!=y.routedPoints&&!mxUtils.equalPoints(y.routedPoints,w.routedPoints)};
-var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,E=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;E.push(X);
-X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;E=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=D(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
+var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var y=w.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=w.routedPoints,D=null;if(null!=y&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(ba,L,U){var X=new mxPoint(L,U);X.type=ba;D.push(X);
+X=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==X||X.type!=ba||X.x!=L||X.y!=U},F=.5*this.scale;A=!1;D=[];for(var H=0;H<y.length-1;H++){for(var M=y[H+1],N=y[H],J=[],V=y[H+2];H<y.length-2&&mxUtils.ptSegDistSq(N.x,N.y,V.x,V.y,M.x,M.y)<1*this.scale*this.scale;)M=V,H++,V=y[H+2];A=E(0,N.x,N.y)||A;for(var W=0;W<this.validEdges.length;W++){var T=this.validEdges[W],O=T.absolutePoints;if(null!=O&&mxUtils.intersects(w,T)&&"1"!=T.style.noJump){var fa=null;for(T=0;T<O.length-1;T++){var S=O[T+
1],aa=O[T];for(V=O[T+2];T<O.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,V.x,V.y,S.x,S.y)<1*this.scale*this.scale;)S=V,T++,V=O[T+2];var Y=mxUtils.intersection(N.x,N.y,M.x,M.y,aa.x,aa.y,S.x,S.y);if(null!=Y&&(Math.abs(Y.x-N.x)>F||Math.abs(Y.y-N.y)>F)&&(Math.abs(Y.x-M.x)>F||Math.abs(Y.y-M.y)>F)&&(null==fa||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,fa.x,fa.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,aa.x,aa.y)>F)&&(null==V||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,V.x,V.y)>F||mxUtils.ptLineDist(N.x,N.y,M.x,M.y,S.x,S.y)>F)){V=
-Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=D(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=D(0,Y.x,Y.y)||A}w.routedPoints=E;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
-this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
-this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*D/N,V.y=V.y*D/N):V=null);T>D*D&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>D*D&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,E,!1,null,H),J=0>Math.round(V.x)||
-0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,E,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
-mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,E){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,E){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,E);var D=this.getNextPoint(w,A,E),F=this.graph.isOrthogonal(w),
-H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);D=mxUtils.getRotatedPoint(D,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(y,D,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),D=mxUtils.getRotatedPoint(D,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
-y,A,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,E,D){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);E=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-D.x)*(H.x-D.x)+(H.y-D.y)*(H.y-D.y);if(null==E||M<E)A=H,E=M}}null!=A&&(D=A)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
-null!=A.state&&(E=A.state.view.graph.replacePlaceholders(A.state.cell,E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),E=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&
-console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
+Y.x-N.x;fa=Y.y-N.y;Y={distSq:V*V+fa*fa,x:Y.x,y:Y.y};for(V=0;V<J.length;V++)if(J[V].distSq>Y.distSq){J.splice(V,0,Y);Y=null;break}null==Y||0!=J.length&&J[J.length-1].x===Y.x&&J[J.length-1].y===Y.y||J.push(Y)}fa=aa}}}for(T=0;T<J.length;T++)A=E(1,J[T].x,J[T].y)||A}Y=y[y.length-1];A=E(0,Y.x,Y.y)||A}w.routedPoints=D;return A}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,y,A){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==
+this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,N=null,J=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var T=this.state.routedPoints[W],O=new mxPoint(T.x/
+this.scale,T.y/this.scale);0==W?O=y[0]:W==this.state.routedPoints.length-1&&(O=y[y.length-1]);var fa=!1;if(null!=M&&1==T.type){var S=this.state.routedPoints[W+1];T=S.x/this.scale-O.x;S=S.y/this.scale-O.y;T=T*T+S*S;null==V&&(V=new mxPoint(O.x-M.x,O.y-M.y),N=Math.sqrt(V.x*V.x+V.y*V.y),0<N?(V.x=V.x*E/N,V.y=V.y*E/N):V=null);T>E*E&&0<N&&(T=M.x-O.x,S=M.y-O.y,T=T*T+S*S,T>E*E&&(fa=new mxPoint(O.x-V.x,O.y-V.y),T=new mxPoint(O.x+V.x,O.y+V.y),J.push(fa),this.addPoints(w,J,A,D,!1,null,H),J=0>Math.round(V.x)||
+0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,H=!1,"sharp"==F?(w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.lineTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x,T.y)):"line"==F?(w.moveTo(fa.x+V.y*J,fa.y-V.x*J),w.lineTo(fa.x-V.y*J,fa.y+V.x*J),w.moveTo(T.x-V.y*J,T.y+V.x*J),w.lineTo(T.x+V.y*J,T.y-V.x*J),w.moveTo(T.x,T.y)):"arc"==F?(J*=1.3,w.curveTo(fa.x-V.y*J,fa.y+V.x*J,T.x-V.y*J,T.y+V.x*J,T.x,T.y)):(w.moveTo(T.x,T.y),H=!0),J=[T],fa=!0))}else V=null;fa||(J.push(O),M=O)}this.addPoints(w,J,A,D,!1,null,H);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;
+mxGraphView.prototype.getFixedTerminalPoint=function(w,y,A,D){return null!=y&&"centerPerimeter"==y.style[mxConstants.STYLE_PERIMETER]?new mxPoint(y.getCenterX(),y.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,y,A,D){if(null==y||null==w||"1"!=y.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{y=this.getTerminalPort(w,y,D);var E=this.getNextPoint(w,A,D),F=this.graph.isOrthogonal(w),
+H=mxUtils.toRadians(Number(y.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(y.getCenterX(),y.getCenterY());if(0!=H){var N=Math.cos(-H),J=Math.sin(-H);E=mxUtils.getRotatedPoint(E,N,J,M)}N=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(w.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(y,E,0==H&&F,N);0!=H&&(N=Math.cos(H),J=Math.sin(H),E=mxUtils.getRotatedPoint(E,N,J,M));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,
+y,A,D,E),D)}};mxGraphView.prototype.snapToAnchorPoint=function(w,y,A,D,E){if(null!=y&&null!=w){w=this.graph.getAllConnectionConstraints(y);D=A=null;if(null!=w)for(var F=0;F<w.length;F++){var H=this.graph.getConnectionPoint(y,w[F]);if(null!=H){var M=(H.x-E.x)*(H.x-E.x)+(H.y-E.y)*(H.y-E.y);if(null==D||M<D)A=H,D=M}}null!=A&&(E=A)}return E};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,y,A){var D=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&
+null!=A.state&&(D=A.state.view.graph.replacePlaceholders(A.state.cell,D));return D};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var y=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=y&&"string"===typeof y&&"stencil("==y.substring(0,8))try{var A=y.substring(8,y.length-1),D=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(D.documentElement))}catch(E){null!=window.console&&
+console.log("Error in shape: "+E)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var g=b[f];if(!mxStencilRegistry.isFileLoaded(g))if(mxStencilRegistry.setFileLoaded(g),".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=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};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var e=2;e<a.length-1;e++)b+="/"+a[e]}return b};
@@ -2851,8 +2852,8 @@ null!=C&&C.constructor==mxStackLayout&&(B=!1))}return B};Graph.prototype.getPref
!1);C.setTerminal(Q,ka,!0);C.setTerminal(Q,Z,!1);var ha=C.getGeometry(Q);if(null!=ha){ha=ha.clone();null!=ha.points&&ha.points.reverse();var la=ha.getTerminalPoint(!0),ya=ha.getTerminalPoint(!1);ha.setTerminalPoint(la,!1);ha.setTerminalPoint(ya,!0);C.setGeometry(Q,ha);var La=this.view.getState(Q),Ha=this.view.getState(Z),xa=this.view.getState(ka);if(null!=La){var Ga=null!=Ha?this.getConnectionConstraint(La,Ha,!0):null,va=null!=xa?this.getConnectionConstraint(La,xa,!1):null;this.setConnectionConstraint(Q,
Z,!0,va);this.setConnectionConstraint(Q,ka,!1,Ga);var ua=mxUtils.getValue(La.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(La.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[Q]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[Q])}G.push(Q)}}else if(C.isVertex(Q)&&(ha=this.getCellGeometry(Q),null!=ha)){if(!(this.isTable(Q)||this.isTableRow(Q)||this.isTableCell(Q)||this.isSwimlane(Q))){ha=ha.clone();
ha.x+=ha.width/2-ha.height/2;ha.y+=ha.height/2-ha.width/2;var Sa=ha.width;ha.width=ha.height;ha.height=Sa;C.setGeometry(Q,ha)}var Qa=this.view.getState(Q);if(null!=Qa){var Na=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Na[mxUtils.mod(mxUtils.indexOf(Na,Ra)+(B?-1:1),Na.length)],[Q])}G.push(Q)}}}finally{C.endUpdate()}return G};
-Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var E=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
-this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}E.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
+Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var B=q.cell;this.isTableCell(B)&&(B=this.model.getParent(B));
+this.isTableRow(B)&&(B=this.model.getParent(B));var C=this.view.getState(B);null!=C&&null!=C.shape&&(this.view.invalidate(B),C.shape.bounds=null)}D.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=this.model.getDescendants(q);if(0<q.length)for(var B=0;B<q.length;B++){var C=this.view.getState(q[B]);null!=C&&null!=C.shape&&
null!=C.shape.stencil&&this.stencilHasPlaceholders(C.shape.stencil)?this.removeStateForCell(q[B]):this.isReplacePlaceholders(q[B])&&this.view.invalidate(q[B],!1,!1)}};Graph.prototype.replaceElement=function(q,B){B=q.ownerDocument.createElement(null!=B?B:"span");for(var C=Array.prototype.slice.call(q.attributes);attr=C.pop();)B.setAttribute(attr.nodeName,attr.nodeValue);B.innerHTML=q.innerHTML;q.parentNode.replaceChild(B,q)};Graph.prototype.processElements=function(q,B){if(null!=q){q=q.getElementsByTagName("*");
for(var C=0;C<q.length;C++)null!=q[C]&&B(q[C])}};Graph.prototype.updateLabelElements=function(q,B,C){q=null!=q?q:this.getSelectionCells();for(var G=document.createElement("div"),K=0;K<q.length;K++){var Q=this.getCurrentCellStyle(q[K]);if(null!=Q&&"1"==Q.html&&(Q=this.convertValueToString(q[K]),null!=Q&&0<Q.length)){G.innerHTML=Graph.sanitizeHtml(Q);for(var Z=G.getElementsByTagName(null!=C?C:"*"),ka=0;ka<Z.length;ka++)B(Z[ka]);G.innerHTML!=Q&&this.cellLabelChanged(q[K],G.innerHTML)}}};Graph.prototype.cellLabelChanged=
function(q,B,C){B=Graph.zapGremlins(B);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var G=q.getAttribute("placeholder"),K=q;null!=K;){if(K==this.model.getRoot()||null!=K.value&&"object"==typeof K.value&&K.hasAttribute(G)){this.setAttributeForCell(K,G,B);break}K=this.model.getParent(K)}var Q=q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&Q.hasAttribute("label_"+Graph.diagramLanguage)?
@@ -2860,14 +2861,14 @@ Q.setAttribute("label_"+Graph.diagramLanguage,B):Q.setAttribute("label",B);B=Q}m
this.isCellDeletable(K.cell)&&this.isTransparentState(K)){for(var Q=!0,Z=0;Z<this.model.getChildCount(K.cell)&&Q;Z++)B.get(this.model.getChildAt(K.cell,Z))||(Q=!1);Q&&q.push(K.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var B=[],C=0;C<q.length;C++)this.isCellDeletable(q[C])&&this.isTransparentState(this.view.getState(q[C]))&&B.push(q[C]);q=B;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=
function(q,B){this.setAttributeForCell(q,"link",B)};Graph.prototype.setTooltipForCell=function(q,B){var C="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(C="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,C,B)};Graph.prototype.getAttributeForCell=function(q,B,C){q=null!=q.value&&"object"===typeof q.value?q.value.getAttribute(B):null;return null!=q?q:C};Graph.prototype.setAttributeForCell=function(q,
B,C){if(null!=q.value&&"object"==typeof q.value)var G=q.value.cloneNode(!0);else G=mxUtils.createXmlDocument().createElement("UserObject"),G.setAttribute("label",q.value||"");null!=C?G.setAttribute(B,C):G.removeAttribute(B);this.model.setValue(q,G)};Graph.prototype.isTargetShape=function(q,B,C){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(C=0;C<B.length;C++){var G=mxUtils.getValue(this.getCurrentCellStyle(B[C]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(G,
-q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=D.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
+q))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,B,C,G){if(mxEvent.isAltDown(B))return null;for(var K=0;K<q.length;K++){var Q=this.model.getParent(q[K]);if(this.model.isEdge(Q)&&0>mxUtils.indexOf(q,Q))return null}Q=E.apply(this,arguments);var Z=!0;for(K=0;K<q.length&&Z;K++)Z=Z&&this.isTableRow(q[K]);Z&&(this.isTableCell(Q)&&(Q=this.model.getParent(Q)),this.isTableRow(Q)&&(Q=this.model.getParent(Q)),this.isTable(Q)||(Q=null));return Q};Graph.prototype.click=
function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,B){this.isEnabled()&&(B=this.insertTextForEvent(q,B),mxGraph.prototype.dblClick.call(this,q,B))};Graph.prototype.insertTextForEvent=function(q,B){var C=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));if(null!=q&&!this.model.isVertex(B)){var G=this.model.isEdge(B)?this.view.getState(B):null,K=mxEvent.getSource(q);
this.firstClickState!=G||this.firstClickSource!=K||null!=G&&null!=G.text&&null!=G.text.node&&null!=G.text.boundingBox&&(mxUtils.contains(G.text.boundingBox,C.x,C.y)||mxUtils.isAncestorNode(G.text.node,mxEvent.getSource(q)))||(null!=G||this.isCellLocked(this.getDefaultParent()))&&(null==G||this.isCellLocked(G.cell))||!(null!=G||mxClient.IS_SVG&&K==this.view.getCanvas().ownerSVGElement)||(null==G&&(G=this.view.getState(this.getCellAt(C.x,C.y))),B=this.addText(C.x,C.y,G))}return B};Graph.prototype.getInsertPoint=
-function(){var q=this.getGridSize(),B=this.container.scrollLeft/this.view.scale-this.view.translate.x,C=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var G=this.getPageLayout(),K=this.getPageSize();B=Math.max(B,G.x*K.width);C=Math.max(C,G.y*K.height)}return new mxPoint(this.snap(B+q),this.snap(C+q))};Graph.prototype.getFreeInsertPoint=function(){var q=this.view,B=this.getGraphBounds(),C=this.getInsertPoint(),G=this.snap(Math.round(Math.max(C.x,B.x/q.scale-q.translate.x+
-(0==B.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(C.y,(B.y+B.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(G,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-
-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,B){q=null!=q?q:"";null!=B&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+B+";");return q};Graph.prototype.addText=function(q,B,C){var G=
-new mxCell;G.value="Text";G.geometry=new mxGeometry(0,0,0,0);G.vertex=!0;if(null!=C&&this.model.isEdge(C.cell)){G.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);G.geometry.relative=!0;G.connectable=!1;var K=this.view.getRelativePoint(C,q,B);G.geometry.x=Math.round(1E4*K.x)/1E4;G.geometry.y=Math.round(K.y);G.geometry.offset=new mxPoint(0,0);K=this.view.getPoint(C,G.geometry);var Q=this.view.scale;G.geometry.offset=new mxPoint(Math.round((q-
-K.x)/Q),Math.round((B-K.y)/Q))}else K=this.view.translate,G.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),G.geometry.width=40,G.geometry.height=20,G.geometry.x=Math.round(q/this.view.scale)-K.x-(null!=C?C.origin.x:0),G.geometry.y=Math.round(B/this.view.scale)-K.y-(null!=C?C.origin.y:0),G.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([G],null!=C?C.cell:null),this.fireEvent(new mxEventObject("textInserted",
+function(q){q=this.getGridSize();var B=this.container.scrollLeft/this.view.scale-this.view.translate.x,C=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var G=this.getPageLayout(),K=this.getPageSize();B=Math.max(B,G.x*K.width);C=Math.max(C,G.y*K.height)}return new mxPoint(this.snap(B+q),this.snap(C+q))};Graph.prototype.getFreeInsertPoint=function(q){var B=this.view,C=this.getGraphBounds(),G=this.getInsertPoint(q);q=this.snap(Math.round(Math.max(G.x,C.x/B.scale-
+B.translate.x+(0==C.width?2*this.gridSize:0))));B=this.snap(Math.round(Math.max(G.y,(C.y+C.height)/B.scale-B.translate.y+2*this.gridSize)));return new mxPoint(q,B)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,B){q=null!=q?q:"";null!=B&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+B+";");return q};Graph.prototype.addText=
+function(q,B,C){var G=new mxCell;G.value="Text";G.geometry=new mxGeometry(0,0,0,0);G.vertex=!0;if(null!=C&&this.model.isEdge(C.cell)){G.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);G.geometry.relative=!0;G.connectable=!1;var K=this.view.getRelativePoint(C,q,B);G.geometry.x=Math.round(1E4*K.x)/1E4;G.geometry.y=Math.round(K.y);G.geometry.offset=new mxPoint(0,0);K=this.view.getPoint(C,G.geometry);var Q=this.view.scale;G.geometry.offset=
+new mxPoint(Math.round((q-K.x)/Q),Math.round((B-K.y)/Q))}else K=this.view.translate,G.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),G.geometry.width=40,G.geometry.height=20,G.geometry.x=Math.round(q/this.view.scale)-K.x-(null!=C?C.origin.x:0),G.geometry.y=Math.round(B/this.view.scale)-K.y-(null!=C?C.origin.y:0),G.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([G],null!=C?C.cell:null),this.fireEvent(new mxEventObject("textInserted",
"cells",[G])),this.autoSizeCell(G)}finally{this.getModel().endUpdate()}return G};Graph.prototype.addClickHandler=function(q,B,C){var G=mxUtils.bind(this,function(){var ha=this.container.getElementsByTagName("a");if(null!=ha)for(var la=0;la<ha.length;la++){var ya=this.getAbsoluteUrl(ha[la].getAttribute("href"));null!=ya&&(ha[la].setAttribute("rel",this.linkRelation),ha[la].setAttribute("href",ya),null!=B&&mxEvent.addGestureListeners(ha[la],null,null,B))}});this.model.addListener(mxEvent.CHANGE,G);
G();var K=this.container.style.cursor,Q=this.getTolerance(),Z=this,ka={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(Z,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ha){var la=ha.sourceState;if(null==la||null==Z.getLinkForCell(la.cell))ha=Z.getCellAt(ha.getGraphX(),ha.getGraphY(),null,null,null,function(ya,La,Ha){return null==Z.getLinkForCell(ya.cell)}),la=null==la||Z.model.isAncestor(ha,la.cell)?
Z.view.getState(ha):null;la!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=la,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ha,la){this.startX=la.getGraphX();this.startY=la.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&(Z.container.style.cursor="move");this.updateCurrentState(la)},mouseMove:function(ha,la){if(Z.isMouseDown)null!=this.currentLink&&
@@ -3039,34 +3040,34 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,g){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);a.addListener("languageChanged",this.update);a.addListener("formatWidthChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(E,D,F,H){var M=mxUtils.bind(this,function(J,V){h!=E&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
-F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=E,h.classList.add("geActiveFormatTitle"),m!=D&&(null!=m&&(m.style.display="none"),m=D,m.style.display=""))});mxEvent.addListener(E,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
+Format.prototype.immediateRefresh=function(){if(0!=this.container.offsetWidth){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,p=mxUtils.bind(this,function(D,E,F,H){var M=mxUtils.bind(this,function(J,V){h!=D&&(V||(d?this.labelIndex=F:b.isSelectionEmpty()?this.diagramIndex=F:this.currentIndex=
+F),null!=h&&h.classList.remove("geActiveFormatTitle"),h=D,h.classList.add("geActiveFormatTitle"),m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(D,"click",M);var N=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(H&&null==h||F==N)&&M(null,H&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
g=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);g.style.display="none";var w=f.cloneNode(!1);p(f,g,k++);var y=e.cloneNode(!1);y.style.display="none";u=document.createElement("div");mxUtils.write(u,mxResources.get("style"));w.appendChild(u);w.setAttribute("title",mxResources.get("style"));e.appendChild(w);this.panels.push(new DiagramStylePanel(this,a,y));this.container.appendChild(y);p(w,y,k++,!0)}else if(b.isEditing())u=document.createElement("div"),
mxUtils.write(u,mxResources.get("text")),f.appendChild(u),f.setAttribute("title",mxResources.get("text")),e.appendChild(f),y=e.cloneNode(!1),y.style.display="none",this.panels.push(new TextFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++,!0);else{w=f.cloneNode(!1);var A=w.cloneNode(!1);0<g.cells.length&&(u=document.createElement("div"),mxUtils.write(u,mxResources.get("style")),f.appendChild(u),f.setAttribute("title",mxResources.get("style")),e.appendChild(f),y=e.cloneNode(!1),y.style.display=
"none",this.panels.push(new StyleFormatPanel(this,a,y)),this.container.appendChild(y),p(f,y,k++));u=document.createElement("div");mxUtils.write(u,mxResources.get("text"));w.appendChild(u);w.setAttribute("title",mxResources.get("text"));e.appendChild(w);y=e.cloneNode(!1);y.style.display="none";this.panels.push(new TextFormatPanel(this,a,y));this.container.appendChild(y);u=document.createElement("div");mxUtils.write(u,mxResources.get("arrange"));A.appendChild(u);A.setAttribute("title",mxResources.get("arrange"));
e.appendChild(A);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?p(w,y,k++):w.style.display="none";p(A,f,k++,!0)}e.className="geFormatTitleContainer"}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,E=mxUtils.bind(this,function(D){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
+BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,g,d,h,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;g=null!=g?g:999;var w=null,y=!1,A=null,D=mxUtils.bind(this,function(E){var F=m?parseFloat(a.value):parseInt(a.value);p&&(F=this.fromUnit(F));if(F!=A){A=F;isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(f,isNaN(F)?e:F));if(u.cellEditor.isContentEditing()&&h)y||(y=!0,null!=w&&(u.cellEditor.restoreSelection(w),
w=null),h(F),a.value=(p?this.inUnit(F):F)+d,y=!1);else if(F!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var H=k.getSelectionState().cells;u.setCellStyles(b,F,H);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(H,function(N){N.removeAttribute("size");N.style.fontSize="";""==N.getAttribute("style")&&N.removeAttribute("style")});for(var M=0;M<H.length;M++)0==u.model.getChildCount(H[M])&&u.autoSizeCell(H[M],!1);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(D)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
+"keys",[b],"values",[F],"cells",H))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(F):F)+d}mxEvent.consume(E)});h&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(E){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",D);mxEvent.addListener(a,"blur",D);return D};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";return a};
BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.className="geFormatSectionTitle";mxUtils.write(b,a);return b};
BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;if(null!=e&&e.isEnabled()){b=mxUtils.button(e.getTitle(),mxUtils.bind(this,function(g){try{e.funct(g,g)}catch(d){this.editorUi.handleError(d)}}));var f=null!=e.shortcut?" ("+e.shortcut+")":"";b.setAttribute("title",e.getTitle()+f);b.style.marginBottom="2px";b.className="geFullWidthElement";a.appendChild(b)}return b};
BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,g=0,d=0;d<b.length;d++){var h=this.addAction(a,b[d]);null!=h&&(g++,0==mxUtils.mod(g,2)&&(f.style.marginRight="4px",f.style.width="104px",h.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=h)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,E){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(E))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
+BaseFormatPanel.prototype.createStepper=function(a,b,e,f,g,d,h){function m(y,A,D){""==a.value&&(a.value=null!=d?d:A);A=h?parseFloat(a.value):parseInt(a.value);isNaN(A)||(a.value=A+y,null!=b&&b(D))}e=null!=e?e:1;var p=10*e;f=document.createElement("div");f.className="geBtnStepper";f.style.position="absolute";f.style.left="200px";var k=document.createElement("div");k.style.height="9px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";f.appendChild(k);var u=k.cloneNode(!1);
u.style.backgroundImage="url("+Editor.arrowDownImage+")";f.appendChild(u);mxEvent.addGestureListeners(k,function(y){mxEvent.consume(y)},null,function(y){m(mxEvent.isShiftDown(y)?p:e,"0",y);mxEvent.consume(y)});mxEvent.addGestureListeners(u,function(y){mxEvent.consume(y)},null,function(y){m(-(mxEvent.isShiftDown(y)?p:e),"2",y);mxEvent.consume(y)});if(g){var w=null;mxEvent.addGestureListeners(f,function(y){mxEvent.consume(y)},null,function(y){if(null!=w){try{w.select()}catch(A){}w=null;mxEvent.consume(y)}})}else mxEvent.addListener(f,
"click",function(y){mxEvent.consume(y)});return f};
BaseFormatPanel.prototype.createOption=function(a,b,e,f,g){var d=document.createElement("div");d.className="geFormatEntry";var h=document.createElement("input");h.setAttribute("type","checkbox");d.appendChild(h);var m=document.createElement("span");m.className="geStyleLabel";m.setAttribute("title",a);mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(w,y){p||(p=!0,w?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,
h.checked=!1),k!=w&&(k=w,b()!=k&&e(k,y)),p=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=h.getAttribute("disabled")){var y=mxEvent.getSource(w);if(y==d||y==m)h.checked=!h.checked;u(h.checked,w)}});u(k);null!=f&&(f.install(u),this.listeners.push(f));null!=g&&g(d);return d};
BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;g=null!=g?"null"==g?null:g:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=g},function(y){m&&u.stopEditing();if(null!=h)h.funct();else{u.getModel().beginUpdate();try{var A=null!=p?p:k.getSelectionState().cells;y=y?f:g;u.setCellStyles(b,y,A);null!=d&&d(A,y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}}},{install:function(y){this.listener=function(){y(mxUtils.getValue(w,b,e)!=g)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var E=document.createElement("input");E.setAttribute("type","checkbox");h||A.appendChild(E);var D=document.createElement("span");mxUtils.write(D,a);A.appendChild(D);var F=
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,p,k){function u(T,O){"default"!=T||O||(T=m);"default"!=T&&p&&(T=mxUtils.getLightDarkColor(T),T=k()?T.dark:T.light);return T}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var y=this.editorUi.editor.graph,A=document.createElement("div");A.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||A.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);A.appendChild(E);var F=
b(),H=!1,M=null,N=null,J=document.createElement("input");J.setAttribute("type","color");J.style.position="relative";J.style.visibility="hidden";J.style.top="10px";J.style.width="0px";J.style.height="0px";J.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(M=document.createElement("img"),M.src=Editor.colorDropperImage,M.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(M,"click",function(T){J.value=u(F);J.click();mxEvent.consume(T)}));var V=null,W=function(T,O){H||
(H=!0,null!=d&&d(T),O||(null!=V&&(y.cellEditor.restoreSelection(V),V=null),e(T)),F=b(),T=mxUtils.getLightDarkColor("default"!=F?F:m),O=document.createElement("div"),O.style.width="21px",O.style.height="12px",O.style.margin="2px 18px 2px 3px",O.style.borderWidth="1px",O.style.borderStyle="solid",O.style.backgroundColor=T.cssText,N.innerText="",N.appendChild(O),!p&&mxUtils.isLightDarkColor(F)&&T.light!=T.dark?O.style.background="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+
-" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?E.style.display=
-"none":(E.style.display="",null!=F&&F!=mxConstants.NONE?(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0):(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1)),N.style.display=E.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
-(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=E.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==E||"INPUT"!=T.nodeName)T!=E&&(E.checked=!E.checked),
-E.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
-BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(E){p.getModel().beginUpdate();try{var D=m.getSelectionState().cells;u[A]=E;var F=u.join(",");p.setCellStyles(b,
-F,D);null!=g&&g(E);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",D))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(E){this.listener=function(){var D=p.getCellStyle(p.getSelectionCell(),!1);null!=D&&(D=null!=D?null!=D[b]?D[b]:h:null,u=null!=D?mxUtils.parseColorList(D):[],E(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
+" 50.3%)":p&&w&&(O.style.backgroundColor=k()?T.dark:T.light),null!=M?(O.style.width="21px",O.style.margin="2px 18px 2px 3px",O.appendChild(M)):(O.style.width="36px",O.style.margin="3px"),null!=F&&F!=mxConstants.NONE&&1<F.length&&"string"===typeof F&&(T="#"==F.charAt(0)?F.substring(1).toUpperCase():F,T=ColorDialog.prototype.colorNames[T],null!=T?N.setAttribute("title",T):"default"==F?N.setAttribute("title",mxResources.get("useBlackAndWhite")):N.setAttribute("title",F)),y.isSpecialColor(F)?D.style.display=
+"none":(D.style.display="",null!=F&&F!=mxConstants.NONE?(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0):(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1)),N.style.display=D.checked||h?"":"none",H=!1)};A.appendChild(J);mxEvent.addListener(J,"change",function(){var T=J.value;if(!p){var O=mxUtils.getLightDarkColor(F);k()?O.dark=T:O.light=T;T="light-dark("+O.light+", "+O.dark+")"}W(T)});N=mxUtils.button("",mxUtils.bind(this,function(T){var O=m;p&&k()&&mxUtils.isLightDarkColor(O)&&
+(O=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(F,!0),function(fa){W(fa)},"default"==f?"default":null,O,p);mxEvent.consume(T)}));N.className="geColorBtn";N.style.display=D.checked||h?"":"none";A.appendChild(N);a=null!=F&&"string"===typeof F&&"#"==F.charAt(0)?F.substring(1).toUpperCase():F;a=ColorDialog.prototype.colorNames[a];null!=a&&N.setAttribute("title",a);h||(mxEvent.addListener(A,"click",function(T){T=mxEvent.getSource(T);if(T==D||"INPUT"!=T.nodeName)T!=D&&(D.checked=!D.checked),
+D.checked||null==F||F==mxConstants.NONE||f==mxConstants.NONE||(f=u(F)),W(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})),mxEvent.addGestureListeners(A,mxUtils.bind(this,function(T){document.activeElement==y.cellEditor.textarea&&(V=y.cellEditor.saveSelection())})));W(F,!0);null!=g&&g.install(function(){W(F,!0)},this.listeners.push(g));return A};
+BaseFormatPanel.prototype.createArrayCellColorOption=function(a,b,e,f,g,d,h){var m=this.editorUi,p=m.editor.graph,k=p.getCellStyle(p.getSelectionCell(),!1);k=null!=k?null!=k[b]?k[b]:h:null;for(var u=null!=k?mxUtils.parseColorList(k):[],w=document.createElement("div"),y=0;y<u.length;y++)mxUtils.bind(this,function(A){w.appendChild(this.createColorOption(a+" ("+(A+1)+")",function(){return u[y]},function(D){p.getModel().beginUpdate();try{var E=m.getSelectionState().cells;u[A]=D;var F=u.join(",");p.setCellStyles(b,
+F,E);null!=g&&g(D);m.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",E))}finally{p.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(D){this.listener=function(){var E=p.getCellStyle(p.getSelectionCell(),!1);null!=E&&(E=null!=E?null!=E[b]?E[b]:h:null,u=null!=E?mxUtils.parseColorList(E):[],D(u[y],!0))};p.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){p.getModel().removeListener(this.listener)}},f,null,d))})(y);return w};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,g,d,h,m){function p(){var y=u.getCellStyle(u.getSelectionCell(),!1);return null!=y?null!=y[b]?y[b]:h:null}var k=this.editorUi,u=k.editor.graph,w=p();return null!=w&&m&&1<mxUtils.parseColorList(w).length?this.createArrayCellColorOption(a,b,e,f,g,d,h):this.createColorOption(a,p,function(y){u.getModel().beginUpdate();try{var A=k.getSelectionState().cells;u.setCellStyles(b,y,A);null!=g&&g(y);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[y],"cells",A))}finally{u.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(y){this.listener=function(){var A=u.getCellStyle(u.getSelectionCell(),!1);null!=A&&y(null!=A[b]?A[b]:h,!0)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}},f,null,d)};
BaseFormatPanel.prototype.addArrow=function(a){var b=document.createElement("div");b.className="geAdaptiveAsset geArrow";b.style.backgroundImage="url("+Editor.thinExpandImage+")";a.className="geStyleBtn";a.appendChild(b);return b};
@@ -3104,44 +3105,44 @@ BaseFormatPanel.prototype.getUnit=function(a){var b="";switch(this.editorUi.edit
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=f.getModel(),d=e.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var p=this.addUnitInput(h,this.getUnit(),87,52,function(){A.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
+null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility=
"hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var y=w.getElementsByTagName("input")[0];
-this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var E=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
-aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var F=this.addUnitInput(D,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(D,this.getUnit(),16,
-52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(D);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);M=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*J.x)/
-10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(D,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
-J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(u?"left":"line"),87,64);this.addLabel(D,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
-" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
-!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
+this.addKeyHandler(p,W);this.addKeyHandler(k,W);var A=this.addGeometryHandler(p,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,aa-S.width,!0),!0;0<S.width&&(y.checked&&(S.height=Math.round(S.height*aa*100/S.width)/100),S.width=aa)});var D=this.addGeometryHandler(k,function(S,aa,Y){aa=Math.max(1,b.fromUnit(aa));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,aa-S.height),!0;0<S.height&&(y.checked&&(S.width=Math.round(S.width*
+aa*100/S.height)/100),S.height=aa)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var F=this.addUnitInput(E,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),H=this.addUnitInput(E,this.getUnit(),16,
+52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var M=null,N=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var J=f.getCellGeometry(d.vertices[0]);if(null!=J&&J.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);M=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*J.x)/
+10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=J.clone(),J.x=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;N=this.addUnitInput(E,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(N,function(S,aa){S.y=b.fromUnit(aa)})}else N=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*J.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{J=
+J.clone(),J.y=parseFloat(S)/100,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(S,aa,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=p)p.value=this.inUnit(d.width)+
+" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){S=f.getCellGeometry(d.vertices[0]);E.style.display="";if(Y||document.activeElement!=F)F.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=H)H.value=this.inUnit(d.y)+" "+this.getUnit();null!=S&&S.relative&&(null==M||!Y&&document.activeElement==M||(M.value=Math.round(1E3*S.x)/10+" %"),null==N||
+!Y&&document.activeElement==N||(g.isEdge(g.getParent(d.vertices[0]))?N.value=this.inUnit(S.y)+" "+this.getUnit():N.value=Math.round(1E3*S.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(F,W);this.addKeyHandler(H,W);W();var T=this.addGeometryHandler(F,function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.x=aa):S.x=aa});var O=this.addGeometryHandler(H,
function(S,aa){aa=b.fromUnit(aa);S.relative?(S.offset=null!=S.offset?S.offset:new mxPoint,S.offset.y=aa):S.y=aa});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(J=f.getCellGeometry(d.vertices[0]),null!=J&&J.relative)){var fa=document.createElement("select");fa.style.position="absolute";fa.style.width="134px";fa.style.left="77px";m=document.createElement("option");m.setAttribute("value","none");m.setAttribute("title",mxResources.get("move"));mxUtils.write(m,
mxResources.get("move")+"...");fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","start");m.setAttribute("title",mxResources.get("linestart"));mxUtils.write(m,mxResources.get("linestart"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","center");m.setAttribute("title",mxResources.get("center"));mxUtils.write(m,mxResources.get("center"));fa.appendChild(m);m=document.createElement("option");m.setAttribute("value","end");m.setAttribute("title",mxResources.get("lineend"));
-mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(D);mxUtils.br(D);D.appendChild(fa)}a.appendChild(D)}};
+mxUtils.write(m,mxResources.get("lineend"));fa.appendChild(m);mxEvent.addListener(fa,"change",function(S){if("none"!=fa.value){g.beginUpdate();try{J=J.clone(),J.x="start"==fa.value?-1:"end"==fa.value?1:0,J.y=0,J.offset=new mxPoint,g.setGeometry(d.vertices[0],J)}finally{g.endUpdate()}}fa.value="none"});mxUtils.br(E);mxUtils.br(E);E.appendChild(fa)}a.appendChild(E)}};
ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+h.getUnit();else if(p!=d){g.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(g.getModel().isVertex(k[u])){var w=g.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var y=g.view.getState(k[u]);null!=y&&g.isRecursiveVertexResize(y)&&g.resizeChildCells(k[u],w);g.getModel().setGeometry(k[u],w);g.constrainChildCells(k[u])}}}finally{g.getModel().endUpdate()}d=
p;a.value=p+" "+h.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,g=f.editor.graph,d=null,h=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(h){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){g.getModel().beginUpdate();try{for(var p=f.getSelectionState().cells,k=0;k<p.length;k++)if(g.getModel().isEdge(p[k])){var u=g.getCellGeometry(p[k]);null!=u&&(u=u.clone(),b(u,m),g.getModel().setGeometry(p[k],u))}}finally{g.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(h)}var f=this.editorUi,g=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var p=mxUtils.bind(this,function(J){var V=parseInt(m.value);
V=Math.min(999,Math.max(1,isNaN(V)?1:V));if(V!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var W=e.getSelectionState().cells;f.setCellStyles("width",V,W);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[V],"cells",W))}m.value=V+" pt";mxEvent.consume(J)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
"absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("linestart"));k.appendChild(h);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){H.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
-this.addKeyHandler(u,D);this.addKeyHandler(w,D);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
-"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
-"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(E,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});
-D()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
+this.addKeyHandler(u,E);this.addKeyHandler(w,E);var y=this.createPanel();y.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));y.appendChild(h);var A=this.addUnitInput(y,this.getUnit(),87,52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),D=this.addUnitInput(y,this.getUnit(),16,52,function(){N.apply(this,arguments)},this.getUnitStep(),null,
+null,this.isFloatUnit());mxUtils.br(y);this.addLabel(y,mxResources.get("left"),87,64);this.addLabel(y,mxResources.get("top"),16,64);a.appendChild(y);this.addKeyHandler(A,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(J,V,W){g=e.getSelectionState();J=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
+"none";1==g.cells.length&&f.model.isEdge(J)?(W=f.model.getGeometry(J),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(J,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(J,!1)?(A.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):y.style.display="none"):(k.style.display="none",y.style.display=
+"none")});var F=this.addEdgeGeometryHandler(u,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.x=b.fromUnit(V))});var H=this.addEdgeGeometryHandler(w,function(J,V){null!=J.sourcePoint&&(J.sourcePoint.y=b.fromUnit(V))});var M=this.addEdgeGeometryHandler(A,function(J,V){null!=J.targetPoint&&(J.targetPoint.x=b.fromUnit(V))});var N=this.addEdgeGeometryHandler(D,function(J,V){null!=J.targetPoint&&(J.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
+E()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,B){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var C=mxUtils.getCurrentStyle(q);parseFloat(C.fontSize)*B/100!=parseFloat(C.lineHeight)?q.style.lineHeight=B+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,B){B?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var g=
this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=this.createTitle(mxResources.get("font"));a.appendChild(m);m=this.createPanel();m.className="geFormatEntry";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=g.toolbar.addMenu(g.menus.get("formatBlock"),mxResources.get("style"),null,p);this.addArrow(k);k.style.margin="0px";k.style.position="relative";k.classList.add("geFullWidthElement");a.appendChild(p)}k=m.cloneNode(!1);a.appendChild(k);p=this.createPanel();var u=g.toolbar.addMenu(g.menus.get("fontFamily"),
"Helvetica",null,k);this.addArrow(u);u.style.margin="0px";u.style.position="relative";u.classList.add("geFullWidthElement");"inherit"==h.style[mxConstants.STYLE_FONTFAMILY]&&(k.style.display="none");k=m.cloneNode(!1);var w=g.toolbar.addItems(["bold","italic","underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+g.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+g.actions.get("italic").shortcut+
-")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),E=function(q){return function(){return q()}},D=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
-[mxConstants.ALIGN_LEFT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
-A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:E(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
-!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+g.actions.get("underline").shortcut+")");var y=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var A=m.cloneNode(!1),D=function(q){return function(){return q()}},E=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",
+[mxConstants.ALIGN_LEFT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),A),F=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),
+A),H=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),A);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
+!1,null)},k));var M=g.addButton(Editor.alignTopImage,mxResources.get("top"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),A),N=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),A),J=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),
A);a.appendChild(A);var V,W,T,O;if(d.cellEditor.isContentEditing()){M.style.display="none";N.style.display="none";J.style.display="none";y.style.display="none";var fa=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){document.execCommand("justifyfull",!1,null)},A);fa.style.marginRight="9px";var S=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},A);S.style.marginLeft="10px";var aa=g.addButton(Editor.superscriptImage,
-mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";E=A.cloneNode(!1);E.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
-function(){document.execCommand("indent",!1,null)},E),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];A[A.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",H.style.marginRight=
+mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},A);S.style.marginLeft="10px";D=A.cloneNode(!1);D.style.paddingTop="4px";A=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),
+function(){document.execCommand("indent",!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];A[A.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",H.style.marginRight=
"12px";A=m.cloneNode(!1);mxUtils.write(A,mxResources.get("position"));var Y=document.createElement("select");Y.style.left="114px";Y.style.width="98px";var ba="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),L={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<ba.length;E++){var U=document.createElement("option");U.setAttribute("value",ba[E]);mxUtils.write(U,mxResources.get(ba[E]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
-U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<U.length;E++){var ja=document.createElement("option");ja.setAttribute("value",U[E]);"vertical-"==U[E].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[E].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[E]));
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<ba.length;D++){var U=document.createElement("option");U.setAttribute("value",ba[D]);mxUtils.write(U,mxResources.get(ba[D]));Y.appendChild(U)}A.appendChild(Y);ba=A.cloneNode(!1);mxUtils.write(ba,mxResources.get("writingDirection"));var X=Y.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),
+U.push("vertical-rightToLeft"));var ia={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<U.length;D++){var ja=document.createElement("option");ja.setAttribute("value",U[D]);"vertical-"==U[D].substring(0,9)?mxUtils.write(ja,mxResources.get("vertical")+" ("+mxResources.get(U[D].substring(9))+")"):mxUtils.write(ja,mxResources.get(U[D]));
X.appendChild(ja)}ba.appendChild(X);d.isEditing()||(a.appendChild(A),mxEvent.addListener(Y,"change",function(q){d.getModel().beginUpdate();try{var B=L[Y.value];null!=B&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,B[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,B[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,B[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,B[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),a.appendChild(ba),mxEvent.addListener(X,
"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ia[X.value],h.cells);mxEvent.consume(q)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);A=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ta.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var B=d.cellEditor.textarea.getElementsByTagName("font"),
C=0;C<B.length;C++)if("1"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize="";var G=mxUtils.getCurrentStyle(B[C]);q!=b(G)?B[C].style.fontSize=q+"px":""==B[C].getAttribute("style")&&B[C].removeAttribute("style")}}},!0);A=this.createStepper(ta,A,1,!0,Menus.prototype.defaultFontSize);A.style.display=ta.style.display;A.style.left="198px";"inherit"==h.style[mxConstants.STYLE_FONTSIZE]&&(ta.style.display="none",A.style.display="none");k.appendChild(A);var ca=null,P=d.shapeBackgroundColor,
@@ -3151,7 +3152,7 @@ da=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundC
h.cells)))},"default",{install:function(q){da=q},destroy:function(){da=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){oa.style.display=q==mxConstants.NONE?"none":"";za.style.display=oa.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,
null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,h.cells);d.updateLabelElements(h.cells,function(B){B.removeAttribute("color");B.style.color=null})},d.shapeForegroundColor);"inherit"==h.style[mxConstants.STYLE_FONTCOLOR]&&(k.style.display="none");k.style.fontWeight="bold";p.appendChild(k);p.appendChild(oa);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(za),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";A=d.filterSelectionCells(mxUtils.bind(this,function(q){var B=d.view.getState(q);return null==B||d.getModel().isEdge(q)||d.isAutoSizeState(B)}));k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,A);k.style.fontWeight="bold";0<A.length&&p.appendChild(k);
-A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);E=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=E&&null!=E.text&&null!=E.text.node&&0==E.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
+A=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));A.style.fontWeight="bold";p.appendChild(A);D=d.view.getState(d.getSelectionCell());(A="1"==mxUtils.getValue(h.style,"html",0))&&(1<d.getSelectionCount()&&"1"==h.style.convertToSvg||1==d.getSelectionCount()&&null!=D&&null!=D.text&&null!=D.text.node&&0==D.text.node.getElementsByTagName("foreignObject").length)&&(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled",
"disabled"));k=this.createCellOption(mxResources.get("lblToSvg"),"convertToSvg","0");k.style.fontWeight="bold";p.appendChild(k);A||(k.style.opacity="0.5",k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"));if(!g.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.getElementsByTagName("span")[0].style.maxWidth="172px",k.appendChild(g.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/5165"));k=this.createPanel();k.style.height="86px";A=document.createElement("div");
A.style.position="absolute";A.style.width="70px";A.style.marginTop="0px";A.style.fontWeight="bold";mxUtils.write(A,mxResources.get("spacing"));k.appendChild(A);var Aa=this.addUnitInput(k,this.getUnit(),87,52,function(){eb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ma=this.addUnitInput(k,this.getUnit(),16,52,function(){bb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),
16,64);mxUtils.br(k);mxUtils.br(k);var Pa=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){qb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,
@@ -3165,8 +3166,8 @@ function(q){if(null!=W){var B=W.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*
"1"),G.style.border="1px solid "+C,G.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=W){var B=W.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(C,G,K,Q){return"#"+("0"+Number(G).toString(16)).substr(-2)+("0"+Number(K).toString(16)).substr(-2)+("0"+Number(Q).toString(16)).substr(-2)});g.pickColor(B,function(C){var G=null==T||null!=q&&mxEvent.isShiftDown(q)?
W:T;d.processElements(G,function(K){K.style.backgroundColor=null});G.style.backgroundColor=null==C||C==mxConstants.NONE?"":C})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=W){var q=W.getAttribute("cellPadding")||0;q=new FilenameDialog(g,q,mxResources.get("apply"),mxUtils.bind(this,function(B){null!=B&&0<B.length?W.setAttribute("cellPadding",B):W.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(q.container,300,80,!0,!0);q.init()}},m),
g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=W&&W.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=W&&W.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=W&&W.setAttribute("align","right")},m)];A[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Wa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),
-mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
-mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
+mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(D);var Xa=mxUtils.bind(this,function(q,B,C){h=g.getSelectionState();q=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,
+mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(y,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(C||document.activeElement!=ta)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,q==mxConstants.ALIGN_LEFT);f(F,q==mxConstants.ALIGN_CENTER);f(H,q==mxConstants.ALIGN_RIGHT);
q=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(M,q==mxConstants.ALIGN_TOP);f(N,q==mxConstants.ALIGN_MIDDLE);f(J,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);B=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);Y.value=q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&
B==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&B==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&B==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&B==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?
X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(C||document.activeElement!=Ma)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ma.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(C||document.activeElement!=Aa)q=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),Aa.value=
@@ -3177,8 +3178,8 @@ window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement
d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(xa).display)return xa;xa=xa.parentNode}return null},K=mxUtils.getCurrentStyle(q),Q=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,Z=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(K);if(window.getSelection)for(var ka=q.getElementsByTagName("*"),ha=window.getSelection(),la=0;la<ka.length&&(!ha.containsNode(ka[la],!0)||null==ka[la].style||(null==Z&&""!=ka[la].style.fontSize&&(Z=parseFloat(ka[la].style.fontSize)),
null==Q&&""!=ka[la].style.lineHeight&&(Q=ka[la].style.lineHeight),null==Z||null==Q));la++);null==Z&&(Z=b(K));if(null==Q)for(ka=q;null!=ka&&ka!=d.cellEditor.textarea.parentNode;){if(null!=ka.style&&""!=ka.style.lineHeight){Q=ka.style.lineHeight;break}ka=ka.parentNode}if(null!=K){f(w[0],"bold"==K.fontWeight||400<K.fontWeight||C("B")||C("STRONG"));f(w[1],"italic"==K.fontStyle||C("I")||C("EM"));f(w[2],"underline"==K.textDecorationLine||C("U"));f(V,"line-through"==K.textDecorationLine||C("STRIKE"));f(aa,
C("SUP"));f(S,C("SUB"));var ya=G(q);if(null!=ya){C=function(xa,Ga){Ha.push({name:xa,dispName:Ga,type:"string",getValue:function(){return La[xa]},valueChanged:function(va,ua){var Sa=ya.style,Qa=va;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Sa[xa]=Qa;""==va&&null!=ua&&(ua.value=La[xa])}})};var La=mxUtils.getCurrentStyle(ya),Ha=[];C("paddingTop","Padding Top");C("paddingRight","Padding Right");C("paddingLeft","Padding Left");C("paddingBottom","Padding Bottom");C("marginTop","Margin Top");C("marginRight",
-"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(D,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(D,
-!1),f(F,!1),f(H,!1)):(f(fa,!1),f(D,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
+"Margin Right");C("marginLeft","Margin Left");C("marginBottom","Margin Bottom");C=this.createPanel();this.addProperties(C,Ha,h,!0);null!=hb?hb.parentNode.replaceChild(C,hb):a.appendChild(C);hb=C}d.cellEditor.isTableSelected()?(f(fa,B(K.textAlign,"justify")),f(E,B(K.textAlign,"left")),f(F,B(K.textAlign,"center")),f(H,B(K.textAlign,"right"))):(C=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),B(K.textAlign,"justify")?(f(fa,B(K.textAlign,"justify")),f(E,
+!1),f(F,!1),f(H,!1)):(f(fa,!1),f(E,C==mxConstants.ALIGN_LEFT),f(F,C==mxConstants.ALIGN_CENTER),f(H,C==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(q,"TABLE",d.cellEditor.textarea);O=null==W?null:d.getParentByName(q,"TR",W);T=null==W?null:d.getParentByNames(q,["TD","TH"],W);Wa.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof Q&&0<Q.indexOf("%")?Da.value=Q.replace("%"," %"):(B=parseFloat(Q),isNaN(B)?Da.value="120 %":Da.value=
Math.round(100*B)+" %"));null!=da&&(ma=d.getTextColor(q,!0),da(ma,!0));null!=ca&&(P=d.getTextColor(q,!1),ca(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(K.fontFamily))}}cb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};
StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
@@ -3186,8 +3187,8 @@ var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPA
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(g))):Base64.decode(g,!0),h=mxUtils.parseXml(d);if(null!=h){var m="light"==h.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,
"darkMode",null),p=""==h.documentElement.style.colorScheme,k=h.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],h,k[b],u,e,f,m,p)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,E){var D=mxUtils.trim(w.style.getPropertyValue(y));if(""!=D&&"url("!=D.substring(0,4)){var F=D;"transparent"==F?F=mxConstants.NONE:(D=mxUtils.isLightDarkColor(F))&&E?E=!1:D||E||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
-"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,E);a.appendChild(w);
+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,g,d,h,m,p){var k=this.editorUi,u=k.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(w,y,A,D){var E=mxUtils.trim(w.style.getPropertyValue(y));if(""!=E&&"url("!=E.substring(0,4)){var F=E;"transparent"==F?F=mxConstants.NONE:(E=mxUtils.isLightDarkColor(F))&&D?D=!1:E||D||(F="light-dark("+F+", "+F+")");w=this.createColorOption(A+" "+w.selectorText,function(){return F},mxUtils.bind(this,function(H){g[d].style.setProperty(y,H==mxConstants.NONE?
+"transparent":mxUtils.getLightDarkColor(H).cssText);H="";p&&mxUtils.isLightDarkColor(g[d].style[y])&&(e.documentElement.style.colorScheme="light dark");for(var M=0;M<g.length;M++)H+=g[M].cssText+" ";f.textContent=H;H=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(H))):Base64.encode(H,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(H){},destroy:function(){}},null,null,null,D);a.appendChild(w);
a.style.display=""}}),h(b,"fill",mxResources.get("fill"),m),h(b,"stroke",mxResources.get("line"),m),h(b,"stop-color",mxResources.get("gradient"),m))};
StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.position="relative";e.style.marginBottom="2px";e.className="geFullWidthElement";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),g=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);g=this.editorUi.sidebar.getLibsForStyle(d);
null!=g||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(g=[])}null!=g&&f.push("openLibrary");for(d=0;d<f.length;d++){var h=this.editorUi.actions.get(f[d]);if(null==h||h.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+"...");null!=h&&null!=h.shortcut&&(p+=" ("+h.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),
@@ -3196,11 +3197,11 @@ f=f.view.getState(f.getSelectionCell()),null!=f&&null!=mxUtils.getValue(f.style,
StyleFormatPanel.prototype.addFill=function(a){function b(){h.innerHTML="";A=1;for(var F=0;F<Editor.fillStyles.length;F++){var H=document.createElement("option");H.setAttribute("value",Editor.fillStyles[F].val);mxUtils.write(H,Editor.fillStyles[F].dispName);h.appendChild(H)}}var e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=document.createElement("select");d.style.position="absolute";d.style.left="76px";d.style.width="86px";var h=d.cloneNode(!1);mxEvent.addListener(d,"click",function(F){mxEvent.consume(F)});
mxEvent.addListener(h,"click",function(F){mxEvent.consume(F)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(F){d.style.display=null==F||F==mxConstants.NONE?"none":""},function(F){f.updateCellStyles({gradientColor:F},f.getSelectionCells())},f.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:
mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(F){f.setCellStyles(p,F,g.cells)}),f.getDefaultColor(g.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(g.style,p,null);m.style.display=null!=u&&u!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var E=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
+mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var y=document.createElement("option");y.setAttribute("value",w[u]);mxUtils.write(y,mxResources.get(w[u]));d.appendChild(y)}m.appendChild(d);var A;b();g.gradient&&k.appendChild(h);var D=mxUtils.bind(this,function(){g=e.getSelectionState();var F=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),H=mxUtils.getValue(g.style,"fillStyle","auto");""==F&&(F=mxConstants.DIRECTION_SOUTH);d.value=F;a.style.display=
g.fill?"":"none";F=mxUtils.getValue(g.style,p,null);if(g.fill&&null!=F&&F!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=A){h.innerHTML="";A=2;for(F=0;F<Editor.roughFillStyles.length;F++){var M=document.createElement("option");M.setAttribute("value",Editor.roughFillStyles[F].val);mxUtils.write(M,Editor.roughFillStyles[F].dispName);h.appendChild(M)}h.value="auto"}}else 1!=A&&b();h.value=H;h.value||(H="auto",h.value=H);h.style.display="1"==g.style.sketch||"none"==d.style.display?
-"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
-"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var D={};k=this.getCustomColors();for(u=0;u<k.length;u++)D[k[u].key]||(D[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
-!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!D[F[N]]){D[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
+"":"none";m.style.display=!g.gradient||g.containsImage||"1"==g.style.sketch&&"solid"!=H&&"auto"!=H?"none":""}else h.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D();mxEvent.addListener(d,"change",function(F){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],
+"cells",g.cells));mxEvent.consume(F)});mxEvent.addListener(h,"change",function(F){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(F)});a.appendChild(k);a.appendChild(m);var E={};k=this.getCustomColors();for(u=0;u<k.length;u++)E[k[u].key]||(E[k[u].key]=!0,a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue,null,null,k[u].defaultColorValue,k[u].undefinedColor,
+!0)));k=mxUtils.bind(this,function(F,H,M){if(null!=F){F=F.split(",");H=null!=H?H.split(","):null;for(var N=0;N<F.length;N++)if(!E[F[N]]){E[F[N]]=!0;var J=null!=H?H[mxUtils.mod(N,H.length)]:null,V=null!=J?J:"default";a.appendChild(this.createCellColorOption(Editor.getLabelForStylename(F[N]),F[N],V,null,null,M,J,!0))}}});k(g.style.fillColorStyles,g.style.defaultFillColors,f.shapeBackgroundColor);k(g.style.strokeColorStyles,g.style.defaultStrokeColors,f.shapeForegroundColor);return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi,b=a.editor.graph;a=a.getSelectionState();var e=[];if(null!=a.customProperties)for(var f in a.customProperties){var g=a.customProperties[f];if(null!=g&&g.primary&&("color"==g.type||"color"==g.subType)&&("function"!==typeof g.isVisible||g.isVisible(a,this))){var d="color"==g.subType?g.subDefVal:g.defVal;d=null!=d?d:b.shapeBackgroundColor;e.push({title:g.dispName,defaultValue:d,defaultColorValue:null!=g.defaultColor?g.defaultColor:
d,undefinedColor:g.undefinedColor,key:g.name})}}a.swimlane&&(b=this.editorUi.editor.graph,e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default",defaultColorValue:b.shapeBackgroundColor}));return e};
StyleFormatPanel.prototype.addDashPattern=function(a,b){var e=b.split(" ");if(2<=e.length){for(var f=0,g=0;g<e.length;g++)f+=parseInt(e[g]);b=Graph.createSvgImage(f,1,'<line transform="translate(0,1)" x1="0" y1="0" x2="'+f+'" y2="0" stroke-dasharray="'+b+'" stroke-width="2" stroke="black"/>',f,1);a.style.backgroundImage="url("+b.src+")";a.style.backgroundSize=f+"px 1px";a.style.backgroundRepeat="repeat-x"}else a.style.borderBottomStyle=b};
@@ -3208,15 +3209,15 @@ StyleFormatPanel.prototype.addStroke=function(a){function b(P){var da=f.fromUnit
Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",h.cells)));N.value=f.inUnit(da)+" "+f.getUnit();mxEvent.consume(P)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var p=document.createElement("select");
p.style.position="absolute";p.style.left="72px";p.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(P){d.getModel().beginUpdate();try{var da=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==p.value?ma=["1","0"]:"curved"==p.value&&(ma=["0","1"]);for(var Ia=0;Ia<da.length;Ia++)d.setCellStyles(da[Ia],
ma[Ia],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",da,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(p,"click",function(P){mxEvent.consume(P)});var y="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,y,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(y,P,h.cells);if(null==P||
-P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var E=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
-P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),D=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
-E(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
+P==mxConstants.NONE){P=[];for(var da=0;da<h.cells.length;da++)(d.isTableCell(h.cells[da])||d.isTableRow(h.cells[da]))&&P.push(h.cells[da]);0<P.length&&d.setCellStyles(y,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(p);var A=m.cloneNode(!1);A.style.position="relative";var D=mxUtils.bind(this,function(P,da,ma,Ia,oa){P=this.editorUi.menus.styleChange(P,"",Ia,oa,"",null);Ia=document.createElement("div");this.addDashPattern(Ia,ma);P.firstChild.firstChild.className="geStyleMenuItem";
+P.firstChild.firstChild.style.width=da+"px";P.firstChild.firstChild.appendChild(Ia);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");
+D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,A),F=A.cloneNode(!1),H=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){var da=[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,mxConstants.STYLE_DASHED,"width"];Format.processMenuIcon(this.editorUi.menus.styleChange(P,
"",da,[null,null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["link",null,null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["flexArrow",null,null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));
Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["arrow",null,null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["filledEdge",null,null,null,null],"",null,null,null,!0,Format.filledEdgeImage.src)).setAttribute("title","Filled Edge");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["pipe",null,null,null,null],"",null,null,null,!0,Format.pipeEdgeImage.src)).setAttribute("title",
-"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){E(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");E(P,40,
-"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");E(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
+"Pipe");Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",da,["wire",null,null,"1",null],"",null,null,null,!0,Format.wireEdgeImage.src)).setAttribute("title","Wire")})),"",null,F);H.setAttribute("title",mxResources.get("connection"));w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,40,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,40,"8 4 1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 4 1 4"]).setAttribute("title",mxResources.get("dashed")+" (4)");D(P,40,
+"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,F);k=A.cloneNode(!1);var M=document.createElement("input");M.style.position="absolute";
M.style.width="52px";M.style.left="148px";M.setAttribute("title",mxResources.get("linewidth"));A.appendChild(M);var N=M.cloneNode(!0);N.style.width="56px";N.style.left="144px";F.appendChild(N);var J=this.createStepper(M,b,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=M.style.display;A.appendChild(J);J=this.createStepper(N,e,this.getUnitStep(),null,null,this.isFloatUnit());J.style.display=N.style.display;F.appendChild(J);mxEvent.addListener(M,"blur",b);mxEvent.addListener(M,"change",
b);mxEvent.addListener(N,"blur",e);mxEvent.addListener(N,"change",e);var V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
@@ -3253,9 +3254,9 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STY
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",
mxResources.get("block"));P.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)}})),"",null,k);H.style.width="67px";H.style.marginRight="2px";w.style.width="67px";w.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";T.style.width="67px";T.style.marginRight="2px";this.addArrow(H).appendChild(document.createElement("div"));this.addArrow(V).appendChild(document.createElement("div"));
-this.addArrow(W);this.addArrow(T);D.style.width="142px";D=this.addArrow(D);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";D.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
+this.addArrow(W);this.addArrow(T);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var O=document.createElement("div");O.className="gePatternPreview";O.style.width="100px";O.style.borderBottomStyle="solid";E.appendChild(O);var fa=document.createElement("div");fa.className="gePatternPreview";fa.style.width="36px";fa.style.borderBottomStyle="solid";w.appendChild(fa);a.appendChild(u);a.appendChild(F);a.appendChild(A);u=A.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop=
"2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("size"));u.appendChild(w);var S=this.addUnitInput(u,this.getUnit(),82,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),aa=this.addUnitInput(u,this.getUnit(),16,52,function(){ja.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
-mxUtils.br(u);D=document.createElement("div");D.style.height="8px";u.appendChild(D);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
+mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("spacing"));u.appendChild(w);var Y=this.addUnitInput(u,this.getUnit(),82,52,function(){ia.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ba=this.addUnitInput(u,this.getUnit(),16,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("linestart"),82,62).style.fontSize=
"10px";this.addLabel(u,mxResources.get("lineend"),16,62).style.fontSize="10px";mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var L=this.addUnitInput(m,this.getUnit(),16,52,function(){ca.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var U=mxUtils.bind(this,
function(P,da,ma){function Ia(oa,za,Aa,Ma){Aa=Aa.getElementsByTagName("div")[0];null!=Aa&&g.updateCssForMarker(Aa,Ma,h.style.shape,oa,za);return Aa}h=g.getSelectionState();if(ma||document.activeElement!=M)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),M.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(ma||document.activeElement!=N)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();p.style.visibility=
"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape||"pipe"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");O.style.borderBottom="1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),2<=String(P).split(" ").length?(O.style.borderBottom="1px solid transparent",
@@ -3270,9 +3271,9 @@ d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];f
mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=mxUtils.bind(this,function(w,y,A){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(A||document.activeElement!=p)w=parseInt(mxUtils.getValue(f.style,
"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(w)?"":this.inUnit(w)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState(),g=document.createElement("table");g.className="geFullWidthElement";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),h=document.createElement("tr");h.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.style.verticalAlign="top";var p=m.cloneNode(!0);p.style.paddingLeft="8px";h.appendChild(m);h.appendChild(p);
-d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,E,D){y=this.createCellOption(y,A,E,null,null,D);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
-"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var D in f.customProperties)y=
-f.customProperties[D],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,D,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
+d.appendChild(h);g.appendChild(d);a.appendChild(g);var k=m,u=mxUtils.bind(this,function(y,A,D,E){y=this.createCellOption(y,A,D,null,null,E);y.style.alignItems="top";k.appendChild(y);k=k==m?p:m;return y}),w=mxUtils.bind(this,function(y,A,D){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,function(F,H){e.updateCellStyles({sketch:H?
+"1":null,curveFitting:H?Editor.sketchDefaultCurveFitting:null,jiggle:H?Editor.sketchDefaultJiggle:null},F)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);y=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(y,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",0);if(null!=f.customProperties)for(var E in f.customProperties)y=
+f.customProperties[E],null!=y&&"bool"==y.type&&y.primary&&("function"!==typeof y.isVisible||y.isVisible(f,this))&&u(y.dispName,E,y.defVal?"1":"0")});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
DiagramStylePanel.prototype.getGlobalStyleButtons=function(){var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatEntry";var f=document.createElement("input");f.setAttribute("type","checkbox");f.checked=Editor.sketchMode;e.appendChild(f);mxUtils.write(e,mxResources.get("sketch"));mxEvent.addListener(e,"click",function(d){if(b.isEnabled()){var h=!Editor.sketchMode;b.updateCellStyles({sketch:h?"1":null,curveFitting:h?Editor.sketchDefaultCurveFitting:null,jiggle:h?
Editor.sketchDefaultJiggle:null},b.getVerticesAndEdges());a.setSketchMode(h);mxEvent.consume(d)}});e=[e,mxUtils.button(mxResources.get("rounded"),mxUtils.bind(this,function(d){var h=b.getVerticesAndEdges(),m=!0;if(0<h.length)for(var p=0;p<h.length;p++){var k=b.getCellStyle(h[p]);if(0==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,0)){m=!1;break}}m=!m;b.updateCellStyles({rounded:m?"1":"0"},h);m?(b.currentEdgeStyle.rounded="1",b.currentVertexStyle.rounded="1"):(delete b.currentEdgeStyle.rounded,delete b.currentVertexStyle.rounded);
@@ -3292,10 +3293,10 @@ S!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&S==mxConstants.STYLE_FONTCOLOR?
"light",fa.parentNode.appendChild(S))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var y=mxUtils.bind(this,function(V,W,T,O,fa){var S=this.format.cachedStyleEntries[fa];null==S&&(S=document.createElement("div"),S.className="geGraphStylePreview",p||null==O||null==O.background||(S.style.backgroundColor=O.background),u(V,W,T,O,S),mxEvent.addGestureListeners(S,mxUtils.bind(this,function(aa){S.style.opacity=
.6}),null,mxUtils.bind(this,function(aa){S.style.opacity="";e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(V,e.currentVertexStyle);k(V,e.currentEdgeStyle);k(W,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var Y=d.slice(),ba;for(ba in V)Y.push(ba);h(Y,O);if(!p){var L=new ChangePageSetup(b,null!=O?O.background:null);L.ignoreImage=!0;f.execute(L);f.execute(new ChangeGridColor(b,null!=O&&null!=O.gridColor?O.gridColor:
g))}}finally{f.endUpdate()}})),mxClient.IS_TOUCH||(mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(aa){var Y=e.getCellStyle;aa=e.background;var ba=e.view.gridColor;p||(e.background=null!=O?O.background:null,e.view.gridColor=null!=O&&null!=O.gridColor?O.gridColor:g);e.getCellStyle=function(L,U){U=null!=U?U:!0;var X=mxUtils.clone(Y.apply(this,arguments)),ia=e.stylesheet.getDefaultVertexStyle(),ja=W;f.isEdge(L)&&(ia=e.stylesheet.getDefaultEdgeStyle(),ja=T);m(X,d,ia);k(V,X,L,O);k(ja,X,L,
-O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");
-for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,D())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
-N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);E.push(N)}a.appendChild(H);D();if(15>A&&0<E.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,E[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
-1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+O);U&&(X=this.postProcessCellStyle(L,X));return X};e.refresh();e.getCellStyle=Y;e.background=aa;e.view.gridColor=ba})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(aa){e.refresh()}))),this.format.cachedStyleEntries[fa]=S);w.appendChild(S)}),A=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");
+for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];y(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),F=mxUtils.bind(this,function(V){0<=V&&V<A&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,E())});if(1<A){var H=document.createElement("div");H.className="geSwitcher";H.style.width="200px";for(var M=0;M<A;M++){var N=document.createElement("div");
+N.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(N,"click",mxUtils.bind(this,function(){F(V)}))})(M,N);H.appendChild(N);D.push(N)}a.appendChild(H);E();if(15>A&&0<D.length){M=document.createElement("div");M.className="geButton";M.style.backgroundImage="url("+Editor.chevronLeftImage+")";var J=M.cloneNode(!1);J.style.backgroundImage="url("+Editor.chevronRightImage+")";H.insertBefore(M,D[0]);H.appendChild(J);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-
+1,A))}));mxEvent.addListener(J,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,A))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),g=f.getElementsByTagName("input")[0];null!=g&&(g.style.visibility=null!=e.backgroundImage?
@@ -3313,7 +3314,7 @@ 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,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function 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 m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
-function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
+function y(){mxShape.call(this)}function A(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function O(c,l){this.canvas=c;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,O.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,O.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,O.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,O.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
O.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,O.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ia(){mxShape.call(this)}function ja(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
function ca(){mxShape.call(this)}function P(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ia(){mxShape.call(this)}function oa(){mxShape.call(this)}function za(){mxShape.call(this)}function Aa(){mxShape.call(this)}function Ma(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ka(){mxRectangleShape.call(this)}function Ja(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
@@ -3337,10 +3338,10 @@ c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.be
15;w.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
w);mxUtils.extend(y,mxShape);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",y);mxUtils.extend(A,mxCylinder);A.prototype.size=15;A.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
-0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
-mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.isRoundable=function(){return!0};D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
+0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",A);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",D);mxUtils.extend(E,
+mxCylinder);E.prototype.tabWidth=60;E.prototype.tabHeight=20;E.prototype.tabPosition="right";E.prototype.arcSize=.1;E.prototype.isRoundable=function(){return!0};E.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,
"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(z*=Math.min(n,r));z=Math.min(z,.5*n,.5*(r-t));l=Math.max(l,z);l=Math.min(n-z,l);x||(z=0);c.begin();"left"==v?(c.moveTo(Math.max(z,0),t),c.lineTo(Math.max(z,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(z,0),0),c.lineTo(n-Math.max(z,0),t));x?(c.moveTo(0,z+t),c.arcTo(z,z,0,0,1,z,t),c.lineTo(n-z,t),c.arcTo(z,z,0,0,1,n,z+t),c.lineTo(n,
-r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
+r-z),c.arcTo(z,z,0,0,1,n-z,r),c.lineTo(z,r),c.arcTo(z,z,0,0,1,0,r-z)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",E);E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",
15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?
new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(F,mxCylinder);F.prototype.arcSize=.1;F.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
t=mxUtils.getValue(this.style,"umlStateConnection",null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),
@@ -3350,7 +3351,7 @@ mxActor);M.prototype.size=.4;M.prototype.redrawPath=function(c,l,t,n,r){l=r*Math
n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",M);mxUtils.extend(N,mxActor);N.prototype.size=.3;N.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};N.prototype.redrawPath=
function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",N);var Ya=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ya.apply(this,arguments)};
mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};A.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*
-l*this.scale))}return null};D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
+l*this.scale))}return null};E.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};F.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,
"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,
"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",J);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=
@@ -3521,8 +3522,8 @@ return l},internalStorage:function(c){var l=[Va(c,["dx","dy"],function(t){var n=
l.push(ib(c));return l},module:function(c){return[Va(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ma.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,
t.y-l.y))/2)})]},corner:function(c){return[Va(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Va(c,["dx","dy"],function(l){var t=
Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:vb(1),doubleArrow:vb(.5),"mxgraph.arrows2.wedgeArrow":db(20,20),"mxgraph.arrows2.wedgeArrowDashed":db(20,
-20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
-t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
+20),"mxgraph.arrows2.wedgeArrowDashed2":db(20,20),folder:function(c){return[Va(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",E.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",E.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
+t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",E.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Va(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/
200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(y.prototype.size),cylinder3:wb(A.prototype.size),offPageConnector:function(c){return[Va(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-
t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));
@@ -3546,7 +3547,7 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};A.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=
+0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};E.prototype.getConstraints=
function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3559,7 +3560,7 @@ Z.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -3582,8 +3583,8 @@ function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mx
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};da.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var E=A.getCellGeometry(k);null!=E&&w&&y&&(w/=y,E=E.clone(),1<w?E.height=E.width/w:E.width=E.height*w,A.getModel().setGeometry(k,
-E));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
+Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,y,A){A.getModel().beginUpdate();try{var D=A.getCellGeometry(k);null!=D&&w&&y&&(w/=y,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,A.getModel().setGeometry(k,
+D));A.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);A.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{A.getModel().endUpdate()}}var f=this.editorUi,g=f.editor,d=g.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});var m=new Action("smartFit",function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,
u=d.container.scrollLeft,w=d.container.scrollTop,y=d.view.translate.x,A=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&y==d.view.translate.x&&A==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter");m.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",m);this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?
f.actions.get("smartFit").funct():d.isEnabled()&&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(k,u){try{var w=mxUtils.parseXml(k);g.graph.setSelectionCells(g.graph.importGraphModel(w.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.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+"+"+Editor.shiftKey+"+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1,null,null,null,new mxRectangle(0,
@@ -3591,8 +3592,8 @@ f.actions.get("smartFit").funct():d.isEnabled()&&d.startEditingAtCell()});this.a
this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"",Editor.ctrlKey+"+C");this.addAction("paste",function(){f.pasteFromClipboard()},!1,"",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){f.pasteFromClipboard(d.popupMenuHandler.getTriggerPoint())});
this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),
u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var F=y.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||D.setAttribute("placeholders",
-F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));y.setValue(E,D)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
+"+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(D,E){var F=y.getValue(D);E=D.cloneValue(E);E.removeAttribute("placeholders");null==F||isNaN(F.nodeType)||E.setAttribute("placeholders",
+F.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||E.setAttribute("label",d.convertValueToString(D));y.setValue(D,E)}k=null!=u?u:k;var y=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){y.beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());if(0==A.length)w(y.getRoot(),f.copiedValue);else for(u=0;u<A.length;u++)w(A[u],f.copiedValue)}finally{y.endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+E");this.addAction("delete",function(k,u){k=
null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(k){f.handleError(k)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",
function(){var k=f.getSelectionState();if(null!=k.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",k.rowspan,[k.mergeCell]),d.setCellStyles("colspan",k.colspan,[k.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var k=f.getSelectionState();if(0<k.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,k.cells),d.setCellStyles("colspan",null,k.cells)}finally{d.getModel().endUpdate()}}}));m=new Action("turn",
function(k,u){k=null!=u?u:k;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=k?mxEvent.isShiftDown(k):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R");m.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",m);this.put("selectConnections",new Action("selectEdges",function(k){k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.addSelectionCells(d.getEdges(k))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,
@@ -3607,7 +3608,7 @@ null==w&&(w=k.value.getAttribute("tooltip"));null!=w&&(u=w)}u=new TextareaDialog
!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(w,y,A){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<w.length?w:null),d.setAttributeForCell(k,"linkTarget",A)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+L");this.put("insertImage",new Action("image...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=h;this.addAction("editImage...",function(){f.actions.get("image").funct()});
this.put("insertLink",new Action("link...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,w){k=mxUtils.trim(k);if(0<k.length){var y=null,A=d.getLinkTitle(k);null!=u&&0<u.length&&(y=u[0].iconUrl,A=u[0].name||u[0].type,A=A.charAt(0).toUpperCase()+A.substring(1),30<A.length&&(A=A.substring(0,30)+"..."));u=new mxCell(A,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+
y:"spacing=10;"));u.vertex=!0;y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=y.x;u.geometry.y=y.y;d.setAttributeForCell(u,"linkTarget",w);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=
-d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?
+d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var y=k.getElementsByTagName("a"),A=0;A<y.length&&null==u;A++)y[A].textContent==k.textContent&&(u=y[A]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var D=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(E){d.cellEditor.restoreSelection(D);null!=E&&d.insertLink(E)}))}else d.isSelectionEmpty()?
this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];d.getModel().isVertex(w)&&(0<d.getModel().getChildCount(w)?d.updateGroupBounds([w],0,!0):d.updateCellSize(w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});
this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),w=0;w<u.length;w++)if(state=d.getView().getState(u[w]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[w]]);else if("0"==y&&"1"==k){var A=mxUtils.htmlEntities(d.convertValueToString(state.cell),
!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(A));d.setCellStyles("html",k,[u[w]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=k?k:"0"],"cells",u))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),u="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(u=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
@@ -3621,8 +3622,8 @@ f.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});m.setToggleAction(!0)
m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;f.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());f.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());f.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=h;m=this.addAction("autosave",function(){f.editor.setAutosave(!f.editor.autosave)});
m.setToggleAction(!0);m.setSelectedCallback(function(){return f.editor.autosave});m.isEnabled=h;m.visible=!1;this.addAction("help",function(){var k="";mxResources.isLanguageSupported(mxClient.language)&&(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;m=new Action("about",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)});m.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",m);m=
-mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(D){D.style.fontWeight=null;"B"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
-function(D){D.style.fontStyle=null;"I"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(D){D.style.textDecoration=null;"U"==D.nodeName&&d.replaceElement(D)});for(var E=0;E<A.length;E++)0==d.model.getChildCount(A[E])&&d.autoSizeCell(A[E],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
+mxUtils.bind(this,function(k,u,w,y){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var A=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,u,A);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(A,function(E){E.style.fontWeight=null;"B"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(A,
+function(E){E.style.fontStyle=null;"I"==E.nodeName&&d.replaceElement(E)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(A,function(E){E.style.textDecoration=null;"U"==E.nodeName&&d.replaceElement(E)});for(var D=0;D<A.length;D++)0==d.model.getChildCount(A[D])&&d.autoSizeCell(A[D],!1)}finally{d.getModel().endUpdate()}}},null,null,y)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,
function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){f.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",d.shapeForegroundColor)});this.addAction("strokeColor...",function(){f.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("fillColor...",function(){f.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
null,null,"default",d.shapeBackgroundColor)});this.addAction("gradientColor...",function(){f.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("backgroundColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor",null,"default",d.shapeBackgroundColor)});this.addAction("borderColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("removeFormat",
function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.removeTextStyleForCell(k[u],!0)}finally{d.getModel().endUpdate()}}});this.addAction("vertical",function(){f.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){f.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
@@ -3638,10 +3639,10 @@ null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction
this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];if(d.getModel().isEdge(w)){var y=d.getCellGeometry(w);null!=y&&(y=y.clone(),y.points=null,y.x=0,y.y=0,y.offset=null,d.getModel().setGeometry(w,y))}}}finally{d.getModel().endUpdate()}}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,
Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(E,D,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(E,D,F);else{var J=d.getSelectionCells();if(null!=E&&(0<E.length||0<J.length)){var V=null;
-d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
-"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=D&&null!=F)for(E=0;E<J.length;E++){var O=J[E];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=D,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
-d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,E,D){e(k,A,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
+!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",y=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,y=u.style[mxConstants.STYLE_CLIP_PATH]||y);var A=d.cellEditor.saveSelection();f.showImageDialog(k,w,function(D,E,F,H,M,N){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(A),d.insertImage(D,E,F);else{var J=d.getSelectionCells();if(null!=D&&(0<D.length||0<J.length)){var V=null;
+d.getModel().beginUpdate();try{if(0==J.length){J=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=W.x;J[0].geometry.y=W.y;null!=H&&e(J[0],H,M,N,d);V=J;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,J);var T=d.getCurrentCellStyle(J[0]);"image"!=T[mxConstants.STYLE_SHAPE]&&
+"label"!=T[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=E&&null!=F)for(D=0;D<J.length;D++){var O=J[D];if("0"!=d.getCurrentCellStyle(O).expand){var fa=d.getModel().getGeometry(O);null!=fa&&(fa=fa.clone(),fa.width=E,fa.height=F,d.getModel().setGeometry(O,fa))}null!=H&&e(O,H,M,N,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),
+d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,y)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],y=u[mxConstants.STYLE_SHAPE];w&&"image"==y&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(A,D,E){e(k,A,D,E,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",
mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?
(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+
@@ -3691,20 +3692,20 @@ w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=
b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{h?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{h?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{h?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",
mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var E=!1;if(null!=y){w=d.getParentByName(y,"TR");var D=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+D);D=Math.min(20,y.cellIndex+D);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<D;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
-1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],D=0;D<H.cells.length;D++)M=H.cells[D],F==w.sectionRowIndex&&D==y.cellIndex&&(E="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&D<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return E}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,E,D){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
-A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<E;N++){M.push("<tr>");for(var J=0;J<D;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");E=M.join("");F.call(H,E);E=d.cellEditor.textarea.getElementsByTagName("table");if(E.length==A.length+1)for(H=E.length-1;0<=H;H--)if(0==H||E[H]!=A[H-1]){d.selectNode(E[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("geToolbarMenu"),a.labels=!1);a=a.addItem("",null,null,
+Menus.prototype.addInsertTableItem=function(a,b,e,f){function g(A){y=d.getParentByName(mxEvent.getSource(A),"TD");var D=!1;if(null!=y){w=d.getParentByName(y,"TR");var E=mxEvent.isMouseEvent(A)?2:4,F=k,H=Math.min(20,w.sectionRowIndex+E);E=Math.min(20,y.cellIndex+E);for(var M=F.rows.length;M<H;M++)for(var N=F.insertRow(M),J=0;J<F.rows[0].cells.length;J++)N.insertCell(-1);for(M=0;M<F.rows.length;M++)for(N=F.rows[M],J=N.cells.length;J<E;J++)N.insertCell(-1);u.innerHTML=y.cellIndex+1+"x"+(w.sectionRowIndex+
+1);for(F=0;F<k.rows.length;F++)for(H=k.rows[F],E=0;E<H.cells.length;E++)M=H.cells[E],F==w.sectionRowIndex&&E==y.cellIndex&&(D="blue"==M.style.backgroundColor),M.style.backgroundColor=F<=w.sectionRowIndex&&E<=y.cellIndex?"blue":"transparent"}mxEvent.consume(A);return D}f=null!=f?f:!0;var d=this.editorUi.editor.graph;b=null!=b?b:mxUtils.bind(this,function(A,D,E){if(null!=d.getParentByName(mxEvent.getSource(A),"TD")&&null!=d.cellEditor.textarea){var F=d.cellEditor.textarea.getElementsByTagName("table");
+A=[];for(var H=0;H<F.length;H++)A.push(F[H]);d.container.focus();H=d;F=H.pasteHtmlAtCaret;for(var M=["<table>"],N=0;N<D;N++){M.push("<tr>");for(var J=0;J<E;J++)M.push("<td><br></td>");M.push("</tr>")}M.push("</table>");D=M.join("");F.call(H,D);D=d.cellEditor.textarea.getElementsByTagName("table");if(D.length==A.length+1)for(H=D.length-1;0<=H;H--)if(0==H||D[H]!=A[H-1]){d.selectNode(D[H].rows[0].cells[0]);break}}});null==e&&(a.div.classList.add("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<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var h=document.createElement("input");h.setAttribute("id","geTitleOption");h.setAttribute("type","checkbox");h.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,
null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(h,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");m.style.verticalAlign="middle";var p=document.createElement("label");mxUtils.write(p,mxResources.get("container"));p.setAttribute("for","geContainerOption");p.style.verticalAlign="middle";mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,
-function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse="collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";
-D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=D.insertRow(F),M=0;M<E;M++)H.insertCell(-1);return D}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var E=g(A);null!=y&&null!=w&&E&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
+function(A){mxEvent.consume(A)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(A){mxEvent.consume(A)}));f&&(a.firstChild.appendChild(h),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(p),mxUtils.br(a.firstChild));var k=function(A,D){var E=document.createElement("table");E.className="geInsertTablePicker";E.setAttribute("border","1");E.style.borderCollapse="collapse";E.style.borderStyle="solid";E.style.marginBottom="4px";
+E.style.marginTop="8px";E.setAttribute("cellPadding","8");for(var F=0;F<A;F++)for(var H=E.insertRow(F),M=0;M<D;M++)H.insertCell(-1);return E}(5,5);a.firstChild.appendChild(k);var u=document.createElement("div");u.style.textAlign="center";u.style.padding="4px";u.style.width="100%";u.innerHTML="1x1";a.firstChild.appendChild(u);var w=null,y=null;mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(A){var D=g(A);null!=y&&null!=w&&D&&(b(A,w.sectionRowIndex+1,y.cellIndex+1,h.checked,m.checked),
window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(k,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+Menus.prototype.edgeStyleChange=function(a,b,e,f,g,d,h,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var y=k[w];if(p.getModel().isEdge(y)){if(h){var A=p.getCellGeometry(y);null!=A&&(A=A.clone(),A.points=null,p.getModel().setGeometry(y,A))}for(var D=0;D<e.length;D++)p.setCellStyles(e[D],f[D],[y]);u.push(y)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
"cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
Menus.prototype.styleChange=function(a,b,e,f,g,d,h,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var w=this.editorUi.editor.graph;null!=h&&w.cellEditor.isContentEditing()?h():u(m)}),d,g);p&&this.showIconOnly(a);return a};
Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(e){var f=this.editorUi.editor.graph;f.stopEditing(!1);f.getModel().beginUpdate();try{for(var g=f.getEditableCells(f.getSelectionCells()),d=!1,h=0;h<a.length;h++)if(f.setCellStyles(a[h],b[h],g),a[h]==mxConstants.STYLE_ALIGN&&f.updateLabelElements(g,function(m){m.removeAttribute("align");m.style.textAlign=null}),a[h]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[h])d=!0;if(d)for(d=0;d<g.length;d++)0==f.model.getChildCount(g[d])&&
f.autoSizeCell(g[d],!1);null!=e&&e();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{f.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
+Menus.prototype.promptChange=function(a,b,e,f,g,d,h,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,y=u.getView().getState(u.getSelectionCell());null!=y&&(w=y.style[g]||w);var A=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(D){if(null!=D&&0<D.length){if(A){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(g,D)}finally{u.getModel().endUpdate()}}null!=m&&m(D)}}),mxResources.get("enterValue")+
(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(w.container,300,80,!0,!0);w.init()}),d,p,h)};
Menus.prototype.pickColor=function(a,b,e,f,g,d){this.editorUi.tryAndHandle(mxUtils.bind(this,function(){var h=this.editorUi.editor.graph;if(null!=b&&h.cellEditor.isContentEditing()){var m=h.getSelectedEditingElement();null!=m&&null!=h.cellEditor.textarea&&(m=h.getTextColor(m,"forecolor"==b),this.editorUi.pickColor(m,mxUtils.bind(this,function(k){null!=h.cellEditor.textarea&&(Graph.setTextColor(h.cellEditor.textarea,k,"forecolor"==b),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
["forecolor"==b?mxConstants.STYLE_FONTCOLOR:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[k],"cells",[h.cellEditor.getEditingCell()])))}),f,g,d))}else{var p=h.getCellStyle(h.getSelectionCell(),!1);m=mxConstants.NONE;null!=p&&(m=p[a]||m);this.editorUi.pickColor(m,ColorDialog.createApplyFunction(this.editorUi,a),f,g,d)}}))};
@@ -3745,50 +3746,50 @@ p.addItem("",Editor.removeFormatImage,mxUtils.bind(this,function(){document.exec
!1,null)}))})),null,Editor.plusImage);h.setAttribute("data-min-width",700);this.addSeparator(null,700);var m=this.addMenu(new Menu(mxUtils.bind(this,function(p){var k=b.getSelectedElement(),u=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),w=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==w)this.editorUi.menus.addInsertTableItem(p);else{var y=b.getParentByName(w,"TABLE",b.cellEditor.text2);k=p.addItem("",Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,
null!=u?u.cellIndex:0))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnBefore"));k=p.addItem("",Editor.addColumnRightImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(y,null!=u?u.cellIndex+1:-1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertColumnAfter"));k=p.addItem("Delete column",Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=u)try{b.deleteColumn(y,u.cellIndex)}catch(A){this.editorUi.handleError(A)}}));
k.setAttribute("title",mxResources.get("deleteColumn"));k=p.addItem("",Editor.addRowAboveImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowBefore"));k=p.addItem("",Editor.addRowBelowImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(y,w.sectionRowIndex+1))}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("insertRowAfter"));k=p.addItem("",
-Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
-function(E){null==E||E==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+E,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(E,D,F,H){return"#"+("0"+Number(D).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
-("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(E){y.style.backgroundColor=null==E||E==mxConstants.NONE?"":E})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(E){null!=E&&0<E.length?y.setAttribute("cellPadding",E):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(y,w.sectionRowIndex)}catch(A){this.editorUi.handleError(A)}}));k.setAttribute("title",mxResources.get("deleteRow"));k=p.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var A=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,
+function(D){null==D||D==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+D,y.style.borderCollapse="collapse")})}));k.setAttribute("title",mxResources.get("borderColor"));k=p.addItem("",Editor.fillColorImage,mxUtils.bind(this,function(){var A=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(D,E,F,H){return"#"+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)+
+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(D){y.style.backgroundColor=null==D||D==mxConstants.NONE?"":D})}));k.setAttribute("title",mxResources.get("backgroundColor"));k=p.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var A=y.getAttribute("cellPadding")||0;A=new FilenameDialog(this.editorUi,A,mxResources.get("apply"),mxUtils.bind(this,function(D){null!=D&&0<D.length?y.setAttribute("cellPadding",D):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));
this.editorUi.showDialog(A.container,300,80,!0,!0);A.init()}));k.setAttribute("title",mxResources.get("spacing"));k=p.addItem("",Editor.alignLeftImage,mxUtils.bind(this,function(){y.setAttribute("align","left")}));k.setAttribute("title",mxResources.get("left"));k=p.addItem("",Editor.alignCenterImage,mxUtils.bind(this,function(){y.setAttribute("align","center")}));k.setAttribute("title",mxResources.get("center"));k=p.addItem("",Editor.alignRightImage,mxUtils.bind(this,function(){y.setAttribute("align",
"right")}));k.setAttribute("title",mxResources.get("right"))}})),null,Editor.tableImage);m.setAttribute("data-min-width",740);this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){e.innerText=mxResources.get("style");d.setAttribute("title",mxResources.get("format"));e.setAttribute("title",mxResources.get("style"));f.setAttribute("title",mxResources.get("fontFamily"));g.setAttribute("title",mxResources.get("fontSize"));h.setAttribute("title",mxResources.get("insert"));m.setAttribute("title",
mxResources.get("table"))}))};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.setMenuText=function(a,b){a.getElementsByTagName("span")[0].innerText=b};Toolbar.prototype.setMenuIcon=function(a,b){a.style.backgroundImage="url("+b+")"};
Toolbar.prototype.addMenu=function(a,b,e,f){var g=this.editorUi.createMenuElement("",a.funct);this.editorUi.menus.menuCreated(a,g,"geButton");null!=e?g.style.backgroundImage="url("+e+")":null!=b&&(a=document.createElement("span"),mxUtils.write(a,b),g.appendChild(a));f=null!=f?f:this.container;f.appendChild(g);return g};
Toolbar.prototype.addSeparator=function(a,b){a=null!=a?a:this.container;var e=document.createElement("div");e.className="geSeparator";a.appendChild(e);null!=b&&e.setAttribute("data-min-width",b);return e};Toolbar.prototype.addItems=function(a,b,e,f,g){for(var d=[],h=0;h<a.length;h++){var m=a[h];"-"==m?d.push(this.addSeparator(b,g)):(m=this.addItem(null!=f?f[h]:null,m,b,e),d.push(m),null!=g&&m.setAttribute("data-min-width",g))}return d};
Toolbar.prototype.addItem=function(a,b,e){var f=this.editorUi.actions.get(b),g=null;null!=f&&(g=this.editorUi.addButton(a,"",f.funct,null!=e?e:this.container),this.editorUi.dependsOnLanguage(mxUtils.bind(this,function(){var d=f.getTitle();null!=f.shortcut&&(d+=" ("+f.shortcut+")");g.setAttribute("title",d)})),a=mxUtils.bind(this,function(){f.enabled?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}),f.addListener("stateChanged",a),a());return g};
-Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(D,F,H){if(null==D)return[H,H,H];var M=Math.floor(D),
-N=H*(1-F);D=H*(1-F*(M%2?D-M:1-(D-M)));switch(M){case 6:case 0:return[H,D,N];case 1:return[D,H,N];case 2:return[N,H,D];case 3:return[N,D,H];case 4:return[D,N,H];case 5:return[H,N,D]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
+Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,F,H){if(null==E)return[H,H,H];var M=Math.floor(E),
+N=H*(1-F);E=H*(1-F*(M%2?E-M:1-(E-M)));switch(M){case 6:case 0:return[H,E,N];case 1:return[E,H,N];case 2:return[N,H,E];case 3:return[N,E,H];case 4:return[E,N,H];case 5:return[H,N,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var g=[0,0,1],d=1;e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position=
-"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(D){var F=Math.round(100*(1-g[1]));f.style.left=
-Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";E.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
-"");1!=D&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(D){0==g[2]&&(g[2]=1);m=!0;y(D)}),w=mxUtils.bind(this,function(D){p=!0;y(D)}),y=mxUtils.bind(this,function(D){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(D)-F.left;D=mxEvent.getClientY(D)-F.top;f.style.left=H-8+"px";f.style.top=D-8+"px";H*=6/180;D=1-D/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>D&&(D=0);1<D&&(D=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==D?g[1]:g[1]=
-D,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),D=mxEvent.getClientY(D)-F.top,g[2]=Math.max(Math.min(1,1-D/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
-null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var E=document.createElement("div");E.style.background="url("+this.arrowImage+")";E.style.position="absolute";E.style.pointerEvents="none";E.style.width="7px";E.style.height="11px";E.style.left="2px";E.style.top="-3px";sliderBox.appendChild(E);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(D,
-F){F=null!=F?F:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",F=!0;D=mxUtils.parseColor(D);var H=D.r/255,M=D.g/255,N=D.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=D.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
+"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var h=document.createElement("div");h.style.border="1px solid light-dark(black, white)";h.style.pointerEvents="none";h.style.overflow="hidden";h.style.position="absolute";h.style.width="16px";h.style.height="101px";h.style.left="9px";h.style.top="0px";var m=!1,p=!1,k=mxUtils.bind(this,function(E){var F=Math.round(100*(1-g[1]));f.style.left=
+Math.round(g[0]/6*180)-8+"px";f.style.top=F-8+"px";F=h.childNodes;var H=a(g[0],g[1],1);if(null!=H){for(var M=0;M<F.length;M++)F[M].style.backgroundColor="rgb("+H[0]*(1-M/F.length)*255+", "+H[1]*(1-M/F.length)*255+", "+H[2]*(1-M/F.length)*255+")";D.style.top=Math.round(100*(1-g[2]))-4+"px";F=a(g[0],g[1],g[2]);F="#"+("0"+Math.round(255*F[0]).toString(16)).slice(-2)+("0"+Math.round(255*F[1]).toString(16)).slice(-2)+("0"+Math.round(255*F[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):
+"");1!=E&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(F)))}}),u=mxUtils.bind(this,function(E){0==g[2]&&(g[2]=1);m=!0;y(E)}),w=mxUtils.bind(this,function(E){p=!0;y(E)}),y=mxUtils.bind(this,function(E){if(m){var F=e.getBoundingClientRect(),H=mxEvent.getClientX(E)-F.left;E=mxEvent.getClientY(E)-F.top;f.style.left=H-8+"px";f.style.top=E-8+"px";H*=6/180;E=1-E/100;F=void 0;0>H&&(H=0);6<H&&(H=6);0>E&&(E=0);1<E&&(E=1);0>F&&(F=0);1<F&&(F=1);H=a(null==H?g[0]:g[0]=H,null==E?g[1]:g[1]=
+E,null==F?g[2]:g[2]=F);this.fromString("#"+("0"+Math.floor(255*H[0]).toString(16)).slice(-2)+("0"+Math.floor(255*H[1]).toString(16)).slice(-2)+("0"+Math.floor(255*H[2]).toString(16)).slice(-2)+(1>d?("0"+Math.round(255*d).toString(16)).slice(-2):""))}else p&&(F=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-F.top,g[2]=Math.max(Math.min(1,1-E/100),0),k())}),A=mxUtils.bind(this,function(){m=p=!1});mxEvent.addGestureListeners(e,u);mxEvent.addGestureListeners(sliderBox,w);mxEvent.addGestureListeners(b,
+null,y,A);mxEvent.addListener(b,"mouseleave",A);for(u=0;101>u;u+=4)w=document.createElement("div"),w.style.height="4px",w.style.pointerEvents="none",h.appendChild(w);b.appendChild(h);var D=document.createElement("div");D.style.background="url("+this.arrowImage+")";D.style.position="absolute";D.style.pointerEvents="none";D.style.width="7px";D.style.height="11px";D.style.left="2px";D.style.top="-3px";sliderBox.appendChild(D);sliderBox.appendChild(h);b.appendChild(sliderBox);this.fromString=function(E,
+F){F=null!=F?F:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",F=!0;E=mxUtils.parseColor(E);var H=E.r/255,M=E.g/255,N=E.b/255,J=Math.min(Math.min(H,M),N);var V=Math.max(Math.max(H,M),N);var W=V-J;0===W?V=[null,0,V]:(H=H===J?3+(N-M)/W:M===J?5+(H-N)/W:1+(M-H)/W,V=[6===H?0:H,W/V,V]);null!=V[0]&&(g[0]=V[0]);0!=V[2]&&(g[1]=V[1]);g[2]=V[2];d=E.a;k(F)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
var ColorDialog=function(a,b,e,f,g,d,h){function m(da){return mxUtils.color2hex("#"+da).substring(1).toUpperCase()}function p(){Y.src="none"==aa.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(da,ma){da||"none"==aa.style.display?(aa.style.display="flex",!1!==ma&&O.focus()):aa.style.display="none";p()}function u(da){""==da.value&&null!=N&&V?da.style.background=da==O?N.dark:N.light:""==da.value||da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)?da.style.background="transparent":
da.style.background="#"+da.value;da.style.color="transparent"==da.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(da.style.background)?"#ffffff":"#000000"}function w(){u(W);u(O)}function y(da){V!=da&&(da?h&&null!=N?(W.value=N.light.substring(1).toUpperCase(),da=!1):(W.value="",O.value="",fa.value="automatic",W.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),O.setAttribute("title",mxResources.get("useBlackAndWhite")),W.setAttribute("title",mxResources.get("useBlackAndWhite"))):
(""==W.value&&null!=N&&(W.value=N.light.substring(1).toUpperCase()),W.removeAttribute("placeholder"),W.removeAttribute("title"),""==O.value&&null!=N&&(O.style.background=N.dark,da=mxUtils.getCurrentStyle(O),O.value=mxUtils.rgba2hex(da.backgroundColor).substring(1).toUpperCase()),O.removeAttribute("placeholder"),O.removeAttribute("title"),da=!1));V=da}function A(da){"#"==da.value.charAt(0)&&(da.value=da.value.substring(1));var ma=da.value,Ia=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ia&&"default"!=
Ia&&Ia!=mxResources.get("default").toLowerCase()&&Ia!=mxResources.get("automatic").toLowerCase()||null==N?(da.value==mxConstants.NONE||mxUtils.isVarColor(da.value)||(da.value=m(da.value),ia.fromString("#"+da.value)),y(!1),da!=O||W.value==mxConstants.NONE&&O.value==mxConstants.NONE||(fa.value="custom"),da==W&&"automatic"==fa.value&&(W.value==mxConstants.NONE?O.value=mxConstants.NONE:mxUtils.isVarColor(W.value)?O.value=W.value:O.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+da.value)).substring(1).toUpperCase()),
-w()):U.click()}function E(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
-12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||
-window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),E())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
+w()):U.click()}function D(){var da=W.value,ma=O.value;if(V&&null!=N||(/(^#?[a-zA-Z0-9]*$)/.test(da)||mxUtils.isVarColor(da))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)da="default";else if(""==da&&(da=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),da==mxConstants.NONE||mxUtils.isVarColor(da)||"#"==da.charAt(0)||(da="#"+m(da)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),da!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,
+12),"automatic"!=fa.value&&ma!=mxConstants.NONE?da==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),12):ColorDialog.addRecentColor("light-dark("+da+","+ma+")",12):da!=mxConstants.NONE&&ColorDialog.addRecentColor(da.substring(1),12),"none"!=da||"none"!=ma)da=da==mxConstants.NONE?"transparent":da,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==fa.value||(da="light-dark("+da+","+ma+")");X(da);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||
+window.setTimeout(function(){ja.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)},0)}function F(){ja.value!=mxConstants.NONE&&""!=ja.value&&ia.fromString("#"+ja.value,!0)}function H(){var da=ca(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);da.style.marginBottom="8px";return da}function M(da){13==da.keyCode&&(A(mxEvent.getSource(da)),D())}var N=null!=d?mxUtils.getLightDarkColor(d,null,null,
h):null,J=a.editor.graph;this.editorUi=a;var V=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var W=document.createElement("input");W.style.textOverflow="ellipsis";W.style.margin="0 0 0 4px";W.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var T=document.createElement("div");T.style.display="flex";T.style.alignItems="center";d.appendChild(T);
var O=document.createElement("input");O.style.textOverflow="ellipsis";O.style.margin="0 4px";O.style.maxWidth="70px";O.style.width="100%";var fa=document.createElement("select");fa.style.textOverflow="ellipsis";fa.style.width="100%";var S=document.createElement("option");S.setAttribute("value","automatic");mxUtils.write(S,mxResources.get("automatic"));fa.appendChild(S);S=document.createElement("option");S.setAttribute("value","custom");mxUtils.write(S,mxResources.get("userDefined"));fa.appendChild(S);
fa.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var aa=document.createElement("div");aa.style.padding="0 6px 0 6px";S=document.createElement("img");S.setAttribute("title",mxResources.get("dark"));S.className="geAdaptiveAsset";S.src=Editor.thinDarkImage;S.style.width="20px";aa.appendChild(S);mxEvent.addListener(S,"click",function(){O.focus()});aa.appendChild(O);aa.appendChild(fa);aa.style.display="flex";aa.style.alignItems="center";S=document.createElement("div");S.style.display="flex";S.style.alignItems=
"center";S.style.userSelect="none";S.style.cursor="pointer";S.style.padding="2px 0 2px 0";var Y=document.createElement("img");Y.setAttribute("title",mxResources.get("dark"));Y.className="geAdaptiveAsset";Y.style.marginLeft="-2px";S.appendChild(Y);mxUtils.write(S,mxResources.get("advanced"));var ba=document.createElement("img");ba.setAttribute("title",mxResources.get("swap"));ba.className="geAdaptiveAsset";ba.style.marginLeft="6px";ba.style.width="16px";ba.style.height="16px";ba.style.cursor="pointer";
ba.src=Editor.swapImage;mxEvent.addListener(ba,"click",function(da){k(!0,!1);fa.value="custom";y(!1);var ma=W.value;W.value=O.value;O.value=ma;w();ja.focus();mxEvent.consume(da)});S.appendChild(ba);var L=ba.cloneNode();L.setAttribute("title",mxResources.get("copy"));L.style.marginLeft="2px";L.src=Editor.doubleArrowUpImage;mxEvent.addListener(L,"click",function(da){k(!0,!1);fa.value="custom";y(!1);ja==O?W.value=O.value:O.value=W.value;w();ja.focus();mxEvent.consume(da)});S.appendChild(L);ba=L.cloneNode();
ba.setAttribute("title",mxResources.get("opacity"));ba.src=Editor.opacityImage;mxEvent.addListener(ba,"click",function(da){var ma=mxUtils.parseColor("#"+ja.value);ma=String(Math.floor(Math.max(0,Math.min(100*ma.a,100))));a.prompt(mxResources.get("opacity")+" (0-100)",ma,function(Ia){!isNaN(Ia)&&""!==Ia&&0<=Ia&&100>=Ia&&(y(!1),W.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+W.value,Ia/100,!0)).substring(1).toUpperCase(),O.value=mxUtils.rgba2hex(mxUtils.addAlphaToColor("#"+O.value,Ia/100,!0)).substring(1).toUpperCase(),
-w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),D());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
-var X=null!=e?e:this.createApplyFunction();this.init=function(){D()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
+w(),ja.focus())});mxEvent.consume(da)});S.appendChild(ba);p();mxEvent.addListener(S,"click",function(){k();p();ColorDialog.collapsed="none"==aa.style.display});var U=mxUtils.button("",function(){y(!0);w();ja.focus();""==ja.value&&null!=N&&V&&ia.fromString(ja==O?N.dark:N.light,!0)});mxEvent.addListener(fa,"change",function(da){"automatic"==fa.value?(W.focus(),A(W)):(y(!1),O.focus(),E());w();mxEvent.consume(da)});mxEvent.addListener(W,"change",function(){A(W)});mxEvent.addListener(O,"change",function(){A(O)});
+var X=null!=e?e:this.createApplyFunction();this.init=function(){E()};var ia=new ColorPicker,ja=Editor.isDarkMode()&&("auto"==J.getAdaptiveColors()||"simple"==J.getAdaptiveColors()&&"custom"==fa.value)&&!h?O:W;mxEvent.addListener(W,"focus",function(){ja=W;F();L.src=Editor.doubleArrowDownImage});mxEvent.addListener(O,"focus",function(){ja=O;F();L.src=Editor.doubleArrowUpImage});ia.addListener("change",function(da,ma){da=ma.getProperty("color").substring(1).toUpperCase();ja.value.toUpperCase()!=da&&
(ja.value=da,A(ja),window.setTimeout(function(){ja.focus()},0))});e=document.createElement("div");e.appendChild(ia.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var ca=mxUtils.bind(this,function(da,ma,Ia,oa){ma=null!=ma?ma:12;var za=document.createElement("table");za.style.borderCollapse="collapse";za.setAttribute("cellspacing","0");za.style.marginBottom="20px";za.style.cellSpacing="0px";za.style.marginLeft=
"1px";var Aa=document.createElement("tbody");za.appendChild(Aa);for(var Ma=da.length/ma,Pa=0;Pa<Ma;Pa++){for(var Ka=document.createElement("tr"),Ja=0;Ja<ma;Ja++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ia);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(ra)){var Wa=
mxUtils.getLightDarkColor(ra);Da.style.background="linear-gradient(to right bottom, "+Wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(Wa).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Wa=this.colorNames[String(ra).toUpperCase()];null!=Wa&&Da.setAttribute("title",Wa)}Ka.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ja==O&&O.value==mxConstants.NONE?W.value=mxConstants.NONE:ja.value=mxConstants.NONE;if(ja==W||ja==O&&
-W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",E))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
+W.value==mxConstants.NONE)fa.value="automatic";A(ja);window.setTimeout(function(){ja.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);fa.value="custom";var Xa=mxUtils.getLightDarkColor(ra);W.value=Xa.light.substring(1).toUpperCase();O.value=Xa.dark.substring(1).toUpperCase();A(W);A(O);ja==W?ia.fromString(Xa.light):ia.fromString(Xa.dark)}else ia.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(da[Pa*ma+Ja]);Aa.appendChild(Ka)}oa&&(da=document.createElement("td"),da.setAttribute("title",
mxResources.get("reset")),da.className="geAdaptiveAsset",da.style.border="1px solid black",da.style.padding="0px",da.style.width="16px",da.style.height="16px",da.style.backgroundImage="url('"+Editor.crossImage+"')",da.style.backgroundPosition="center center",da.style.backgroundSize="14px 14px",da.style.backgroundRepeat="no-repeat",da.style.cursor="pointer",Ka.appendChild(da),mxEvent.addListener(da,"click",function(){ColorDialog.resetRecentColors();za.parentNode.replaceChild(H(),za)}));ta.appendChild(za);
return za});h||(d.appendChild(S),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==J.getAdaptiveColors()||"automatic"!=fa.value||(aa.style.display="none",p()),S=document.createElement("img"),S.setAttribute("title",mxResources.get("light")),S.className="geAdaptiveAsset",S.src=Editor.thinLightImage,S.style.width="20px",T.appendChild(S),mxEvent.addListener(S,"click",function(){W.focus()}));T.appendChild(W);null!=N&&(U.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),U.style.cursor=
"pointer",U.style.position="relative",U.style.marginLeft="4px",U.innerText="",J=document.createElement("div"),J.style.display="inline-block",J.style.verticalAlign="middle",J.style.borderStyle="solid",J.style.borderWidth="1px",J.style.marginTop="-2px",J.style.width="12px",J.style.height="12px",h?J.style.backgroundColor=N.light:J.style.backgroundImage="linear-gradient(to right bottom, "+N.cssText+" 50%, "+mxUtils.invertLightDarkColor(N).cssText+" 50.3%)",U.appendChild(J),T.appendChild(U),mxEvent.addListener(U,
-"dblclick",E));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
+"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";T.appendChild(P);J=mxUtils.button("",function(){document.activeElement==P?W.focus():(P.value="#"+W.value,P.click())});J.style.cursor="pointer";S=document.createElement("img");S.src=Editor.colorDropperImage;S.className="geAdaptiveAsset";S.style.position=
"relative";S.style.verticalAlign="middle";S.style.marginTop="-2px";S.style.width="auto";S.style.height="14px";J.appendChild(S);T.appendChild(J);e.appendChild(d);mxEvent.addListener(P,"change",function(){ia.fromString(P.value)});h||e.appendChild(aa);H();d=ca(this.presetColors);d.style.marginBottom="8px";d=ca(this.defaultColors);d.style.marginBottom="16px";e.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
-"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),E);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
+"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});T.className="geBtn";a.editor.cancelFirst&&d.appendChild(T);J=mxUtils.button(mxResources.get("apply"),D);J.className="geBtn gePrimaryBtn";d.appendChild(J);a.editor.cancelFirst||d.appendChild(T);null!=b&&("default"==b?U.click():(T=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==T.light?W.value=mxConstants.NONE:
mxUtils.isVarColor(T.light)?W.value=T.light:(mxUtils.isRgbColor(T.light)?T.light=mxUtils.rgba2hex(T.light):mxUtils.isHexColor(T.light)||(T.light="#"+m(T.light)),W.value=T.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==T.dark?O.value=mxConstants.NONE:mxUtils.isVarColor(T.dark)?O.value=T.dark:(mxUtils.isRgbColor(T.dark)?T.dark=mxUtils.rgba2hex(T.dark):mxUtils.isHexColor(T.dark)||(T.dark="#"+m(T.dark)),O.value=T.dark.substring(1).toUpperCase()),F(),w()));h||!ColorDialog.collapsed||
"automatic"!=fa.value||Editor.isDarkMode()||(aa.style.display="none",p());e.appendChild(d);this.picker=ia;this.colorInput=W;mxEvent.addListener(W,"keypress",M);mxEvent.addListener(O,"keypress",M);mxEvent.addListener(e,"keydown",function(da){27==da.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(da))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
@@ -3798,45 +3799,45 @@ var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("
"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},SimpleTextareaDialog=function(a,b,e,f,g){var d=document.createElement("div"),h=document.createElement("textarea");h.style.position="absolute";h.style.left="30px";h.style.right="30px";h.style.top="30px";h.style.bottom="100px";
h.style.resize="none";h.setAttribute("wrap","off");h.setAttribute("spellcheck","false");h.setAttribute("autocorrect","off");h.setAttribute("autocomplete","off");h.setAttribute("autocapitalize","off");h.value=null!=b?b:"";d.appendChild(h);b=document.createElement("div");b.style.position="absolute";b.style.bottom="46px";b.style.right="30px";b.style.left="30px";b.style.justifyContent="end";b.style.display="flex";null==g||a.isOffline()||b.appendChild(a.createHelpIcon(g));g=mxUtils.button(mxResources.get("cancel"),
function(){a.hideDialog()});g.setAttribute("title","Escape");g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var m=mxUtils.button(null!=f?f:mxResources.get("apply"),function(){a.hideDialog();e(h.value)});m.setAttribute("title","Ctrl+Enter");m.className="geBtn gePrimaryBtn";b.appendChild(m);mxEvent.addListener(h,"keydown",function(p){13==p.keyCode&&mxEvent.isControlDown(p)&&m.click()});a.editor.cancelFirst||b.appendChild(g);this.init=function(){h.focus();h.scrollTop=0};d.appendChild(b);
-this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,E){k=null!=k?k:!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";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
-F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(D);h.appendChild(F);null!=E&&m.appendChild(E);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
-"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};D.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
+this.container=d},TextareaDialog=function(a,b,e,f,g,d,h,m,p,k,u,w,y,A,D){k=null!=k?k:!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";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),F=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";F.style.display="flex";F.style.whiteSpace="nowrap";
+F.style.alignItems="center";F.style.justifyContent="end";F.style.bottom="10px";F.style.height="50px";F.style.textAlign="right";F.style.paddingTop="14px";F.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(F);null!=D&&m.appendChild(D);var H=document.createElement("textarea");u?H.setAttribute("wrap","off"):H.style.wordBreak="break-all";H.setAttribute("spellcheck","false");H.setAttribute("autocorrect","off");H.setAttribute("autocomplete","off");H.setAttribute("autocapitalize",
+"off");mxUtils.write(H,e||"");H.style.resize="none";H.style.outline="none";H.style.position="absolute";H.style.boxSizing="border-box";H.style.top="0px";H.style.left="0px";H.style.height="100%";H.style.width="100%";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};E.appendChild(H);null==y||a.isOffline()||F.appendChild(a.createHelpIcon(y));if(null!=A)for(b=0;b<A.length;b++)(function(N,J,V){N=mxUtils.button(N,function(W){J(W,H)});null!=V&&N.setAttribute("title",V);N.className="geBtn";F.appendChild(N)})(A[b][0],
A[b][1],A[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&F.appendChild(d);null!=p&&p(F,H);if(null!=f){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(H.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";F.appendChild(M);mxEvent.addListener(H,"keydown",function(N){13==N.keyCode&&mxEvent.isControlDown(N)&&M.click()})}a.editor.cancelFirst||
F.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.position="absolute";b.style.inset="10px";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.overflow="auto";e.style.resize="none";e.style.position="absolute";e.style.top="20px";e.style.bottom="76px";e.style.left="20px";
e.style.right="20px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(p){p.stopPropagation();p.preventDefault()},!1),e.addEventListener("drop",function(p){p.stopPropagation();p.preventDefault();if(0<p.dataTransfer.files.length){p=p.dataTransfer.files[0];var k=new FileReader;k.onload=function(u){e.value=u.target.result};k.readAsText(p)}else e.value=a.extractGraphModelFromEvent(p)},
!1));var g=document.createElement("div");g.style.display="flex";g.style.whiteSpace="nowrap";g.style.alignItems="center";g.style.justifyContent="end";g.style.position="absolute";g.style.height="36px";g.style.bottom="24px";g.style.left="20px";g.style.right="20px";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&g.appendChild(d);var h=document.createElement("select");h.style.textOverflow="ellipsis";h.style.width="196px";h.className=
"geBtn";if(a.editor.graph.isEnabled()){var m=document.createElement("option");m.setAttribute("value","apply");mxUtils.write(m,mxResources.get("apply",null,"Update Existing Drawing"));h.appendChild(m)}a.editor.graph.isEnabled()&&(m=document.createElement("option"),m.setAttribute("value","insert"),mxUtils.write(m,mxResources.get("insert")),h.appendChild(m));m=document.createElement("option");m.setAttribute("value","new");mxUtils.write(m,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&
!navigator.standalone&&h.appendChild(m);g.appendChild(h);m=mxUtils.button(mxResources.get("ok"),function(){var p=Graph.zapGremlins(mxUtils.trim(e.value)),k=null;if("new"==h.value)a.hideDialog(),a.editor.editAsNew(p);else if("apply"==h.value)try{var u=mxUtils.parseXml(p).documentElement,w=Editor.extractParserError(u,mxResources.get("unknownError"));w?(EditorUi.debug("EditDiagramDialogParserError",[this],"node",[u],"cause",[w]),k=mxResources.get("invalidInput")+" ("+w+")"):("mxfile"==u.nodeName?a.editor.setGraphXml(u):
-a.updateDiagramData(f,u),a.hideDialog())}catch(D){k=D}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var E=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(E));a.hideDialog()}catch(D){k=D}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
+a.updateDiagramData(f,u),a.hideDialog())}catch(E){k=E}else if("insert"==h.value){a.editor.graph.model.beginUpdate();try{var y=mxUtils.parseXml(p),A=new mxGraphModel;(new mxCodec(y)).decode(y.documentElement,A);var D=A.getChildren(A.getChildAt(A.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(D));a.hideDialog()}catch(E){k=E}finally{a.editor.graph.model.endUpdate()}}null!=k&&a.handleError(k)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(d);
b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),E.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),E.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
-"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(D.removeAttribute("disabled"),F.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*E.value>MAX_AREA||0>=A.value?"red":"";E.style.backgroundColor=A.value*E.value>MAX_AREA||0>=E.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 T=u.value,O=T.lastIndexOf(".");u.value=0<O?T.substring(0,O+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),A.setAttribute("disabled","true"),D.setAttribute("disabled","true"),J.setAttribute("disabled","true")):(y.removeAttribute("disabled"),A.removeAttribute("disabled"),D.removeAttribute("disabled"),J.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled",
+"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),F.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))}function e(){A.style.backgroundColor=A.value*D.value>MAX_AREA||0>=A.value?"red":"";D.style.backgroundColor=A.value*D.value>MAX_AREA||0>=D.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
d),m=Math.ceil(g.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);g.appendChild(k);
p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));w.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));w.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),w.appendChild(k));k=document.createElement("td");k.appendChild(w);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");
k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");g.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value","100");y.style.width="180px";k=document.createElement("td");k.appendChild(y);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");g.appendChild(k);var A=document.createElement("input");
-A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
-k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);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 H=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
-"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(D);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
+A.setAttribute("value",h);A.style.width="180px";k=document.createElement("td");k.appendChild(A);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var D=document.createElement("input");D.setAttribute("value",m);D.style.width="180px";k=document.createElement("td");k.appendChild(D);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
+k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var E=document.createElement("select");E.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");E.appendChild(k);k=document.createElement("option");
+k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));E.appendChild(k);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 H=!1;mxEvent.addListener(E,"change",function(){"custom"==this.value?(this.style.display="none",F.style.display=
+"",F.focus()):(F.value=this.value,H||(y.value=this.value))});mxEvent.addListener(F,"change",function(){var T=parseInt(F.value);isNaN(T)||0>=T?F.style.backgroundColor="red":(F.style.backgroundColor="",H||(y.value=T))});k=document.createElement("td");k.appendChild(E);k.appendChild(F);g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var M=document.createElement("input");
M.setAttribute("type","checkbox");M.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(M);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=!1;k=document.createElement("td");k.appendChild(N);
g.appendChild(k);p.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var J=document.createElement("input");J.setAttribute("type","number");J.setAttribute("value",ExportDialog.lastBorderValue);J.style.width="180px";k=document.createElement("td");k.appendChild(J);g.appendChild(k);p.appendChild(g);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(y,"change",
-function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),E.value=Math.floor(m*T)):(y.value="100",A.value=h,E.value=m);e()});mxEvent.addListener(E,"change",function(){var T=parseInt(E.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
-T)):(y.value="100",A.value=h,E.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
+function(){H=!0;var T=Math.max(0,parseFloat(y.value)||100)/100;y.value=parseFloat((100*T).toFixed(2));0<h?(A.value=Math.floor(h*T),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(A,"change",function(){var T=parseInt(A.value)/h;0<T?(y.value=parseFloat((100*T).toFixed(2)),D.value=Math.floor(m*T)):(y.value="100",A.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var T=parseInt(D.value)/m;0<T?(y.value=parseFloat((100*T).toFixed(2)),A.value=Math.floor(h*
+T)):(y.value="100",A.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(y.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var T=u.value,O=w.value,fa=Math.max(0,parseFloat(y.value)||100)/100,S=Math.max(0,parseInt(J.value)),aa=f.background,Y=Math.max(1,parseInt(F.value));if(("svg"==O||"png"==O||
"pdf"==O)&&M.checked)aa=null;else if(null==aa||aa==mxConstants.NONE)aa="#ffffff";ExportDialog.lastBorderValue=S;ExportDialog.exportFile(a,T,O,aa,fa,S,Y,N.checked)}}));V.className="geBtn gePrimaryBtn";var W=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});W.className="geBtn";a.editor.cancelFirst?(k.appendChild(W),k.appendChild(V)):(k.appendChild(V),k.appendChild(W));g.appendChild(k);p.appendChild(g);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,g,d,h,m){m=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(m.getSvg(f,g,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-p.x)/m.view.scale),Math.floor((d/g-p.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*g/m.view.scale+2*d);g=Math.ceil(p.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
var EditDataDialog=function(a,b){function e(){0<J.value.length?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(T){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,w=[],y=[],A=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
-mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=E?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
-":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");D(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
-T.name>O.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=E)if(g.model.isRoot(b)){var fa=a.getPageById(E);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
-O),E=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),E=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
+"100%";var u=d.attributes,w=[],y=[],A=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(T,O){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var S=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";S.className="geButton";S.setAttribute("title",
+mxResources.get("delete"));S.style.position="absolute";S.style.top="4px";S.style.right="0px";S.style.margin="0px";S.style.width="9px";S.style.height="9px";S.style.cursor="pointer";S.appendChild(aa);O=function(Y){return function(){for(var ba=0,L=0;L<w.length;L++){if(w[L]==Y){y[L]=null;k.table.deleteRow(ba+(null!=D?1:0));break}null!=y[L]&&ba++}}}(O);mxEvent.addListener(S,"click",O);O=T.parentNode;fa.appendChild(T);fa.appendChild(S);O.appendChild(fa)};h=function(T,O,fa){w[T]=O;y[T]=k.addTextarea(w[A]+
+":",fa,2);y[T].style.width="100%";0<fa.indexOf("\n")&&y[T].setAttribute("rows","2");E(y[T],O);null!=m[O]&&0==m[O].editable&&y[T].setAttribute("disabled","disabled")};p=[];for(var F=g.getModel().getParent(b)==g.getModel().getRoot(),H=g.getCellStyle(b),M=0;M<u.length;M++)("label"!=u[M].nodeName||"1"==H.metaEdit||Graph.translateDiagram||F)&&"placeholders"!=u[M].nodeName&&p.push({name:u[M].nodeName,value:u[M].nodeValue});p.sort(function(T,O){return"label"==T.name?1:"label"==O.name?-1:T.name<O.name?-1:
+T.name>O.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var N=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(T){T=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(O){if(null!=O&&0<O.length&&O!=D)if(g.model.isRoot(b)){var fa=a.getPageById(D);if(null!=fa)if(null==a.getPageById(O)){var S=a.getPageIndex(fa);0<=S&&(a.removePage(fa),fa.node.setAttribute("id",
+O),D=O,N.innerHTML=mxUtils.htmlEntities(O),a.insertPage(fa,S))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(O)?(g.getModel().cellRemoved(b),b.setId(O),D=O,N.innerHTML=mxUtils.htmlEntities(O),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[O])})}),mxResources.get("id"));a.showDialog(T.container,300,80,!0,!0);T.init()})}for(M=0;M<p.length;M++)h(A,p[M].name,p[M].value),A++;p=document.createElement("div");
p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);h=document.createElement("div");h.style.display="flex";h.style.alignItems="center";h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop="6px";h.style.width="100%";var J=document.createElement("input");J.setAttribute("placeholder",mxResources.get("enterPropertyName"));J.setAttribute("type",
"text");J.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");J.style.boxSizing="border-box";J.style.borderWidth="1px";J.style.borderStyle="solid";J.style.marginLeft="2px";J.style.padding="4px";J.style.width="100%";h.appendChild(J);p.appendChild(h);f.appendChild(p);var V=mxUtils.button(mxResources.get("addProperty"),function(){var T=J.value;if(0<T.length&&"label"!=T&&"id"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var O=mxUtils.indexOf(w,T);if(0<=O&&null!=y[O])y[O].focus();else{d.cloneNode(!1).setAttribute(T,
-"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);D(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
+"");0<=O&&(w.splice(O,1),y.splice(O,1));w.push(T);var fa=k.addTextarea(T+":","",2);fa.style.width="100%";y.push(fa);E(fa,T);fa.focus()}V.setAttribute("disabled","disabled");J.value=""}catch(S){mxUtils.alert(S)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(J,"keypress",function(T){13==T.keyCode&&V.click()});this.init=function(){0<y.length?y[0].focus():J.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow=
"ellipsis";V.style.position="absolute";V.style.overflow="hidden";V.style.width="144px";V.style.right="0px";V.className="geBtn";h.appendChild(V);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(T){var O=g.getDataForCells([b],!0);T=new EmbedDialog(a,JSON.stringify(O,null,2),null,null,function(){console.log(O);a.alert("Written to Console (Dev Tools)")},
mxResources.get("export"),null,"Console","data.json");a.showDialog(T.container,450,240,!0,!0);T.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var W=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var T=!1,O=0;O<w.length;O++)null==y[O]?d.removeAttribute(w[O]):(d.setAttribute(w[O],y[O].value),T=T||"placeholder"==w[O]&&"1"==d.getAttribute("placeholders"));T&&d.removeAttribute("label");g.getModel().setValue(b,
d)}catch(fa){mxUtils.alert(fa)}});W.setAttribute("title","Ctrl+Enter");W.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&W.click()});mxEvent.addListener(J,"keyup",e);mxEvent.addListener(J,"change",e);u=document.createElement("div");u.style.display="flex";u.style.justifyContent="flex-end";u.style.alignItems="center";u.style.position="absolute";u.style.left="30px";u.style.right="30px";u.style.bottom="30px";u.style.height="40px";if(a.editor.graph.getModel().isVertex(b)||
@@ -3857,17 +3858,17 @@ mxResources.get("lockUnlock"));var ta=p.getCurrentCellStyle(ba);"1"==mxUtils.get
P&&p.removeSelectionCells(p.getModel().getDescendants(ba));mxEvent.consume(ca)}});X.appendChild(ja);mxUtils.write(ia,Y);ia.style.display="block";ia.style.whiteSpace="nowrap";ia.style.overflow="hidden";ia.style.textOverflow="ellipsis";ia.style.position="absolute";ia.style.padding="2px";ia.style.left="52px";ia.style.right="8px";X.appendChild(ia);U.appendChild(X);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)Y=document.createElement("div"),Y.style.display=
"block",Y.style.textAlign="right",Y.style.whiteSpace="nowrap",Y.style.position="absolute",Y.style.right="16px",Y.style.top="6px",0<aa&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9660;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa-
1);mxEvent.consume(ca)})),0<=aa&&aa<A-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9650;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",Y.appendChild(X),mxEvent.addListener(X,"click",function(ca){p.isEnabled()&&p.addCell(ba,p.model.root,aa+1);mxEvent.consume(ca)})),U.appendChild(Y);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
-(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",E=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
+(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ca){var P=mxEvent.getSource(ca).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ia.contentEditable&&(m(ba),mxEvent.consume(ca))});p.getDefaultParent()==ba&&(U.classList.add("geActivePage"),U.style.fontWeight=p.isEnabled()?"bold":"",D=ba);mxEvent.addListener(U,"click",function(ca){p.isEnabled()&&"true"!=ia.contentEditable&&(p.setDefaultParent(L),p.view.setCurrentRoot(null),mxEvent.isShiftDown(ca)&&p.setSelectionCells(ba.children),
mxEvent.consume(ca))});u.appendChild(U)}p.isEnabled()?(W.classList.remove("mxDisabled"),N.classList.remove("mxDisabled"),V.classList.remove("mxDisabled"),H.classList.remove("mxDisabled")):(W.classList.add("mxDisabled"),N.classList.add("mxDisabled"),V.classList.add("mxDisabled"),H.classList.add("mxDisabled"));A=p.model.getChildCount(p.model.root);u.innerText="";J.clear();for(var fa=A-1;0<=fa;fa--)mxUtils.bind(this,function(aa){O(fa,p.convertValueToString(aa)||mxResources.get("background"),aa,aa)})(p.model.getChildAt(p.model.root,
-fa));var S=p.convertValueToString(E)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
+fa));var S=p.convertValueToString(D)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[S]));V.setAttribute("title",mxResources.get("duplicateIt",[S]));p.isSelectionEmpty()&&M.classList.add("mxDisabled");d()}function m(O){if(p.isEnabled()&&null!=O){var fa=J.get(O);if(null!=fa){var S=fa.getElementsByTagName("span");if(null!=S&&0<S.length){var aa=S[0],Y=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",
!1,null);fa.removeAttribute("draggable");fa.style.cursor="";var ba=function(L){if("true"==aa.contentEditable){aa.contentEditable="false";var U=mxUtils.getTextContent(aa);L&&U!=Y?(U=mxUtils.getTextContent(aa),0<U.length?p.cellLabelChanged(O,U):p.cellLabelChanged(O,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(aa,"keydown",function(L){if(13==L.keyCode||27==L.keyCode)ba(13==L.keyCode),mxEvent.consume(L)});mxEvent.addListener(aa,"blur",function(L){ba(!0);mxEvent.consume(L)})}}}}var p=a.editor.graph,
k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,y=null;mxEvent.addListener(k,"dragover",function(O){O.dataTransfer.dropEffect="move";y=0;O.stopPropagation();O.preventDefault()});mxEvent.addListener(k,"drop",function(O){O.stopPropagation();
-O.preventDefault()});var A=null,E=null,D=document.createElement("div");D.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
-p.isEnabled()||H.classList.add("mxDisabled");D.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
-"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});D.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
-"click",function(O){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");D.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(E),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
-O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");D.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(E);p.removeCells([E],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
-p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");D.appendChild(W);k.appendChild(D);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
+O.preventDefault()});var A=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var F=document.createElement("a");F.className="geButton";var H=F.cloneNode(!1);H.style.backgroundImage="url("+Editor.plusImage+")";H.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(H,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(fa)}finally{p.model.endUpdate()}m(fa)}mxEvent.consume(O)});
+p.isEnabled()||H.classList.add("mxDisabled");E.appendChild(H);var M=F.cloneNode();M.style.backgroundImage="url("+Editor.layersImage+")";M.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(M,"click",function(O){if(p.isEnabled()&&!p.isSelectionEmpty()){var fa=mxUtils.getOffset(M);a.showPopupMenu(mxUtils.bind(this,function(S,aa){for(var Y=p.getLayerForCells(p.getSelectionCells()),ba=A-1;0<=ba;ba--)mxUtils.bind(this,function(L){var U="1"==mxUtils.getValue(p.getCurrentCellStyle(L),
+"locked","0"),X=S.addItem(p.convertValueToString(L)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||p.moveCells(p.getSelectionCells(),0,0,!1,L)}),aa,null,null,!U);U?S.addCheckmark(X,Editor.lockedImage):L==Y&&S.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,ba))}),fa.x,fa.y+M.offsetHeight,O)}});E.appendChild(M);var N=F.cloneNode(!1);N.style.backgroundImage="url("+Editor.editImage+")";N.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(N,
+"click",function(O){p.isEnabled()&&a.showDataDialog(D);mxEvent.consume(O)});p.isEnabled()||N.classList.add("mxDisabled");E.appendChild(N);var J=new mxDictionary,V=F.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(O){if(p.isEnabled()){O=null;p.model.beginUpdate();try{O=p.cloneCell(D),p.cellLabelChanged(O,mxResources.get("untitledLayer")),O.setVisible(!0),O=p.addCell(O,p.model.root),p.setDefaultParent(O)}finally{p.model.endUpdate()}null==
+O||p.isCellLocked(O)||p.selectAll(O)}});p.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);var W=F.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(O){if(p.isEnabled()){p.model.beginUpdate();try{var fa=p.model.root.getIndex(D);p.removeCells([D],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<fa&&fa<=p.model.getChildCount(p.model.root)?
+p.setDefaultParent(p.model.getChildAt(p.model.root,fa-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(O)});p.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);k.appendChild(E);var T=document.createElement("span");T.setAttribute("title",mxResources.get("selectionOnly"));T.innerHTML="&#8226;";T.style.position="absolute";T.style.fontWeight="bold";T.style.fontSize="16pt";T.style.right="6px";h();p.model.addListener(mxEvent.CHANGE,h);p.addListener("defaultParentChanged",
h);a.addListener("lockedChanged",h);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?M.classList.add("mxDisabled"):M.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};
this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -11960,541 +11961,542 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))]);this.setCurrentSearchEntryLibrary()}})();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,l){b.raw=l;return b};$jscomp.arrayIteratorImpl=function(b){var l=0;return function(){return l<b.length?{done:!1,value:b[l++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var l="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return l?l.call(b):$jscomp.arrayIterator(b)};
-$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,l,p){if(b==Array.prototype||b==Object.prototype)return b;b[l]=p.value;return b};
-$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var l=0;l<b.length;++l){var p=b[l];if(p&&p.Math==Math)return p}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
-$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,l){var p=$jscomp.propertyToPolyfillSymbol[l];if(null==p)return b[l];p=b[p];return void 0!==p?p:b[l]};$jscomp.polyfill=function(b,l,p,d){l&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,l,p,d):$jscomp.polyfillUnisolated(b,l,p,d))};
-$jscomp.polyfillUnisolated=function(b,l,p,d){p=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var x=b[d];if(!(x in p))return;p=p[x]}b=b[b.length-1];d=p[b];l=l(d);l!=d&&null!=l&&$jscomp.defineProperty(p,b,{configurable:!0,writable:!0,value:l})};
-$jscomp.polyfillIsolated=function(b,l,p,d){var x=b.split(".");b=1===x.length;d=x[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var z=0;z<x.length-1;z++){var y=x[z];if(!(y in d))return;d=d[y]}x=x[x.length-1];p=$jscomp.IS_SYMBOL_NATIVE&&"es6"===p?d[x]:null;l=l(p);null!=l&&(b?$jscomp.defineProperty($jscomp.polyfills,x,{configurable:!0,writable:!0,value:l}):l!==p&&(void 0===$jscomp.propertyToPolyfillSymbol[x]&&(p=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[x]=$jscomp.IS_SYMBOL_NATIVE?
-$jscomp.global.Symbol(x):$jscomp.POLYFILL_PREFIX+p+"$"+x),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[x],{configurable:!0,writable:!0,value:l})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},l={};try{return l.__proto__=b,l.a}catch(p){}return!1};
-$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,l){b.__proto__=l;if(b.__proto__!==l)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,k){b.raw=k;return b};$jscomp.arrayIteratorImpl=function(b){var k=0;return function(){return k<b.length?{done:!1,value:b[k++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var k="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return k?k.call(b):$jscomp.arrayIterator(b)};
+$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,k,n){if(b==Array.prototype||b==Object.prototype)return b;b[k]=n.value;return b};
+$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var k=0;k<b.length;++k){var n=b[k];if(n&&n.Math==Math)return n}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
+$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,k){var n=$jscomp.propertyToPolyfillSymbol[k];if(null==n)return b[k];n=b[n];return void 0!==n?n:b[k]};$jscomp.polyfill=function(b,k,n,d){k&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,k,n,d):$jscomp.polyfillUnisolated(b,k,n,d))};
+$jscomp.polyfillUnisolated=function(b,k,n,d){n=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var x=b[d];if(!(x in n))return;n=n[x]}b=b[b.length-1];d=n[b];k=k(d);k!=d&&null!=k&&$jscomp.defineProperty(n,b,{configurable:!0,writable:!0,value:k})};
+$jscomp.polyfillIsolated=function(b,k,n,d){var x=b.split(".");b=1===x.length;d=x[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var z=0;z<x.length-1;z++){var y=x[z];if(!(y in d))return;d=d[y]}x=x[x.length-1];n=$jscomp.IS_SYMBOL_NATIVE&&"es6"===n?d[x]:null;k=k(n);null!=k&&(b?$jscomp.defineProperty($jscomp.polyfills,x,{configurable:!0,writable:!0,value:k}):k!==n&&(void 0===$jscomp.propertyToPolyfillSymbol[x]&&(n=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[x]=$jscomp.IS_SYMBOL_NATIVE?
+$jscomp.global.Symbol(x):$jscomp.POLYFILL_PREFIX+n+"$"+x),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[x],{configurable:!0,writable:!0,value:k})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},k={};try{return k.__proto__=b,k.a}catch(n){}return!1};
+$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,k){b.__proto__=k;if(b.__proto__!==k)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};
$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};
$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(b){this.yieldResult=b};$jscomp.generator.Context.prototype.throw_=function(b){this.abruptCompletion_={exception:b,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(b){this.abruptCompletion_={return:b};this.nextAddress=this.finallyAddress_};
-$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,l){this.nextAddress=l;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,l){b=$jscomp.makeIterator(b);var p=b.next();$jscomp.generator.ensureIteratorResultIsObject_(p);if(p.done)this.yieldResult=p.value,this.nextAddress=l;else return this.yieldAllIterator_=b,this.yield(p.value,l)};
-$jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,l){this.catchAddress_=b;void 0!=l&&(this.finallyAddress_=l)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,l){this.nextAddress=b;this.catchAddress_=l||0};
-$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,l,p){p?this.finallyContexts_[p]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=l||0};
-$jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,l){l=this.finallyContexts_.splice(l||0)[0];if(l=this.abruptCompletion_=this.abruptCompletion_||l){if(l.isException)return this.jumpToErrorHandler_();void 0!=l.jumpTo&&this.finallyAddress_<l.jumpTo?(this.nextAddress=l.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)};
-$jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var l in b)this.properties_.push(l);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b};
+$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,k){this.nextAddress=k;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,k){b=$jscomp.makeIterator(b);var n=b.next();$jscomp.generator.ensureIteratorResultIsObject_(n);if(n.done)this.yieldResult=n.value,this.nextAddress=k;else return this.yieldAllIterator_=b,this.yield(n.value,k)};
+$jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,k){this.catchAddress_=b;void 0!=k&&(this.finallyAddress_=k)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,k){this.nextAddress=b;this.catchAddress_=k||0};
+$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,k,n){n?this.finallyContexts_[n]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=k||0};
+$jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,k){k=this.finallyContexts_.splice(k||0)[0];if(k=this.abruptCompletion_=this.abruptCompletion_||k){if(k.isException)return this.jumpToErrorHandler_();void 0!=k.jumpTo&&this.finallyAddress_<k.jumpTo?(this.nextAddress=k.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)};
+$jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var k in b)this.properties_.push(k);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b};
$jscomp.generator.Engine_.prototype.next_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,b,this.context_.next_);this.context_.next_(b);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var l=this.context_.yieldAllIterator_;if(l)return this.yieldAllStep_("return"in l?l["return"]:function(p){return{value:p,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};
+$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var k=this.context_.yieldAllIterator_;if(k)return this.yieldAllStep_("return"in k?k["return"]:function(n){return{value:n,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.throw_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],b,this.context_.next_);this.context_.throw_(b);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,l,p){try{var d=b.call(this.context_.yieldAllIterator_,l);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var x=d.value}catch(z){return this.context_.yieldAllIterator_=null,this.context_.throw_(z),this.nextStep_()}this.context_.yieldAllIterator_=null;p.call(this.context_,x);return this.nextStep_()};
-$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(l){this.context_.yieldResult=void 0,this.context_.throw_(l)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};
-$jscomp.generator.Generator_=function(b){this.next=function(l){return b.next_(l)};this.throw=function(l){return b.throw_(l)};this.return=function(l){return b.return_(l)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,l){l=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(l));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(l,b.prototype);return l};
-$jscomp.asyncExecutePromiseGenerator=function(b){function l(d){return b.next(d)}function p(d){return b.throw(d)}return new Promise(function(d,x){function z(y){y.done?d(y.value):Promise.resolve(y.value).then(l,p).then(z,x)}z(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
-DrawioFile=function(b,l){mxEventSource.call(this);this.ui=b;this.setData(l||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
+$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,k,n){try{var d=b.call(this.context_.yieldAllIterator_,k);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var x=d.value}catch(z){return this.context_.yieldAllIterator_=null,this.context_.throw_(z),this.nextStep_()}this.context_.yieldAllIterator_=null;n.call(this.context_,x);return this.nextStep_()};
+$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(k){this.context_.yieldResult=void 0,this.context_.throw_(k)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};
+$jscomp.generator.Generator_=function(b){this.next=function(k){return b.next_(k)};this.throw=function(k){return b.throw_(k)};this.return=function(k){return b.return_(k)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,k){k=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(k));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(k,b.prototype);return k};
+$jscomp.asyncExecutePromiseGenerator=function(b){function k(d){return b.next(d)}function n(d){return b.throw(d)}return new Promise(function(d,x){function z(y){y.done?d(y.value):Promise.resolve(y.value).then(k,n).then(z,x)}z(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
+DrawioFile=function(b,k){mxEventSource.call(this);this.ui=b;this.setData(k||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};
-DrawioFile.prototype.synchronizeFile=function(b,l){if(this.savingFile)null!=l&&l({message:mxResources.get("busy")});else{var p=!0,d=window.setTimeout(mxUtils.bind(this,function(){p=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,l)})})}),this.ui.timeout),x=mxUtils.bind(this,function(y){p&&(window.clearTimeout(d),null!=l&&l(y))}),z=mxUtils.bind(this,function(){return!p});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
-function(y){p&&(window.clearTimeout(d),this.sync.cleanup(b,l,y))}),x,z):this.updateFile(mxUtils.bind(this,function(){p&&(window.clearTimeout(d),null!=b&&b())}),x,z)}};
-DrawioFile.prototype.updateFile=function(b,l,p,d,x){null!=p&&p()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",x,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=l&&l():this.getLatestVersion(mxUtils.bind(this,function(z){try{null!=p&&p()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[z]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=l&&l():null!=z?this.mergeFile(z,b,l,
-d,x):this.reloadFile(b,l))}catch(y){null!=l&&l(y)}}),l))};
-DrawioFile.prototype.mergeFile=function(b,l,p,d,x){try{var z=b.getShadowPages();if(null!=z&&0<z.length){var y=this.getShadowPages(),F=[this.ui.diffPages(null!=d?d:y,z)],M=this.ignorePatches(F);if(M)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",M),null!=l&&l();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var K=this.isModified()?this.ui.diffPages(y,
-this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(y),F[0]),c=this.ui.getHashValueForPages(L,{}),f=this.ui.getHashValueForPages(z,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",y,"pages",z,"patched",L,"patches",F,"changes",K,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",x);if(null!=c&&c!=f)this.checksumError(p,F,null,null,"mergeFile",
-c,f,b.getCurrentRevisionId());else{this.setShadowPages(z);if(null!=this.sync){var k=this.sync.patchRealtime(F,DrawioFile.LAST_WRITE_WINS?K:null,null,x);null==k||mxUtils.isEmptyObject(k)||F.push(k)}this.patch(F,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=l&&l()}}catch(v){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=p&&p(v);try{var m=this.getCurrentUser(),t=null!=m?
-m.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,v)}catch(A){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(v){null!=p&&p(v)}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var l=new mxCodec(mxUtils.createXmlDocument()),p=l.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var x=l.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(x=this.ui.anonymizeNode(x,!0));x.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,x,!0);p.appendChild(x)}return mxUtils.getPrettyXml(p)};
-DrawioFile.prototype.compressReportData=function(b,l,p){l=null!=l?l:1E4;null!=p&&null!=b&&b.length>p?b=b.substring(0,p)+"[...]":null!=b&&b.length>l&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,l,p,d,x,z,y,F){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var M=this.getCurrentUser(),K=null!=M?M.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(l).length,f=null;if(null!=l&&1E3>c){b=[];for(p=0;p<l.length;p++)b.push(this.ui.anonymizePatch(l[p]));f=JSON.stringify(b);f=null!=f&&1E3>
-f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(k){try{var m=null!=f?"report":"error",t=this.ui.getHashValueForPages(k.getShadowPages()),v="unknown",A="unknown",E="unknown";try{var D=null!=k.initialData&&0<k.initialData.length?mxUtils.parseXml(k.initialData).documentElement:null;null!=D&&(null!=D.getAttribute("version")&&(v=D.getAttribute("version")),null!=D.getAttribute("agent")&&(A=D.getAttribute("agent")),null!=D.getAttribute("type")&&(E=D.getAttribute("type")))}catch(B){}EditorUi.logError("Checksum "+
-m+" in "+x,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+l.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=z?"-expected_"+z:"")+(null!=y?"-current_"+y:"")+(null!=F?"-rev_"+this.ui.hashValue(F):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(k.getCurrentRevisionId())+("-latestVersion_"+v)+("-latestAgent_"+A)+("-latestType_"+E));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:x,label:"user_"+
-K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+l.length+"-size_"+this.getSize()})}catch(B){}}),function(){})}catch(k){}};
-DrawioFile.prototype.sendErrorReport=function(b,l,p,d){try{var x=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),z=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),y=this.getCurrentUser(),F=null!=y?this.ui.hashValue(y.id):"unknown",M=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");y="xml";0<L&&(y=K.substring(L));var c=null!=p?p.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+y+")\nUser="+F+M+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=l?"\n\n"+l:
-"")+(null!=p?"\n\nError: "+p.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+x+"\n\nData:\n"+z,d)}catch(f){}};
-DrawioFile.prototype.reloadFile=function(b,l){try{this.stats.fileReloaded++;var p=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,x=d.getSelectionCells(),z=d.getViewState(),y=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(F){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[p],"viewState",[z],"latestFile",F);null!=F?(this.ui.replaceFileData(F.getData(),
-[p]),this.ui.restoreViewState(y,z,x),this.setDescriptor(F.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var M=this.ui.getCurrentFile();null!=M&&(M.stats=this.stats,M.patch([p]),M.fileChanged());this.ui.restoreViewState(y,z,x);null!=b&&b()}else null!=l&&l(this.ui.fileLoadedError)}),!0))}),l)}catch(F){null!=l&&l(F)}};
-DrawioFile.prototype.copyFile=function(b,l){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var l=!0;if(null!=b)for(var p=0;p<b.length&&l;p++)l=l&&mxUtils.isEmptyObject(b[p]);return l};
-DrawioFile.prototype.patch=function(b,l,p,d){if(null!=b){var x=this.ui.editor.undoManager,z=x.history.slice(),y=x.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var M=this.changeListenerEnabled;this.changeListenerEnabled=p;var K=F.foldingEnabled,L=F.mathEnabled,c=F.cellRenderer.redraw;F.cellRenderer.redraw=function(A){A.view.graph.isEditing(A.cell)&&(A.view.graph.scrollCellToVisible(A.cell),A.view.graph.cellEditor.resize());c.apply(this,arguments)};F.model.beginUpdate();
-try{if(p){for(var f=this.ui.pages.slice(),k=this.ui.currentPage,m=this.ui.applyPatches(this.ui.pages,b,!0,l,this.isModified()),t=0;t<m.length;t++){var v=mxUtils.indexOf(this.ui.pages,m[t]);0>v?this.ui.insertPage(m[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(v,t)}for(t=0;t<f.length;t++)0>mxUtils.indexOf(m,f[t])&&this.ui.removePage(f[t]);0<=mxUtils.indexOf(this.ui.pages,k)&&this.ui.selectPage(k,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,l,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);F.checkDefaultParent()}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=c;this.changeListenerEnabled=M;p||(x.history=z,x.indexOfNextAdd=y,x.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=F.mathEnabled?(this.ui.editor.updateGraphComponents(),F.refresh()):(K!=F.foldingEnabled?
-F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(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",l,"undoable",p)}return b};
-DrawioFile.prototype.save=function(b,l,p,d,x,z){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",x,"manual",z,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!x&&this.invalidChecksum)if(null!=p)p({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=l&&l();else if(null!=p)p({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(y){if(null!=p)p(y);else throw y;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var l=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=l&&(l.viewState=this.ui.editor.graph.getViewState(),l.needsUpdate=!0)}l=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return l};
+DrawioFile.prototype.synchronizeFile=function(b,k){if(this.savingFile)null!=k&&k({message:mxResources.get("busy")});else{var n=!0,d=window.setTimeout(mxUtils.bind(this,function(){n=!1;null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,k)})})}),this.ui.timeout),x=mxUtils.bind(this,function(y){n&&(window.clearTimeout(d),null!=k&&k(y))}),z=mxUtils.bind(this,function(){return!n});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
+function(y){n&&(window.clearTimeout(d),this.sync.cleanup(b,k,y))}),x,z):this.updateFile(mxUtils.bind(this,function(){n&&(window.clearTimeout(d),null!=b&&b())}),x,z)}};
+DrawioFile.prototype.updateFile=function(b,k,n,d,x){null!=n&&n()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",x,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=k&&k():this.getLatestVersion(mxUtils.bind(this,function(z){try{null!=n&&n()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[z]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=k&&k():null!=z?this.mergeFile(z,b,k,
+d,x):this.reloadFile(b,k))}catch(y){null!=k&&k(y)}}),k))};
+DrawioFile.prototype.mergeFile=function(b,k,n,d,x){try{var z=b.getShadowPages();if(null!=z&&0<z.length){var y=this.getShadowPages(),F=[this.ui.diffPages(null!=d?d:y,z)],N=this.ignorePatches(F);if(N)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",N),null!=k&&k();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var K=this.isModified()?this.ui.diffPages(y,
+this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(y),F[0]),c=this.ui.getHashValueForPages(L,{}),f=this.ui.getHashValueForPages(z,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",y,"pages",z,"patched",L,"patches",F,"changes",K,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",x);if(null!=c&&c!=f)this.checksumError(n,F,null,null,"mergeFile",
+c,f,b.getCurrentRevisionId());else{this.setShadowPages(z);if(null!=this.sync){var l=this.sync.patchRealtime(F,DrawioFile.LAST_WRITE_WINS?K:null,null,x);null==l||mxUtils.isEmptyObject(l)||F.push(l)}this.patch(F,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=k&&k()}}catch(v){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=n&&n(v);try{var m=this.getCurrentUser(),t=null!=m?
+m.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,v)}catch(B){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(v){null!=n&&n(v)}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var k=new mxCodec(mxUtils.createXmlDocument()),n=k.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var x=k.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(x=this.ui.anonymizeNode(x,!0));x.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,x,!0);n.appendChild(x)}return mxUtils.getPrettyXml(n)};
+DrawioFile.prototype.compressReportData=function(b,k,n){k=null!=k?k:1E4;null!=n&&null!=b&&b.length>n?b=b.substring(0,n)+"[...]":null!=b&&b.length>k&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,k,n,d,x,z,y,F){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var N=this.getCurrentUser(),K=null!=N?N.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(k).length,f=null;if(null!=k&&1E3>c){b=[];for(n=0;n<k.length;n++)b.push(this.ui.anonymizePatch(k[n]));f=JSON.stringify(b);f=null!=f&&1E3>
+f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var m=null!=f?"report":"error",t=this.ui.getHashValueForPages(l.getShadowPages()),v="unknown",B="unknown",E="unknown";try{var D=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=D&&(null!=D.getAttribute("version")&&(v=D.getAttribute("version")),null!=D.getAttribute("agent")&&(B=D.getAttribute("agent")),null!=D.getAttribute("type")&&(E=D.getAttribute("type")))}catch(A){}EditorUi.logError("Checksum "+
+m+" in "+x,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+k.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=z?"-expected_"+z:"")+(null!=y?"-current_"+y:"")+(null!=F?"-rev_"+this.ui.hashValue(F):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+v)+("-latestAgent_"+B)+("-latestType_"+E));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:x,label:"user_"+
+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+k.length+"-size_"+this.getSize()})}catch(A){}}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,k,n,d){try{var x=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),z=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),y=this.getCurrentUser(),F=null!=y?this.ui.hashValue(y.id):"unknown",N=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");y="xml";0<L&&(y=K.substring(L));var c=null!=n?n.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+y+")\nUser="+F+N+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=k?"\n\n"+k:
+"")+(null!=n?"\n\nError: "+n.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+x+"\n\nData:\n"+z,d)}catch(f){}};
+DrawioFile.prototype.reloadFile=function(b,k){try{this.stats.fileReloaded++;var n=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,x=d.getSelectionCells(),z=d.getViewState(),y=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(F){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[n],"viewState",[z],"latestFile",F);null!=F?(this.ui.replaceFileData(F.getData(),
+[n]),this.ui.restoreViewState(y,z,x),this.setDescriptor(F.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var N=this.ui.getCurrentFile();null!=N&&(N.stats=this.stats,N.patch([n]),N.fileChanged());this.ui.restoreViewState(y,z,x);null!=b&&b()}else null!=k&&k(this.ui.fileLoadedError)}),!0))}),k)}catch(F){null!=k&&k(F)}};
+DrawioFile.prototype.copyFile=function(b,k){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var k=!0;if(null!=b)for(var n=0;n<b.length&&k;n++)k=k&&mxUtils.isEmptyObject(b[n]);return k};
+DrawioFile.prototype.patch=function(b,k,n,d){if(null!=b){var x=this.ui.editor.undoManager,z=x.history.slice(),y=x.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var N=this.changeListenerEnabled;this.changeListenerEnabled=n;var K=F.foldingEnabled,L=F.mathEnabled,c=F.cellRenderer.redraw;F.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());c.apply(this,arguments)};F.model.beginUpdate();
+try{if(n){for(var f=this.ui.pages.slice(),l=this.ui.currentPage,m=this.ui.applyPatches(this.ui.pages,b,!0,k,this.isModified()),t=0;t<m.length;t++){var v=mxUtils.indexOf(this.ui.pages,m[t]);0>v?this.ui.insertPage(m[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(v,t)}for(t=0;t<f.length;t++)0>mxUtils.indexOf(m,f[t])&&this.ui.removePage(f[t]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,k,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);F.checkDefaultParent()}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=c;this.changeListenerEnabled=N;n||(x.history=z,x.indexOfNextAdd=y,x.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=F.mathEnabled?(this.ui.editor.updateGraphComponents(),F.refresh()):(K!=F.foldingEnabled?
+F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(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",k,"undoable",n)}return b};
+DrawioFile.prototype.save=function(b,k,n,d,x,z){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",x,"manual",z,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!x&&this.invalidChecksum)if(null!=n)n({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=k&&k();else if(null!=n)n({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(y){if(null!=n)n(y);else throw y;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var k=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=k&&(k.viewState=this.ui.editor.graph.getViewState(),k.needsUpdate=!0)}k=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return k};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};
-DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,l,p){};DrawioFile.prototype.saveFile=function(b,l,p,d){};DrawioFile.prototype.getFileUrl=function(){return null};
+DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,k,n){};DrawioFile.prototype.saveFile=function(b,k,n,d){};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,l,p){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,l,p){};
-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var l=this.ui.editor.graph,p=l.getSelectionCells(),d=l.getViewState(),x=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(x,
-d,p);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
-DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var l=0;null!=b&&l<b.length;l++){var p=b[l];null!=p.id&&0==p.id.indexOf("extFont_")&&p.parentNode.removeChild(p)}};
+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,k,n){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,k,n){};
+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var k=this.ui.editor.graph,n=k.getSelectionCells(),d=k.getViewState(),x=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(x,
+d,n);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
+DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var k=0;null!=b&&k<b.length;k++){var n=b[k];null!=n.id&&0==n.id.indexOf("extFont_")&&n.parentNode.removeChild(n)}};
DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};
DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages&&null!=this.ui.pages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,l){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,l){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,l){this.loadDescriptor(mxUtils.bind(this,function(p){b(p)}),l)};DrawioFile.prototype.patchDescriptor=function(b,l){this.setDescriptorEtag(b,this.getDescriptorEtag(l));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,k){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,k){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,k){this.loadDescriptor(mxUtils.bind(this,function(n){b(n)}),k)};DrawioFile.prototype.patchDescriptor=function(b,k){this.setDescriptorEtag(b,this.getDescriptorEtag(k));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,l){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,l){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,k){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,k){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};
-DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,l){this.setDescriptorEtag(b,l)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,l){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};DrawioFile.prototype.getDescriptorChecksum=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,l){b=null!=l?l.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,k){this.setDescriptorEtag(b,k)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,k){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};DrawioFile.prototype.getDescriptorChecksum=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,k){b=null!=k?k.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
-DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var l=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+l+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
+DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var k=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+k+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
Editor.lockedImage+'"/>':"")+"</div>")}};
-DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var l={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(l));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[l])}catch(p){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var k={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(k));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[k])}catch(n){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var l=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+l+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+l+" ("+mxUtils.htmlEntities(b.message)+
-")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var l=this.getErrorMessage(b);if(null==l&&null!=this.lastSaved){var p=this.ui.timeSince(new Date(this.lastSaved));null!=p&&(l=mxResources.get("lastSaved",[p]))}null!=l&&60<l.length&&(l=l.substring(0,60)+"...");l=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=l&&""!=l?" ("+mxUtils.htmlEntities(l)+")":"");p='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
-p+' title="'+l+'" class="geStatusAlert">'+l+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
-null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,l){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),l)}));this.ui.spinner.stop();this.clearAutosave()};
-DrawioFile.prototype.setConflictStatus=function(b,l){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=l?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',l)};
-DrawioFile.prototype.showRefreshDialog=function(b,l,p){null==p&&(p=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,l)})):(this.addConflictStatus(p,mxUtils.bind(this,function(){this.showRefreshDialog(b,l)})),this.ui.showError(mxResources.get("warning")+" ("+p+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
-function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),l)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=l&&l()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,l,p){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,l)}),null,mxResources.get("overwrite"),p,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,l){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),l,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,l){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var p=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=l&&(d+=" ("+l+")");l=mxUtils.bind(this,function(){var x=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==p?window.location.reload():window.location.href=
-p});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),x,mxResources.get("cancel"),mxResources.get("discardChanges")):x()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-l)}};
+DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var k=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+k+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+k+" ("+mxUtils.htmlEntities(b.message)+
+")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var k=this.getErrorMessage(b);if(null==k&&null!=this.lastSaved){var n=this.ui.timeSince(new Date(this.lastSaved));null!=n&&(k=mxResources.get("lastSaved",[n]))}null!=k&&60<k.length&&(k=k.substring(0,60)+"...");k=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=k&&""!=k?" ("+mxUtils.htmlEntities(k)+")":"");n='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
+n+' title="'+k+'" class="geStatusAlert">'+k+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
+null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,k){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),k)}));this.ui.spinner.stop();this.clearAutosave()};
+DrawioFile.prototype.setConflictStatus=function(b,k){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=k?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',k)};
+DrawioFile.prototype.showRefreshDialog=function(b,k,n){null==n&&(n=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,k)})):(this.addConflictStatus(n,mxUtils.bind(this,function(){this.showRefreshDialog(b,k)})),this.ui.showError(mxResources.get("warning")+" ("+n+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
+function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),k)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=k&&k()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,k,n){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,k)}),null,mxResources.get("overwrite"),n,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,k){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,k){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var n=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=k&&(d+=" ("+k+")");k=mxUtils.bind(this,function(){var x=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==n?window.location.reload():window.location.href=
+n});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),x,mxResources.get("cancel"),mxResources.get("discardChanges")):x()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+k)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")")})):
this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};
-DrawioFile.prototype.handleFileError=function(b,l){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,l):(this.isModified()&&this.addUnsavedStatus(b),l?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var p=this.getErrorMessage(b);null!=p&&60<p.length&&(p=p.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
-(null!=p?" ("+mxUtils.htmlEntities(p)+")":"")+"</div>")}))))};
-DrawioFile.prototype.handleConflictError=function(b,l){var p=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(y){this.handleFileError(y,!0)}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,p,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),z=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,p,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(p,d,x):this.invalidChecksum&&l?this.showRefreshDialog(p,d,this.getErrorMessage(b)):l?this.showConflictDialog(x,z):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(p,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var l=null!=b?null!=b.error?b.error.message:b.message:null;null==l&&null!=b&&b.code==App.ERROR_TIMEOUT?l=mxResources.get("timeout"):"0"==l&&(l=mxResources.get("noResponse"));return l};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.compressionChanged=function(b){var l=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=l)for(var p=0;p<l.length;p++){var d=l[p].node;if(null!=d&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=l[p].getId())){var x=d.getElementsByTagName("mxGraphModel");x=0<x.length?x[0]:null;var z=Graph.decompress(mxUtils.getNodeValue(d));b?0==z.length&&null!=x&&(EditorUi.removeChildNodes(d),mxUtils.setTextContent(d,Graph.compressNode(x)),EditorUi.debug("DrawioFile.compressionChanged",
-[this],"Page "+p+" compressed")):0<z.length&&null==x&&(EditorUi.removeChildNodes(d),d.appendChild(mxUtils.parseXml(z).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+p+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
+DrawioFile.prototype.handleFileError=function(b,k){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,k):(this.isModified()&&this.addUnsavedStatus(b),k?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var n=this.getErrorMessage(b);null!=n&&60<n.length&&(n=n.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
+(null!=n?" ("+mxUtils.htmlEntities(n)+")":"")+"</div>")}))))};
+DrawioFile.prototype.handleConflictError=function(b,k){var n=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(y){this.handleFileError(y,!0)}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,n,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),z=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,n,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(n,d,x):this.invalidChecksum&&k?this.showRefreshDialog(n,d,this.getErrorMessage(b)):k?this.showConflictDialog(x,z):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(n,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var k=null!=b?null!=b.error?b.error.message:b.message:null;null==k&&null!=b&&b.code==App.ERROR_TIMEOUT?k=mxResources.get("timeout"):"0"==k&&(k=mxResources.get("noResponse"));return k};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.compressionChanged=function(b){var k=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=k)for(var n=0;n<k.length;n++){var d=k[n].node;if(null!=d&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=k[n].getId())){var x=d.getElementsByTagName("mxGraphModel");x=0<x.length?x[0]:null;var z=Graph.decompress(mxUtils.getNodeValue(d));b?0==z.length&&null!=x&&(EditorUi.removeChildNodes(d),mxUtils.setTextContent(d,Graph.compressNode(x)),EditorUi.debug("DrawioFile.compressionChanged",
+[this],"Page "+n+" compressed")):0<z.length&&null==x&&(EditorUi.removeChildNodes(d),d.appendChild(mxUtils.parseXml(z).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+n+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"...")})),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),
-this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(l){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(l){this.handleFileError(l)}))):(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 l=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(l,mxUtils.bind(this,function(p){EditorUi.debug("DrawioFile.createSecret",[this],"secret",l,"token",p);b(l,p)}),mxUtils.bind(this,function(){b(l)})):b(l)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,l,p,d,x,z,y){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;z=null!=z?z:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(z),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=p&&p()):this.sync.fileSaved(z,l,p,d,x,y)}catch(K){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=d&&d(K);try{var F=this.getCurrentUser(),M=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),M,K)}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[l],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(K){this.descriptorChanged(),null!=d&&d(K)}};
-DrawioFile.prototype.autosave=function(b,l,p,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var x=Date.now()-this.lastAutosave<l?b:0;this.clearAutosave();var z=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==z&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",z,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var y=this.isAutosaveRevision();
-y&&(this.lastAutosaveRevision=(new Date).getTime());this.save(y,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=p&&p(F)}),mxUtils.bind(this,function(F){null!=d&&d(F)}))}else this.isModified()||this.ui.clearStatus(),null!=p&&p(null)}catch(F){null!=d&&d(F)}}),x);this.autosaveThread=z;EditorUi.debug("DrawioFile.autosave",[this],"thread",z,"delay",b,"maxDelay",l,"actualDelay",x,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
+this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(k){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(k){this.handleFileError(k)}))):(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 k=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(k,mxUtils.bind(this,function(n){EditorUi.debug("DrawioFile.createSecret",[this],"secret",k,"token",n);b(k,n)}),mxUtils.bind(this,function(){b(k)})):b(k)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,k,n,d,x,z,y){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;z=null!=z?z:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(z),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=n&&n()):this.sync.fileSaved(z,k,n,d,x,y)}catch(K){this.invalidChecksum=
+this.inConflictState=!0;this.descriptorChanged();null!=d&&d(K);try{var F=this.getCurrentUser(),N=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),N,K)}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[k],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(K){this.descriptorChanged(),null!=d&&d(K)}};
+DrawioFile.prototype.autosave=function(b,k,n,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var x=Date.now()-this.lastAutosave<k?b:0;this.clearAutosave();var z=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==z&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",z,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var y=this.isAutosaveRevision();
+y&&(this.lastAutosaveRevision=(new Date).getTime());this.save(y,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=n&&n(F)}),mxUtils.bind(this,function(F){null!=d&&d(F)}))}else this.isModified()||this.ui.clearStatus(),null!=n&&n(null)}catch(F){null!=d&&d(F)}}),x);this.autosaveThread=z;EditorUi.debug("DrawioFile.autosave",[this],"thread",z,"delay",b,"maxDelay",k,"actualDelay",x,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(l){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,l){if(null!=b&&null!=l){var p=b.lastIndexOf(".");b=0<p?b.substring(p):"";p=l.lastIndexOf(".");return b===(0<p?l.substring(p):"")}return b==l};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(k){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,k){if(null!=b&&null!=k){var n=b.lastIndexOf(".");b=0<n?b.substring(n):"";n=k.lastIndexOf(".");return b===(0<n?k.substring(n):"")}return b==k};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,l){b([])};DrawioFile.prototype.addComment=function(b,l,p){l(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,l){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,l)};LocalFile=function(b,l,p,d,x,z,y){DrawioFile.call(this,b,l);this.title=p;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=x;this.desc=z;this.editable=y};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
-LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,l,p,d,x){this.saveAs(this.title,l,p,d,x)};LocalFile.prototype.saveAs=function(b,l,p,d,x){this.saveFile(b,!1,l,p,null,d,x)};
-LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,l){null==this.fileHandle?null!=l&&l({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,l)};
-LocalFile.prototype.saveFile=function(b,l,p,d,x,z,y){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;x||this.updateFileData();var F=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var M=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=p&&p()}),L=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var f=mxUtils.bind(this,function(m){this.savingFile=!1;null!=d&&d({error:m})});this.saveDraft(M);this.fileHandle.createWritable().then(mxUtils.bind(this,function(m){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);y||this.desc.lastModified==t.lastModified?m.write(F?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){m.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){try{var A=this.desc;this.savingFile=!1;this.desc=v;this.fileSaved(M,A,K,f);this.removeDraft()}catch(E){f(E)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;f(t)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,F?"image/png":"text/xml",F);else if(c.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(F?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));K()}});F?(l=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){L(c)}),d,this.ui.getCurrentFile()!=this?M:null,l.scale,l.border)):L(M)};
-LocalFile.prototype.rename=function(b,l,p){this.title=b;this.descriptorChanged();null!=l&&l()};LocalLibrary=function(b,l,p){LocalFile.call(this,b,l,p)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,l,p){this.saveFile(b,!1,l,p)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,l,p){DrawioFile.call(this,b,l);this.title=p;this.etag=this.getEtag(l)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
-StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,l){this.getLatestVersionId(b,l)};StorageFile.prototype.getLatestVersionId=function(b,l){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(p){b(this.getEtag(p))}),l)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};
-StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,l,p){this.saveAs(this.getTitle(),l,p)};
-StorageFile.prototype.saveAs=function(b,l,p){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,l,p)}),p])};StorageFile.insertFile=function(b,l,p,d,x,z){StorageFile.doInsertFile(null!=z?z:new StorageFile(b,p,l),d,x)};
-StorageFile.doInsertFile=function(b,l,p){var d=b.getTitle(),x=b.getUi(),z=mxUtils.bind(this,function(y){var F=function(){b.writeFile(d,function(){l(b)},p)};y?x.confirm(mxResources.get("replaceIt",[d]),F,p):F()});StorageFile.getFileContent(x,d,function(y){z(null!=y)},function(){z(!1)})};StorageFile.getFileContent=function(b,l,p,d){b.getDatabaseItem(l,function(x){p(null!=x?x.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(l,p):null!=d&&d()}),"files")};
-StorageFile.getFileInfo=function(b,l,p,d){b.getDatabaseItem(l,function(x){p(x)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(l,function(x){p(null!=x?{title:l}:null)}):null!=d&&d()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,l,p,d,x){x=null!=x?x:0;if(this.isEditable()){var z=mxUtils.bind(this,function(){this.writeFile(b,p,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?z():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(y){this.isRenamable()&&this.getTitle()!=b&&null!=y?this.ui.confirm(mxResources.get("replaceIt",[b]),z,d):this.getLatestVersion(mxUtils.bind(this,function(F){F.getDescriptor()!=
-this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[F]),this.mergeFile(F,mxUtils.bind(this,function(){x>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=d&&d()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,l,p,d,x+1)}))}),d)):z()}),d)}),d)}else null!=p&&p();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",l,"retry",x)};
-StorageFile.prototype.retrySave=function(b){var l=300+300*Math.random();window.setTimeout(b,l);EditorUi.debug("StorageFile.retrySave",[this],"delay",l)};
-StorageFile.prototype.writeFile=function(b,l,p){this.isRenamable()&&(this.title=b);try{var d=this.getDescriptor(),x=this.getData(),z=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(x));this.contentChanged();this.fileSaved(x,d,l,p)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:x.length,lastModified:Date.now(),type:this.type},{title:this.title,data:x}],z,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
-x,z)}catch(y){null!=p&&p(y)}else null!=p&&p()}),["filesInfo","files"])}catch(y){null!=p&&p(y)}};StorageFile.prototype.rename=function(b,l,p){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,l)}),p)});null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),z,p):z()}),p):l()};
-StorageFile.prototype.getLatestVersion=function(b,l){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(p){b(new StorageFile(this.ui,p,this.title))}),l)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var l=[],p=0;p<localStorage.length;p++){var d=localStorage.key(p),x=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<x.length){var z=(null==b||"F"==b)&&("<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12)),y=(null==b||"L"==b)&&"<mxlibrary>"===x.substring(0,11);(z||y)&&l.push({title:d,type:z?"F":"L",size:x.length,lastModified:Date.now()})}}return l};
-StorageFile.migrate=function(b){var l=StorageFile.listLocalStorageFiles();l.push({title:".scratchpad",type:"L"});var p=b.transaction(["files","filesInfo"],"readwrite");b=p.objectStore("files");p=p.objectStore("filesInfo");for(var d=0;d<l.length;d++){var x=l[d],z=localStorage.getItem(x.title);b.add({title:x.title,data:z});p.add(x)}};
-StorageFile.listFiles=function(b,l,p,d){b.getDatabaseItems(function(x){var z=[];if(null!=x)for(var y=0;y<x.length;y++)"."==x[y].title.charAt(0)||null!=l&&x[y].type!=l||z.push(x[y]);p(z)},function(){null==b.database?p(StorageFile.listLocalStorageFiles(l)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,l,p,d){b.removeDatabaseItem([l,l],p,function(){null==b.database?(localStorage.removeItem(l),p()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,l,p){StorageFile.call(this,b,l,p)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,l,p){this.saveFile(b,!1,l,p)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(b,l,p){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,l,p){DrawioFile.call(this,b,l);this.title=p;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,l,p){RemoteFile.call(this,b,l,p.title);this.libObj=p};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,l,p){};
-RemoteLibrary.prototype.saveAs=function(b,l,p){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,l,p){StorageFile.call(this,b,l,p);b=p;l=b.lastIndexOf("/");0<=l&&(b=b.substring(l+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,l,p){return!1};UrlLibrary.prototype.saveAs=function(b,l,p){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,l,p){DrawioFile.call(this,b,l);this.desc=p||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,k){b([])};DrawioFile.prototype.addComment=function(b,k,n){k(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,k){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,k)};LocalFile=function(b,k,n,d,x,z,y){DrawioFile.call(this,b,k);this.title=n;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=x;this.desc=z;this.editable=y};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
+LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,k,n,d,x){this.saveAs(this.title,k,n,d,x)};LocalFile.prototype.saveAs=function(b,k,n,d,x){this.saveFile(b,!1,k,n,null,d,x)};
+LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,k){null==this.fileHandle?null!=k&&k({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,k)};
+LocalFile.prototype.saveFile=function(b,k,n,d,x,z,y){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;x||this.updateFileData();var F=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var N=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=n&&n()}),L=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var f=mxUtils.bind(this,function(m){this.savingFile=!1;null!=d&&d({error:m})});this.saveDraft(N);this.fileHandle.createWritable().then(mxUtils.bind(this,function(m){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);y||this.desc.lastModified==t.lastModified?m.write(F?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){m.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){try{var B=this.desc;this.savingFile=!1;this.desc=v;this.fileSaved(N,B,K,f);this.removeDraft()}catch(E){f(E)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;f(t)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,F?"image/png":"text/xml",F);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(F?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));K()}});F?(k=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){L(c)}),d,this.ui.getCurrentFile()!=this?N:null,k.scale,k.border)):L(N)};
+LocalFile.prototype.rename=function(b,k,n){this.title=b;this.descriptorChanged();null!=k&&k()};LocalLibrary=function(b,k,n){LocalFile.call(this,b,k,n)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,k,n){this.saveFile(b,!1,k,n)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,k,n){DrawioFile.call(this,b,k);this.title=n;this.etag=this.getEtag(k)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
+StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,k){this.getLatestVersionId(b,k)};StorageFile.prototype.getLatestVersionId=function(b,k){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(n){b(this.getEtag(n))}),k)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};
+StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,k,n){this.saveAs(this.getTitle(),k,n)};
+StorageFile.prototype.saveAs=function(b,k,n){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,k,n)}),n])};StorageFile.insertFile=function(b,k,n,d,x,z){StorageFile.doInsertFile(null!=z?z:new StorageFile(b,n,k),d,x)};
+StorageFile.doInsertFile=function(b,k,n){var d=b.getTitle(),x=b.getUi(),z=mxUtils.bind(this,function(y){var F=function(){b.writeFile(d,function(){k(b)},n)};y?x.confirm(mxResources.get("replaceIt",[d]),F,n):F()});StorageFile.getFileContent(x,d,function(y){z(null!=y)},function(){z(!1)})};StorageFile.getFileContent=function(b,k,n,d){b.getDatabaseItem(k,function(x){n(null!=x?x.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(k,n):null!=d&&d()}),"files")};
+StorageFile.getFileInfo=function(b,k,n,d){b.getDatabaseItem(k,function(x){n(x)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(k,function(x){n(null!=x?{title:k}:null)}):null!=d&&d()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,k,n,d,x){x=null!=x?x:0;if(this.isEditable()){var z=mxUtils.bind(this,function(){this.writeFile(b,n,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?z():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(y){this.isRenamable()&&this.getTitle()!=b&&null!=y?this.ui.confirm(mxResources.get("replaceIt",[b]),z,d):this.getLatestVersion(mxUtils.bind(this,function(F){F.getDescriptor()!=
+this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[F]),this.mergeFile(F,mxUtils.bind(this,function(){x>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=d&&d()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,k,n,d,x+1)}))}),d)):z()}),d)}),d)}else null!=n&&n();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",k,"retry",x)};
+StorageFile.prototype.retrySave=function(b){var k=300+300*Math.random();window.setTimeout(b,k);EditorUi.debug("StorageFile.retrySave",[this],"delay",k)};
+StorageFile.prototype.writeFile=function(b,k,n){this.isRenamable()&&(this.title=b);try{var d=this.getDescriptor(),x=this.getData(),z=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(x));this.contentChanged();this.fileSaved(x,d,k,n)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:x.length,lastModified:Date.now(),type:this.type},{title:this.title,data:x}],z,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
+x,z)}catch(y){null!=n&&n(y)}else null!=n&&n()}),["filesInfo","files"])}catch(y){null!=n&&n(y)}};StorageFile.prototype.rename=function(b,k,n){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,k)}),n)});null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),z,n):z()}),n):k()};
+StorageFile.prototype.getLatestVersion=function(b,k){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(n){b(new StorageFile(this.ui,n,this.title))}),k)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
+StorageFile.listLocalStorageFiles=function(b){for(var k=[],n=0;n<localStorage.length;n++){var d=localStorage.key(n),x=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<x.length){var z=(null==b||"F"==b)&&("<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12)),y=(null==b||"L"==b)&&"<mxlibrary>"===x.substring(0,11);(z||y)&&k.push({title:d,type:z?"F":"L",size:x.length,lastModified:Date.now()})}}return k};
+StorageFile.migrate=function(b){var k=StorageFile.listLocalStorageFiles();k.push({title:".scratchpad",type:"L"});var n=b.transaction(["files","filesInfo"],"readwrite");b=n.objectStore("files");n=n.objectStore("filesInfo");for(var d=0;d<k.length;d++){var x=k[d],z=localStorage.getItem(x.title);b.add({title:x.title,data:z});n.add(x)}};
+StorageFile.listFiles=function(b,k,n,d){b.getDatabaseItems(function(x){var z=[];if(null!=x)for(var y=0;y<x.length;y++)"."==x[y].title.charAt(0)||null!=k&&x[y].type!=k||z.push(x[y]);n(z)},function(){null==b.database?n(StorageFile.listLocalStorageFiles(k)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,k,n,d){b.removeDatabaseItem([k,k],n,function(){null==b.database?(localStorage.removeItem(k),n()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,k,n){StorageFile.call(this,b,k,n)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,k,n){this.saveFile(b,!1,k,n)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(b,k,n){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,k,n){DrawioFile.call(this,b,k);this.title=n;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,k,n){RemoteFile.call(this,b,k,n.title);this.libObj=n};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,k,n){};
+RemoteLibrary.prototype.saveAs=function(b,k,n){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,k,n){StorageFile.call(this,b,k,n);b=n;k=b.lastIndexOf("/");0<=k&&(b=b.substring(k+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,k,n){return!1};UrlLibrary.prototype.saveAs=function(b,k,n){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,k,n){DrawioFile.call(this,b,k);this.desc=n||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,l,p){function d(c,f,k,m,t,v){function A(){mxEvent.addListener(E,"click",null!=v?v:function(){k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()}),function(T){b.spinner.stop();b.handleError(T)}):
-(b.setMode(k,!0),l())})}F++;++y>p&&(mxUtils.br(M),y=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height="100px";E.style.whiteSpace="nowrap";E.setAttribute("title",f);var D=document.createElement("div");D.style.textOverflow=
-"ellipsis";D.style.overflow="hidden";D.style.position="absolute";D.style.bottom="8px";D.style.left="0px";D.style.right="0px";mxUtils.write(D,f);E.appendChild(D);if(null!=c){var B=document.createElement("img");B.setAttribute("src",c);B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width="60px";B.style.height="60px";B.style.paddingBottom="6px";E.appendChild(B)}else D.style.paddingTop="5px",D.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top=
-"6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(D),mxUtils.write(D,t[c]);if(null!=m&&null==b[m]){B.style.visibility="hidden";mxUtils.setOpacity(D,10);var S=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});S.spin(E);var R=window.setTimeout(function(){null==b[m]&&(S.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(T,P){null!=b[m]&&P.getProperty("client")==b[m]&&(window.clearTimeout(R),mxUtils.setOpacity(D,100),B.style.visibility="",S.stop(),A(),"drive"==m&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else A();M.appendChild(E)}p=null!=p?p:2;var x=document.createElement("div");x.style.textAlign="center";x.style.whiteSpace="nowrap";x.style.paddingTop="0px";x.style.paddingBottom="20px";var z=document.createElement("div");z.style.border="1px solid #d3d3d3";z.style.borderWidth="1px 0px 1px 0px";
-z.style.padding="10px 0px 20px 0px";var y=0,F=0,M=document.createElement("div");M.style.paddingTop="2px";z.appendChild(M);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");x.appendChild(L);x.appendChild(z);y=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
+var StorageDialog=function(b,k,n){function d(c,f,l,m,t,v){function B(){mxEvent.addListener(E,"click",null!=v?v:function(){l==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);k()})):l==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(l,!0);k()}),function(T){b.spinner.stop();b.handleError(T)}):
+(b.setMode(l,!0),k())})}F++;++y>n&&(mxUtils.br(N),y=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height="100px";E.style.whiteSpace="nowrap";E.setAttribute("title",f);var D=document.createElement("div");D.style.textOverflow=
+"ellipsis";D.style.overflow="hidden";D.style.position="absolute";D.style.bottom="8px";D.style.left="0px";D.style.right="0px";mxUtils.write(D,f);E.appendChild(D);if(null!=c){var A=document.createElement("img");A.setAttribute("src",c);A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="60px";A.style.height="60px";A.style.paddingBottom="6px";E.appendChild(A)}else D.style.paddingTop="5px",D.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top=
+"6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(D),mxUtils.write(D,t[c]);if(null!=m&&null==b[m]){A.style.visibility="hidden";mxUtils.setOpacity(D,10);var S=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});S.spin(E);var R=window.setTimeout(function(){null==b[m]&&(S.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(T,P){null!=b[m]&&P.getProperty("client")==b[m]&&(window.clearTimeout(R),mxUtils.setOpacity(D,100),A.style.visibility="",S.stop(),B(),"drive"==m&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else B();N.appendChild(E)}n=null!=n?n:2;var x=document.createElement("div");x.style.textAlign="center";x.style.whiteSpace="nowrap";x.style.paddingTop="0px";x.style.paddingBottom="20px";var z=document.createElement("div");z.style.border="1px solid #d3d3d3";z.style.borderWidth="1px 0px 1px 0px";
+z.style.padding="10px 0px 20px 0px";var y=0,F=0,N=document.createElement("div");N.style.paddingTop="2px";z.appendChild(N);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");x.appendChild(L);x.appendChild(z);y=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");z=document.createElement("span");z.style.position="absolute";z.style.cursor="pointer";z.style.bottom="27px";z.style.color="gray";z.style.userSelect="none";z.style.textAlign="center";z.style.left="50%";mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,0)");mxUtils.write(z,mxResources.get("decideLater"));
x.appendChild(z);mxEvent.addListener(z,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(K.style.padding="7px",K.style.fontSize="9pt",K.style.marginTop="-14px",K.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
-mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",x.appendChild(K))},5E3);this.container=x},SplashDialog=function(b){var l=document.createElement("div");l.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var p=b.addLanguageMenu(l,!1,"28px");null!=p&&(p.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=
-"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var x=document.createElement("div");x.style.margin="8px 0px 0px 0px";x.style.padding="18px 0px 24px 0px";p="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",p=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",p=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",p=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
-(d.src=IMAGE_PATH+"/github-logo.svg",p=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",p=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",p=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",p=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",x.style.paddingBottom="10px",x.style.paddingTop="30px",p=mxResources.get("device"));var z=document.createElement("button");
-z.className="geBigButton";z.style.marginBottom="8px";z.style.fontSize="18px";z.style.padding="10px";z.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)x.style.padding="42px 0px 10px 0px",z.style.marginBottom="12px";else{x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";var y=document.createElement("table"),F=document.createElement("tbody"),M=document.createElement("tr"),K=document.createElement("td"),L=document.createElement("td");y.setAttribute("align",
-"center");K.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,p);L.style.textAlign="left";L.appendChild(d);M.appendChild(K);M.appendChild(L);F.appendChild(M);y.appendChild(F);l.appendChild(y);p=document.createElement("span");p.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0)");mxUtils.write(p,
-mxResources.get("changeStorage"));mxEvent.addListener(p,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});l.appendChild(p)}mxUtils.write(z,mxResources.get("createNewDiagram"));mxEvent.addListener(z,"click",function(){b.hideDialog();b.actions.get("new").funct()});x.appendChild(z);mxUtils.br(x);z=document.createElement("button");z.className="geBigButton";z.style.marginBottom="22px";z.style.fontSize="18px";z.style.padding="10px";z.style.width="340px";mxUtils.write(z,
+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",x.appendChild(K))},5E3);this.container=x},SplashDialog=function(b){var k=document.createElement("div");k.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var n=b.addLanguageMenu(k,!1,"28px");null!=n&&(n.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=
+"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var x=document.createElement("div");x.style.margin="8px 0px 0px 0px";x.style.padding="18px 0px 24px 0px";n="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",n=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",n=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",n=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
+(d.src=IMAGE_PATH+"/github-logo.svg",n=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",n=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",n=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",n=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",x.style.paddingBottom="10px",x.style.paddingTop="30px",n=mxResources.get("device"));var z=document.createElement("button");
+z.className="geBigButton";z.style.marginBottom="8px";z.style.fontSize="18px";z.style.padding="10px";z.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)x.style.padding="42px 0px 10px 0px",z.style.marginBottom="12px";else{x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";var y=document.createElement("table"),F=document.createElement("tbody"),N=document.createElement("tr"),K=document.createElement("td"),L=document.createElement("td");y.setAttribute("align",
+"center");K.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,n);L.style.textAlign="left";L.appendChild(d);N.appendChild(K);N.appendChild(L);F.appendChild(N);y.appendChild(F);k.appendChild(y);n=document.createElement("span");n.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");mxUtils.write(n,
+mxResources.get("changeStorage"));mxEvent.addListener(n,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});k.appendChild(n)}mxUtils.write(z,mxResources.get("createNewDiagram"));mxEvent.addListener(z,"click",function(){b.hideDialog();b.actions.get("new").funct()});x.appendChild(z);mxUtils.br(x);z=document.createElement("button");z.className="geBigButton";z.style.marginBottom="22px";z.style.fontSize="18px";z.style.padding="10px";z.style.width="340px";mxUtils.write(z,
mxResources.get("openExistingDiagram"));mxEvent.addListener(z,"click",function(){b.actions.get("open").funct()});x.appendChild(z);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(p=function(k){z.style.marginBottom="24px";var m=document.createElement("a");m.style.display="inline-block";m.style.color="gray";m.style.cursor="pointer";m.style.marginTop="6px";mxUtils.write(m,mxResources.get("signOut"));z.style.marginBottom="16px";x.style.paddingBottom="18px";mxEvent.addListener(m,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){k()})});x.appendChild(m)},b.mode==App.MODE_GOOGLE&&
-null!=b.drive){var c=b.drive.getUsersList();if(0<c.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");z.style.marginBottom="16px";x.style.paddingBottom="18px";x.appendChild(d);var f=document.createElement("select");f.style.marginLeft="4px";f.style.width="140px";for(p=0;p<c.length;p++)y=document.createElement("option"),mxUtils.write(y,c[p].displayName),y.value=p,f.appendChild(y),y=document.createElement("option"),y.innerHTML="&nbsp;&nbsp;&nbsp;",
-mxUtils.write(y,"<"+c[p].email+">"),y.setAttribute("disabled","disabled"),f.appendChild(y);y=document.createElement("option");mxUtils.write(y,mxResources.get("addAccount"));y.value=c.length;f.appendChild(y);mxEvent.addListener(f,"change",function(){var k=f.value,m=c.length!=k;m&&b.drive.setUser(c[k]);b.drive.authorize(m,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(t){b.handleError(t,null,function(){b.hideDialog();b.showSplash()})},!0)});x.appendChild(f)}else p(function(){b.drive.logout()})}else b.mode!=
-App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?p(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?p(function(){b.gitLab.logout();var k=document.createElement("form");k.setAttribute("method","post");k.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");k.setAttribute("target","_blank");document.body.appendChild(k);k.submit();k.parentNode.removeChild(k)}):b.mode==App.MODE_TRELLO&&
-null!=b.trello?b.trello.isAuthorized()&&p(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&p(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):p(function(){b.oneDrive.logout()});l.appendChild(x);this.container=l},EmbedDialog=function(b,l,p,d,x,z,y,F,M){d=document.createElement("div");var K=/^https?:\/\//.test(l)||/^mailto:\/\//.test(l);null!=z?mxUtils.write(d,z):mxUtils.write(d,mxResources.get(5E5>l.length?K?"link":"mainEmbedNotice":"preview")+":");
-mxUtils.br(d);z=document.createElement("div");z.style.position="absolute";z.style.top="30px";z.style.right="30px";z.style.color="gray";mxUtils.write(z,b.formatFileSize(l.length));d.appendChild(z);var L=document.createElement("textarea");L.setAttribute("autocomplete","off");L.setAttribute("autocorrect","off");L.setAttribute("autocapitalize","off");L.setAttribute("spellcheck","false");L.style.fontFamily="monospace";L.style.wordBreak="break-all";L.style.marginTop="10px";L.style.resize="none";L.style.height=
-"150px";L.style.width="440px";L.style.border="1px solid gray";L.value=mxResources.get("updatingDocument");d.appendChild(L);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>l.length?(L.value=l,L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):(L.setAttribute("readonly","true"),L.value=mxResources.get("tooLargeUseDownload"))},0)};z=document.createElement("div");z.style.position="absolute";z.style.bottom="36px";
-z.style.right="32px";y=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(y=mxUtils.button(null!=F?F:mxResources.get(5E5>l.length?"preview":"openInNewWindow"),function(){var f=5E5>l.length?L.value:l;if(null!=x)x(f);else if(K)try{var k=b.openLink(f);null!=k&&(null==p||0<p)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=k.location.href&&k.location.href.substring(0,
-8)!=f.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),p||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var m=window.open();m=null!=m?m.document:null;null!=m?(m.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==l.substring(0,7)?l:mxUtils.htmlEntities(l))+"</body></html>"),m.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
-y.className="geBtn",z.appendChild(y));if(!K||7500<l.length)F=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=M?M:"embed.txt","txt",l,"text/plain")}),F.className="geBtn",z.appendChild(F);if(!b.isOffline()&&5E5>l.length){F=mxUtils.button("",function(){try{var f="mailto:?subject="+encodeURIComponent(M||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(f)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});
+mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(n=function(l){z.style.marginBottom="24px";var m=document.createElement("a");m.style.display="inline-block";m.style.color="gray";m.style.cursor="pointer";m.style.marginTop="6px";mxUtils.write(m,mxResources.get("signOut"));z.style.marginBottom="16px";x.style.paddingBottom="18px";mxEvent.addListener(m,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){l()})});x.appendChild(m)},b.mode==App.MODE_GOOGLE&&
+null!=b.drive){var c=b.drive.getUsersList();if(0<c.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");z.style.marginBottom="16px";x.style.paddingBottom="18px";x.appendChild(d);var f=document.createElement("select");f.style.marginLeft="4px";f.style.width="140px";for(n=0;n<c.length;n++)y=document.createElement("option"),mxUtils.write(y,c[n].displayName),y.value=n,f.appendChild(y),y=document.createElement("option"),y.innerHTML="&nbsp;&nbsp;&nbsp;",
+mxUtils.write(y,"<"+c[n].email+">"),y.setAttribute("disabled","disabled"),f.appendChild(y);y=document.createElement("option");mxUtils.write(y,mxResources.get("addAccount"));y.value=c.length;f.appendChild(y);mxEvent.addListener(f,"change",function(){var l=f.value,m=c.length!=l;m&&b.drive.setUser(c[l]);b.drive.authorize(m,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(t){b.handleError(t,null,function(){b.hideDialog();b.showSplash()})},!0)});x.appendChild(f)}else n(function(){b.drive.logout()})}else b.mode!=
+App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?n(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?n(function(){b.gitLab.logout();var l=document.createElement("form");l.setAttribute("method","post");l.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");l.setAttribute("target","_blank");document.body.appendChild(l);l.submit();l.parentNode.removeChild(l)}):b.mode==App.MODE_TRELLO&&
+null!=b.trello?b.trello.isAuthorized()&&n(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&n(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):n(function(){b.oneDrive.logout()});k.appendChild(x);this.container=k},EmbedDialog=function(b,k,n,d,x,z,y,F,N){d=document.createElement("div");var K=/^https?:\/\//.test(k)||/^mailto:\/\//.test(k);null!=z?mxUtils.write(d,z):mxUtils.write(d,mxResources.get(5E5>k.length?K?"link":"mainEmbedNotice":"preview")+":");
+mxUtils.br(d);z=document.createElement("div");z.style.position="absolute";z.style.top="30px";z.style.right="30px";z.style.color="gray";mxUtils.write(z,b.formatFileSize(k.length));d.appendChild(z);var L=document.createElement("textarea");L.setAttribute("autocomplete","off");L.setAttribute("autocorrect","off");L.setAttribute("autocapitalize","off");L.setAttribute("spellcheck","false");L.style.fontFamily="monospace";L.style.wordBreak="break-all";L.style.marginTop="10px";L.style.resize="none";L.style.height=
+"150px";L.style.width="440px";L.style.border="1px solid gray";L.value=mxResources.get("updatingDocument");d.appendChild(L);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>k.length?(L.value=k,L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):(L.setAttribute("readonly","true"),L.value=mxResources.get("tooLargeUseDownload"))},0)};z=document.createElement("div");z.style.position="absolute";z.style.bottom="36px";
+z.style.right="32px";y=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(y=mxUtils.button(null!=F?F:mxResources.get(5E5>k.length?"preview":"openInNewWindow"),function(){var f=5E5>k.length?L.value:k;if(null!=x)x(f);else if(K)try{var l=b.openLink(f);null!=l&&(null==n||0<n)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,
+8)!=f.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),n||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var m=window.open();m=null!=m?m.document:null;null!=m?(m.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==k.substring(0,7)?k:mxUtils.htmlEntities(k))+"</body></html>"),m.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
+y.className="geBtn",z.appendChild(y));if(!K||7500<k.length)F=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=N?N:"embed.txt","txt",k,"text/plain")}),F.className="geBtn",z.appendChild(F);if(!b.isOffline()&&5E5>k.length){F=mxUtils.button("",function(){try{var f="mailto:?subject="+encodeURIComponent(N||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(f)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});
var c=document.createElement("img");c.className="geAdaptiveAsset";c.setAttribute("src",Editor.mailImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");c.style.marginBottom="5px";F.appendChild(c);F.style.verticalAlign="bottom";F.style.paddingTop="4px";F.style.minWidth="46px";F.className="geBtn";z.appendChild(F)}F=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});z.appendChild(F);c=mxUtils.button(mxResources.get("copy"),function(){L.focus();
-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>l.length?mxClient.IS_SF||null!=document.documentMode?F.className="geBtn gePrimaryBtn":(z.appendChild(c),c.className="geBtn gePrimaryBtn",F.className="geBtn"):null!=y&&(z.appendChild(y),F.className="geBtn",y.className="geBtn gePrimaryBtn");d.appendChild(z);this.container=d};EmbedDialog.showPreviewOption=!0;
-var CreateGraphDialog=function(b,l,p){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var x=document.createElement("div");x.style.position="relative";x.style.border="1px solid gray";x.style.boxSizing="border-box";x.style.width="100%";x.style.height="360px";x.style.overflow="hidden";x.style.marginBottom="16px";mxEvent.disableContextMenu(x);d.appendChild(x);var z=new Graph(x);z.setCellsCloneable(!0);z.setPanning(!0);z.setAllowDanglingEdges(!1);z.connectionHandler.select=
-!1;z.view.setTranslate(20,20);z.border=20;z.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=z.view.getDrawPane()&&(x=z.view.getDrawPane().ownerSVGElement,null!=x&&(x.style.position="absolute"));var y="curved=1;";z.cellRenderer.installCellOverlayListeners=function(m,t,v){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(v.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(A){t.fireEvent(new mxEventObject("pointerdown","event",A,
-"state",m))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(v.node,"touchstart",function(A){t.fireEvent(new mxEventObject("pointerdown","event",A,"state",m))})};z.getAllConnectionConstraints=function(){return null};z.connectionHandler.marker.highlight.keepOnTop=!1;z.connectionHandler.createEdgeState=function(m){m=z.createEdge(null,null,null,null,null,y);return new mxCellState(this.graph.view,m,this.graph.getCellStyle(m))};var F=z.getDefaultParent(),M=mxUtils.bind(this,function(m){var t=
-new mxCellOverlay(this.connectImage,"Add outgoing");t.cursor="hand";t.addListener(mxEvent.CLICK,function(v,A){z.connectionHandler.reset();z.clearSelection();var E=z.getCellGeometry(m),D;c(function(){D=z.insertVertex(F,null,"Entry",E.x,E.y,80,30,"rounded=1;");M(D);z.view.refresh(D);z.insertEdge(F,null,"",m,D,y)},function(){z.scrollCellToVisible(D)})});t.addListener("pointerdown",function(v,A){v=A.getProperty("event");A=A.getProperty("state");z.popupMenuHandler.hideMenu();z.stopEditing(!1);var E=mxUtils.convertPoint(z.container,
-mxEvent.getClientX(v),mxEvent.getClientY(v));z.connectionHandler.start(A,E.x,E.y);z.isMouseDown=!0;z.isMouseTrigger=mxEvent.isMouseEvent(v);mxEvent.consume(v)});z.addCellOverlay(m,t)});z.getModel().beginUpdate();try{var K=z.insertVertex(F,null,"Start",0,0,80,30,"ellipse");M(K)}finally{z.getModel().endUpdate()}if("horizontalTree"==p){var L=new mxCompactTreeLayout(z);L.edgeRouting=!1;L.levelDistance=30;L.sortEdges=!0;y="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==p?(L=new mxCompactTreeLayout(z,
-!1),L.edgeRouting=!1,L.levelDistance=30,L.sortEdges=!0,y="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==p?(L=new mxRadialTreeLayout(z,!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==p?L=new mxHierarchicalLayout(z,mxConstants.DIRECTION_NORTH):"horizontalFlow"==p?L=new mxHierarchicalLayout(z,mxConstants.DIRECTION_WEST):"circle"==p?L=new mxCircleLayout(z):(L=new mxFastOrganicLayout(z,!1),L.forceConstant=80);if(null!=L){var c=function(m,t){z.getModel().beginUpdate();try{null!=m&&m(),
-L.execute(z.getDefaultParent(),K)}catch(v){throw v;}finally{m=new mxMorphing(z),m.addListener(mxEvent.DONE,mxUtils.bind(this,function(){z.getModel().endUpdate();null!=t&&t()})),m.startAnimation()}},f=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(m,t,v,A,E){f.apply(this,arguments);c()};z.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);c()};z.connectionHandler.addListener(mxEvent.CONNECT,function(){c()})}x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
-function(){b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);var k=mxUtils.button(mxResources.get("insert"),function(m){z.clearCellOverlays();var t=z.getModel().getChildren(z.getDefaultParent());m=mxEvent.isAltDown(m)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(t,!0));t=b.editor.graph.importCells(t,m.x,m.y);m=b.editor.graph.view;var v=m.getBounds(t);null!=v&&(v.x-=m.translate.x,v.y-=m.translate.y,b.editor.graph.scrollRectToVisible(v),
-b.editor.graph.setSelectionCells(t));b.hideDialog()});d.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(x);this.graph=z};this.container=d};
+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>k.length?mxClient.IS_SF||null!=document.documentMode?F.className="geBtn gePrimaryBtn":(z.appendChild(c),c.className="geBtn gePrimaryBtn",F.className="geBtn"):null!=y&&(z.appendChild(y),F.className="geBtn",y.className="geBtn gePrimaryBtn");d.appendChild(z);this.container=d};EmbedDialog.showPreviewOption=!0;
+var CreateGraphDialog=function(b,k,n){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var x=document.createElement("div");x.style.position="relative";x.style.border="1px solid gray";x.style.boxSizing="border-box";x.style.width="100%";x.style.height="360px";x.style.overflow="hidden";x.style.marginBottom="16px";mxEvent.disableContextMenu(x);d.appendChild(x);var z=new Graph(x);z.setCellsCloneable(!0);z.setPanning(!0);z.setAllowDanglingEdges(!1);z.connectionHandler.select=
+!1;z.view.setTranslate(20,20);z.border=20;z.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=z.view.getDrawPane()&&(x=z.view.getDrawPane().ownerSVGElement,null!=x&&(x.style.position="absolute"));var y="curved=1;";z.cellRenderer.installCellOverlayListeners=function(m,t,v){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(v.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){t.fireEvent(new mxEventObject("pointerdown","event",B,
+"state",m))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(v.node,"touchstart",function(B){t.fireEvent(new mxEventObject("pointerdown","event",B,"state",m))})};z.getAllConnectionConstraints=function(){return null};z.connectionHandler.marker.highlight.keepOnTop=!1;z.connectionHandler.createEdgeState=function(m){m=z.createEdge(null,null,null,null,null,y);return new mxCellState(this.graph.view,m,this.graph.getCellStyle(m))};var F=z.getDefaultParent(),N=mxUtils.bind(this,function(m){var t=
+new mxCellOverlay(this.connectImage,"Add outgoing");t.cursor="hand";t.addListener(mxEvent.CLICK,function(v,B){z.connectionHandler.reset();z.clearSelection();var E=z.getCellGeometry(m),D;c(function(){D=z.insertVertex(F,null,"Entry",E.x,E.y,80,30,"rounded=1;");N(D);z.view.refresh(D);z.insertEdge(F,null,"",m,D,y)},function(){z.scrollCellToVisible(D)})});t.addListener("pointerdown",function(v,B){v=B.getProperty("event");B=B.getProperty("state");z.popupMenuHandler.hideMenu();z.stopEditing(!1);var E=mxUtils.convertPoint(z.container,
+mxEvent.getClientX(v),mxEvent.getClientY(v));z.connectionHandler.start(B,E.x,E.y);z.isMouseDown=!0;z.isMouseTrigger=mxEvent.isMouseEvent(v);mxEvent.consume(v)});z.addCellOverlay(m,t)});z.getModel().beginUpdate();try{var K=z.insertVertex(F,null,"Start",0,0,80,30,"ellipse");N(K)}finally{z.getModel().endUpdate()}if("horizontalTree"==n){var L=new mxCompactTreeLayout(z);L.edgeRouting=!1;L.levelDistance=30;L.sortEdges=!0;y="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==n?(L=new mxCompactTreeLayout(z,
+!1),L.edgeRouting=!1,L.levelDistance=30,L.sortEdges=!0,y="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==n?(L=new mxRadialTreeLayout(z,!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==n?L=new mxHierarchicalLayout(z,mxConstants.DIRECTION_NORTH):"horizontalFlow"==n?L=new mxHierarchicalLayout(z,mxConstants.DIRECTION_WEST):"circle"==n?L=new mxCircleLayout(z):(L=new mxFastOrganicLayout(z,!1),L.forceConstant=80);if(null!=L){var c=function(m,t){z.getModel().beginUpdate();try{null!=m&&m(),
+L.execute(z.getDefaultParent(),K)}catch(v){throw v;}finally{m=new mxMorphing(z),m.addListener(mxEvent.DONE,mxUtils.bind(this,function(){z.getModel().endUpdate();null!=t&&t()})),m.startAnimation()}},f=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(m,t,v,B,E){f.apply(this,arguments);c()};z.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);c()};z.connectionHandler.addListener(mxEvent.CONNECT,function(){c()})}x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),
+function(){b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);var l=mxUtils.button(mxResources.get("insert"),function(m){z.clearCellOverlays();var t=z.getModel().getChildren(z.getDefaultParent());m=mxEvent.isAltDown(m)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(t,!0));t=b.editor.graph.importCells(t,m.x,m.y);m=b.editor.graph.view;var v=m.getBounds(t);null!=v&&(v.x-=m.translate.x,v.y-=m.translate.y,b.editor.graph.scrollRectToVisible(v),
+b.editor.graph.setSelectionCells(t));b.hideDialog()});d.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(x);this.graph=z};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==",26,
26);
-var BackgroundImageDialog=function(b,l,p,d,x){function z(){null==u||u==mxConstants.NONE?(q.style.display="none",T.checked=!1):(q.style.backgroundColor=u,q.style.display="",T.checked=!0)}var y=b.editor.graph,F=document.createElement("div");F.style.whiteSpace="nowrap";var M=document.createElement("h2");mxUtils.write(M,mxResources.get("background"));M.style.marginTop="0px";F.appendChild(M);var K=null!=p&&null!=p.originalSrc;M=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value",
-"url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.width="360px";f.value=K||null==p?"":p.src;var k=document.createElement("select");k.style.width="360px";
-if(null!=b.pages)for(var m=0;m<b.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+b.pages[m].getId());b.pages[m]==b.currentPage&&t.setAttribute("disabled","disabled");null!=p&&p.originalSrc==t.getAttribute("value")&&(t.setAttribute("selected","selected"),M=!0);k.appendChild(t)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",c.style.display="none",k.style.display=
-"none");var v=document.createElement("option"),A=!1,E=!1,D=function(G,H){A||null!=G&&E||(c.checked?null!=H&&H(v.selected?null:k.value):""==f.value||b.isOffline()?(S.value="",R.value="",null!=H&&H("")):(f.value=mxUtils.trim(f.value),b.loadImage(f.value,function(g){S.value=g.width;R.value=g.height;null!=H&&H(f.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));S.value="";R.value="";null!=H&&H(null)})))},B=mxUtils.bind(this,function(G){b.importFiles(G,
-0,0,b.maxBackgroundSize,function(H,g,n,C,I,N){f.value=H;D();f.focus()},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var g=0;g<H.length;g++)H[g]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?k.focus():f.focus();mxEvent.addListener(k,"focus",function(){L.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");L.setAttribute("checked","checked");
+var BackgroundImageDialog=function(b,k,n,d,x){function z(){null==u||u==mxConstants.NONE?(q.style.display="none",T.checked=!1):(q.style.backgroundColor=u,q.style.display="",T.checked=!0)}var y=b.editor.graph,F=document.createElement("div");F.style.whiteSpace="nowrap";var N=document.createElement("h2");mxUtils.write(N,mxResources.get("background"));N.style.marginTop="0px";F.appendChild(N);var K=null!=n&&null!=n.originalSrc;N=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value",
+"url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.width="360px";f.value=K||null==n?"":n.src;var l=document.createElement("select");l.style.width="360px";
+if(null!=b.pages)for(var m=0;m<b.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+b.pages[m].getId());b.pages[m]==b.currentPage&&t.setAttribute("disabled","disabled");null!=n&&n.originalSrc==t.getAttribute("value")&&(t.setAttribute("selected","selected"),N=!0);l.appendChild(t)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",c.style.display="none",l.style.display=
+"none");var v=document.createElement("option"),B=!1,E=!1,D=function(G,H){B||null!=G&&E||(c.checked?null!=H&&H(v.selected?null:l.value):""==f.value||b.isOffline()?(S.value="",R.value="",null!=H&&H("")):(f.value=mxUtils.trim(f.value),b.loadImage(f.value,function(g){S.value=g.width;R.value=g.height;null!=H&&H(f.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));S.value="";R.value="";null!=H&&H(null)})))},A=mxUtils.bind(this,function(G){b.importFiles(G,
+0,0,b.maxBackgroundSize,function(H,g,p,C,I,M){f.value=H;D();f.focus()},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var g=0;g<H.length;g++)H[g]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?l.focus():f.focus();mxEvent.addListener(l,"focus",function(){L.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");L.setAttribute("checked","checked");
L.checked=!0});if(Graph.fileSupport){f.setAttribute("placeholder",mxResources.get("dragImagesHere"));var G=F.parentNode,H=null;mxEvent.addListener(G,"dragleave",function(g){null!=H&&(H.parentNode.removeChild(H),H=null);g.stopPropagation();g.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(g){null==H&&(H=b.highlightElement(G));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(g){null!=H&&(H.parentNode.removeChild(H),H=null);
-if(0<g.dataTransfer.files.length)B(g.dataTransfer.files);else if(0<=mxUtils.indexOf(g.dataTransfer.types,"text/uri-list")){var n=g.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)&&(f.value=decodeURIComponent(n),D())}g.stopPropagation();g.preventDefault()}),!1)}};F.appendChild(L);F.appendChild(f);mxUtils.br(F);m=document.createElement("span");m.style.marginLeft="30px";mxUtils.write(m,mxResources.get("width")+":");F.appendChild(m);var S=document.createElement("input");
-S.setAttribute("type","text");S.style.width="60px";S.style.marginLeft="8px";S.style.marginRight="16px";S.value=null==p||K?"":p.width;F.appendChild(S);mxUtils.write(F,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==p||K?"":p.height;F.appendChild(R);mxUtils.br(F);mxUtils.br(F);mxEvent.addListener(f,"change",D);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&
-null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],null!=G&&(f.value=G.url,D()));f.focus()};F.appendChild(c);F.appendChild(k);mxUtils.br(F);mxUtils.br(F);K?(c.setAttribute("checked","checked"),c.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!M&&c.checked&&(mxUtils.write(v,mxResources.get("pageNotFound")),v.setAttribute("disabled","disabled"),v.setAttribute("selected","selected"),v.setAttribute("value","pageNotFound"),k.appendChild(v),mxEvent.addListener(k,
-"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)}));p=document.createElement("div");p.style.display=x?"inline-flex":"none";p.style.alignItems="center";p.style.cursor="default";p.style.minWidth="40%";p.style.height="20px";var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px 10px 0px 4px";T.style.verticalAlign="bottom";T.defaultChecked=d!=mxConstants.NONE&&null!=d;T.checked=T.defaultChecked;p.appendChild(T);mxUtils.write(p,mxResources.get("fillColor"));
-x=p.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=y.shadowVisible;P.checked=P.defaultChecked;x.appendChild(P);mxUtils.write(x,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(x,"click",function(G){mxEvent.getSource(G)!=P&&(P.checked=!P.checked)});var q=document.createElement("button");q.style.width="36px";q.style.height=
-"18px";q.style.cursor="pointer";q.style.marginLeft="10px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.verticalAlign="bottom";q.className="geColorBtn";var u=d;z();mxEvent.addListener(p,"click",function(G){mxEvent.getSource(G)!=T&&(T.checked=!T.checked);u=T.checked?"#ffffff":null;z()});mxEvent.addListener(q,"click",function(G){b.pickColor(u||"none",function(H){u=H;z()});mxEvent.consume(G)});p.appendChild(q);F.appendChild(p);F.appendChild(x);mxUtils.br(F);
-d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){A=!0;b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&d.appendChild(y);x=mxUtils.button(mxResources.get("reset"),function(){f.value="";S.value="";R.value="";L.checked=!0;u=mxConstants.NONE;z();A=!1});mxEvent.addGestureListeners(x,function(){A=!0});x.className="geBtn";x.width="100";d.appendChild(x);if(Graph.fileSupport){var J=document.createElement("input");
-J.setAttribute("multiple","multiple");J.setAttribute("type","file");mxEvent.addListener(J,"change",function(G){null!=J.files&&(B(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";F.appendChild(J);x=mxUtils.button(mxResources.get("open"),function(){J.click()});x.className="geBtn";d.appendChild(x)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();D(null,function(G){l(""!=G&&null!=G?new mxImage(G,S.value,R.value):null,null==G,u,!mxClient.IS_SVG||mxClient.IS_SF?
-null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){E=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(y);F.appendChild(d);this.container=F},ParseDialog=function(b,l,p){function d(k,m,t){var v=k.split("\n");if("plantUmlPng"==m||"plantUmlSvg"==m||"plantUmlTxt"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var A=function(n,C,I,N,O){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,N,O));var Q=
-null;E.getModel().beginUpdate();try{Q="txt"==C?b.insertAsPreText(I,z.x,z.y):E.insertVertex(null,null,null,z.x,z.y,N,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(I)+";"),E.setAttributeForCell(Q,"plantUmlData",JSON.stringify({data:n,format:C},null,2))}finally{E.getModel().endUpdate()}null!=Q&&(E.setSelectionCell(Q),E.scrollCellToVisible(Q))},E=b.editor.graph,D="plantUmlTxt"==m?"txt":"plantUmlPng"==m?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-k&&"svg"==D?window.setTimeout(function(){b.spinner.stop();A(k,D,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(k,D,function(n,C,I){b.spinner.stop();A(k,D,n,C,I)},function(n){b.handleError(n)})}}else if("mermaid"==m||"mermaid2drawio"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var B=0;B<v.length&&(0==v[B].trim().length||"%%"==v[B].substring(0,2));)B++;if("---"==v[B].trim()){do B++;while(B<v.length&&"---"!=v[B].trim());B++}B=v[B].trim().toLowerCase();v=B.indexOf(" ");B=B.substring(0,0<v?v:B.length);var S="undefined"!==typeof mxMermaidToDrawio&&
-"mermaid2drawio"==m&&("graph"==B||"flowchart"==B||"sequencediagram"==B||"classdiagram"==B||"statediagram-v2"==B||"statediagram"==B||"erdiagram"==B||"requirementdiagram"==B||"gitgraph"==B||"mindmap"==B||"journey"==B);E=b.editor.graph;S&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(n){b.spinner.stop();E.setSelectionCells(b.importXml(n,Math.max(z.x,20),Math.max(z.y,20),!0,null,null,!0));E.scrollCellToVisible(E.getSelectionCell())}));b.generateMermaidImage(k,null,function(n,C,I){if(!S){z=
-mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,C,I));b.spinner.stop();var N=null;E.getModel().beginUpdate();try{N=E.insertVertex(null,null,null,z.x,z.y,C,I,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+n+";"),E.setAttributeForCell(N,"mermaidData",JSON.stringify({data:k},null,2))}finally{E.getModel().endUpdate()}null!=N&&(E.setSelectionCell(N),E.scrollCellToVisible(N))}},function(n){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(n)})}}else if("table"==
-m){m=null;var R=[],T=0,P={};for(B=0;B<v.length;B++){var q=mxUtils.trim(v[B]);if("primary key"==q.substring(0,11).toLowerCase()){var u=q.match(/\((.+)\)/);u&&u[1]&&(P[u[1]]=!0);v.splice(B,1)}else 0<q.toLowerCase().indexOf("primary key")&&(P[q.split(" ")[0]]=!0,v[B]=mxUtils.trim(q.replace(/primary key/i,"")))}for(B=0;B<v.length;B++)if(q=mxUtils.trim(v[B]),"create table"==q.substring(0,12).toLowerCase())q=mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=mxUtils.trim(q.substring(0,q.length-
+if(0<g.dataTransfer.files.length)A(g.dataTransfer.files);else if(0<=mxUtils.indexOf(g.dataTransfer.types,"text/uri-list")){var p=g.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(p)&&(f.value=decodeURIComponent(p),D())}g.stopPropagation();g.preventDefault()}),!1)}};F.appendChild(L);F.appendChild(f);mxUtils.br(F);m=document.createElement("span");m.style.marginLeft="30px";mxUtils.write(m,mxResources.get("width")+":");F.appendChild(m);var S=document.createElement("input");
+S.setAttribute("type","text");S.style.width="60px";S.style.marginLeft="8px";S.style.marginRight="16px";S.value=null==n||K?"":n.width;F.appendChild(S);mxUtils.write(F,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==n||K?"":n.height;F.appendChild(R);mxUtils.br(F);mxUtils.br(F);mxEvent.addListener(f,"change",D);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&
+null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],null!=G&&(f.value=G.url,D()));f.focus()};F.appendChild(c);F.appendChild(l);mxUtils.br(F);mxUtils.br(F);K?(c.setAttribute("checked","checked"),c.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!N&&c.checked&&(mxUtils.write(v,mxResources.get("pageNotFound")),v.setAttribute("disabled","disabled"),v.setAttribute("selected","selected"),v.setAttribute("value","pageNotFound"),l.appendChild(v),mxEvent.addListener(l,
+"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)}));n=document.createElement("div");n.style.display=x?"inline-flex":"none";n.style.alignItems="center";n.style.cursor="default";n.style.minWidth="40%";n.style.height="20px";var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px 10px 0px 4px";T.style.verticalAlign="bottom";T.defaultChecked=d!=mxConstants.NONE&&null!=d;T.checked=T.defaultChecked;n.appendChild(T);mxUtils.write(n,mxResources.get("fillColor"));
+x=n.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=y.shadowVisible;P.checked=P.defaultChecked;x.appendChild(P);mxUtils.write(x,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(x,"click",function(G){mxEvent.getSource(G)!=P&&(P.checked=!P.checked)});var q=document.createElement("button");q.style.width="36px";q.style.height=
+"18px";q.style.cursor="pointer";q.style.marginLeft="10px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.verticalAlign="bottom";q.className="geColorBtn";var u=d;z();mxEvent.addListener(n,"click",function(G){mxEvent.getSource(G)!=T&&(T.checked=!T.checked);u=T.checked?"#ffffff":null;z()});mxEvent.addListener(q,"click",function(G){b.pickColor(u||"none",function(H){u=H;z()});mxEvent.consume(G)});n.appendChild(q);F.appendChild(n);F.appendChild(x);mxUtils.br(F);
+d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&d.appendChild(y);x=mxUtils.button(mxResources.get("reset"),function(){f.value="";S.value="";R.value="";L.checked=!0;u=mxConstants.NONE;z();B=!1});mxEvent.addGestureListeners(x,function(){B=!0});x.className="geBtn";x.width="100";d.appendChild(x);if(Graph.fileSupport){var J=document.createElement("input");
+J.setAttribute("multiple","multiple");J.setAttribute("type","file");mxEvent.addListener(J,"change",function(G){null!=J.files&&(A(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";F.appendChild(J);x=mxUtils.button(mxResources.get("open"),function(){J.click()});x.className="geBtn";d.appendChild(x)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();D(null,function(G){k(""!=G&&null!=G?new mxImage(G,S.value,R.value):null,null==G,u,!mxClient.IS_SVG||mxClient.IS_SF?
+null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){E=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(y);F.appendChild(d);this.container=F},ParseDialog=function(b,k,n){function d(l,m,t){var v=l.split("\n");if("plantUmlPng"==m||"plantUmlSvg"==m||"plantUmlTxt"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var B=function(p,C,I,M,O){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,M,O));var Q=
+null;E.getModel().beginUpdate();try{Q="txt"==C?b.insertAsPreText(I,z.x,z.y):E.insertVertex(null,null,null,z.x,z.y,M,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(I)+";"),E.setAttributeForCell(Q,"plantUmlData",JSON.stringify({data:p,format:C},null,2))}finally{E.getModel().endUpdate()}null!=Q&&(E.setSelectionCell(Q),E.scrollCellToVisible(Q))},E=b.editor.graph,D="plantUmlTxt"==m?"txt":"plantUmlPng"==m?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+l&&"svg"==D?window.setTimeout(function(){b.spinner.stop();B(l,D,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(l,D,function(p,C,I){b.spinner.stop();B(l,D,p,C,I)},function(p){b.handleError(p)})}}else if("mermaid"==m||"mermaid2drawio"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var A=0;A<v.length&&(0==v[A].trim().length||"%%"==v[A].substring(0,2));)A++;if("---"==v[A].trim()){do A++;while(A<v.length&&"---"!=v[A].trim());A++}A=v[A].trim().toLowerCase();v=A.indexOf(" ");A=A.substring(0,0<v?v:A.length);var S="undefined"!==typeof mxMermaidToDrawio&&
+"mermaid2drawio"==m&&("graph"==A||"flowchart"==A||"sequencediagram"==A||"classdiagram"==A||"statediagram-v2"==A||"statediagram"==A||"erdiagram"==A||"requirementdiagram"==A||"gitgraph"==A||"mindmap"==A||"journey"==A);E=b.editor.graph;S&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){b.spinner.stop();E.setSelectionCells(b.importXml(p,Math.max(z.x,20),Math.max(z.y,20),!0,null,null,!0));E.scrollCellToVisible(E.getSelectionCell())}));b.generateMermaidImage(l,null,function(p,C,I){if(!S){z=
+mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,C,I));b.spinner.stop();var M=null;E.getModel().beginUpdate();try{M=E.insertVertex(null,null,null,z.x,z.y,C,I,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+p+";"),E.setAttributeForCell(M,"mermaidData",JSON.stringify({data:l},null,2))}finally{E.getModel().endUpdate()}null!=M&&(E.setSelectionCell(M),E.scrollCellToVisible(M))}},function(p){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(p)})}}else if("table"==
+m){m=null;var R=[],T=0,P={};for(A=0;A<v.length;A++){var q=mxUtils.trim(v[A]);if("primary key"==q.substring(0,11).toLowerCase()){var u=q.match(/\((.+)\)/);u&&u[1]&&(P[u[1]]=!0);v.splice(A,1)}else 0<q.toLowerCase().indexOf("primary key")&&(P[q.split(" ")[0]]=!0,v[A]=mxUtils.trim(q.replace(/primary key/i,"")))}for(A=0;A<v.length;A++)if(q=mxUtils.trim(v[A]),"create table"==q.substring(0,12).toLowerCase())q=mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=mxUtils.trim(q.substring(0,q.length-
1))),m=new mxCell(q,new mxGeometry(T,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),m.vertex=!0,R.push(m),q=b.editor.graph.getPreferredSizeForCell(J),null!=q&&(m.geometry.width=q.width+10);else if(null!=m&&")"==q.charAt(0))T+=m.geometry.width+40,m=null;else if("("!=q&&null!=m){q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length);u=P[q.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,
0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(u?"1":"0")+";");J.vertex=!0;var G=new mxCell(u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(u?"fontStyle=1;":""));G.vertex=!0;J.insert(G);q=new mxCell(q,new mxGeometry(30,
0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(u?"fontStyle=5;":""));q.vertex=!0;J.insert(q);q=b.editor.graph.getPreferredSizeForCell(q);null!=q&&m.geometry.width<q.width+30&&(m.geometry.width=Math.min(320,Math.max(m.geometry.width,q.width+30)));m.insert(J,u?0:null);m.geometry.height+=30}0<R.length&&(E=b.editor.graph,z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,
-!0)),E.setSelectionCells(E.importCells(R,z.x,z.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==m){if(0<v.length){E=b.editor.graph;m=null;R=[];for(B=J=0;B<v.length;B++)";"!=v[B].charAt(0)&&(0==v[B].length?m=null:null==m?(m=new mxCell(v[B],new mxGeometry(J,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),m.vertex=!0,R.push(m),q=E.getPreferredSizeForCell(m),
-null!=q&&m.geometry.width<q.width+10&&(m.geometry.width=q.width+10),J+=m.geometry.width+40):"--"==v[B]?(q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),q.vertex=!0,m.geometry.height+=q.geometry.height,m.insert(q)):0<v[B].length&&(T=new mxCell(v[B],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-T.vertex=!0,q=E.getPreferredSizeForCell(T),null!=q&&T.geometry.width<q.width&&(T.geometry.width=q.width),m.geometry.width=Math.max(m.geometry.width,T.geometry.width),m.geometry.height+=T.geometry.height,m.insert(T)));if(0<R.length){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0));E.getModel().beginUpdate();try{R=E.importCells(R,z.x,z.y);q=[];for(B=0;B<R.length;B++)q.push(R[B]),q=q.concat(R[B].children);E.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{E.getModel().endUpdate()}E.setSelectionCells(R);
-E.scrollCellToVisible(E.getSelectionCell())}}}else{J=function(n){var C=H[n];null==C&&(C=new mxCell(n,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),C.vertex=!0,H[n]=C,R.push(C));return C};var H={};R=[];for(B=0;B<v.length;B++)if(";"!=v[B].charAt(0)){var g=v[B].split("->");2<=g.length&&(u=J(g[0]),G=J(g[g.length-1]),g=new mxCell(2<g.length?g[1]:"",new mxGeometry),g.edge=!0,g.geometry.relative=!0,u.insertEdge(g,!0),G.insertEdge(g,!1),R.push(g))}if(0<R.length){v=document.createElement("div");v.style.visibility=
-"hidden";document.body.appendChild(v);E=new Graph(v);E.getModel().beginUpdate();try{R=E.importCells(R);for(B=0;B<R.length;B++)E.getModel().isVertex(R[B])&&(q=E.getPreferredSizeForCell(R[B]),R[B].geometry.width=Math.max(R[B].geometry.width,q.width),R[B].geometry.height=Math.max(R[B].geometry.height,q.height));B=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(E,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),R),B=!1):"circle"==
-m?(new mxCircleLayout(E)).execute(E.getDefaultParent()):(T=new mxFastOrganicLayout(E),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(E.getDefaultParent()));B&&(P=new mxParallelEdgeLayout(E),P.spacing=30,P.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();q=[];b.editor.graph.getModel().beginUpdate();try{R=E.getModel().getChildren(E.getDefaultParent()),z=mxEvent.isAltDown(t)?z:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0)),q=b.editor.graph.importCells(R,
+!0)),E.setSelectionCells(E.importCells(R,z.x,z.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==m){if(0<v.length){E=b.editor.graph;m=null;R=[];for(A=J=0;A<v.length;A++)";"!=v[A].charAt(0)&&(0==v[A].length?m=null:null==m?(m=new mxCell(v[A],new mxGeometry(J,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),m.vertex=!0,R.push(m),q=E.getPreferredSizeForCell(m),
+null!=q&&m.geometry.width<q.width+10&&(m.geometry.width=q.width+10),J+=m.geometry.width+40):"--"==v[A]?(q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),q.vertex=!0,m.geometry.height+=q.geometry.height,m.insert(q)):0<v[A].length&&(T=new mxCell(v[A],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+T.vertex=!0,q=E.getPreferredSizeForCell(T),null!=q&&T.geometry.width<q.width&&(T.geometry.width=q.width),m.geometry.width=Math.max(m.geometry.width,T.geometry.width),m.geometry.height+=T.geometry.height,m.insert(T)));if(0<R.length){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0));E.getModel().beginUpdate();try{R=E.importCells(R,z.x,z.y);q=[];for(A=0;A<R.length;A++)q.push(R[A]),q=q.concat(R[A].children);E.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{E.getModel().endUpdate()}E.setSelectionCells(R);
+E.scrollCellToVisible(E.getSelectionCell())}}}else{J=function(p){var C=H[p];null==C&&(C=new mxCell(p,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),C.vertex=!0,H[p]=C,R.push(C));return C};var H={};R=[];for(A=0;A<v.length;A++)if(";"!=v[A].charAt(0)){var g=v[A].split("->");2<=g.length&&(u=J(g[0]),G=J(g[g.length-1]),g=new mxCell(2<g.length?g[1]:"",new mxGeometry),g.edge=!0,g.geometry.relative=!0,u.insertEdge(g,!0),G.insertEdge(g,!1),R.push(g))}if(0<R.length){v=document.createElement("div");v.style.visibility=
+"hidden";document.body.appendChild(v);E=new Graph(v);E.getModel().beginUpdate();try{R=E.importCells(R);for(A=0;A<R.length;A++)E.getModel().isVertex(R[A])&&(q=E.getPreferredSizeForCell(R[A]),R[A].geometry.width=Math.max(R[A].geometry.width,q.width),R[A].geometry.height=Math.max(R[A].geometry.height,q.height));A=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(E,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),R),A=!1):"circle"==
+m?(new mxCircleLayout(E)).execute(E.getDefaultParent()):(T=new mxFastOrganicLayout(E),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(E.getDefaultParent()));A&&(P=new mxParallelEdgeLayout(E),P.spacing=30,P.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();q=[];b.editor.graph.getModel().beginUpdate();try{R=E.getModel().getChildren(E.getDefaultParent()),z=mxEvent.isAltDown(t)?z:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0)),q=b.editor.graph.importCells(R,
z.x,z.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(q);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());E.destroy();v.parentNode.removeChild(v)}}}function x(){return"list"==F.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==F.value||
"mermaid2drawio"==F.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==F.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==F.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-"plantUmlSvg"==F.value||"plantUmlTxt"==F.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 z=b.editor.graph.getFreeInsertPoint();l=document.createElement("div");var y=document.createElement("textarea");y.style.position="absolute";y.style.left="30px";y.style.right="30px";y.style.top=
-"30px";y.style.bottom="100px";y.style.resize="none";y.setAttribute("wrap","off");y.setAttribute("spellcheck","false");y.setAttribute("autocorrect","off");y.setAttribute("autocomplete","off");y.setAttribute("autocapitalize","off");var F=document.createElement("select");F.className="geBtn";if("formatSql"==p||"mermaid"==p&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())F.style.display="none";var M=document.createElement("option");M.setAttribute("value","list");mxUtils.write(M,mxResources.get("list"));
-"plantUml"!=p&&"mermaid"!=p&&F.appendChild(M);null!=p&&"fromText"!=p||M.setAttribute("selected","selected");M=document.createElement("option");M.setAttribute("value","table");mxUtils.write(M,mxResources.get("formatSql"));"formatSql"==p&&(F.appendChild(M),M.setAttribute("selected","selected"));M=document.createElement("option");M.setAttribute("value","mermaid");mxUtils.write(M,mxResources.get("image"));if("mermaid"==p){if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");
-K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));F.appendChild(K)}else F.style.display="none";F.appendChild(M)}M=document.createElement("option");M.setAttribute("value","diagram");mxUtils.write(M,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,
-mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));"plantUml"!=p&&"mermaid"!=p&&(F.appendChild(M),F.appendChild(K),F.appendChild(L),F.appendChild(c));M=document.createElement("option");M.setAttribute("value","plantUmlSvg");mxUtils.write(M,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==p&&M.setAttribute("selected","selected");K=document.createElement("option");
-K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value","plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==p&&(F.appendChild(M),F.appendChild(K),F.appendChild(L));var f=x();y.value=f;l.appendChild(y);M=document.createElement("div");M.style.position="absolute";M.style.bottom=
-"46px";M.style.right="30px";M.style.left="30px";M.style.justifyContent="end";M.style.display="flex";this.init=function(){y.focus()};Graph.fileSupport&&(y.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),y.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var m=new FileReader;m.onload=function(t){y.value=t.target.result};m.readAsText(k)}},!1));"plantUml"==p&&"https://plant-aws.diagrams.net"==
-window.PLANT_URL&&(K=document.createElement("div"),K.style.display="inline-block",K.style.color="#c00",K.style.fontSize="12px",K.style.marginRight="10px",K.style.display="flex",K.style.alignItems="center",K.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',M.appendChild(K));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=p&&"plantUml"!=p||M.appendChild(b.createHelpIcon("mermaid"==
-p?"https://mermaid.js.org/intro/":"https://plantuml.com/"));M.appendChild(F);mxEvent.addListener(F,"change",function(){var k=x();if(0==y.value.length||y.value==f)f=k,y.value=f});p=mxUtils.button(mxResources.get("close"),function(){y.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});p.className="geBtn";b.editor.cancelFirst&&M.appendChild(p);K=mxUtils.button(mxResources.get("insert"),function(k){try{b.hideDialog(),d(y.value,F.value,k)}catch(m){b.handleError(m)}});
-K.className="geBtn gePrimaryBtn";M.appendChild(K);b.editor.cancelFirst||M.appendChild(p);l.appendChild(M);this.container=l},NewDialog=function(b,l,p,d,x,z,y,F,M,K,L,c,f,k,m,t,v,A,E,D){function B(ha){null!=ha&&(za=Ca=ha?135:140);ha=!0;if(null!=Xa)for(;I<Xa.length&&(ha||0!=mxUtils.mod(I,30));){var ua=Xa[I++];ua=G(ua.url,ua.libs,ua.title,ua.tooltip?ua.tooltip:ua.title,ua.select,ua.imgUrl,ua.info,ua.onClick,ua.preview,ua.noImg,ua.clibs,ua.type);ha&&ua.click();ha=!1}}function S(ha,ua,qa,oa,ra,ya){if(null!=
-ha&&mxUtils.isAncestorNode(document.body,oa)){ha=mxUtils.parseXml(ha);ha=Editor.parseDiagramNode(ha.documentElement,null,!0);var Fa=new mxCodec(ha.ownerDocument),Ja=new mxGraphModel;Fa.decode(ha,Ja);b.sidebar.createTooltip(oa,Ja.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ra?mxResources.get(ra):null,!0,new mxPoint(ua,
-qa),!0,function(){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&P(oa,null,null,ya,infoObj,clibs)},!0,!1)}}function R(){var ha=document.createElement("div");ha.style.position="absolute";ha.style.overflow="visible";ha.style.left="8px";ha.style.right="8px";ha.style.bottom="8px";ha.style.top="8px";mxUtils.write(ha,mxResources.get("describeYourDiagram")+":");mxUtils.br(ha);var ua=document.createElement("input");ua.setAttribute("type","text");ua.setAttribute("placeholder",
-mxResources.get("processForHiringNewEmployee"));ua.style.width="100%";ua.style.marginTop="6px";ua.style.marginBottom="4px";ua.style.boxSizing="border-box";ha.appendChild(ua);ha.init=function(){ua.focus()};mxUtils.br(ha);var qa=document.createElement("div");qa.style.top="86px";qa.style.left="0";qa.style.right="0";qa.style.bottom="0";qa.style.margin="0";qa.style.borderRadius="0";qa.style.width="auto";qa.style.height="auto";qa.style.position="absolute";qa.style.border="1px solid #424242";qa.className=
-"geTemplate";var oa=document.createElement("div");oa.style.boxSizing="border-box";oa.style.position="absolute";oa.style.fontSize="14px";oa.style.textAlign="center";oa.style.top="50%";mxUtils.write(oa,mxResources.get("blankDiagram"));qa.appendChild(oa);var ra=document.createElement("select");ra.className="geBtn";ra.style.maxWidth="160px";ra.style.marginLeft="0px";oa=document.createElement("option");mxUtils.write(oa,mxResources.get("diagramType"));oa.setAttribute("value","");ra.appendChild(oa);for(var ya=
-0;ya<EditorUi.mermaidDiagramTypes.length;ya++){oa=document.createElement("option");var Fa=EditorUi.mermaidDiagramTypes[ya],Ja=Fa;Fa==urlParams["smart-template-type"]&&oa.setAttribute("selected","selected");"erDiagram"==Ja&&(Ja="entityRelationshipDiagram");Ja=mxResources.get(Ja,null,Ja.charAt(0).toUpperCase()+Ja.substring(1).replace(/[A-Z]/g," $&"));oa.setAttribute("value",Fa);mxUtils.write(oa,Ja);ra.appendChild(oa)}var Ma=mxUtils.button(mxResources.get("generate"),function(){var Ua=ua.value,Ra=ra.value.replace(/([A-Z])/g,
-" $1").toLowerCase(),ab="Write the declaration code for a detailed and complex "+(""!=Ra?Ra:"graph")+' that shows "'+(""!=Ua?Ua:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ra=""!=ra.value?" ("+mxUtils.trim(mxUtils.getTextContent(ra.options[ra.selectedIndex]))+")":"";var Oa="gantt"==ra.value||"pie"==ra.value||"timeline"==ra.value||"quadrantchart"==ra.value||"c4context"==ra.value,Va=ua.value+Ra;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
-function(Ea){Oa||(sa=aa=Ea,wa="Smart Template: "+Va)}));b.spinner.spin(qa,mxResources.get("generate")+" '"+Ua+"'")&&b.generateOpenAiMermaidDiagram(ab,function(Ea,bb,Za,ib){b.spinner.stop();qa.innerHTML="";var cb=document.createElement("img");cb.setAttribute("title",mxResources.get("preview"));cb.src="data:image/svg+xml;base64,"+bb.substring(bb.indexOf(",")+1);cb.style.cursor="pointer";cb.style.width="95%";cb.style.height="95%";qa.appendChild(cb);Ea=b.createMermaidXml(Ea,EditorUi.defaultMermaidConfig,
-bb,Za,ib,Va);var kb="<mxfile><diagram>"+Graph.compress(Ea)+"</diagram></mxfile>";if(Oa||"undefined"===typeof mxMermaidToDrawio)sa=aa=Ea;Ea=Q.cloneNode(!0);qa.appendChild(Ea);bb=function(Pa){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Za=function(Pa){X||S(kb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),cb,Va)};mxEvent.addGestureListeners(cb,bb,null,Za);mxEvent.addGestureListeners(Ea,bb,null,Za)},function(Ea){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();
-b.handleError(Ea)})});Ma.setAttribute("disabled","disabled");Ma.className="geBtn gePrimaryBtn";oa=function(){window.setTimeout(function(){""!=ua.value?Ma.removeAttribute("disabled"):Ma.setAttribute("disabled","disabled")},0)};ya=null!=E?E:urlParams["smart-template"];null!=ya&&"1"!=ya&&(ua.value=decodeURIComponent(ya),oa(),""==ya||null==E&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Ma.click()},0));mxEvent.addListener(ua,"change",oa);mxEvent.addListener(ua,"keydown",oa);
-mxEvent.addListener(ua,"cut",oa);mxEvent.addListener(ua,"paste",oa);mxEvent.addListener(ua,"keydown",function(Ua){13==Ua.keyCode&&Ma.click()});oa=document.createElement("div");oa.style.height="40px";oa.style.marginTop="4px";oa.style.marginBottom="4px";oa.style.whiteSpace="nowrap";oa.style.overflowX="auto";oa.style.overflowY="hidden";oa.appendChild(ra);oa.appendChild(Ma);ha.appendChild(oa);ha.appendChild(qa);return ha}function T(){if(la&&null!=k)p||b.hideDialog(),k(la,va,C.value);else if(d)p||b.hideDialog(),
-d(aa,C.value,ca,ja);else{var ha=C.value;if(null!=ha&&0<ha.length){var ua=function(oa,ra,ya){b.createFile(ya,aa,null!=ja&&0<ja.length?ja:null,oa,function(){b.hideDialog()},null,ra,null,null!=ma&&0<ma.length?ma:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var qa=new SaveDialog(b,ha,mxUtils.bind(this,function(oa,ra,ya){ua(ra,ya,oa.value)}),null,null,null,null,b.mode);b.showDialog(qa.container,420,150,!0,!1);qa.init()}else b.pickFolder(b.mode,function(oa){ua(b.mode,oa,ha)},b.mode!=App.MODE_GOOGLE||
-null==b.stateArg||null==b.stateArg.folderId)}}}function P(ha,ua,qa,oa,ra,ya,Fa){return fa!=ha?(null!=fa&&(fa.classList.remove("geTemplateSelected"),fa==Ga&&(Da.style.display="none",Ka.style.display="",La.style.visibility="hidden",Ia.style.visibility=null!=sa?"visible":"hidden")),ha==Ga&&(ua=sa,null!=ua?(Ia.style.visibility="visible",Ia.style.visibility=null!=sa?"visible":"hidden",La.style.visibility="visible"):(Da.style.display="",La.style.visibility="hidden",Ia.style.visibility="hidden")),O.removeAttribute("disabled"),
-aa=ua,ja=qa,ma=ya,fa=ha,la=oa,ca=Fa,va=ra,fa.classList.add("geTemplateSelected"),!0):!1}function q(){Da.style.display="";Ka.style.display="none";La.style.visibility="hidden";Ia.style.visibility="hidden";Na.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Na.select():document.execCommand("selectAll",!1,null)}function u(){Ka.style.backgroundImage=Aa;Ka.style.backgroundSize="contain";Da.style.display="none";Ka.style.display="";La.style.visibility="visible";Ia.style.visibility="visible"}
-function J(ha){var ua=mxUtils.trim(Na.value);ha||""==ua?null!=wa&&(Na.value=wa,u()):(Ka.style.backgroundImage="url("+Editor.spinImage+")",Ka.style.backgroundSize="12px 12px",Ka.style.display="",Da.style.display="none",b.generateDiagram(ua,mxUtils.bind(this,function(qa,oa){fa==Ga&&"none"==Da.style.display&&(Aa="url(data:image/svg+xml;base64,"+oa.substring(oa.indexOf(",")+1)+")",Ga.setAttribute("title",ua),Ia.style.display="",sa=aa=qa,wa=ua,u())}),mxUtils.bind(this,function(qa){fa==Ga&&(Da.style.display=
-"",Ka.style.display="none",La.style.visibility="hidden",Ia.style.visibility="hidden",b.handleError(qa))})))}function G(ha,ua,qa,oa,ra,ya,Fa,Ja,Ma,Ua,Ra,ab){function Oa(Pa,gb){null==bb?(Za=Pa,Za=/^https?:\/\//.test(Za)?b.editor.isCorsEnabledForUrl(Za)?Za:PROXY_URL+"?url="+encodeURIComponent(Za):TEMPLATE_PATH+"/"+Za,mxUtils.get(Za,mxUtils.bind(this,function(hb){200<=hb.getStatus()&&299>=hb.getStatus()&&(bb=hb.getText());gb(bb,Za)}))):gb(bb,Za)}function Va(Pa,gb){if(null==ha||U||b.sidebar.currentElt==
-Ea)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=V){var hb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+V.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+V.naturalWidth+'" height="'+V.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";S(hb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),qa,ha)}else b.sidebar.currentElt=Ea,U=!0,
-Oa(ha,function(lb){if(U&&b.sidebar.currentElt==Ea)try{S(lb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),Ea,gb)}catch(mb){b.sidebar.currentElt=null,b.handleError(mb)}U=!1})}var Ea=null;if("generative"!=ab||null==Ga){Ea=document.createElement("div");Ea.className="geTemplate";var bb=null,Za=ha;null!=qa?Ea.setAttribute("title",mxResources.get(qa,null,qa)):null!=oa&&0<oa.length&&Ea.setAttribute("title",oa)}else Ea=Ga;var ib=document.createElement("span");ib.className="geAdaptiveAsset";mxUtils.write(ib,
-mxResources.get(qa,null,qa));if(null!=ya){Ea.style.display="inline-flex";Ea.style.justifyContent="center";Ea.style.alignItems="center";Ma=document.createElement("img");Ma.setAttribute("src",ya);Ma.setAttribute("alt",oa);Ma.style.maxWidth=za+"px";Ma.style.maxHeight=Ca+"px";V=Ma;var cb=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ea.appendChild(Ma);Ma.onerror=function(){this.src!=cb?this.src=cb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ea,mxUtils.bind(this,
-function(Pa){P(Ea,null,null,ha,Fa,Ra)}),null,null);mxEvent.addListener(Ea,"dblclick",function(Pa){T();mxEvent.consume(Pa)})}else if(!Ua&&null!=ha&&0<ha.length){var kb=function(Pa){N.spin(pa)&&Oa(ha,function(gb,hb){N.stop();null!=gb&&(P(Ea,gb,ua,null,null,Ra,hb),Pa&&T())})};ya=Ma||TEMPLATE_PATH+"/"+ha.substring(0,ha.length-4)+".png";Ma=Ka.cloneNode(!1);Ma.style.backgroundImage="url("+ya+")";Ma.style.display="";Ea.appendChild(Ma);null!=qa&&Ea.appendChild(ib);mxEvent.addGestureListeners(Ea,mxUtils.bind(this,
-function(Pa){kb()}),null,null);mxEvent.addListener(Ea,"dblclick",function(Pa){kb(!0);mxEvent.consume(Pa)})}else Ea.appendChild(ib),"generative"==ab&&null==Ga&&(Ea.appendChild(Ka),Ea.appendChild(Da),Ea.appendChild(Ia),Ea.appendChild(La),Ga=Ea),ra&&P(Ea),null!=Ja?(mxEvent.addGestureListeners(Ea,null,null,mxUtils.bind(this,function(Pa){P(Ea,null,null,ha,Fa)})),mxEvent.addListener(Ea,"click",Ja)):(mxEvent.addListener(Ea,"click",function(Pa){P(Ea,null,null,ha,Fa)&&"generative"==ab&&null==sa&&q()}),mxEvent.addListener(Ea,
-"dblclick",function(Pa){"generative"!=ab?T():"none"==Da.style.display&&q();mxEvent.consume(Pa)}));null!=ha&&(ya=Q.cloneNode(!0),Ea.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Pa){X=b.sidebar.currentElt==Ea}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Pa){X||Va(Pa,null!=qa?qa:oa);mxEvent.consume(Pa)})));pa.appendChild(Ea);return Ea}function H(){function ha(Oa,Va){Oa=mxResources.get(Oa,null,Oa.substring(0,1).toUpperCase()+Oa.substring(1));18<Oa.length&&
-(Oa=Oa.substring(0,18)+"&hellip;");return Oa+(null!=Va?" ("+Va.length+")":"")}function ua(Oa,Va,Ea){mxEvent.addListener(Va,"click",function(){Ya!=Va&&(null!=Ya&&(Ya.style.backgroundColor=""),Ya=Va,Ya.style.backgroundColor=y,pa.scrollTop=0,pa.innerText="",I=0,null!=Ha[Oa].content?(pa.appendChild(Ha[Oa].content),aa=sa,Xa=null,null!=Ha[Oa].content.init&&Ha[Oa].content.init()):(Xa=Ea?Sa[Oa][Ea]:Ha[Oa],Y=null,B(!1)))});"smartTemplate"!=Oa||null==E&&null==urlParams["smart-template"]||Va.click()}fb&&(fb=
-!1,mxEvent.addListener(pa,"scroll",function(Oa){pa.scrollTop+pa.clientHeight>=pa.scrollHeight&&(B(),mxEvent.consume(Oa))}));if(0<db){var qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,mxResources.get("custom"));ta.appendChild(qa);for(var oa in $a){var ra=document.createElement("div");qa=oa;var ya=$a[oa];18<qa.length&&(qa=qa.substring(0,18)+"&hellip;");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-ra.setAttribute("title",qa+" ("+ya.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=K&&(ra.style.padding=K);ta.appendChild(ra);(function(Oa,Va){mxEvent.addListener(ra,"click",function(){Ya!=Va&&(Ya.style.backgroundColor="",Ya=Va,Ya.style.backgroundColor=y,pa.scrollTop=0,pa.innerText="",I=0,Xa=$a[Oa],Y=null,B(!1))})})(oa,ra)}qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,"draw.io");ta.appendChild(qa)}for(oa in Ha){qa=
-ya=null;if(null!=Ha[oa].content)ra=document.createElement(Fa?"ul":"div"),qa=ha(oa),ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",qa),mxUtils.write(ra,qa),ta.appendChild(ra),qa=ra;else{var Fa=Sa[oa];qa=ra=document.createElement(Fa?"ul":"div");ya=Ha[oa];var Ja=ha(oa,ya);if(null!=Fa){ya=document.createElement("li");var Ma=document.createElement("div");
-Ma.className="geTempTreeCaret";Ma.setAttribute("title",Ja);mxUtils.write(Ma,Ja);qa=Ma;ya.appendChild(Ma);Ja=document.createElement("ul");Ja.className="geTempTreeNested";Ja.style.visibility="hidden";for(var Ua in Fa){var Ra=document.createElement("li"),ab=ha(Ua,Fa[Ua]);Ra.setAttribute("title",ab);mxUtils.write(Ra,ab);ua(oa,Ra,Ua);Ja.appendChild(Ra)}ya.appendChild(Ja);ra.className="geTempTree";ra.appendChild(ya);(function(Oa,Va){mxEvent.addListener(Va,"click",function(){Oa.style.visibility="visible";
-Oa.classList.toggle("geTempTreeActive");Oa.classList.toggle("geTempTreeNested")&&setTimeout(function(){Oa.style.visibility="hidden"},550);Va.classList.toggle("geTempTreeCaret-down")})})(Ja,Ma)}else ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",Ja),mxUtils.write(ra,Ja);null!=K&&(ra.style.padding=K);ta.appendChild(ra)}ua(oa,qa);null==Ya&&qa.click()}B(!1)}
-F=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);p=null!=p?p:!0;x=null!=x?x:!1;y=null!=y?y:"light-dark(#ebf2f9, "+Editor.darkColor+")";L=null!=L?L:EditorUi.templateFile;var g=document.createElement("div");g.style.userSelect="none";g.style.height="100%";M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.height="46px";p&&g.appendChild(M);var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.width=
-"40px";n.style.height="40px";n.style.marginRight="10px";n.style.paddingBottom="4px";n.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";
-l||F||!p||M.appendChild(n);p&&mxUtils.write(M,(F?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");n=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?n=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?n=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?n=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?n=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?
-n=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(n=b.trello.extension);var C=document.createElement("input");C.setAttribute("value",b.defaultFilename+n);C.style.marginLeft="10px";C.style.width=l||F?"144px":"244px";this.init=function(){p&&Editor.selectFilename(C);null!=pa.parentNode&&null!=pa.parentNode.parentNode&&mxEvent.addGestureListeners(pa.parentNode.parentNode,mxUtils.bind(this,function(ha){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};p&&(M.appendChild(C),A?C.style.width=
-l||F?"350px":"450px":null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),A.style.marginLeft="6px",A.style.width=l||F?"80px":"180px",M.appendChild(A)));A=!1;var I=0,N=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),O=mxUtils.button(t||mxResources.get("create"),function(){O.setAttribute("disabled","disabled");T();O.removeAttribute("disabled")});
-O.className="geBtn gePrimaryBtn";var Q=document.createElement("img");Q.setAttribute("src",Editor.magnifyImage);Q.setAttribute("title",mxResources.get("preview"));Q.className="geButton geRoundButton";var U=!1,V=null,X=!1;if(c||f){var W=[],Y=null,Z=null,ba=null,ia=function(ha){O.setAttribute("disabled","disabled");for(var ua=0;ua<W.length;ua++)W[ua].className=ua==ha?"geBtn gePrimaryBtn":"geBtn"};A=!0;t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.height="30px";g.appendChild(t);
-F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ta.style.display="";ka.style.display="";pa.style.left="160px";ia(0);pa.scrollTop=0;pa.innerText="";I=0;Y!=Xa&&(Xa=Y,Ha=Z,db=ba,ta.innerText="",H(),Y=null)});W.push(F);t.appendChild(F);var ea=function(ha){ta.style.display="none";ka.style.display="none";pa.style.left="30px";ia(ha?-1:1);null==Y&&(Y=Xa);pa.scrollTop=0;pa.innerText="";N.spin(pa);var ua=function(qa,oa,ra){I=0;N.stop();Xa=qa;ra=ra||{};var ya=0,Fa;for(Fa in ra)ya+=
-ra[Fa].length;if(oa)pa.innerText=oa;else if(0==qa.length&&0==ya)pa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(pa.innerText="",0<ya){ta.style.display="";pa.style.left="160px";ta.innerText="";db=0;Ha={"draw.io":qa};for(Fa in ra)Ha[Fa]=ra[Fa];H()}else B(!0)};ha?f(da.value,ua):c(ua)};c&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ea()}),t.appendChild(F),W.push(F));if(f){F=document.createElement("span");F.style.marginLeft="10px";F.innerText=mxResources.get("search")+
-":";t.appendChild(F);var da=document.createElement("input");da.style.marginRight="10px";da.style.marginLeft="10px";da.style.width="220px";mxEvent.addListener(da,"keypress",function(ha){13==ha.keyCode&&ea(!0)});t.appendChild(da);F=mxUtils.button(mxResources.get("search"),function(){ea(!0)});F.className="geBtn";t.appendChild(F)}ia(0)}var ja=null,ma=null,aa=null,fa=null,la=null,ca=null,va=null,sa=null,wa=null,pa=document.createElement("div");pa.style.border="1px solid #d3d3d3";pa.style.position="absolute";
-pa.style.left="160px";pa.style.right="34px";t=(p?72:40)+(A?30:0);pa.style.top=t+"px";pa.style.bottom="68px";pa.style.margin="6px 0 0 -1px";pa.style.padding="6px";pa.style.overflow="auto";var ka=document.createElement("div");ka.style.cssText="position:absolute;left:30px;width:128px;top:"+t+"px;height:22px;margin-top: 6px;white-space: nowrap;";var na=document.createElement("input");na.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";
-na.setAttribute("placeholder",mxResources.get("search"));na.setAttribute("type","text");ka.appendChild(na);var xa=document.createElement("img");xa.setAttribute("src",Editor.magnifyImage);xa.setAttribute("title",mxResources.get("search"));xa.className="geAdaptiveAsset";xa.style.position="relative";xa.style.cursor="pointer";xa.style.outline="none";xa.style.opacity="0.5";xa.style.height="16px";xa.style.left="-20px";xa.style.top="4px";ka.appendChild(xa);mxEvent.addListener(xa,"click",function(){xa.getAttribute("src")!=
-Editor.magnifyImage&&(xa.setAttribute("src",Editor.magnifyImage),xa.setAttribute("title",mxResources.get("search")),na.value="",null!=eb&&(eb.click(),eb=null));na.focus()});mxEvent.addListener(na,"keydown",mxUtils.bind(this,function(ha){if(13==ha.keyCode){var ua=na.value;if(""==ua)null!=eb&&(eb.click(),eb=null);else{if(null==NewDialog.tagsList[L]){var qa={};for(Ra in Ha)if(null==Ha[Ra].content)for(var oa=Ha[Ra],ra=0;ra<oa.length;ra++){var ya=oa[ra];if(null!=ya.tags)for(var Fa=ya.tags.toLowerCase().split(";"),
-Ja=0;Ja<Fa.length;Ja++)null==qa[Fa[Ja]]&&(qa[Fa[Ja]]=[]),qa[Fa[Ja]].push(ya)}NewDialog.tagsList[L]=qa}var Ma=ua.toLowerCase().split(" ");qa=NewDialog.tagsList[L];if(0<db&&null==qa.__tagsList__){for(Ra in $a)for(oa=$a[Ra],ra=0;ra<oa.length;ra++)for(ya=oa[ra],Fa=ya.title.split(" "),Fa.push(Ra),Ja=0;Ja<Fa.length;Ja++){var Ua=Fa[Ja].toLowerCase();null==qa[Ua]&&(qa[Ua]=[]);qa[Ua].push(ya)}qa.__tagsList__=!0}var Ra=[];oa={};for(ra=Fa=0;ra<Ma.length;ra++)if(0<Ma[ra].length){Ua=qa[Ma[ra]];var ab={};Ra=[];
-if(null!=Ua)for(Ja=0;Ja<Ua.length;Ja++)ya=Ua[Ja],0==Fa==(null==oa[ya.url])&&(ab[ya.url]=!0,Ra.push(ya));oa=ab;Fa++}pa.scrollTop=0;pa.innerText="";I=0;qa=document.createElement("div");qa.style.padding="6px";qa.style.whiteSpace="nowrap";qa.style.overflow="hidden";qa.style.textOverflow="ellipsis";ya=mxResources.get(0==Ra.length?"noResultsFor":"resultsFor",[ua]);qa.setAttribute("title",ya);mxUtils.write(qa,ya);pa.appendChild(qa);null!=Ya&&null==eb&&(Ya.style.backgroundColor="",eb=Ya,Ya=qa);Xa=Ra;Y=null;
-B(!1)}mxEvent.consume(ha)}}));mxEvent.addListener(na,"keyup",mxUtils.bind(this,function(ha){""==na.value?(xa.setAttribute("src",Editor.magnifyImage),xa.setAttribute("title",mxResources.get("search"))):(xa.setAttribute("src",Editor.crossImage),xa.setAttribute("title",mxResources.get("reset")))}));t+=23;var ta=document.createElement("div");ta.style.cssText="position:absolute;left:30px;width:128px;top:"+t+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(pa,
-"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var za=140,Ca=za,Ga=null,Aa="url("+Editor.sparklesImage+")",Da=document.createElement("div");Da.className="geGenerateDiagramForm";Da.style.position="absolute";Da.style.width="100%";Da.style.height="100%";var Ka=document.createElement("div");Ka.className="geTemplatePreview geAdaptiveAsset";Ka.style.backgroundImage=Aa;var Na=document.createElement("textarea");Na.setAttribute("placeholder",mxResources.get("describeYourDiagram"));Na.className=
-"geGenerateDiagramDescription";var Ba=document.createElement("button");Ba.className="geBtn gePrimaryBtn geGenerateDiagramButton";Ba.setAttribute("disabled","disabled");Ba.setAttribute("title",mxResources.get("ok"));mxUtils.write(Ba,mxResources.get("ok"));var Ia=Q.cloneNode(!0);Ia.style.display="none";var Qa=!1;mxEvent.addGestureListeners(Ia,function(ha){Qa=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ha){if(!Qa&&null!=sa){var ua="<mxfile><diagram>"+Graph.compress(sa)+
-"</diagram></mxfile>";S(ua,mxEvent.getClientX(ha),mxEvent.getClientY(ha),Ga,wa)}});var La=Q.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";t=Q.cloneNode(!0);t.setAttribute("src",Editor.helpImage);t.setAttribute("title",mxResources.get("help"));mxEvent.addListener(t,"click",function(ha){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ha)});Da.appendChild(Na);
-Da.appendChild(Ba);Da.appendChild(t);Da.style.display="none";mxEvent.addListener(La,"click",q);mxEvent.addListener(Na,"input",function(){""!=Na.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){J()});mxEvent.addListener(Na,"keydown",function(ha){13!=ha.keyCode||mxEvent.isShiftDown(ha)?27==ha.keyCode&&(J(!0),mxEvent.consume(ha)):(J(),mxEvent.consume(ha))});var Ha={},Sa={},$a={},db=0,fb=!0,Ya=null,eb=null;Ha.basic=D?[]:[{title:"blankDiagram"}];
-var Xa=Ha.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ha.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ha.smartTemplate={content:R()});if(!l){var jb=function(){mxUtils.get(Wa,function(ha){if(!Ta){Ta=!0;ha=ha.getXml().documentElement.firstChild;for(var ua=
-{};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("parsererror"==ha.nodeName)null!=window.console&&console.log("Parser error in "+L+": "+ha.textContent);else if("clibs"==ha.nodeName){for(var qa=ha.getAttribute("name"),oa=ha.getElementsByTagName("add"),ra=[],ya=0;ya<oa.length;ya++)ra.push(encodeURIComponent(mxUtils.getTextContent(oa[ya])));null!=qa&&0<ra.length&&(ua[qa]=ra.join(";"))}else if(ra=ha.getAttribute("url"),null!=ra){oa=ha.getAttribute("section");qa=ha.getAttribute("subsection");if(null==
-oa&&(ya=ra.indexOf("/"),oa=ra.substring(0,ya),null==qa)){var Fa=ra.indexOf("/",ya+1);-1<Fa&&(qa=ra.substring(ya+1,Fa))}ya=Ha[oa];null==ya&&(ya=[],Ha[oa]=ya);ra=ha.getAttribute("clibs");null!=ua[ra]&&(ra=ua[ra]);ra={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title"),tooltip:ha.getAttribute("name")||ha.getAttribute("url"),preview:ha.getAttribute("preview"),clibs:ra,tags:ha.getAttribute("tags")};ya.push(ra);null!=qa&&(ya=Sa[oa],null==ya&&(ya={},Sa[oa]=ya),oa=ya[qa],
-null==oa&&(oa=[],ya[qa]=oa),oa.push(ra))}ha=ha.nextSibling}N.stop();H()}})};g.appendChild(ka);g.appendChild(ta);g.appendChild(pa);var Ta=!1,Wa=L;/^https?:\/\//.test(Wa)&&!b.editor.isCorsEnabledForUrl(Wa)&&(Wa=PROXY_URL+"?url="+encodeURIComponent(Wa));N.spin(pa);null!=v?v(function(ha,ua){$a=ha;ba=db=ua;jb()},jb):jb();Z=Ha}mxEvent.addListener(C,"keypress",function(ha){b.dialog.container.firstChild==g&&13==ha.keyCode&&T()});v=document.createElement("div");v.style.marginTop=l?"4px":"16px";v.style.textAlign=
-"right";v.style.position="absolute";v.style.left="40px";v.style.bottom="24px";v.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=z&&z();b.hideDialog(!0)});D.className="geBtn";!b.editor.cancelFirst||x&&null==z||v.appendChild(D);l||"1"==urlParams.embed||x||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(l=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ha=new FilenameDialog(b,"",mxResources.get("create"),function(ua){null!=ua&&0<ua.length&&
-b.editor.loadUrl(b.editor.getProxiedUrl(ua),function(qa){aa=qa;ja=null;templateRealURl=ua;b.hideDialog();T()},function(qa){b.handleError(qa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ha.container,300,80,!0,!0);ha.init()}),l.className="geBtn",v.appendChild(l));Graph.fileSupport&&m&&(m=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ha=document.createElement("input");ha.setAttribute("multiple","multiple");ha.setAttribute("type","file");mxEvent.addListener(ha,
-"change",function(ua){b.openFiles(ha.files,!0);ha.value=""});ha.style.display="none";document.body.appendChild(ha);b.newDlgFileInputElt=ha}b.newDlgFileInputElt.click()}),m.className="geBtn",v.appendChild(m));v.appendChild(O);b.editor.cancelFirst||null!=d||x&&null==z||v.appendChild(D);g.appendChild(v);this.container=g};NewDialog.tagsList={};
-var SaveDialog=function(b,l,p,d,x,z,y,F,M,K,L){function c(g,n,C,I,N,O){var Q=null;if((null==d||0>mxUtils.indexOf(d,g))&&(null==M||g==M)&&(null==K||0<=mxUtils.indexOf(K,g))){N=null!=N?N:b.getTitleForService(g);var U=0<=mxUtils.indexOf(u,g);if(U||null!=b.getServiceForName(g)){Q=document.createElement("option");var V="";!U&&b.isOffline(g==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(Q.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==O)Q.innerHTML=mxUtils.htmlEntities(N)+
-"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,Q.setAttribute("value","pickFolder-"+g),Q.setAttribute("title",N+" - "+mxResources.get("pickFolder")+"...");else{U=g+(null!=C?"-"+C:"");var X=G[U];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=n){"/"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));"/"==n.charAt(0)&&(n=n.substring(1));X=n;if(g!=App.MODE_GITHUB&&g==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
-X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}Q.innerHTML=mxUtils.htmlEntities(N)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;Q.setAttribute("title",N+(null!=n?" ("+n+")":"")+(null!=C&&decodeURIComponent(C)!=n?" ["+C+"]":""));Q.setAttribute("value",U);G[U]={option:Q,mode:g,path:n,id:C};SaveDialog.lastValue==U&&null==F&&"disabled"==!Q.getAttribute("disabled")?I=!0:null==I&&("root"==O?I=null==F&&b.mode==g||null!=g&&g==F:"pickFolder-"==
-q.value.substring(0,11)&&(I=!0));I&&Q.setAttribute("selected","selected")}q.appendChild(Q)}}return Q}function f(g){b.pickFolder(g,function(n){var C=null;g==App.MODE_GOOGLE&&null!=n.docs&&0<n.docs.length?C={mode:g,path:n.docs[0].name,id:n.docs[0].id}:g==App.MODE_ONEDRIVE&&null!=n.value&&0<n.value.length?C={mode:g,path:n.value[0].name,id:OneDriveFile.prototype.getIdOf(n.value[0])}:(g==App.MODE_GITHUB||g==App.MODE_GITLAB)&&null!=n&&0<n.length&&(C={mode:g,path:decodeURIComponent(n),id:n});null!=C&&(b.addRecent(C,
-"Folders",5),n=c(C.mode,C.path,C.id,!0),q.innerHTML="",G={},k(),C=q.selectedIndex,q.value=n.value,0>q.selectedIndex&&(q.selectedIndex=C))},!0,!0,!0,!0)}function k(){var g=b.getRecent("Folders"),n=0;if(null!=g&&0<g.length)for(var C=0;C<g.length;C++)null!=c(g[C].mode,g[C].path,g[C].id)&&n++;c(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");c(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(c(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),
+"plantUmlSvg"==F.value||"plantUmlTxt"==F.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 z=b.editor.graph.getFreeInsertPoint();k=document.createElement("div");var y=document.createElement("textarea");y.style.position="absolute";y.style.left="30px";y.style.right="30px";y.style.top=
+"30px";y.style.bottom="100px";y.style.resize="none";y.setAttribute("wrap","off");y.setAttribute("spellcheck","false");y.setAttribute("autocorrect","off");y.setAttribute("autocomplete","off");y.setAttribute("autocapitalize","off");var F=document.createElement("select");F.className="geBtn";if("formatSql"==n||"mermaid"==n&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())F.style.display="none";var N=document.createElement("option");N.setAttribute("value","list");mxUtils.write(N,mxResources.get("list"));
+"plantUml"!=n&&"mermaid"!=n&&F.appendChild(N);null!=n&&"fromText"!=n||N.setAttribute("selected","selected");N=document.createElement("option");N.setAttribute("value","table");mxUtils.write(N,mxResources.get("formatSql"));"formatSql"==n&&(F.appendChild(N),N.setAttribute("selected","selected"));N=document.createElement("option");N.setAttribute("value","mermaid");mxUtils.write(N,mxResources.get("image"));if("mermaid"==n){if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");
+K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));F.appendChild(K)}else F.style.display="none";F.appendChild(N)}N=document.createElement("option");N.setAttribute("value","diagram");mxUtils.write(N,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,
+mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));"plantUml"!=n&&"mermaid"!=n&&(F.appendChild(N),F.appendChild(K),F.appendChild(L),F.appendChild(c));N=document.createElement("option");N.setAttribute("value","plantUmlSvg");mxUtils.write(N,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==n&&N.setAttribute("selected","selected");K=document.createElement("option");
+K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value","plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==n&&(F.appendChild(N),F.appendChild(K),F.appendChild(L));var f=x();y.value=f;k.appendChild(y);N=document.createElement("div");N.style.position="absolute";N.style.bottom=
+"46px";N.style.right="30px";N.style.left="30px";N.style.justifyContent="end";N.style.display="flex";this.init=function(){y.focus()};Graph.fileSupport&&(y.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),y.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=l.dataTransfer.files[0];var m=new FileReader;m.onload=function(t){y.value=t.target.result};m.readAsText(l)}},!1));"plantUml"==n&&"https://plant-aws.diagrams.net"==
+window.PLANT_URL&&(K=document.createElement("div"),K.style.display="inline-block",K.style.color="#c00",K.style.fontSize="12px",K.style.marginRight="10px",K.style.display="flex",K.style.alignItems="center",K.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',N.appendChild(K));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=n&&"plantUml"!=n||N.appendChild(b.createHelpIcon("mermaid"==
+n?"https://mermaid.js.org/intro/":"https://plantuml.com/"));N.appendChild(F);mxEvent.addListener(F,"change",function(){var l=x();if(0==y.value.length||y.value==f)f=l,y.value=f});n=mxUtils.button(mxResources.get("close"),function(){y.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});n.className="geBtn";b.editor.cancelFirst&&N.appendChild(n);K=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),d(y.value,F.value,l)}catch(m){b.handleError(m)}});
+K.className="geBtn gePrimaryBtn";N.appendChild(K);b.editor.cancelFirst||N.appendChild(n);k.appendChild(N);this.container=k},NewDialog=function(b,k,n,d,x,z,y,F,N,K,L,c,f,l,m,t,v,B,E,D){function A(ma){null!=ma&&(Xa=qb=ma?135:140);ma=!0;if(null!=lb)for(;X<lb.length&&(ma||0!=mxUtils.mod(X,30));){var va=lb[X++];va=G(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs,va.type);ma&&va.click();ma=!1}}function S(ma,va,oa,qa,ta,xa){if(null!=
+ma&&mxUtils.isAncestorNode(document.body,qa)){ma=mxUtils.parseXml(ma);ma=Editor.parseDiagramNode(ma.documentElement,null,!0);var Ma=new mxCodec(ma.ownerDocument),Na=new mxGraphModel;Ma.decode(ma,Na);b.sidebar.createTooltip(qa,Na.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ta?mxResources.get(ta):null,!0,new mxPoint(va,
+oa),!0,function(){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=xa&&P(qa,null,null,xa,infoObj,clibs)},!0,!1)}}function R(){var ma=document.createElement("div");ma.style.position="absolute";ma.style.overflow="visible";ma.style.left="8px";ma.style.right="8px";ma.style.bottom="8px";ma.style.top="8px";mxUtils.write(ma,mxResources.get("describeYourDiagram")+":");mxUtils.br(ma);var va=document.createElement("input");va.setAttribute("type","text");va.setAttribute("placeholder",
+mxResources.get("processForHiringNewEmployee"));va.style.width="100%";va.style.marginTop="6px";va.style.marginBottom="4px";va.style.boxSizing="border-box";ma.appendChild(va);ma.init=function(){va.focus()};mxUtils.br(ma);var oa=document.createElement("div");oa.style.top="86px";oa.style.left="0";oa.style.right="0";oa.style.bottom="0";oa.style.margin="0";oa.style.borderRadius="0";oa.style.width="auto";oa.style.height="auto";oa.style.position="absolute";oa.style.border="1px solid #424242";oa.className=
+"geTemplate";var qa=document.createElement("div");qa.style.boxSizing="border-box";qa.style.position="absolute";qa.style.fontSize="14px";qa.style.textAlign="center";qa.style.top="50%";mxUtils.write(qa,mxResources.get("blankDiagram"));oa.appendChild(qa);var ta=document.createElement("select");ta.className="geBtn";ta.style.maxWidth="160px";ta.style.marginLeft="0px";qa=document.createElement("option");mxUtils.write(qa,mxResources.get("diagramType"));qa.setAttribute("value","");ta.appendChild(qa);for(var xa=
+0;xa<EditorUi.mermaidDiagramTypes.length;xa++){qa=document.createElement("option");var Ma=EditorUi.mermaidDiagramTypes[xa],Na=Ma;Ma==urlParams["smart-template-type"]&&qa.setAttribute("selected","selected");"erDiagram"==Na&&(Na="entityRelationshipDiagram");Na=mxResources.get(Na,null,Na.charAt(0).toUpperCase()+Na.substring(1).replace(/[A-Z]/g," $&"));qa.setAttribute("value",Ma);mxUtils.write(qa,Na);ta.appendChild(qa)}var Qa=mxUtils.button(mxResources.get("generate"),function(){var Ya=va.value,Ua=ta.value.replace(/([A-Z])/g,
+" $1").toLowerCase(),ib="Write the declaration code for a detailed and complex "+(""!=Ua?Ua:"graph")+' that shows "'+(""!=Ya?Ya:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ua=""!=ta.value?" ("+mxUtils.trim(mxUtils.getTextContent(ta.options[ta.selectedIndex]))+")":"";var Ra="gantt"==ta.value||"pie"==ta.value||"timeline"==ta.value||"quadrantchart"==ta.value||"c4context"==ta.value,Za=va.value+Ua;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
+function(Ea){Ra||(Fa=ra=Ea,Pa="Smart Template: "+Za)}));b.spinner.spin(oa,mxResources.get("generate")+" '"+Ya+"'")&&b.generateOpenAiMermaidDiagram(ib,function(Ea,mb,eb,vb){b.spinner.stop();oa.innerHTML="";var nb=document.createElement("img");nb.setAttribute("title",mxResources.get("preview"));nb.src="data:image/svg+xml;base64,"+mb.substring(mb.indexOf(",")+1);nb.style.cursor="pointer";nb.style.width="95%";nb.style.height="95%";oa.appendChild(nb);Ea=b.createMermaidXml(Ea,EditorUi.defaultMermaidConfig,
+mb,eb,vb,Za);var xb="<mxfile><diagram>"+Graph.compress(Ea)+"</diagram></mxfile>";if(Ra||"undefined"===typeof mxMermaidToDrawio)Fa=ra=Ea;Ea=Z.cloneNode(!0);oa.appendChild(Ea);mb=function(Ta){ea=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};eb=function(Ta){ea||S(xb,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),nb,Za)};mxEvent.addGestureListeners(nb,mb,null,eb);mxEvent.addGestureListeners(Ea,mb,null,eb)},function(Ea){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();
+b.handleError(Ea)})});Qa.setAttribute("disabled","disabled");Qa.className="geBtn gePrimaryBtn";qa=function(){window.setTimeout(function(){""!=va.value?Qa.removeAttribute("disabled"):Qa.setAttribute("disabled","disabled")},0)};xa=null!=E?E:urlParams["smart-template"];null!=xa&&"1"!=xa&&(va.value=decodeURIComponent(xa),qa(),""==xa||null==E&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Qa.click()},0));mxEvent.addListener(va,"change",qa);mxEvent.addListener(va,"keydown",qa);
+mxEvent.addListener(va,"cut",qa);mxEvent.addListener(va,"paste",qa);mxEvent.addListener(va,"keydown",function(Ya){13==Ya.keyCode&&Qa.click()});qa=document.createElement("div");qa.style.height="40px";qa.style.marginTop="4px";qa.style.marginBottom="4px";qa.style.whiteSpace="nowrap";qa.style.overflowX="auto";qa.style.overflowY="hidden";qa.appendChild(ta);qa.appendChild(Qa);ma.appendChild(qa);ma.appendChild(oa);return ma}function T(){if(ya==bb&&null==ra&&null!=jb&&null!=$a)d&&b.spinner.spin(document.body,
+mxResources.get("generate")+" '"+$a.value+"'")&&(p=!0,b.hideDialog()),jb.click();else if(p&&b.spinner.stop(),Ca&&null!=l)n||p||b.hideDialog(),l(Ca,Ba,Q.value);else if(d)n||p||b.hideDialog(),d(ra,Q.value,Ha,na);else{var ma=Q.value;if(null!=ma&&0<ma.length){var va=function(qa,ta,xa){b.createFile(xa,ra,null!=na&&0<na.length?na:null,qa,function(){p||b.hideDialog()},null,ta,null,null!=za&&0<za.length?za:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var oa=new SaveDialog(b,ma,mxUtils.bind(this,
+function(qa,ta,xa){va(ta,xa,qa.value)}),null,null,null,null,b.mode);b.showDialog(oa.container,420,150,!0,!1);oa.init()}else b.pickFolder(b.mode,function(qa){va(b.mode,qa,ma)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function P(ma,va,oa,qa,ta,xa,Ma){return ya!=ma?(null!=ya&&(ya.classList.remove("geTemplateSelected"),ya==bb&&(Va.style.display="none",fb.style.display="",La.style.visibility="hidden",Sa.style.visibility=null!=Fa?"visible":"hidden")),ma==bb&&(va=Fa,null!=
+va?(Sa.style.visibility="visible",Sa.style.visibility=null!=Fa?"visible":"hidden",La.style.visibility="visible"):(Va.style.display="",La.style.visibility="hidden",Sa.style.visibility="hidden")),Y.removeAttribute("disabled"),ra=va,na=oa,za=xa,ya=ma,Ca=qa,Ha=Ma,Ba=ta,ya.classList.add("geTemplateSelected"),!0):!1}function q(){Va.style.display="";fb.style.display="none";La.style.visibility="hidden";Sa.style.visibility="hidden";$a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?$a.select():
+document.execCommand("selectAll",!1,null)}function u(){fb.style.backgroundImage=rb;fb.style.backgroundSize="contain";Va.style.display="none";fb.style.display="";La.style.visibility="visible";Sa.style.visibility="visible"}function J(ma){if(!ob){ob=!0;var va=mxUtils.trim($a.value);ma||""==va?null!=Pa&&($a.value=Pa,u()):(fb.style.backgroundImage="url("+Editor.spinImage+")",fb.style.backgroundSize="12px 12px",fb.style.display="",Va.style.display="none",b.generateDiagram(va,mxUtils.bind(this,function(oa,
+qa){ob=!1;ya==bb&&"none"==Va.style.display&&(rb="url(data:image/svg+xml;base64,"+qa.substring(qa.indexOf(",")+1)+")",bb.setAttribute("title",va),Sa.style.display="",Fa=ra=oa,Pa=va,u(),p&&T())}),mxUtils.bind(this,function(oa){ob=!1;ya==bb&&(Va.style.display="",fb.style.display="none",La.style.visibility="hidden",Sa.style.visibility="hidden",b.handleError(oa))})))}}function G(ma,va,oa,qa,ta,xa,Ma,Na,Qa,Ya,Ua,ib){function Ra(Ta,tb){null==mb?(eb=Ta,eb=/^https?:\/\//.test(eb)?b.editor.isCorsEnabledForUrl(eb)?
+eb:PROXY_URL+"?url="+encodeURIComponent(eb):TEMPLATE_PATH+"/"+eb,mxUtils.get(eb,mxUtils.bind(this,function(ub){200<=ub.getStatus()&&299>=ub.getStatus()&&(mb=ub.getText());tb(mb,eb)}))):tb(mb,eb)}function Za(Ta,tb){if(null==ma||aa||b.sidebar.currentElt==Ea)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=ha){var ub="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+ha.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+
+ha.naturalWidth+'" height="'+ha.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";S(ub,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),oa,ma)}else b.sidebar.currentElt=Ea,aa=!0,Ra(ma,function(Db){if(aa&&b.sidebar.currentElt==Ea)try{S(Db,mxEvent.getClientX(Ta),mxEvent.getClientY(Ta),Ea,tb)}catch(Eb){b.sidebar.currentElt=null,b.handleError(Eb)}aa=!1})}var Ea=null;if("generative"!=ib||null==bb){Ea=document.createElement("div");Ea.className="geTemplate";var mb=null,
+eb=ma;null!=oa?Ea.setAttribute("title",mxResources.get(oa,null,oa)):null!=qa&&0<qa.length&&Ea.setAttribute("title",qa)}else Ea=bb;var vb=document.createElement("span");vb.className="geAdaptiveAsset";mxUtils.write(vb,mxResources.get(oa,null,oa));if(null!=xa){Ea.style.display="inline-flex";Ea.style.justifyContent="center";Ea.style.alignItems="center";Qa=document.createElement("img");Qa.setAttribute("src",xa);Qa.setAttribute("alt",qa);Qa.style.maxWidth=Xa+"px";Qa.style.maxHeight=qb+"px";ha=Qa;var nb=
+xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ea.appendChild(Qa);Qa.onerror=function(){this.src!=nb?this.src=nb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Ta){P(Ea,null,null,ma,Ma,Ua)}),null,null);mxEvent.addListener(Ea,"dblclick",function(Ta){T();mxEvent.consume(Ta)})}else if(!Ya&&null!=ma&&0<ma.length){var xb=function(Ta){W.spin(Aa)&&Ra(ma,function(tb,ub){W.stop();null!=tb&&(P(Ea,tb,va,null,null,Ua,ub),Ta&&T())})};
+xa=Qa||TEMPLATE_PATH+"/"+ma.substring(0,ma.length-4)+".png";Qa=fb.cloneNode(!1);Qa.style.backgroundImage="url("+xa+")";Qa.style.display="";Ea.appendChild(Qa);null!=oa&&Ea.appendChild(vb);mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Ta){xb()}),null,null);mxEvent.addListener(Ea,"dblclick",function(Ta){xb(!0);mxEvent.consume(Ta)})}else Ea.appendChild(vb),"generative"==ib&&null==bb&&(Ea.appendChild(fb),Ea.appendChild(Va),Ea.appendChild(Sa),Ea.appendChild(La),bb=Ea),ta&&P(Ea),null!=Na?(mxEvent.addGestureListeners(Ea,
+null,null,mxUtils.bind(this,function(Ta){P(Ea,null,null,ma,Ma)})),mxEvent.addListener(Ea,"click",Na)):(mxEvent.addListener(Ea,"click",function(Ta){P(Ea,null,null,ma,Ma)&&"generative"==ib&&null==Fa&&q()}),mxEvent.addListener(Ea,"dblclick",function(Ta){"generative"!=ib?T():"none"==Va.style.display&&q();mxEvent.consume(Ta)}));null!=ma&&(xa=Z.cloneNode(!0),Ea.appendChild(xa),mxEvent.addGestureListeners(xa,mxUtils.bind(this,function(Ta){ea=b.sidebar.currentElt==Ea}),null,null),mxEvent.addListener(xa,"click",
+mxUtils.bind(this,function(Ta){ea||Za(Ta,null!=oa?oa:qa);mxEvent.consume(Ta)})));Aa.appendChild(Ea);return Ea}function H(){function ma(Ra,Za){Ra=mxResources.get(Ra,null,Ra.substring(0,1).toUpperCase()+Ra.substring(1));18<Ra.length&&(Ra=Ra.substring(0,18)+"&hellip;");return Ra+(null!=Za?" ("+Za.length+")":"")}function va(Ra,Za,Ea){mxEvent.addListener(Za,"click",function(){cb!=Za&&(null!=cb&&(cb.style.backgroundColor=""),cb=Za,cb.style.backgroundColor=y,Aa.scrollTop=0,Aa.innerText="",X=0,null!=Ja[Ra].content?
+(Aa.appendChild(Ja[Ra].content),ra=Fa,lb=null,null!=Ja[Ra].content.init&&Ja[Ra].content.init()):(lb=Ea?Wa[Ra][Ea]:Ja[Ra],ia=null,A(!1)))});"smartTemplate"!=Ra||null==E&&null==urlParams["smart-template"]||Za.click()}pb&&(pb=!1,mxEvent.addListener(Aa,"scroll",function(Ra){Aa.scrollTop+Aa.clientHeight>=Aa.scrollHeight&&(A(),mxEvent.consume(Ra))}));if(0<ab){var oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(oa,
+mxResources.get("custom"));Ka.appendChild(oa);for(var qa in gb){var ta=document.createElement("div");oa=qa;var xa=gb[qa];18<oa.length&&(oa=oa.substring(0,18)+"&hellip;");ta.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ta.setAttribute("title",oa+" ("+xa.length+")");mxUtils.write(ta,ta.getAttribute("title"));null!=K&&(ta.style.padding=K);Ka.appendChild(ta);(function(Ra,Za){mxEvent.addListener(ta,
+"click",function(){cb!=Za&&(cb.style.backgroundColor="",cb=Za,cb.style.backgroundColor=y,Aa.scrollTop=0,Aa.innerText="",X=0,lb=gb[Ra],ia=null,A(!1))})})(qa,ta)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(oa,"draw.io");Ka.appendChild(oa)}for(qa in Ja){oa=xa=null;if(null!=Ja[qa].content)ta=document.createElement(Ma?"ul":"div"),oa=ma(qa),ta.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ta.setAttribute("title",oa),mxUtils.write(ta,oa),Ka.appendChild(ta),oa=ta;else{var Ma=Wa[qa];oa=ta=document.createElement(Ma?"ul":"div");xa=Ja[qa];var Na=ma(qa,xa);if(null!=Ma){xa=document.createElement("li");var Qa=document.createElement("div");Qa.className="geTempTreeCaret";Qa.setAttribute("title",Na);mxUtils.write(Qa,Na);oa=Qa;xa.appendChild(Qa);Na=document.createElement("ul");Na.className="geTempTreeNested";Na.style.visibility="hidden";for(var Ya in Ma){var Ua=document.createElement("li"),ib=
+ma(Ya,Ma[Ya]);Ua.setAttribute("title",ib);mxUtils.write(Ua,ib);va(qa,Ua,Ya);Na.appendChild(Ua)}xa.appendChild(Na);ta.className="geTempTree";ta.appendChild(xa);(function(Ra,Za){mxEvent.addListener(Za,"click",function(){Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ra.style.visibility="hidden"},550);Za.classList.toggle("geTempTreeCaret-down")})})(Na,Qa)}else ta.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ta.setAttribute("title",Na),mxUtils.write(ta,Na);null!=K&&(ta.style.padding=K);Ka.appendChild(ta)}va(qa,oa);null==cb&&oa.click()}A(!1)}var g=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);n=null!=n?n:!0;x=null!=x?x:!1;y=null!=y?y:"light-dark(#ebf2f9, "+Editor.darkColor+")";L=null!=L?L:EditorUi.templateFile;var p=!1,C=document.createElement("div");C.style.userSelect="none";C.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";
+I.style.height="46px";n&&C.appendChild(I);var M=document.createElement("img");M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="40px";M.style.height="40px";M.style.marginRight="10px";M.style.paddingBottom="4px";M.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";k||g||!n||I.appendChild(M);n&&mxUtils.write(I,(g?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");var O=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?O=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?O=b.dropbox.extension:
+b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?O=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?O=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?O=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(O=b.trello.extension);var Q=document.createElement("input");Q.setAttribute("value",b.defaultFilename+O);Q.style.marginLeft="10px";Q.style.width=k||g?"144px":"244px";this.init=function(){n&&Editor.selectFilename(Q);null!=Aa.parentNode&&null!=Aa.parentNode.parentNode&&mxEvent.addGestureListeners(Aa.parentNode.parentNode,
+mxUtils.bind(this,function(ma){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};if(n)if(I.appendChild(Q),B)Q.style.width=k||g?"350px":"450px";else if(null!=b.editor.diagramFileTypes){var U=FilenameDialog.createFileTypes(b,Q,b.editor.diagramFileTypes);U.style.marginLeft="6px";U.style.width=k||g?"80px":"180px";I.appendChild(U)}var V=!1,X=0,W=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),
+Y=mxUtils.button(t||mxResources.get("create"),function(){Y.setAttribute("disabled","disabled");T();Y.removeAttribute("disabled")});Y.className="geBtn gePrimaryBtn";var Z=document.createElement("img");Z.setAttribute("src",Editor.magnifyImage);Z.setAttribute("title",mxResources.get("preview"));Z.className="geButton geRoundButton";var aa=!1,ha=null,ea=!1;if(c||f){var da=[],ia=null,la=null,ba=null,fa=function(ma){Y.setAttribute("disabled","disabled");for(var va=0;va<da.length;va++)da[va].className=va==
+ma?"geBtn gePrimaryBtn":"geBtn"};V=!0;var ja=document.createElement("div");ja.style.whiteSpace="nowrap";ja.style.height="30px";C.appendChild(ja);var ca=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ka.style.display="";Ia.style.display="";Aa.style.left="160px";fa(0);Aa.scrollTop=0;Aa.innerText="";X=0;ia!=lb&&(lb=ia,Ja=la,ab=ba,Ka.innerText="",H(),ia=null)});da.push(ca);ja.appendChild(ca);var sa=function(ma){Ka.style.display="none";Ia.style.display="none";Aa.style.left="30px";
+fa(ma?-1:1);null==ia&&(ia=lb);Aa.scrollTop=0;Aa.innerText="";W.spin(Aa);var va=function(oa,qa,ta){X=0;W.stop();lb=oa;ta=ta||{};var xa=0,Ma;for(Ma in ta)xa+=ta[Ma].length;if(qa)Aa.innerText=qa;else if(0==oa.length&&0==xa)Aa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(Aa.innerText="",0<xa){Ka.style.display="";Aa.style.left="160px";Ka.innerText="";ab=0;Ja={"draw.io":oa};for(Ma in ta)Ja[Ma]=ta[Ma];H()}else A(!0)};ma?f(wa.value,va):c(va)};if(c){var pa=mxUtils.button(mxResources.get("Recent",
+null,"Recent"),function(){sa()});ja.appendChild(pa);da.push(pa)}if(f){var ua=document.createElement("span");ua.style.marginLeft="10px";ua.innerText=mxResources.get("search")+":";ja.appendChild(ua);var wa=document.createElement("input");wa.style.marginRight="10px";wa.style.marginLeft="10px";wa.style.width="220px";mxEvent.addListener(wa,"keypress",function(ma){13==ma.keyCode&&sa(!0)});ja.appendChild(wa);var ka=mxUtils.button(mxResources.get("search"),function(){sa(!0)});ka.className="geBtn";ja.appendChild(ka)}fa(0)}var na=
+null,za=null,ra=null,ya=null,Ca=null,Ha=null,Ba=null,Fa=null,Pa=null,Aa=document.createElement("div");Aa.style.border="1px solid #d3d3d3";Aa.style.position="absolute";Aa.style.left="160px";Aa.style.right="34px";var Da=(n?72:40)+(V?30:0);Aa.style.top=Da+"px";Aa.style.bottom="68px";Aa.style.margin="6px 0 0 -1px";Aa.style.padding="6px";Aa.style.overflow="auto";var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;height:22px;margin-top: 6px;white-space: nowrap;";
+var Oa=document.createElement("input");Oa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Oa.setAttribute("placeholder",mxResources.get("search"));Oa.setAttribute("type","text");Ia.appendChild(Oa);var Ga=document.createElement("img");Ga.setAttribute("src",Editor.magnifyImage);Ga.setAttribute("title",mxResources.get("search"));Ga.className="geAdaptiveAsset";Ga.style.position="relative";Ga.style.cursor="pointer";Ga.style.outline=
+"none";Ga.style.opacity="0.5";Ga.style.height="16px";Ga.style.left="-20px";Ga.style.top="4px";Ia.appendChild(Ga);mxEvent.addListener(Ga,"click",function(){Ga.getAttribute("src")!=Editor.magnifyImage&&(Ga.setAttribute("src",Editor.magnifyImage),Ga.setAttribute("title",mxResources.get("search")),Oa.value="",null!=sb&&(sb.click(),sb=null));Oa.focus()});mxEvent.addListener(Oa,"keydown",mxUtils.bind(this,function(ma){if(13==ma.keyCode){var va=Oa.value;if(""==va)null!=sb&&(sb.click(),sb=null);else{if(null==
+NewDialog.tagsList[L]){var oa={};for(Ua in Ja)if(null==Ja[Ua].content)for(var qa=Ja[Ua],ta=0;ta<qa.length;ta++){var xa=qa[ta];if(null!=xa.tags)for(var Ma=xa.tags.toLowerCase().split(";"),Na=0;Na<Ma.length;Na++)null==oa[Ma[Na]]&&(oa[Ma[Na]]=[]),oa[Ma[Na]].push(xa)}NewDialog.tagsList[L]=oa}var Qa=va.toLowerCase().split(" ");oa=NewDialog.tagsList[L];if(0<ab&&null==oa.__tagsList__){for(Ua in gb)for(qa=gb[Ua],ta=0;ta<qa.length;ta++)for(xa=qa[ta],Ma=xa.title.split(" "),Ma.push(Ua),Na=0;Na<Ma.length;Na++){var Ya=
+Ma[Na].toLowerCase();null==oa[Ya]&&(oa[Ya]=[]);oa[Ya].push(xa)}oa.__tagsList__=!0}var Ua=[];qa={};for(ta=Ma=0;ta<Qa.length;ta++)if(0<Qa[ta].length){Ya=oa[Qa[ta]];var ib={};Ua=[];if(null!=Ya)for(Na=0;Na<Ya.length;Na++)xa=Ya[Na],0==Ma==(null==qa[xa.url])&&(ib[xa.url]=!0,Ua.push(xa));qa=ib;Ma++}Aa.scrollTop=0;Aa.innerText="";X=0;oa=document.createElement("div");oa.style.padding="6px";oa.style.whiteSpace="nowrap";oa.style.overflow="hidden";oa.style.textOverflow="ellipsis";xa=mxResources.get(0==Ua.length?
+"noResultsFor":"resultsFor",[va]);oa.setAttribute("title",xa);mxUtils.write(oa,xa);Aa.appendChild(oa);null!=cb&&null==sb&&(cb.style.backgroundColor="",sb=cb,cb=oa);lb=Ua;ia=null;A(!1)}mxEvent.consume(ma)}}));mxEvent.addListener(Oa,"keyup",mxUtils.bind(this,function(ma){""==Oa.value?(Ga.setAttribute("src",Editor.magnifyImage),Ga.setAttribute("title",mxResources.get("search"))):(Ga.setAttribute("src",Editor.crossImage),Ga.setAttribute("title",mxResources.get("reset")))}));Da+=23;var Ka=document.createElement("div");
+Ka.style.cssText="position:absolute;left:30px;width:128px;top:"+Da+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Aa,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var Xa=140,qb=Xa,bb=null,rb="url("+Editor.sparklesImage+")",Va=document.createElement("div");Va.className="geGenerateDiagramForm";Va.style.position="absolute";Va.style.width="100%";Va.style.height="100%";var fb=document.createElement("div");fb.className="geTemplatePreview geAdaptiveAsset";
+fb.style.backgroundImage=rb;var $a=document.createElement("textarea");$a.setAttribute("placeholder",mxResources.get("describeYourDiagram"));$a.className="geGenerateDiagramDescription";var jb=document.createElement("button");jb.className="geBtn gePrimaryBtn geGenerateDiagramButton";jb.setAttribute("disabled","disabled");jb.setAttribute("title",mxResources.get("ok"));mxUtils.write(jb,mxResources.get("ok"));var Sa=Z.cloneNode(!0);Sa.style.display="none";var db=!1;mxEvent.addGestureListeners(Sa,function(ma){db=
+null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ma){if(!db&&null!=Fa){var va="<mxfile><diagram>"+Graph.compress(Fa)+"</diagram></mxfile>";S(va,mxEvent.getClientX(ma),mxEvent.getClientY(ma),bb,Pa)}});var La=Z.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";var hb=Z.cloneNode(!0);hb.setAttribute("src",Editor.helpImage);hb.setAttribute("title",mxResources.get("help"));
+mxEvent.addListener(hb,"click",function(ma){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ma)});Va.appendChild($a);Va.appendChild(jb);Va.appendChild(hb);Va.style.display="none";mxEvent.addListener(La,"click",q);mxEvent.addListener($a,"input",function(){""!=$a.value?jb.removeAttribute("disabled"):jb.setAttribute("disabled","disabled")});var ob=!1;mxEvent.addListener(jb,"click",function(){J()});mxEvent.addListener($a,"keydown",function(ma){13!=ma.keyCode||mxEvent.isShiftDown(ma)?
+27==ma.keyCode&&(J(!0),mxEvent.consume(ma)):(J(),mxEvent.consume(ma))});var Ja={},Wa={},gb={},ab=0,pb=!0,cb=null,sb=null;Ja.basic=D?[]:[{title:"blankDiagram"}];var lb=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&
+(Ja.smartTemplate={content:R()});if(!k){var yb=function(){mxUtils.get(wb,function(ma){if(!Ab){Ab=!0;ma=ma.getXml().documentElement.firstChild;for(var va={};null!=ma;){if("undefined"!==typeof ma.getAttribute)if("parsererror"==ma.nodeName)null!=window.console&&console.log("Parser error in "+L+": "+ma.textContent);else if("clibs"==ma.nodeName){for(var oa=ma.getAttribute("name"),qa=ma.getElementsByTagName("add"),ta=[],xa=0;xa<qa.length;xa++)ta.push(encodeURIComponent(mxUtils.getTextContent(qa[xa])));
+null!=oa&&0<ta.length&&(va[oa]=ta.join(";"))}else if(ta=ma.getAttribute("url"),null!=ta){qa=ma.getAttribute("section");oa=ma.getAttribute("subsection");if(null==qa&&(xa=ta.indexOf("/"),qa=ta.substring(0,xa),null==oa)){var Ma=ta.indexOf("/",xa+1);-1<Ma&&(oa=ta.substring(xa+1,Ma))}xa=Ja[qa];null==xa&&(xa=[],Ja[qa]=xa);ta=ma.getAttribute("clibs");null!=va[ta]&&(ta=va[ta]);ta={url:ma.getAttribute("url"),libs:ma.getAttribute("libs"),title:ma.getAttribute("title"),tooltip:ma.getAttribute("name")||ma.getAttribute("url"),
+preview:ma.getAttribute("preview"),clibs:ta,tags:ma.getAttribute("tags")};xa.push(ta);null!=oa&&(xa=Wa[qa],null==xa&&(xa={},Wa[qa]=xa),qa=xa[oa],null==qa&&(qa=[],xa[oa]=qa),qa.push(ta))}ma=ma.nextSibling}W.stop();H()}})};C.appendChild(Ia);C.appendChild(Ka);C.appendChild(Aa);var Ab=!1,wb=L;/^https?:\/\//.test(wb)&&!b.editor.isCorsEnabledForUrl(wb)&&(wb=PROXY_URL+"?url="+encodeURIComponent(wb));W.spin(Aa);null!=v?v(function(ma,va){gb=ma;ba=ab=va;yb()},yb):yb();la=Ja}mxEvent.addListener(Q,"keypress",
+function(ma){b.dialog.container.firstChild==C&&13==ma.keyCode&&T()});var kb=document.createElement("div");kb.style.marginTop=k?"4px":"16px";kb.style.textAlign="right";kb.style.position="absolute";kb.style.left="40px";kb.style.bottom="24px";kb.style.right="40px";var zb=mxUtils.button(mxResources.get("cancel"),function(){null!=z&&z();b.hideDialog(!0)});zb.className="geBtn";!b.editor.cancelFirst||x&&null==z||kb.appendChild(zb);if(!(k||"1"==urlParams.embed||x||mxClient.IS_ANDROID||mxClient.IS_IOS)&&"1"!=
+urlParams.noDevice){var Bb=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ma=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(oa){ra=oa;na=null;templateRealURl=va;b.hideDialog();T()},function(oa){b.handleError(oa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ma.container,300,80,!0,!0);ma.init()});Bb.className="geBtn";kb.appendChild(Bb)}if(Graph.fileSupport&&m){var Cb=mxUtils.button(mxResources.get("import"),
+function(){if(null==b.newDlgFileInputElt){var ma=document.createElement("input");ma.setAttribute("multiple","multiple");ma.setAttribute("type","file");mxEvent.addListener(ma,"change",function(va){b.openFiles(ma.files,!0);ma.value=""});ma.style.display="none";document.body.appendChild(ma);b.newDlgFileInputElt=ma}b.newDlgFileInputElt.click()});Cb.className="geBtn";kb.appendChild(Cb)}kb.appendChild(Y);b.editor.cancelFirst||null!=d||x&&null==z||kb.appendChild(zb);C.appendChild(kb);this.container=C};
+NewDialog.tagsList={};
+var SaveDialog=function(b,k,n,d,x,z,y,F,N,K,L){function c(g,p,C,I,M,O){var Q=null;if((null==d||0>mxUtils.indexOf(d,g))&&(null==N||g==N)&&(null==K||0<=mxUtils.indexOf(K,g))){M=null!=M?M:b.getTitleForService(g);var U=0<=mxUtils.indexOf(u,g);if(U||null!=b.getServiceForName(g)){Q=document.createElement("option");var V="";!U&&b.isOffline(g==App.MODE_GOOGLE&&"1"==urlParams["gapi-stealth"])&&(Q.setAttribute("disabled","disabled"),V=" ("+mxResources.get("offline")+")");if("pick"==O)Q.innerHTML=mxUtils.htmlEntities(M)+
+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+V,Q.setAttribute("value","pickFolder-"+g),Q.setAttribute("title",M+" - "+mxResources.get("pickFolder")+"...");else{U=g+(null!=C?"-"+C:"");var X=G[U];null!=X&&null!=X.option&&X.option.parentNode.removeChild(X.option);X=null;if(null!=p){"/"==p.charAt(p.length-1)&&(p=p.substring(0,p.length-1));"/"==p.charAt(0)&&(p=p.substring(1));X=p;if(g!=App.MODE_GITHUB&&g==App.MODE_GITLAB){var W=X.lastIndexOf("/");0<=W&&(X=
+X.substring(W+1))}40<X.length&&(X=X.substring(0,20)+"..."+X.substring(X.length-20))}Q.innerHTML=mxUtils.htmlEntities(M)+(null!=X?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(X):"")+V;Q.setAttribute("title",M+(null!=p?" ("+p+")":"")+(null!=C&&decodeURIComponent(C)!=p?" ["+C+"]":""));Q.setAttribute("value",U);G[U]={option:Q,mode:g,path:p,id:C};SaveDialog.lastValue==U&&null==F&&"disabled"==!Q.getAttribute("disabled")?I=!0:null==I&&("root"==O?I=null==F&&b.mode==g||null!=g&&g==F:"pickFolder-"==
+q.value.substring(0,11)&&(I=!0));I&&Q.setAttribute("selected","selected")}q.appendChild(Q)}}return Q}function f(g){b.pickFolder(g,function(p){var C=null;g==App.MODE_GOOGLE&&null!=p.docs&&0<p.docs.length?C={mode:g,path:p.docs[0].name,id:p.docs[0].id}:g==App.MODE_ONEDRIVE&&null!=p.value&&0<p.value.length?C={mode:g,path:p.value[0].name,id:OneDriveFile.prototype.getIdOf(p.value[0])}:(g==App.MODE_GITHUB||g==App.MODE_GITLAB)&&null!=p&&0<p.length&&(C={mode:g,path:decodeURIComponent(p),id:p});null!=C&&(b.addRecent(C,
+"Folders",5),p=c(C.mode,C.path,C.id,!0),q.innerHTML="",G={},l(),C=q.selectedIndex,q.value=p.value,0>q.selectedIndex&&(q.selectedIndex=C))},!0,!0,!0,!0)}function l(){var g=b.getRecent("Folders"),p=0;if(null!=g&&0<g.length)for(var C=0;C<g.length;C++)null!=c(g[C].mode,g[C].path,g[C].id)&&p++;c(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");c(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(c(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),
null,null,"root"),c(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&c(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);c(App.MODE_GITHUB,null,null,null,null,"pick");c(App.MODE_GITLAB,null,null,null,null,"pick");c(App.MODE_TRELLO);g=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&g&&c(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&
"0"!=urlParams.browser&&c(App.MODE_BROWSER);g&&c("download");Editor.popupsAllowed&&c("_blank",null,null,null,mxResources.get("openInNewWindow"));"pickFolder-"==q.value.substring(0,11)&&(g=document.createElement("option"),g.setAttribute("value",""),g.setAttribute("selected","selected"),mxUtils.write(g,mxResources.get("pickFolder")+"..."),q.insertBefore(g,q.firstChild));J=q.value}function m(){if("pickFolder-"==q.value.substring(0,11)){var g=q.value.substring(11);q.value=J;f(g)}else if(null!=P&&null!=
-G[q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[P.value].extension){g=b.getExtensionForService(G[q.value].mode);var n=T.value;null!=g&&0>l.indexOf(".")&&0>n.indexOf(".")&&(T.value=n+g)}H.innerHTML="";mxUtils.write(H,null!=L?L:mxResources.get("download"==q.value||"_blank"==q.value||null!=M?"ok":"save"));""==q.value?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")}var t=document.createElement("div");t.style.display="flex";t.style.flexWrap="wrap";t.style.whiteSpace=
-"nowrap";var v=document.createElement("div");v.style.display="grid";v.style.gap="5px 8px";v.style.gridAutoRows="auto auto 44px";v.style.gridAutoColumns="0fr minmax(0,1fr)";v.style.width="100%";var A=null,E=null;if(null!=x&&null!=z&&"image/"==z.substring(0,6)&&("image/svg"!=z.substring(0,9)||mxClient.IS_SVG)){v.style.display="inline-grid";v.style.flexBasis="75%";A=document.createElement("div");A.style.display="inline-block";A.style.height="auto";A.style.maxWidth="25%";A.style.margin="auto";var D=document.createElement("img"),
-B=y?x:btoa(unescape(encodeURIComponent(x))),S="data:"+z+";base64,"+B;D.setAttribute("src",S);D.style.boxSizing="border-box";D.style.maxHeight="50px";D.style.maxWidth="100%";D.style.paddingLeft="10px";A.appendChild(D);"image/png"!=z&&"image/svg+xml"!=z||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(E=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(S,null,null,z,mxUtils.bind(this,function(){"copy"==F?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
-mxUtils.bind(this,function(g){b.handleError(g)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(A.setAttribute("title",mxResources.get("openInNewWindow")),A.style.cursor="pointer",mxEvent.addGestureListeners(A,null,null,function(g){mxEvent.isPopupTrigger(g)||b.openInNewWindow(x,z,y)})):A.setAttribute("title",mxResources.get("preview"))}B=document.createElement("div");B.style.display="flex";B.style.padding="1px";B.style.alignItems="center";B.style.justifyContent="flex-end";
-B.style.gridColumn="1";B.style.whiteSpace="nowrap";var R=document.createElement("div");R.style.display="grid";R.style.padding="1px";R.style.alignItems="center";R.style.gridColumn="2";R.style.gridAutoColumns="minmax(0,1fr) auto";R.style.gap="6px";mxUtils.write(B,mxResources.get("saveAs")+":");var T=document.createElement("input");T.setAttribute("type","text");T.setAttribute("value",l);T.style.boxSizing="border-box";T.style.width="100%";R.appendChild(T);null==M&&(v.appendChild(B),v.appendChild(R));
-var P=null;null!=b.editor.diagramFileTypes&&null==z&&null==M&&(B=B.cloneNode(!1),R=R.cloneNode(!1),mxUtils.write(B,mxResources.get("type")+":"),P=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),P.style.boxSizing="border-box",P.style.width="100%",R.appendChild(P),v.appendChild(B),v.appendChild(R));B=B.cloneNode(!1);R=R.cloneNode(!1);mxUtils.write(B,mxResources.get("where")+":");var q=document.createElement("select");q.style.textOverflow="ellipsis";q.style.gridColumn="1";var u=["browser",
-"device","download","_blank"],J=null,G={};D=mxUtils.button(mxResources.get("reset"),function(){T.value=l;T.dispatchEvent(new Event("change"));b.resetRecent("Folders");q.innerHTML="";q.value="";pickFolderOption=null;G={};k()},null,"geBtn");var H=mxUtils.button("",function(){SaveDialog.lastValue=q.value;var g=G[SaveDialog.lastValue];null!=g&&p(T,g.mode,g.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(T,"keypress",function(g){13==g.keyCode&&("copy"==F&&null!=E?E.click():H.click())});mxEvent.addListener(q,
-"change",m);k();R.appendChild(q);null!=SaveDialog.lastValue&&null!=G[SaveDialog.lastValue]&&(q.value=SaveDialog.lastValue);m();v.appendChild(B);v.appendChild(R);t.appendChild(v);null!=A&&t.appendChild(A);v=document.createElement("div");v.style.flexBasis="100%";v.style.textAlign="right";v.style.marginTop=null!=z?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));A=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
-null,"geBtn");b.editor.cancelFirst&&v.appendChild(A);v.appendChild(D);"copy"==F&&null!=E?(E.className="geBtn gePrimaryBtn",H.className="geBtn",v.appendChild(H),v.appendChild(E)):(null!=E&&v.appendChild(E),v.appendChild(H));b.editor.cancelFirst||v.appendChild(A);t.appendChild(v);this.init=function(){Editor.selectFilename(T)};this.container=t},CreateDialog=function(b,l,p,d,x,z,y,F,M,K,L,c,f,k,m,t,v){function A(q,u,J,G){function H(){mxEvent.addListener(g,"click",function(){var O=J;if(y){var Q=B.value,
-U=Q.lastIndexOf(".");if(0>l.lastIndexOf(".")&&0>U){O=null!=O?O:P.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=U&&(Q=Q.substring(0,U));B.value=Q+V}}E(J)})}var g=document.createElement("a");g.style.overflow="hidden";var n=document.createElement("img");
-n.src=q;n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.width="60px";n.style.height="60px";n.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(n);g.style.color="gray";g.style.fontSize="11px";var C=document.createElement("div");g.appendChild(C);mxUtils.write(C,u);if(null!=G&&null==b[G]){n.style.visibility="hidden";mxUtils.setOpacity(C,
-10);var I=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});I.spin(g);var N=window.setTimeout(function(){null==b[G]&&(I.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(N),mxUtils.setOpacity(C,100),n.style.visibility="",I.stop(),H())}))}else H();R.appendChild(g);++T==c&&(mxUtils.br(R),T=0)}function E(q){var u=B.value;
-if(null==q||null!=u&&0<u.length)v&&b.hideDialog(),p(u,q,B)}L="1"==urlParams.noDevice?!1:L;y=null!=y?y:!0;F=null!=F?F:!0;c=null!=c?c:4;v=null!=v?v:!0;z=document.createElement("div");z.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(z);var D=document.createElement("h2");mxUtils.write(D,x||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom="24px";z.appendChild(D);x=document.createElement("span");mxUtils.write(x,mxResources.get("filename")+":");x.style.maxWidth="106px";x.style.overflow=
-"hidden";x.style.textOverflow="ellipsis";x.style.display="inline-block";z.appendChild(x);var B=document.createElement("input");B.setAttribute("value",l);B.style.width="180px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){Editor.selectFilename(B)};z.appendChild(B);null!=t&&null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width="90px",z.appendChild(t));t=null;if("1"!=
-urlParams.noDevice&&null!=f&&null!=k&&"image/"==k.substring(0,6)&&("image/svg"!=k.substring(0,9)||mxClient.IS_SVG)){B.style.width="160px";x=document.createElement("img");var S=m?f:btoa(unescape(encodeURIComponent(f)));x.setAttribute("src","data:"+k+";base64,"+S);x.style.position="absolute";x.style.top="70px";x.style.right="100px";x.style.maxWidth="120px";x.style.maxHeight="80px";mxUtils.setPrefixedStyle(x.style,"transform","translate(50%,-50%)");z.appendChild(x);mxClient.IS_FF||"image/png"!=k||null==
-navigator.clipboard||"function"!==typeof window.ClipboardItem||(t=mxUtils.button(mxResources.get("copy"),function(q){q=b.base64ToBlob(S,"image/png");q=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="data:'+k+";base64,"+S+'">'],{type:"text/html"})});navigator.clipboard.write([q]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(u){b.handleError(u)}))}),t.style.marginTop="6px",t.className="geBtn");M&&Editor.popupsAllowed&&
+G[q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[P.value].extension){g=b.getExtensionForService(G[q.value].mode);var p=T.value;null!=g&&0>k.indexOf(".")&&0>p.indexOf(".")&&(T.value=p+g)}H.innerHTML="";mxUtils.write(H,null!=L?L:mxResources.get("download"==q.value||"_blank"==q.value||null!=N?"ok":"save"));""==q.value?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")}var t=document.createElement("div");t.style.display="flex";t.style.flexWrap="wrap";t.style.whiteSpace=
+"nowrap";var v=document.createElement("div");v.style.display="grid";v.style.gap="5px 8px";v.style.gridAutoRows="auto auto 44px";v.style.gridAutoColumns="0fr minmax(0,1fr)";v.style.width="100%";var B=null,E=null;if(null!=x&&null!=z&&"image/"==z.substring(0,6)&&("image/svg"!=z.substring(0,9)||mxClient.IS_SVG)){v.style.display="inline-grid";v.style.flexBasis="75%";B=document.createElement("div");B.style.display="inline-block";B.style.height="auto";B.style.maxWidth="25%";B.style.margin="auto";var D=document.createElement("img"),
+A=y?x:btoa(unescape(encodeURIComponent(x))),S="data:"+z+";base64,"+A;D.setAttribute("src",S);D.style.boxSizing="border-box";D.style.maxHeight="50px";D.style.maxWidth="100%";D.style.paddingLeft="10px";B.appendChild(D);"image/png"!=z&&"image/svg+xml"!=z||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(E=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(S,null,null,z,mxUtils.bind(this,function(){"copy"==F?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),
+mxUtils.bind(this,function(g){b.handleError(g)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(B.setAttribute("title",mxResources.get("openInNewWindow")),B.style.cursor="pointer",mxEvent.addGestureListeners(B,null,null,function(g){mxEvent.isPopupTrigger(g)||b.openInNewWindow(x,z,y)})):B.setAttribute("title",mxResources.get("preview"))}A=document.createElement("div");A.style.display="flex";A.style.padding="1px";A.style.alignItems="center";A.style.justifyContent="flex-end";
+A.style.gridColumn="1";A.style.whiteSpace="nowrap";var R=document.createElement("div");R.style.display="grid";R.style.padding="1px";R.style.alignItems="center";R.style.gridColumn="2";R.style.gridAutoColumns="minmax(0,1fr) auto";R.style.gap="6px";mxUtils.write(A,mxResources.get("saveAs")+":");var T=document.createElement("input");T.setAttribute("type","text");T.setAttribute("value",k);T.style.boxSizing="border-box";T.style.width="100%";R.appendChild(T);null==N&&(v.appendChild(A),v.appendChild(R));
+var P=null;null!=b.editor.diagramFileTypes&&null==z&&null==N&&(A=A.cloneNode(!1),R=R.cloneNode(!1),mxUtils.write(A,mxResources.get("type")+":"),P=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),P.style.boxSizing="border-box",P.style.width="100%",R.appendChild(P),v.appendChild(A),v.appendChild(R));A=A.cloneNode(!1);R=R.cloneNode(!1);mxUtils.write(A,mxResources.get("where")+":");var q=document.createElement("select");q.style.textOverflow="ellipsis";q.style.gridColumn="1";var u=["browser",
+"device","download","_blank"],J=null,G={};D=mxUtils.button(mxResources.get("reset"),function(){T.value=k;T.dispatchEvent(new Event("change"));b.resetRecent("Folders");q.innerHTML="";q.value="";pickFolderOption=null;G={};l()},null,"geBtn");var H=mxUtils.button("",function(){SaveDialog.lastValue=q.value;var g=G[SaveDialog.lastValue];null!=g&&n(T,g.mode,g.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(T,"keypress",function(g){13==g.keyCode&&("copy"==F&&null!=E?E.click():H.click())});mxEvent.addListener(q,
+"change",m);l();R.appendChild(q);null!=SaveDialog.lastValue&&null!=G[SaveDialog.lastValue]&&(q.value=SaveDialog.lastValue);m();v.appendChild(A);v.appendChild(R);t.appendChild(v);null!=B&&t.appendChild(B);v=document.createElement("div");v.style.flexBasis="100%";v.style.textAlign="right";v.style.marginTop=null!=z?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},
+null,"geBtn");b.editor.cancelFirst&&v.appendChild(B);v.appendChild(D);"copy"==F&&null!=E?(E.className="geBtn gePrimaryBtn",H.className="geBtn",v.appendChild(H),v.appendChild(E)):(null!=E&&v.appendChild(E),v.appendChild(H));b.editor.cancelFirst||v.appendChild(B);t.appendChild(v);this.init=function(){Editor.selectFilename(T)};this.container=t},CreateDialog=function(b,k,n,d,x,z,y,F,N,K,L,c,f,l,m,t,v){function B(q,u,J,G){function H(){mxEvent.addListener(g,"click",function(){var O=J;if(y){var Q=A.value,
+U=Q.lastIndexOf(".");if(0>k.lastIndexOf(".")&&0>U){O=null!=O?O:P.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=U&&(Q=Q.substring(0,U));A.value=Q+V}}E(J)})}var g=document.createElement("a");g.style.overflow="hidden";var p=document.createElement("img");
+p.src=q;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(p);g.style.color="gray";g.style.fontSize="11px";var C=document.createElement("div");g.appendChild(C);mxUtils.write(C,u);if(null!=G&&null==b[G]){p.style.visibility="hidden";mxUtils.setOpacity(C,
+10);var I=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});I.spin(g);var M=window.setTimeout(function(){null==b[G]&&(I.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(M),mxUtils.setOpacity(C,100),p.style.visibility="",I.stop(),H())}))}else H();R.appendChild(g);++T==c&&(mxUtils.br(R),T=0)}function E(q){var u=A.value;
+if(null==q||null!=u&&0<u.length)v&&b.hideDialog(),n(u,q,A)}L="1"==urlParams.noDevice?!1:L;y=null!=y?y:!0;F=null!=F?F:!0;c=null!=c?c:4;v=null!=v?v:!0;z=document.createElement("div");z.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(z);var D=document.createElement("h2");mxUtils.write(D,x||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom="24px";z.appendChild(D);x=document.createElement("span");mxUtils.write(x,mxResources.get("filename")+":");x.style.maxWidth="106px";x.style.overflow=
+"hidden";x.style.textOverflow="ellipsis";x.style.display="inline-block";z.appendChild(x);var A=document.createElement("input");A.setAttribute("value",k);A.style.width="180px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){Editor.selectFilename(A)};z.appendChild(A);null!=t&&null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,A,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width="90px",z.appendChild(t));t=null;if("1"!=
+urlParams.noDevice&&null!=f&&null!=l&&"image/"==l.substring(0,6)&&("image/svg"!=l.substring(0,9)||mxClient.IS_SVG)){A.style.width="160px";x=document.createElement("img");var S=m?f:btoa(unescape(encodeURIComponent(f)));x.setAttribute("src","data:"+l+";base64,"+S);x.style.position="absolute";x.style.top="70px";x.style.right="100px";x.style.maxWidth="120px";x.style.maxHeight="80px";mxUtils.setPrefixedStyle(x.style,"transform","translate(50%,-50%)");z.appendChild(x);mxClient.IS_FF||"image/png"!=l||null==
+navigator.clipboard||"function"!==typeof window.ClipboardItem||(t=mxUtils.button(mxResources.get("copy"),function(q){q=b.base64ToBlob(S,"image/png");q=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="data:'+l+";base64,"+S+'">'],{type:"text/html"})});navigator.clipboard.write([q]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(u){b.handleError(u)}))}),t.style.marginTop="6px",t.className="geBtn");N&&Editor.popupsAllowed&&
(x.style.cursor="pointer",mxEvent.addGestureListeners(x,null,null,function(q){mxEvent.isPopupTrigger(q)||E("_blank")}))}mxUtils.br(z);var R=document.createElement("div");R.style.textAlign="center";var T=0;R.style.marginTop="6px";z.appendChild(R);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),
-P.appendChild(f),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(f,mxResources.get("oneDrive")),P.appendChild(f),b.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),
-f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),P.appendChild(f),b.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),P.appendChild(f),A(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&
-(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITLAB),mxUtils.write(f,mxResources.get("gitlab")),P.appendChild(f),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),P.appendChild(f),A(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||
-"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)f=document.createElement("option"),f.setAttribute("value",App.MODE_DEVICE),mxUtils.write(f,mxResources.get("device")),P.appendChild(f),b.mode!=App.MODE_DEVICE&&F||f.setAttribute("selected","selected"),L&&A(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);F&&isLocalStorage&&"0"!=urlParams.browser&&(F=document.createElement("option"),F.setAttribute("value",App.MODE_BROWSER),mxUtils.write(F,
-mxResources.get("browser")),P.appendChild(F),b.mode==App.MODE_BROWSER&&F.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));F=document.createElement("div");F.style.marginTop="26px";F.style.textAlign="center";null!=K&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(K)}),L.className="geBtn",F.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),
-window.close(),window.location.href=b.getUrl())});L.className="geBtn";b.editor.cancelFirst&&null==d&&F.appendChild(L);null==d&&(f=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),f.className="geBtn",F.appendChild(f));M&&Editor.popupsAllowed&&(M=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),M.className="geBtn",F.appendChild(M));CreateDialog.showDownloadButton&&(M=mxUtils.button(mxResources.get("download"),function(){E("download")}),M.className="geBtn",
-F.appendChild(M),null!=t&&(M.style.marginTop="6px",F.style.marginTop="6px"));null!=t&&(mxUtils.br(F),F.appendChild(t));b.editor.cancelFirst&&null==d||F.appendChild(L);mxEvent.addListener(B,"keypress",function(q){13==q.keyCode?E(App.MODE_DEVICE):27==q.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});z.appendChild(F);this.container=z};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,l,p,d,x){x=null!=x?x:!0;var z=document.createElement("div");z.style.textAlign="center";z.style.height="100%";mxUtils.write(z,mxResources.get("fileOpenLocation"));mxUtils.br(z);mxUtils.br(z);var y=mxUtils.button(mxResources.get("openInThisWindow"),function(){x&&b.hideDialog();null!=d&&d()});y.className="geBtn";y.style.marginBottom="8px";y.style.width="280px";z.appendChild(y);mxUtils.br(z);var F=mxUtils.button(mxResources.get("openInNewWindow"),function(){x&&b.hideDialog();
-null!=p&&p();b.openLink(l,null,!0)});F.className="geBtn gePrimaryBtn";F.style.width=y.style.width;z.appendChild(F);mxUtils.br(z);mxUtils.br(z);mxUtils.write(z,mxResources.get("allowPopups"));this.container=z},ImageDialog=function(b,l,p,d,x,z,y,F){function M(){0<c.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");"data:"!=c.value.substring(0,5)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}z=null!=z?z:!0;var K=b.editor.graph,L=document.createElement("div");
-mxUtils.write(L,l);l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";l.style.paddingRight="20px";var c=document.createElement("input");c.setAttribute("value",p);c.setAttribute("type","text");c.setAttribute("spellcheck","false");c.setAttribute("autocorrect","off");c.setAttribute("autocomplete","off");c.setAttribute("autocapitalize","off");c.style.marginTop=
-"6px";c.style.width=(Graph.fileSupport?460:340)-20+"px";c.style.backgroundImage="url('"+Editor.crossImage+"')";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="100% 50%";c.style.paddingRight="14px";p=document.createElement("div");p.setAttribute("title",mxResources.get("reset"));p.style.position="relative";p.style.left="-16px";p.style.width="12px";p.style.height="14px";p.style.cursor="pointer";p.style.display="inline-block";p.style.top="3px";p.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(p,"click",function(){c.value="";c.focus()});l.appendChild(c);l.appendChild(p);L.appendChild(l);var f=F,k,m,t=function(B,S,R,T){var P="data:"==B.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<B.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(B,function(q){b.spinner.stop();b.hideDialog();var u=!1===T?1:null!=S&&null!=R?Math.max(S/q.width,R/q.height):Math.min(1,Math.min(520/q.width,520/q.height));z&&(B=b.convertDataUri(B));d(B,
-Math.round(Number(q.width)*u),Math.round(Number(q.height)*u),f,k,m)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(B,null,null,f,k,m)):(B=b.convertDataUri(B),S=null==S?120:S,R=null==R?100:R,b.hideDialog(),d(B,S,R,f,k,m))},v=function(B,S){if(null!=B){var R=x?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?t(B,R.width,R.height,S):t(B,null,null,S)}else b.hideDialog(),d(null)};this.init=function(){c.focus();
-if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=L.parentNode,S=null;mxEvent.addListener(B,"dragleave",function(R){null!=S&&(S.parentNode.removeChild(S),S=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(R){null==S&&(S=b.highlightElement(B));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(R){null!=S&&(S.parentNode.removeChild(S),S=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,
-0,0,b.maxImageSize,function(P,q,u,J,G,H,g,n){v(P,n)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var q=0;q<P.length;q++)P[q]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var T=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&v(decodeURIComponent(T))}R.stopPropagation();R.preventDefault()}),!1)}};F=document.createElement("div");F.style.marginTop="14px";F.style.textAlign=
-"center";p=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&F.appendChild(p);ImageDialog.filePicked=function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(c.value=B.url));c.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type",
-"file");mxEvent.addListener(A,"change",function(B){null!=A.files&&(b.importFiles(A.files,0,0,b.maxImageSize,function(S,R,T,P,q,u){v(S)},function(){},function(S){return"image/"==S.type.substring(0,6)},function(S){for(var R=0;R<S.length;R++)S[R]()},!0),A.type="",A.type="file",A.value="")});A.style.display="none";document.body.appendChild(A);b.imgDlgFileInputElt=A}l=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});l.className="geBtn";F.appendChild(l)}mxEvent.addListener(c,
-"keypress",function(B){13==B.keyCode&&v(c.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var B=new CropImageDialog(b,c.value,f,function(S,R,T){f=S;k=R;m=T});b.showDialog(B.container,300,390,!0,!0)});y&&(E.className="geBtn",F.appendChild(E));var D=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var B=b.editor.createImageUrlConverter().convert(c.value),S=new Image;S.onload=function(){b.editor.convertImageToDataUri(B,
-function(R){b.confirmImageResize(function(T){b.resizeImage(S,R,mxUtils.bind(this,function(P,q,u){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(c.value=P,M()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},S.width>b.maxImageSize||S.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};S.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
-S.src=B}});D.className="geBtn";mxEvent.addListener(c,"change",function(B){f=null;M()});M();F.appendChild(D);y=mxUtils.button(mxResources.get("apply"),function(){v(c.value)});y.className="geBtn gePrimaryBtn";F.appendChild(y);b.editor.cancelFirst||F.appendChild(p);Graph.fileSupport&&(F.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",y=document.createElement("div"),y.style.position="absolute",
-y.style.width="420px",y.style.top="58%",y.style.textAlign="center",y.style.fontSize="18px",y.style.color="#a0c3ff",mxUtils.write(y,mxResources.get("dragImagesHere")),L.appendChild(y));L.appendChild(F);this.container=L},LinkDialog=function(b,l,p,d,x,z,y){function F(B,S){var R=document.createElement("option");mxUtils.write(R,mxResources.get(B));R.value=B;E.appendChild(R);D[B]=S}var M=document.createElement("div");M.style.height="100%";mxUtils.write(M,mxResources.get("editLink")+":");var K=document.createElement("div");
+P.appendChild(f),B(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(f,mxResources.get("oneDrive")),P.appendChild(f),b.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),B(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),
+f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),P.appendChild(f),b.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),B(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),P.appendChild(f),B(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&
+(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITLAB),mxUtils.write(f,mxResources.get("gitlab")),P.appendChild(f),B(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),P.appendChild(f),B(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||
+"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)f=document.createElement("option"),f.setAttribute("value",App.MODE_DEVICE),mxUtils.write(f,mxResources.get("device")),P.appendChild(f),b.mode!=App.MODE_DEVICE&&F||f.setAttribute("selected","selected"),L&&B(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);F&&isLocalStorage&&"0"!=urlParams.browser&&(F=document.createElement("option"),F.setAttribute("value",App.MODE_BROWSER),mxUtils.write(F,
+mxResources.get("browser")),P.appendChild(F),b.mode==App.MODE_BROWSER&&F.setAttribute("selected","selected"),B(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));F=document.createElement("div");F.style.marginTop="26px";F.style.textAlign="center";null!=K&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(K)}),L.className="geBtn",F.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),
+window.close(),window.location.href=b.getUrl())});L.className="geBtn";b.editor.cancelFirst&&null==d&&F.appendChild(L);null==d&&(f=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),f.className="geBtn",F.appendChild(f));N&&Editor.popupsAllowed&&(N=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),N.className="geBtn",F.appendChild(N));CreateDialog.showDownloadButton&&(N=mxUtils.button(mxResources.get("download"),function(){E("download")}),N.className="geBtn",
+F.appendChild(N),null!=t&&(N.style.marginTop="6px",F.style.marginTop="6px"));null!=t&&(mxUtils.br(F),F.appendChild(t));b.editor.cancelFirst&&null==d||F.appendChild(L);mxEvent.addListener(A,"keypress",function(q){13==q.keyCode?E(App.MODE_DEVICE):27==q.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});z.appendChild(F);this.container=z};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,k,n,d,x){x=null!=x?x:!0;var z=document.createElement("div");z.style.textAlign="center";z.style.height="100%";mxUtils.write(z,mxResources.get("fileOpenLocation"));mxUtils.br(z);mxUtils.br(z);var y=mxUtils.button(mxResources.get("openInThisWindow"),function(){x&&b.hideDialog();null!=d&&d()});y.className="geBtn";y.style.marginBottom="8px";y.style.width="280px";z.appendChild(y);mxUtils.br(z);var F=mxUtils.button(mxResources.get("openInNewWindow"),function(){x&&b.hideDialog();
+null!=n&&n();b.openLink(k,null,!0)});F.className="geBtn gePrimaryBtn";F.style.width=y.style.width;z.appendChild(F);mxUtils.br(z);mxUtils.br(z);mxUtils.write(z,mxResources.get("allowPopups"));this.container=z},ImageDialog=function(b,k,n,d,x,z,y,F){function N(){0<c.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");"data:"!=c.value.substring(0,5)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}z=null!=z?z:!0;var K=b.editor.graph,L=document.createElement("div");
+mxUtils.write(L,k);k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow="clip";k.style.cursor="default";k.style.paddingRight="20px";var c=document.createElement("input");c.setAttribute("value",n);c.setAttribute("type","text");c.setAttribute("spellcheck","false");c.setAttribute("autocorrect","off");c.setAttribute("autocomplete","off");c.setAttribute("autocapitalize","off");c.style.marginTop=
+"6px";c.style.width=(Graph.fileSupport?460:340)-20+"px";c.style.backgroundImage="url('"+Editor.crossImage+"')";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="100% 50%";c.style.paddingRight="14px";n=document.createElement("div");n.setAttribute("title",mxResources.get("reset"));n.style.position="relative";n.style.left="-16px";n.style.width="12px";n.style.height="14px";n.style.cursor="pointer";n.style.display="inline-block";n.style.top="3px";n.style.background="url('"+b.editor.transparentImage+
+"')";mxEvent.addListener(n,"click",function(){c.value="";c.focus()});k.appendChild(c);k.appendChild(n);L.appendChild(k);var f=F,l,m,t=function(A,S,R,T){var P="data:"==A.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<A.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(A,function(q){b.spinner.stop();b.hideDialog();var u=!1===T?1:null!=S&&null!=R?Math.max(S/q.width,R/q.height):Math.min(1,Math.min(520/q.width,520/q.height));z&&(A=b.convertDataUri(A));d(A,
+Math.round(Number(q.width)*u),Math.round(Number(q.height)*u),f,l,m)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(A,null,null,f,l,m)):(A=b.convertDataUri(A),S=null==S?120:S,R=null==R?100:R,b.hideDialog(),d(A,S,R,f,l,m))},v=function(A,S){if(null!=A){var R=x?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?t(A,R.width,R.height,S):t(A,null,null,S)}else b.hideDialog(),d(null)};this.init=function(){c.focus();
+if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=L.parentNode,S=null;mxEvent.addListener(A,"dragleave",function(R){null!=S&&(S.parentNode.removeChild(S),S=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==S&&(S=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){null!=S&&(S.parentNode.removeChild(S),S=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,
+0,0,b.maxImageSize,function(P,q,u,J,G,H,g,p){v(P,p)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var q=0;q<P.length;q++)P[q]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var T=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&v(decodeURIComponent(T))}R.stopPropagation();R.preventDefault()}),!1)}};F=document.createElement("div");F.style.marginTop="14px";F.style.textAlign=
+"center";n=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&F.appendChild(n);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url));c.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type",
+"file");mxEvent.addListener(B,"change",function(A){null!=B.files&&(b.importFiles(B.files,0,0,b.maxImageSize,function(S,R,T,P,q,u){v(S)},function(){},function(S){return"image/"==S.type.substring(0,6)},function(S){for(var R=0;R<S.length;R++)S[R]()},!0),B.type="",B.type="file",B.value="")});B.style.display="none";document.body.appendChild(B);b.imgDlgFileInputElt=B}k=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});k.className="geBtn";F.appendChild(k)}mxEvent.addListener(c,
+"keypress",function(A){13==A.keyCode&&v(c.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var A=new CropImageDialog(b,c.value,f,function(S,R,T){f=S;l=R;m=T});b.showDialog(A.container,300,390,!0,!0)});y&&(E.className="geBtn",F.appendChild(E));var D=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var A=b.editor.createImageUrlConverter().convert(c.value),S=new Image;S.onload=function(){b.editor.convertImageToDataUri(A,
+function(R){b.confirmImageResize(function(T){b.resizeImage(S,R,mxUtils.bind(this,function(P,q,u){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(c.value=P,N()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},S.width>b.maxImageSize||S.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};S.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};
+S.src=A}});D.className="geBtn";mxEvent.addListener(c,"change",function(A){f=null;N()});N();F.appendChild(D);y=mxUtils.button(mxResources.get("apply"),function(){v(c.value)});y.className="geBtn gePrimaryBtn";F.appendChild(y);b.editor.cancelFirst||F.appendChild(n);Graph.fileSupport&&(F.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",y=document.createElement("div"),y.style.position="absolute",
+y.style.width="420px",y.style.top="58%",y.style.textAlign="center",y.style.fontSize="18px",y.style.color="#a0c3ff",mxUtils.write(y,mxResources.get("dragImagesHere")),L.appendChild(y));L.appendChild(F);this.container=L},LinkDialog=function(b,k,n,d,x,z,y){function F(A,S){var R=document.createElement("option");mxUtils.write(R,mxResources.get(A));R.value=A;E.appendChild(R);D[A]=S}var N=document.createElement("div");N.style.height="100%";mxUtils.write(N,mxResources.get("editLink")+":");var K=document.createElement("div");
K.className="geUrlLinkContainer";K.style.backgroundColor="transparent";K.style.borderColor="transparent";K.style.whiteSpace="nowrap";K.style.textOverflow="clip";K.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="16px";L.style.marginBottom=
"4px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.backgroundImage="url("+Editor.crossImage+")";c.className="geAdaptiveAsset";c.style.display="inline-block";c.style.position="relative";c.style.top="3px";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";mxEvent.addListener(c,"click",function(){L.value="";L.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value",
-"url");f.setAttribute("type","radio");f.setAttribute("name","geLinkDialogOption");var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","geLinkDialogOption");var m=document.createElement("select");m.style.width="414px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.margin="0 6p 0 6px";null!=y&&(t.setAttribute("checked","checked"),t.defaultChecked=
-!0);y=null!=y?y:"_blank";t.setAttribute("title",y);z&&(L.style.width="200px");if(x&&null!=b.pages){null!=l&&Graph.isPageLink(l)?(k.setAttribute("checked","checked"),k.defaultChecked=!0):(L.setAttribute("value",l),f.setAttribute("checked","checked"),f.defaultChecked=!0);K.appendChild(f);K.appendChild(L);K.appendChild(c);z&&(K.appendChild(t),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);K.appendChild(k);x=!1;for(z=0;z<b.pages.length;z++)c=document.createElement("option"),mxUtils.write(c,
-b.pages[z].getName()||mxResources.get("pageWithNumber",[z+1])),c.setAttribute("value","data:page/id,"+b.pages[z].getId()),l==c.getAttribute("value")&&(c.setAttribute("selected","selected"),x=!0),m.appendChild(c);if(!x&&k.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");m.appendChild(v);mxEvent.addListener(m,"change",function(){null==v.parentNode||
-v.selected||v.parentNode.removeChild(v)})}K.appendChild(m)}else L.setAttribute("value",l),K.appendChild(L),K.appendChild(c);M.appendChild(K);var A=mxUtils.button(p,function(){b.hideDialog();d(k.checked?"pageNotFound"!==m.value?m.value:l:L.value,LinkDialog.selectedDocs,t.checked?y:null)});A.style.verticalAlign="middle";A.className="geBtn gePrimaryBtn";this.init=function(){k.checked?m.focus():(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",
-!1,null));mxEvent.addListener(m,"focus",function(){f.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(L,"focus",function(){k.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var B=M.parentNode,S=null;mxEvent.addListener(B,"dragleave",function(R){null!=S&&(S.parentNode.removeChild(S),S=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(R){null==
-S&&(S=b.highlightElement(B));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(R){try{null!=S&&(S.parentNode.removeChild(S),S=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,A.click())}catch(T){b.handleError(T)}R.stopPropagation();R.preventDefault()}),!1)}};p=document.createElement("div");p.style.marginTop="16px";p.style.textAlign=
-"right";b.isOffline()||p.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&p.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(B){if(B.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=B.docs;var S=B.docs[0].url;"application/mxe"==B.docs[0].mimeType||null!=B.docs[0].mimeType&&"application/vnd.jgraph."==
-B.docs[0].mimeType.substring(0,23)?S="https://app.diagrams.net/#G"+B.docs[0].id:"application/vnd.google-apps.folder"==B.docs[0].mimeType&&(S="https://drive.google.com/#folders/"+B.docs[0].id);L.value=S;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var E=document.createElement("select");E.className="geBtn";E.style.position="relative";E.style.top="1px";E.style.maxWidth="120px";var D={};x=document.createElement("option");mxUtils.write(x,mxResources.get("select")+"...");x.value="";E.appendChild(x);
-"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&F("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var B=b.drive.createLinkPicker();b.linkPicker=B.setCallback(function(S){LinkDialog.filePicked(S)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&F("dropbox",function(){Dropbox.choose({linkType:"direct",
-cancel:function(){},success:function(B){L.value=B[0].link;L.focus()}})});null!=b.oneDrive&&F("oneDrive",function(){b.oneDrive.pickFile(function(B,S){null!=S&&null!=S.value&&0<S.value.length&&(L.value=S.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&F("github",function(){b.gitHub.pickFile(function(B){if(null!=B){B=B.split("/");var S=B[0],R=B[1],T=B[2];B=B.slice(3,B.length).join("/");L.value="https://github.com/"+S+"/"+R+"/blob/"+T+"/"+B;L.focus()}})});null!=b.gitLab&&F("gitlab",function(){b.gitLab.pickFile(function(B){if(null!=
-B){B=B.split("/");var S=B[0],R=B[1],T=B[2];B=B.slice(3,B.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+S+"/"+R+"/blob/"+T+"/"+B;L.focus()}})});1<E.children.length&&(p.appendChild(E),mxEvent.addListener(E,"change",function(B){null!=D[E.value]&&(D[E.value](),E.value="")}));mxEvent.addListener(L,"keypress",function(B){13==B.keyCode&&A.click()});p.appendChild(A);b.editor.cancelFirst||p.appendChild(K);M.appendChild(p);this.container=M},RevisionDialog=function(b,l,p){var d=document.createElement("div"),
+"url");f.setAttribute("type","radio");f.setAttribute("name","geLinkDialogOption");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","geLinkDialogOption");var m=document.createElement("select");m.style.width="414px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.margin="0 6p 0 6px";null!=y&&(t.setAttribute("checked","checked"),t.defaultChecked=
+!0);y=null!=y?y:"_blank";t.setAttribute("title",y);z&&(L.style.width="200px");if(x&&null!=b.pages){null!=k&&Graph.isPageLink(k)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(L.setAttribute("value",k),f.setAttribute("checked","checked"),f.defaultChecked=!0);K.appendChild(f);K.appendChild(L);K.appendChild(c);z&&(K.appendChild(t),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);K.appendChild(l);x=!1;for(z=0;z<b.pages.length;z++)c=document.createElement("option"),mxUtils.write(c,
+b.pages[z].getName()||mxResources.get("pageWithNumber",[z+1])),c.setAttribute("value","data:page/id,"+b.pages[z].getId()),k==c.getAttribute("value")&&(c.setAttribute("selected","selected"),x=!0),m.appendChild(c);if(!x&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");m.appendChild(v);mxEvent.addListener(m,"change",function(){null==v.parentNode||
+v.selected||v.parentNode.removeChild(v)})}K.appendChild(m)}else L.setAttribute("value",k),K.appendChild(L),K.appendChild(c);N.appendChild(K);var B=mxUtils.button(n,function(){b.hideDialog();d(l.checked?"pageNotFound"!==m.value?m.value:k:L.value,LinkDialog.selectedDocs,t.checked?y:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?m.focus():(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",
+!1,null));mxEvent.addListener(m,"focus",function(){f.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(L,"focus",function(){l.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var A=N.parentNode,S=null;mxEvent.addListener(A,"dragleave",function(R){null!=S&&(S.parentNode.removeChild(S),S=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==
+S&&(S=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){try{null!=S&&(S.parentNode.removeChild(S),S=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,B.click())}catch(T){b.handleError(T)}R.stopPropagation();R.preventDefault()}),!1)}};n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign=
+"right";b.isOffline()||n.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&n.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(A){if(A.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=A.docs;var S=A.docs[0].url;"application/mxe"==A.docs[0].mimeType||null!=A.docs[0].mimeType&&"application/vnd.jgraph."==
+A.docs[0].mimeType.substring(0,23)?S="https://app.diagrams.net/#G"+A.docs[0].id:"application/vnd.google-apps.folder"==A.docs[0].mimeType&&(S="https://drive.google.com/#folders/"+A.docs[0].id);L.value=S;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var E=document.createElement("select");E.className="geBtn";E.style.position="relative";E.style.top="1px";E.style.maxWidth="120px";var D={};x=document.createElement("option");mxUtils.write(x,mxResources.get("select")+"...");x.value="";E.appendChild(x);
+"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&F("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var A=b.drive.createLinkPicker();b.linkPicker=A.setCallback(function(S){LinkDialog.filePicked(S)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&F("dropbox",function(){Dropbox.choose({linkType:"direct",
+cancel:function(){},success:function(A){L.value=A[0].link;L.focus()}})});null!=b.oneDrive&&F("oneDrive",function(){b.oneDrive.pickFile(function(A,S){null!=S&&null!=S.value&&0<S.value.length&&(L.value=S.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&F("github",function(){b.gitHub.pickFile(function(A){if(null!=A){A=A.split("/");var S=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");L.value="https://github.com/"+S+"/"+R+"/blob/"+T+"/"+A;L.focus()}})});null!=b.gitLab&&F("gitlab",function(){b.gitLab.pickFile(function(A){if(null!=
+A){A=A.split("/");var S=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+S+"/"+R+"/blob/"+T+"/"+A;L.focus()}})});1<E.children.length&&(n.appendChild(E),mxEvent.addListener(E,"change",function(A){null!=D[E.value]&&(D[E.value](),E.value="")}));mxEvent.addListener(L,"keypress",function(A){13==A.keyCode&&B.click()});n.appendChild(B);b.editor.cancelFirst||n.appendChild(K);N.appendChild(n);this.container=N},RevisionDialog=function(b,k,n){var d=document.createElement("div"),
x=document.createElement("h3");x.style.marginTop="3px";mxUtils.write(x,mxResources.get("revisionHistory"));d.appendChild(x);x=document.createElement("div");x.style.position="absolute";x.style.overflow="auto";x.style.width="170px";x.style.height="378px";d.appendChild(x);var z=document.createElement("div");z.style.position="absolute";z.style.left="200px";z.style.width="470px";z.style.height="376px";z.style.overflow="hidden";z.style.borderWidth="1px";z.style.borderStyle="solid";var y=document.createElement("div");
y.style.position="absolute";y.style.display="none";y.style.textAlign="center";y.style.padding="8px";y.style.borderRadius="8px";y.style.left="50%";y.style.top="50%";y.style.whiteSpace="nowrap";y.style.transform="translate(-50%, -50%)";y.style.background="inherit";y.style.border="1px solid";z.appendChild(y);mxEvent.disableContextMenu(z);d.appendChild(z);var F=new Graph(z);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=
-null;F.maxFitScale=null;F.centerZoom=!0;var M=0,K=null,L=0,c=F.getGlobalVariable;F.getGlobalVariable=function(Y){return"page"==Y&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==Y?L+1:"pagecount"==Y?null!=K?K.length:1:c.apply(this,arguments)};F.getLinkForCell=function(){return null};for(var f=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
-left:"50%"}),k=b.getCurrentFile(),m=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),t={},v=0;v<m.length;v++)t[m[v].getAttribute("id")]=m[v];var A=null,E=null,D=null,B=null,S=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=D&&F.zoomIn()},20);S.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=D&&F.zoomOut()},20);R.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomFitImage,
+null;F.maxFitScale=null;F.centerZoom=!0;var N=0,K=null,L=0,c=F.getGlobalVariable;F.getGlobalVariable=function(Y){return"page"==Y&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==Y?L+1:"pagecount"==Y?null!=K?K.length:1:c.apply(this,arguments)};F.getLinkForCell=function(){return null};for(var f=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",
+left:"50%"}),l=b.getCurrentFile(),m=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),t={},v=0;v<m.length;v++)t[m[v].getAttribute("id")]=m[v];var B=null,E=null,D=null,A=null,S=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=D&&F.zoomIn()},20);S.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=D&&F.zoomOut()},20);R.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomFitImage,
mxResources.get("fit"),function(){null!=D&&(1==F.view.scale?(F.maxFitScale=8,F.fit(8)):F.zoomActual(),F.center())},20);T.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));P.setAttribute("disabled","disabled");var q=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));q.setAttribute("disabled","disabled");var u=z.cloneNode(!1);u.style.pointerEvent="none";z.parentNode.appendChild(u);var J=new Graph(u);J.setTooltips(!1);J.setEnabled(!1);
J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;var G=document.createElement("div");G.style.textAlign="left";G.style.color="gray";G.style.backgroundColor="transparent";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.style.whiteSpace="nowrap";G.style.cursor="default";G.style.height="100%";G.style.display="inline-flex";G.style.alignItems="center";G.style.flexGrow="1";mxEvent.addListener(G,"click",
-function(){var Y=mxUtils.getTextContent(G);""!=Y&&b.alert(Y)});var H=null;mxEvent.addGestureListeners(P,function(Y){try{var Z=null!=K[M]?t[K[M].getAttribute("id")]:null;mxUtils.setOpacity(P,20);y.innerText="";if(null==Z)y.style.display="inline-block",mxUtils.write(y,mxResources.get("pageNotFound"));else{H=G.innerHTML;G.innerHTML=mxResources.get("current");z.style.display="none";u.style.display="";u.style.backgroundColor=z.style.backgroundColor;var ba=Editor.parseDiagramNode(Z);(new mxCodec(ba.ownerDocument)).decode(ba,
-J.getModel());J.view.scaleAndTranslate(F.view.scale,F.view.translate.x,F.view.translate.y);J.mathEnabled="1"==ba.getAttribute("math");J.setAdaptiveColors(ba.getAttribute("adaptiveColors"));Editor.MathJaxRender&&J.mathEnabled&&Editor.MathJaxRender(J.container)}}catch(ia){y.style.display="inline-block",y.innerText="",mxUtils.write(y,mxResources.get("pageNotFound")+": "+ia.message)}},null,function(){mxUtils.setOpacity(P,60);y.style.display="none";y.innerText="";"none"==z.style.display&&(z.style.display=
-"",G.innerHTML=H,u.style.display="none")});mxEvent.addListener(q,"click",mxUtils.bind(this,function(Y){if(null!=D){Y=b.getPagesForNode(D.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(ba){try{if(0<ba.length&&b.editor.graph.isEnabled()){var ia=[JSON.parse(ba)];b.confirm(mxResources.get("areYouSure"),function(){try{k.patch(ia,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
-null,null,null,null,function(ba,ia){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),da=document.createElement("option");mxUtils.write(da,mxResources.get("allPages"));da.setAttribute("value","allPages");ea.appendChild(da);for(var ja in Z[EditorUi.DIFF_UPDATE]){da=document.createElement("option");var ma=b.getPageById(ja);null!=ma&&(mxUtils.write(da,ma.getName()),da.setAttribute("value","page-"+ja),ea.appendChild(da))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,
-"change",function(aa){aa=null;if("allPages"!=ea.value){var fa=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][fa]&&(aa={},aa[EditorUi.DIFF_UPDATE]={},aa[EditorUi.DIFF_UPDATE][fa]=Z[EditorUi.DIFF_UPDATE][fa])}ia.value=JSON.stringify(null==aa?Z:aa,null,2)});2<ea.children.length&&ba.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var g=mxUtils.button(mxResources.get("restore"),function(Y){null!=D&&null!=B&&
-b.confirm(mxResources.get("areYouSure"),function(){null!=p?p(B):b.spinner.spin(document.body,mxResources.get("restoring"))&&(g.setAttribute("disabled","disabled"),k.save(!0,function(Z){b.spinner.stop();g.removeAttribute("disabled");b.replaceFileData(B);b.hideDialog()},function(Z){b.spinner.stop();g.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var n=document.createElement("select");
-n.setAttribute("disabled","disabled");n.style.userSelect="none";n.style.maxWidth="100px";n.style.marginLeft="10px";n.style.display="none";var C=null;mxEvent.addListener(n,"change",function(Y){null!=C&&(C(Y),mxEvent.consume(Y))});var I=mxUtils.button(mxResources.get("open"),function(){null!=D&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(D.documentElement)),b.openLink(b.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");
-var N=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});N.className="geBtn";N.setAttribute("disabled","disabled");null!=p&&(I.style.display="none");m=document.createElement("div");m.style.position="absolute";m.style.top="482px";m.style.right="28px";m.style.left="32px";m.style.justifyContent="end";m.style.display="flex";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.left="32px";O.style.right=
-"32px";O.style.border="none";O.style.top="442px";var Q=null;if(null!=l&&0<l.length){z.style.cursor="move";var U=document.createElement("table");U.style.borderWidth="1px";U.style.borderStyle="solid";U.style.borderCollapse="collapse";U.style.borderSpacing="0px";U.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(M=mxUtils.indexOf(b.pages,b.currentPage));for(v=l.length-1;0<=v;v--){var W=function(Y){var Z=new Date(Y.modifiedDate),
-ba=null;if(0<=Z.getTime()){var ia=function(da){f.stop();y.innerText="";var ja=mxUtils.parseXml(da),ma=b.editor.extractGraphModel(ja.documentElement,!0);if(null!=ma){var aa=function(sa){null!=sa&&(sa=fa(Editor.parseDiagramNode(sa)));return sa},fa=function(sa){var wa=sa.getAttribute("background");if(null==wa||""==wa||wa==mxConstants.NONE)wa=F.defaultPageBackgroundColor;z.style.backgroundColor=mxUtils.getLightDarkColor(wa);(new mxCodec(sa.ownerDocument)).decode(sa,F.getModel());F.maxFitScale=1;F.fit(8);
-F.center();F.mathEnabled="1"==sa.getAttribute("math");F.setAdaptiveColors(sa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&F.mathEnabled&&Editor.MathJaxRender(F.container);return sa};n.style.display="none";n.innerText="";D=ja;B=da;K=parseSelectFunction=null;L=0;if("mxfile"==ma.nodeName){ja=ma.getElementsByTagName("diagram");K=[];for(da=0;da<ja.length;da++)K.push(ja[da]);L=Math.min(M,K.length-1);0<K.length&&aa(K[L]);if(1<K.length)for(n.removeAttribute("disabled"),n.style.display="",da=0;da<
-K.length;da++){ja=document.createElement("option");ja.setAttribute("title",la+" ("+K[da].getAttribute("id")+")");ja.setAttribute("value",da);var la=K[da].getAttribute("name")||mxResources.get("pageWithNumber",[da+1]);ma=b.getPageById(K[da].getAttribute("id"));var ca="";if(null!=ma){var va=new DiagramPage(K[da]);b.getHashValueForPages([ma])!=b.getHashValueForPages([va])&&(ca=" (M)")}else ca=" (X)";mxUtils.write(ja,la+ca);da==L&&ja.setAttribute("selected","selected");n.appendChild(ja)}C=function(){try{var sa=
-parseInt(n.value);L=M=sa;aa(K[sa])}catch(wa){n.value=M,b.handleError(wa)}}}else fa(ma);la=Y.lastModifyingUserName;null!=la&&20<la.length&&(la=la.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=la?la+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());G.setAttribute("title",ba.getAttribute("title"));S.removeAttribute("disabled");R.removeAttribute("disabled");T.removeAttribute("disabled");P.removeAttribute("disabled");q.removeAttribute("disabled");null!=k&&k.isRestricted()||(b.editor.graph.isEnabled()&&
-g.removeAttribute("disabled"),I.removeAttribute("disabled"),N.removeAttribute("disabled"));mxUtils.setOpacity(S,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(q,60)}else n.style.display="none",n.innerText="",G.innerText="",y.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(y,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottomWidth="1px";ba.style.borderBottomStyle="solid";ba.style.fontSize=
-"12px";ba.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";Y==l[l.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===X?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());ba.appendChild(ea);ba.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=Y.fileSize?" "+b.formatFileSize(parseInt(Y.fileSize)):"")+(null!=Y.lastModifyingUserName?
-" "+Y.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(da){E!=Y&&(f.stop(),null!=A&&(A.style.backgroundColor=""),E=Y,A=ba,A.style.backgroundColor="light-dark(#ebf2f9, #000000)",B=D=null,G.removeAttribute("title"),G.innerText=mxResources.get("loading")+"...",z.style.backgroundColor=F.defaultPageBackgroundColor,y.innerText="",F.getModel().clear(),g.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),T.setAttribute("disabled",
-"disabled"),P.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),mxUtils.setOpacity(S,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(q,20),f.spin(z),Y.getXml(function(ja){if(E==Y)try{ia(ja)}catch(ma){G.innerText=mxResources.get("error")+": "+ma.message}},function(ja){f.stop();n.style.display="none";n.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));
-mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(da))});mxEvent.addListener(ba,"dblclick",function(da){I.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(da)},!1);V.appendChild(ba)}return ba}(l[v]);null!=W&&v==l.length-1&&(Q=W)}U.appendChild(V);x.appendChild(U)}else null==k||null==b.drive&&k.constructor==window.DriveFile||null==b.dropbox&&k.constructor==window.DropboxFile?(z.style.display="none",
-O.style.display="none",mxUtils.write(x,mxResources.get("notAvailable"))):(z.style.display="none",O.style.display="none",mxUtils.write(x,mxResources.get("noRevisions")));this.init=function(){null!=Q&&Q.click()};x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";O.appendChild(G);O.appendChild(P);O.appendChild(R);O.appendChild(T);O.appendChild(S);O.appendChild(n);O.appendChild(q);b.editor.cancelFirst&&m.appendChild(x);m.appendChild(I);null!=k&&k.constructor==DriveFile&&
-m.appendChild(N);m.appendChild(g);b.editor.cancelFirst||m.appendChild(x);d.appendChild(m);d.appendChild(O);this.container=d},DraftDialog=function(b,l,p,d,x,z,y,F,M){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,l);K.appendChild(L);var c=document.createElement("select"),f=mxUtils.bind(this,function(){"-1"==c.value?(c.value=c.options[0].value,f(),b.confirm(mxResources.get("areYouSure"),
-null,mxUtils.bind(this,function(){var P=this,q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){for(q=0;q<M.length;q++)x.apply(P,[q,mxUtils.bind(P,function(){})]);b.hideDialog(!0);u.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(E=mxUtils.parseXml(M[c.value].data),D=b.editor.extractGraphModel(E.documentElement,!0),B=0,this.init())});if(null!=M){c.style.marginLeft="4px";for(l=0;l<M.length;l++){var k=document.createElement("option");k.setAttribute("value",l);var m=new Date(M[l].created),
-t=new Date(M[l].modified);mxUtils.write(k,m.toLocaleDateString()+" "+m.toLocaleTimeString()+" - "+(m.toDateString(),t.toDateString(),t.toLocaleDateString())+" "+t.toLocaleTimeString());c.appendChild(k)}k=document.createElement("option");k.setAttribute("value","-1");mxUtils.write(k,mxResources.get("deleteAll"));c.appendChild(k);L.appendChild(c);mxEvent.addListener(c,"change",f)}null==p&&(p=M[0].data);var v=document.createElement("div");v.style.position="absolute";v.style.border="1px solid lightGray";
-v.style.marginTop="10px";v.style.left="40px";v.style.right="40px";v.style.top="46px";v.style.bottom="74px";v.style.overflow="hidden";mxEvent.disableContextMenu(v);K.appendChild(v);var A=new Graph(v);A.setEnabled(!1);A.setPanning(!0);A.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var E=mxUtils.parseXml(p),D=b.editor.extractGraphModel(E.documentElement,!0),B=0,S=null,
-R=A.getGlobalVariable;A.getGlobalVariable=function(P){return"page"==P&&null!=S&&null!=S[B]?S[B].getAttribute("name"):"pagenumber"==P?B+1:"pagecount"==P?null!=S?S.length:1:R.apply(this,arguments)};A.getLinkForCell=function(){return null};p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){A.zoomIn()},20);L=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){A.zoomOut()},20);l=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
-A.view.scale?(A.maxFitScale=8,A.fit(8)):A.zoomActual();A.center()},20);y=mxUtils.button(y||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){x.apply(P,[c.value,mxUtils.bind(P,function(){null!=c.parentNode&&(c.options[c.selectedIndex].parentNode.removeChild(c.options[c.selectedIndex]),1<c.options.length?(c.value=c.options[0].value,f()):b.hideDialog(!0))})]);q.jumpToEnd()})}),
-mxResources.get("no"),mxResources.get("yes"))});y.className="geBtn";var T=document.createElement("select");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";z=mxUtils.button(z||mxResources.get("edit"),function(){d.apply(this,[c.value])});z.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";
-m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function P(G){if(null!=G){var H=G.getAttribute("background");if(null==H||""==H||H==mxConstants.NONE)H="light-dark(#ffffff, transparent)";v.style.backgroundColor=H;(new mxCodec(G.ownerDocument)).decode(G,A.getModel());A.maxFitScale=1;A.fit(8);A.center()}return G}function q(G){null!=G&&(G=
-P(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(T,"change",function(G){B=parseInt(T.value);q(S[B]);mxEvent.consume(G)});if("mxfile"==D.nodeName){var u=D.getElementsByTagName("diagram");S=[];for(var J=0;J<u.length;J++)S.push(u[J]);0<S.length&&q(S[B]);T.innerText="";if(1<S.length)for(T.style.display="",J=0;J<S.length;J++)u=document.createElement("option"),mxUtils.write(u,S[J].getAttribute("name")||mxResources.get("pageWithNumber",[J+1])),u.setAttribute("value",J),J==B&&u.setAttribute("selected",
-"selected"),T.appendChild(u);else T.style.display="none"}else P(D)};m.appendChild(T);m.appendChild(p);m.appendChild(L);m.appendChild(l);p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});p.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(k.appendChild(p),null!=F&&k.appendChild(F),k.appendChild(y),k.appendChild(z)):(k.appendChild(z),k.appendChild(y),null!=F&&k.appendChild(F),k.appendChild(p));K.appendChild(k);
-K.appendChild(m);this.container=K},FindWindow=function(b,l,p,d,x,z){function y(C,I,N){if("object"===typeof I.value&&null!=I.value.attributes){I=I.value.attributes;for(var O=0;O<I.length;O++)if("label"!=I[O].nodeName){var Q=mxUtils.trim(I[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==C&&0<=Q.indexOf(N)||null!=C&&C.test(Q))return!0}}return!1}function F(){k?(H.removeAttribute("disabled"),g.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),g.setAttribute("disabled",
-"disabled"));B.value?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")}function M(C,I,N){J.innerText="";var O=L.model.getDescendants(L.model.getRoot()),Q=B.value.toLowerCase(),U=R.checked?new RegExp(Q):null,V=null;t=null;c!=Q&&(c=Q,f=null,m=!1);var X=null==f;if(0<Q.length){if(m){m=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}C=(W+1)%b.pages.length;f=null;do m=!1,O=b.pages[C],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(O),L.model.setRoot(O.root),
-C=(C+1)%b.pages.length;while(!M(!0,I,N)&&C!=W);f&&(f=null,N?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));m=!1;L=b.editor.graph;return M(!0,I,N)}for(Y=0;Y<O.length;Y++){W=L.view.getState(O[Y]);I&&(X=X||W==f);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
-" ")).toLowerCase();var Z=0;I&&z&&W==f&&(label=label.substr(v),Z=v);var ba=null==S||""==S.value;if(null==U&&(0<=label.indexOf(Q)||ba&&y(U,W.cell,Q))||null!=U&&(U.test(label)||ba&&y(U,W.cell,Q)))if(z&&(null!=U?(ba=label.match(U),null!=ba&&0<ba.length&&(t=ba[0].toLowerCase(),v=Z+ba.index+t.length)):(t=Q,v=Z+label.indexOf(Q)+t.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==f}}if(null!=V){if(Y==O.length&&T.checked)return f=null,m=!0,M(!0,I,N);f=V;L.scrollCellToVisible(f.cell);L.isEnabled()&&!L.isCellLocked(f.cell)?
-N||L.getSelectionCell()==f.cell&&1==L.getSelectionCount()||L.setSelectionCell(f.cell):L.highlightCell(f.cell)}else{if(!C&&T.checked)return m=!0,M(!0,I,N);L.isEnabled()&&!N&&L.clearSelection()}k=null!=V;z&&!C&&F();return 0==Q.length||null!=V}var K=b.actions.get("findReplace"),L=b.editor.graph,c=null,f=null,k=!1,m=!1,t=null,v=0,A=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var D=z?"260px":"200px",B=document.createElement("input");
-B.setAttribute("placeholder",mxResources.get("find"));B.setAttribute("type","text");B.style.marginTop="4px";B.style.marginBottom="6px";B.style.width=D;B.style.fontSize="12px";B.style.borderRadius="4px";B.style.padding="6px";E.appendChild(B);mxUtils.br(E);if(z){var S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("replaceWith"));S.setAttribute("type","text");S.style.marginTop="4px";S.style.marginBottom="6px";S.style.width=D;S.style.fontSize="12px";S.style.borderRadius=
+function(){var Y=mxUtils.getTextContent(G);""!=Y&&b.alert(Y)});var H=null;mxEvent.addGestureListeners(P,function(Y){try{var Z=null!=K[N]?t[K[N].getAttribute("id")]:null;mxUtils.setOpacity(P,20);y.innerText="";if(null==Z)y.style.display="inline-block",mxUtils.write(y,mxResources.get("pageNotFound"));else{H=G.innerHTML;G.innerHTML=mxResources.get("current");z.style.display="none";u.style.display="";u.style.backgroundColor=z.style.backgroundColor;var aa=Editor.parseDiagramNode(Z);(new mxCodec(aa.ownerDocument)).decode(aa,
+J.getModel());J.view.scaleAndTranslate(F.view.scale,F.view.translate.x,F.view.translate.y);J.mathEnabled="1"==aa.getAttribute("math");J.setAdaptiveColors(aa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&J.mathEnabled&&Editor.MathJaxRender(J.container)}}catch(ha){y.style.display="inline-block",y.innerText="",mxUtils.write(y,mxResources.get("pageNotFound")+": "+ha.message)}},null,function(){mxUtils.setOpacity(P,60);y.style.display="none";y.innerText="";"none"==z.style.display&&(z.style.display=
+"",G.innerHTML=H,u.style.display="none")});mxEvent.addListener(q,"click",mxUtils.bind(this,function(Y){if(null!=D){Y=b.getPagesForNode(D.documentElement);var Z=b.diffPages(b.pages,Y);Y=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(Z,null,2),function(aa){try{if(0<aa.length&&b.editor.graph.isEnabled()){var ha=[JSON.parse(aa)];b.confirm(mxResources.get("areYouSure"),function(){try{l.patch(ha,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
+null,null,null,null,function(aa,ha){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),da=document.createElement("option");mxUtils.write(da,mxResources.get("allPages"));da.setAttribute("value","allPages");ea.appendChild(da);for(var ia in Z[EditorUi.DIFF_UPDATE]){da=document.createElement("option");var la=b.getPageById(ia);null!=la&&(mxUtils.write(da,la.getName()),da.setAttribute("value","page-"+ia),ea.appendChild(da))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,
+"change",function(ba){ba=null;if("allPages"!=ea.value){var fa=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][fa]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][fa]=Z[EditorUi.DIFF_UPDATE][fa])}ha.value=JSON.stringify(null==ba?Z:ba,null,2)});2<ea.children.length&&aa.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var g=mxUtils.button(mxResources.get("restore"),function(Y){null!=D&&null!=A&&
+b.confirm(mxResources.get("areYouSure"),function(){null!=n?n(A):b.spinner.spin(document.body,mxResources.get("restoring"))&&(g.setAttribute("disabled","disabled"),l.save(!0,function(Z){b.spinner.stop();g.removeAttribute("disabled");b.replaceFileData(A);b.hideDialog()},function(Z){b.spinner.stop();g.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var p=document.createElement("select");
+p.setAttribute("disabled","disabled");p.style.userSelect="none";p.style.maxWidth="100px";p.style.marginLeft="10px";p.style.display="none";var C=null;mxEvent.addListener(p,"change",function(Y){null!=C&&(C(Y),mxEvent.consume(Y))});var I=mxUtils.button(mxResources.get("open"),function(){null!=D&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(D.documentElement)),b.openLink(b.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");
+var M=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});M.className="geBtn";M.setAttribute("disabled","disabled");null!=n&&(I.style.display="none");m=document.createElement("div");m.style.position="absolute";m.style.top="482px";m.style.right="28px";m.style.left="32px";m.style.justifyContent="end";m.style.display="flex";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.left="32px";O.style.right=
+"32px";O.style.border="none";O.style.top="442px";var Q=null;if(null!=k&&0<k.length){z.style.cursor="move";var U=document.createElement("table");U.style.borderWidth="1px";U.style.borderStyle="solid";U.style.borderCollapse="collapse";U.style.borderSpacing="0px";U.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(N=mxUtils.indexOf(b.pages,b.currentPage));for(v=k.length-1;0<=v;v--){var W=function(Y){var Z=new Date(Y.modifiedDate),
+aa=null;if(0<=Z.getTime()){var ha=function(da){f.stop();y.innerText="";var ia=mxUtils.parseXml(da),la=b.editor.extractGraphModel(ia.documentElement,!0);if(null!=la){var ba=function(pa){null!=pa&&(pa=fa(Editor.parseDiagramNode(pa)));return pa},fa=function(pa){var ua=pa.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=F.defaultPageBackgroundColor;z.style.backgroundColor=mxUtils.getLightDarkColor(ua);(new mxCodec(pa.ownerDocument)).decode(pa,F.getModel());F.maxFitScale=1;F.fit(8);
+F.center();F.mathEnabled="1"==pa.getAttribute("math");F.setAdaptiveColors(pa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&F.mathEnabled&&Editor.MathJaxRender(F.container);return pa};p.style.display="none";p.innerText="";D=ia;A=da;K=parseSelectFunction=null;L=0;if("mxfile"==la.nodeName){ia=la.getElementsByTagName("diagram");K=[];for(da=0;da<ia.length;da++)K.push(ia[da]);L=Math.min(N,K.length-1);0<K.length&&ba(K[L]);if(1<K.length)for(p.removeAttribute("disabled"),p.style.display="",da=0;da<
+K.length;da++){ia=document.createElement("option");ia.setAttribute("title",ja+" ("+K[da].getAttribute("id")+")");ia.setAttribute("value",da);var ja=K[da].getAttribute("name")||mxResources.get("pageWithNumber",[da+1]);la=b.getPageById(K[da].getAttribute("id"));var ca="";if(null!=la){var sa=new DiagramPage(K[da]);b.getHashValueForPages([la])!=b.getHashValueForPages([sa])&&(ca=" (M)")}else ca=" (X)";mxUtils.write(ia,ja+ca);da==L&&ia.setAttribute("selected","selected");p.appendChild(ia)}C=function(){try{var pa=
+parseInt(p.value);L=N=pa;ba(K[pa])}catch(ua){p.value=N,b.handleError(ua)}}}else fa(la);ja=Y.lastModifyingUserName;null!=ja&&20<ja.length&&(ja=ja.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=ja?ja+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());G.setAttribute("title",aa.getAttribute("title"));S.removeAttribute("disabled");R.removeAttribute("disabled");T.removeAttribute("disabled");P.removeAttribute("disabled");q.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&
+g.removeAttribute("disabled"),I.removeAttribute("disabled"),M.removeAttribute("disabled"));mxUtils.setOpacity(S,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(q,60)}else p.style.display="none",p.innerText="",G.innerText="",y.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(y,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize=
+"12px";aa.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";Y==k[k.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===X?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());aa.appendChild(ea);aa.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=Y.fileSize?" "+b.formatFileSize(parseInt(Y.fileSize)):"")+(null!=Y.lastModifyingUserName?
+" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(da){E!=Y&&(f.stop(),null!=B&&(B.style.backgroundColor=""),E=Y,B=aa,B.style.backgroundColor="light-dark(#ebf2f9, #000000)",A=D=null,G.removeAttribute("title"),G.innerText=mxResources.get("loading")+"...",z.style.backgroundColor=F.defaultPageBackgroundColor,y.innerText="",F.getModel().clear(),g.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),T.setAttribute("disabled",
+"disabled"),P.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),mxUtils.setOpacity(S,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(q,20),f.spin(z),Y.getXml(function(ia){if(E==Y)try{ha(ia)}catch(la){G.innerText=mxResources.get("error")+": "+la.message}},function(ia){f.stop();p.style.display="none";p.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));
+mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(da))});mxEvent.addListener(aa,"dblclick",function(da){I.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(da)},!1);V.appendChild(aa)}return aa}(k[v]);null!=W&&v==k.length-1&&(Q=W)}U.appendChild(V);x.appendChild(U)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(z.style.display="none",
+O.style.display="none",mxUtils.write(x,mxResources.get("notAvailable"))):(z.style.display="none",O.style.display="none",mxUtils.write(x,mxResources.get("noRevisions")));this.init=function(){null!=Q&&Q.click()};x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";O.appendChild(G);O.appendChild(P);O.appendChild(R);O.appendChild(T);O.appendChild(S);O.appendChild(p);O.appendChild(q);b.editor.cancelFirst&&m.appendChild(x);m.appendChild(I);null!=l&&l.constructor==DriveFile&&
+m.appendChild(M);m.appendChild(g);b.editor.cancelFirst||m.appendChild(x);d.appendChild(m);d.appendChild(O);this.container=d},DraftDialog=function(b,k,n,d,x,z,y,F,N){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,k);K.appendChild(L);var c=document.createElement("select"),f=mxUtils.bind(this,function(){"-1"==c.value?(c.value=c.options[0].value,f(),b.confirm(mxResources.get("areYouSure"),
+null,mxUtils.bind(this,function(){var P=this,q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){for(q=0;q<N.length;q++)x.apply(P,[q,mxUtils.bind(P,function(){})]);b.hideDialog(!0);u.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(E=mxUtils.parseXml(N[c.value].data),D=b.editor.extractGraphModel(E.documentElement,!0),A=0,this.init())});if(null!=N){c.style.marginLeft="4px";for(k=0;k<N.length;k++){var l=document.createElement("option");l.setAttribute("value",k);var m=new Date(N[k].created),
+t=new Date(N[k].modified);mxUtils.write(l,m.toLocaleDateString()+" "+m.toLocaleTimeString()+" - "+(m.toDateString(),t.toDateString(),t.toLocaleDateString())+" "+t.toLocaleTimeString());c.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));c.appendChild(l);L.appendChild(c);mxEvent.addListener(c,"change",f)}null==n&&(n=N[0].data);var v=document.createElement("div");v.style.position="absolute";v.style.border="1px solid lightGray";
+v.style.marginTop="10px";v.style.left="40px";v.style.right="40px";v.style.top="46px";v.style.bottom="74px";v.style.overflow="hidden";mxEvent.disableContextMenu(v);K.appendChild(v);var B=new Graph(v);B.setEnabled(!1);B.setPanning(!0);B.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var E=mxUtils.parseXml(n),D=b.editor.extractGraphModel(E.documentElement,!0),A=0,S=null,
+R=B.getGlobalVariable;B.getGlobalVariable=function(P){return"page"==P&&null!=S&&null!=S[A]?S[A].getAttribute("name"):"pagenumber"==P?A+1:"pagecount"==P?null!=S?S.length:1:R.apply(this,arguments)};B.getLinkForCell=function(){return null};n=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);L=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);k=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==
+B.view.scale?(B.maxFitScale=8,B.fit(8)):B.zoomActual();B.center()},20);y=mxUtils.button(y||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){x.apply(P,[c.value,mxUtils.bind(P,function(){null!=c.parentNode&&(c.options[c.selectedIndex].parentNode.removeChild(c.options[c.selectedIndex]),1<c.options.length?(c.value=c.options[0].value,f()):b.hideDialog(!0))})]);q.jumpToEnd()})}),
+mxResources.get("no"),mxResources.get("yes"))});y.className="geBtn";var T=document.createElement("select");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";z=mxUtils.button(z||mxResources.get("edit"),function(){d.apply(this,[c.value])});z.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.right="40px";l.style.textAlign="right";
+m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function P(G){if(null!=G){var H=G.getAttribute("background");if(null==H||""==H||H==mxConstants.NONE)H="light-dark(#ffffff, transparent)";v.style.backgroundColor=H;(new mxCodec(G.ownerDocument)).decode(G,B.getModel());B.maxFitScale=1;B.fit(8);B.center()}return G}function q(G){null!=G&&(G=
+P(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(T,"change",function(G){A=parseInt(T.value);q(S[A]);mxEvent.consume(G)});if("mxfile"==D.nodeName){var u=D.getElementsByTagName("diagram");S=[];for(var J=0;J<u.length;J++)S.push(u[J]);0<S.length&&q(S[A]);T.innerText="";if(1<S.length)for(T.style.display="",J=0;J<S.length;J++)u=document.createElement("option"),mxUtils.write(u,S[J].getAttribute("name")||mxResources.get("pageWithNumber",[J+1])),u.setAttribute("value",J),J==A&&u.setAttribute("selected",
+"selected"),T.appendChild(u);else T.style.display="none"}else P(D)};m.appendChild(T);m.appendChild(n);m.appendChild(L);m.appendChild(k);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});n.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(l.appendChild(n),null!=F&&l.appendChild(F),l.appendChild(y),l.appendChild(z)):(l.appendChild(z),l.appendChild(y),null!=F&&l.appendChild(F),l.appendChild(n));K.appendChild(l);
+K.appendChild(m);this.container=K},FindWindow=function(b,k,n,d,x,z){function y(C,I,M){if("object"===typeof I.value&&null!=I.value.attributes){I=I.value.attributes;for(var O=0;O<I.length;O++)if("label"!=I[O].nodeName){var Q=mxUtils.trim(I[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==C&&0<=Q.indexOf(M)||null!=C&&C.test(Q))return!0}}return!1}function F(){l?(H.removeAttribute("disabled"),g.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),g.setAttribute("disabled",
+"disabled"));A.value?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}function N(C,I,M){J.innerText="";var O=L.model.getDescendants(L.model.getRoot()),Q=A.value.toLowerCase(),U=R.checked?new RegExp(Q):null,V=null;t=null;c!=Q&&(c=Q,f=null,m=!1);var X=null==f;if(0<Q.length){if(m){m=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}C=(W+1)%b.pages.length;f=null;do m=!1,O=b.pages[C],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(O),L.model.setRoot(O.root),
+C=(C+1)%b.pages.length;while(!N(!0,I,M)&&C!=W);f&&(f=null,M?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));m=!1;L=b.editor.graph;return N(!0,I,M)}for(Y=0;Y<O.length;Y++){W=L.view.getState(O[Y]);I&&(X=X||W==f);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
+" ")).toLowerCase();var Z=0;I&&z&&W==f&&(label=label.substr(v),Z=v);var aa=null==S||""==S.value;if(null==U&&(0<=label.indexOf(Q)||aa&&y(U,W.cell,Q))||null!=U&&(U.test(label)||aa&&y(U,W.cell,Q)))if(z&&(null!=U?(aa=label.match(U),null!=aa&&0<aa.length&&(t=aa[0].toLowerCase(),v=Z+aa.index+t.length)):(t=Q,v=Z+label.indexOf(Q)+t.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==f}}if(null!=V){if(Y==O.length&&T.checked)return f=null,m=!0,N(!0,I,M);f=V;L.scrollCellToVisible(f.cell);L.isEnabled()&&!L.isCellLocked(f.cell)?
+M||L.getSelectionCell()==f.cell&&1==L.getSelectionCount()||L.setSelectionCell(f.cell):L.highlightCell(f.cell)}else{if(!C&&T.checked)return m=!0,N(!0,I,M);L.isEnabled()&&!M&&L.clearSelection()}l=null!=V;z&&!C&&F();return 0==Q.length||null!=V}var K=b.actions.get("findReplace"),L=b.editor.graph,c=null,f=null,l=!1,m=!1,t=null,v=0,B=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var D=z?"260px":"200px",A=document.createElement("input");
+A.setAttribute("placeholder",mxResources.get("find"));A.setAttribute("type","text");A.style.marginTop="4px";A.style.marginBottom="6px";A.style.width=D;A.style.fontSize="12px";A.style.borderRadius="4px";A.style.padding="6px";E.appendChild(A);mxUtils.br(E);if(z){var S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("replaceWith"));S.setAttribute("type","text");S.style.marginTop="4px";S.style.marginBottom="6px";S.style.width=D;S.style.fontSize="12px";S.style.borderRadius=
"4px";S.style.padding="6px";E.appendChild(S);mxUtils.br(E);mxEvent.addListener(S,"input",F)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";E.appendChild(R);D=document.createElement("label");D.setAttribute("for","geFindWinRegExChck");E.appendChild(D);mxUtils.write(D,mxResources.get("regularExpression"));E.appendChild(D);D=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");D.style.position=
"relative";D.style.marginLeft="6px";E.appendChild(D);mxUtils.br(E);var T=document.createElement("input");T.setAttribute("id","geFindWinAllPagesChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";E.appendChild(T);D=document.createElement("label");D.setAttribute("for","geFindWinAllPagesChck");E.appendChild(D);mxUtils.write(D,mxResources.get("allPages"));E.appendChild(D);var P=document.createElement("div");mxUtils.br(E);D=document.createElement("div");D.style.left="0px";D.style.right=
-"0px";D.style.marginTop="6px";D.style.padding="0 6px 0 6px";E.appendChild(D);var q=mxUtils.button(mxResources.get("reset"),function(){J.innerText="";B.value="";B.style.backgroundColor="";z&&(S.value="",F());c=f=null;m=!1;B.focus()});q.setAttribute("title",mxResources.get("reset"));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";z||D.appendChild(q);var u=mxUtils.button(mxResources.get("find"),
-function(){try{B.style.backgroundColor=M()?"":"light-dark(#ffcfcf, #ff0000)"}catch(C){b.handleError(C)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.float="none";u.style.width="120px";u.style.marginTop="6px";u.style.marginLeft="8px";u.style.overflow="hidden";u.style.textOverflow="ellipsis";u.className="geBtn gePrimaryBtn";D.appendChild(u);var J=document.createElement("div");J.style.marginTop="10px";if(z){var G=function(C,I,N,O,Q){if(null==Q||"1"!=Q.html)return O=C.toLowerCase().indexOf(I,
-O),0>O?C:C.substr(0,O)+N+C.substr(O+I.length);var U=C;I=mxUtils.htmlEntities(I,!1,!1,!1);Q=[];var V=-1;for(C=C.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=C.indexOf("<",V+1));)Q.push(V);V=C.match(/<[^>]*>/g);C=C.replace(/<[^>]*>/g,"");O=C.toLowerCase().indexOf(I,O);if(0>O)return U;U=O+I.length;N=mxUtils.htmlEntities(N);C=C.substr(0,O)+N+C.substr(U);for(var X=0,W=0;W<Q.length;W++){if(Q[W]-X<O)C=C.substr(0,Q[W])+V[W]+C.substr(Q[W]);
-else{var Y=Q[W]-X<U?O+X:Q[W]+(N.length-I.length);C=C.substr(0,Y)+V[W]+C.substr(Y)}X+=V[W].length}return C.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};D.style.textAlign="center";var H=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=t&&null!=f){var C=f.cell,I=L.getLabel(C);L.isCellEditable(C)&&L.model.setValue(C,G(I,t,S.value,v-t.length,L.getCurrentCellStyle(C)));B.style.backgroundColor=M(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(N){b.handleError(N)}});
+"0px";D.style.marginTop="6px";D.style.padding="0 6px 0 6px";E.appendChild(D);var q=mxUtils.button(mxResources.get("reset"),function(){J.innerText="";A.value="";A.style.backgroundColor="";z&&(S.value="",F());c=f=null;m=!1;A.focus()});q.setAttribute("title",mxResources.get("reset"));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";z||D.appendChild(q);var u=mxUtils.button(mxResources.get("find"),
+function(){try{A.style.backgroundColor=N()?"":"light-dark(#ffcfcf, #ff0000)"}catch(C){b.handleError(C)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.float="none";u.style.width="120px";u.style.marginTop="6px";u.style.marginLeft="8px";u.style.overflow="hidden";u.style.textOverflow="ellipsis";u.className="geBtn gePrimaryBtn";D.appendChild(u);var J=document.createElement("div");J.style.marginTop="10px";if(z){var G=function(C,I,M,O,Q){if(null==Q||"1"!=Q.html)return O=C.toLowerCase().indexOf(I,
+O),0>O?C:C.substr(0,O)+M+C.substr(O+I.length);var U=C;I=mxUtils.htmlEntities(I,!1,!1,!1);Q=[];var V=-1;for(C=C.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=C.indexOf("<",V+1));)Q.push(V);V=C.match(/<[^>]*>/g);C=C.replace(/<[^>]*>/g,"");O=C.toLowerCase().indexOf(I,O);if(0>O)return U;U=O+I.length;M=mxUtils.htmlEntities(M);C=C.substr(0,O)+M+C.substr(U);for(var X=0,W=0;W<Q.length;W++){if(Q[W]-X<O)C=C.substr(0,Q[W])+V[W]+C.substr(Q[W]);
+else{var Y=Q[W]-X<U?O+X:Q[W]+(M.length-I.length);C=C.substr(0,Y)+V[W]+C.substr(Y)}X+=V[W].length}return C.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};D.style.textAlign="center";var H=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=t&&null!=f){var C=f.cell,I=L.getLabel(C);L.isCellEditable(C)&&L.model.setValue(C,G(I,t,S.value,v-t.length,L.getCurrentCellStyle(C)));A.style.backgroundColor=N(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(M){b.handleError(M)}});
H.setAttribute("title",mxResources.get("replFind"));H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");D.appendChild(H);mxUtils.br(D);var g=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=t&&null!=f){var C=f.cell,I=L.getLabel(C);L.model.setValue(C,G(I,t,S.value,v-t.length,L.getCurrentCellStyle(C)));H.setAttribute("disabled",
-"disabled");g.setAttribute("disabled","disabled")}}catch(N){b.handleError(N)}});g.setAttribute("title",mxResources.get("replace"));g.style.float="none";g.style.width="120px";g.style.marginTop="6px";g.style.marginLeft="8px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");D.appendChild(g);var n=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerText="";c=null;var C=b.currentPage,I=b.editor.graph.getSelectionCells();
-b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var N=0,O={};M(!1,!0,!0)&&100>N;){var Q=f.cell,U=L.getLabel(Q),V=O[Q.id];if(V&&V.replAllMrk==A&&V.replAllPos>=v)break;O[Q.id]={replAllMrk:A,replAllPos:v};L.isCellEditable(Q)&&(L.model.setValue(Q,G(U,t,S.value,v-t.length,L.getCurrentCellStyle(Q))),N++)}C!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,C));mxUtils.write(J,mxResources.get("matchesRepl",[N]))}catch(X){b.handleError(X)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(I),
-b.editor.graph.rendering=!0}A++});n.setAttribute("title",mxResources.get("replaceAll"));n.style.float="none";n.style.width="120px";n.style.marginTop="6px";n.style.marginLeft="8px";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.className="geBtn gePrimaryBtn";n.setAttribute("disabled","disabled");D.appendChild(n);mxUtils.br(D);D.appendChild(q);q=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));q.setAttribute("title",mxResources.get("close"));
-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";D.appendChild(q);mxUtils.br(D);D.appendChild(J)}else D.style.display="flex",D.style.alignItems="center",q.style.width="",u.style.width="";mxEvent.addListener(B,"keyup",function(C){if(91==C.keyCode||93==C.keyCode||17==C.keyCode)mxEvent.consume(C);else if(27==C.keyCode)K.funct();else if(c!=B.value.toLowerCase()||13==C.keyCode)try{B.style.backgroundColor=
-M()?"":"light-dark(#ffcfcf, #ff0000)"}catch(I){B.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(E,"keydown",function(C){70==C.keyCode&&b.keyHandler.isControlDown(C)&&!mxEvent.isShiftDown(C)&&(K.funct(),mxEvent.consume(C))});this.window=new mxWindow(mxResources.get("find")+(z?"/"+mxResources.get("replace"):""),E,l,p,d,x,!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()?(B.focus(),mxClient.IS_GC||mxClient.IS_FF?B.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=!1,T.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(C){B.focus();B.value=C;u.click()}},FreehandWindow=function(b,l,p,d,x,z){var y=b.editor.graph,F=document.createElement("div");F.style.textAlign=
-"center";F.style.userSelect="none";F.style.overflow="hidden";F.style.height="100%";if(z){var M=function(){var k=y.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&L.setAttribute("title",k))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=
+"disabled");g.setAttribute("disabled","disabled")}}catch(M){b.handleError(M)}});g.setAttribute("title",mxResources.get("replace"));g.style.float="none";g.style.width="120px";g.style.marginTop="6px";g.style.marginLeft="8px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");D.appendChild(g);var p=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerText="";c=null;var C=b.currentPage,I=b.editor.graph.getSelectionCells();
+b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var M=0,O={};N(!1,!0,!0)&&100>M;){var Q=f.cell,U=L.getLabel(Q),V=O[Q.id];if(V&&V.replAllMrk==B&&V.replAllPos>=v)break;O[Q.id]={replAllMrk:B,replAllPos:v};L.isCellEditable(Q)&&(L.model.setValue(Q,G(U,t,S.value,v-t.length,L.getCurrentCellStyle(Q))),M++)}C!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,C));mxUtils.write(J,mxResources.get("matchesRepl",[M]))}catch(X){b.handleError(X)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(I),
+b.editor.graph.rendering=!0}B++});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");D.appendChild(p);mxUtils.br(D);D.appendChild(q);q=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));q.setAttribute("title",mxResources.get("close"));
+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";D.appendChild(q);mxUtils.br(D);D.appendChild(J)}else D.style.display="flex",D.style.alignItems="center",q.style.width="",u.style.width="";mxEvent.addListener(A,"keyup",function(C){if(91==C.keyCode||93==C.keyCode||17==C.keyCode)mxEvent.consume(C);else if(27==C.keyCode)K.funct();else if(c!=A.value.toLowerCase()||13==C.keyCode)try{A.style.backgroundColor=
+N()?"":"light-dark(#ffcfcf, #ff0000)"}catch(I){A.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(E,"keydown",function(C){70==C.keyCode&&b.keyHandler.isControlDown(C)&&!mxEvent.isShiftDown(C)&&(K.funct(),mxEvent.consume(C))});this.window=new mxWindow(mxResources.get("find")+(z?"/"+mxResources.get("replace"):""),E,k,n,d,x,!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()?(A.focus(),mxClient.IS_GC||mxClient.IS_FF?A.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=!1,T.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(C){A.focus();A.value=C;u.click()}},FreehandWindow=function(b,k,n,d,x,z){var y=b.editor.graph,F=document.createElement("div");F.style.textAlign=
+"center";F.style.userSelect="none";F.style.overflow="hidden";F.style.height="100%";if(z){var N=function(){var l=y.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&L.setAttribute("title",l))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=
y.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";F.appendChild(K);y.freehand.setPerfectFreehandMode(K.checked);z=document.createElement("label");z.setAttribute("for","geFreehandBrush");z.style.float="left";z.style.marginTop="10px";F.appendChild(z);mxUtils.write(z,mxResources.get("brush"));F.appendChild(z);var L=document.createElement("tempDiv");L.style.display="block";L.style.width="100%";L.style.height="100%";L.style.borderRadius="2px";L.style.boxSizing=
-"border-box";L.style.border="1px solid black";L.style.backgroundColor=y.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){L.style.backgroundColor=y.freehand.getStrokeColor()});M();z=mxUtils.button("",mxUtils.bind(this,function(k){b.pickColor(y.freehand.getStrokeColor(!0),function(m){y.freehand.setStrokeColor(m);L.style.backgroundColor=y.freehand.getStrokeColor();M()},"default");mxEvent.consume(k)}));z.style.position="absolute";z.style.boxSizing="border-box";z.style.padding="2px";
+"border-box";L.style.border="1px solid black";L.style.backgroundColor=y.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){L.style.backgroundColor=y.freehand.getStrokeColor()});N();z=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(y.freehand.getStrokeColor(!0),function(m){y.freehand.setStrokeColor(m);L.style.backgroundColor=y.freehand.getStrokeColor();N()},"default");mxEvent.consume(l)}));z.style.position="absolute";z.style.boxSizing="border-box";z.style.padding="2px";
z.style.top="8px";z.style.right="8px";z.style.width="28px";z.style.height="18px";z.className="geColorBtn";z.innerText="";z.appendChild(L);F.appendChild(z);z=document.createElement("img");z.setAttribute("title",mxResources.get("settings"));z.setAttribute("src",Editor.gearImage);z.className="geButton";z.style.position="absolute";z.style.boxSizing="border-box";z.style.padding="2px";z.style.top="8px";z.style.right="38px";z.style.width="18px";z.style.height="18px";z.style.opacity="0.6";F.appendChild(z);
-mxEvent.addListener(z,"click",mxUtils.bind(this,function(k){k=y.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(m){!isNaN(m)&&0<m&&20>=m&&y.freehand.setSmoothing(parseInt(m))})}));mxUtils.br(F);var c=document.createElement("input");c.setAttribute("type","range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",y.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";F.appendChild(c);mxUtils.br(F);z=function(){y.freehand.setPerfectFreehandMode(K.checked);
+mxEvent.addListener(z,"click",mxUtils.bind(this,function(l){l=y.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",l,function(m){!isNaN(m)&&0<m&&20>=m&&y.freehand.setSmoothing(parseInt(m))})}));mxUtils.br(F);var c=document.createElement("input");c.setAttribute("type","range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",y.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";F.appendChild(c);mxUtils.br(F);z=function(){y.freehand.setPerfectFreehandMode(K.checked);
c.style.visibility=K.checked?"visible":"hidden"};mxEvent.addListener(K,"change",z);z();mxEvent.addListener(c,"change",function(){y.freehand.setBrushSize(parseInt(this.value))})}var f=mxUtils.button(mxResources.get("startDrawing"),function(){y.freehand.isDrawing()?y.freehand.stopDrawing():y.freehand.startDrawing()});f.setAttribute("title",mxResources.get("startDrawing")+" (X)");f.style.width="90%";f.style.marginLeft="0px";f.style.position="relative";f.className="geBtn gePrimaryBtn";F.appendChild(f);
-this.window=new mxWindow(mxResources.get("freehand"),F,l,p,d,x,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);y.addListener("freehandStateChanged",mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,mxResources.get(y.freehand.isDrawing()?"stopDrawing":"startDrawing"));var k=document.createElement("span");k.className="geShortcutKey";k.style.margin="0 2px 4px 0";mxUtils.write(k,"X");f.appendChild(k);f.setAttribute("title",
-mxResources.get(y.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");f.className="geBtn"+(y.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){y.freehand.isDrawing()&&y.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,l,p,d,x){var z=b.editor.graph,y=document.createElement("div");y.style.userSelect="none";y.style.overflow=
-"hidden";y.style.height="100%";var F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.justifyContent="center";F.style.paddingTop="20px";var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginRight="4px";M.checked=!0;var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(z.isSelectionEmpty()?
-z.getVerticesAndEdges():z.getSelectionCells(),M.checked,K.checked)}));L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";F.appendChild(L);y.appendChild(F);F=F.cloneNode(!1);F.appendChild(K);F.style.paddingTop="8px";mxUtils.write(F,mxResources.get("background"));y.appendChild(F);F=F.cloneNode(!1);F.appendChild(M);F.style.paddingTop="8px";mxUtils.write(F,mxResources.get("labels"));y.appendChild(F);this.window=new mxWindow(mxResources.get("adaptiveColors"),y,l,p,d,x,!0,!0);this.window.destroyOnClose=
-!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,l,p,d,x){function z(){q=!0;v.value=u;c.isSelectionEmpty()?(E.setAttribute("disabled","disabled"),"selectionOnly"==v.value&&(v.value="includeCopyOfMyDiagram")):E.removeAttribute("disabled");b.isDiagramEmpty()?(A.setAttribute("disabled","disabled"),
-"includeCopyOfMyDiagram"==v.value&&(v.value="help")):A.removeAttribute("disabled");q=!1}function y(G,H,g){var n=document.createElement("button");n.className="geBtn gePrimaryBtn";n.style.padding="4px";n.style.height="auto";n.style.position="relative";"flex"==g?(n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.style.whiteSpace="nowrap",n.style.margin="0px",n.style.flexGrow="1"):(n.style.display="block",n.style.margin="8px",n.style.left="50%",n.style.transform="translateX(-50%)");mxUtils.write(n,
-G);n.setAttribute("title",G);mxEvent.addListener(n,"click",H);return n}function F(G){var H=document.createElement("div");H.style.display="block";H.style.position="relative";H.style.backgroundColor="#e0e0e0";H.style.borderRadius="4px";H.style.wordWrap="break-word";H.style.textAlign="left";H.style.padding="6px";H.style.margin="12px";H.style.left="0px";H.style.right="0px";mxUtils.write(H,G);k.appendChild(H);return H}function M(G){var H=G.indexOf("<mxGraphModel "),g=G.indexOf("</mxGraphModel>");0>H&&
-(H=G.indexOf("<mxGraphModel>"));if(0<=H&&g>H){var n=mxUtils,C=n.trim,I=G.substring(0,H),N=I.indexOf("```");0<=N&&(I=I.substring(I,0,N+6));n=C.call(n,I);H=G.substring(H,g+15);C=mxUtils;I=C.trim;G=G.substring(g+15);g=G.lastIndexOf("```");0<=g&&(G=G.substring(g+3));return[n,H,I.call(C,G)]}return null}function K(G){var H=F(G);H.style.cursor="pointer";H.style.marginBottom="2px";H.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(H,"click",function(X){P.value=G;P.focus()});var g=F("");
-g.style.marginTop="2px";var n=b.currentPage,C=G,I=[],N=null;if("includeCopyOfMyDiagram"==v.value||"selectionOnly"==v.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==v.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!c.model.isRoot(X)&&!c.model.isLayer(X)&&!c.isCellSelected(X)&&!c.isAncestorSelected(X)});N=O.encode(c.getModel());O.document.appendChild(N);I.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+
-mxUtils.getXml(N)})}else"create"==v.value?(C=B.value.replace(/([A-Z])/g," $1").toLowerCase(),C="Write the declaration code for a "+(""!=C?C:"graph")+' that shows "'+(""!=G?G:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):I.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});I.push({role:"user",content:C});
+this.window=new mxWindow(mxResources.get("freehand"),F,k,n,d,x,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);y.addListener("freehandStateChanged",mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,mxResources.get(y.freehand.isDrawing()?"stopDrawing":"startDrawing"));var l=document.createElement("span");l.className="geShortcutKey";l.style.margin="0 2px 4px 0";mxUtils.write(l,"X");f.appendChild(l);f.setAttribute("title",
+mxResources.get(y.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");f.className="geBtn"+(y.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){y.freehand.isDrawing()&&y.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,k,n,d,x){var z=b.editor.graph,y=document.createElement("div");y.style.userSelect="none";y.style.overflow=
+"hidden";y.style.height="100%";var F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.justifyContent="center";F.style.paddingTop="20px";var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginRight="4px";N.checked=!0;var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(z.isSelectionEmpty()?
+z.getVerticesAndEdges():z.getSelectionCells(),N.checked,K.checked)}));L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";F.appendChild(L);y.appendChild(F);F=F.cloneNode(!1);F.appendChild(K);F.style.paddingTop="8px";mxUtils.write(F,mxResources.get("background"));y.appendChild(F);F=F.cloneNode(!1);F.appendChild(N);F.style.paddingTop="8px";mxUtils.write(F,mxResources.get("labels"));y.appendChild(F);this.window=new mxWindow(mxResources.get("adaptiveColors"),y,k,n,d,x,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,k,n,d,x){function z(){q=!0;v.value=u;c.isSelectionEmpty()?(E.setAttribute("disabled","disabled"),"selectionOnly"==v.value&&(v.value="includeCopyOfMyDiagram")):E.removeAttribute("disabled");b.isDiagramEmpty()?(B.setAttribute("disabled","disabled"),
+"includeCopyOfMyDiagram"==v.value&&(v.value="help")):B.removeAttribute("disabled");q=!1}function y(G,H,g){var p=document.createElement("button");p.className="geBtn gePrimaryBtn";p.style.padding="4px";p.style.height="auto";p.style.position="relative";"flex"==g?(p.style.overflow="hidden",p.style.textOverflow="ellipsis",p.style.whiteSpace="nowrap",p.style.margin="0px",p.style.flexGrow="1"):(p.style.display="block",p.style.margin="8px",p.style.left="50%",p.style.transform="translateX(-50%)");mxUtils.write(p,
+G);p.setAttribute("title",G);mxEvent.addListener(p,"click",H);return p}function F(G){var H=document.createElement("div");H.style.display="block";H.style.position="relative";H.style.backgroundColor="#e0e0e0";H.style.borderRadius="4px";H.style.wordWrap="break-word";H.style.textAlign="left";H.style.padding="6px";H.style.margin="12px";H.style.left="0px";H.style.right="0px";mxUtils.write(H,G);l.appendChild(H);return H}function N(G){var H=G.indexOf("<mxGraphModel "),g=G.indexOf("</mxGraphModel>");0>H&&
+(H=G.indexOf("<mxGraphModel>"));if(0<=H&&g>H){var p=mxUtils,C=p.trim,I=G.substring(0,H),M=I.indexOf("```");0<=M&&(I=I.substring(I,0,M+6));p=C.call(p,I);H=G.substring(H,g+15);C=mxUtils;I=C.trim;G=G.substring(g+15);g=G.lastIndexOf("```");0<=g&&(G=G.substring(g+3));return[p,H,I.call(C,G)]}return null}function K(G){var H=F(G);H.style.cursor="pointer";H.style.marginBottom="2px";H.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(H,"click",function(X){P.value=G;P.focus()});var g=F("");
+g.style.marginTop="2px";var p=b.currentPage,C=G,I=[],M=null;if("includeCopyOfMyDiagram"==v.value||"selectionOnly"==v.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==v.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!c.model.isRoot(X)&&!c.model.isLayer(X)&&!c.isCellSelected(X)&&!c.isAncestorSelected(X)});M=O.encode(c.getModel());O.document.appendChild(M);I.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+
+mxUtils.getXml(M)})}else"create"==v.value?(C=A.value.replace(/([A-Z])/g," $1").toLowerCase(),C="Write the declaration code for a "+(""!=C?C:"graph")+' that shows "'+(""!=G?G:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):I.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});I.push({role:"user",content:C});
var Q={model:Editor.gptModel,messages:I},U=0;for(I=0;I<Q.messages.length;I++)U+=Q.messages[I].content.match(/\b\w+\b|[^\w\s]|=/g).length;var V=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,mxResources.get("loading")+"...");var X=document.createElement("img");X.setAttribute("title","Processing "+U+" tokens");X.setAttribute("src",IMAGE_PATH+"/spin.gif");X.style.marginLeft="6px";g.appendChild(X);g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,
-function(W){var Y=new mxXmlRequest(Editor.gptUrl,JSON.stringify(Q),"POST");Y.setRequestHeaders=mxUtils.bind(this,function(ia,ea){ia.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ia.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ia){W.clear();g.innerHTML="";mxUtils.write(g,ia.message);g.appendChild(y(mxResources.get("tryAgain"),V));g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ia)}),ba=mxUtils.bind(this,
-function(ia){var ea=M(ia),da=null!=ea?b.stringToCells(ea[1]):null;if(null!=da&&0<da.length){ia=document.createElement("div");ia.style.display="inline-block";ia.style.position="relative";ia.style.transform="translateX(-50%)";ia.style.padding="6px";ia.style.left="50%";var ja=mxUtils.parseXml(ea[1]),ma=new mxCodec(ja),aa=new mxGraphModel;ma.decode(ja.documentElement,aa);var fa=null;null!=N&&(ja=new mxCodec(N.ownerDocument),fa=new mxGraphModel,ja.decode(N,fa));ja=mxUtils.bind(this,function(la){c.model.beginUpdate();
-try{if(null!=fa&&null!=b.getPageIndex(n)){b.selectPage(n);var ca=b.diffCells(fa.root,aa.root);b.patchPage(n,ca,null,!0)}else{var va=aa.getChildren(aa.getChildAt(aa.getRoot(),0));c.setSelectionCells(c.importCells(va))}}finally{c.model.endUpdate()}mxEvent.consume(la)});ma=c.getBoundingBoxFromGeometry(da);null!=ma?(ia.style.cursor="move",ia.appendChild(b.sidebar.createVertexTemplateFromCells(da,ma.width,ma.height,"",!0,null,!0,!0,ja,160,120))):(ia.style.padding="14px",mxUtils.write(ia,mxResources.get("noPreview")));
-g.innerHTML="";H=g;0<ea[0].length&&(mxUtils.write(H,ea[0]),mxUtils.br(H));H.appendChild(ia);da=document.createElement("div");da.style.display="flex";da.style.gap="6px";da.style.margin="6px";da.appendChild(y(mxResources.get("tryAgain"),V,"flex"));da.appendChild(y(mxResources.get(null!=N?"apply":"insert"),ja,"flex"));g.appendChild(da);0<ea[2].length&&(mxUtils.br(H),mxUtils.write(H,ea[2]));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else g.innerHTML="",H=g,mxUtils.write(H,ia),
-g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});Y.send(mxUtils.bind(this,function(ia){if(W.clear())try{if(200<=ia.getStatus()&&299>=ia.getStatus()){var ea=JSON.parse(ia.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",Q,"response:",ea);var da=mxUtils.trim(ea.choices[0].message.content);if("create"==v.value){var ja=b.extractMermaidDeclaration(da);null!=ja?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(fa){ba(fa)})),b.generateMermaidImage(ja,null,
-function(){},function(fa){mxMermaidToDrawio.resetListeners();Z(fa)})):(ba(da),g.appendChild(y(mxResources.get("tryAgain"),V)))}else ba(da)}else{var ma="Error: "+ia.getStatus();try{var aa=JSON.parse(ia.getText());null!=aa&&null!=aa.error&&null!=aa.error.message&&(ma=aa.error.message)}catch(fa){}g.innerHTML="";mxUtils.write(g,ma);g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(fa){Z(fa)}}),Z)}),function(W){g.innerHTML="";mxUtils.write(g,W.message);g.appendChild(y(mxResources.get("tryAgain"),
-V));g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function L(){""!=mxUtils.trim(P.value)&&(K(P.value),P.value="")}var c=b.editor.graph,f=document.createElement("div");f.style.textAlign="center";f.style.overflow="hidden";f.style.height="100%";var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.top="0px";k.style.left="0px";k.style.right="0px";k.style.bottom="104px";f.appendChild(k);var m=document.createElement("div");m.style.position=
+function(W){var Y=new mxXmlRequest(Editor.gptUrl,JSON.stringify(Q),"POST");Y.setRequestHeaders=mxUtils.bind(this,function(ha,ea){ha.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ha.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ha){W.clear();g.innerHTML="";mxUtils.write(g,ha.message);g.appendChild(y(mxResources.get("tryAgain"),V));g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ha)}),aa=mxUtils.bind(this,
+function(ha){var ea=N(ha),da=null!=ea?b.stringToCells(ea[1]):null;if(null!=da&&0<da.length){ha=document.createElement("div");ha.style.display="inline-block";ha.style.position="relative";ha.style.transform="translateX(-50%)";ha.style.padding="6px";ha.style.left="50%";var ia=mxUtils.parseXml(ea[1]),la=new mxCodec(ia),ba=new mxGraphModel;la.decode(ia.documentElement,ba);var fa=null;null!=M&&(ia=new mxCodec(M.ownerDocument),fa=new mxGraphModel,ia.decode(M,fa));ia=mxUtils.bind(this,function(ja){c.model.beginUpdate();
+try{if(null!=fa&&null!=b.getPageIndex(p)){b.selectPage(p);var ca=b.diffCells(fa.root,ba.root);b.patchPage(p,ca,null,!0)}else{var sa=ba.getChildren(ba.getChildAt(ba.getRoot(),0));c.setSelectionCells(c.importCells(sa))}}finally{c.model.endUpdate()}mxEvent.consume(ja)});la=c.getBoundingBoxFromGeometry(da);null!=la?(ha.style.cursor="move",ha.appendChild(b.sidebar.createVertexTemplateFromCells(da,la.width,la.height,"",!0,null,!0,!0,ia,160,120))):(ha.style.padding="14px",mxUtils.write(ha,mxResources.get("noPreview")));
+g.innerHTML="";H=g;0<ea[0].length&&(mxUtils.write(H,ea[0]),mxUtils.br(H));H.appendChild(ha);da=document.createElement("div");da.style.display="flex";da.style.gap="6px";da.style.margin="6px";da.appendChild(y(mxResources.get("tryAgain"),V,"flex"));da.appendChild(y(mxResources.get(null!=M?"apply":"insert"),ia,"flex"));g.appendChild(da);0<ea[2].length&&(mxUtils.br(H),mxUtils.write(H,ea[2]));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else g.innerHTML="",H=g,mxUtils.write(H,ha),
+g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});Y.send(mxUtils.bind(this,function(ha){if(W.clear())try{if(200<=ha.getStatus()&&299>=ha.getStatus()){var ea=JSON.parse(ha.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",Q,"response:",ea);var da=mxUtils.trim(ea.choices[0].message.content);if("create"==v.value){var ia=b.extractMermaidDeclaration(da);null!=ia?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(fa){aa(fa)})),b.generateMermaidImage(ia,null,
+function(){},function(fa){mxMermaidToDrawio.resetListeners();Z(fa)})):(aa(da),g.appendChild(y(mxResources.get("tryAgain"),V)))}else aa(da)}else{var la="Error: "+ha.getStatus();try{var ba=JSON.parse(ha.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(la=ba.error.message)}catch(fa){}g.innerHTML="";mxUtils.write(g,la);g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(fa){Z(fa)}}),Z)}),function(W){g.innerHTML="";mxUtils.write(g,W.message);g.appendChild(y(mxResources.get("tryAgain"),
+V));g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function L(){""!=mxUtils.trim(P.value)&&(K(P.value),P.value="")}var c=b.editor.graph,f=document.createElement("div");f.style.textAlign="center";f.style.overflow="hidden";f.style.height="100%";var l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.top="0px";l.style.left="0px";l.style.right="0px";l.style.bottom="104px";f.appendChild(l);var m=document.createElement("div");m.style.position=
"absolute";m.style.boxSizing="border-box";m.style.borderRadius="4px";m.style.border="1px solid lightgray";m.style.margin="8px 8px 16px 8px";m.style.padding="8px";m.style.left="0px";m.style.right="0px";m.style.bottom="0px";m.style.padding="6px";m.style.height="80px";var t=document.createElement("div");t.style.display="flex";t.style.gap="6px";t.style.marginBottom="6px";var v=document.createElement("select");v.style.textOverflow="ellipsis";v.style.flexGrow="1";v.style.padding="4px";v.style.minWidth=
-"0";m.appendChild(t);var A=document.createElement("option");A.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(A);var E=document.createElement("option");E.setAttribute("value","selectionOnly");mxUtils.write(E,mxResources.get("selectionOnly"));v.appendChild(E);t.appendChild(v);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var D=document.createElement("option");D.setAttribute("value","create");mxUtils.write(D,
-mxResources.get("create"));v.appendChild(D)}D=document.createElement("option");D.setAttribute("value","help");mxUtils.write(D,mxResources.get("help"));v.appendChild(D);D=document.createElement("option");D.setAttribute("value","reset");mxUtils.write(D,mxResources.get("reset"));v.appendChild(D);var B=document.createElement("select");B.style.textOverflow="ellipsis";B.style.flexGrow="1";B.style.padding="4px";B.style.minWidth="0";for(D=0;D<EditorUi.mermaidDiagramTypes.length;D++){var S=document.createElement("option"),
-R=EditorUi.mermaidDiagramTypes[D],T=R;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));S.setAttribute("value",R);mxUtils.write(S,T);B.appendChild(S)}t.appendChild(B);t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.textOverflow="clip";t.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";
+"0";m.appendChild(t);var B=document.createElement("option");B.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(B);var E=document.createElement("option");E.setAttribute("value","selectionOnly");mxUtils.write(E,mxResources.get("selectionOnly"));v.appendChild(E);t.appendChild(v);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var D=document.createElement("option");D.setAttribute("value","create");mxUtils.write(D,
+mxResources.get("create"));v.appendChild(D)}D=document.createElement("option");D.setAttribute("value","help");mxUtils.write(D,mxResources.get("help"));v.appendChild(D);D=document.createElement("option");D.setAttribute("value","reset");mxUtils.write(D,mxResources.get("reset"));v.appendChild(D);var A=document.createElement("select");A.style.textOverflow="ellipsis";A.style.flexGrow="1";A.style.padding="4px";A.style.minWidth="0";for(D=0;D<EditorUi.mermaidDiagramTypes.length;D++){var S=document.createElement("option"),
+R=EditorUi.mermaidDiagramTypes[D],T=R;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));S.setAttribute("value",R);mxUtils.write(S,T);A.appendChild(S)}t.appendChild(A);t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.textOverflow="clip";t.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";
P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";t.appendChild(P);D=document.createElement("img");D.setAttribute("src",Editor.sendImage);D.setAttribute("title",mxResources.get("sendMessage"));D.className="geAdaptiveAsset";D.style.position="relative";D.style.cursor="pointer";D.style.opacity="0.5";D.style.height="19px";D.style.left="-24px";D.style.top="5px";D.style.background="url('"+b.editor.transparentImage+"')";t.appendChild(D);m.appendChild(t);c.isSelectionEmpty()?
-b.isDiagramEmpty()?v.value="help":v.value="includeCopyOfMyDiagram":v.value="selectionOnly";var q=!1,u=v.value,J=function(){P.setAttribute("placeholder",mxResources.get("create"==v.value?"describeYourDiagram":"askMeAnything"));"create"==v.value?(v.style.width="",B.style.display=""):(v.style.width="100%",B.style.display="none")};J();mxEvent.addListener(v,"change",function(){q||("reset"==v.value?(v.value=u,k.innerHTML=""):u=v.value,J())});c.selectionModel.addListener(mxEvent.CHANGE,z);c.getModel().addListener(mxEvent.CHANGE,
-z);z();mxEvent.addListener(D,"click",L);mxEvent.addListener(P,"keydown",function(G){13!=G.keyCode||mxEvent.isShiftDown(G)||L()});f.appendChild(m);this.window=new mxWindow(mxResources.get("chatWindowTitle"),f,l,p,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){c.getModel().removeListener(z)}));this.window.addListener("show",
-mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,l,p,d,x){var z=b.editor.graph,y=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)y=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var F=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(M,K){if(z.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(c){b.hideDialog();if(null!=c&&0<c.length){c=
-c.split(" ");for(var f=[],k=[],m=0;m<c.length;m++){var t=mxUtils.trim(c[m]);""!=t&&(k.push(t),0>mxUtils.indexOf(M,t)&&f.push(t))}z.isSelectionEmpty()?K(M.concat(f)):z.addTagsForCells(z.getSelectionCells(),k)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},y);y=F.div;this.window=new mxWindow(mxResources.get("tags"),y,l,p,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
-this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){F.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,l,p,d){var x=document.createElement("div");x.style.textAlign="center";var z=document.createElement("p");z.style.fontSize="16pt";z.style.padding="0px";z.style.margin="0px";z.style.color="gray";mxUtils.write(z,mxResources.get("authorizationRequired"));var y="Unknown",
-F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";l==b.drive?(y=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):l==b.dropbox?(y=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):l==b.oneDrive?(y=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):l==b.gitHub?(y=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):l==b.gitLab?(y=mxResources.get("gitlab"),
-F.src=IMAGE_PATH+"/gitlab-logo.svg",F.style.width="32px"):l==b.trello&&(y=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[y]));var M=document.createElement("input");M.setAttribute("type","checkbox");y=mxUtils.button(mxResources.get("authorize"),function(){d(M.checked)});y.insertBefore(F,y.firstChild);y.style.marginTop="6px";y.className="geBigButton";y.style.fontSize="18px";y.style.padding="14px";
-x.appendChild(z);x.appendChild(b);x.appendChild(y);p&&(p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(M),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberMe")),p.appendChild(z),x.appendChild(p),M.checked=!0,M.defaultChecked=!0,mxEvent.addListener(z,"click",function(K){M.checked=!M.checked;mxEvent.consume(K)}));this.container=x},MoreShapesDialog=function(b,l,p){p=null!=p?p:b.sidebar.entries;var d=document.createElement("div"),x=[];if(null!=b.sidebar.customEntries)for(var z=
-0;z<b.sidebar.customEntries.length;z++){for(var y=b.sidebar.customEntries[z]||{},F={title:b.getResource(y.title),entries:[]},M=0;null!=y.entries&&M<y.entries.length;M++){var K=y.entries[M];F.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<F.entries.length&&x.push(F)}for(z=0;z<p.length;z++)if(null==b.sidebar.enabledLibraries)x.push(p[z]);else{F={title:p[z].title,entries:[]};for(M=0;M<p[z].entries.length;M++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-p[z].entries[M].id)&&F.entries.push(p[z].entries[M]);0<F.entries.length&&x.push(F)}p=x;if(l){z=mxUtils.bind(this,function(R){for(var T=0;T<R.length;T++)(function(P){var q=m.cloneNode(!1);q.style.fontWeight="bold";q.style.backgroundColor="light-dark(#e5e5e5, #505759)";q.style.padding="6px 0px 6px 20px";mxUtils.write(q,P.title);L.appendChild(q);for(var u=0;u<P.entries.length;u++)(function(J){var G=m.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";
-G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",J.title+" ("+J.id+")");var H=document.createElement("input");H.setAttribute("type","checkbox");H.checked=b.sidebar.isEntryVisible(J.id);H.defaultChecked=H.checked;G.appendChild(H);mxUtils.write(G," "+J.title);L.appendChild(G);var g=function(n){if(null==n||"INPUT"!=mxEvent.getSource(n).nodeName){c.style.textAlign="center";c.style.padding="0px";c.style.color="";c.innerText="";if(null!=J.desc){var C=document.createElement("pre");
+b.isDiagramEmpty()?v.value="help":v.value="includeCopyOfMyDiagram":v.value="selectionOnly";var q=!1,u=v.value,J=function(){P.setAttribute("placeholder",mxResources.get("create"==v.value?"describeYourDiagram":"askMeAnything"));"create"==v.value?(v.style.width="",A.style.display=""):(v.style.width="100%",A.style.display="none")};J();mxEvent.addListener(v,"change",function(){q||("reset"==v.value?(v.value=u,l.innerHTML=""):u=v.value,J())});c.selectionModel.addListener(mxEvent.CHANGE,z);c.getModel().addListener(mxEvent.CHANGE,
+z);z();mxEvent.addListener(D,"click",L);mxEvent.addListener(P,"keydown",function(G){13!=G.keyCode||mxEvent.isShiftDown(G)||L()});f.appendChild(m);this.window=new mxWindow(mxResources.get("chatWindowTitle"),f,k,n,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){c.getModel().removeListener(z)}));this.window.addListener("show",
+mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,k,n,d,x){var z=b.editor.graph,y=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)y=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var F=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(N,K){if(z.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(c){b.hideDialog();if(null!=c&&0<c.length){c=
+c.split(" ");for(var f=[],l=[],m=0;m<c.length;m++){var t=mxUtils.trim(c[m]);""!=t&&(l.push(t),0>mxUtils.indexOf(N,t)&&f.push(t))}z.isSelectionEmpty()?K(N.concat(f)):z.addTagsForCells(z.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},y);y=F.div;this.window=new mxWindow(mxResources.get("tags"),y,k,n,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
+this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){F.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,k,n,d){var x=document.createElement("div");x.style.textAlign="center";var z=document.createElement("p");z.style.fontSize="16pt";z.style.padding="0px";z.style.margin="0px";z.style.color="gray";mxUtils.write(z,mxResources.get("authorizationRequired"));var y="Unknown",
+F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";k==b.drive?(y=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):k==b.dropbox?(y=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):k==b.oneDrive?(y=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):k==b.gitHub?(y=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):k==b.gitLab?(y=mxResources.get("gitlab"),
+F.src=IMAGE_PATH+"/gitlab-logo.svg",F.style.width="32px"):k==b.trello&&(y=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[y]));var N=document.createElement("input");N.setAttribute("type","checkbox");y=mxUtils.button(mxResources.get("authorize"),function(){d(N.checked)});y.insertBefore(F,y.firstChild);y.style.marginTop="6px";y.className="geBigButton";y.style.fontSize="18px";y.style.padding="14px";
+x.appendChild(z);x.appendChild(b);x.appendChild(y);n&&(n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(N),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberMe")),n.appendChild(z),x.appendChild(n),N.checked=!0,N.defaultChecked=!0,mxEvent.addListener(z,"click",function(K){N.checked=!N.checked;mxEvent.consume(K)}));this.container=x},MoreShapesDialog=function(b,k,n){n=null!=n?n:b.sidebar.entries;var d=document.createElement("div"),x=[];if(null!=b.sidebar.customEntries)for(var z=
+0;z<b.sidebar.customEntries.length;z++){for(var y=b.sidebar.customEntries[z]||{},F={title:b.getResource(y.title),entries:[]},N=0;null!=y.entries&&N<y.entries.length;N++){var K=y.entries[N];F.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<F.entries.length&&x.push(F)}for(z=0;z<n.length;z++)if(null==b.sidebar.enabledLibraries)x.push(n[z]);else{F={title:n[z].title,entries:[]};for(N=0;N<n[z].entries.length;N++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
+n[z].entries[N].id)&&F.entries.push(n[z].entries[N]);0<F.entries.length&&x.push(F)}n=x;if(k){z=mxUtils.bind(this,function(R){for(var T=0;T<R.length;T++)(function(P){var q=m.cloneNode(!1);q.style.fontWeight="bold";q.style.backgroundColor="light-dark(#e5e5e5, #505759)";q.style.padding="6px 0px 6px 20px";mxUtils.write(q,P.title);L.appendChild(q);for(var u=0;u<P.entries.length;u++)(function(J){var G=m.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";
+G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",J.title+" ("+J.id+")");var H=document.createElement("input");H.setAttribute("type","checkbox");H.checked=b.sidebar.isEntryVisible(J.id);H.defaultChecked=H.checked;G.appendChild(H);mxUtils.write(G," "+J.title);L.appendChild(G);var g=function(p){if(null==p||"INPUT"!=mxEvent.getSource(p).nodeName){c.style.textAlign="center";c.style.padding="0px";c.style.color="";c.innerText="";if(null!=J.desc){var C=document.createElement("pre");
C.style.boxSizing="border-box";C.style.fontFamily="inherit";C.style.margin="20px";C.style.right="0px";C.style.textAlign="left";mxUtils.write(C,J.desc);c.appendChild(C)}null!=J.imageCallback?J.imageCallback(c):null!=J.image?(C=document.createElement("img"),C.setAttribute("border","0"),C.style.maxWidth="100%",C.setAttribute("src",J.image),c.appendChild(C)):null==J.desc&&(c.style.padding="20px",c.style.color="rgb(179, 179, 179)",mxUtils.write(c,mxResources.get("noPreview")));null!=f&&(f.style.backgroundColor=
-"");f=G;f.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=n&&mxEvent.consume(n)}};mxEvent.addListener(G,"click",g);mxEvent.addListener(G,"dblclick",function(n){H.checked=!H.checked;mxEvent.consume(n)});k.push(function(){return H.checked?J.id:null});0==T&&0==u&&g()})(P.entries[u])})(R[T])});M=document.createElement("div");M.className="geDialogTitle";mxUtils.write(M,mxResources.get("shapes"));M.style.position="absolute";M.style.top="0px";M.style.left="0px";M.style.lineHeight="40px";M.style.height=
-"40px";M.style.right="0px";var L=document.createElement("div"),c=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";c.style.position="absolute";c.style.left="202px";c.style.right="0px";c.style.top="40px";c.style.bottom="60px";c.style.overflow="auto";c.style.borderLeftStyle="solid";c.style.borderLeftWidth="1px";c.style.textAlign="center";var f=null,k=[],m=document.createElement("div");m.style.position=
-"relative";m.style.left="0px";m.style.right="0px";z(p);d.style.padding="30px";d.appendChild(M);d.appendChild(L);d.appendChild(c);p=document.createElement("div");p.className="geDialogFooter";p.style.position="absolute";p.style.paddingRight="16px";p.style.left="0px";p.style.right="0px";p.style.bottom="0px";p.style.height="60px";p.style.lineHeight="52px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.position="relative";t.style.top="1px";t.checked=b.sidebar.sidebarTitles;
-t.defaultChecked=t.checked;p.appendChild(t);z=document.createElement("span");mxUtils.write(z," "+mxResources.get("labels"));z.style.paddingRight="20px";p.appendChild(z);mxEvent.addListener(z,"click",function(R){t.checked=!t.checked;mxEvent.consume(R)});var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)z=document.createElement("span"),z.style.paddingRight="20px",z.appendChild(v),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),
-v.style.position="relative",v.style.top="1px",v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(z,"click",function(R){mxEvent.getSource(R)!=v&&(v.checked=!v.checked,mxEvent.consume(R))}),p.appendChild(z);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";M=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],T=0;T<k.length;T++){var P=k[T].apply(this,arguments);null!=P&&R.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<R.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=T&&0<R.splice(T,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),v.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),v.checked,!0);b.setSidebarTitles(t.checked,v.checked)});M.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table");
-z=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";M=document.createElement("tr");A.style.width="100%";l=document.createElement("td");x=document.createElement("td");y=document.createElement("td");var E=mxUtils.bind(this,function(R,T,P){var q=document.createElement("input");q.type="checkbox";A.appendChild(q);q.checked=b.sidebar.isEntryVisible(P);var u=document.createElement("span");mxUtils.write(u,T);T=document.createElement("div");T.style.display="block";T.appendChild(q);
-T.appendChild(u);mxEvent.addListener(u,"click",function(J){q.checked=!q.checked;mxEvent.consume(J)});R.appendChild(T);return function(){return q.checked?P:null}});M.appendChild(l);M.appendChild(x);M.appendChild(y);z.appendChild(M);A.appendChild(z);k=[];var D=0;for(z=0;z<p.length;z++)for(M=0;M<p[z].entries.length;M++)D++;var B=[l,x,y],S=0;for(z=0;z<p.length;z++)(function(R){for(var T=0;T<R.entries.length;T++){var P=R.entries[T];k.push(E(B[Math.floor(S/(D/3))],P.title,P.id));S++}})(p[z]);d.appendChild(A);
-p=document.createElement("div");p.style.marginTop="18px";p.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,p.appendChild(v),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),p.appendChild(z),mxEvent.addListener(z,"click",function(R){v.checked=!v.checked;mxEvent.consume(R)}));d.appendChild(p);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-z.className="geBtn";M=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],T=0;T<k.length;T++){var P=k[T].apply(this,arguments);null!=P&&R.push(P)}b.sidebar.showEntries(0<R.length?R.join(";"):"",v.checked);b.hideDialog()});M.className="geBtn gePrimaryBtn";p=document.createElement("div");p.style.marginTop="26px";p.style.textAlign="right"}b.editor.cancelFirst?(p.appendChild(z),p.appendChild(M)):(p.appendChild(M),p.appendChild(z));d.appendChild(p);this.container=d},PluginsDialog=function(b,
-l,p,d){function x(){M=!0;if(0==F.length)y.innerText=mxResources.get("noPlugins");else{y.innerText="";for(var k=0;k<F.length;k++){var m=document.createElement("span");m.style.display="flex";m.style.alignItems="center";m.style.whiteSpace="nowrap";var t=document.createElement("img");t.src=Editor.trashImage;t.style.position="relative";t.style.cursor="pointer";t.style.marginRight="4px";t.style.display="inline-block";t.style.width="18px";t.setAttribute("title",mxResources.get("delete"));m.appendChild(t);
-mxUtils.write(m,F[k]);y.appendChild(m);mxUtils.br(y);mxEvent.addListener(t,"click",function(v){return function(){b.confirm(mxResources.get("delete")+' "'+F[v]+'"?',function(){null!=p&&p(F[v]);F.splice(v,1);x()})}}(k))}}}var z=document.createElement("div"),y=document.createElement("div");y.style.height="180px";y.style.overflow="auto";var F=mxSettings.getPlugins().slice(),M=!1;z.appendChild(y);x();M=!1;var K=mxUtils.button(mxResources.get("add"),null!=l?function(){l(function(k){k&&0>mxUtils.indexOf(F,
-k)&&F.push(k);x()})}:function(){var k=document.createElement("div"),m=document.createElement("span");m.style.marginTop="6px";mxUtils.write(m,mxResources.get("builtinPlugins")+": ");k.appendChild(m);var t=document.createElement("select");t.style.width="150px";for(m=0;m<App.publicPlugin.length;m++){var v=document.createElement("option");mxUtils.write(v,App.publicPlugin[m]);v.value=App.publicPlugin[m];t.appendChild(v)}k.appendChild(t);mxUtils.br(k);mxUtils.br(k);m=mxUtils.button(mxResources.get("custom")+
-"...",function(){var A=new FilenameDialog(b,"",mxResources.get("add"),function(E){b.hideDialog();if(null!=E&&0<E.length){E=E.split(";");for(var D=0;D<E.length;D++){var B=E[D],S=App.pluginRegistry[B];null!=S&&(B=S);0<B.length&&0>mxUtils.indexOf(F,B)&&F.push(B)}x()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(A.container,300,80,!0,!0);A.init()});m.className="geBtn";ALLOW_CUSTOM_PLUGINS||(m.style.display="none");k=new CustomDialog(b,k,mxUtils.bind(this,function(){var A=
-App.pluginRegistry[t.value];0>mxUtils.indexOf(F,A)&&(F.push(A),x())}),null,null,null,m);b.showDialog(k.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var c=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){M?(mxSettings.setPlugins(F),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});c.className="geBtn gePrimaryBtn";var f=document.createElement("div");
-f.style.marginTop="14px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||f.appendChild(L),f.appendChild(K),f.appendChild(c)):(f.appendChild(K),f.appendChild(c),d||f.appendChild(L));z.appendChild(f);this.container=z},CropImageDialog=function(b,l,p,d){function x(){var R=v.checked,T=A.checked,P=k.geometry,q=M.width,u=M.height,J=(300-q)/2,G=(300-u)/2;P.x<J?(P.width-=J-P.x,P.x=J):P.x+P.width>J+q&&(P.width=J+q-P.x,
-P.x=Math.min(P.x,J+q));P.y<G?(P.height-=G-P.y,P.y=G):P.y+P.height>G+u&&(P.height=G+u-P.y,P.y=Math.min(P.y,G+u));var H=(P.x-J)/q*100;q=100-(P.x+P.width-J)/q*100;J=(P.y-G)/u*100;P=100-(P.y+P.height-G)/u*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(q)+"% "+mxUtils.format(P)+"% "+mxUtils.format(H)+"%"+(R?" round "+f+"%":T?" round 50%":"")+")"}function z(R){null!=L&&(!0!==R&&(L.model.setGeometry(k,c.clone()),f=5,D.value=f),L.model.setStyle(k,m+x()),L.selectAll(),E.style.visibility=v.checked?
-"visible":"hidden")}var y=document.createElement("div"),F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var M=document.createElement("img");M.onload=function(){function R(){L.model.setStyle(k,m+x())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);
-L.graphHandler.allowLivePreview=!1;var T=L.createVertexHandler;L.createVertexHandler=function(){var U=T.apply(this,arguments);U.livePreview=!1;return U};if(null!=p)try{if("inset"==p.substring(0,5)){var P=k.geometry,q=M.width,u=M.height,J=(300-q)/2,G=(300-u)/2,H=p.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),g=parseFloat(H[0]),n=parseFloat(H[1]),C=parseFloat(H[2]),I=parseFloat(H[3]);isFinite(g)&&isFinite(n)&&isFinite(C)&&isFinite(I)?(P.x=I/100*q+J,P.y=g/100*u+G,P.width=(100-n)/100*q+J-P.x,P.height=(100-
-C)/100*u+G-P.y,"round"==H[4]?"50%"==H[5]?A.setAttribute("checked","checked"):(f=parseInt(H[5]),D.value=f,v.setAttribute("checked","checked"),E.style.visibility="visible"):t.setAttribute("checked","checked")):p=null}else p=null}catch(U){}k.style=m+(p?p:x());k.vertex=!0;L.addCell(k,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var N=L.graphHandler.mouseUp,O=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){N.apply(this,arguments);
-K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){O.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var Q=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){Q.call(this,[k],[k])}};M.onerror=function(){M.onload=null;M.src=Editor.errorImage};M.setAttribute("src",l);M.style.maxWidth="300px";M.style.maxHeight="300px";F.appendChild(M);y.appendChild(F);var K=document.createElement("div");K.style.width="300px";K.style.height=
-"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";y.appendChild(K);var L=null,c=new mxGeometry(100,100,100,100),f=5,k=new mxCell("",c.clone(),""),m="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+l.replace(";base64","")+";clipPath=",t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRect");t.setAttribute("name","croppingShape");t.setAttribute("checked","checked");t.style.margin="5px";y.appendChild(t);l=document.createElement("label");
-l.setAttribute("for","croppingRect");mxUtils.write(l,mxResources.get("rectangle"));y.appendChild(l);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRounded");v.setAttribute("name","croppingShape");v.style.margin="5px";y.appendChild(v);l=document.createElement("label");l.setAttribute("for","croppingRounded");mxUtils.write(l,mxResources.get("rounded"));y.appendChild(l);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id",
-"croppingEllipse");A.setAttribute("name","croppingShape");A.style.margin="5px";y.appendChild(A);l=document.createElement("label");l.setAttribute("for","croppingEllipse");mxUtils.write(l,mxResources.get("ellipse"));y.appendChild(l);mxEvent.addListener(t,"change",z);mxEvent.addListener(v,"change",z);mxEvent.addListener(A,"change",z);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility="hidden";var D=document.createElement("input");D.setAttribute("type","range");D.setAttribute("min",
-"1");D.setAttribute("max","49");D.setAttribute("value",f);D.setAttribute("title",mxResources.get("arcSize"));E.appendChild(D);y.appendChild(E);mxEvent.addListener(D,"change",function(){f=this.value;z(!0)});l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){d(x(),k.geometry.width,k.geometry.height);b.hideDialog()});F.className="geBtn gePrimaryBtn";var B=mxUtils.button(mxResources.get("reset"),function(){d(null,
-M.width,M.height);b.hideDialog()});B.className="geBtn";var S=document.createElement("div");S.style.marginTop="10px";S.style.textAlign="right";b.editor.cancelFirst?(S.appendChild(l),S.appendChild(B),S.appendChild(F)):(S.appendChild(B),S.appendChild(F),S.appendChild(l));y.appendChild(S);this.container=y},EditGeometryDialog=function(b,l){var p=b.editor.graph,d=1==l.length?p.getCellGeometry(l[0]):null,x=document.createElement("div"),z=document.createElement("table"),y=document.createElement("tbody"),
-F=document.createElement("tr"),M=document.createElement("td"),K=document.createElement("td");z.style.paddingLeft="6px";mxUtils.write(M,mxResources.get("relative")+":");var L=document.createElement("input");L.setAttribute("type","checkbox");null!=d&&d.relative&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);this.init=function(){L.focus()};K.appendChild(L);F.appendChild(M);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");K=document.createElement("td");
-mxUtils.write(M,mxResources.get("left")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.x:"";K.appendChild(c);F.appendChild(M);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");K=document.createElement("td");mxUtils.write(M,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d?d.y:"";K.appendChild(f);F.appendChild(M);
-F.appendChild(K);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");K=document.createElement("td");mxUtils.write(M,mxResources.get("dx")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=d&&null!=d.offset?d.offset.x:"";K.appendChild(k);F.appendChild(M);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");K=document.createElement("td");mxUtils.write(M,mxResources.get("dy")+
-":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d&&null!=d.offset?d.offset.y:"";K.appendChild(m);F.appendChild(M);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");K=document.createElement("td");mxUtils.write(M,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d?d.width:"";K.appendChild(t);F.appendChild(M);F.appendChild(K);
-y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");K=document.createElement("td");mxUtils.write(M,mxResources.get("height")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d?d.height:"";K.appendChild(v);F.appendChild(M);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");K=document.createElement("td");mxUtils.write(M,mxResources.get("rotation")+":");var A=document.createElement("input");
-A.setAttribute("type","text");A.style.width="100px";A.value=1==l.length?mxUtils.getValue(p.getCellStyle(l[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(A);F.appendChild(M);F.appendChild(K);y.appendChild(F);z.appendChild(y);x.appendChild(z);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();p.getModel().beginUpdate();try{for(var D=0;D<l.length;D++){var B=p.getCellGeometry(l[D]);null!=
-B&&(B=B.clone(),p.isCellMovable(l[D])&&(B.relative=L.checked,0<mxUtils.trim(c.value).length&&(B.x=Number(c.value)),0<mxUtils.trim(f.value).length&&(B.y=Number(f.value)),0<mxUtils.trim(k.value).length&&(null==B.offset&&(B.offset=new mxPoint),B.offset.x=Number(k.value)),0<mxUtils.trim(m.value).length&&(null==B.offset&&(B.offset=new mxPoint),B.offset.y=Number(m.value))),p.isCellResizable(l[D])&&(0<mxUtils.trim(t.value).length&&(B.width=Number(t.value)),0<mxUtils.trim(v.value).length&&(B.height=Number(v.value))),
-p.getModel().setGeometry(l[D],B));0<mxUtils.trim(A.value).length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[l[D]])}}finally{p.getModel().endUpdate()}});E.className="geBtn gePrimaryBtn";mxEvent.addListener(x,"keypress",function(D){13==D.keyCode&&E.click()});z=document.createElement("div");z.style.marginTop="20px";z.style.textAlign="right";b.editor.cancelFirst?(z.appendChild(d),z.appendChild(E)):(z.appendChild(E),z.appendChild(d));x.appendChild(z);this.container=x},LibraryDialog=function(b,
-l,p,d,x,z,y){function F(q){for(q=document.elementFromPoint(q.clientX,q.clientY);null!=q&&q.parentNode!=t;)q=q.parentNode;var u=null;if(null!=q){var J=t.firstChild;for(u=0;null!=J&&J!=q;)J=J.nextSibling,u++}return u}function M(q,u,J,G,H,g,n,C,I){try{if(b.spinner.stop(),null==u||"image/"==u.substring(0,6))if(null==q&&null!=n||null==A[q]){var N=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=ba.title&&0<ba.title.length?
-ba.title:mxResources.get("untitled"));Z.style.color=null==ba.title||0==ba.title.length?"#d0d0d0":""};t.style.backgroundImage="";v.style.display="none";var O=H,Q=g;if(H>b.maxImageSize||g>b.maxImageSize){var U=Math.min(1,Math.min(b.maxImageSize/Math.max(1,H)),b.maxImageSize/Math.max(1,g));H*=U;g*=U}O>Q?(Q=Math.round(100*Q/O),O=100):(O=Math.round(100*O/Q),Q=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
-"0 12px";V.style.cursor="move";mxUtils.setPrefixedStyle(V.style,"transition","transform .1s ease-in-out");if(null!=q){var X=document.createElement("img");X.setAttribute("src",S.convert(q));X.style.width=O+"px";X.style.height=Q+"px";X.style.margin="10px";X.style.paddingBottom=Math.floor((100-Q)/2)+"px";X.style.paddingLeft=Math.floor((100-O)/2)+"px";V.appendChild(X)}else if(null!=n){var W=b.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,
-V,null,!0,!1,null,null,f.shapeBackgroundColor),V.firstChild.style.display="inline-block",V.firstChild.style.cursor="")}var Y=document.createElement("img");Y.setAttribute("src",Editor.closeBlackImage);Y.setAttribute("border","0");Y.setAttribute("title",mxResources.get("delete"));Y.setAttribute("align","top");Y.style.paddingTop="4px";Y.style.position="absolute";Y.style.marginLeft="-12px";Y.style.zIndex="1";Y.style.cursor="pointer";mxEvent.addListener(Y,"dragstart",function(ma){mxEvent.consume(ma)});
-(function(ma,aa,fa){mxEvent.addListener(Y,"click",function(la){A[aa]=null;for(var ca=0;ca<c.length;ca++)if(null!=c[ca].data&&c[ca].data==aa||null!=c[ca].xml&&null!=fa&&c[ca].xml==fa.xml){c.splice(ca,1);break}V.parentNode.removeChild(ma);0==c.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(la)});mxEvent.addListener(Y,"dblclick",function(la){mxEvent.consume(la)})})(V,q,n);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
-Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.bottom="-18px";Z.style.left="10px";Z.style.right="10px";Z.style.backgroundColor="light-dark(#ffffff, transparent)";Z.style.overflow="hidden";Z.style.textAlign="center";Z.setAttribute("title",mxResources.get("rename"));var ba=null;null!=q?(ba={data:q,w:H,h:g,title:I},null!=C&&(ba.aspect=C),A[q]=X,c.push(ba)):null!=n&&(n.aspect="fixed",c.push(n),ba=n);mxEvent.addListener(Z,"keydown",function(ma){13==ma.keyCode&&null!=B&&(B(),B=null,
-mxEvent.consume(ma))});N();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(ma){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(ma)});W=function(ma){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,ba.title||"",mxResources.get("ok"),function(fa){null!=fa&&(ba.title=fa,N())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(ma)}else if("true"!=Z.getAttribute("contentEditable")){null!=
-B&&(B(),B=null);if(null==ba.title||0==ba.title.length)Z.innerText="";Z.style.textOverflow="";Z.style.whiteSpace="";Z.style.cursor="text";Z.style.color="";Z.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Z.style,"user-select","text");Z.focus();document.execCommand("selectAll",!1,null);B=function(){Z.removeAttribute("contentEditable");Z.style.cursor="pointer";ba.title=mxUtils.getTextContent(Z);N()};mxEvent.consume(ma)}};mxEvent.addListener(Z,"click",W);mxEvent.addListener(V,"dblclick",
-W);t.appendChild(V);mxEvent.addListener(V,"dragstart",function(ma){null==B&&(null==q&&null!=n&&(Y.style.visibility="hidden",Z.style.visibility="hidden"),mxClient.IS_FF&&null!=n.xml&&ma.dataTransfer.setData("Text",n.xml),E=F(ma),mxClient.IS_GC&&(V.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(V,30);Y.style.visibility="";Z.style.visibility=""},0))});mxEvent.addListener(V,"dragend",function(ma){"hidden"==Y.style.visibility&&
-(Y.style.visibility="",Z.style.visibility="");E=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else R||(R=!0,b.handleError({message:mxResources.get("fileExists")}));else{H=!1;try{if(O=mxUtils.parseXml(q),"mxlibrary"==O.documentElement.nodeName){Q=JSON.parse(mxUtils.getTextContent(O.documentElement));if(null!=Q&&0<Q.length)for(var ia=0;ia<Q.length;ia++)null!=Q[ia].xml?M(null,null,0,0,0,0,Q[ia]):M(Q[ia].data,null,0,0,Q[ia].w,Q[ia].h,null,"fixed",Q[ia].title);H=!0}else if("mxfile"==
-O.documentElement.nodeName){var ea=O.documentElement.getElementsByTagName("diagram");for(ia=0;ia<ea.length;ia++){var da=Editor.getDiagramNodeXml(ea[ia]);W=b.stringToCells(da);if(0<W.length){var ja=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ja&&M(null,null,0,0,0,0,{xml:da,w:ja.width,h:ja.height})}}H=!0}}catch(ma){null!=window.console&&console.error("Error in library dialog: "+ma)}H||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ma){null!=window.console&&
-console.log("Error in library dialog: "+ma)}return null}function K(q){q.dataTransfer.dropEffect=null!=E?"move":"copy";q.stopPropagation();q.preventDefault()}function L(q){q.stopPropagation();q.preventDefault();R=!1;D=F(q);if(null!=E)null!=D&&D<t.children.length?(c.splice(D>E?D-1:D,0,c.splice(E,1)[0]),t.insertBefore(t.children[E],t.children[D])):(c.push(c.splice(E,1)[0]),t.appendChild(t.children[E]));else if(0<q.dataTransfer.files.length)b.importFiles(q.dataTransfer.files,0,0,b.maxImageSize,T(q));
-else if(0<=mxUtils.indexOf(q.dataTransfer.types,"text/uri-list")){var u=decodeURIComponent(q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(u)||/(\.png)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.svg)($|\?)/i.test(u))&&b.loadImage(u,function(J){M(u,null,0,0,J.width,J.height);t.scrollTop=t.scrollHeight})}q.stopPropagation();q.preventDefault()}var c=[],f=b.editor.graph;p=document.createElement("div");p.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";
-k.style.height="40px";p.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==l&&(l=b.defaultLibraryName+".xml");var m=document.createElement("input");m.setAttribute("value",l);m.style.marginRight="20px";m.style.marginLeft="10px";m.style.width="500px";null==x||x.isRenamable()||m.setAttribute("disabled","true");this.init=function(){if(null==x||x.isRenamable())m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};k.appendChild(m);
-Editor.enableUncompressedLibraries&&(m.style.width="420px",l=document.createElement("input"),l.setAttribute("type","checkbox"),l.style.marginRight="10px",k.appendChild(l),mxUtils.write(k,mxResources.get("compressed")));var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";
-0==c.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));p.appendChild(v);var A={},E=null,D=null,B=null;k=function(q){"true"!=mxEvent.getSource(q).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(q))};mxEvent.addListener(t,
-"mousedown",k);mxEvent.addListener(t,"pointerdown",k);mxEvent.addListener(t,"touchstart",k);var S=new mxUrlConverter,R=!1;if(null!=d)for(k=0;k<d.length;k++)l=d[k],M(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(t,"dragleave",function(q){v.style.cursor="";for(var u=mxEvent.getSource(q);null!=u;){if(u==t||u==v){q.stopPropagation();q.preventDefault();break}u=u.parentNode}});var T=function(q){return function(u,J,G,H,g,n,C,I,N){null!=N&&EditorUi.isVisioFilename(N.name)?b.importVisio(N,
-mxUtils.bind(this,function(O){M(O,J,G,H,g,n,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," "))})):null!=N&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(u,N.name)?b.isExternalDataComms()?b.parseFile(N,mxUtils.bind(this,function(O){4==O.readyState&&(b.spinner.stop(),200<=O.status&&299>=O.status&&(M(O.responseText,J,G,H,g,n,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(b.spinner.stop(),
-b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(M(u,J,G,H,g,n,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",K);mxEvent.addListener(t,"drop",L);mxEvent.addListener(v,"dragover",K);mxEvent.addListener(v,"drop",L);p.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
-k.setAttribute("id","btnCancel");k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);"draw.io"!=b.getServiceName()||null==x||x.constructor!=DriveLibrary&&x.constructor!=GitHubLibrary||(l=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(x,function(q){if(null!=q){var u=b.getSearch("create title mode url drive splash state clibs ui".split(" "));u+=(0==u.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(q);q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+u,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(q.container,450,240,!0);q.init()}else x.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(x.getId(),x)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get("export"),
-function(){var q=b.createLibraryDataFromImages(c),u=m.value;/(\.xml)$/i.test(u)||(u+=".xml");b.isLocalFileSave()?b.saveLocalFile(q,u,"text/xml",null,null,null!=y?y:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(u)+"&format=xml&xml="+encodeURIComponent(q))).simulate(document,"_blank")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var P=document.createElement("input");P.setAttribute("multiple",
-"multiple");P.setAttribute("type","file");mxEvent.addListener(P,"change",function(q){R=!1;b.importFiles(P.files,0,0,b.maxImageSize,function(u,J,G,H,g,n,C,I,N){null!=P.files&&(T(q)(u,J,G,H,g,n,C,I,N),P.type="",P.type="file",P.value="")});t.scrollTop=t.scrollHeight});P.style.display="none";document.body.appendChild(P);b.libDlgFileInputElt=P}l=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";
-d.appendChild(l)}l=mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(q,u,J){R=!1;if(null!=q){if("data:image/"==q.substring(0,11)){var G=q.indexOf(",");0<G&&(q=q.substring(0,G)+";base64,"+q.substring(G+1))}M(q,null,0,0,u,J);t.scrollTop=t.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";d.appendChild(l);this.saveBtnClickHandler=function(q,u,J,G){b.saveLibrary(q,u,J,G)};l=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(m.value,c,x,z)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";d.appendChild(l);b.editor.cancelFirst||d.appendChild(k);p.appendChild(d);this.container=p},EditShapeDialog=function(b,l,p,d,x){d=null!=d?d:300;x=null!=x?x:120;var z=document.createElement("table"),y=document.createElement("tbody");z.style.cellPadding="4px";var F=document.createElement("tr");var M=document.createElement("td");M.setAttribute("colspan",
-"2");M.style.fontSize="10pt";mxUtils.write(M,p);F.appendChild(M);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=x+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};M.appendChild(K);F.appendChild(M);M=document.createElement("td");p=document.createElement("div");p.style.position="relative";p.style.border="1px solid gray";p.style.top=
-"6px";p.style.width="200px";p.style.height=x+4+"px";p.style.overflow="hidden";p.style.marginBottom="16px";mxEvent.disableContextMenu(p);M.appendChild(p);var L=new Graph(p);L.setEnabled(!1);var c=b.editor.graph.cloneCell(l);L.addCells([c]);p=L.view.getState(c);var f="";null!=p.shape&&null!=p.shape.stencil&&(f=mxUtils.getPrettyXml(p.shape.stencil.desc));mxUtils.write(K,f||"");p=L.getGraphBounds();x=Math.min(160/p.width,(x-40)/p.height);L.view.scaleAndTranslate(x,20/x-p.x,20/x-p.y);F.appendChild(M);
-y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");M.setAttribute("colspan","2");M.style.paddingTop="2px";M.style.whiteSpace="nowrap";M.setAttribute("align","right");b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),x.className="geBtn",M.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&M.appendChild(x);
-var k=function(m,t,v){var A=K.value,E=mxUtils.parseXml(A);A=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(v&&b.hideDialog(),E=!m.model.contains(t),!v||E||A!=f){A=Graph.compress(A);m.getModel().beginUpdate();try{if(E){var D=b.editor.graph.getFreeInsertPoint();t.geometry.x=D.x;t.geometry.y=D.y;m.addCell(t)}m.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+A+")",[t])}catch(B){throw B;}finally{m.getModel().endUpdate()}E&&(m.setSelectionCell(t),m.scrollCellToVisible(t))}};p=mxUtils.button(mxResources.get("preview"),function(){k(L,c,!1)});p.className="geBtn";M.appendChild(p);p=mxUtils.button(mxResources.get("apply"),function(){k(b.editor.graph,l,!0)});p.className="geBtn gePrimaryBtn";M.appendChild(p);b.editor.cancelFirst||M.appendChild(x);F.appendChild(M);y.appendChild(F);z.appendChild(y);this.container=z},CustomDialog=function(b,l,p,d,x,z,
-y,F,M,K,L,c){var f=document.createElement("div");f.appendChild(l);var k=document.createElement("div");k.style.marginTop=null!=c?c:"30px";k.style.textAlign="right";null!=y&&k.appendChild(y);b.isOffline()||null==z||k.appendChild(b.createHelpIcon(z));l=mxUtils.button(M||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});l.className="geBtn";F&&(l.style.display="none");b.editor.cancelFirst&&k.appendChild(l);x=mxUtils.button(x||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,
-null,this.container);if(null!=p){var m=p();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}K&&b.hideDialog(null,null,this.container)}));k.appendChild(x);x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(l);if(null!=L)for(F=0;F<L.length;F++)(function(m,t,v){m=mxUtils.button(m,function(A){t(A)});null!=v&&m.setAttribute("title",v);m.className="geBtn";k.appendChild(m)})(L[F][0],L[F][1],L[F][2]);f.appendChild(k);this.cancelBtn=l;this.okButton=x;this.container=
-f},BtnDialog=function(b,l,p,d){var x=document.createElement("div");x.style.textAlign="center";var z=document.createElement("p");z.style.fontSize="16pt";z.style.padding="0px";z.style.margin="0px";z.style.color="gray";mxUtils.write(z,mxResources.get("done"));var y="Unknown",F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";l==b.drive?(y=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):l==b.dropbox?
-(y=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):l==b.oneDrive?(y=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):l==b.gitHub?(y=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):l==b.gitLab?(y=mxResources.get("gitlab"),F.src=IMAGE_PATH+"/gitlab-logo.svg"):l==b.trello&&(y=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[y],"You are now authorized in {1}"));
-p=mxUtils.button(p,d);p.insertBefore(F,p.firstChild);p.style.marginTop="6px";p.className="geBigButton";p.style.fontSize="18px";p.style.padding="14px";x.appendChild(z);x.appendChild(b);x.appendChild(p);this.container=x},FontDialog=function(b,l,p,d,x){function z(D){this.style.border="";13==D.keyCode&&E.click()}var y=document.createElement("table"),F=document.createElement("tbody");y.style.marginTop="8px";var M=document.createElement("tr");var K=document.createElement("td");K.colSpan=2;K.style.whiteSpace=
-"nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var c=document.createElement("label");c.setAttribute("for","fontdialog-sysfonts");mxUtils.write(c,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(c);M.appendChild(K);
-F.appendChild(M);M=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");M.appendChild(K);var f=document.createElement("input");"s"==d&&f.setAttribute("value",l);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_s";K=document.createElement("td");K.appendChild(f);M.appendChild(K);F.appendChild(M);M=document.createElement("tr");
-K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","googlefonts");k.setAttribute("type","radio");k.setAttribute("name","current-fontdialog");k.setAttribute("id","fontdialog-googlefonts");K.appendChild(k);c=document.createElement("label");c.setAttribute("for","fontdialog-googlefonts");mxUtils.write(c,mxResources.get("googleFonts",
-null,"Google Fonts"));K.appendChild(c);if(!b.isOffline()||EditorUi.isElectronApp)c=b.createHelpIcon("https://fonts.google.com/"),K.appendChild(c);M.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&F.appendChild(M);M=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");M.appendChild(K);var m=document.createElement("input");
-"g"==d&&m.setAttribute("value",l);m.style.marginLeft="4px";m.style.width="250px";m.className="dlg_fontName_g";K=document.createElement("td");K.appendChild(m);M.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&F.appendChild(M);M=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","webfonts");
-t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-webfonts");K.appendChild(t);c=document.createElement("label");c.setAttribute("for","fontdialog-webfonts");mxUtils.write(c,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(c);M.appendChild(K);Editor.enableWebFonts&&F.appendChild(M);M=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft=
-"15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");M.appendChild(K);var v=document.createElement("input");"w"==d&&(Editor.enableWebFonts?v.setAttribute("value",l):f.setAttribute("value",l));v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(v);M.appendChild(K);Editor.enableWebFonts&&F.appendChild(M);M=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";
-K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",null,"Font URL")+":");M.appendChild(K);var A=document.createElement("input");A.setAttribute("value",p||"");A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(A);M.appendChild(K);Editor.enableWebFonts&&F.appendChild(M);this.init=function(){var D=f;"g"==d?D=m:"w"==d&&Editor.enableWebFonts&&(D=v);D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-D.select():document.execCommand("selectAll",!1,null)};M=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();x()});l.className="geBtn";b.editor.cancelFirst&&K.appendChild(l);var E=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var D=
-f.value;var B="s"}else if(k.checked){D=m.value;var S=Editor.GOOGLE_FONTS+encodeURIComponent(D).replace(/%20/g,"+");B="g"}else t.checked&&(D=v.value,S=A.value,B="w");var R=D;var T=S,P=B,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,u=y.querySelector(".dlg_fontName_"+P);null==u||null!=R&&0!=R.length?(u=y.querySelector(".dlg_fontUrl"),null==u||"w"!=P||q.test(T)?R=!0:(u.style.border="1px solid red",R=!1)):(u.style.border="1px solid red",R=!1);R&&(x(D,S,B),b.hideDialog())});
-E.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",z);mxEvent.addListener(m,"keypress",z);mxEvent.addListener(v,"keypress",z);mxEvent.addListener(A,"keypress",z);mxEvent.addListener(f,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(m,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(v,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(A,"focus",function(){t.setAttribute("checked",
-"checked");t.checked=!0});K.appendChild(E);b.editor.cancelFirst||K.appendChild(l);M.appendChild(K);F.appendChild(M);y.appendChild(F);this.container=y};
-function AspectDialog(b,l,p,d,x){this.aspect={pageId:l||(b.pages?b.pages[0].getId():null),layerIds:p||[]};l=document.createElement("div");var z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("pages"));l.appendChild(z);p=document.createElement("div");p.className="geAspectDlgList";l.appendChild(p);z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("layers"));l.appendChild(z);z=document.createElement("div");z.className="geAspectDlgList";
-l.appendChild(z);this.pagesContainer=p;this.layersContainer=z;this.ui=b;p=document.createElement("div");p.style.marginTop="16px";p.style.textAlign="center";z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=x&&x()});z.className="geBtn";b.editor.cancelFirst&&p.appendChild(z);var y=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));p.appendChild(y);y.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||p.appendChild(z);y.setAttribute("disabled","disabled");this.okBtn=y;l.appendChild(p);this.container=l}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var l=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(l.getId(),l.getName(),l.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,l,p,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var x=new Graph(b);x.setTooltips(!1);x.setEnabled(!1);x.setPanning(!1);x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;l="mxGraphModel"==l.nodeName?l:Editor.parseDiagramNode(l);if(null!=l){var z=l.getAttribute("background");if(null==z||""==z||z==mxConstants.NONE)z=null!=d?d:"#ffffff";b.style.backgroundColor=z;d=new mxCodec(l.ownerDocument);b=x.getModel();d.decode(l,b);l=b.getChildCount(b.root);
-d=null==p;for(z=0;z<l;z++){var y=b.getChildAt(b.root,z);b.setVisible(y,d||p==y.id)}x.maxFitScale=1;x.fit(0);x.center()}return x};
-AspectDialog.prototype.createPageItem=function(b,l,p){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(l)+"</div>";this.pagesContainer.appendChild(d);var x=this.createViewer(d.childNodes[0],p);l=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var z=x.model;z=z.getChildCells(z.getRoot());for(var y=0;y<z.length;y++)this.createLayerItem(z[y],b,x,p)});mxEvent.addListener(d,"click",l);this.aspect.pageId==b&&l()};
-AspectDialog.prototype.createLayerItem=function(b,l,p,d){l=p.convertValueToString(b)||mxResources.get("background")||"Background";var x=document.createElement("div");x.setAttribute("data-layer-id",b.id);x.className="geAspectDlgListItem";x.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(l)+"</div>";this.layersContainer.appendChild(x);this.createViewer(x.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=x.className.indexOf("geAspectDlgListItemSelected")?
+"");f=G;f.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=p&&mxEvent.consume(p)}};mxEvent.addListener(G,"click",g);mxEvent.addListener(G,"dblclick",function(p){H.checked=!H.checked;mxEvent.consume(p)});l.push(function(){return H.checked?J.id:null});0==T&&0==u&&g()})(P.entries[u])})(R[T])});N=document.createElement("div");N.className="geDialogTitle";mxUtils.write(N,mxResources.get("shapes"));N.style.position="absolute";N.style.top="0px";N.style.left="0px";N.style.lineHeight="40px";N.style.height=
+"40px";N.style.right="0px";var L=document.createElement("div"),c=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";c.style.position="absolute";c.style.left="202px";c.style.right="0px";c.style.top="40px";c.style.bottom="60px";c.style.overflow="auto";c.style.borderLeftStyle="solid";c.style.borderLeftWidth="1px";c.style.textAlign="center";var f=null,l=[],m=document.createElement("div");m.style.position=
+"relative";m.style.left="0px";m.style.right="0px";z(n);d.style.padding="30px";d.appendChild(N);d.appendChild(L);d.appendChild(c);n=document.createElement("div");n.className="geDialogFooter";n.style.position="absolute";n.style.paddingRight="16px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.height="60px";n.style.lineHeight="52px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.position="relative";t.style.top="1px";t.checked=b.sidebar.sidebarTitles;
+t.defaultChecked=t.checked;n.appendChild(t);z=document.createElement("span");mxUtils.write(z," "+mxResources.get("labels"));z.style.paddingRight="20px";n.appendChild(z);mxEvent.addListener(z,"click",function(R){t.checked=!t.checked;mxEvent.consume(R)});var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)z=document.createElement("span"),z.style.paddingRight="20px",z.appendChild(v),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),
+v.style.position="relative",v.style.top="1px",v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(z,"click",function(R){mxEvent.getSource(R)!=v&&(v.checked=!v.checked,mxEvent.consume(R))}),n.appendChild(z);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";N=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],T=0;T<l.length;T++){var P=l[T].apply(this,arguments);null!=P&&R.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<R.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=T&&0<R.splice(T,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),v.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),v.checked,!0);b.setSidebarTitles(t.checked,v.checked)});N.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table");
+z=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";N=document.createElement("tr");B.style.width="100%";k=document.createElement("td");x=document.createElement("td");y=document.createElement("td");var E=mxUtils.bind(this,function(R,T,P){var q=document.createElement("input");q.type="checkbox";B.appendChild(q);q.checked=b.sidebar.isEntryVisible(P);var u=document.createElement("span");mxUtils.write(u,T);T=document.createElement("div");T.style.display="block";T.appendChild(q);
+T.appendChild(u);mxEvent.addListener(u,"click",function(J){q.checked=!q.checked;mxEvent.consume(J)});R.appendChild(T);return function(){return q.checked?P:null}});N.appendChild(k);N.appendChild(x);N.appendChild(y);z.appendChild(N);B.appendChild(z);l=[];var D=0;for(z=0;z<n.length;z++)for(N=0;N<n[z].entries.length;N++)D++;var A=[k,x,y],S=0;for(z=0;z<n.length;z++)(function(R){for(var T=0;T<R.entries.length;T++){var P=R.entries[T];l.push(E(A[Math.floor(S/(D/3))],P.title,P.id));S++}})(n[z]);d.appendChild(B);
+n=document.createElement("div");n.style.marginTop="18px";n.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,n.appendChild(v),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),n.appendChild(z),mxEvent.addListener(z,"click",function(R){v.checked=!v.checked;mxEvent.consume(R)}));d.appendChild(n);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+z.className="geBtn";N=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],T=0;T<l.length;T++){var P=l[T].apply(this,arguments);null!=P&&R.push(P)}b.sidebar.showEntries(0<R.length?R.join(";"):"",v.checked);b.hideDialog()});N.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="right"}b.editor.cancelFirst?(n.appendChild(z),n.appendChild(N)):(n.appendChild(N),n.appendChild(z));d.appendChild(n);this.container=d},PluginsDialog=function(b,
+k,n,d){function x(){N=!0;if(0==F.length)y.innerText=mxResources.get("noPlugins");else{y.innerText="";for(var l=0;l<F.length;l++){var m=document.createElement("span");m.style.display="flex";m.style.alignItems="center";m.style.whiteSpace="nowrap";var t=document.createElement("img");t.src=Editor.trashImage;t.style.position="relative";t.style.cursor="pointer";t.style.marginRight="4px";t.style.display="inline-block";t.style.width="18px";t.setAttribute("title",mxResources.get("delete"));m.appendChild(t);
+mxUtils.write(m,F[l]);y.appendChild(m);mxUtils.br(y);mxEvent.addListener(t,"click",function(v){return function(){b.confirm(mxResources.get("delete")+' "'+F[v]+'"?',function(){null!=n&&n(F[v]);F.splice(v,1);x()})}}(l))}}}var z=document.createElement("div"),y=document.createElement("div");y.style.height="180px";y.style.overflow="auto";var F=mxSettings.getPlugins().slice(),N=!1;z.appendChild(y);x();N=!1;var K=mxUtils.button(mxResources.get("add"),null!=k?function(){k(function(l){l&&0>mxUtils.indexOf(F,
+l)&&F.push(l);x()})}:function(){var l=document.createElement("div"),m=document.createElement("span");m.style.marginTop="6px";mxUtils.write(m,mxResources.get("builtinPlugins")+": ");l.appendChild(m);var t=document.createElement("select");t.style.width="150px";for(m=0;m<App.publicPlugin.length;m++){var v=document.createElement("option");mxUtils.write(v,App.publicPlugin[m]);v.value=App.publicPlugin[m];t.appendChild(v)}l.appendChild(t);mxUtils.br(l);mxUtils.br(l);m=mxUtils.button(mxResources.get("custom")+
+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(E){b.hideDialog();if(null!=E&&0<E.length){E=E.split(";");for(var D=0;D<E.length;D++){var A=E[D],S=App.pluginRegistry[A];null!=S&&(A=S);0<A.length&&0>mxUtils.indexOf(F,A)&&F.push(A)}x()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});m.className="geBtn";ALLOW_CUSTOM_PLUGINS||(m.style.display="none");l=new CustomDialog(b,l,mxUtils.bind(this,function(){var B=
+App.pluginRegistry[t.value];0>mxUtils.indexOf(F,B)&&(F.push(B),x())}),null,null,null,m);b.showDialog(l.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var c=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){N?(mxSettings.setPlugins(F),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});c.className="geBtn gePrimaryBtn";var f=document.createElement("div");
+f.style.marginTop="14px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||f.appendChild(L),f.appendChild(K),f.appendChild(c)):(f.appendChild(K),f.appendChild(c),d||f.appendChild(L));z.appendChild(f);this.container=z},CropImageDialog=function(b,k,n,d){function x(){var R=v.checked,T=B.checked,P=l.geometry,q=N.width,u=N.height,J=(300-q)/2,G=(300-u)/2;P.x<J?(P.width-=J-P.x,P.x=J):P.x+P.width>J+q&&(P.width=J+q-P.x,
+P.x=Math.min(P.x,J+q));P.y<G?(P.height-=G-P.y,P.y=G):P.y+P.height>G+u&&(P.height=G+u-P.y,P.y=Math.min(P.y,G+u));var H=(P.x-J)/q*100;q=100-(P.x+P.width-J)/q*100;J=(P.y-G)/u*100;P=100-(P.y+P.height-G)/u*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(q)+"% "+mxUtils.format(P)+"% "+mxUtils.format(H)+"%"+(R?" round "+f+"%":T?" round 50%":"")+")"}function z(R){null!=L&&(!0!==R&&(L.model.setGeometry(l,c.clone()),f=5,D.value=f),L.model.setStyle(l,m+x()),L.selectAll(),E.style.visibility=v.checked?
+"visible":"hidden")}var y=document.createElement("div"),F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var N=document.createElement("img");N.onload=function(){function R(){L.model.setStyle(l,m+x())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);
+L.graphHandler.allowLivePreview=!1;var T=L.createVertexHandler;L.createVertexHandler=function(){var U=T.apply(this,arguments);U.livePreview=!1;return U};if(null!=n)try{if("inset"==n.substring(0,5)){var P=l.geometry,q=N.width,u=N.height,J=(300-q)/2,G=(300-u)/2,H=n.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),g=parseFloat(H[0]),p=parseFloat(H[1]),C=parseFloat(H[2]),I=parseFloat(H[3]);isFinite(g)&&isFinite(p)&&isFinite(C)&&isFinite(I)?(P.x=I/100*q+J,P.y=g/100*u+G,P.width=(100-p)/100*q+J-P.x,P.height=(100-
+C)/100*u+G-P.y,"round"==H[4]?"50%"==H[5]?B.setAttribute("checked","checked"):(f=parseInt(H[5]),D.value=f,v.setAttribute("checked","checked"),E.style.visibility="visible"):t.setAttribute("checked","checked")):n=null}else n=null}catch(U){}l.style=m+(n?n:x());l.vertex=!0;L.addCell(l,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var M=L.graphHandler.mouseUp,O=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){M.apply(this,arguments);
+K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){O.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var Q=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){Q.call(this,[l],[l])}};N.onerror=function(){N.onload=null;N.src=Editor.errorImage};N.setAttribute("src",k);N.style.maxWidth="300px";N.style.maxHeight="300px";F.appendChild(N);y.appendChild(F);var K=document.createElement("div");K.style.width="300px";K.style.height=
+"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";y.appendChild(K);var L=null,c=new mxGeometry(100,100,100,100),f=5,l=new mxCell("",c.clone(),""),m="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+k.replace(";base64","")+";clipPath=",t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRect");t.setAttribute("name","croppingShape");t.setAttribute("checked","checked");t.style.margin="5px";y.appendChild(t);k=document.createElement("label");
+k.setAttribute("for","croppingRect");mxUtils.write(k,mxResources.get("rectangle"));y.appendChild(k);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRounded");v.setAttribute("name","croppingShape");v.style.margin="5px";y.appendChild(v);k=document.createElement("label");k.setAttribute("for","croppingRounded");mxUtils.write(k,mxResources.get("rounded"));y.appendChild(k);var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id",
+"croppingEllipse");B.setAttribute("name","croppingShape");B.style.margin="5px";y.appendChild(B);k=document.createElement("label");k.setAttribute("for","croppingEllipse");mxUtils.write(k,mxResources.get("ellipse"));y.appendChild(k);mxEvent.addListener(t,"change",z);mxEvent.addListener(v,"change",z);mxEvent.addListener(B,"change",z);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility="hidden";var D=document.createElement("input");D.setAttribute("type","range");D.setAttribute("min",
+"1");D.setAttribute("max","49");D.setAttribute("value",f);D.setAttribute("title",mxResources.get("arcSize"));E.appendChild(D);y.appendChild(E);mxEvent.addListener(D,"change",function(){f=this.value;z(!0)});k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){d(x(),l.geometry.width,l.geometry.height);b.hideDialog()});F.className="geBtn gePrimaryBtn";var A=mxUtils.button(mxResources.get("reset"),function(){d(null,
+N.width,N.height);b.hideDialog()});A.className="geBtn";var S=document.createElement("div");S.style.marginTop="10px";S.style.textAlign="right";b.editor.cancelFirst?(S.appendChild(k),S.appendChild(A),S.appendChild(F)):(S.appendChild(A),S.appendChild(F),S.appendChild(k));y.appendChild(S);this.container=y},EditGeometryDialog=function(b,k){var n=b.editor.graph,d=1==k.length?n.getCellGeometry(k[0]):null,x=document.createElement("div"),z=document.createElement("table"),y=document.createElement("tbody"),
+F=document.createElement("tr"),N=document.createElement("td"),K=document.createElement("td");z.style.paddingLeft="6px";mxUtils.write(N,mxResources.get("relative")+":");var L=document.createElement("input");L.setAttribute("type","checkbox");null!=d&&d.relative&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);this.init=function(){L.focus()};K.appendChild(L);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");
+mxUtils.write(N,mxResources.get("left")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.x:"";K.appendChild(c);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d?d.y:"";K.appendChild(f);F.appendChild(N);
+F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("dx")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d&&null!=d.offset?d.offset.x:"";K.appendChild(l);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("dy")+
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d&&null!=d.offset?d.offset.y:"";K.appendChild(m);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d?d.width:"";K.appendChild(t);F.appendChild(N);F.appendChild(K);
+y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("height")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d?d.height:"";K.appendChild(v);F.appendChild(N);F.appendChild(K);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");K=document.createElement("td");mxUtils.write(N,mxResources.get("rotation")+":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.width="100px";B.value=1==k.length?mxUtils.getValue(n.getCellStyle(k[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(B);F.appendChild(N);F.appendChild(K);y.appendChild(F);z.appendChild(y);x.appendChild(z);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();n.getModel().beginUpdate();try{for(var D=0;D<k.length;D++){var A=n.getCellGeometry(k[D]);null!=
+A&&(A=A.clone(),n.isCellMovable(k[D])&&(A.relative=L.checked,0<mxUtils.trim(c.value).length&&(A.x=Number(c.value)),0<mxUtils.trim(f.value).length&&(A.y=Number(f.value)),0<mxUtils.trim(l.value).length&&(null==A.offset&&(A.offset=new mxPoint),A.offset.x=Number(l.value)),0<mxUtils.trim(m.value).length&&(null==A.offset&&(A.offset=new mxPoint),A.offset.y=Number(m.value))),n.isCellResizable(k[D])&&(0<mxUtils.trim(t.value).length&&(A.width=Number(t.value)),0<mxUtils.trim(v.value).length&&(A.height=Number(v.value))),
+n.getModel().setGeometry(k[D],A));0<mxUtils.trim(B.value).length&&n.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[k[D]])}}finally{n.getModel().endUpdate()}});E.className="geBtn gePrimaryBtn";mxEvent.addListener(x,"keypress",function(D){13==D.keyCode&&E.click()});z=document.createElement("div");z.style.marginTop="20px";z.style.textAlign="right";b.editor.cancelFirst?(z.appendChild(d),z.appendChild(E)):(z.appendChild(E),z.appendChild(d));x.appendChild(z);this.container=x},LibraryDialog=function(b,
+k,n,d,x,z,y){function F(q){for(q=document.elementFromPoint(q.clientX,q.clientY);null!=q&&q.parentNode!=t;)q=q.parentNode;var u=null;if(null!=q){var J=t.firstChild;for(u=0;null!=J&&J!=q;)J=J.nextSibling,u++}return u}function N(q,u,J,G,H,g,p,C,I){try{if(b.spinner.stop(),null==u||"image/"==u.substring(0,6))if(null==q&&null!=p||null==B[q]){var M=function(){Z.innerText="";Z.style.cursor="pointer";Z.style.whiteSpace="nowrap";Z.style.textOverflow="ellipsis";mxUtils.write(Z,null!=aa.title&&0<aa.title.length?
+aa.title:mxResources.get("untitled"));Z.style.color=null==aa.title||0==aa.title.length?"#d0d0d0":""};t.style.backgroundImage="";v.style.display="none";var O=H,Q=g;if(H>b.maxImageSize||g>b.maxImageSize){var U=Math.min(1,Math.min(b.maxImageSize/Math.max(1,H)),b.maxImageSize/Math.max(1,g));H*=U;g*=U}O>Q?(Q=Math.round(100*Q/O),O=100):(O=Math.round(100*O/Q),Q=100);var V=document.createElement("div");V.setAttribute("draggable","true");V.style.display="inline-block";V.style.position="relative";V.style.padding=
+"0 12px";V.style.cursor="move";mxUtils.setPrefixedStyle(V.style,"transition","transform .1s ease-in-out");if(null!=q){var X=document.createElement("img");X.setAttribute("src",S.convert(q));X.style.width=O+"px";X.style.height=Q+"px";X.style.margin="10px";X.style.paddingBottom=Math.floor((100-Q)/2)+"px";X.style.paddingLeft=Math.floor((100-O)/2)+"px";V.appendChild(X)}else if(null!=p){var W=b.stringToCells("<"==p.xml.charAt(0)?p.xml:Graph.decompress(p.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,
+V,null,!0,!1,null,null,f.shapeBackgroundColor),V.firstChild.style.display="inline-block",V.firstChild.style.cursor="")}var Y=document.createElement("img");Y.setAttribute("src",Editor.closeBlackImage);Y.setAttribute("border","0");Y.setAttribute("title",mxResources.get("delete"));Y.setAttribute("align","top");Y.style.paddingTop="4px";Y.style.position="absolute";Y.style.marginLeft="-12px";Y.style.zIndex="1";Y.style.cursor="pointer";mxEvent.addListener(Y,"dragstart",function(la){mxEvent.consume(la)});
+(function(la,ba,fa){mxEvent.addListener(Y,"click",function(ja){B[ba]=null;for(var ca=0;ca<c.length;ca++)if(null!=c[ca].data&&c[ca].data==ba||null!=c[ca].xml&&null!=fa&&c[ca].xml==fa.xml){c.splice(ca,1);break}V.parentNode.removeChild(la);0==c.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ja)});mxEvent.addListener(Y,"dblclick",function(ja){mxEvent.consume(ja)})})(V,q,p);V.appendChild(Y);V.style.marginBottom="30px";var Z=document.createElement("div");
+Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.bottom="-18px";Z.style.left="10px";Z.style.right="10px";Z.style.backgroundColor="light-dark(#ffffff, transparent)";Z.style.overflow="hidden";Z.style.textAlign="center";Z.setAttribute("title",mxResources.get("rename"));var aa=null;null!=q?(aa={data:q,w:H,h:g,title:I},null!=C&&(aa.aspect=C),B[q]=X,c.push(aa)):null!=p&&(p.aspect="fixed",c.push(p),aa=p);mxEvent.addListener(Z,"keydown",function(la){13==la.keyCode&&null!=A&&(A(),A=null,
+mxEvent.consume(la))});M();V.appendChild(Z);mxEvent.addListener(Z,"mousedown",function(la){"true"!=Z.getAttribute("contentEditable")&&mxEvent.consume(la)});W=function(la){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ba=new FilenameDialog(b,aa.title||"",mxResources.get("ok"),function(fa){null!=fa&&(aa.title=fa,M())},mxResources.get("enterValue"));b.showDialog(ba.container,300,80,!0,!0);ba.init();mxEvent.consume(la)}else if("true"!=Z.getAttribute("contentEditable")){null!=
+A&&(A(),A=null);if(null==aa.title||0==aa.title.length)Z.innerText="";Z.style.textOverflow="";Z.style.whiteSpace="";Z.style.cursor="text";Z.style.color="";Z.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Z.style,"user-select","text");Z.focus();document.execCommand("selectAll",!1,null);A=function(){Z.removeAttribute("contentEditable");Z.style.cursor="pointer";aa.title=mxUtils.getTextContent(Z);M()};mxEvent.consume(la)}};mxEvent.addListener(Z,"click",W);mxEvent.addListener(V,"dblclick",
+W);t.appendChild(V);mxEvent.addListener(V,"dragstart",function(la){null==A&&(null==q&&null!=p&&(Y.style.visibility="hidden",Z.style.visibility="hidden"),mxClient.IS_FF&&null!=p.xml&&la.dataTransfer.setData("Text",p.xml),E=F(la),mxClient.IS_GC&&(V.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(V,30);Y.style.visibility="";Z.style.visibility=""},0))});mxEvent.addListener(V,"dragend",function(la){"hidden"==Y.style.visibility&&
+(Y.style.visibility="",Z.style.visibility="");E=null;mxUtils.setOpacity(V,100);mxUtils.setPrefixedStyle(V.style,"transform",null)})}else R||(R=!0,b.handleError({message:mxResources.get("fileExists")}));else{H=!1;try{if(O=mxUtils.parseXml(q),"mxlibrary"==O.documentElement.nodeName){Q=JSON.parse(mxUtils.getTextContent(O.documentElement));if(null!=Q&&0<Q.length)for(var ha=0;ha<Q.length;ha++)null!=Q[ha].xml?N(null,null,0,0,0,0,Q[ha]):N(Q[ha].data,null,0,0,Q[ha].w,Q[ha].h,null,"fixed",Q[ha].title);H=!0}else if("mxfile"==
+O.documentElement.nodeName){var ea=O.documentElement.getElementsByTagName("diagram");for(ha=0;ha<ea.length;ha++){var da=Editor.getDiagramNodeXml(ea[ha]);W=b.stringToCells(da);if(0<W.length){var ia=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ia&&N(null,null,0,0,0,0,{xml:da,w:ia.width,h:ia.height})}}H=!0}}catch(la){null!=window.console&&console.error("Error in library dialog: "+la)}H||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(la){null!=window.console&&
+console.log("Error in library dialog: "+la)}return null}function K(q){q.dataTransfer.dropEffect=null!=E?"move":"copy";q.stopPropagation();q.preventDefault()}function L(q){q.stopPropagation();q.preventDefault();R=!1;D=F(q);if(null!=E)null!=D&&D<t.children.length?(c.splice(D>E?D-1:D,0,c.splice(E,1)[0]),t.insertBefore(t.children[E],t.children[D])):(c.push(c.splice(E,1)[0]),t.appendChild(t.children[E]));else if(0<q.dataTransfer.files.length)b.importFiles(q.dataTransfer.files,0,0,b.maxImageSize,T(q));
+else if(0<=mxUtils.indexOf(q.dataTransfer.types,"text/uri-list")){var u=decodeURIComponent(q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(u)||/(\.png)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.svg)($|\?)/i.test(u))&&b.loadImage(u,function(J){N(u,null,0,0,J.width,J.height);t.scrollTop=t.scrollHeight})}q.stopPropagation();q.preventDefault()}var c=[],f=b.editor.graph;n=document.createElement("div");n.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";
+l.style.height="40px";n.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==k&&(k=b.defaultLibraryName+".xml");var m=document.createElement("input");m.setAttribute("value",k);m.style.marginRight="20px";m.style.marginLeft="10px";m.style.width="500px";null==x||x.isRenamable()||m.setAttribute("disabled","true");this.init=function(){if(null==x||x.isRenamable())m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};l.appendChild(m);
+Editor.enableUncompressedLibraries&&(m.style.width="420px",k=document.createElement("input"),k.setAttribute("type","checkbox"),k.style.marginRight="10px",l.appendChild(k),mxUtils.write(l,mxResources.get("compressed")));var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";
+0==c.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));n.appendChild(v);var B={},E=null,D=null,A=null;l=function(q){"true"!=mxEvent.getSource(q).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(q))};mxEvent.addListener(t,
+"mousedown",l);mxEvent.addListener(t,"pointerdown",l);mxEvent.addListener(t,"touchstart",l);var S=new mxUrlConverter,R=!1;if(null!=d)for(l=0;l<d.length;l++)k=d[l],N(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(t,"dragleave",function(q){v.style.cursor="";for(var u=mxEvent.getSource(q);null!=u;){if(u==t||u==v){q.stopPropagation();q.preventDefault();break}u=u.parentNode}});var T=function(q){return function(u,J,G,H,g,p,C,I,M){null!=M&&EditorUi.isVisioFilename(M.name)?b.importVisio(M,
+mxUtils.bind(this,function(O){N(O,J,G,H,g,p,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," "))})):null!=M&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(u,M.name)?b.isExternalDataComms()?b.parseFile(M,mxUtils.bind(this,function(O){4==O.readyState&&(b.spinner.stop(),200<=O.status&&299>=O.status&&(N(O.responseText,J,G,H,g,p,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(b.spinner.stop(),
+b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(N(u,J,G,H,g,p,C,"fixed",mxEvent.isAltDown(q)?null:C.substring(0,C.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",K);mxEvent.addListener(t,"drop",L);mxEvent.addListener(v,"dragover",K);mxEvent.addListener(v,"drop",L);n.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
+l.setAttribute("id","btnCancel");l.className="geBtn";b.editor.cancelFirst&&d.appendChild(l);"draw.io"!=b.getServiceName()||null==x||x.constructor!=DriveLibrary&&x.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(x,function(q){if(null!=q){var u=b.getSearch("create title mode url drive splash state clibs ui".split(" "));u+=(0==u.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(q);q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+u,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(q.container,450,240,!0);q.init()}else x.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(x.getId(),x)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get("export"),
+function(){var q=b.createLibraryDataFromImages(c),u=m.value;/(\.xml)$/i.test(u)||(u+=".xml");b.isLocalFileSave()?b.saveLocalFile(q,u,"text/xml",null,null,null!=y?y:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(u)+"&format=xml&xml="+encodeURIComponent(q))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";d.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var P=document.createElement("input");P.setAttribute("multiple",
+"multiple");P.setAttribute("type","file");mxEvent.addListener(P,"change",function(q){R=!1;b.importFiles(P.files,0,0,b.maxImageSize,function(u,J,G,H,g,p,C,I,M){null!=P.files&&(T(q)(u,J,G,H,g,p,C,I,M),P.type="",P.type="file",P.value="")});t.scrollTop=t.scrollHeight});P.style.display="none";document.body.appendChild(P);b.libDlgFileInputElt=P}k=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);b.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";
+d.appendChild(k)}k=mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(q,u,J){R=!1;if(null!=q){if("data:image/"==q.substring(0,11)){var G=q.indexOf(",");0<G&&(q=q.substring(0,G)+";base64,"+q.substring(G+1))}N(q,null,0,0,u,J);t.scrollTop=t.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";d.appendChild(k);this.saveBtnClickHandler=function(q,u,J,G){b.saveLibrary(q,u,J,G)};k=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(m.value,c,x,z)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";d.appendChild(k);b.editor.cancelFirst||d.appendChild(l);n.appendChild(d);this.container=n},EditShapeDialog=function(b,k,n,d,x){d=null!=d?d:300;x=null!=x?x:120;var z=document.createElement("table"),y=document.createElement("tbody");z.style.cellPadding="4px";var F=document.createElement("tr");var N=document.createElement("td");N.setAttribute("colspan",
+"2");N.style.fontSize="10pt";mxUtils.write(N,n);F.appendChild(N);y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=x+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};N.appendChild(K);F.appendChild(N);N=document.createElement("td");n=document.createElement("div");n.style.position="relative";n.style.border="1px solid gray";n.style.top=
+"6px";n.style.width="200px";n.style.height=x+4+"px";n.style.overflow="hidden";n.style.marginBottom="16px";mxEvent.disableContextMenu(n);N.appendChild(n);var L=new Graph(n);L.setEnabled(!1);var c=b.editor.graph.cloneCell(k);L.addCells([c]);n=L.view.getState(c);var f="";null!=n.shape&&null!=n.shape.stencil&&(f=mxUtils.getPrettyXml(n.shape.stencil.desc));mxUtils.write(K,f||"");n=L.getGraphBounds();x=Math.min(160/n.width,(x-40)/n.height);L.view.scaleAndTranslate(x,20/x-n.x,20/x-n.y);F.appendChild(N);
+y.appendChild(F);F=document.createElement("tr");N=document.createElement("td");N.setAttribute("colspan","2");N.style.paddingTop="2px";N.style.whiteSpace="nowrap";N.setAttribute("align","right");b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),x.className="geBtn",N.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&N.appendChild(x);
+var l=function(m,t,v){var B=K.value,E=mxUtils.parseXml(B);B=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(v&&b.hideDialog(),E=!m.model.contains(t),!v||E||B!=f){B=Graph.compress(B);m.getModel().beginUpdate();try{if(E){var D=b.editor.graph.getFreeInsertPoint();t.geometry.x=D.x;t.geometry.y=D.y;m.addCell(t)}m.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+B+")",[t])}catch(A){throw A;}finally{m.getModel().endUpdate()}E&&(m.setSelectionCell(t),m.scrollCellToVisible(t))}};n=mxUtils.button(mxResources.get("preview"),function(){l(L,c,!1)});n.className="geBtn";N.appendChild(n);n=mxUtils.button(mxResources.get("apply"),function(){l(b.editor.graph,k,!0)});n.className="geBtn gePrimaryBtn";N.appendChild(n);b.editor.cancelFirst||N.appendChild(x);F.appendChild(N);y.appendChild(F);z.appendChild(y);this.container=z},CustomDialog=function(b,k,n,d,x,z,
+y,F,N,K,L,c){var f=document.createElement("div");f.appendChild(k);var l=document.createElement("div");l.style.marginTop=null!=c?c:"30px";l.style.textAlign="right";null!=y&&l.appendChild(y);b.isOffline()||null==z||l.appendChild(b.createHelpIcon(z));k=mxUtils.button(N||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});k.className="geBtn";F&&(k.style.display="none");b.editor.cancelFirst&&l.appendChild(k);x=mxUtils.button(x||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,
+null,this.container);if(null!=n){var m=n();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}K&&b.hideDialog(null,null,this.container)}));l.appendChild(x);x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(k);if(null!=L)for(F=0;F<L.length;F++)(function(m,t,v){m=mxUtils.button(m,function(B){t(B)});null!=v&&m.setAttribute("title",v);m.className="geBtn";l.appendChild(m)})(L[F][0],L[F][1],L[F][2]);f.appendChild(l);this.cancelBtn=k;this.okButton=x;this.container=
+f},BtnDialog=function(b,k,n,d){var x=document.createElement("div");x.style.textAlign="center";var z=document.createElement("p");z.style.fontSize="16pt";z.style.padding="0px";z.style.margin="0px";z.style.color="gray";mxUtils.write(z,mxResources.get("done"));var y="Unknown",F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";k==b.drive?(y=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):k==b.dropbox?
+(y=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):k==b.oneDrive?(y=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):k==b.gitHub?(y=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):k==b.gitLab?(y=mxResources.get("gitlab"),F.src=IMAGE_PATH+"/gitlab-logo.svg"):k==b.trello&&(y=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[y],"You are now authorized in {1}"));
+n=mxUtils.button(n,d);n.insertBefore(F,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";n.style.fontSize="18px";n.style.padding="14px";x.appendChild(z);x.appendChild(b);x.appendChild(n);this.container=x},FontDialog=function(b,k,n,d,x){function z(D){this.style.border="";13==D.keyCode&&E.click()}var y=document.createElement("table"),F=document.createElement("tbody");y.style.marginTop="8px";var N=document.createElement("tr");var K=document.createElement("td");K.colSpan=2;K.style.whiteSpace=
+"nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var c=document.createElement("label");c.setAttribute("for","fontdialog-sysfonts");mxUtils.write(c,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(c);N.appendChild(K);
+F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");N.appendChild(K);var f=document.createElement("input");"s"==d&&f.setAttribute("value",k);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_s";K=document.createElement("td");K.appendChild(f);N.appendChild(K);F.appendChild(N);N=document.createElement("tr");
+K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","googlefonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-googlefonts");K.appendChild(l);c=document.createElement("label");c.setAttribute("for","fontdialog-googlefonts");mxUtils.write(c,mxResources.get("googleFonts",
+null,"Google Fonts"));K.appendChild(c);if(!b.isOffline()||EditorUi.isElectronApp)c=b.createHelpIcon("https://fonts.google.com/"),K.appendChild(c);N.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");N.appendChild(K);var m=document.createElement("input");
+"g"==d&&m.setAttribute("value",k);m.style.marginLeft="4px";m.style.width="250px";m.className="dlg_fontName_g";K=document.createElement("td");K.appendChild(m);N.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","webfonts");
+t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-webfonts");K.appendChild(t);c=document.createElement("label");c.setAttribute("for","fontdialog-webfonts");mxUtils.write(c,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(c);N.appendChild(K);Editor.enableWebFonts&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft=
+"15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");N.appendChild(K);var v=document.createElement("input");"w"==d&&(Editor.enableWebFonts?v.setAttribute("value",k):f.setAttribute("value",k));v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(v);N.appendChild(K);Editor.enableWebFonts&&F.appendChild(N);N=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";
+K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",null,"Font URL")+":");N.appendChild(K);var B=document.createElement("input");B.setAttribute("value",n||"");B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(B);N.appendChild(K);Editor.enableWebFonts&&F.appendChild(N);this.init=function(){var D=f;"g"==d?D=m:"w"==d&&Editor.enableWebFonts&&(D=v);D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+D.select():document.execCommand("selectAll",!1,null)};N=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();x()});k.className="geBtn";b.editor.cancelFirst&&K.appendChild(k);var E=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var D=
+f.value;var A="s"}else if(l.checked){D=m.value;var S=Editor.GOOGLE_FONTS+encodeURIComponent(D).replace(/%20/g,"+");A="g"}else t.checked&&(D=v.value,S=B.value,A="w");var R=D;var T=S,P=A,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,u=y.querySelector(".dlg_fontName_"+P);null==u||null!=R&&0!=R.length?(u=y.querySelector(".dlg_fontUrl"),null==u||"w"!=P||q.test(T)?R=!0:(u.style.border="1px solid red",R=!1)):(u.style.border="1px solid red",R=!1);R&&(x(D,S,A),b.hideDialog())});
+E.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",z);mxEvent.addListener(m,"keypress",z);mxEvent.addListener(v,"keypress",z);mxEvent.addListener(B,"keypress",z);mxEvent.addListener(f,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(m,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(v,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(B,"focus",function(){t.setAttribute("checked",
+"checked");t.checked=!0});K.appendChild(E);b.editor.cancelFirst||K.appendChild(k);N.appendChild(K);F.appendChild(N);y.appendChild(F);this.container=y};
+function AspectDialog(b,k,n,d,x){this.aspect={pageId:k||(b.pages?b.pages[0].getId():null),layerIds:n||[]};k=document.createElement("div");var z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("pages"));k.appendChild(z);n=document.createElement("div");n.className="geAspectDlgList";k.appendChild(n);z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("layers"));k.appendChild(z);z=document.createElement("div");z.className="geAspectDlgList";
+k.appendChild(z);this.pagesContainer=n;this.layersContainer=z;this.ui=b;n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign="center";z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=x&&x()});z.className="geBtn";b.editor.cancelFirst&&n.appendChild(z);var y=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));n.appendChild(y);y.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||n.appendChild(z);y.setAttribute("disabled","disabled");this.okBtn=y;k.appendChild(n);this.container=k}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var k=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(k.getId(),k.getName(),k.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,k,n,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var x=new Graph(b);x.setTooltips(!1);x.setEnabled(!1);x.setPanning(!1);x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;k="mxGraphModel"==k.nodeName?k:Editor.parseDiagramNode(k);if(null!=k){var z=k.getAttribute("background");if(null==z||""==z||z==mxConstants.NONE)z=null!=d?d:"#ffffff";b.style.backgroundColor=z;d=new mxCodec(k.ownerDocument);b=x.getModel();d.decode(k,b);k=b.getChildCount(b.root);
+d=null==n;for(z=0;z<k;z++){var y=b.getChildAt(b.root,z);b.setVisible(y,d||n==y.id)}x.maxFitScale=1;x.fit(0);x.center()}return x};
+AspectDialog.prototype.createPageItem=function(b,k,n){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(k)+"</div>";this.pagesContainer.appendChild(d);var x=this.createViewer(d.childNodes[0],n);k=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var z=x.model;z=z.getChildCells(z.getRoot());for(var y=0;y<z.length;y++)this.createLayerItem(z[y],b,x,n)});mxEvent.addListener(d,"click",k);this.aspect.pageId==b&&k()};
+AspectDialog.prototype.createLayerItem=function(b,k,n,d){k=n.convertValueToString(b)||mxResources.get("background")||"Background";var x=document.createElement("div");x.setAttribute("data-layer-id",b.id);x.className="geAspectDlgListItem";x.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(k)+"</div>";this.layersContainer.appendChild(x);this.createViewer(x.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=x.className.indexOf("geAspectDlgListItemSelected")?
(x.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(x.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(x,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b,l){function p(B){var S=K;K=function(R,T){try{B(function(){S(R,T)},T)}catch(P){T(P)}}}var d=document.createElement("table"),x=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var z=b.getCurrentFile(),y=null!=z&&null!=z.getTitle()?z.getTitle():b.defaultFilename,F=/(\.png)$/i.test(y),M=/(\.svg)$/i.test(y),K=function(B,S){B()},L=null!=z?z.isLocked():!1;var c=document.createElement("tr");var f=document.createElement("td");
-f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("locked")+":");c.appendChild(f);var k=document.createElement("input");k.setAttribute("type","checkbox");L&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(k);c.appendChild(f);x.appendChild(c);this.init=function(){k.focus()};p(function(B,S){null!=b.fileNode&&L!=k.checked?window.setTimeout(function(){null!=
-z&&z.setLocked(k.checked);B()},0):B()});if(F||M){y=1;F=0;c=b.fileNode;null!=c&&(c.hasAttribute("scale")&&(y=parseFloat(c.getAttribute("scale"))),c.hasAttribute("border")&&(F=parseInt(c.getAttribute("border"))));c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("zoom")+":");c.appendChild(f);var m=document.createElement("input");m.setAttribute("value",100*y+"%");m.style.marginLeft="4px";m.style.width="100%";
+var FilePropertiesDialog=function(b,k){function n(A){var S=K;K=function(R,T){try{A(function(){S(R,T)},T)}catch(P){T(P)}}}var d=document.createElement("table"),x=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var z=b.getCurrentFile(),y=null!=z&&null!=z.getTitle()?z.getTitle():b.defaultFilename,F=/(\.png)$/i.test(y),N=/(\.svg)$/i.test(y),K=function(A,S){A()},L=null!=z?z.isLocked():!1;var c=document.createElement("tr");var f=document.createElement("td");
+f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("locked")+":");c.appendChild(f);var l=document.createElement("input");l.setAttribute("type","checkbox");L&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(l);c.appendChild(f);x.appendChild(c);this.init=function(){l.focus()};n(function(A,S){null!=b.fileNode&&L!=l.checked?window.setTimeout(function(){null!=
+z&&z.setLocked(l.checked);A()},0):A()});if(F||N){y=1;F=0;c=b.fileNode;null!=c&&(c.hasAttribute("scale")&&(y=parseFloat(c.getAttribute("scale"))),c.hasAttribute("border")&&(F=parseInt(c.getAttribute("border"))));c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("zoom")+":");c.appendChild(f);var m=document.createElement("input");m.setAttribute("value",100*y+"%");m.style.marginLeft="4px";m.style.width="100%";
f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(m);c.appendChild(f);x.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("borderWidth")+":");c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",F);t.style.marginLeft="4px";t.style.width="100%";f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);x.appendChild(c);
-this.init=this.init||function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};p(function(B,S){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(m.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(t.value))),null!=z&&z.fileChanged());B()})}else if(!/(\.html)$/i.test(y)&&!/(\.svg)$/i.test(y)){var v=null!=z?z.isCompressed():Editor.defaultCompressed;c=document.createElement("tr");f=document.createElement("td");
-f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("compressed")+":");c.appendChild(f);var A=document.createElement("input");A.setAttribute("type","checkbox");v&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(A);c.appendChild(f);x.appendChild(c);this.init=this.init||function(){A.focus()};p(function(B,S){null!=b.fileNode&&v!=
-A.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",A.checked?"true":"false");null!=z&&(z.compressionChanged(A.checked),z.fileChanged());B()},0):B()})}if(null!=z&&z.isRealtimeOptional()){c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("realtimeCollaboration")+":");c.appendChild(f);var E=document.createElement("input");E.setAttribute("type",
-"checkbox");var D=z.isRealtimeEnabled();if(D="disabled"!=b.drive.getCustomProperty(z.desc,"collaboration"))E.setAttribute("checked","checked"),E.defaultChecked=!0;p(function(B,S){E.checked!=D?z.setRealtimeEnabled(E.checked,B,S):B()});this.init=null!=this.init?this.init:function(){E.focus()};f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(E);f.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));c.appendChild(f);x.appendChild(c)}null!=z&&
+this.init=this.init||function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};n(function(A,S){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(m.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(t.value))),null!=z&&z.fileChanged());A()})}else if(!/(\.html)$/i.test(y)&&!/(\.svg)$/i.test(y)){var v=null!=z?z.isCompressed():Editor.defaultCompressed;c=document.createElement("tr");f=document.createElement("td");
+f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("compressed")+":");c.appendChild(f);var B=document.createElement("input");B.setAttribute("type","checkbox");v&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(B);c.appendChild(f);x.appendChild(c);this.init=this.init||function(){B.focus()};n(function(A,S){null!=b.fileNode&&v!=
+B.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",B.checked?"true":"false");null!=z&&(z.compressionChanged(B.checked),z.fileChanged());A()},0):A()})}if(null!=z&&z.isRealtimeOptional()){c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("realtimeCollaboration")+":");c.appendChild(f);var E=document.createElement("input");E.setAttribute("type",
+"checkbox");var D=z.isRealtimeEnabled();if(D="disabled"!=b.drive.getCustomProperty(z.desc,"collaboration"))E.setAttribute("checked","checked"),E.defaultChecked=!0;n(function(A,S){E.checked!=D?z.setRealtimeEnabled(E.checked,A,S):A()});this.init=null!=this.init?this.init:function(){E.focus()};f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(E);f.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));c.appendChild(f);x.appendChild(c)}null!=z&&
"draw.io"==b.getServiceName()&&0<z.getSize()&&"1"!=urlParams.embed&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("size")+":"),c.appendChild(f),f=b.formatFileSize(z.getSize()),y=document.createElement("input"),y.setAttribute("title",f),y.setAttribute("value",f),y.setAttribute("disabled","disabled"),y.style.marginLeft="4px",y.style.width="100%",
-f=document.createElement("td"),f.style.whiteSpace="nowrap",f.appendChild(y),c.appendChild(f),x.appendChild(c));null!=l&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("publicDiagramUrl")+":"),c.appendChild(f),y=document.createElement("a"),y.setAttribute("href",l),y.setAttribute("title",l),y.style.whiteSpace="nowrap",y.style.overflow="hidden",
-y.style.textOverflow="ellipsis",y.style.display="block",y.style.margin="2px 0px 2px 8px",y.style.fontSize="10pt",mxUtils.write(y,l),mxEvent.addListener(y,"click",function(B){b.openLink(l);mxEvent.consume(B)}),f=document.createElement("td"),f.appendChild(y),c.appendChild(f),x.appendChild(c));null!=z&&null!=z.fileObject&&null!=z.fileObject.path&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize=
+f=document.createElement("td"),f.style.whiteSpace="nowrap",f.appendChild(y),c.appendChild(f),x.appendChild(c));null!=k&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("publicDiagramUrl")+":"),c.appendChild(f),y=document.createElement("a"),y.setAttribute("href",k),y.setAttribute("title",k),y.style.whiteSpace="nowrap",y.style.overflow="hidden",
+y.style.textOverflow="ellipsis",y.style.display="block",y.style.margin="2px 0px 2px 8px",y.style.fontSize="10pt",mxUtils.write(y,k),mxEvent.addListener(y,"click",function(A){b.openLink(k);mxEvent.consume(A)}),f=document.createElement("td"),f.appendChild(y),c.appendChild(f),x.appendChild(c));null!=z&&null!=z.fileObject&&null!=z.fileObject.path&&(c=document.createElement("tr"),f=document.createElement("td"),f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis",f.style.fontSize=
"10pt",mxUtils.write(f,mxResources.get("pathFilename")+":"),c.appendChild(f),y=document.createElement("input"),y.setAttribute("title",z.fileObject.path),y.setAttribute("value",z.fileObject.path),y.setAttribute("disabled","disabled"),y.style.marginLeft="4px",y.style.width="100%",f=document.createElement("td"),f.appendChild(y),c.appendChild(f),x.appendChild(c));this.init=null!=this.init?this.init:function(){};y=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-K(function(){b.spinner.stop();b.hideDialog()},function(B){b.spinner.stop();b.handleError(B,mxResources.get("error"))})});y.className="geBtn gePrimaryBtn";c=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&f.appendChild(F);f.appendChild(y);b.editor.cancelFirst||f.appendChild(F);c.appendChild(f);
-x.appendChild(c);d.appendChild(x);this.container=d},ConnectionPointsDialog=function(b,l){function p(){null!=x&&x.destroy()}var d=document.createElement("div");d.style.userSelect="none";var x=null;this.init=function(){function z(G,H,g){var n="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";G=new mxCell("",new mxGeometry(G,H,6,6),n);G.vertex=!0;G.cp=!0;G.constObj=g;return c.addCell(G)}function y(G){G=c.getSelectionCells();
-c.deleteCells(G)}function F(){var G=parseInt(P.value)||0;G=0>G?0:100<G?100:G;P.value=G;var H=parseInt(u.value)||0;H=0>H?0:100<H?100:H;u.value=H;var g=parseInt(q.value)||0,n=parseInt(J.value)||0;g=new mxConnectionConstraint(new mxPoint(G/100,H/100),!1,null,g,n);G=c.getConnectionPoint(m,g);H=c.getSelectionCell();if(null!=H){H.constObj=g;g=H.geometry.clone();n=c.view.scale;var C=c.view.translate;g.x=(G.x-3*n)/n-C.x;g.y=(G.y-3*n)/n-C.y;c.model.setGeometry(H,g)}}function M(G){if(G.constObj)return{x:G.constObj.point.x,
-y:G.constObj.point.y,dx:G.constObj.dx,dy:G.constObj.dy};var H=0,g=0,n=f.geometry,C=mxUtils.format((G.geometry.x+3-n.x)/n.width);G=mxUtils.format((G.geometry.y+3-n.y)/n.height);0>C?(H=C*n.width,C=0):1<C&&(H=(C-1)*n.width,C=1);0>G?(g=G*n.height,G=0):1<G&&(g=(G-1)*n.height,G=1);return{x:C,y:G,dx:parseInt(H),dy:parseInt(g)}}function K(G){if(1==c.getSelectionCount()){var H=c.getSelectionCell();G&&(H.constObj=null);G=M(H);P.value=100*G.x;u.value=100*G.y;q.value=G.dx;J.value=G.dy;T.style.visibility=""}else T.style.visibility=
-"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.borderStyle="solid";L.style.borderWidth="1px";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var c=new Graph(L);c.transparentBackground=!1;c.autoExtend=!1;c.autoScroll=!1;c.setGridEnabled(!1);c.setEnabled(!0);c.setPanning(!0);c.setConnectable(!1);c.setTooltips(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;c.maxFitScale=2;L=l.geometry;
-var f=new mxCell(l.value,new mxGeometry(0,0,L.width,L.height),l.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");f.vertex=!0;c.addCell(f);c.dblClick=function(G,H){if(null!=H&&H!=f)c.setSelectionCell(H);else{H=mxUtils.convertPoint(c.container,mxEvent.getClientX(G),mxEvent.getClientY(G));mxEvent.consume(G);G=c.view.scale;var g=c.view.translate;c.setSelectionCell(z((H.x-3*G)/G-g.x,(H.y-3*G)/G-g.y))}};x=new mxKeyHandler(c);x.bindKey(46,y);x.bindKey(8,y);c.getRubberband().isForceRubberbandEvent=
-function(G){return 0==G.evt.button&&(null==G.getCell()||G.getCell()==f)};c.panningHandler.isForcePanningEvent=function(G){return 2==G.evt.button};var k=c.isCellSelectable;c.isCellSelectable=function(G){return G==f?!1:k.apply(this,arguments)};c.getLinkForCell=function(){return null};var m=c.view.getState(f);L=c.getAllConnectionConstraints(m);for(var t=0;null!=L&&t<L.length;t++){var v=c.getConnectionPoint(m,L[t]);z(v.x-3,v.y-3,L[t])}c.fit(8);c.center();t=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){c.zoomIn()});v=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){c.zoomOut()});var A=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==c.view.scale?(c.maxFitScale=8,c.fit(8)):c.zoomActual();c.center()}),E=function(){b.prompt(mxResources.get("gridSize"),c.gridSize,function(G){!isNaN(G)&&0<G&&(c.setGridSize(G),c.setGridEnabled(!0),c.refresh())})},D=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(G){mxEvent.isShiftDown(G)?
-E():(c.setGridEnabled(!c.isGridEnabled()),c.refresh())});mxEvent.addListener(D,"dblclick",E);var B=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),y);mxUtils.setOpacity(B,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(t);L.appendChild(v);L.appendChild(A);L.appendChild(D);L.appendChild(B);d.appendChild(L);var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","1");S.setAttribute("value",
-"1");S.style.width="45px";S.style.position="relative";S.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";v=["left","right","top","bottom"];for(t=0;t<v.length;t++)A=v[t],D=document.createElement("option"),mxUtils.write(D,mxResources.get(A)),D.value=A,R.appendChild(D);t=mxUtils.button(mxResources.get("add"),function(){var G=parseInt(S.value);G=1>G?1:100<G?100:G;S.value=G;for(var H=R.value,g=f.geometry,n=[],C=0;C<G;C++){switch(H){case "left":var I=g.x;var N=
-g.y+(C+1)*g.height/(G+1);break;case "right":I=g.x+g.width;N=g.y+(C+1)*g.height/(G+1);break;case "top":I=g.x+(C+1)*g.width/(G+1);N=g.y;break;case "bottom":I=g.x+(C+1)*g.width/(G+1),N=g.y+g.height}n.push(z(I-3,N-3))}c.setSelectionCells(n)});t.style.marginLeft="auto";L.appendChild(t);L.appendChild(S);L.appendChild(R);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));
+K(function(){b.spinner.stop();b.hideDialog()},function(A){b.spinner.stop();b.handleError(A,mxResources.get("error"))})});y.className="geBtn gePrimaryBtn";c=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&f.appendChild(F);f.appendChild(y);b.editor.cancelFirst||f.appendChild(F);c.appendChild(f);
+x.appendChild(c);d.appendChild(x);this.container=d},ConnectionPointsDialog=function(b,k){function n(){null!=x&&x.destroy()}var d=document.createElement("div");d.style.userSelect="none";var x=null;this.init=function(){function z(G,H,g){var p="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";G=new mxCell("",new mxGeometry(G,H,6,6),p);G.vertex=!0;G.cp=!0;G.constObj=g;return c.addCell(G)}function y(G){G=c.getSelectionCells();
+c.deleteCells(G)}function F(){var G=parseInt(P.value)||0;G=0>G?0:100<G?100:G;P.value=G;var H=parseInt(u.value)||0;H=0>H?0:100<H?100:H;u.value=H;var g=parseInt(q.value)||0,p=parseInt(J.value)||0;g=new mxConnectionConstraint(new mxPoint(G/100,H/100),!1,null,g,p);G=c.getConnectionPoint(m,g);H=c.getSelectionCell();if(null!=H){H.constObj=g;g=H.geometry.clone();p=c.view.scale;var C=c.view.translate;g.x=(G.x-3*p)/p-C.x;g.y=(G.y-3*p)/p-C.y;c.model.setGeometry(H,g)}}function N(G){if(G.constObj)return{x:G.constObj.point.x,
+y:G.constObj.point.y,dx:G.constObj.dx,dy:G.constObj.dy};var H=0,g=0,p=f.geometry,C=mxUtils.format((G.geometry.x+3-p.x)/p.width);G=mxUtils.format((G.geometry.y+3-p.y)/p.height);0>C?(H=C*p.width,C=0):1<C&&(H=(C-1)*p.width,C=1);0>G?(g=G*p.height,G=0):1<G&&(g=(G-1)*p.height,G=1);return{x:C,y:G,dx:parseInt(H),dy:parseInt(g)}}function K(G){if(1==c.getSelectionCount()){var H=c.getSelectionCell();G&&(H.constObj=null);G=N(H);P.value=100*G.x;u.value=100*G.y;q.value=G.dx;J.value=G.dy;T.style.visibility=""}else T.style.visibility=
+"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.borderStyle="solid";L.style.borderWidth="1px";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var c=new Graph(L);c.transparentBackground=!1;c.autoExtend=!1;c.autoScroll=!1;c.setGridEnabled(!1);c.setEnabled(!0);c.setPanning(!0);c.setConnectable(!1);c.setTooltips(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;c.maxFitScale=2;L=k.geometry;
+var f=new mxCell(k.value,new mxGeometry(0,0,L.width,L.height),k.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");f.vertex=!0;c.addCell(f);c.dblClick=function(G,H){if(null!=H&&H!=f)c.setSelectionCell(H);else{H=mxUtils.convertPoint(c.container,mxEvent.getClientX(G),mxEvent.getClientY(G));mxEvent.consume(G);G=c.view.scale;var g=c.view.translate;c.setSelectionCell(z((H.x-3*G)/G-g.x,(H.y-3*G)/G-g.y))}};x=new mxKeyHandler(c);x.bindKey(46,y);x.bindKey(8,y);c.getRubberband().isForceRubberbandEvent=
+function(G){return 0==G.evt.button&&(null==G.getCell()||G.getCell()==f)};c.panningHandler.isForcePanningEvent=function(G){return 2==G.evt.button};var l=c.isCellSelectable;c.isCellSelectable=function(G){return G==f?!1:l.apply(this,arguments)};c.getLinkForCell=function(){return null};var m=c.view.getState(f);L=c.getAllConnectionConstraints(m);for(var t=0;null!=L&&t<L.length;t++){var v=c.getConnectionPoint(m,L[t]);z(v.x-3,v.y-3,L[t])}c.fit(8);c.center();t=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){c.zoomIn()});v=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){c.zoomOut()});var B=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==c.view.scale?(c.maxFitScale=8,c.fit(8)):c.zoomActual();c.center()}),E=function(){b.prompt(mxResources.get("gridSize"),c.gridSize,function(G){!isNaN(G)&&0<G&&(c.setGridSize(G),c.setGridEnabled(!0),c.refresh())})},D=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(G){mxEvent.isShiftDown(G)?
+E():(c.setGridEnabled(!c.isGridEnabled()),c.refresh())});mxEvent.addListener(D,"dblclick",E);var A=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),y);mxUtils.setOpacity(A,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(t);L.appendChild(v);L.appendChild(B);L.appendChild(D);L.appendChild(A);d.appendChild(L);var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","1");S.setAttribute("value",
+"1");S.style.width="45px";S.style.position="relative";S.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";v=["left","right","top","bottom"];for(t=0;t<v.length;t++)B=v[t],D=document.createElement("option"),mxUtils.write(D,mxResources.get(B)),D.value=B,R.appendChild(D);t=mxUtils.button(mxResources.get("add"),function(){var G=parseInt(S.value);G=1>G?1:100<G?100:G;S.value=G;for(var H=R.value,g=f.geometry,p=[],C=0;C<G;C++){switch(H){case "left":var I=g.x;var M=
+g.y+(C+1)*g.height/(G+1);break;case "right":I=g.x+g.width;M=g.y+(C+1)*g.height/(G+1);break;case "top":I=g.x+(C+1)*g.width/(G+1);M=g.y;break;case "bottom":I=g.x+(C+1)*g.width/(G+1),M=g.y+g.height}p.push(z(I-3,M-3))}c.setSelectionCells(p)});t.style.marginLeft="auto";L.appendChild(t);L.appendChild(S);L.appendChild(R);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));
T.appendChild(L);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";T.appendChild(P);mxUtils.write(T,"%");var q=document.createElement("input");q.setAttribute("type","number");q.style.width="45px";q.style.margin="0 4px 0 4px";T.appendChild(q);mxUtils.write(T,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";T.appendChild(L);
-var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";T.appendChild(u);mxUtils.write(T,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";T.appendChild(J);mxUtils.write(T,"pt");d.appendChild(T);K();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(B,60):
-mxUtils.setOpacity(B,10);K()});c.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(P,"change",F);mxEvent.addListener(u,"change",F);mxEvent.addListener(q,"change",F);mxEvent.addListener(J,"change",F);L=mxUtils.button(mxResources.get("cancel"),function(){p();b.hideDialog()});L.className="geBtn";t=mxUtils.button(mxResources.get("apply"),function(){var G=c.model.cells,H=[],g=[],n;for(n in G){var C=G[n];C.cp&&g.push(M(C))}g.sort(function(I,N){return I.x!=N.x?I.x-N.x:I.y!=N.y?I.y-N.y:I.dx!=N.dx?I.dx-
-N.dx:I.dy-N.dy});for(G=0;G<g.length;G++)0<G&&g[G].x==g[G-1].x&&g[G].y==g[G-1].y&&g[G].dx==g[G-1].dx&&g[G].dy==g[G-1].dy||H.push("["+g[G].x+","+g[G].y+",0,"+g[G].dx+","+g[G].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[l]);p();b.hideDialog()});t.className="geBtn gePrimaryBtn";v=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[l]);p();b.hideDialog()});v.className="geBtn";A=document.createElement("div");A.style.marginTop="10px";A.style.textAlign=
-"right";b.isOffline()||A.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&A.appendChild(L);A.appendChild(v);A.appendChild(t);b.editor.cancelFirst||A.appendChild(L);d.appendChild(A)};this.destroy=p;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
+var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";T.appendChild(u);mxUtils.write(T,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";T.appendChild(J);mxUtils.write(T,"pt");d.appendChild(T);K();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(A,60):
+mxUtils.setOpacity(A,10);K()});c.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(P,"change",F);mxEvent.addListener(u,"change",F);mxEvent.addListener(q,"change",F);mxEvent.addListener(J,"change",F);L=mxUtils.button(mxResources.get("cancel"),function(){n();b.hideDialog()});L.className="geBtn";t=mxUtils.button(mxResources.get("apply"),function(){var G=c.model.cells,H=[],g=[],p;for(p in G){var C=G[p];C.cp&&g.push(N(C))}g.sort(function(I,M){return I.x!=M.x?I.x-M.x:I.y!=M.y?I.y-M.y:I.dx!=M.dx?I.dx-
+M.dx:I.dy-M.dy});for(G=0;G<g.length;G++)0<G&&g[G].x==g[G-1].x&&g[G].y==g[G-1].y&&g[G].dx==g[G-1].dx&&g[G].dy==g[G-1].dy||H.push("["+g[G].x+","+g[G].y+",0,"+g[G].dx+","+g[G].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[k]);n();b.hideDialog()});t.className="geBtn gePrimaryBtn";v=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[k]);n();b.hideDialog()});v.className="geBtn";B=document.createElement("div");B.style.marginTop="10px";B.style.textAlign=
+"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(L);B.appendChild(v);B.appendChild(t);b.editor.cancelFirst||B.appendChild(L);d.appendChild(B)};this.destroy=n;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
@@ -12544,43 +12546,43 @@ Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/t
Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(g){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
"1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.defaultTextStyle="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;";
Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):
-"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(g,n){return{name:n,dispName:g,type:"bool",defVal:!1,isVisible:function(C,I){return 1==C.vertices.length?(I=I.editorUi.editor.graph.model,C=I.getParent(C.vertices[0]),I.isEdge(C)||I.isVertex(C)):!1},getValue:function(C,I){return"inherit"==
-mxUtils.getValue(C.style,n)},valueChanged:function(C,I,N,O){I=O.editorUi.editor.graph;"1"==C?I.setCellStyles(n,"inherit",N.vertices):I.setCellStyles(n,null,N.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(g){g.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(g,
-n){return"1"!=mxUtils.getValue(g.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"comic","0")||"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
-dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch",
-"1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(g,
-n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(g,n){return"1"==
-mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
-type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,
-"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(g,n){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
-type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,isVisible:function(g,n){g=mxUtils.getValue(g.style,"linejoin","miter");return"miter"==g||"miter-clip"==g}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(g,p){return{name:p,dispName:g,type:"bool",defVal:!1,isVisible:function(C,I){return 1==C.vertices.length?(I=I.editorUi.editor.graph.model,C=I.getParent(C.vertices[0]),I.isEdge(C)||I.isVertex(C)):!1},getValue:function(C,I){return"inherit"==
+mxUtils.getValue(C.style,p)},valueChanged:function(C,I,M,O){I=O.editorUi.editor.graph;"1"==C?I.setCellStyles(p,"inherit",M.vertices):I.setCellStyles(p,null,M.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(g){g.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(g,
+p){return"1"!=mxUtils.getValue(g.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"comic","0")||"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
+isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
+dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch",
+"1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(g,
+p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(g,p){return"1"==
+mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
+type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,
+"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(g,p){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
+type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]},{name:"miterlimit",dispName:"Miter Limit",type:"int",min:1,defVal:4,isVisible:function(g,p){g=mxUtils.getValue(g.style,"linejoin","miter");return"miter"==g||"miter-clip"==g}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(g){return"orthogonalEdgeStyle"==mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(g){return"entityRelationEdgeStyle"==mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",
type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",
type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},
{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(g){return"1"==mxUtils.getValue(g.style,"flowAnimation",null)}},
{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},
-{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(g,n){n=n.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&n.isTableCell(g.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,
-defVal:1,isVisible:function(g,n){n=n.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&n.isTableCell(g.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(g,n){g=n.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLastRow","0")},isVisible:function(g,n){n=n.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&n.isTable(g.vertices[0])}},
-{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(g,n){g=n.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLast","0")},isVisible:function(g,n){n=n.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&n.isTable(g.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",
+{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTableCell(g.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,
+defVal:1,isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTableCell(g.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(g,p){g=p.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLastRow","0")},isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTable(g.vertices[0])}},
+{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(g,p){g=p.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLast","0")},isVisible:function(g,p){p=p.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&p.isTable(g.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",
min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(g,n){return n.editorUi.editor.graph.isCellConnectable(0<
-g.vertices.length&&0==g.edges.length?g.vertices[0]:null)},isVisible:function(g,n){return 0<g.vertices.length&&0==g.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(g,p){return p.editorUi.editor.graph.isCellConnectable(0<
+g.vertices.length&&0==g.edges.length?g.vertices[0]:null)},isVisible:function(g,p){return 0<g.vertices.length&&0==g.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},
{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",
-type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(g,n){g=0<g.vertices.length&&0==g.edges.length?g.vertices[0]:null;n=n.editorUi.editor.graph;return null!=g&&n.isSwimlane(g)},isVisible:function(g,n){return 0<g.vertices.length&&0==g.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(g,n){g=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;n=n.editorUi.editor.graph;return null!=g&&(n.isSwimlane(g)||0<
-n.model.getChildCount(g))},isVisible:function(g,n){return 1==g.vertices.length&&0==g.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(g,n){var C=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;n=n.editorUi.editor.graph;return null!=C&&(n.isContainer(C)&&"0"!=g.style.collapsible||!n.isContainer(C)&&"1"==g.style.collapsible)},isVisible:function(g,n){return 1==g.vertices.length&&0==g.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(g,n){return 1==g.vertices.length&&0==g.edges.length&&!n.editorUi.editor.graph.isSwimlane(g.vertices[0])&&null==mxUtils.getValue(g.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(g,n){n=n.editorUi.editor.graph.model;return 0<g.vertices.length?n.isVertex(n.getParent(g.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",
-dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(g,n){g=0<g.vertices.length?n.editorUi.editor.graph.getCellGeometry(g.vertices[0]):null;return null!=g&&!g.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",
-defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(g,n){return 0<g.vertices.length&&n.editorUi.editor.graph.isAutoSizeCell(g.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",
-dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(g,n){var C=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||n.editorUi.editor.graph.isSwimlane(g.vertices[0])||
-null==C||C==mxConstants.NONE||0==mxUtils.getValue(g.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(g.style,mxConstants.STYLE_OPACITY,100)||null!=g.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(g,n){return 0<g.vertices.length&&n.editorUi.editor.graph.isContainer(g.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),
+type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(g,p){g=0<g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=g&&p.isSwimlane(g)},isVisible:function(g,p){return 0<g.vertices.length&&0==g.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(g,p){g=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=g&&(p.isSwimlane(g)||0<
+p.model.getChildCount(g))},isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(g,p){var C=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;p=p.editorUi.editor.graph;return null!=C&&(p.isContainer(C)&&"0"!=g.style.collapsible||!p.isContainer(C)&&"1"==g.style.collapsible)},isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
+type:"bool",defVal:!0,isVisible:function(g,p){return 1==g.vertices.length&&0==g.edges.length&&!p.editorUi.editor.graph.isSwimlane(g.vertices[0])&&null==mxUtils.getValue(g.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(g,p){p=p.editorUi.editor.graph.model;return 0<g.vertices.length?p.isVertex(p.getParent(g.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",
+dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(g,p){g=0<g.vertices.length?p.editorUi.editor.graph.getCellGeometry(g.vertices[0]):null;return null!=g&&!g.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",
+defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(g,p){return 0<g.vertices.length&&p.editorUi.editor.graph.isAutoSizeCell(g.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",
+dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(g,p){var C=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||p.editorUi.editor.graph.isSwimlane(g.vertices[0])||
+null==C||C==mxConstants.NONE||0==mxUtils.getValue(g.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(g.style,mxConstants.STYLE_OPACITY,100)||null!=g.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(g,p){return 0<g.vertices.length&&p.editorUi.editor.graph.isContainer(g.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),
Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://app.diagrams.net,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.canvasSupported=!1;(function(){try{var g=document.createElement("canvas");Editor.canvasSupported=!(!g.getContext||!g.getContext("2d"))}catch(n){}})();Editor.useCanvasForExport=!1;(function(){try{var g=document.createElement("canvas"),n=new Image;n.onload=function(){try{g.getContext("2d").drawImage(n,0,0);var C=g.toDataURL("image/png");Editor.useCanvasForExport=null!=C&&6<C.length}catch(I){}};n.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(C){}})();
-Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var g=document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg");Editor.jpgSupported=null!==n.match("image/jpeg");n=g.toDataURL("image/webp");Editor.webpSupported=null!==n.match("image/webp")}catch(C){}})();Editor.loadCompatibleCss=function(g){mxUtils.lightDarkColorSupported||mxUtils.get(g||"styles/grapheditor.css",mxUtils.bind(this,function(n){if(200<=n.getStatus()&&299>=n.getStatus()){var C=document.createElement("style");
-C.type="text/css";var I=C.appendChild,N=document,O=N.createTextNode;n=n.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(n=n.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(Q){}I.call(C,O.call(N,n));document.head.appendChild(C)}}))};Editor.createRoughCanvas=function(g){var n=
-rough.canvas({getContext:function(){return g}});n.draw=function(C){var I=C.sets||[];C=C.options||this.getDefaultOptions();for(var N=0;N<I.length;N++){var O=I[N];switch(O.type){case "path":null!=C.stroke&&this._drawToContext(g,O,C);break;case "fillPath":this._drawToContext(g,O,C);break;case "fillSketch":this.fillSketch(g,O,C)}}};n.fillSketch=function(C,I,N){var O=g.state.strokeColor,Q=g.state.strokeWidth,U=g.state.strokeAlpha,V=g.state.dashed,X=N.fillWeight;0>X&&(X=N.strokeWidth/2);g.setStrokeAlpha(g.state.fillAlpha);
-g.setStrokeColor(N.fill||"");g.setStrokeWidth(X);g.setDashed(!1);this._drawToContext(C,I,N);g.setDashed(V);g.setStrokeWidth(Q);g.setStrokeColor(O);g.setStrokeAlpha(U)};n._drawToContext=function(C,I,N){C.begin();for(var O=0;O<I.ops.length;O++){var Q=I.ops[O],U=Q.data;switch(Q.op){case "move":C.moveTo(U[0],U[1]);break;case "bcurveTo":C.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":C.lineTo(U[0],U[1])}}C.end();"fillPath"===I.type&&N.filled?C.fill():C.stroke()};return n};(function(){function g(O,
+Editor.canvasSupported=!1;(function(){try{var g=document.createElement("canvas");Editor.canvasSupported=!(!g.getContext||!g.getContext("2d"))}catch(p){}})();Editor.useCanvasForExport=!1;(function(){try{var g=document.createElement("canvas"),p=new Image;p.onload=function(){try{g.getContext("2d").drawImage(p,0,0);var C=g.toDataURL("image/png");Editor.useCanvasForExport=null!=C&&6<C.length}catch(I){}};p.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(C){}})();
+Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var g=document.createElement("canvas");g.width=g.height=1;var p=g.toDataURL("image/jpeg");Editor.jpgSupported=null!==p.match("image/jpeg");p=g.toDataURL("image/webp");Editor.webpSupported=null!==p.match("image/webp")}catch(C){}})();Editor.loadCompatibleCss=function(g){mxUtils.lightDarkColorSupported||mxUtils.get(g||"styles/grapheditor.css",mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var C=document.createElement("style");
+C.type="text/css";var I=C.appendChild,M=document,O=M.createTextNode;p=p.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(p=p.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(Q){}I.call(C,O.call(M,p));document.head.appendChild(C)}}))};Editor.createRoughCanvas=function(g){var p=
+rough.canvas({getContext:function(){return g}});p.draw=function(C){var I=C.sets||[];C=C.options||this.getDefaultOptions();for(var M=0;M<I.length;M++){var O=I[M];switch(O.type){case "path":null!=C.stroke&&this._drawToContext(g,O,C);break;case "fillPath":this._drawToContext(g,O,C);break;case "fillSketch":this.fillSketch(g,O,C)}}};p.fillSketch=function(C,I,M){var O=g.state.strokeColor,Q=g.state.strokeWidth,U=g.state.strokeAlpha,V=g.state.dashed,X=M.fillWeight;0>X&&(X=M.strokeWidth/2);g.setStrokeAlpha(g.state.fillAlpha);
+g.setStrokeColor(M.fill||"");g.setStrokeWidth(X);g.setDashed(!1);this._drawToContext(C,I,M);g.setDashed(V);g.setStrokeWidth(Q);g.setStrokeColor(O);g.setStrokeAlpha(U)};p._drawToContext=function(C,I,M){C.begin();for(var O=0;O<I.ops.length;O++){var Q=I.ops[O],U=Q.data;switch(Q.op){case "move":C.moveTo(U[0],U[1]);break;case "bcurveTo":C.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":C.lineTo(U[0],U[1])}}C.end();"fillPath"===I.type&&M.filled?C.fill():C.stroke()};return p};(function(){function g(O,
Q,U){this.canvas=O;this.rc=Q;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,g.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,g.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,g.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,g.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;
this.canvas.ellipse=mxUtils.bind(this,g.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=
mxUtils.bind(this,g.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,g.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,g.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,g.prototype.fillAndStroke);this.path=[];this.passThrough=!1}g.prototype.moveOp="M";g.prototype.lineOp=
@@ -12590,83 +12592,83 @@ V.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disabl
"fillWeight",-1);U.fillWeight="auto"==Q?-1:Q;Q=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==Q&&(Q="auto");"auto"==Q&&(Q=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&Q.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&Q.push(mxUtils.hex2rgb(Editor.darkColor)),Q=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(Q,mxUtils.hex2rgb(U.fill)))?"solid":V.fillStyle);U.fillStyle=Q;return U};g.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
arguments):this.path=[]};g.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};g.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};g.prototype.lineTo=function(O,Q){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
O,Q),this.lastX=O,this.lastY=Q)};g.prototype.moveTo=function(O,Q){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,Q),this.lastX=O,this.lastY=Q,this.firstX=O,this.firstY=Q)};g.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};g.prototype.quadTo=function(O,Q,U,V){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,Q,U,V),this.lastX=U,this.lastY=V)};
-g.prototype.curveTo=function(O,Q,U,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,Q,U,V,X,W),this.lastX=X,this.lastY=W)};g.prototype.arcTo=function(O,Q,U,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,O,Q,U,V,X,W,Y);if(null!=Z)for(var ba=0;ba<Z.length;ba+=6)this.curveTo(Z[ba],Z[ba+1],Z[ba+2],Z[ba+3],Z[ba+4],Z[ba+5]);this.lastX=W;this.lastY=Y}};g.prototype.rect=function(O,
+g.prototype.curveTo=function(O,Q,U,V,X,W){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,Q,U,V,X,W),this.lastX=X,this.lastY=W)};g.prototype.arcTo=function(O,Q,U,V,X,W,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,O,Q,U,V,X,W,Y);if(null!=Z)for(var aa=0;aa<Z.length;aa+=6)this.curveTo(Z[aa],Z[aa+1],Z[aa+2],Z[aa+3],Z[aa+4],Z[aa+5]);this.lastX=W;this.lastY=Y}};g.prototype.rect=function(O,
Q,U,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,Q,U,V,this.getStyle(!0,!0)))};g.prototype.ellipse=function(O,Q,U,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,Q+V/2,U,V,this.getStyle(!0,!0)))};g.prototype.roundrect=function(O,Q,U,V,X,W){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+
X,Q),this.lineTo(O+U-X,Q),this.quadTo(O+U,Q,O+U,Q+W),this.lineTo(O+U,Q+V-W),this.quadTo(O+U,Q+V,O+U-X,Q+V),this.lineTo(O+X,Q+V),this.quadTo(O,Q+V,O,Q+V-W),this.lineTo(O,Q+W),this.quadTo(O,Q,O+X,Q))};g.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var Q in O)this.nextShape.options[Q]=O[Q];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;
O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};g.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};g.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};g.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!0))};g.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;
-this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new g(O,Editor.createRoughCanvas(O),this)};var n=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?n.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(O):
+this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new g(O,Editor.createRoughCanvas(O),this)};var p=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?p.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(O):
this.createRoughCanvas(O)};var C=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,Q,U,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||C.apply(this,arguments)};var I=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var Q=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==g&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=
-this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};U||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;I.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();U&&null!=V&&(O.addTolerance=function(){})}I.apply(this,arguments);O.addTolerance=Q};var N=mxShape.prototype.paintGlassEffect;
-mxShape.prototype.paintGlassEffect=function(O,Q,U,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==g?(O.handJiggle.passThrough=!0,N.apply(this,arguments),O.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),{to:"string"})};
-Editor.extractGraphModel=function(g,n,C){if(null!=g&&"undefined"!==typeof pako){var I=g.ownerDocument.getElementsByTagName("div"),N=[];if(null!=I&&0<I.length)for(var O=0;O<I.length;O++)if("mxgraph"==I[O].getAttribute("class")){N.push(I[O]);break}0<N.length&&(I=N[0].getAttribute("data-mxgraph"),null!=I?(N=JSON.parse(I),null!=N&&null!=N.xml&&(g=mxUtils.parseXml(N.xml),g=g.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(I=mxUtils.getTextContent(N[0]),I=Graph.decompress(I,null,C),0<
-I.length&&(g=mxUtils.parseXml(I),g=g.documentElement))))}if(null!=g&&"svg"==g.nodeName)if(I=g.getAttribute("content"),null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)g=mxUtils.parseXml(I).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==g||n||(N=null,"diagram"==g.nodeName?N=g:"mxfile"==g.nodeName&&(I=g.getElementsByTagName("diagram"),0<I.length&&
-(N=I[Math.max(0,Math.min(I.length-1,urlParams.page||0))])),null!=N&&(g=Editor.parseDiagramNode(N,C)));null==g||"mxGraphModel"==g.nodeName||n&&"mxfile"==g.nodeName||(g=null);return g};Editor.parseDiagramNode=function(g,n,C){Editor.validateDiagramNode(g);var I=mxUtils.trim(mxUtils.getTextContent(g)),N=null;0<I.length?(n=Graph.decompress(I,null,n),null!=n&&0<n.length&&(N=mxUtils.parseXml(n).documentElement)):(g=mxUtils.getChildNodes(g),0<g.length&&(N=g[0],C&&(N=Editor.parseDiagramNode(N,n,!1)),n=mxUtils.createXmlDocument(),
-n.appendChild(n.importNode(N,!0)),N=n.documentElement));return N};Editor.getDiagramNodeXml=function(g){Editor.validateDiagramNode(g);var n=mxUtils.getNodeValue(g),C=null;0<n.length?C=Graph.decompress(n):(g=g.getElementsByTagName("mxGraphModel"),null!=g&&0<g.length&&(C=mxUtils.getXml(g[0])));return C};Editor.validateDiagramNode=function(g){if(0==mxUtils.trim(mxUtils.getTextContent(g)).length&&0==mxUtils.getChildNodes(g).length){var n=new mxCodec,C=new mxGraphModel;g.appendChild(n.encode(C))}return g};
-Editor.extractGraphModelFromPdf=function(g){var n=null;g=g.substring(g.indexOf(",")+1);g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);if("%PDF-1.7"==g.substring(0,8)){var C=g.indexOf("EmbeddedFile");if(-1<C){var I=g.indexOf("stream",C)+9;if(0<g.substring(C,I).indexOf("application#2Fvnd.jgraph.mxfile")){var N=g.indexOf("endstream",I-1);return pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(I,N)),{to:"string"})}}for(C=g.indexOf("/ObjStm");0<C;){I=g.indexOf("stream",C)+9;N=g.indexOf("endstream",
-I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(I,N)),{to:"string"});N=I.indexOf("/Subject <");if(0<N){C=I.substring(N+14,I.indexOf(">",N));if(null!=C){n=C;C=[];for(I=0;I<n.length;I+=2)N=n.substr(I,2),"00"!=N&&C.push(String.fromCharCode(parseInt(N,16)));n=C.join("")}break}C=g.indexOf("/ObjStm",C+1)}}if(null==n&&"%PDF-1.4"==g.substring(0,8)){C="";N=I=0;for(var O=[],Q=null;N<g.length;){var U=g.charCodeAt(N);N+=1;10!=U&&(C+=String.fromCharCode(U));U=="/Subject (%3Cmxfile".charCodeAt(I)?
-I++:I=0;if(19==I){var V=g.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(V>N){n=g.substring(N,V);break}}10==U&&("endobj"==C?Q=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(Q=[],O[C.split(" ")[0]]=Q):null!=Q&&Q.push(C),C="")}}null==n&&null!=O&&(n=Editor.extractGraphModelFromXref(O));null!=n&&(n=decodeURIComponent(n.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return n};Editor.extractGraphModelFromXref=function(g){var n=g.trailer,C=null;null!=n&&(n=/.* \/Info (\d+) (\d+) R/g.exec(n.join("\n")),
-null!=n&&0<n.length&&(n=g[n[1]],null!=n&&(n=/.* \/Subject (\d+) (\d+) R/g.exec(n.join("\n")),null!=n&&0<n.length&&(g=g[n[1]],null!=g&&(g=g.join("\n"),C=g.substring(1,g.length-1))))));return C};Editor.extractParserError=function(g,n){var C=null;g=null!=g?g.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(C=n||mxResources.get("invalidChars"),n=g[0].getElementsByTagName("div"),0<n.length&&(C=mxUtils.getTextContent(n[0])));return null!=C?mxUtils.trim(C):C};Editor.addRetryToError=function(g,
-n){null!=g&&(g=null!=g.error?g.error:g,null==g.retry&&(g.retry=n))};Editor.mermaidToDrawio=function(g,n,C){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(g,n,C)};Editor.configure=function(g){if(null!=g){Editor.config=g;Editor.configVersion=g.version;g.debug&&(urlParams.test="1");if(null!=g.customCss){var n=document.createElement("style");n.type="text/css";n.appendChild(document.createTextNode(g.customCss));document.head.appendChild(n)}null!=g.defaultFonts&&(Menus.prototype.defaultFonts=
+this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};U||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;I.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();U&&null!=V&&(O.addTolerance=function(){})}I.apply(this,arguments);O.addTolerance=Q};var M=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(O,Q,U,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==g?(O.handJiggle.passThrough=!0,M.apply(this,arguments),O.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),{to:"string"})};
+Editor.extractGraphModel=function(g,p,C){if(null!=g&&"undefined"!==typeof pako){var I=g.ownerDocument.getElementsByTagName("div"),M=[];if(null!=I&&0<I.length)for(var O=0;O<I.length;O++)if("mxgraph"==I[O].getAttribute("class")){M.push(I[O]);break}0<M.length&&(I=M[0].getAttribute("data-mxgraph"),null!=I?(M=JSON.parse(I),null!=M&&null!=M.xml&&(g=mxUtils.parseXml(M.xml),g=g.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(I=mxUtils.getTextContent(M[0]),I=Graph.decompress(I,null,C),0<
+I.length&&(g=mxUtils.parseXml(I),g=g.documentElement))))}if(null!=g&&"svg"==g.nodeName)if(I=g.getAttribute("content"),null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)g=mxUtils.parseXml(I).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==g||p||(M=null,"diagram"==g.nodeName?M=g:"mxfile"==g.nodeName&&(I=g.getElementsByTagName("diagram"),0<I.length&&
+(M=I[Math.max(0,Math.min(I.length-1,urlParams.page||0))])),null!=M&&(g=Editor.parseDiagramNode(M,C)));null==g||"mxGraphModel"==g.nodeName||p&&"mxfile"==g.nodeName||(g=null);return g};Editor.parseDiagramNode=function(g,p,C){Editor.validateDiagramNode(g);var I=mxUtils.trim(mxUtils.getTextContent(g)),M=null;0<I.length?(p=Graph.decompress(I,null,p),null!=p&&0<p.length&&(M=mxUtils.parseXml(p).documentElement)):(g=mxUtils.getChildNodes(g),0<g.length&&(M=g[0],C&&(M=Editor.parseDiagramNode(M,p,!1)),p=mxUtils.createXmlDocument(),
+p.appendChild(p.importNode(M,!0)),M=p.documentElement));return M};Editor.getDiagramNodeXml=function(g){Editor.validateDiagramNode(g);var p=mxUtils.getNodeValue(g),C=null;0<p.length?C=Graph.decompress(p):(g=g.getElementsByTagName("mxGraphModel"),null!=g&&0<g.length&&(C=mxUtils.getXml(g[0])));return C};Editor.validateDiagramNode=function(g){if(0==mxUtils.trim(mxUtils.getTextContent(g)).length&&0==mxUtils.getChildNodes(g).length){var p=new mxCodec,C=new mxGraphModel;g.appendChild(p.encode(C))}return g};
+Editor.extractGraphModelFromPdf=function(g){var p=null;g=g.substring(g.indexOf(",")+1);g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);if("%PDF-1.7"==g.substring(0,8)){var C=g.indexOf("EmbeddedFile");if(-1<C){var I=g.indexOf("stream",C)+9;if(0<g.substring(C,I).indexOf("application#2Fvnd.jgraph.mxfile")){var M=g.indexOf("endstream",I-1);return pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(I,M)),{to:"string"})}}for(C=g.indexOf("/ObjStm");0<C;){I=g.indexOf("stream",C)+9;M=g.indexOf("endstream",
+I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(I,M)),{to:"string"});M=I.indexOf("/Subject <");if(0<M){C=I.substring(M+14,I.indexOf(">",M));if(null!=C){p=C;C=[];for(I=0;I<p.length;I+=2)M=p.substr(I,2),"00"!=M&&C.push(String.fromCharCode(parseInt(M,16)));p=C.join("")}break}C=g.indexOf("/ObjStm",C+1)}}if(null==p&&"%PDF-1.4"==g.substring(0,8)){C="";M=I=0;for(var O=[],Q=null;M<g.length;){var U=g.charCodeAt(M);M+=1;10!=U&&(C+=String.fromCharCode(U));U=="/Subject (%3Cmxfile".charCodeAt(I)?
+I++:I=0;if(19==I){var V=g.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(V>M){p=g.substring(M,V);break}}10==U&&("endobj"==C?Q=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(Q=[],O[C.split(" ")[0]]=Q):null!=Q&&Q.push(C),C="")}}null==p&&null!=O&&(p=Editor.extractGraphModelFromXref(O));null!=p&&(p=decodeURIComponent(p.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return p};Editor.extractGraphModelFromXref=function(g){var p=g.trailer,C=null;null!=p&&(p=/.* \/Info (\d+) (\d+) R/g.exec(p.join("\n")),
+null!=p&&0<p.length&&(p=g[p[1]],null!=p&&(p=/.* \/Subject (\d+) (\d+) R/g.exec(p.join("\n")),null!=p&&0<p.length&&(g=g[p[1]],null!=g&&(g=g.join("\n"),C=g.substring(1,g.length-1))))));return C};Editor.extractParserError=function(g,p){var C=null;g=null!=g?g.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(C=p||mxResources.get("invalidChars"),p=g[0].getElementsByTagName("div"),0<p.length&&(C=mxUtils.getTextContent(p[0])));return null!=C?mxUtils.trim(C):C};Editor.addRetryToError=function(g,
+p){null!=g&&(g=null!=g.error?g.error:g,null==g.retry&&(g.retry=p))};Editor.mermaidToDrawio=function(g,p,C){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(g,p,C)};Editor.configure=function(g){if(null!=g){Editor.config=g;Editor.configVersion=g.version;g.debug&&(urlParams.test="1");if(null!=g.customCss){var p=document.createElement("style");p.type="text/css";p.appendChild(document.createTextNode(g.customCss));document.head.appendChild(p)}null!=g.defaultFonts&&(Menus.prototype.defaultFonts=
g.defaultFonts);null!=g.presetColors&&(ColorDialog.prototype.presetColors=g.presetColors);null!=g.defaultColors&&(ColorDialog.prototype.defaultColors=g.defaultColors);null!=g.colorNames&&(ColorDialog.prototype.colorNames=g.colorNames);null!=g.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=g.defaultColorSchemes);null!=g.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=g.defaultEdgeLength);null!=g.selectParentLayer&&(Graph.selectParentLayer=g.selectParentLayer);null!=g.autosaveDelay&&
(DrawioFile.prototype.autosaveDelay=g.autosaveDelay);null!=g.templateFile&&(EditorUi.templateFile=g.templateFile);null!=g.styles&&(Array.isArray(g.styles)?Editor.styles=g.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=g.globalVars&&(Editor.globalVars=g.globalVars);null!=g.compressXml&&(Editor.defaultCompressed=g.compressXml,Editor.compressXml=g.compressXml);null!=g.includeDiagram&&(Editor.defaultIncludeDiagram=g.includeDiagram);null!=g.simpleLabels&&(Editor.simpleLabels=
g.simpleLabels);null!=g.pasteAtMousePointer&&(Editor.pasteAtMousePointer=g.pasteAtMousePointer);null!=g.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=g.oneDriveInlinePicker);null!=g.defaultAdaptiveColors?Graph.defaultAdaptiveColors=g.defaultAdaptiveColors:0==g.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=g.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=g.enableLightDarkColors);null!=g.darkColor&&(Editor.darkColor=g.darkColor);null!=g.darkColorVar&&(Editor.darkColorVar=
g.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=g.settingsName&&(Editor.configurationKey="."+g.settingsName+"-configuration",Editor.settingsKey="."+g.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=g.customFonts&&(Menus.prototype.defaultFonts=g.customFonts.concat(Menus.prototype.defaultFonts));null!=g.customPresetColors&&
-(ColorDialog.prototype.presetColors=g.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=g.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=g.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=g.css){n=document.createElement("style");n.setAttribute("type","text/css");n.appendChild(document.createTextNode(g.css));var C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(n,C)}null!=g.expandLibraries&&(Sidebar.prototype.expandLibraries=
+(ColorDialog.prototype.presetColors=g.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=g.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=g.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=g.css){p=document.createElement("style");p.setAttribute("type","text/css");p.appendChild(document.createTextNode(g.css));var C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(p,C)}null!=g.expandLibraries&&(Sidebar.prototype.expandLibraries=
g.expandLibraries);null!=g.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=g.appendCustomLibraries);null!=g.libraries&&(Sidebar.prototype.customEntries=g.libraries);null!=g.enabledLibraries&&(Array.isArray(g.enabledLibraries)?Sidebar.prototype.enabledLibraries=g.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=g.defaultLibraries&&(Sidebar.prototype.defaultEntries=g.defaultLibraries);null!=g.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
g.defaultCustomLibraries);null!=g.enableCustomLibraries&&(Editor.enableCustomLibraries=g.enableCustomLibraries);null!=g.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=g.defaultVertexStyle);null!=g.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=g.defaultEdgeStyle);null!=g.defaultPageVisible&&(Graph.prototype.defaultPageVisible=g.defaultPageVisible);null!=g.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=g.defaultGridEnabled);null!=g.zoomWheel&&(Graph.zoomWheel=g.zoomWheel);null!=
-g.zoomFactor&&(n=parseFloat(g.zoomFactor),!isNaN(n)&&1<n?Graph.prototype.zoomFactor=n:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=g.defaultGridSize&&(n=parseInt(g.defaultGridSize),!isNaN(n)&&0<n?mxGraph.prototype.gridSize=n:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=g.gridSteps&&(n=parseInt(g.gridSteps),!isNaN(n)&&0<n?mxGraphView.prototype.gridSteps=n:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=g.pageFormat&&(n=parseInt(g.pageFormat.width),C=parseInt(g.pageFormat.height),!isNaN(n)&&0<n&&!isNaN(C)&&0<C?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,n,C),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=g.thumbWidth&&(Sidebar.prototype.thumbWidth=g.thumbWidth);null!=g.thumbHeight&&(Sidebar.prototype.thumbHeight=g.thumbHeight);null!=g.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-g.emptyLibraryXml);null!=g.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=g.emptyDiagramXml);null!=g.sidebarWidth&&(EditorUi.prototype.hsplitPosition=g.sidebarWidth);null!=g.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=g.updateDefaultStyle);null!=g.sidebarTitles&&(Sidebar.prototype.sidebarTitles=g.sidebarTitles);null!=g.sidebarTitleSize&&(n=parseInt(g.sidebarTitleSize),!isNaN(n)&&0<n?Sidebar.prototype.sidebarTitleSize=n:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
-null!=g.fontCss&&("string"===typeof g.fontCss?Editor.configureFontCss(g.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=g.autosaveDelay&&(n=parseInt(g.autosaveDelay),!isNaN(n)&&0<n?DrawioFile.prototype.autosaveDelay=n:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=g.maxImageBytes&&(EditorUi.prototype.maxImageBytes=g.maxImageBytes);null!=g.maxImageSize&&(EditorUi.prototype.maxImageSize=g.maxImageSize);null!=g.shareCursorPosition&&
+g.zoomFactor&&(p=parseFloat(g.zoomFactor),!isNaN(p)&&1<p?Graph.prototype.zoomFactor=p:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=g.defaultGridSize&&(p=parseInt(g.defaultGridSize),!isNaN(p)&&0<p?mxGraph.prototype.gridSize=p:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=g.gridSteps&&(p=parseInt(g.gridSteps),!isNaN(p)&&0<p?mxGraphView.prototype.gridSteps=p:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=g.pageFormat&&(p=parseInt(g.pageFormat.width),C=parseInt(g.pageFormat.height),!isNaN(p)&&0<p&&!isNaN(C)&&0<C?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,p,C),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=g.thumbWidth&&(Sidebar.prototype.thumbWidth=g.thumbWidth);null!=g.thumbHeight&&(Sidebar.prototype.thumbHeight=g.thumbHeight);null!=g.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+g.emptyLibraryXml);null!=g.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=g.emptyDiagramXml);null!=g.sidebarWidth&&(EditorUi.prototype.hsplitPosition=g.sidebarWidth);null!=g.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=g.updateDefaultStyle);null!=g.sidebarTitles&&(Sidebar.prototype.sidebarTitles=g.sidebarTitles);null!=g.sidebarTitleSize&&(p=parseInt(g.sidebarTitleSize),!isNaN(p)&&0<p?Sidebar.prototype.sidebarTitleSize=p:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
+null!=g.fontCss&&("string"===typeof g.fontCss?Editor.configureFontCss(g.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=g.autosaveDelay&&(p=parseInt(g.autosaveDelay),!isNaN(p)&&0<p?DrawioFile.prototype.autosaveDelay=p:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=g.maxImageBytes&&(EditorUi.prototype.maxImageBytes=g.maxImageBytes);null!=g.maxImageSize&&(EditorUi.prototype.maxImageSize=g.maxImageSize);null!=g.shareCursorPosition&&
(EditorUi.prototype.shareCursorPosition=g.shareCursorPosition);null!=g.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=g.showRemoteCursors);null!=g.restrictExport&&(DrawioFile.RESTRICT_EXPORT=g.restrictExport);null!=g.replaceSvgDataUris&&(Editor.replaceSvgDataUris=g.replaceSvgDataUris);null!=g.foreignObjectImages&&(Editor.foreignObjectImages=g.foreignObjectImages);null!=g.shadowColor&&(mxConstants.SHADOW_COLOR=g.shadowColor);null!=g.shadowOpacity&&(mxConstants.SHADOW_OPACITY=g.shadowOpacity);
null!=g.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=g.shadowOffsetX);null!=g.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=g.shadowOffsetY);null!=g.shadowBlur&&(mxConstants.SHADOW_BLUR=g.shadowBlur);null!=g.enableAnimations&&(Editor.enableAnimations=g.enableAnimations);null!=g.enableChatGpt&&(Editor.enableChatGpt=g.enableChatGpt);null!=g.gptApiKey&&(Editor.gptApiKey=g.gptApiKey);null!=g.gptModel&&(Editor.gptModel=g.gptModel);null!=g.gptUrl&&(Editor.gptUrl=g.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(g){if(null!=g){Editor.prototype.fontCss=g;var n=document.getElementsByTagName("script")[0];if(null!=n&&null!=n.parentNode){var C=document.createElement("style");C.setAttribute("type","text/css");C.appendChild(document.createTextNode(g));n.parentNode.insertBefore(C,n);g=g.split("url(");for(C=1;C<g.length;C++){var I=g[C].indexOf(")");I=Editor.trimCssUrl(g[C].substring(0,I));var N=document.createElement("link");
-N.setAttribute("rel","preload");N.setAttribute("href",I);N.setAttribute("as","font");N.setAttribute("crossorigin","");n.parentNode.insertBefore(N,n)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
-20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var n=[],C=0;C<g;C++)n.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return n.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
+typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(g){if(null!=g){Editor.prototype.fontCss=g;var p=document.getElementsByTagName("script")[0];if(null!=p&&null!=p.parentNode){var C=document.createElement("style");C.setAttribute("type","text/css");C.appendChild(document.createTextNode(g));p.parentNode.insertBefore(C,p);g=g.split("url(");for(C=1;C<g.length;C++){var I=g[C].indexOf(")");I=Editor.trimCssUrl(g[C].substring(0,I));var M=document.createElement("link");
+M.setAttribute("rel","preload");M.setAttribute("href",I);M.setAttribute("as","font");M.setAttribute("crossorigin","");p.parentNode.insertBefore(M,p)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
+20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var p=[],C=0;C<g;C++)p.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return p.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;
-Editor.prototype.setGraphXml=function(g){g=null!=g&&"mxlibrary"!=g.nodeName?this.extractGraphModel(g):null;if(null!=g){var n=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(n)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[g],"cause",[n]),Error(mxResources.get("notADiagramFile")+" ("+n+")");if("mxGraphModel"==g.nodeName){n=g.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=n&&""!=n)n!=this.graph.currentStyle&&(C=null!=this.graph.themes?
-this.graph.themes[n]:mxUtils.load(STYLE_PATH+"/"+n+".xml").getDocumentElement(),null!=C&&(I=new mxCodec(C.ownerDocument),I.decode(C,this.graph.getStylesheet())));else{var C=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=C){var I=new mxCodec(C.ownerDocument);I.decode(C,this.graph.getStylesheet())}}this.graph.currentStyle=n;this.graph.mathEnabled="1"==urlParams.math||"1"==g.getAttribute("math");this.graph.setAdaptiveColors(g.getAttribute("adaptiveColors"));
-n=g.getAttribute("backgroundImage");null!=n?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(n)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==g.getAttribute("shadow"),!1);if(n=g.getAttribute("extFonts"))try{for(n=n.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),C=0;C<n.length;C++)this.graph.addExtFont(n[C].name,
-n[C].url)}catch(N){console.log("ExtFonts format error: "+N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var l=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(g,n){g=null!=g?g:!0;var C=l.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&C.setAttribute("style",
-this.graph.currentStyle);var I=this.graph.getBackgroundImageObject(this.graph.backgroundImage,n);null!=I&&C.setAttribute("backgroundImage",JSON.stringify(I));C.setAttribute("math",this.graph.mathEnabled?"1":"0");C.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?C.setAttribute("adaptiveColors",this.graph.adaptiveColors):C.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(I=this.graph.extFonts.map(function(N){return N.name+
-"^"+N.url}),C.setAttribute("extFonts",I.join("|")));return C};Editor.prototype.isDataSvg=function(g){try{var n=mxUtils.parseXml(g).documentElement.getAttribute("content");if(null!=n&&(null!=n&&"<"!=n.charAt(0)&&"%"!=n.charAt(0)&&(n=unescape(window.atob?atob(n):Base64.decode(cont,n))),null!=n&&"%"==n.charAt(0)&&(n=decodeURIComponent(n)),null!=n&&0<n.length)){var C=mxUtils.parseXml(n).documentElement;return"mxfile"==C.nodeName||"mxGraphModel"==C.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=
-function(g,n,C){return Editor.extractGraphModel.apply(this,arguments)};var p=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();p.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(g,n){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var C=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};g=null!=g?g:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=
-function(Q){try{null==I?(MathJax.typesetClear([Q]),MathJax.typeset([Q]),C()):I!=Q&&Editor.mathJaxQueue.push(Q)}catch(U){MathJax.typesetClear([Q]),null!=U.retry?(I=Q,U.retry.then(function(){MathJax.typesetPromise([Q]).then(C)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());C()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());C()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=n?n:
+Editor.prototype.setGraphXml=function(g){g=null!=g&&"mxlibrary"!=g.nodeName?this.extractGraphModel(g):null;if(null!=g){var p=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(p)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[g],"cause",[p]),Error(mxResources.get("notADiagramFile")+" ("+p+")");if("mxGraphModel"==g.nodeName){p=g.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=p&&""!=p)p!=this.graph.currentStyle&&(C=null!=this.graph.themes?
+this.graph.themes[p]:mxUtils.load(STYLE_PATH+"/"+p+".xml").getDocumentElement(),null!=C&&(I=new mxCodec(C.ownerDocument),I.decode(C,this.graph.getStylesheet())));else{var C=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=C){var I=new mxCodec(C.ownerDocument);I.decode(C,this.graph.getStylesheet())}}this.graph.currentStyle=p;this.graph.mathEnabled="1"==urlParams.math||"1"==g.getAttribute("math");this.graph.setAdaptiveColors(g.getAttribute("adaptiveColors"));
+p=g.getAttribute("backgroundImage");null!=p?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(p)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==g.getAttribute("shadow"),!1);if(p=g.getAttribute("extFonts"))try{for(p=p.split("|").map(function(M){M=M.split("^");return{name:M[0],url:M[1]}}),C=0;C<p.length;C++)this.graph.addExtFont(p[C].name,
+p[C].url)}catch(M){console.log("ExtFonts format error: "+M.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var k=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(g,p){g=null!=g?g:!0;var C=k.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&C.setAttribute("style",
+this.graph.currentStyle);var I=this.graph.getBackgroundImageObject(this.graph.backgroundImage,p);null!=I&&C.setAttribute("backgroundImage",JSON.stringify(I));C.setAttribute("math",this.graph.mathEnabled?"1":"0");C.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?C.setAttribute("adaptiveColors",this.graph.adaptiveColors):C.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(I=this.graph.extFonts.map(function(M){return M.name+
+"^"+M.url}),C.setAttribute("extFonts",I.join("|")));return C};Editor.prototype.isDataSvg=function(g){try{var p=mxUtils.parseXml(g).documentElement.getAttribute("content");if(null!=p&&(null!=p&&"<"!=p.charAt(0)&&"%"!=p.charAt(0)&&(p=unescape(window.atob?atob(p):Base64.decode(cont,p))),null!=p&&"%"==p.charAt(0)&&(p=decodeURIComponent(p)),null!=p&&0<p.length)){var C=mxUtils.parseXml(p).documentElement;return"mxfile"==C.nodeName||"mxGraphModel"==C.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=
+function(g,p,C){return Editor.extractGraphModel.apply(this,arguments)};var n=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();n.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
+function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(g,p){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var C=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};g=null!=g?g:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=
+function(Q){try{null==I?(MathJax.typesetClear([Q]),MathJax.typeset([Q]),C()):I!=Q&&Editor.mathJaxQueue.push(Q)}catch(U){MathJax.typesetClear([Q]),null!=U.retry?(I=Q,U.retry.then(function(){MathJax.typesetPromise([Q]).then(C)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());C()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());C()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=p?p:
{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var Q=0;Q<Editor.mathJaxQueue.length;Q++)Editor.doMathJaxRender(Editor.mathJaxQueue[Q])}}};Editor.MathJaxRender=function(Q){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Q):Editor.mathJaxQueue.push(Q)};Editor.onMathJaxDone=function(){};
-var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,arguments);var Q=mxUtils.bind(this,function(U,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Q);this.graph.addListener(mxEvent.REFRESH,Q)};n=document.getElementsByTagName("script");if(null!=n&&0<n.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",g);n[0].parentNode.appendChild(O)}}};
-Editor.prototype.csvToArray=function(g){if(0<g.length){var n="",C=[""],I=0,N=!0,O;g=$jscomp.makeIterator(g);for(O=g.next();!O.done;O=g.next())O=O.value,'"'===O?(N&&O===n&&(C[I]+=O),N=!N):","===O&&N?O=C[++I]="":C[I]+=O,n=O;return C}return[]};Editor.prototype.getProxiedUrl=function(g){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(g)){var n=EditorUi.isVisioFilename(g);n=/\.png$/i.test(g)||/\.pdf$/i.test(g)||n;var C=
-"t="+(new Date).getTime();g=PROXY_URL+"?url="+encodeURIComponent(g)+"&"+C+(n?"&base64=1":"")}return g};Editor.prototype.isCorsEnabledForUrl=function(g){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||g.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(g)||"https://raw.githubusercontent.com/"===g.substring(0,34)||
-"https://fonts.googleapis.com/"===g.substring(0,29)||"https://fonts.gstatic.com/"===g.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var g=new mxUrlConverter;g.updateBaseUrl();var n=g.convert,C=this;g.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,g.baseUrl.length)==g.baseUrl||C.crossOriginImages&&C.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=n.apply(this,arguments)):I=PROXY_URL+
-"?url="+encodeURIComponent(I));return I};return g};Editor.createSvgDataUri=function(g){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(g)))};Editor.prototype.convertImageToDataUri=function(g,n,C,I,N){try{var O=!0,Q=window.setTimeout(mxUtils.bind(this,function(){O=!1;n(g)}),this.timeout),U=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(g,n,C,I,!0):n(g)});if(/(\.svg)$/i.test(g)&&!N)mxUtils.get(g,mxUtils.bind(this,function(X){window.clearTimeout(Q);O&&(200>X.getStatus()||
-299<X.getStatus()?U():n(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Q);O&&U()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(Q);if(O)try{I=null!=I&&N?I:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(I,I);X.height=V.height*I;X.width=V.width*I;W.drawImage(V,0,0);n(X.toDataURL())}catch(Y){n(g)}};V.onerror=function(){window.clearTimeout(Q);O&&(null!=C?C():n(g))};V.src=
-g}}catch(X){null!=C?C():n(g)}};Editor.prototype.convertImages=function(g,n,C,I){function N(){0<O.length?O.shift()():n(g)}null==I&&(I=this.createImageUrlConverter());var O=[],Q=C||{};C=mxUtils.bind(this,function(U,V){U=g.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=I.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=Q[Y];null==Z?this.convertImageToDataUri(Y,function(ba){null!=ba&&(Q[Y]=
-ba,W.setAttribute(V,ba));N()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),N())}else null!=Y&&W.setAttribute(V,Y),N()}}catch(ba){N()}}))})(U[X])});C("image","xlink:href");C("img","src");N()};Editor.base64Encode=function(g){for(var n="",C=0,I=g.length,N,O,Q;C<I;){N=g.charCodeAt(C++)&255;if(C==I){n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);n+="==";break}O=g.charCodeAt(C++);
-if(C==I){n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(O&240)>>4);n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);n+="=";break}Q=g.charCodeAt(C++);n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(O&240)>>4);n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-15)<<2|(Q&192)>>6);n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q&63)}return n};Editor.prototype.loadUrl=function(g,n,C,I,N,O,Q,U){try{var V=!Q&&(I||/(\.png)($|\?)/i.test(g)||/(\.jpe?g)($|\?)/i.test(g)||/(\.gif)($|\?)/i.test(g)||/(\.pdf)($|\?)/i.test(g));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(g,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=n&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),
-n(W)):null!=C&&(0==W.getStatus()?C({message:mxResources.get("accessDenied")},W):404==W.getStatus()?C({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):C({message:this.getErrorMessage(W)},W))}),function(W){null!=C&&C({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){N&&null!=C&&C({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(W){null!=C&&C(W)}};Editor.prototype.getErrorMessage=function(g){var n=mxResources.get("error")+" "+g.getStatus();try{var C=g.getText(),
-I=JSON.parse(C);null!=I&&null!=I.error&&null!=I.error.message&&(n=I.error.message+" ("+n+")")}catch(N){}return n};Editor.prototype.absoluteCssFonts=function(g){var n=null;if(null!=g){var C=g.split("url(");if(0<C.length){n=[C[0]];g=window.location.pathname;var I=null!=g?g.lastIndexOf("/"):-1;0<=I&&(g=g.substring(0,I+1));I=document.getElementsByTagName("base");var N=null;null!=I&&0<I.length&&(N=I[0].getAttribute("href"));for(var O=1;O<C.length;O++)if(I=C[O].indexOf(")"),0<I){var Q=Editor.trimCssUrl(C[O].substring(0,
-I));this.graph.isRelativeUrl(Q)&&(Q=null!=N?N+Q:window.location.protocol+"//"+window.location.hostname+("/"==Q.charAt(0)?"":g)+Q);n.push('url("'+Q+'"'+C[O].substring(I))}else n.push(C[O])}else n=[g]}return null!=n?n.join(""):null};Editor.prototype.mapFontUrl=function(g,n,C){/^https?:\/\//.test(n)&&!this.isCorsEnabledForUrl(n)&&(n=PROXY_URL+"?url="+encodeURIComponent(n));C(g,n)};Editor.prototype.embedCssFonts=function(g,n){var C=g.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var N=
-mxUtils.bind(this,function(){if(0==I){for(var V=[C[0]],X=1;X<C.length;X++){var W=C[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(C[X].substring(0,W))]);V.push('"'+C[X].substring(W))}n(V.join(""))}});if(0<C.length){for(g=1;g<C.length;g++){var O=C[g].indexOf(")"),Q=null,U=C[g].indexOf("format(",O);0<U&&(Q=Editor.trimCssUrl(C[g].substring(U+7,C[g].indexOf(")",U))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;I++;var X="application/x-font-ttf";
+var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var Q=mxUtils.bind(this,function(U,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Q);this.graph.addListener(mxEvent.REFRESH,Q)};p=document.getElementsByTagName("script");if(null!=p&&0<p.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",g);p[0].parentNode.appendChild(O)}}};
+Editor.prototype.csvToArray=function(g){if(0<g.length){var p="",C=[""],I=0,M=!0,O;g=$jscomp.makeIterator(g);for(O=g.next();!O.done;O=g.next())O=O.value,'"'===O?(M&&O===p&&(C[I]+=O),M=!M):","===O&&M?O=C[++I]="":C[I]+=O,p=O;return C}return[]};Editor.prototype.getProxiedUrl=function(g){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(g)){var p=EditorUi.isVisioFilename(g);p=/\.png$/i.test(g)||/\.pdf$/i.test(g)||p;var C=
+"t="+(new Date).getTime();g=PROXY_URL+"?url="+encodeURIComponent(g)+"&"+C+(p?"&base64=1":"")}return g};Editor.prototype.isCorsEnabledForUrl=function(g){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||g.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(g)||"https://raw.githubusercontent.com/"===g.substring(0,34)||
+"https://fonts.googleapis.com/"===g.substring(0,29)||"https://fonts.gstatic.com/"===g.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var g=new mxUrlConverter;g.updateBaseUrl();var p=g.convert,C=this;g.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,g.baseUrl.length)==g.baseUrl||C.crossOriginImages&&C.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=p.apply(this,arguments)):I=PROXY_URL+
+"?url="+encodeURIComponent(I));return I};return g};Editor.createSvgDataUri=function(g){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(g)))};Editor.prototype.convertImageToDataUri=function(g,p,C,I,M){try{var O=!0,Q=window.setTimeout(mxUtils.bind(this,function(){O=!1;p(g)}),this.timeout),U=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(g,p,C,I,!0):p(g)});if(/(\.svg)$/i.test(g)&&!M)mxUtils.get(g,mxUtils.bind(this,function(X){window.clearTimeout(Q);O&&(200>X.getStatus()||
+299<X.getStatus()?U():p(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Q);O&&U()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(Q);if(O)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(I,I);X.height=V.height*I;X.width=V.width*I;W.drawImage(V,0,0);p(X.toDataURL())}catch(Y){p(g)}};V.onerror=function(){window.clearTimeout(Q);O&&(null!=C?C():p(g))};V.src=
+g}}catch(X){null!=C?C():p(g)}};Editor.prototype.convertImages=function(g,p,C,I){function M(){0<O.length?O.shift()():p(g)}null==I&&(I=this.createImageUrlConverter());var O=[],Q=C||{};C=mxUtils.bind(this,function(U,V){U=g.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=I.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=Q[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(Q[Y]=
+aa,W.setAttribute(V,aa));M()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),M())}else null!=Y&&W.setAttribute(V,Y),M()}}catch(aa){M()}}))})(U[X])});C("image","xlink:href");C("img","src");M()};Editor.base64Encode=function(g){for(var p="",C=0,I=g.length,M,O,Q;C<I;){M=g.charCodeAt(C++)&255;if(C==I){p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);p+="==";break}O=g.charCodeAt(C++);
+if(C==I){p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(O&240)>>4);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);p+="=";break}Q=g.charCodeAt(C++);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(O&240)>>4);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+15)<<2|(Q&192)>>6);p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q&63)}return p};Editor.prototype.loadUrl=function(g,p,C,I,M,O,Q,U){try{var V=!Q&&(I||/(\.png)($|\?)/i.test(g)||/(\.jpe?g)($|\?)/i.test(g)||/(\.gif)($|\?)/i.test(g)||/(\.pdf)($|\?)/i.test(g));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(g,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=p&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),
+p(W)):null!=C&&(0==W.getStatus()?C({message:mxResources.get("accessDenied")},W):404==W.getStatus()?C({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):C({message:this.getErrorMessage(W)},W))}),function(W){null!=C&&C({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){M&&null!=C&&C({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(W){null!=C&&C(W)}};Editor.prototype.getErrorMessage=function(g){var p=mxResources.get("error")+" "+g.getStatus();try{var C=g.getText(),
+I=JSON.parse(C);null!=I&&null!=I.error&&null!=I.error.message&&(p=I.error.message+" ("+p+")")}catch(M){}return p};Editor.prototype.absoluteCssFonts=function(g){var p=null;if(null!=g){var C=g.split("url(");if(0<C.length){p=[C[0]];g=window.location.pathname;var I=null!=g?g.lastIndexOf("/"):-1;0<=I&&(g=g.substring(0,I+1));I=document.getElementsByTagName("base");var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var O=1;O<C.length;O++)if(I=C[O].indexOf(")"),0<I){var Q=Editor.trimCssUrl(C[O].substring(0,
+I));this.graph.isRelativeUrl(Q)&&(Q=null!=M?M+Q:window.location.protocol+"//"+window.location.hostname+("/"==Q.charAt(0)?"":g)+Q);p.push('url("'+Q+'"'+C[O].substring(I))}else p.push(C[O])}else p=[g]}return null!=p?p.join(""):null};Editor.prototype.mapFontUrl=function(g,p,C){/^https?:\/\//.test(p)&&!this.isCorsEnabledForUrl(p)&&(p=PROXY_URL+"?url="+encodeURIComponent(p));C(g,p)};Editor.prototype.embedCssFonts=function(g,p){var C=g.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=
+mxUtils.bind(this,function(){if(0==I){for(var V=[C[0]],X=1;X<C.length;X++){var W=C[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(C[X].substring(0,W))]);V.push('"'+C[X].substring(W))}p(V.join(""))}});if(0<C.length){for(g=1;g<C.length;g++){var O=C[g].indexOf(")"),Q=null,U=C[g].indexOf("format(",O);0<U&&(Q=Editor.trimCssUrl(C[g].substring(U+7,C[g].indexOf(")",U))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;I++;var X="application/x-font-ttf";
if("svg"==Q||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==Q||"embedded-opentype"==Q||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==Q||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==Q||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==Q||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";else if("sfnt"==Q||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(W,Y){this.loadUrl(Y,
-mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;I--;N()}),mxUtils.bind(this,function(Z){I--;N()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(C[g].substring(0,O)),Q)}N()}else n(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(n){this.resolvedFontCss=n;null!=g&&g()})):null!=g&&g()};Editor.prototype.createGoogleFontCache=function(){var g={},n;for(n in Graph.fontMapping)Graph.isCssFontUrl(n)&&
-(g[n]=Graph.fontMapping[n]);return g};Editor.prototype.embedExtFonts=function(g){var n=this.graph.getCustomFonts();if(0<n.length){var C=[],I=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(C.join(""),g)}),O=0;O<n.length;O++)mxUtils.bind(this,function(Q,U){Graph.isCssFontUrl(U)?null==this.cachedGoogleFonts[U]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(V){this.cachedGoogleFonts[U]=
-V;C.push(V+"\n");I--;N()}),mxUtils.bind(this,function(V){I--;C.push("@import url("+U+");\n");N()}))):C.push(this.cachedGoogleFonts[U]+"\n"):C.push('@font-face {font-family: "'+Q+'";src: url("'+U+'")}\n')})(n[O].name,n[O].url);N()}else g()};Editor.prototype.addMathCss=function(g){g=g.getElementsByTagName("defs");if(null!=g&&0<g.length)for(var n=document.getElementsByTagName("style"),C=0;C<n.length;C++){var I=mxUtils.getTextContent(n[C]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&g[0].appendChild(n[C].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(g,n){n=null!=n?n:this.absoluteCssFonts(this.fontCss);if(null!=n){var C=mxUtils.getSvgDefs(g),I=n.split("\n");n=[];for(var N=[],O=0;O<I.length;O++)"@import"==I[O].substring(0,7)?n.push(I[O]):N.push(I[O]);g=g.ownerDocument;g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"style"):g.createElement("style");g.setAttribute("type","text/css");0<n.length&&(mxUtils.setTextContent(g,n.join("\n")),C.appendChild(g));0<N.length&&(g=g.cloneNode(!1),mxUtils.setTextContent(g,
-N.join("\n")),C.appendChild(g))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(g,n,C){var I=mxClient.IS_FF?8192:16384;return Math.min(C,Math.min(I/g,I/n))};Editor.prototype.exportToCanvas=function(g,n,C,I,N,O,Q,U,V,X,W,Y,Z,ba,ia,ea,da,ja){try{O=null!=O?O:!0;Q=null!=Q?Q:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var ma=V?null:Y.background;ma==mxConstants.NONE&&(ma=null);null==ma&&(ma=I);null==ma&&0==V&&
-(ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,ba,null,Q,null,null,null,X,null,ea,da,ja),mxUtils.bind(this,function(aa){try{aa.style.setProperty("-webkit-font-smoothing","antialiased");aa.style.setProperty("-moz-osx-font-smoothing","grayscale");var fa=new Image;fa.onload=mxUtils.bind(this,function(){try{var ca=function(){mxClient.IS_SF?window.setTimeout(function(){pa.drawImage(fa,0,0);g(va,aa)},0):(pa.drawImage(fa,0,0),g(va,aa))},va=document.createElement("canvas"),
-sa=parseInt(aa.getAttribute("width")),wa=parseInt(aa.getAttribute("height"));U=null!=U?U:1;null!=n&&(U=O?Math.min(1,Math.min(3*n/(4*wa),n/sa)):n/sa);U=this.getMaxCanvasScale(sa,wa,U);sa=Math.ceil(U*sa);wa=Math.ceil(U*wa);va.setAttribute("width",sa);va.setAttribute("height",wa);var pa=va.getContext("2d");if(null!=ma){var ka=mxUtils.getLightDarkColor(ma);pa.beginPath();pa.rect(0,0,sa,wa);pa.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ka.dark:ka.light;pa.fill()}1!=U&&pa.scale(U,U);if(ia){var na=
-Y.view,xa=na.scale;na.scale=1;var ta=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=xa;ta="data:image/svg+xml;base64,"+ta;var za=Y.gridSize*na.gridSteps*U,Ca=Y.getGraphBounds(),Ga=na.translate.x*xa,Aa=na.translate.y*xa,Da=Ga+(Ca.x-Ga)/xa-Z,Ka=Aa+(Ca.y-Aa)/xa-Z,Na=new Image;Na.onload=function(){try{for(var Ba=-Math.round(za-mxUtils.mod((Ga-Da)*U,za)),Ia=-Math.round(za-mxUtils.mod((Aa-Ka)*U,za));Ba<sa;Ba+=za)for(var Qa=Ia;Qa<wa;Qa+=za)pa.drawImage(Na,Ba/U,Qa/U);ca()}catch(La){null!=
-N&&N(La)}};Na.onerror=function(Ba){null!=N&&N(Ba)};Na.src=ta}else ca()}catch(Ba){null!=N&&N(Ba)}});fa.onerror=function(ca){null!=N&&N(ca)};X&&this.graph.addSvgShadow(aa);this.graph.mathEnabled&&this.addMathCss(aa);var la=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(aa,this.resolvedFontCss),fa.src=Editor.createSvgDataUri(mxUtils.getXml(aa))}catch(ca){null!=N&&N(ca)}});this.embedExtFonts(mxUtils.bind(this,function(ca){try{null!=ca&&this.addFontCss(aa,ca),this.loadFonts(la)}catch(va){null!=
-N&&N(va)}}))}catch(ca){null!=N&&N(ca)}}),C,W)}catch(aa){null!=N&&N(aa)}};Editor.crcTable=[];for(var x=0;256>x;x++)for(var z=x,y=0;8>y;y++)z=1==(z&1)?3988292384^z>>>1:z>>>1,Editor.crcTable[x]=z;Editor.updateCRC=function(g,n,C,I){for(var N=0;N<I;N++)g=Editor.crcTable[(g^n.charCodeAt(C+N))&255]^g>>>8;return g};Editor.crc32=function(g){for(var n=-1,C=0;C<g.length;C++)n=n>>>8^Editor.crcTable[(n^g.charCodeAt(C))&255];return(n^-1)>>>0};Editor.writeGraphModelToPng=function(g,n,C,I,N){function O(W,Y){var Z=
-V;V+=Y;return W.substring(Z,V)}function Q(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function U(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var V=0;if(O(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(O(g,4),"IHDR"!=O(g,4))null!=N&&N();else{O(g,17);N=g.substring(0,V);do{var X=Q(g);if("IDAT"==O(g,4)){N=g.substring(0,
-V-8);"pHYs"==n&&"dpi"==C?(C=Math.round(I/.0254),C=U(C)+U(C)+String.fromCharCode(1)):C=C+String.fromCharCode(0)+("zTXt"==n?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,n,0,4);I=Editor.updateCRC(I,C,0,C.length);N+=U(C.length)+n+C+U(I^4294967295);N+=g.substring(V-8,g.length);break}N+=g.substring(V-8,V-4+X);O(g,X);O(g,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
-var F=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,n){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var M=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){M.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(g,n){var C=null;null!=g.editor.graph.getModel().getParent(n)?C=n.getId():
+mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;I--;M()}),mxUtils.bind(this,function(Z){I--;M()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(C[g].substring(0,O)),Q)}M()}else p(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(p){this.resolvedFontCss=p;null!=g&&g()})):null!=g&&g()};Editor.prototype.createGoogleFontCache=function(){var g={},p;for(p in Graph.fontMapping)Graph.isCssFontUrl(p)&&
+(g[p]=Graph.fontMapping[p]);return g};Editor.prototype.embedExtFonts=function(g){var p=this.graph.getCustomFonts();if(0<p.length){var C=[],I=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(C.join(""),g)}),O=0;O<p.length;O++)mxUtils.bind(this,function(Q,U){Graph.isCssFontUrl(U)?null==this.cachedGoogleFonts[U]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(V){this.cachedGoogleFonts[U]=
+V;C.push(V+"\n");I--;M()}),mxUtils.bind(this,function(V){I--;C.push("@import url("+U+");\n");M()}))):C.push(this.cachedGoogleFonts[U]+"\n"):C.push('@font-face {font-family: "'+Q+'";src: url("'+U+'")}\n')})(p[O].name,p[O].url);M()}else g()};Editor.prototype.addMathCss=function(g){g=g.getElementsByTagName("defs");if(null!=g&&0<g.length)for(var p=document.getElementsByTagName("style"),C=0;C<p.length;C++){var I=mxUtils.getTextContent(p[C]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&g[0].appendChild(p[C].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(g,p){p=null!=p?p:this.absoluteCssFonts(this.fontCss);if(null!=p){var C=mxUtils.getSvgDefs(g),I=p.split("\n");p=[];for(var M=[],O=0;O<I.length;O++)"@import"==I[O].substring(0,7)?p.push(I[O]):M.push(I[O]);g=g.ownerDocument;g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"style"):g.createElement("style");g.setAttribute("type","text/css");0<p.length&&(mxUtils.setTextContent(g,p.join("\n")),C.appendChild(g));0<M.length&&(g=g.cloneNode(!1),mxUtils.setTextContent(g,
+M.join("\n")),C.appendChild(g))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(g,p,C){var I=mxClient.IS_FF?8192:16384;return Math.min(C,Math.min(I/g,I/p))};Editor.prototype.exportToCanvas=function(g,p,C,I,M,O,Q,U,V,X,W,Y,Z,aa,ha,ea,da,ia){try{O=null!=O?O:!0;Q=null!=Q?Q:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var la=V?null:Y.background;la==mxConstants.NONE&&(la=null);null==la&&(la=I);null==la&&0==V&&
+(la="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,Q,null,null,null,X,null,ea,da,ia),mxUtils.bind(this,function(ba){try{ba.style.setProperty("-webkit-font-smoothing","antialiased");ba.style.setProperty("-moz-osx-font-smoothing","grayscale");var fa=new Image;fa.onload=mxUtils.bind(this,function(){try{var ca=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(fa,0,0);g(sa,ba)},0):(wa.drawImage(fa,0,0),g(sa,ba))},sa=document.createElement("canvas"),
+pa=parseInt(ba.getAttribute("width")),ua=parseInt(ba.getAttribute("height"));U=null!=U?U:1;null!=p&&(U=O?Math.min(1,Math.min(3*p/(4*ua),p/pa)):p/pa);U=this.getMaxCanvasScale(pa,ua,U);pa=Math.ceil(U*pa);ua=Math.ceil(U*ua);sa.setAttribute("width",pa);sa.setAttribute("height",ua);var wa=sa.getContext("2d");if(null!=la){var ka=mxUtils.getLightDarkColor(la);wa.beginPath();wa.rect(0,0,pa,ua);wa.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ka.dark:ka.light;wa.fill()}1!=U&&wa.scale(U,U);if(ha){var na=
+Y.view,za=na.scale;na.scale=1;var ra=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=za;ra="data:image/svg+xml;base64,"+ra;var ya=Y.gridSize*na.gridSteps*U,Ca=Y.getGraphBounds(),Ha=na.translate.x*za,Ba=na.translate.y*za,Fa=Ha+(Ca.x-Ha)/za-Z,Pa=Ba+(Ca.y-Ba)/za-Z,Aa=new Image;Aa.onload=function(){try{for(var Da=-Math.round(ya-mxUtils.mod((Ha-Fa)*U,ya)),Ia=-Math.round(ya-mxUtils.mod((Ba-Pa)*U,ya));Da<pa;Da+=ya)for(var Oa=Ia;Oa<ua;Oa+=ya)wa.drawImage(Aa,Da/U,Oa/U);ca()}catch(Ga){null!=
+M&&M(Ga)}};Aa.onerror=function(Da){null!=M&&M(Da)};Aa.src=ra}else ca()}catch(Da){null!=M&&M(Da)}});fa.onerror=function(ca){null!=M&&M(ca)};X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var ja=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),fa.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(ca){null!=M&&M(ca)}});this.embedExtFonts(mxUtils.bind(this,function(ca){try{null!=ca&&this.addFontCss(ba,ca),this.loadFonts(ja)}catch(sa){null!=
+M&&M(sa)}}))}catch(ca){null!=M&&M(ca)}}),C,W)}catch(ba){null!=M&&M(ba)}};Editor.crcTable=[];for(var x=0;256>x;x++)for(var z=x,y=0;8>y;y++)z=1==(z&1)?3988292384^z>>>1:z>>>1,Editor.crcTable[x]=z;Editor.updateCRC=function(g,p,C,I){for(var M=0;M<I;M++)g=Editor.crcTable[(g^p.charCodeAt(C+M))&255]^g>>>8;return g};Editor.crc32=function(g){for(var p=-1,C=0;C<g.length;C++)p=p>>>8^Editor.crcTable[(p^g.charCodeAt(C))&255];return(p^-1)>>>0};Editor.writeGraphModelToPng=function(g,p,C,I,M){function O(W,Y){var Z=
+V;V+=Y;return W.substring(Z,V)}function Q(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function U(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var V=0;if(O(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(O(g,4),"IHDR"!=O(g,4))null!=M&&M();else{O(g,17);M=g.substring(0,V);do{var X=Q(g);if("IDAT"==O(g,4)){M=g.substring(0,
+V-8);"pHYs"==p&&"dpi"==C?(C=Math.round(I/.0254),C=U(C)+U(C)+String.fromCharCode(1)):C=C+String.fromCharCode(0)+("zTXt"==p?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,p,0,4);I=Editor.updateCRC(I,C,0,C.length);M+=U(C.length)+p+C+U(I^4294967295);M+=g.substring(V-8,g.length);break}M+=g.substring(V-8,V-4+X);O(g,X);O(g,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
+var F=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,p){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var N=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){N.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(g,p){var C=null;null!=g.editor.graph.getModel().getParent(p)?C=p.getId():
null!=g.currentPage&&(C=g.currentPage.getId());return C});if(null!=window.StyleFormatPanel){var K=Format.prototype.init;Format.prototype.init=function(){K.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(g){return"simple"==
-Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(g){g=c.apply(this,arguments);var n=this.editorUi,C=n.editor.graph;if(C.isEnabled()){var I=n.getCurrentFile();null!=I&&I.isAutosaveOptional()&&g.appendChild(this.createOption(mxResources.get("autosave"),function(){return n.editor.autosave},function(O){n.editor.setAutosave(O);n.editor.autosave&&I.isModified()&&I.fileChanged()},
-{install:function(O){this.listener=function(){O(n.editor.autosave)};n.editor.addListener("autosaveChanged",this.listener)},destroy:function(){n.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&C.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return C.mathEnabled},function(O){n.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(C.mathEnabled)};n.addListener("mathEnabledChanged",
-this.listener)},destroy:function(){n.removeListener(this.listener)}});g.appendChild(N);(!n.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&N.appendChild(n.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return g};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=
+Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(g){g=c.apply(this,arguments);var p=this.editorUi,C=p.editor.graph;if(C.isEnabled()){var I=p.getCurrentFile();null!=I&&I.isAutosaveOptional()&&g.appendChild(this.createOption(mxResources.get("autosave"),function(){return p.editor.autosave},function(O){p.editor.setAutosave(O);p.editor.autosave&&I.isModified()&&I.fileChanged()},
+{install:function(O){this.listener=function(){O(p.editor.autosave)};p.editor.addListener("autosaveChanged",this.listener)},destroy:function(){p.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&C.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return C.mathEnabled},function(O){p.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(C.mathEnabled)};p.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){p.removeListener(this.listener)}});g.appendChild(M);(!p.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&M.appendChild(p.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return g};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(g){return"0"==mxUtils.getValue(g.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
@@ -12690,90 +12692,90 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;var f=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var g=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=g.style.shape&&!g.containsLabel&&0<g.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);null!=g.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),g.customProperties,g))};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(g){var n=
-this.editorUi.getSelectionState();1==n.cells.length?this.addActions(g,["copyStyle","pasteStyle"]):1<=n.cells.length&&this.addActions(g,["pasteStyle","pasteData"]);k.apply(this,arguments);return g};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(g,n,C,I){function N(pa,ka,na,xa,ta){if(null!=na.valueChanged)na.valueChanged(ka,ta,C,Y);else{Z.getModel().beginUpdate();try{ta=[];var za=[];if(null!=na.index){for(var Ca=[],Ga=na.parentRow.nextSibling;Ga&&Ga.getAttribute("data-pName")==
-pa;)Ca.push(Ga.getAttribute("data-pValue")),Ga=Ga.nextSibling;na.index<Ca.length?null!=xa?Ca.splice(xa,1):Ca[na.index]=ka:Ca.push(ka);null!=na.size&&Ca.length>na.size&&(Ca=Ca.slice(0,na.size));ka=Ca.join(",");null!=na.countProperty&&(Z.setCellStyles(na.countProperty,Ca.length,Z.getSelectionCells()),ta.push(na.countProperty),za.push(Ca.length))}Z.setCellStyles(pa,ka,Z.getSelectionCells());ta.push(pa);za.push(ka);if(null!=na.dependentProps)for(pa=0;pa<na.dependentProps.length;pa++){var Aa=na.dependentPropsDefVal[pa],
-Da=na.dependentPropsVals[pa];if(Da.length>ka)Da=Da.slice(0,ka);else for(var Ka=Da.length;Ka<ka;Ka++)Da.push(Aa);Da=Da.join(",");Z.setCellStyles(na.dependentProps[pa],Da,Z.getSelectionCells());ta.push(na.dependentProps[pa]);za.push(Da)}if("function"==typeof na.onChange)na.onChange(Z,ka);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",za,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(pa,ka){ka.style.left="0px";ka.style.top="0px";ka.style.position=
-"relative";ka.style.right="0px";ka.style.bottom="0px";ka.style.width="100%";ka.style.maxWidth="100%";ka.style.maxHeight="100%";ka.style.textAlign="left"}function Q(pa,ka,na){function xa(za){if(null==za||za==mxConstants.NONE)ta.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==za)ta.style.background="";else{var Ca=mxUtils.getLightDarkColor(za);mxUtils.isLightDarkColor(za)&&Ca.light!=Ca.dark?ta.style.background="linear-gradient(to right bottom, "+Ca.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ca).cssText+
-" 50.3%)":ta.style.background=za}}var ta=document.createElement("div");ta.style.width="32px";ta.style.height="8px";ta.style.margin="2px";ta.style.borderStyle="solid";ta.style.borderWidth="1px";xa(ka);btn=mxUtils.button("",mxUtils.bind(Y,function(za){this.editorUi.pickColor(ka,function(Ca){N(pa,Ca,na);xa(Ca)});mxEvent.consume(za)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(ta);return btn}function U(pa,
-ka,na,xa,ta,za,Ca){null!=ka&&(ka=ka.split(","),ba.push({name:pa,values:ka,type:na,defVal:xa,countProperty:ta,parentRow:za,isDeletable:!0,flipBkg:Ca}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ga){for(var Aa=za,Da=0;null!=Aa.nextSibling;)if(Aa.nextSibling.getAttribute("data-pName")==pa)Aa=Aa.nextSibling,Da++;else break;var Ka={type:na,parentRow:za,index:Da,isDeletable:!0,defVal:xa,countProperty:ta};Da=W(pa,"",Ka,0==Da%2,Ca);N(pa,xa,Ka);Aa.parentNode.insertBefore(Da,Aa.nextSibling);mxEvent.consume(Ga)}));
-btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(pa,ka,na,xa,ta,za,Ca){if(0<ta){var Ga=Array(ta);ka=null!=ka?ka.split(","):[];for(var Aa=0;Aa<ta;Aa++)Ga[Aa]=null!=ka[Aa]?ka[Aa]:null!=xa?xa:"";ba.push({name:pa,values:Ga,type:na,defVal:xa,parentRow:za,flipBkg:Ca,size:ta})}return document.createElement("div")}function X(pa,ka,na){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==ka;mxEvent.addListener(xa,"change",function(){N(pa,
-xa.checked?"1":"0",na,null,xa)});return xa}function W(pa,ka,na,xa,ta){var za=na.dispName,Ca=na.type,Ga=document.createElement("tr");Ga.className="gePropRow"+(ta?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";Ga.setAttribute("data-pName",pa);Ga.setAttribute("data-pValue",ka);xa=!1;null!=na.index&&(Ga.setAttribute("data-index",na.index),za=(null!=za?za:"")+"["+na.index+"]",xa=!0);var Aa=document.createElement("td");Aa.className="gePropRowCell";za=mxResources.get(za,null,za);mxUtils.write(Aa,za);Aa.setAttribute("title",
-za);xa&&(Aa.style.textAlign="right");Ga.appendChild(Aa);Aa=document.createElement("td");Aa.className="gePropRowCell";Aa.setAttribute("title",null!=ka?decodeURIComponent(ka):mxResources.get("none"));mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Ba){!mxUtils.isAncestorNode(Ga,document.activeElement)&&mxUtils.isAncestorNode(Ga.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Ba))}));if("color"==
-Ca)Aa.appendChild(Q(pa,ka,na));else if("bool"==Ca||"boolean"==Ca)Aa.appendChild(X(pa,ka,na));else if("enum"==Ca){var Da=na.enumList;Aa.innerHTML="";var Ka=document.createElement("div");Ka.className="gePropValue";Aa.appendChild(Ka);for(ta=0;ta<Da.length;ta++)if(za=Da[ta],za.val==ka){mxUtils.write(Ka,mxResources.get(za.dispName,null,za.dispName));break}mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Ba){var Ia=mxEvent.getSource(Ba);if(!(Ia!=Aa&&Ia!=Ka||mxEvent.isConsumed(Ba))){Ka.innerHTML="";
-var Qa=document.createElement("select"),La=null;O(Aa,Qa);for(Ba=0;Ba<Da.length;Ba++){Ia=Da[Ba];var Ha=document.createElement("option");Ha.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ha,mxResources.get(Ia.dispName,null,Ia.dispName));Qa.appendChild(Ha);null==Ia.val&&(Ha.value="null",La=Ha)}Qa.value=null==ka&&null!=La?"null":ka;Ka.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Sa=mxUtils.htmlEntities(Qa.value);if(Qa[Qa.selectedIndex]==La||"null"==Sa.value)Sa=null;N(pa,Sa,na)});Qa.focus();
-mxEvent.addListener(Qa,"blur",function(){Ka.innerHTML="";for(var Sa=0;Sa<Da.length;Sa++){var $a=Da[Sa];if($a.val==Qa.value){mxUtils.write(Ka,mxResources.get($a.dispName,null,$a.dispName));break}}})}}))}else if("dynamicArr"==Ca)Aa.appendChild(U(pa,ka,na.subType,na.subDefVal,na.countProperty,Ga,ta));else if("staticArr"==Ca)Aa.appendChild(V(pa,ka,na.subType,na.subDefVal,na.size,Ga,ta));else if("readOnly"==Ca)ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=ka,ta.style.borderWidth=
-"0px","id"==pa||"shape"==pa?(Ga.firstChild.innerHTML="",Ga.firstChild.setAttribute("colspan","2"),ta.style.flexGrow="1",ta.style.marginLeft="4px",ta.style.textAlign="id"==pa?"center":"left",ta.setAttribute("title",ka),za=document.createElement("div"),mxUtils.write(za,mxResources.get(pa)+":"),za.style.display="inline-flex",za.style.alignItems="center",za.style.width="100%",za.appendChild(ta),Ga.firstChild.appendChild(za)):(ta.style.width="96px",Aa.appendChild(ta));else{Aa.innerHTML="";var Na=document.createElement("div");
-Na.className="gePropValue";Aa.appendChild(Na);Na.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ka));mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(Ba){function Ia(){var Ha=La.value;Ha=0==Ha.length&&"string"!=Ca&&"numbers"!=Ca?0:Ha;na.allowAuto&&(null!=Ha.trim&&"auto"==Ha.trim().toLowerCase()?(Ha="auto",Ca="string"):(Ha=parseFloat(Ha),Ha=isNaN(Ha)?0:Ha));null!=na.min&&Ha<na.min?Ha=na.min:null!=na.max&&Ha>na.max&&(Ha=na.max);var Sa=null;try{Sa="numbers"==Ca?Ha.match(/\d+/g).map(Number).join(" "):
-encodeURIComponent(("int"==Ca?parseInt(Ha):Ha)+"")}catch($a){}N(pa,Sa,na,null,La)}var Qa=mxEvent.getSource(Ba);if(!(Qa!=Aa&&Qa!=Na||mxEvent.isConsumed(Ba))){Na.innerHTML="";var La=document.createElement("input");O(Na,La);La.value=decodeURIComponent(ka);La.className="gePropEditor";"int"!=Ca&&"float"!=Ca||na.allowAuto||(La.type="number",La.step="int"==Ca?"1":"any",null!=na.min&&(La.min=parseFloat(na.min)),null!=na.max&&(La.max=parseFloat(na.max)));Na.appendChild(La);mxEvent.addListener(La,"keypress",
-function(Ha){13==Ha.keyCode&&Ia()});La.focus();mxEvent.addListener(La,"blur",function(){Ia()})}}))}na.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(Y,function(Ba){N(pa,"",na,na.index);mxEvent.consume(Ba)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",Aa.appendChild(ta));Ga.appendChild(Aa);return Ga}var Y=this,Z=this.editorUi.editor.graph,ba=[],ia=document.createElement("table");ia.className="geProperties geFullWidthElement";var ea=document.createElement("tr");
-ea.className="gePropHeader";var da=document.createElement("th");da.className="gePropHeaderCell";da.style.paddingLeft="16px";da.style.backgroundRepeat="no-repeat";da.style.backgroundPosition="-2px 50%";da.style.backgroundSize="20px";mxUtils.write(da,mxResources.get("property"));ea.style.cursor="pointer";var ja=function(){var pa=ia.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){da.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ka="none";for(var na=g.childNodes.length-
-1;0<=na;na--)try{var xa=g.childNodes[na],ta=xa.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||g.removeChild(xa)}catch(za){}}else da.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ka="";for(na=0;na<pa.length;na++)pa[na].style.display=ka};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ja()});ea.appendChild(da);var ma=document.createElement("th");ma.className="gePropHeaderCell";ma.style.paddingLeft="4px";mxUtils.write(ma,mxResources.get("value"));
-ea.appendChild(ma);ia.appendChild(ea);var aa=ma=!1;ea=null;1==C.vertices.length&&0==C.edges.length?ea=C.vertices[0].id:0==C.vertices.length&&1==C.edges.length&&(ea=C.edges[0].id);null==ea||I||(ia.appendChild(W("id",mxUtils.htmlEntities(ea),{dispName:"id",type:"readOnly"},!0,!1)),null!=C.style&&null!=C.style.shape&&ia.appendChild(W("shape",mxUtils.htmlEntities(C.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var fa in n)if(I=n[fa],("function"!=typeof I.isVisible||I.isVisible(C,this))&&
-!I.primary){var la=null!=I.getValue?I.getValue(C,this):null!=C.style[fa]?mxUtils.htmlEntities(C.style[fa]+""):null!=I.getDefaultValue?I.getDefaultValue(C,this):I.defVal;if("separator"==I.type)aa=!aa;else{if("staticArr"==I.type)I.size=parseInt(C.style[I.sizeProperty]||n[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var ca=I.dependentProps,va=[],sa=[];for(ea=0;ea<ca.length;ea++)if(null!=n[ca[ea]]){var wa=C.style[ca[ea]];sa.push(n[ca[ea]].subDefVal);va.push(null!=wa?wa.split(","):[])}I.dependentPropsDefVal=
-sa;I.dependentPropsVals=va}ia.appendChild(W(fa,la,I,ma,aa));ma=!ma}}for(ea=0;ea<ba.length;ea++)for(I=ba[ea],n=I.parentRow,fa=0;fa<I.values.length;fa++)ma=W(I.name,I.values[fa],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:fa,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==fa%2,I.flipBkg),n.parentNode.insertBefore(ma,n.nextSibling),n=ma;g.appendChild(ia);ja();return g};StyleFormatPanel.prototype.addStyles=function(g){if(null!=this.defaultColorSchemes){var n=this.editorUi,
-C=n.editor.graph,I=document.createElement("div");I.style.padding="6px 20px 0 24px";g.appendChild(I);var N=document.createElement("div");N.className="geSwitcher";N.style.padding="4px 18px 6px 0px";for(var O=[],Q=0;Q<this.defaultColorSchemes.length;Q++){var U=document.createElement("div");U.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){V(Z)}))})(Q);O.push(U);N.appendChild(U)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&
-null!=O[this.format.currentScheme]&&(O[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(Z){var ba=mxUtils.clone(C.defaultVertexStyle);ba[mxConstants.STYLE_STROKECOLOR]=null!=ba[mxConstants.STYLE_STROKECOLOR]?ba[mxConstants.STYLE_STROKECOLOR]:"default";ba[mxConstants.STYLE_FILLCOLOR]=null!=ba[mxConstants.STYLE_FILLCOLOR]?
-ba[mxConstants.STYLE_FILLCOLOR]:"default";ba[mxConstants.STYLE_FONTCOLOR]=null!=ba[mxConstants.STYLE_FONTCOLOR]?ba[mxConstants.STYLE_FONTCOLOR]:"default";C.replaceDefaultColors(new mxCell,ba);var ia=mxUtils.bind(this,function(da){var ja=mxUtils.button("",mxUtils.bind(this,function(fa){C.getModel().beginUpdate();try{for(var la=n.getSelectionState().cells,ca=0;ca<la.length;ca++){var va=C.getModel().getStyle(la[ca]);null!=da?(mxEvent.isShiftDown(fa)||(va=""==da.fill||null==da.fill?mxUtils.setStyle(va,
-mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,da.fill),va=""==da.gradient||null==da.gradient?mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(fa)||mxClient.IS_MAC&&mxEvent.isMetaDown(fa)||!C.getModel().isVertex(la[ca])||(va=""==da.font||null==da.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(fa)||
-(va=""==da.stroke||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,da.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),C.getModel().isVertex(la[ca])&&(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));C.getModel().setStyle(la[ca],va)}}finally{C.getModel().endUpdate()}}));ja.className=
-"geStyleButton";ja.style.width="36px";ja.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ja.style.margin="0px 6px 6px 0px";if(null!=da){var ma="1px solid";null!=da.border&&(ma=da.border);if(null!=da.gradient)ja.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+" 100%)";else if(da.fill==mxConstants.NONE)ja.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ja.style.backgroundColor=
-mxUtils.getLightDarkColor(mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var aa=mxUtils.getLightDarkColor(da.fill);ja.style.backgroundImage="linear-gradient(to right bottom, "+aa.cssText+" 50%, "+aa.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ja.style.border=ma+" transparent":""==da.stroke?ja.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(aa=mxUtils.getLightDarkColor(da.stroke),ja.style.border=
-ma+" "+aa.cssText,ja.style.borderRightColor=aa.light,ja.style.borderBottomColor=ja.style.borderRightColor);null!=da.title&&ja.setAttribute("title",da.title)}else ma=mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,"#ffffff"),aa=mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,"#000000"),ja.style.backgroundColor=ma,ja.style.border="1px solid "+aa;ja.style.borderRadius="0";I.appendChild(ja);null!=da&&null!=da.gradient&&(ma=ja.cloneNode(!1),ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+
-mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ma.style.backgroundColor="transparent",I.appendChild(ma),ma.style.marginLeft="-42px",mxEvent.addListener(ma,"click",function(){ja.click()}))});I.innerText="";if(null!=Z)for(var ea=0;ea<Z.length;ea++)0<ea&&0==mxUtils.mod(ea,4)&&mxUtils.br(I),ia(Z[ea])});null==this.format.currentScheme?V(Math.min(O.length-1,Editor.isDarkMode()?
+StyleFormatPanel.prototype.init=function(){var g=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=g.style.shape&&!g.containsLabel&&0<g.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);null!=g.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),g.customProperties,g))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(g){var p=
+this.editorUi.getSelectionState();1==p.cells.length?this.addActions(g,["copyStyle","pasteStyle"]):1<=p.cells.length&&this.addActions(g,["pasteStyle","pasteData"]);l.apply(this,arguments);return g};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(g,p,C,I){function M(wa,ka,na,za,ra){if(null!=na.valueChanged)na.valueChanged(ka,ra,C,Y);else{Z.getModel().beginUpdate();try{ra=[];var ya=[];if(null!=na.index){for(var Ca=[],Ha=na.parentRow.nextSibling;Ha&&Ha.getAttribute("data-pName")==
+wa;)Ca.push(Ha.getAttribute("data-pValue")),Ha=Ha.nextSibling;na.index<Ca.length?null!=za?Ca.splice(za,1):Ca[na.index]=ka:Ca.push(ka);null!=na.size&&Ca.length>na.size&&(Ca=Ca.slice(0,na.size));ka=Ca.join(",");null!=na.countProperty&&(Z.setCellStyles(na.countProperty,Ca.length,Z.getSelectionCells()),ra.push(na.countProperty),ya.push(Ca.length))}Z.setCellStyles(wa,ka,Z.getSelectionCells());ra.push(wa);ya.push(ka);if(null!=na.dependentProps)for(wa=0;wa<na.dependentProps.length;wa++){var Ba=na.dependentPropsDefVal[wa],
+Fa=na.dependentPropsVals[wa];if(Fa.length>ka)Fa=Fa.slice(0,ka);else for(var Pa=Fa.length;Pa<ka;Pa++)Fa.push(Ba);Fa=Fa.join(",");Z.setCellStyles(na.dependentProps[wa],Fa,Z.getSelectionCells());ra.push(na.dependentProps[wa]);ya.push(Fa)}if("function"==typeof na.onChange)na.onChange(Z,ka);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",ya,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(wa,ka){ka.style.left="0px";ka.style.top="0px";ka.style.position=
+"relative";ka.style.right="0px";ka.style.bottom="0px";ka.style.width="100%";ka.style.maxWidth="100%";ka.style.maxHeight="100%";ka.style.textAlign="left"}function Q(wa,ka,na){function za(ya){if(null==ya||ya==mxConstants.NONE)ra.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ya)ra.style.background="";else{var Ca=mxUtils.getLightDarkColor(ya);mxUtils.isLightDarkColor(ya)&&Ca.light!=Ca.dark?ra.style.background="linear-gradient(to right bottom, "+Ca.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ca).cssText+
+" 50.3%)":ra.style.background=ya}}var ra=document.createElement("div");ra.style.width="32px";ra.style.height="8px";ra.style.margin="2px";ra.style.borderStyle="solid";ra.style.borderWidth="1px";za(ka);btn=mxUtils.button("",mxUtils.bind(Y,function(ya){this.editorUi.pickColor(ka,function(Ca){M(wa,Ca,na);za(Ca)});mxEvent.consume(ya)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(ra);return btn}function U(wa,
+ka,na,za,ra,ya,Ca){null!=ka&&(ka=ka.split(","),aa.push({name:wa,values:ka,type:na,defVal:za,countProperty:ra,parentRow:ya,isDeletable:!0,flipBkg:Ca}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ha){for(var Ba=ya,Fa=0;null!=Ba.nextSibling;)if(Ba.nextSibling.getAttribute("data-pName")==wa)Ba=Ba.nextSibling,Fa++;else break;var Pa={type:na,parentRow:ya,index:Fa,isDeletable:!0,defVal:za,countProperty:ra};Fa=W(wa,"",Pa,0==Fa%2,Ca);M(wa,za,Pa);Ba.parentNode.insertBefore(Fa,Ba.nextSibling);mxEvent.consume(Ha)}));
+btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(wa,ka,na,za,ra,ya,Ca){if(0<ra){var Ha=Array(ra);ka=null!=ka?ka.split(","):[];for(var Ba=0;Ba<ra;Ba++)Ha[Ba]=null!=ka[Ba]?ka[Ba]:null!=za?za:"";aa.push({name:wa,values:Ha,type:na,defVal:za,parentRow:ya,flipBkg:Ca,size:ra})}return document.createElement("div")}function X(wa,ka,na){var za=document.createElement("input");za.type="checkbox";za.checked="1"==ka;mxEvent.addListener(za,"change",function(){M(wa,
+za.checked?"1":"0",na,null,za)});return za}function W(wa,ka,na,za,ra){var ya=na.dispName,Ca=na.type,Ha=document.createElement("tr");Ha.className="gePropRow"+(ra?"Dark":"")+(za?"Alt":"")+" gePropNonHeaderRow";Ha.setAttribute("data-pName",wa);Ha.setAttribute("data-pValue",ka);za=!1;null!=na.index&&(Ha.setAttribute("data-index",na.index),ya=(null!=ya?ya:"")+"["+na.index+"]",za=!0);var Ba=document.createElement("td");Ba.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(Ba,ya);Ba.setAttribute("title",
+ya);za&&(Ba.style.textAlign="right");Ha.appendChild(Ba);Ba=document.createElement("td");Ba.className="gePropRowCell";Ba.setAttribute("title",null!=ka?decodeURIComponent(ka):mxResources.get("none"));mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(Da){!mxUtils.isAncestorNode(Ha,document.activeElement)&&mxUtils.isAncestorNode(Ha.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(Da))}));if("color"==
+Ca)Ba.appendChild(Q(wa,ka,na));else if("bool"==Ca||"boolean"==Ca)Ba.appendChild(X(wa,ka,na));else if("enum"==Ca){var Fa=na.enumList;Ba.innerHTML="";var Pa=document.createElement("div");Pa.className="gePropValue";Ba.appendChild(Pa);for(ra=0;ra<Fa.length;ra++)if(ya=Fa[ra],ya.val==ka){mxUtils.write(Pa,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(Da){var Ia=mxEvent.getSource(Da);if(!(Ia!=Ba&&Ia!=Pa||mxEvent.isConsumed(Da))){Pa.innerHTML="";
+var Oa=document.createElement("select"),Ga=null;O(Ba,Oa);for(Da=0;Da<Fa.length;Da++){Ia=Fa[Da];var Ka=document.createElement("option");Ka.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ka,mxResources.get(Ia.dispName,null,Ia.dispName));Oa.appendChild(Ka);null==Ia.val&&(Ka.value="null",Ga=Ka)}Oa.value=null==ka&&null!=Ga?"null":ka;Pa.appendChild(Oa);mxEvent.addListener(Oa,"change",function(){var Xa=mxUtils.htmlEntities(Oa.value);if(Oa[Oa.selectedIndex]==Ga||"null"==Xa.value)Xa=null;M(wa,Xa,na)});Oa.focus();
+mxEvent.addListener(Oa,"blur",function(){Pa.innerHTML="";for(var Xa=0;Xa<Fa.length;Xa++){var qb=Fa[Xa];if(qb.val==Oa.value){mxUtils.write(Pa,mxResources.get(qb.dispName,null,qb.dispName));break}}})}}))}else if("dynamicArr"==Ca)Ba.appendChild(U(wa,ka,na.subType,na.subDefVal,na.countProperty,Ha,ra));else if("staticArr"==Ca)Ba.appendChild(V(wa,ka,na.subType,na.subDefVal,na.size,Ha,ra));else if("readOnly"==Ca)ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ka,ra.style.borderWidth=
+"0px","id"==wa||"shape"==wa?(Ha.firstChild.innerHTML="",Ha.firstChild.setAttribute("colspan","2"),ra.style.flexGrow="1",ra.style.marginLeft="4px",ra.style.textAlign="id"==wa?"center":"left",ra.setAttribute("title",ka),ya=document.createElement("div"),mxUtils.write(ya,mxResources.get(wa)+":"),ya.style.display="inline-flex",ya.style.alignItems="center",ya.style.width="100%",ya.appendChild(ra),Ha.firstChild.appendChild(ya)):(ra.style.width="96px",Ba.appendChild(ra));else{Ba.innerHTML="";var Aa=document.createElement("div");
+Aa.className="gePropValue";Ba.appendChild(Aa);Aa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ka));mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(Da){function Ia(){var Ka=Ga.value;Ka=0==Ka.length&&"string"!=Ca&&"numbers"!=Ca?0:Ka;na.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ca="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=na.min&&Ka<na.min?Ka=na.min:null!=na.max&&Ka>na.max&&(Ka=na.max);var Xa=null;try{Xa="numbers"==Ca?Ka.match(/\d+/g).map(Number).join(" "):
+encodeURIComponent(("int"==Ca?parseInt(Ka):Ka)+"")}catch(qb){}M(wa,Xa,na,null,Ga)}var Oa=mxEvent.getSource(Da);if(!(Oa!=Ba&&Oa!=Aa||mxEvent.isConsumed(Da))){Aa.innerHTML="";var Ga=document.createElement("input");O(Aa,Ga);Ga.value=decodeURIComponent(ka);Ga.className="gePropEditor";"int"!=Ca&&"float"!=Ca||na.allowAuto||(Ga.type="number",Ga.step="int"==Ca?"1":"any",null!=na.min&&(Ga.min=parseFloat(na.min)),null!=na.max&&(Ga.max=parseFloat(na.max)));Aa.appendChild(Ga);mxEvent.addListener(Ga,"keypress",
+function(Ka){13==Ka.keyCode&&Ia()});Ga.focus();mxEvent.addListener(Ga,"blur",function(){Ia()})}}))}na.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(Y,function(Da){M(wa,"",na,na.index);mxEvent.consume(Da)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",Ba.appendChild(ra));Ha.appendChild(Ba);return Ha}var Y=this,Z=this.editorUi.editor.graph,aa=[],ha=document.createElement("table");ha.className="geProperties geFullWidthElement";var ea=document.createElement("tr");
+ea.className="gePropHeader";var da=document.createElement("th");da.className="gePropHeaderCell";da.style.paddingLeft="16px";da.style.backgroundRepeat="no-repeat";da.style.backgroundPosition="-2px 50%";da.style.backgroundSize="20px";mxUtils.write(da,mxResources.get("property"));ea.style.cursor="pointer";var ia=function(){var wa=ha.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){da.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ka="none";for(var na=g.childNodes.length-
+1;0<=na;na--)try{var za=g.childNodes[na],ra=za.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||g.removeChild(za)}catch(ya){}}else da.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ka="";for(na=0;na<wa.length;na++)wa[na].style.display=ka};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;ia()});ea.appendChild(da);var la=document.createElement("th");la.className="gePropHeaderCell";la.style.paddingLeft="4px";mxUtils.write(la,mxResources.get("value"));
+ea.appendChild(la);ha.appendChild(ea);var ba=la=!1;ea=null;1==C.vertices.length&&0==C.edges.length?ea=C.vertices[0].id:0==C.vertices.length&&1==C.edges.length&&(ea=C.edges[0].id);null==ea||I||(ha.appendChild(W("id",mxUtils.htmlEntities(ea),{dispName:"id",type:"readOnly"},!0,!1)),null!=C.style&&null!=C.style.shape&&ha.appendChild(W("shape",mxUtils.htmlEntities(C.style.shape),{dispName:"shape",type:"readOnly"},!0,!1)));for(var fa in p)if(I=p[fa],("function"!=typeof I.isVisible||I.isVisible(C,this))&&
+!I.primary){var ja=null!=I.getValue?I.getValue(C,this):null!=C.style[fa]?mxUtils.htmlEntities(C.style[fa]+""):null!=I.getDefaultValue?I.getDefaultValue(C,this):I.defVal;if("separator"==I.type)ba=!ba;else{if("staticArr"==I.type)I.size=parseInt(C.style[I.sizeProperty]||p[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var ca=I.dependentProps,sa=[],pa=[];for(ea=0;ea<ca.length;ea++)if(null!=p[ca[ea]]){var ua=C.style[ca[ea]];pa.push(p[ca[ea]].subDefVal);sa.push(null!=ua?ua.split(","):[])}I.dependentPropsDefVal=
+pa;I.dependentPropsVals=sa}ha.appendChild(W(fa,ja,I,la,ba));la=!la}}for(ea=0;ea<aa.length;ea++)for(I=aa[ea],p=I.parentRow,fa=0;fa<I.values.length;fa++)la=W(I.name,I.values[fa],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:fa,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==fa%2,I.flipBkg),p.parentNode.insertBefore(la,p.nextSibling),p=la;g.appendChild(ha);ia();return g};StyleFormatPanel.prototype.addStyles=function(g){if(null!=this.defaultColorSchemes){var p=this.editorUi,
+C=p.editor.graph,I=document.createElement("div");I.style.padding="6px 20px 0 24px";g.appendChild(I);var M=document.createElement("div");M.className="geSwitcher";M.style.padding="4px 18px 6px 0px";for(var O=[],Q=0;Q<this.defaultColorSchemes.length;Q++){var U=document.createElement("div");U.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){V(Z)}))})(Q);O.push(U);M.appendChild(U)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&
+null!=O[this.format.currentScheme]&&(O[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(C.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?
+aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:"default";C.replaceDefaultColors(new mxCell,aa);var ha=mxUtils.bind(this,function(da){var ia=mxUtils.button("",mxUtils.bind(this,function(fa){C.getModel().beginUpdate();try{for(var ja=p.getSelectionState().cells,ca=0;ca<ja.length;ca++){var sa=C.getModel().getStyle(ja[ca]);null!=da?(mxEvent.isShiftDown(fa)||(sa=""==da.fill||null==da.fill?mxUtils.setStyle(sa,
+mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_FILLCOLOR,da.fill),sa=""==da.gradient||null==da.gradient?mxUtils.setStyle(sa,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(fa)||mxClient.IS_MAC&&mxEvent.isMetaDown(fa)||!C.getModel().isVertex(ja[ca])||(sa=""==da.font||null==da.font?mxUtils.setStyle(sa,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(fa)||
+(sa=""==da.stroke||null==da.fill?mxUtils.setStyle(sa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(sa,mxConstants.STYLE_STROKECOLOR,da.stroke))):(sa=mxUtils.setStyle(sa,mxConstants.STYLE_FILLCOLOR,null),sa=mxUtils.setStyle(sa,mxConstants.STYLE_STROKECOLOR,null),sa=mxUtils.setStyle(sa,mxConstants.STYLE_GRADIENTCOLOR,null),C.getModel().isVertex(ja[ca])&&(sa=mxUtils.setStyle(sa,mxConstants.STYLE_FONTCOLOR,null)));C.getModel().setStyle(ja[ca],sa)}}finally{C.getModel().endUpdate()}}));ia.className=
+"geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin="0px 6px 6px 0px";if(null!=da){var la="1px solid";null!=da.border&&(la=da.border);if(null!=da.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+" 100%)";else if(da.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ia.style.backgroundColor=
+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(da.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ia.style.border=la+" transparent":""==da.stroke?ia.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(da.stroke),ia.style.border=
+la+" "+ba.cssText,ia.style.borderRightColor=ba.light,ia.style.borderBottomColor=ia.style.borderRightColor);null!=da.title&&ia.setAttribute("title",da.title)}else la=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=la,ia.style.border="1px solid "+ba;ia.style.borderRadius="0";I.appendChild(ia);null!=da&&null!=da.gradient&&(la=ia.cloneNode(!1),la.style.backgroundImage="linear-gradient(light-dark(transparent, "+
+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",la.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",la.style.backgroundColor="transparent",I.appendChild(la),la.style.marginLeft="-42px",mxEvent.addListener(la,"click",function(){ia.click()}))});I.innerText="";if(null!=Z)for(var ea=0;ea<Z.length;ea++)0<ea&&0==mxUtils.mod(ea,4)&&mxUtils.br(I),ha(Z[ea])});null==this.format.currentScheme?V(Math.min(O.length-1,Editor.isDarkMode()?
1:"1"==urlParams.sketch?5:0)):V(this.format.currentScheme);Q=10>=this.defaultColorSchemes.length?43:23;var W=document.createElement("div");W.className="geButton";W.style.cssText="position:absolute;left:0px;bottom:"+Q+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(W,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+
-Q+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(g.appendChild(W),g.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&g.appendChild(N)}return g}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
+Q+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(g.appendChild(W),g.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&g.appendChild(M)}return g}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(g){return g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||g.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(g){return Graph.isGoogleFontUrl(g)};Graph.rewriteGoogleFontUrl=function(g){null!=g&&g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(g=Editor.GOOGLE_FONTS_CSS2+g.substring(Editor.GOOGLE_FONTS.length)+
-":wght@400;500");return g};Graph.createFontElement=function(g,n){var C=Graph.fontMapping[n];null==C&&Graph.isCssFontUrl(n)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",Graph.rewriteGoogleFontUrl(n))):(null==C&&(C='@font-face {\nfont-family: "'+g+'";\nsrc: url("'+n+'");\n}'),g=document.createElement("style"),mxUtils.write(g,C));return g};Graph.addRecentCustomFont=function(g,n){};Graph.addFont=
-function(g,n,C,I){if(null!=g&&0<g.length&&null!=n&&0<n.length){I=null!=I?I:Graph.customFontElements;var N=g.toLowerCase();if("helvetica"!=N&&"arial"!=g&&"sans-serif"!=N){var O=I[N];null!=O&&O.url!=n&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=n,"http:"==n.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(n)),O={name:g,url:n,elt:Graph.createFontElement(g,O)},I[N]=O,n=I==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=C&&("link"==O.elt.nodeName.toLowerCase()?
-(O.elt.onload=C,O.elt.onerror=C):C()),null!=n&&n.appendChild(O.elt)):null!=C&&C()}else null!=C&&C()}else null!=C&&C();return g};Graph.getFontUrl=function(g,n){g=Graph.customFontElements[g.toLowerCase()];null!=g&&(n=g.url);return n};Graph.processFontAttributes=function(g){g=g.getElementsByTagName("*");for(var n=0;n<g.length;n++){var C=g[n].getAttribute("data-font-src");if(null!=C){var I="FONT"==g[n].nodeName?g[n].getAttribute("face"):g[n].style.fontFamily;null!=I&&Graph.addFont(I,C)}}};Graph.processFontStyle=
-function(g){if(null!=g){var n=mxUtils.getValue(g,"fontSource",null);if(null!=n){var C=mxUtils.getValue(g,mxConstants.STYLE_FONTFAMILY,null);if(null!=C)try{Graph.addFont(C,decodeURIComponent(n))}catch(I){}}}return g};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
-"0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var m=Graph.prototype.init;Graph.prototype.init=function(){function g(N){n=N}m.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var n=null;mxEvent.addListener(this.container,"mouseenter",g);mxEvent.addListener(this.container,"mousemove",g);mxEvent.addListener(this.container,"mouseleave",function(N){n=null});
-this.isMouseInsertPoint=function(){return null!=n};var C=this.getInsertPoint;this.getInsertPoint=function(){return null!=n?this.getPointForEvent(n):C.apply(this,arguments)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var O=this.graph.getCellStyle(N);if(null!=O&&"rack"==O.childLayout){var Q=new mxStackLayout(this.graph,!1);Q.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Q.marginLeft=O.marginLeft||
-0;Q.marginRight=O.marginRight||0;Q.marginTop=O.marginTop||0;Q.marginBottom=O.marginBottom||0;Q.allowGaps=O.allowGaps||0;Q.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");Q.resizeParent=!1;Q.fill=!0;return Q}return I.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(g,n){return Graph.processFontStyle(t.apply(this,arguments))};var v=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=
-function(g,n,C,I,N,O,Q,U,V,X,W,Y){v.apply(this,arguments);Graph.processFontAttributes(Y)};var A=mxText.prototype.redraw;mxText.prototype.redraw=function(){A.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(g,n,C,I){function N(){for(var ea=U.getSelectionCells(),da=[],ja=0;ja<ea.length;ja++)U.isCellVisible(ea[ja])&&da.push(ea[ja]);U.setSelectionCells(da)}function O(ea){U.setHiddenTags(ea?[]:V.slice());
-N();U.refresh()}function Q(ea,da){W.innerText="";if(0<ea.length){var ja=document.createElement("table");ja.setAttribute("cellpadding","2");ja.style.boxSizing="border-box";ja.style.tableLayout="fixed";ja.style.width="100%";var ma=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var aa=0;aa<ea.length;aa++)(function(fa){function la(){var ka=U.getCellsForTags([fa],null,null,!0);U.isEnabled()?U.setSelectionCells(ka):U.highlightCells(ka,null,null,70)}var ca=0>mxUtils.indexOf(U.hiddenTags,fa),
-va=document.createElement("tr"),sa=document.createElement("td");sa.style.align="center";sa.style.width="16px";var wa=document.createElement("img");wa.setAttribute("src",ca?Editor.visibleImage:Editor.hiddenImage);wa.setAttribute("title",mxResources.get(ca?"hideIt":"show",[fa]));mxUtils.setOpacity(wa,ca?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width="16px";if(n||Editor.isDarkMode())wa.style.filter="invert(100%)";sa.appendChild(wa);mxEvent.addListener(wa,
-"click",function(ka){mxEvent.isShiftDown(ka)?O(0<=mxUtils.indexOf(U.hiddenTags,fa)):(U.toggleHiddenTag(fa),N(),U.refresh());mxEvent.consume(ka)});va.appendChild(sa);sa=document.createElement("td");sa.style.align="center";sa.style.width="16px";wa=document.createElement("img");wa.setAttribute("src",Editor.selectImage);wa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(wa,ca?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width=
-"16px";if(n||Editor.isDarkMode())wa.style.filter="invert(100%)";mxEvent.addListener(wa,"click",function(ka){O(!0);la();mxEvent.consume(ka)});sa.appendChild(wa);va.appendChild(sa);sa=document.createElement("td");sa.style.overflow="hidden";sa.style.whiteSpace="nowrap";sa.style.textOverflow="ellipsis";sa.style.verticalAlign="middle";sa.style.cursor="pointer";sa.setAttribute("title",fa);a=document.createElement("a");mxUtils.write(a,fa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,
-ca?100:40);sa.appendChild(a);mxEvent.addListener(sa,"click",function(ka){if(mxEvent.isShiftDown(ka))O(!0),la();else if(ca&&0<U.hiddenTags.length)O(!0);else{var na=V.slice(),xa=mxUtils.indexOf(na,fa);na.splice(xa,1);U.setHiddenTags(na);N();U.refresh()}mxEvent.consume(ka)});va.appendChild(sa);if(U.isEnabled()){sa=document.createElement("td");sa.style.verticalAlign="middle";sa.style.textAlign="center";sa.style.width="18px";if(null==da){sa.style.align="center";sa.style.width="16px";wa=document.createElement("img");
-wa.setAttribute("src",Editor.trashImage);wa.setAttribute("title",mxResources.get("removeIt",[fa]));mxUtils.setOpacity(wa,ca?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width="16px";if(n||Editor.isDarkMode())wa.style.filter="invert(100%)";mxEvent.addListener(wa,"click",function(ka){var na=mxUtils.indexOf(V,fa);0<=na&&V.splice(na,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[fa]);U.refresh();mxEvent.consume(ka)});sa.appendChild(wa)}else{var pa=
-document.createElement("input");pa.setAttribute("type","checkbox");pa.style.margin="0px";pa.defaultChecked=null!=da&&0<=mxUtils.indexOf(da,fa);pa.checked=pa.defaultChecked;pa.style.background="transparent";pa.setAttribute("title",mxResources.get(pa.defaultChecked?"removeIt":"add",[fa]));mxEvent.addListener(pa,"change",function(ka){pa.checked?U.addTagsForCells(U.getSelectionCells(),[fa]):U.removeTagsForCells(U.getSelectionCells(),[fa]);mxEvent.consume(ka)});sa.appendChild(pa)}va.appendChild(sa)}ma.appendChild(va)})(ea[aa]);
-ja.appendChild(ma);W.appendChild(ja)}}var U=this,V=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);U.addListener(mxEvent.ROOT,function(){V=
+":wght@400;500");return g};Graph.createFontElement=function(g,p){var C=Graph.fontMapping[p];null==C&&Graph.isCssFontUrl(p)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",Graph.rewriteGoogleFontUrl(p))):(null==C&&(C='@font-face {\nfont-family: "'+g+'";\nsrc: url("'+p+'");\n}'),g=document.createElement("style"),mxUtils.write(g,C));return g};Graph.addRecentCustomFont=function(g,p){};Graph.addFont=
+function(g,p,C,I){if(null!=g&&0<g.length&&null!=p&&0<p.length){I=null!=I?I:Graph.customFontElements;var M=g.toLowerCase();if("helvetica"!=M&&"arial"!=g&&"sans-serif"!=M){var O=I[M];null!=O&&O.url!=p&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=p,"http:"==p.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(p)),O={name:g,url:p,elt:Graph.createFontElement(g,O)},I[M]=O,p=I==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=C&&("link"==O.elt.nodeName.toLowerCase()?
+(O.elt.onload=C,O.elt.onerror=C):C()),null!=p&&p.appendChild(O.elt)):null!=C&&C()}else null!=C&&C()}else null!=C&&C();return g};Graph.getFontUrl=function(g,p){g=Graph.customFontElements[g.toLowerCase()];null!=g&&(p=g.url);return p};Graph.processFontAttributes=function(g){g=g.getElementsByTagName("*");for(var p=0;p<g.length;p++){var C=g[p].getAttribute("data-font-src");if(null!=C){var I="FONT"==g[p].nodeName?g[p].getAttribute("face"):g[p].style.fontFamily;null!=I&&Graph.addFont(I,C)}}};Graph.processFontStyle=
+function(g){if(null!=g){var p=mxUtils.getValue(g,"fontSource",null);if(null!=p){var C=mxUtils.getValue(g,mxConstants.STYLE_FONTFAMILY,null);if(null!=C)try{Graph.addFont(C,decodeURIComponent(p))}catch(I){}}}return g};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
+"0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var m=Graph.prototype.init;Graph.prototype.init=function(){function g(M){p=M}m.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var p=null;mxEvent.addListener(this.container,"mouseenter",g);mxEvent.addListener(this.container,"mousemove",g);mxEvent.addListener(this.container,"mouseleave",function(M){p=null});
+this.isMouseInsertPoint=function(){return null!=p};var C=this.getInsertPoint;this.getInsertPoint=function(M){return null==p||M?C.apply(this,arguments):this.getPointForEvent(p)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var O=this.graph.getCellStyle(M);if(null!=O&&"rack"==O.childLayout){var Q=new mxStackLayout(this.graph,!1);Q.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Q.marginLeft=O.marginLeft||
+0;Q.marginRight=O.marginRight||0;Q.marginTop=O.marginTop||0;Q.marginBottom=O.marginBottom||0;Q.allowGaps=O.allowGaps||0;Q.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");Q.resizeParent=!1;Q.fill=!0;return Q}return I.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(g,p){return Graph.processFontStyle(t.apply(this,arguments))};var v=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=
+function(g,p,C,I,M,O,Q,U,V,X,W,Y){v.apply(this,arguments);Graph.processFontAttributes(Y)};var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(g,p,C,I){function M(){for(var ea=U.getSelectionCells(),da=[],ia=0;ia<ea.length;ia++)U.isCellVisible(ea[ia])&&da.push(ea[ia]);U.setSelectionCells(da)}function O(ea){U.setHiddenTags(ea?[]:V.slice());
+M();U.refresh()}function Q(ea,da){W.innerText="";if(0<ea.length){var ia=document.createElement("table");ia.setAttribute("cellpadding","2");ia.style.boxSizing="border-box";ia.style.tableLayout="fixed";ia.style.width="100%";var la=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(fa){function ja(){var ka=U.getCellsForTags([fa],null,null,!0);U.isEnabled()?U.setSelectionCells(ka):U.highlightCells(ka,null,null,70)}var ca=0>mxUtils.indexOf(U.hiddenTags,fa),
+sa=document.createElement("tr"),pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";var ua=document.createElement("img");ua.setAttribute("src",ca?Editor.visibleImage:Editor.hiddenImage);ua.setAttribute("title",mxResources.get(ca?"hideIt":"show",[fa]));mxUtils.setOpacity(ua,ca?75:25);ua.className="geAdaptiveAsset";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.style.width="16px";if(p||Editor.isDarkMode())ua.style.filter="invert(100%)";pa.appendChild(ua);mxEvent.addListener(ua,
+"click",function(ka){mxEvent.isShiftDown(ka)?O(0<=mxUtils.indexOf(U.hiddenTags,fa)):(U.toggleHiddenTag(fa),M(),U.refresh());mxEvent.consume(ka)});sa.appendChild(pa);pa=document.createElement("td");pa.style.align="center";pa.style.width="16px";ua=document.createElement("img");ua.setAttribute("src",Editor.selectImage);ua.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ua,ca?75:25);ua.className="geAdaptiveAsset";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.style.width=
+"16px";if(p||Editor.isDarkMode())ua.style.filter="invert(100%)";mxEvent.addListener(ua,"click",function(ka){O(!0);ja();mxEvent.consume(ka)});pa.appendChild(ua);sa.appendChild(pa);pa=document.createElement("td");pa.style.overflow="hidden";pa.style.whiteSpace="nowrap";pa.style.textOverflow="ellipsis";pa.style.verticalAlign="middle";pa.style.cursor="pointer";pa.setAttribute("title",fa);a=document.createElement("a");mxUtils.write(a,fa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,
+ca?100:40);pa.appendChild(a);mxEvent.addListener(pa,"click",function(ka){if(mxEvent.isShiftDown(ka))O(!0),ja();else if(ca&&0<U.hiddenTags.length)O(!0);else{var na=V.slice(),za=mxUtils.indexOf(na,fa);na.splice(za,1);U.setHiddenTags(na);M();U.refresh()}mxEvent.consume(ka)});sa.appendChild(pa);if(U.isEnabled()){pa=document.createElement("td");pa.style.verticalAlign="middle";pa.style.textAlign="center";pa.style.width="18px";if(null==da){pa.style.align="center";pa.style.width="16px";ua=document.createElement("img");
+ua.setAttribute("src",Editor.trashImage);ua.setAttribute("title",mxResources.get("removeIt",[fa]));mxUtils.setOpacity(ua,ca?75:25);ua.className="geAdaptiveAsset";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.style.width="16px";if(p||Editor.isDarkMode())ua.style.filter="invert(100%)";mxEvent.addListener(ua,"click",function(ka){var na=mxUtils.indexOf(V,fa);0<=na&&V.splice(na,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[fa]);U.refresh();mxEvent.consume(ka)});pa.appendChild(ua)}else{var wa=
+document.createElement("input");wa.setAttribute("type","checkbox");wa.style.margin="0px";wa.defaultChecked=null!=da&&0<=mxUtils.indexOf(da,fa);wa.checked=wa.defaultChecked;wa.style.background="transparent";wa.setAttribute("title",mxResources.get(wa.defaultChecked?"removeIt":"add",[fa]));mxEvent.addListener(wa,"change",function(ka){wa.checked?U.addTagsForCells(U.getSelectionCells(),[fa]):U.removeTagsForCells(U.getSelectionCells(),[fa]);mxEvent.consume(ka)});pa.appendChild(wa)}sa.appendChild(pa)}la.appendChild(sa)})(ea[ba]);
+ia.appendChild(la);W.appendChild(ia)}}var U=this,V=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);U.addListener(mxEvent.ROOT,function(){V=
U.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ea,da){if(g()){ea=U.getAllTags();for(da=0;da<ea.length;da++)0>mxUtils.indexOf(V,ea[da])&&V.push(ea[da]);V.sort();U.isSelectionEmpty()?Q(V):Q(V,U.getCommonTagsForCells(U.getSelectionCells()))}});U.selectionModel.addListener(mxEvent.CHANGE,Y);U.model.addListener(mxEvent.CHANGE,Y);U.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";
-Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle="solid";Z.style.whiteSpace="nowrap";if(U.isEnabled()){W.style.bottom="32px";var ba=document.createElement("a");ba.className="geButton";var ia=ba.cloneNode(!1);ia.style.backgroundImage="url("+Editor.visibleImage+")";ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ia,"click",function(ea){U.setHiddenTags([]);
-mxEvent.isShiftDown(ea)||(V=U.hiddenTags.slice());N();U.refresh();mxEvent.consume(ea)});Z.appendChild(ia);null!=C&&(ba=ba.cloneNode(!1),ba.style.backgroundImage="url("+Editor.plusImage+")",ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ba,"click",function(ea){C(V,function(da){V=da;Y()});mxEvent.consume(ea)}),Z.appendChild(ba));X.appendChild(Z)}null!=I&&Z.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var g=this.extFonts;g=null!=g?g.slice():[];
-for(var n in Graph.customFontElements){var C=Graph.customFontElements[n];g.push({name:C.name,url:C.url})}return g};Graph.prototype.setFont=function(g,n){Graph.addFont(g,n);var C=Editor.guid();document.execCommand("fontname",!1,C);for(var I=this.cellEditor.textarea.getElementsByTagName("font"),N=!1,O=0;O<I.length;O++)I[O].getAttribute("face")==C&&(N=!0,I[O].setAttribute("face",g),null!=n?I[O].setAttribute("data-font-src",n):I[O].removeAttribute("data-font-src"));N||document.execCommand("fontname",
-!1,g)};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var g=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=g)for(var n in g)this.globalVars[n]=g[n]}catch(C){null!=window.console&&console.log("Error in vars URL parameter: "+
-C)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(g){var n=D.apply(this,arguments);null==n&&null!=this.globalVars&&(n=this.globalVars[g]);return n};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var g=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(g.ownerDocument)).decode(g)}return this.defaultStylesheet};
-Graph.prototype.isViewer=function(){return urlParams.viewer};var B=Graph.prototype.getSvg;Graph.prototype.getSvg=function(g,n,C,I,N,O,Q,U,V,X,W,Y,Z,ba,ia,ea){var da=B.apply(this,arguments);if(null!=Y){var ja=da.getAttribute("style");null==ja&&(ja="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;da.setAttribute("style",ja+(" color-scheme: "+Y+";"))}var ma=this.getCustomFonts();if(W&&0<ma.length){var aa=da.ownerDocument;ja=null!=aa.createElementNS?
-aa.createElementNS(mxConstants.NS_SVG,"style"):aa.createElement("style");null!=aa.setAttributeNS?ja.setAttributeNS("type","text/css"):ja.setAttribute("type","text/css");for(var fa="",la="",ca=0;ca<ma.length;ca++){var va=ma[ca].name,sa=ma[ca].url;Graph.isCssFontUrl(sa)?fa+="@import url("+Graph.rewriteGoogleFontUrl(sa)+");\n":la+='@font-face {\nfont-family: "'+va+'";\nsrc: url("'+sa+'");\n}\n'}ja.appendChild(aa.createTextNode(fa+la));da.getElementsByTagName("defs")[0].appendChild(ja)}Editor.replaceSvgDataUris&&
-null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(da);this.mathEnabled&&(document.body.appendChild(da),Editor.MathJaxRender(da),da.parentNode.removeChild(da),ja=da.ownerDocument.getElementById("MJX-SVG-styles"),null!=ja&&da.getElementsByTagName("defs")[0].appendChild(ja.cloneNode(!0)));return da};var S=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(g){S.apply(this,arguments);null!=g.secondLabel&&(g.secondLabel.destroy(),g.secondLabel=
+Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle="solid";Z.style.whiteSpace="nowrap";if(U.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var ha=aa.cloneNode(!1);ha.style.backgroundImage="url("+Editor.visibleImage+")";ha.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ha,"click",function(ea){U.setHiddenTags([]);
+mxEvent.isShiftDown(ea)||(V=U.hiddenTags.slice());M();U.refresh();mxEvent.consume(ea)});Z.appendChild(ha);null!=C&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){C(V,function(da){V=da;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=I&&Z.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var g=this.extFonts;g=null!=g?g.slice():[];
+for(var p in Graph.customFontElements){var C=Graph.customFontElements[p];g.push({name:C.name,url:C.url})}return g};Graph.prototype.setFont=function(g,p){Graph.addFont(g,p);var C=Editor.guid();document.execCommand("fontname",!1,C);for(var I=this.cellEditor.textarea.getElementsByTagName("font"),M=!1,O=0;O<I.length;O++)I[O].getAttribute("face")==C&&(M=!0,I[O].setAttribute("face",g),null!=p?I[O].setAttribute("data-font-src",p):I[O].removeAttribute("data-font-src"));M||document.execCommand("fontname",
+!1,g)};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var g=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=g)for(var p in g)this.globalVars[p]=g[p]}catch(C){null!=window.console&&console.log("Error in vars URL parameter: "+
+C)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(g){var p=D.apply(this,arguments);null==p&&null!=this.globalVars&&(p=this.globalVars[g]);return p};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var g=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(g.ownerDocument)).decode(g)}return this.defaultStylesheet};
+Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(g,p,C,I,M,O,Q,U,V,X,W,Y,Z,aa,ha,ea){var da=A.apply(this,arguments);if(null!=Y){var ia=da.getAttribute("style");null==ia&&(ia="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;da.setAttribute("style",ia+(" color-scheme: "+Y+";"))}var la=this.getCustomFonts();if(W&&0<la.length){var ba=da.ownerDocument;ia=null!=ba.createElementNS?
+ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?ia.setAttributeNS("type","text/css"):ia.setAttribute("type","text/css");for(var fa="",ja="",ca=0;ca<la.length;ca++){var sa=la[ca].name,pa=la[ca].url;Graph.isCssFontUrl(pa)?fa+="@import url("+Graph.rewriteGoogleFontUrl(pa)+");\n":ja+='@font-face {\nfont-family: "'+sa+'";\nsrc: url("'+pa+'");\n}\n'}ia.appendChild(ba.createTextNode(fa+ja));da.getElementsByTagName("defs")[0].appendChild(ia)}Editor.replaceSvgDataUris&&
+null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(da);this.mathEnabled&&(document.body.appendChild(da),Editor.MathJaxRender(da),da.parentNode.removeChild(da),ia=da.ownerDocument.getElementById("MJX-SVG-styles"),null!=ia&&da.getElementsByTagName("defs")[0].appendChild(ia.cloneNode(!0)));return da};var S=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(g){S.apply(this,arguments);null!=g.secondLabel&&(g.secondLabel.destroy(),g.secondLabel=
null)};mxCellRenderer.prototype.getShapesForState=function(g){return[g.shape,g.text,g.secondLabel,g.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=0};var T=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(g){null!=g.shape&&this.redrawEnumerationState(g);return T.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(g){g=decodeURIComponent(mxUtils.getValue(g.style,
-"enumerateValue",""));""==g&&(g=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(g)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(g){var n="1"==mxUtils.getValue(g.style,"enumerate",0);n&&null==g.secondLabel?(g.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),g.secondLabel.size=12,g.secondLabel.state=g,g.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
-this.graph.cellRenderer.initializeLabel(g,g.secondLabel)):n||null==g.secondLabel||(g.secondLabel.destroy(),g.secondLabel=null);n=g.secondLabel;if(null!=n){var C=g.view.scale,I=this.createEnumerationValue(g);g=this.graph.model.isVertex(g.cell)?new mxRectangle(g.x+g.width-4*C,g.y+4*C,0,0):mxRectangle.fromPoint(g.view.getPoint(g));n.bounds.equals(g)&&n.value==I&&n.scale==C||(n.bounds=g,n.value=I,n.scale=C,n.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
-P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(g,n){"data:action/json,"==g.substring(0,17)&&(g=JSON.parse(g.substring(17)),null!=g.actions&&
-this.executeCustomActions(g.actions,null,n))};Graph.prototype.executeCustomActions=function(g,n,C){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 I=!1,N=0,O=0,Q=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,
-function(){I&&(I=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(O<g.length){var W=this.stoppingCustomActions,Y=g[O++],Z=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,C))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),N++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,
-!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){Q();var ba=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ba),1);this.setCellsVisible(ba,!0)}null!=Y.hide&&(Q(),ba=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ba),0),this.setCellsVisible(ba,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&
-(Q(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(Q(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ba=[];null!=Y.select&&this.isEnabled()&&(ba=this.getCellsForAction(Y.select),this.setSelectionCells(ba));null!=Y.highlight&&(ba=this.getCellsForAction(Y.highlight),this.highlightCells(ba,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));
-null!=Y.scroll&&(ba=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ba.length&&this.scrollCellToVisible(ba[0]);null!=C&&null!=Y.explore&&Graph.exploreFromCell(this,C,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ia=Y.tags.toggle;0==ia.length&&(ia=this.getAllTags());for(ba=0;ba<ia.length;ba++)this.toggleHiddenTag(ia[ba])}ia=null;null!=Y.tags.hidden&&(null==ia&&(ia=[]),ia=ia.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ia&&(ia=[]);var ea=
-this.getAllTags();for(ba=0;ba<ea.length;ba++)0>mxUtils.indexOf(Y.tags.visible,ea[ba])&&0>mxUtils.indexOf(ia,ea[ba])&&ia.push(ea[ba])}null!=ia&&this.setHiddenTags(ia);this.refresh()}0<Z.length&&(N++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==N?X():U()}else this.stoppingCustomActions=this.executingCustomActions=!1,U(),null!=n&&n()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(g,n){var C=this.getLinkForCell(n);null!=C&&"data:action/json,"==C.substring(0,17)&&this.setLinkForCell(n,
-this.updateCustomLink(g,C));if(this.isHtmlLabel(n)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(n));for(var N=I.getElementsByTagName("a"),O=!1,Q=0;Q<N.length;Q++)C=N[Q].getAttribute("href"),null!=C&&"data:action/json,"==C.substring(0,17)&&(N[Q].setAttribute("href",this.updateCustomLink(g,C)),O=!0);O&&this.labelChanged(n,I.innerHTML)}};Graph.prototype.updateCustomLink=function(g,n){if("data:action/json,"==n.substring(0,17))try{var C=JSON.parse(n.substring(17));
-null!=C.actions&&(this.updateCustomLinkActions(g,C.actions),n="data:action/json,"+JSON.stringify(C))}catch(I){}return n};Graph.prototype.updateCustomLinkActions=function(g,n){for(var C=0;C<n.length;C++){var I=n[C],N;for(N in I)this.updateCustomLinkAction(g,I[N],"cells"),this.updateCustomLinkAction(g,I[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(g,n,C){if(null!=n&&null!=n[C]){for(var I=[],N=0;N<n[C].length;N++)if("*"==n[C][N])I.push(n[C][N]);else{var O=g[n[C][N]];null!=O?""!=
-O&&I.push(O):I.push(n[C][N])}n[C]=I}};Graph.prototype.getCellsForAction=function(g,n){n=this.getCellsById(g.cells).concat(this.getCellsForTags(g.tags,null,n));if(null!=g.excludeCells){for(var C=[],I=0;I<n.length;I++)0>g.excludeCells.indexOf(n[I].id)&&C.push(n[I]);n=C}return n};Graph.prototype.getCellsById=function(g){var n=[];if(null!=g)for(var C=0;C<g.length;C++)if("*"==g[C]){var I=this.model.getRoot();n=n.concat(this.model.filterDescendants(function(O){return O!=I},I))}else{var N=this.model.getCell(g[C]);
-null!=N&&n.push(N)}return n};var u=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return u.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(g))};Graph.prototype.setHiddenTags=function(g){this.hiddenTags=g;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(g){var n=mxUtils.indexOf(this.hiddenTags,g);0>n?this.hiddenTags.push(g):0<=n&&this.hiddenTags.splice(n,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(g){if(null==g||0==g.length||0==this.hiddenTags.length)return!1;g=g.split(" ");if(g.length>this.hiddenTags.length)return!1;for(var n=0;n<g.length;n++)if(0>mxUtils.indexOf(this.hiddenTags,g[n]))return!1;return!0};Graph.prototype.getCellsForTags=function(g,n,C,I){var N=[];if(null!=g){n=null!=n?n:this.model.getDescendants(this.model.getRoot());for(var O=0,Q={},U=0;U<g.length;U++)0<g[U].length&&(Q[g[U]]=!0,O++);for(U=0;U<n.length;U++)if(C&&this.model.getParent(n[U])==
-this.model.root||this.model.isVertex(n[U])||this.model.isEdge(n[U])){var V=this.getTagsForCell(n[U]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=g.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=Q[V[W]]&&X++;X=X==O}X&&(1!=I||this.isCellVisible(n[U]))&&N.push(n[U])}}return N};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(g){for(var n=null,C=[],I=0;I<g.length;I++){var N=this.getTagsForCell(g[I]);
-C=[];if(0<N.length){N=N.split(" ");for(var O={},Q=0;Q<N.length;Q++)if(null==n||null!=n[N[Q]])O[N[Q]]=!0,C.push(N[Q]);n=O}else return[]}return C};Graph.prototype.getTagsForCells=function(g){for(var n=[],C={},I=0;I<g.length;I++){var N=this.getTagsForCell(g[I]);if(0<N.length){N=N.split(" ");for(var O=0;O<N.length;O++)null==C[N[O]]&&(C[N[O]]=!0,n.push(N[O]))}}return n};Graph.prototype.getTagsForCell=function(g){return this.getAttributeForCell(g,"tags","")};Graph.prototype.addTagsForCells=function(g,n){if(0<
-g.length&&0<n.length){this.model.beginUpdate();try{for(var C=0;C<g.length;C++){for(var I=this.getTagsForCell(g[C]),N=I.split(" "),O=!1,Q=0;Q<n.length;Q++){var U=mxUtils.trim(n[Q]);""!=U&&0>mxUtils.indexOf(N,U)&&(I=0<I.length?I+" "+U:U,O=!0)}O&&this.setAttributeForCell(g[C],"tags",I)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(g,n){if(0<g.length&&0<n.length){this.model.beginUpdate();try{for(var C=0;C<g.length;C++){var I=this.getTagsForCell(g[C]);if(0<I.length){for(var N=
-I.split(" "),O=!1,Q=0;Q<n.length;Q++){var U=mxUtils.indexOf(N,n[Q]);0<=U&&(N.splice(U,1),O=!0)}O&&this.setAttributeForCell(g[C],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(g){this.model.beginUpdate();try{for(var n=0;n<g.length;n++)this.model.setVisible(g[n],!this.model.isVisible(g[n]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(g,n){this.model.beginUpdate();try{for(var C=0;C<g.length;C++)this.model.setVisible(g[C],n)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(g,n,C,I){for(var N=0;N<g.length;N++)this.highlightCell(g[N],n,C,I)};Graph.prototype.highlightCell=function(g,n,C,I,N){n=null!=n?n:mxConstants.DEFAULT_VALID_COLOR;C=null!=C?C:1E3;g=this.view.getState(g);var O=null;null!=g&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)+N),O=new mxCellHighlight(this,n,N,!1),null!=I&&(O.opacity=I),O.highlight(g),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,
-"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},C));return O};Graph.prototype.addSvgShadow=function(g,n,C,I){I=null!=I?I:!0;var N=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=C&&C||(n=null!=n?n:g.getElementsByTagName("g")[0],null!=n&&(this.updateShadowFilter(n,!0),!isNaN(parseInt(g.getAttribute("width")))&&I&&(g.setAttribute("width",parseInt(g.getAttribute("width"))+N),g.setAttribute("height",parseInt(g.getAttribute("height"))+
-N),n=g.getAttribute("viewBox"),null!=n&&0<n.length&&(n=n.split(" "),3<n.length&&(w=parseFloat(n[2])+N,h=parseFloat(n[3])+N,g.setAttribute("viewBox",n[0]+" "+n[1]+" "+w+" "+h))))));return N};Graph.prototype.updateShadowFilter=function(g,n){mxClient.IS_SF||(n?(n=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),g.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+n.cssText+
-")"):g.style.filter="")};Graph.prototype.setShadowVisible=function(g,n){n=null!=n?n:!0;this.shadowVisible=g;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);n&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var g=this.model.getChildCount(this.model.root),
-n=0;do var C=this.model.getChildAt(this.model.root,n);while(n++<g&&"1"==mxUtils.getValue(this.getCellStyle(C),"locked","0"));null!=C&&this.setDefaultParent(C)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+
+"enumerateValue",""));""==g&&(g=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(g)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(g){var p="1"==mxUtils.getValue(g.style,"enumerate",0);p&&null==g.secondLabel?(g.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),g.secondLabel.size=12,g.secondLabel.state=g,g.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
+this.graph.cellRenderer.initializeLabel(g,g.secondLabel)):p||null==g.secondLabel||(g.secondLabel.destroy(),g.secondLabel=null);p=g.secondLabel;if(null!=p){var C=g.view.scale,I=this.createEnumerationValue(g);g=this.graph.model.isVertex(g.cell)?new mxRectangle(g.x+g.width-4*C,g.y+4*C,0,0):mxRectangle.fromPoint(g.view.getPoint(g));p.bounds.equals(g)&&p.value==I&&p.scale==C||(p.bounds=g,p.value=I,p.scale=C,p.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
+P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(g,p){"data:action/json,"==g.substring(0,17)&&(g=JSON.parse(g.substring(17)),null!=g.actions&&
+this.executeCustomActions(g.actions,null,p))};Graph.prototype.executeCustomActions=function(g,p,C){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 I=!1,M=0,O=0,Q=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,
+function(){I&&(I=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(O<g.length){var W=this.stoppingCustomActions,Y=g[O++],Z=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,C))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,
+!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){Q();var aa=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Y.hide&&(Q(),aa=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&
+(Q(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(Q(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));aa=[];null!=Y.select&&this.isEnabled()&&(aa=this.getCellsForAction(Y.select),this.setSelectionCells(aa));null!=Y.highlight&&(aa=this.getCellsForAction(Y.highlight),this.highlightCells(aa,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));
+null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);null!=C&&null!=Y.explore&&Graph.exploreFromCell(this,C,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ha=Y.tags.toggle;0==ha.length&&(ha=this.getAllTags());for(aa=0;aa<ha.length;aa++)this.toggleHiddenTag(ha[aa])}ha=null;null!=Y.tags.hidden&&(null==ha&&(ha=[]),ha=ha.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ha&&(ha=[]);var ea=
+this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(ha,ea[aa])&&ha.push(ea[aa])}null!=ha&&this.setHiddenTags(ha);this.refresh()}0<Z.length&&(M++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==M?X():U()}else this.stoppingCustomActions=this.executingCustomActions=!1,U(),null!=p&&p()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(g,p){var C=this.getLinkForCell(p);null!=C&&"data:action/json,"==C.substring(0,17)&&this.setLinkForCell(p,
+this.updateCustomLink(g,C));if(this.isHtmlLabel(p)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(p));for(var M=I.getElementsByTagName("a"),O=!1,Q=0;Q<M.length;Q++)C=M[Q].getAttribute("href"),null!=C&&"data:action/json,"==C.substring(0,17)&&(M[Q].setAttribute("href",this.updateCustomLink(g,C)),O=!0);O&&this.labelChanged(p,I.innerHTML)}};Graph.prototype.updateCustomLink=function(g,p){if("data:action/json,"==p.substring(0,17))try{var C=JSON.parse(p.substring(17));
+null!=C.actions&&(this.updateCustomLinkActions(g,C.actions),p="data:action/json,"+JSON.stringify(C))}catch(I){}return p};Graph.prototype.updateCustomLinkActions=function(g,p){for(var C=0;C<p.length;C++){var I=p[C],M;for(M in I)this.updateCustomLinkAction(g,I[M],"cells"),this.updateCustomLinkAction(g,I[M],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(g,p,C){if(null!=p&&null!=p[C]){for(var I=[],M=0;M<p[C].length;M++)if("*"==p[C][M])I.push(p[C][M]);else{var O=g[p[C][M]];null!=O?""!=
+O&&I.push(O):I.push(p[C][M])}p[C]=I}};Graph.prototype.getCellsForAction=function(g,p){p=this.getCellsById(g.cells).concat(this.getCellsForTags(g.tags,null,p));if(null!=g.excludeCells){for(var C=[],I=0;I<p.length;I++)0>g.excludeCells.indexOf(p[I].id)&&C.push(p[I]);p=C}return p};Graph.prototype.getCellsById=function(g){var p=[];if(null!=g)for(var C=0;C<g.length;C++)if("*"==g[C]){var I=this.model.getRoot();p=p.concat(this.model.filterDescendants(function(O){return O!=I},I))}else{var M=this.model.getCell(g[C]);
+null!=M&&p.push(M)}return p};var u=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return u.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(g))};Graph.prototype.setHiddenTags=function(g){this.hiddenTags=g;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(g){var p=mxUtils.indexOf(this.hiddenTags,g);0>p?this.hiddenTags.push(g):0<=p&&this.hiddenTags.splice(p,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.isAllTagsHidden=function(g){if(null==g||0==g.length||0==this.hiddenTags.length)return!1;g=g.split(" ");if(g.length>this.hiddenTags.length)return!1;for(var p=0;p<g.length;p++)if(0>mxUtils.indexOf(this.hiddenTags,g[p]))return!1;return!0};Graph.prototype.getCellsForTags=function(g,p,C,I){var M=[];if(null!=g){p=null!=p?p:this.model.getDescendants(this.model.getRoot());for(var O=0,Q={},U=0;U<g.length;U++)0<g[U].length&&(Q[g[U]]=!0,O++);for(U=0;U<p.length;U++)if(C&&this.model.getParent(p[U])==
+this.model.root||this.model.isVertex(p[U])||this.model.isEdge(p[U])){var V=this.getTagsForCell(p[U]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=g.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=Q[V[W]]&&X++;X=X==O}X&&(1!=I||this.isCellVisible(p[U]))&&M.push(p[U])}}return M};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(g){for(var p=null,C=[],I=0;I<g.length;I++){var M=this.getTagsForCell(g[I]);
+C=[];if(0<M.length){M=M.split(" ");for(var O={},Q=0;Q<M.length;Q++)if(null==p||null!=p[M[Q]])O[M[Q]]=!0,C.push(M[Q]);p=O}else return[]}return C};Graph.prototype.getTagsForCells=function(g){for(var p=[],C={},I=0;I<g.length;I++){var M=this.getTagsForCell(g[I]);if(0<M.length){M=M.split(" ");for(var O=0;O<M.length;O++)null==C[M[O]]&&(C[M[O]]=!0,p.push(M[O]))}}return p};Graph.prototype.getTagsForCell=function(g){return this.getAttributeForCell(g,"tags","")};Graph.prototype.addTagsForCells=function(g,p){if(0<
+g.length&&0<p.length){this.model.beginUpdate();try{for(var C=0;C<g.length;C++){for(var I=this.getTagsForCell(g[C]),M=I.split(" "),O=!1,Q=0;Q<p.length;Q++){var U=mxUtils.trim(p[Q]);""!=U&&0>mxUtils.indexOf(M,U)&&(I=0<I.length?I+" "+U:U,O=!0)}O&&this.setAttributeForCell(g[C],"tags",I)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(g,p){if(0<g.length&&0<p.length){this.model.beginUpdate();try{for(var C=0;C<g.length;C++){var I=this.getTagsForCell(g[C]);if(0<I.length){for(var M=
+I.split(" "),O=!1,Q=0;Q<p.length;Q++){var U=mxUtils.indexOf(M,p[Q]);0<=U&&(M.splice(U,1),O=!0)}O&&this.setAttributeForCell(g[C],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(g){this.model.beginUpdate();try{for(var p=0;p<g.length;p++)this.model.setVisible(g[p],!this.model.isVisible(g[p]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(g,p){this.model.beginUpdate();try{for(var C=0;C<g.length;C++)this.model.setVisible(g[C],p)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(g,p,C,I){for(var M=0;M<g.length;M++)this.highlightCell(g[M],p,C,I)};Graph.prototype.highlightCell=function(g,p,C,I,M){p=null!=p?p:mxConstants.DEFAULT_VALID_COLOR;C=null!=C?C:1E3;g=this.view.getState(g);var O=null;null!=g&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)+M),O=new mxCellHighlight(this,p,M,!1),null!=I&&(O.opacity=I),O.highlight(g),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,
+"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},C));return O};Graph.prototype.addSvgShadow=function(g,p,C,I){I=null!=I?I:!0;var M=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=C&&C||(p=null!=p?p:g.getElementsByTagName("g")[0],null!=p&&(this.updateShadowFilter(p,!0),!isNaN(parseInt(g.getAttribute("width")))&&I&&(g.setAttribute("width",parseInt(g.getAttribute("width"))+M),g.setAttribute("height",parseInt(g.getAttribute("height"))+
+M),p=g.getAttribute("viewBox"),null!=p&&0<p.length&&(p=p.split(" "),3<p.length&&(w=parseFloat(p[2])+M,h=parseFloat(p[3])+M,g.setAttribute("viewBox",p[0]+" "+p[1]+" "+w+" "+h))))));return M};Graph.prototype.updateShadowFilter=function(g,p){mxClient.IS_SF||(p?(p=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),g.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+p.cssText+
+")"):g.style.filter="")};Graph.prototype.setShadowVisible=function(g,p){p=null!=p?p:!0;this.shadowVisible=g;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);p&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var g=this.model.getChildCount(this.model.root),
+p=0;do var C=this.model.getChildAt(this.model.root,p);while(p++<g&&"1"==mxUtils.getValue(this.getCellStyle(C),"locked","0"));null!=C&&this.setDefaultParent(C)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+
"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+
"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];
mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",
@@ -12785,363 +12787,363 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.networks2=[SHAPES_PATH+"/mxNetworks2.js",
STENCIL_PATH+"/networks2.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];
-mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(g){var n=null;null!=g&&0<g.length&&("ER"==g.substring(0,2)?n="mxgraph.er":"sysML"==g.substring(0,5)&&(n="mxgraph.sysml"));return n};var J=mxMarker.createMarker;mxMarker.createMarker=function(g,n,C,I,N,O,Q,U,V,X){if(null!=C&&null==mxMarker.markers[C]){var W=this.getPackageForType(C);null!=W&&mxStencilRegistry.getStencil(W)}return J.apply(this,
-arguments)};var G=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(g,n,C,I,N,O){"1"==mxUtils.getValue(n.style,"lineShape",null)&&g.setFillColor(mxUtils.getValue(n.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return G.apply(this,arguments)};PrintDialog.prototype.create=function(g,n,C,I){function N(){ia.value=Math.max(1,Math.min(W,Math.max(parseInt(ia.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(W,Math.min(parseInt(ia.value),parseInt(ba.value))))}function O(Ba){g.lastPrintPagesRadioChecked=
-Z.checked;g.lastPrintSelectionOnlyChecked=da.checked;g.lastPrintCropRadioChecked=ma.checked;g.lastPrintFitRadioChecked=aa.checked;Z.checked&&ba.value<ia.value?(g.lastPrintPagesFromInput=ba.value,g.lastPrintPagesToInput=ia.value):(g.lastPrintPagesFromInput=null,g.lastPrintPagesToInput=null);za.value=Math.max(1,Math.min(1600,parseInt(za.value)))+"%";g.lastPrintZoom=za.value;g.lastPrintBorder=ta.value;g.lastPrintGrid=Ca.checked;g.lastPrintTransparent=Aa.checked;g.lastPrintInclude=Da.checked;g.lastPrintSheetsAcross=
-na.value;g.lastPrintSheetsDown=xa.value;var Ia={};Ia.border=parseInt(ta.value);Ia.scale=parseInt(za.value)/100;Ia.grid=Ca.checked;Ia.shadows=Ga.checked;Ia.transparent=Aa.checked;Ia.includeCopy=Da.checked;Ia.sheetsAcross=parseInt(na.value);Ia.sheetsDown=parseInt(xa.value);Ia.pagesFrom=parseInt(ba.value);Ia.pagesTo=parseInt(ia.value);Ia.allPages=Y.checked;Ia.selection=da.checked;Ia.pageView=ja.checked;Ia.crop=ma.checked;Ia.fit=aa.checked;return null!=C?C(!Ba,Ia):g.print(!Ba,Ia)}var Q=g.editor.graph,
-U=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,n||mxResources.get("print"));U.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);n=document.createElement("span");mxUtils.write(n,mxResources.get("allPages"));
-mxEvent.addListener(n,"click",function(){Y.checked=!0});V.appendChild(n);mxUtils.br(V);var Z=Y.cloneNode(!0);V.appendChild(Z);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");V.appendChild(n);mxEvent.addListener(n,"click",function(){Z.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";V.appendChild(ba);n=document.createElement("span");
-mxUtils.write(n,mxResources.get("to"));V.appendChild(n);var ia=ba.cloneNode(!0);V.appendChild(ia);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(ia,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",N);mxEvent.addListener(ia,"change",N);if(null!=g.pages&&(W=g.pages.length,null!=g.currentPage))for(var ea=0;ea<W;ea++)if(g.currentPage==g.pages[ea]){X=ea+1;break}null!=g.lastPrintPagesFromInput&&null!=g.lastPrintPagesToInput?(ba.value=Math.min(W,Math.max(1,
-g.lastPrintPagesFromInput)),ia.value=Math.min(W,Math.max(1,g.lastPrintPagesToInput))):(ba.value=X,ia.value=X);ba.setAttribute("max",W);ia.setAttribute("max",W);ea=mxUtils.button(mxResources.get("currentPage"),function(Ba){ba.value=X;ia.value=X;Z.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";V.appendChild(ea);1<W&&U.appendChild(V);V=document.createElement("div");
-V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var da=document.createElement("input");da.setAttribute("name","pages-printdialog");da.setAttribute("type",1==W?"checkbox":"radio");da.style.marginRight="8px";Q.isSelectionEmpty()&&da.setAttribute("disabled","disabled");Q.isEnabled()&&(V.appendChild(da),n=document.createElement("span"),mxUtils.write(n,mxResources.get("selectionOnly")),V.appendChild(n));(Q.isEnabled()||1<W)&&
-U.appendChild(V);!g.isPagesEnabled()||g.lastPrintPagesRadioChecked?Z.checked=!0:!Q.isSelectionEmpty()&&g.lastPrintSelectionOnlyChecked?da.checked=!0:Y.checked=!0;Q.isSelectionEmpty()||mxEvent.addListener(n,"click",function(){da.checked=!da.checked});Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ja=document.createElement("input");ja.style.marginBottom="8px";ja.style.marginRight="8px";ja.setAttribute("type","radio");ja.setAttribute("name","printSize");Q.appendChild(ja);n=document.createElement("span");
-mxUtils.write(n,mxResources.get("pageView"));Q.appendChild(n);mxEvent.addListener(Q,"click",function(){ja.checked=!0});U.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ma=document.createElement("input");ma.style.marginBottom="8px";ma.style.marginRight="8px";ma.setAttribute("type","radio");ma.setAttribute("name","printSize");Q.appendChild(ma);n=document.createElement("span");mxUtils.write(n,mxResources.get("crop"));Q.appendChild(n);mxEvent.addListener(Q,"click",function(){ma.checked=
-!0});U.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");n=document.createElement("div");n.style.display="inline-block";n.style.verticalAlign="top";n.style.paddingTop="2px";n.appendChild(aa);Q.appendChild(n);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ea=document.createElement("tbody");
-var fa=document.createElement("tr"),la=fa.cloneNode(!0),ca=document.createElement("td"),va=ca.cloneNode(!0),sa=ca.cloneNode(!0),wa=ca.cloneNode(!0),pa=ca.cloneNode(!0),ka=ca.cloneNode(!0);ca.style.textAlign="right";wa.style.textAlign="right";mxUtils.write(ca,mxResources.get("fitTo"));mxEvent.addListener(Q,"click",function(Ba){mxEvent.getSource(Ba)!=aa&&(aa.checked=!aa.checked)});var na=document.createElement("input");na.style.margin="0 2px";na.style.boxSizing="border-box";na.setAttribute("value",
-g.lastPrintSheetsAcross||"1");na.setAttribute("min","1");na.setAttribute("type","number");na.style.width="40px";va.appendChild(na);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));sa.appendChild(n);mxUtils.write(wa,mxResources.get("fitToBy"));var xa=na.cloneNode(!0);xa.setAttribute("value",g.lastPrintSheetsDown||"1");pa.appendChild(xa);mxEvent.addListener(na,"click",function(Ba){aa.checked=!0;mxEvent.consume(Ba)});mxEvent.addListener(xa,"click",function(Ba){aa.checked=
-!0;mxEvent.consume(Ba)});g.lastPrintCropRadioChecked?ma.checked=!0:g.lastPrintFitRadioChecked?aa.checked=!0:ja.checked=!0;n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsDown"));ka.appendChild(n);fa.appendChild(ca);fa.appendChild(va);fa.appendChild(sa);la.appendChild(wa);la.appendChild(pa);la.appendChild(ka);ea.appendChild(fa);ea.appendChild(la);V.appendChild(ea);Q.appendChild(V);U.appendChild(Q);Q=document.createElement("div");Q.style.borderTop="1px solid lightGray";
-Q.style.whiteSpace="nowrap";Q.style.paddingTop="12px";Q.style.marginTop="12px";Q.style.paddingLeft="8px";mxUtils.write(Q,mxResources.get("borderWidth")+":");var ta=document.createElement("input");ta.setAttribute("type","number");ta.setAttribute("min","0");ta.style.width="40px";ta.style.marginLeft="4px";ta.value=null!=g.lastPrintBorder?g.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Q.appendChild(ta);n=document.createElement("span");n.style.marginLeft="8px";mxUtils.write(n,mxResources.get("zoom")+
-":");Q.appendChild(n);var za=document.createElement("input");za.style.width="60px";za.style.marginLeft="4px";za.value=null!=g.lastPrintZoom?g.lastPrintZoom:"100%";Q.appendChild(za);mxUtils.br(Q);var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="12px";Ca.checked=null!=g.lastPrintGrid?g.lastPrintGrid:!1;Q.appendChild(Ca);n=document.createElement("span");n.style.marginLeft="4px";n.style.marginRight="8px";mxUtils.write(n,mxResources.get("grid"));Q.appendChild(n);
-mxEvent.addListener(n,"click",function(Ba){Ca.checked=!0;mxEvent.consume(Ba)});var Ga=document.createElement("input");Ga.setAttribute("type","checkbox");Ga.style.marginTop="12px";Ga.checked=null!=g.lastPrintShadow?g.lastPrintShadow:!1;Q.appendChild(Ga);n=document.createElement("span");n.style.marginLeft="4px";n.style.marginRight="8px";mxUtils.write(n,mxResources.get("shadows"));Q.appendChild(n);g.isOffline()&&!mxClient.IS_CHROMEAPP||n.appendChild(g.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
-mxEvent.addListener(n,"click",function(Ba){"IMG"!=mxEvent.getSource(Ba).nodeName&&(Ga.checked=!0,mxEvent.consume(Ba))});Editor.enableShadowOption?null!=C&&mxUtils.br(Q):(Ga.style.display="none",n.style.display="none");var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.marginTop="10px";Aa.checked=null!=g.lastPrintTransparent?g.lastPrintTransparent:!1;null!=C&&(Q.appendChild(Aa),n=document.createElement("span"),n.style.marginLeft="4px",mxUtils.write(n,mxResources.get("transparentBackground")),
-Q.appendChild(n),mxEvent.addListener(n,"click",function(Ba){Aa.checked=!0;mxEvent.consume(Ba)}));var Da=document.createElement("input");Da.setAttribute("type","checkbox");Da.style.marginTop="10px";Da.checked=null!=g.lastPrintInclude?g.lastPrintInclude:Editor.defaultIncludeDiagram;null==C||mxClient.IS_CHROMEAPP||"draw.io"!=g.getServiceName()||(mxUtils.br(Q),Q.appendChild(Da),n=document.createElement("span"),n.style.marginLeft="4px",mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram")),Q.appendChild(n),
-mxEvent.addListener(n,"click",function(Ba){Da.checked=!0;mxEvent.consume(Ba)}));U.appendChild(Q);n=document.createElement("div");n.style.marginTop="30px";n.style.textAlign="right";n.style.whiteSpace="nowrap";g.isOffline()&&!mxClient.IS_CHROMEAPP||null!=C||n.appendChild(g.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Q=mxUtils.button(mxResources.get("cancel"),function(){g.hideDialog()});Q.className="geBtn";g.editor.cancelFirst&&n.appendChild(Q);PrintDialog.previewEnabled&&null==C&&
-(V=mxUtils.button(mxResources.get("preview"),function(){try{g.hideDialog(),O(!1)}catch(Ba){g.handleError(Ba)}}),V.className="geBtn",n.appendChild(V));I=null!=I?I:null!=C?"export":PrintDialog.previewEnabled?"print":"ok";I=mxUtils.button(mxResources.get(I),function(){try{g.hideDialog(),O(!0)}catch(Ba){g.handleError(Ba)}});I.className="geBtn gePrimaryBtn";n.appendChild(I);g.editor.cancelFirst||n.appendChild(Q);U.appendChild(n);if(g.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(U.classList.add("geDarkMode"),
-U.style.colorScheme="dark"):(U.classList.remove("geDarkMode"),U.style.colorScheme="light")};g.addListener("darkModeChanged",Ka);Ka();var Na=function(Ba,Ia){Ba=Ia.getProperty("dialog");U.parentNode==Ba.container&&(g.editor.removeListener(Na),g.removeListener(Ka))};g.editor.addListener("hideDialog",Na)}this.container=U};var H=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(g){var p=null;null!=g&&0<g.length&&("ER"==g.substring(0,2)?p="mxgraph.er":"sysML"==g.substring(0,5)&&(p="mxgraph.sysml"));return p};var J=mxMarker.createMarker;mxMarker.createMarker=function(g,p,C,I,M,O,Q,U,V,X){if(null!=C&&null==mxMarker.markers[C]){var W=this.getPackageForType(C);null!=W&&mxStencilRegistry.getStencil(W)}return J.apply(this,
+arguments)};var G=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(g,p,C,I,M,O){"1"==mxUtils.getValue(p.style,"lineShape",null)&&g.setFillColor(mxUtils.getValue(p.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return G.apply(this,arguments)};PrintDialog.prototype.create=function(g,p,C,I){function M(){ha.value=Math.max(1,Math.min(W,Math.max(parseInt(ha.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(ha.value),parseInt(aa.value))))}function O(Da){g.lastPrintPagesRadioChecked=
+Z.checked;g.lastPrintSelectionOnlyChecked=da.checked;g.lastPrintCropRadioChecked=la.checked;g.lastPrintFitRadioChecked=ba.checked;Z.checked&&aa.value<ha.value?(g.lastPrintPagesFromInput=aa.value,g.lastPrintPagesToInput=ha.value):(g.lastPrintPagesFromInput=null,g.lastPrintPagesToInput=null);ya.value=Math.max(1,Math.min(1600,parseInt(ya.value)))+"%";g.lastPrintZoom=ya.value;g.lastPrintBorder=ra.value;g.lastPrintGrid=Ca.checked;g.lastPrintTransparent=Ba.checked;g.lastPrintInclude=Fa.checked;g.lastPrintSheetsAcross=
+na.value;g.lastPrintSheetsDown=za.value;var Ia={};Ia.border=parseInt(ra.value);Ia.scale=parseInt(ya.value)/100;Ia.grid=Ca.checked;Ia.shadows=Ha.checked;Ia.transparent=Ba.checked;Ia.includeCopy=Fa.checked;Ia.sheetsAcross=parseInt(na.value);Ia.sheetsDown=parseInt(za.value);Ia.pagesFrom=parseInt(aa.value);Ia.pagesTo=parseInt(ha.value);Ia.allPages=Y.checked;Ia.selection=da.checked;Ia.pageView=ia.checked;Ia.crop=la.checked;Ia.fit=ba.checked;return null!=C?C(!Da,Ia):g.print(!Da,Ia)}var Q=g.editor.graph,
+U=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,p||mxResources.get("print"));U.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);p=document.createElement("span");mxUtils.write(p,mxResources.get("allPages"));
+mxEvent.addListener(p,"click",function(){Y.checked=!0});V.appendChild(p);mxUtils.br(V);var Z=Y.cloneNode(!0);V.appendChild(Z);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");V.appendChild(p);mxEvent.addListener(p,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";V.appendChild(aa);p=document.createElement("span");
+mxUtils.write(p,mxResources.get("to"));V.appendChild(p);var ha=aa.cloneNode(!0);V.appendChild(ha);mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ha,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",M);mxEvent.addListener(ha,"change",M);if(null!=g.pages&&(W=g.pages.length,null!=g.currentPage))for(var ea=0;ea<W;ea++)if(g.currentPage==g.pages[ea]){X=ea+1;break}null!=g.lastPrintPagesFromInput&&null!=g.lastPrintPagesToInput?(aa.value=Math.min(W,Math.max(1,
+g.lastPrintPagesFromInput)),ha.value=Math.min(W,Math.max(1,g.lastPrintPagesToInput))):(aa.value=X,ha.value=X);aa.setAttribute("max",W);ha.setAttribute("max",W);ea=mxUtils.button(mxResources.get("currentPage"),function(Da){aa.value=X;ha.value=X;Z.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";V.appendChild(ea);1<W&&U.appendChild(V);V=document.createElement("div");
+V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var da=document.createElement("input");da.setAttribute("name","pages-printdialog");da.setAttribute("type",1==W?"checkbox":"radio");da.style.marginRight="8px";Q.isSelectionEmpty()&&da.setAttribute("disabled","disabled");Q.isEnabled()&&(V.appendChild(da),p=document.createElement("span"),mxUtils.write(p,mxResources.get("selectionOnly")),V.appendChild(p));(Q.isEnabled()||1<W)&&
+U.appendChild(V);!g.isPagesEnabled()||g.lastPrintPagesRadioChecked?Z.checked=!0:!Q.isSelectionEmpty()&&g.lastPrintSelectionOnlyChecked?da.checked=!0:Y.checked=!0;Q.isSelectionEmpty()||mxEvent.addListener(p,"click",function(){da.checked=!da.checked});Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");Q.appendChild(ia);p=document.createElement("span");
+mxUtils.write(p,mxResources.get("pageView"));Q.appendChild(p);mxEvent.addListener(Q,"click",function(){ia.checked=!0});U.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var la=document.createElement("input");la.style.marginBottom="8px";la.style.marginRight="8px";la.setAttribute("type","radio");la.setAttribute("name","printSize");Q.appendChild(la);p=document.createElement("span");mxUtils.write(p,mxResources.get("crop"));Q.appendChild(p);mxEvent.addListener(Q,"click",function(){la.checked=
+!0});U.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="top";p.style.paddingTop="2px";p.appendChild(ba);Q.appendChild(p);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ea=document.createElement("tbody");
+var fa=document.createElement("tr"),ja=fa.cloneNode(!0),ca=document.createElement("td"),sa=ca.cloneNode(!0),pa=ca.cloneNode(!0),ua=ca.cloneNode(!0),wa=ca.cloneNode(!0),ka=ca.cloneNode(!0);ca.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ca,mxResources.get("fitTo"));mxEvent.addListener(Q,"click",function(Da){mxEvent.getSource(Da)!=ba&&(ba.checked=!ba.checked)});var na=document.createElement("input");na.style.margin="0 2px";na.style.boxSizing="border-box";na.setAttribute("value",
+g.lastPrintSheetsAcross||"1");na.setAttribute("min","1");na.setAttribute("type","number");na.style.width="40px";sa.appendChild(na);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));pa.appendChild(p);mxUtils.write(ua,mxResources.get("fitToBy"));var za=na.cloneNode(!0);za.setAttribute("value",g.lastPrintSheetsDown||"1");wa.appendChild(za);mxEvent.addListener(na,"click",function(Da){ba.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(za,"click",function(Da){ba.checked=
+!0;mxEvent.consume(Da)});g.lastPrintCropRadioChecked?la.checked=!0:g.lastPrintFitRadioChecked?ba.checked=!0:ia.checked=!0;p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));ka.appendChild(p);fa.appendChild(ca);fa.appendChild(sa);fa.appendChild(pa);ja.appendChild(ua);ja.appendChild(wa);ja.appendChild(ka);ea.appendChild(fa);ea.appendChild(ja);V.appendChild(ea);Q.appendChild(V);U.appendChild(Q);Q=document.createElement("div");Q.style.borderTop="1px solid lightGray";
+Q.style.whiteSpace="nowrap";Q.style.paddingTop="12px";Q.style.marginTop="12px";Q.style.paddingLeft="8px";mxUtils.write(Q,mxResources.get("borderWidth")+":");var ra=document.createElement("input");ra.setAttribute("type","number");ra.setAttribute("min","0");ra.style.width="40px";ra.style.marginLeft="4px";ra.value=null!=g.lastPrintBorder?g.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Q.appendChild(ra);p=document.createElement("span");p.style.marginLeft="8px";mxUtils.write(p,mxResources.get("zoom")+
+":");Q.appendChild(p);var ya=document.createElement("input");ya.style.width="60px";ya.style.marginLeft="4px";ya.value=null!=g.lastPrintZoom?g.lastPrintZoom:"100%";Q.appendChild(ya);mxUtils.br(Q);var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="12px";Ca.checked=null!=g.lastPrintGrid?g.lastPrintGrid:!1;Q.appendChild(Ca);p=document.createElement("span");p.style.marginLeft="4px";p.style.marginRight="8px";mxUtils.write(p,mxResources.get("grid"));Q.appendChild(p);
+mxEvent.addListener(p,"click",function(Da){Ca.checked=!0;mxEvent.consume(Da)});var Ha=document.createElement("input");Ha.setAttribute("type","checkbox");Ha.style.marginTop="12px";Ha.checked=null!=g.lastPrintShadow?g.lastPrintShadow:!1;Q.appendChild(Ha);p=document.createElement("span");p.style.marginLeft="4px";p.style.marginRight="8px";mxUtils.write(p,mxResources.get("shadows"));Q.appendChild(p);g.isOffline()&&!mxClient.IS_CHROMEAPP||p.appendChild(g.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));
+mxEvent.addListener(p,"click",function(Da){"IMG"!=mxEvent.getSource(Da).nodeName&&(Ha.checked=!0,mxEvent.consume(Da))});Editor.enableShadowOption?null!=C&&mxUtils.br(Q):(Ha.style.display="none",p.style.display="none");var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="10px";Ba.checked=null!=g.lastPrintTransparent?g.lastPrintTransparent:!1;null!=C&&(Q.appendChild(Ba),p=document.createElement("span"),p.style.marginLeft="4px",mxUtils.write(p,mxResources.get("transparentBackground")),
+Q.appendChild(p),mxEvent.addListener(p,"click",function(Da){Ba.checked=!0;mxEvent.consume(Da)}));var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.marginTop="10px";Fa.checked=null!=g.lastPrintInclude?g.lastPrintInclude:Editor.defaultIncludeDiagram;null==C||mxClient.IS_CHROMEAPP||"draw.io"!=g.getServiceName()||(mxUtils.br(Q),Q.appendChild(Fa),p=document.createElement("span"),p.style.marginLeft="4px",mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram")),Q.appendChild(p),
+mxEvent.addListener(p,"click",function(Da){Fa.checked=!0;mxEvent.consume(Da)}));U.appendChild(Q);p=document.createElement("div");p.style.marginTop="30px";p.style.textAlign="right";p.style.whiteSpace="nowrap";g.isOffline()&&!mxClient.IS_CHROMEAPP||null!=C||p.appendChild(g.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Q=mxUtils.button(mxResources.get("cancel"),function(){g.hideDialog()});Q.className="geBtn";g.editor.cancelFirst&&p.appendChild(Q);PrintDialog.previewEnabled&&null==C&&
+(V=mxUtils.button(mxResources.get("preview"),function(){try{g.hideDialog(),O(!1)}catch(Da){g.handleError(Da)}}),V.className="geBtn",p.appendChild(V));I=null!=I?I:null!=C?"export":PrintDialog.previewEnabled?"print":"ok";I=mxUtils.button(mxResources.get(I),function(){try{g.hideDialog(),O(!0)}catch(Da){g.handleError(Da)}});I.className="geBtn gePrimaryBtn";p.appendChild(I);g.editor.cancelFirst||p.appendChild(Q);U.appendChild(p);if(g.editor.isChromelessView()){var Pa=function(){Editor.isDarkMode()?(U.classList.add("geDarkMode"),
+U.style.colorScheme="dark"):(U.classList.remove("geDarkMode"),U.style.colorScheme="light")};g.addListener("darkModeChanged",Pa);Pa();var Aa=function(Da,Ia){Da=Ia.getProperty("dialog");U.parentNode==Da.container&&(g.editor.removeListener(Aa),g.removeListener(Pa))};g.editor.addListener("hideDialog",Aa)}this.container=U};var H=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
(this.page.viewState.background=this.color);if(!this.ignoreImage){var g=this.image;null!=g&&null!=g.src&&Graph.isPageLink(g.src)&&(g={originalSrc:g.src});this.page.viewState.backgroundImage=g}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else H.apply(this,
arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(g=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=g?g:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.8";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
-"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||"1"==urlParams.dev;EditorUi.isElectronApp=
-null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
-EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',
-numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,f,k,m,t,v,A){if(null!=c){t=null!=t?t:Error(c);t.stack=null!=t.stack?t.stack:"";v=null!=v?v:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>t.stack.indexOf("extension:")&&
-0>t.stack.indexOf("<anonymous>:")&&0>t.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+v+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=m?":colno:"+encodeURIComponent(m):"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(E){}try{A||null==window.console||console.error(v,
-c,f,k,m,t)}catch(E){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(k){}};EditorUi.sendReport=function(c,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,
-f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);mxClient.IS_IOS?(mxLog.show(),mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(k){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};
-EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var f=[],k=0;k<c.length;k++)f.push(c[k]);for(k=0;k<f.length;k++)EditorUi.replaceSvgImage(f[k])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(f);if(null!=k&&"svg"==k.nodeName){var m=k.getAttribute("width"),t=k.getAttribute("height");k.setAttribute("x",c.getAttribute("x"));k.setAttribute("y",
-c.getAttribute("y"));k.setAttribute("width",c.getAttribute("width"));k.setAttribute("height",c.getAttribute("height"));k.style.fontFamily="initial";0<m&&0<t&&null==k.getAttribute("viewBox")&&k.setAttribute("viewBox","0 0 "+m+" "+t);var v=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");v.appendChild(k);c.hasAttribute("transform")&&v.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(v,c)}}catch(A){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);
-c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var k="svg-image-"+Editor.guid();c.setAttribute("id",k);for(var m=document.implementation.createHTMLDocument(""),t=document.createElement("style"),v=0;v<f.length;v++){t.textContent=f[v].textContent;m.body.appendChild(t);for(var A="",E=0;E<t.sheet.cssRules.length;E++){var D=t.sheet.cssRules[E];if(null!=D.selectorText){for(var B=D.selectorText.split(","),S=0;S<B.length;S++)B[S]=
-"#"+k+" "+B[S];D.selectorText=B.join(",")}A+=D.cssText+"\n"}f[v].textContent=A}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");f=c.getElementsByTagName("*");for(k=0;k<f.length;k++)f[k].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;
-EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=
-1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme=
-"auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,f,k){return this.editor.graph.openLink(c,f,k)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=
-function(c,f,k){localStorage.setItem(c,f);null!=k&&k()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=
-function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||
-!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,k){var m=null==c||null==f;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=this.timeout,A=t.spin,E=null,D=null,B=mxUtils.bind(this,
-function(T){null!=T&&T()}),S=this;t.spin=function(T,P,q,u){u=null!=u?u:v;var J=!1;if(!this.active){var G=Date.now();null!=q&&(E=window.setTimeout(function(){t.stop();E=null;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},u));m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);T==document.body&&"1"==urlParams.embedInline&&(T=S.diagramContainer,c=T.scrollLeft+T.clientWidth/2,f=T.scrollTop+T.clientHeight/2);
-A.call(this,T);"1"==urlParams.embedInline&&null!=t.el&&(t.el.style.marginTop=T.scrollTop+"px",t.el.style.marginLeft=T.scrollLeft+"px");this.active=!0;null!=P&&(J=document.createElement("div"),J.className="geSpinnerStatus",J.setAttribute("title",P),T==document.body?(J.style.left=Math.max(0,c)+"px",J.style.top=Math.max(0,f+66)+"px"):(J.style.left="50%",J.style.top="50%",J.style.marginTop="70px"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),J.innerText=P,T.appendChild(J),
-t.status=J);this.pause=mxUtils.bind(this,function(){var H=B;this.active&&(u=Math.max(0,u-(Date.now()-G)),H=mxUtils.bind(this,function(g){this.spin(T,P,q,u);if(null!=g)try{g(),D=mxUtils.bind(this,function(){this.spin(T,P,q,u);try{g()}catch(n){null!=q&&q(n)}})}catch(n){null!=q&&q(n)}}));this.stop();return H});J=!0}return J};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),
-t.status=null)};t.pause=function(){return B};return t};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var f=mxUtils.parseXml(c),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}}catch(m){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||
+"1"==urlParams.dev;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
+"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,
+barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,f,l,m,t,v,B){if(null!=c){t=null!=t?t:Error(c);t.stack=null!=t.stack?t.stack:"";v=null!=v?v:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&
+0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf("<anonymous>:")&&0>t.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+v+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=m?":colno:"+
+encodeURIComponent(m):"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(E){}try{B||null==window.console||console.error(v,c,f,l,m,t)}catch(E){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(l){}};EditorUi.sendReport=
+function(c,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);mxClient.IS_IOS?
+(mxLog.show(),mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=
+EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){var m=l.getAttribute("width"),t=l.getAttribute("height");l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily="initial";0<m&&0<t&&null==l.getAttribute("viewBox")&&l.setAttribute("viewBox","0 0 "+m+" "+t);var v=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");v.appendChild(l);c.hasAttribute("transform")&&
+v.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(v,c)}}catch(B){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var m=document.implementation.createHTMLDocument(""),t=document.createElement("style"),v=0;v<f.length;v++){t.textContent=f[v].textContent;m.body.appendChild(t);
+for(var B="",E=0;E<t.sheet.cssRules.length;E++){var D=t.sheet.cssRules[E];if(null!=D.selectorText){for(var A=D.selectorText.split(","),S=0;S<A.length;S++)A[S]="#"+l+" "+A[S];D.selectorText=A.join(",")}B+=D.cssText+"\n"}f[v].textContent=B}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,f,l){return this.editor.graph.openLink(c,f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
+function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,l){localStorage.setItem(c,f);null!=l&&l()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
+EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||
+!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var m=null==c||null==f;l=null!=l?l:24;var t=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=this.timeout,B=t.spin,E=null,D=null,
+A=mxUtils.bind(this,function(T){null!=T&&T()}),S=this;t.spin=function(T,P,q,u){u=null!=u?u:v;var J=!1;if(!this.active){var G=Date.now();null!=q&&(E=window.setTimeout(function(){t.stop();E=null;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},u));m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);T==document.body&&"1"==urlParams.embedInline&&(T=S.diagramContainer,c=T.scrollLeft+T.clientWidth/2,f=T.scrollTop+
+T.clientHeight/2);B.call(this,T);"1"==urlParams.embedInline&&null!=t.el&&(t.el.style.marginTop=T.scrollTop+"px",t.el.style.marginLeft=T.scrollLeft+"px");this.active=!0;null!=P&&(J=document.createElement("div"),J.className="geSpinnerStatus",J.setAttribute("title",P),T==document.body?(J.style.left=Math.max(0,c)+"px",J.style.top=Math.max(0,f+66)+"px"):(J.style.left="50%",J.style.top="50%",J.style.marginTop="70px"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),J.innerText=
+P,T.appendChild(J),t.status=J);this.pause=mxUtils.bind(this,function(){var H=A;this.active&&(u=Math.max(0,u-(Date.now()-G)),H=mxUtils.bind(this,function(g){this.spin(T,P,q,u);if(null!=g)try{g(),D=mxUtils.bind(this,function(){this.spin(T,P,q,u);try{g()}catch(p){null!=q&&q(p)}})}catch(p){null!=q&&q(p)}}));this.stop();return H});J=!0}return J};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),
+t.status=null)};t.pause=function(){return A};return t};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}}catch(m){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&
207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&
-26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,m=this.editor.graph,t=this;f.getFunction=function(v){if(m.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(v)){if(37==
-v.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==v.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==v.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,A+1)};if(40==v.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)){if(37==v.keyCode)return function(){0<A&&t.selectNextPage(!1)};if(38==v.keyCode)return function(){0<A&&t.selectPage(t.pages[0])};if(39==v.keyCode)return function(){A<
-t.pages.length-1&&t.selectNextPage(!0)};if(40==v.keyCode)return function(){A<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=v.keyCode&&90>=v.keyCode)||m.isSelectionEmpty()||mxEvent.isAltDown(v)||mxEvent.isShiftDown(v)||mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)?k.apply(this,arguments):null}}return f};var l=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=l.apply(this,arguments);if(null==f)try{var k=
-c.indexOf("&lt;mxfile ");if(0<=k){var m=c.lastIndexOf("&lt;/mxfile&gt;");m>k&&(f=c.substring(k,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(c),v=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=v?mxUtils.getXml(v):""}}catch(A){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');
-0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var k=null!=c?this.editor.extractGraphModel(c,!0):null;null!=k&&(c=k);if(null!=c){k=this.editor.graph;k.model.beginUpdate();try{var m=null!=this.pages?this.pages.slice():null,t=c.getElementsByTagName("diagram");
-if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var v=t.length-1;0<=v;v--){var A=this.updatePageRoot(new DiagramPage(t[v]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[v+1]));k.model.execute(new ChangePage(this,A,0==v?A:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=m)for(v=0;v<m.length;v++)k.model.execute(new ChangePage(this,m[v],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(f)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,k,m,t,v,A,E,D,B,S,R,T){f=null!=
-f?f:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;S=null!=S?S:!Editor.defaultCompressed;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=m;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(S){var J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());J.appendChild(c)}else{J=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(J);if(Graph.decompress(u)!=
-J)return J;J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());mxUtils.setTextContent(J,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(J)}B?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),
+26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,m=this.editor.graph,t=this;f.getFunction=function(v){if(m.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var B=t.getSelectedPageIndex();if(mxEvent.isShiftDown(v)){if(37==
+v.keyCode)return function(){0<B&&t.movePage(B,B-1)};if(38==v.keyCode)return function(){0<B&&t.movePage(B,0)};if(39==v.keyCode)return function(){B<t.pages.length-1&&t.movePage(B,B+1)};if(40==v.keyCode)return function(){B<t.pages.length-1&&t.movePage(B,t.pages.length-1)}}else if(mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)){if(37==v.keyCode)return function(){0<B&&t.selectNextPage(!1)};if(38==v.keyCode)return function(){0<B&&t.selectPage(t.pages[0])};if(39==v.keyCode)return function(){B<
+t.pages.length-1&&t.selectNextPage(!0)};if(40==v.keyCode)return function(){B<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=v.keyCode&&90>=v.keyCode)||m.isSelectionEmpty()||mxEvent.isAltDown(v)||mxEvent.isShiftDown(v)||mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)?l.apply(this,arguments):null}}return f};var k=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=k.apply(this,arguments);if(null==f)try{var l=
+c.indexOf("&lt;mxfile ");if(0<=l){var m=c.lastIndexOf("&lt;/mxfile&gt;");m>l&&(f=c.substring(l,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(c),v=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=v?mxUtils.getXml(v):""}}catch(B){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');
+0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var m=null!=this.pages?this.pages.slice():null,t=c.getElementsByTagName("diagram");
+if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var v=t.length-1;0<=v;v--){var B=this.updatePageRoot(new DiagramPage(t[v]));null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[v+1]));l.model.execute(new ChangePage(this,B,0==v?B:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
+[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=m)for(v=0;v<m.length;v++)l.model.execute(new ChangePage(this,m[v],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,m,t,v,B,E,D,A,S,R,T){f=null!=
+f?f:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;S=null!=S?S:!Editor.defaultCompressed;var P=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=m;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(S){var J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());J.appendChild(c)}else{J=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(J);if(Graph.decompress(u)!=
+J)return J;J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());mxUtils.setTextContent(J,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(J)}A?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),
u.removeAttribute("modified"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),u.removeAttribute("etag"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&
-null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=R&&(u=u.cloneNode(!0),u.setAttribute("scale",R));null!=T&&(u=u.cloneNode(!0),u.setAttribute("border",T));c=S?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!v&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(u),f,null!=k?k.getTitle():null,q,P);else if(v||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(m=null),k=this.getSvgFileProperties(u),
-c=this.getEmbeddedSvg(c,f,m,null,E,D,P,null,null,k.scale,k.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,k,m){c=null!=c?c:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var B=D.getElementsByTagName("mxGraphModel"),S=0<B.length?B[0]:null;B=D;null==S&&k?(S=mxUtils.getNodeValue(D),0<S.length&&(S=Graph.decompress(S),null!=S&&0<S.length&&(B=D.cloneNode(!1),
-B.appendChild(mxUtils.parseXml(S).documentElement)))):null==S||k?B=D.cloneNode(!0):(B=D.cloneNode(!1),mxUtils.setTextContent(B,Graph.compressNode(S)));t.appendChild(B)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var v=this.pages[f],A=v.node;if(v!=this.currentPage)if(v.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(v.root));
-this.editor.graph.saveViewState(v.viewState,E,null,m);EditorUi.removeChildNodes(A);A.appendChild(E);delete v.needsUpdate}else m&&(this.updatePageRoot(v),null!=v.viewState.backgroundImage&&null!=v.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(v.root)),this.editor.graph.saveViewState(v.viewState,E,null,m,v),A=A.cloneNode(!1),A.appendChild(E)));c(A)}return t};EditorUi.prototype.anonymizeString=function(c,f){for(var k=[],m=0;m<c.length;m++){var t=
-c.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?k.push(" "):k.push("?"):k.push(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var k=
-mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(v){c[EditorUi.DIFF_INSERT][f].data=v.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var t=c[EditorUi.DIFF_UPDATE][m];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(v){var A=t.cells[v];
-if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&delete A[E];mxUtils.isEmptyObject(A)&&delete t.cells[v]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete c[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};
-EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var k=0;k<c.attributes.length;k++)"as"!=c.attributes[k].name&&c.setAttribute(c.attributes[k].name,this.anonymizeString(c.attributes[k].value,f));if(null!=c.childNodes)for(k=0;k<c.childNodes.length;k++)this.anonymizeAttributes(c.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+
-"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],f[k].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=
-this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(c,f,k,m,t,v,A,E,D,B,S,R,T){t=null!=t?t:!0;v=null!=v?v:!1;B=null!=B?B:!Editor.defaultCompressed;var P=this.editor.graph;if((f||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;
-var u=null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&P.setBackgroundImage(u.viewState.backgroundImage);P.getGlobalVariable=function(J){return"page"==J&&null!=u?u.getName():"pagenumber"==J?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=u&&P.model.setRoot(u.root)}A=null!=A?A:this.getXmlFileData(t,v,B,S);D=null!=D?D:this.getCurrentFile();c=this.createFileData(A,P,D,
-window.location.href,c,f,k,m,t,E,B,R,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return c};EditorUi.prototype.getHtml=function(c,f,k,m,t,v){v=null!=v?v:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){A=v?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;v=Math.floor(A.x/D-f.view.translate.x);D=Math.floor(A.y/D-f.view.translate.y);A=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(E=EditorUi.drawHost+
+null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=R&&(u=u.cloneNode(!0),u.setAttribute("scale",R));null!=T&&(u=u.cloneNode(!0),u.setAttribute("border",T));c=S?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!v&&!t&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(u),f,null!=l?l.getTitle():null,q,P);else if(v||!t&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(m=null),l=this.getSvgFileProperties(u),
+c=this.getEmbeddedSvg(c,f,m,null,E,D,P,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,m){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var t=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var A=D.getElementsByTagName("mxGraphModel"),S=0<A.length?A[0]:null;A=D;null==S&&l?(S=mxUtils.getNodeValue(D),0<S.length&&(S=Graph.decompress(S),null!=S&&0<S.length&&(A=D.cloneNode(!1),
+A.appendChild(mxUtils.parseXml(S).documentElement)))):null==S||l?A=D.cloneNode(!0):(A=D.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(S)));t.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var v=this.pages[f],B=v.node;if(v!=this.currentPage)if(v.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(v.root));
+this.editor.graph.saveViewState(v.viewState,E,null,m);EditorUi.removeChildNodes(B);B.appendChild(E);delete v.needsUpdate}else m&&(this.updatePageRoot(v),null!=v.viewState.backgroundImage&&null!=v.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(v.root)),this.editor.graph.saveViewState(v.viewState,E,null,m,v),B=B.cloneNode(!1),B.appendChild(E)));c(B)}return t};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],m=0;m<c.length;m++){var t=
+c.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?l.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=
+mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(v){c[EditorUi.DIFF_INSERT][f].data=v.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var t=c[EditorUi.DIFF_UPDATE][m];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(v){var B=t.cells[v];
+if(null!=B){for(var E in B)null!=B[E].value&&(B[E].value="["+B[E].value.length+"]"),null!=B[E].xmlValue&&(B[E].xmlValue="["+B[E].xmlValue.length+"]"),null!=B[E].style&&(B[E].style="["+B[E].style.length+"]"),mxUtils.isEmptyObject(B[E])&&delete B[E];mxUtils.isEmptyObject(B)&&delete t.cells[v]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete c[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};
+EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+
+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=
+this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==
+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,m,t,v,B,E,D,A,S,R,T){t=null!=t?t:!0;v=null!=v?v:!1;A=null!=A?A:!Editor.defaultCompressed;var P=this.editor.graph;if((f||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;
+var u=null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&P.setBackgroundImage(u.viewState.backgroundImage);P.getGlobalVariable=function(J){return"page"==J&&null!=u?u.getName():"pagenumber"==J?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=u&&P.model.setRoot(u.root)}B=null!=B?B:this.getXmlFileData(t,v,A,S);D=null!=D?D:this.getCurrentFile();c=this.createFileData(B,P,D,
+window.location.href,c,f,l,m,t,E,A,R,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return c};EditorUi.prototype.getHtml=function(c,f,l,m,t,v){v=null!=v?v:!0;var B=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){B=v?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;v=Math.floor(B.x/D-f.view.translate.x);D=Math.floor(B.y/D-f.view.translate.y);B=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(E=EditorUi.drawHost+
"/embed.js?s="+f));c.setAttribute("x0",v);c.setAttribute("y0",D)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=m&&c.setAttribute("edit",m));null!=t&&(t=t.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</div>\n</div>\n"+
-(null==t?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,f,k,m,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
-xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+
+"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=B&&B!=mxConstants.NONE?' style="background-color:'+B+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</div>\n</div>\n"+
+(null==t?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,f,l,m,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
+xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+
t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
-function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),
-k={},0<c.length)){var m=this.getHashObject(),t=null;this.fileNode=f;this.pages=[];for(var v=0;v<c.length;v++){null==c[v].getAttribute("id")&&c[v].setAttribute("id",v);f=new DiagramPage(c[v]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1]));this.pages.push(f);if(null==m.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=m.pageId&&f.getId()==m.pageId)t=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=
+function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),
+l={},0<c.length)){var m=this.getHashObject(),t=null;this.fileNode=f;this.pages=[];for(var v=0;v<c.length;v++){null==c[v].getAttribute("id")&&c[v].setAttribute("id",v);f=new DiagramPage(c[v]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1]));this.pages.push(f);if(null==m.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=m.pageId&&f.getId()==m.pageId)t=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=
null!=t?t:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),
-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(v=0;v<A.length;v++)f[A[v]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(v=0;v<D.length;v++){var B=D[v];E.setVisible(B,f[B.id]||!1)}}catch(S){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=
-f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,k,m,t,v,A,E,D,B,S,R,T,P,q,u,J){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&S?".drawio":"")+"."+
-c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(O,Q){try{return this.createDownloadRequest(O,c,m,Q,A,t,E,D,B,S,R,void 0,
-void 0,!v,T,P,q,u,J)}catch(U){this.handleError(U)}}));else{var n=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==c){var I=this.editor.graph.background;if(A||I==mxConstants.NONE)I=null;var N=this.editor.graph.getSvg(I,null,null,null,null,m);k&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,
-mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();C(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else H=G+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();C(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,m,t,v,A,E,D,B,S,R,T,P,q,u,J,G,H){c=this.downloadRequestBuilder(c,f,k,m,t,v,A,E,D,B,S,R,T,P,q,u,J,G,H);f="";for(var g in c)k=c[g],null!=k&&(f+=g+"="+encodeURIComponent(k)+
-"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,m,t,v,A,E,D,B,S,R,T,P,q,u,J,G,H){var g=this.editor.graph,n=g.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==v?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var C=null,I=null,N=null;if(!EditorUi.isElectronApp&&(n.width*n.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==f&&(null!=S?(C=S.from,I=S.to):0==v&&
-(N="1"));"xmlpng"==f&&(B="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(v=0;v<this.pages.length;v++)if(this.pages[v]==this.currentPage){C=v;break}v=g.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?t||null!=v&&v!=mxConstants.NONE||(v="#ffffff"):v=mxConstants.NONE;t={globalVars:g.getExportVariables()};null!=S&&null!=S.from&&(t.globalVars.pagenumber=S.from+1);D&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:
-g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:C,to:I,allPages:N,bg:null!=v?v:mxConstants.NONE,base64:m,embedXml:B,xml:k,filename:null!=c?c:"",extras:JSON.stringify(t),scale:A,border:E,pageMargin:q,w:R&&isFinite(R)?R:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=u&&u?"1":"0",shadows:null!=H&&H?"1":"0",sheetsAcross:J,sheetsDown:G}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=
-window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var k=c.lastIndexOf("#");if(0<k){c=decodeURIComponent(c.substring(k+1));try{f=JSON.parse(c)}catch(m){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();
-c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var k=f.lastIndexOf("#");0<k&&(f=f.substring(0,k));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(m){}0<k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var m=window.location.hash,
-t=mxUtils.bind(this,function(A){var E=null!=c.data?c.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return m};this.fileLoaded(A);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?
-parseInt(c.interval):6E4,B=null,S=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),R()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),R=mxUtils.bind(this,function(){window.clearTimeout(B);B=window.setTimeout(S,
-D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){R();S()}));R();S()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var n=new mxCellOverlay(g.image||t.warningImage,g.tooltip,g.align,g.valign,g.offset);n.addListener(mxEvent.CLICK,function(C,I){m.alert(g.tooltip)});
-return n}var k=null,m=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var t=this.editor.graph,v=t.getModel();v.beginUpdate();var A=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=v.getCell(c.getAttribute("id"));if(null!=E){try{var D=c.getAttribute("value");if(null!=D){var B=mxUtils.parseXml(D).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))v.setValue(E,B);else for(var S=B.attributes,R=0;R<
+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(v=0;v<B.length;v++)f[B[v]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(v=0;v<D.length;v++){var A=D[v];E.setVisible(A,f[A.id]||!1)}}catch(S){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=
+f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&S?".drawio":"")+"."+
+c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(O,Q){try{return this.createDownloadRequest(O,c,m,Q,B,t,E,D,A,S,R,void 0,
+void 0,!v,T,P,q,u,J)}catch(U){this.handleError(U)}}));else{var p=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==c){var I=this.editor.graph.background;if(B||I==mxConstants.NONE)I=null;var M=this.editor.graph.getSvg(I,null,null,null,null,m);l&&this.editor.graph.addSvgShadow(M);this.editor.convertImages(M,
+mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();C(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else H=G+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();C(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J,G,H){c=this.downloadRequestBuilder(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J,G,H);f="";for(var g in c)l=c[g],null!=l&&(f+=g+"="+encodeURIComponent(l)+
+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u,J,G,H){var g=this.editor.graph,p=g.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==v?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var C=null,I=null,M=null;if(!EditorUi.isElectronApp&&(p.width*p.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==f&&(null!=S?(C=S.from,I=S.to):0==v&&
+(M="1"));"xmlpng"==f&&(A="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(v=0;v<this.pages.length;v++)if(this.pages[v]==this.currentPage){C=v;break}v=g.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?t||null!=v&&v!=mxConstants.NONE||(v="#ffffff"):v=mxConstants.NONE;t={globalVars:g.getExportVariables()};null!=S&&null!=S.from&&(t.globalVars.pagenumber=S.from+1);D&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:
+g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:C,to:I,allPages:M,bg:null!=v?v:mxConstants.NONE,base64:m,embedXml:A,xml:l,filename:null!=c?c:"",extras:JSON.stringify(t),scale:B,border:E,pageMargin:q,w:R&&isFinite(R)?R:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=u&&u?"1":"0",shadows:null!=H&&H?"1":"0",sheetsAcross:J,sheetsDown:G}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=
+window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(m){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();
+c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(m){}0<l&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var m=window.location.hash,
+t=mxUtils.bind(this,function(B){var E=null!=c.data?c.data:"";null!=B&&0<B.length&&(0<E.length&&(E+="\n"),E+=B);B=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return m};this.fileLoaded(B);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?
+parseInt(c.interval):6E4,A=null,S=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),R()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),R=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(S,
+D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){R();S()}));R();S()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(B){t(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var p=new mxCellOverlay(g.image||t.warningImage,g.tooltip,g.align,g.valign,g.offset);p.addListener(mxEvent.CLICK,function(C,I){m.alert(g.tooltip)});
+return p}var l=null,m=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var t=this.editor.graph,v=t.getModel();v.beginUpdate();var B=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=v.getCell(c.getAttribute("id"));if(null!=E){try{var D=c.getAttribute("value");if(null!=D){var A=mxUtils.parseXml(D).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))v.setValue(E,A);else for(var S=A.attributes,R=0;R<
S.length;R++)t.setAttributeForCell(E,S[R].nodeName,0<S[R].nodeValue.length?S[R].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+E.id+": "+g)}try{var T=c.getAttribute("style");null!=T&&t.model.setStyle(E,T)}catch(g){null!=window.console&&console.log("Error in style for "+E.id+": "+g)}try{var P=c.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(E);null!=q&&t.addCellOverlay(E,f(q))}}catch(g){null!=window.console&&
console.log("Error in icon for "+E.id+": "+g)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var J=t.getCellGeometry(E);if(null!=J){J=J.clone();for(key in u){var G=parseFloat(u[key]);"dx"==key?J.x+=G:"dy"==key?J.y+=G:"dw"==key?J.width+=G:"dh"==key?J.height+=G:J[key]=parseFloat(u[key])}t.model.setGeometry(E,J)}}}catch(g){null!=window.console&&console.log("Error in icon for "+E.id+": "+g)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=
-H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,v)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(t.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(A=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{v.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,
-A)}return k};EditorUi.prototype.getCopyFilename=function(c,f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=k.lastIndexOf(".");0<=m&&(c=k.substring(m),k=k.substring(0,m));if(f){f=k;var t=new Date;k=t.getFullYear();m=t.getMonth()+1;var v=t.getDate(),A=t.getHours(),E=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+m+"-"+v+"-"+A+"-"+E+"-"+t))}return k=mxResources.get("copyOf",[k])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",
-[c])}catch(k){}};EditorUi.prototype.fileLoaded=function(c,f,k){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[f]);var m=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=m&&(m.removeListener(this.descriptorChangedListener),this.logIfModified(m,!0),m.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var v=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
+H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,v)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(t.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(B=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{v.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,
+B)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=l.lastIndexOf(".");0<=m&&(c=l.substring(m),l=l.substring(0,m));if(f){f=l;var t=new Date;l=t.getFullYear();m=t.getMonth()+1;var v=t.getDate(),B=t.getHours(),E=t.getMinutes();t=t.getSeconds();l=f+(" "+(l+"-"+m+"-"+v+"-"+B+"-"+E+"-"+t))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",
+[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){EditorUi.debug("EditorUi.fileLoaded",[this],"file",[c],"noDialogs",[f]);var m=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=m&&(m.removeListener(this.descriptorChangedListener),this.logIfModified(m,!0),m.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var v=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
null!=m&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();f||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",
this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
-'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));t=!0;if(!this.isOffline()&&null!=c.getMode()){var A="1"==urlParams.sketch?"sketch":
-uiTheme;if(null==A)A="default";else if("sketch"==A||"min"==A)A+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+A})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),
+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));t=!0;if(!this.isOffline()&&null!=c.getMode()){var B="1"==urlParams.sketch?"sketch":
+uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),
title:c.getTitle(),mode:c.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(D){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=m?this.fileLoaded(m)||v():v()});f?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
-function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else v();return t};EditorUi.prototype.getHashValueForPages=function(c,f){var k=0,m=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var v=0;v<c.length;v++){this.updatePageRoot(c[v]);var A=c[v].node.cloneNode(!1);A.removeAttribute("name");m.root=c[v].root;
-var E=t.encode(m);this.editor.graph.saveViewState(c[v].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=f&&(f.eltCount+=A.getElementsByTagName("*").length,f.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(D,B,S,R){return!R||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?R&&"mxCell"==D.nodeName&&"previous"==B?null:S:Math.round(S)},f)<<0}return k};EditorUi.prototype.hashValue=
-function(c,f,k){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);for(var t=0;t<c.attributes.length;t++){var v=c.attributes[t].name,A=null!=f?f(c,v,c.attributes[t].value,!0):c.attributes[t].value;null!=A&&(m^=this.hashValue(v,f,k)+this.hashValue(A,f,k))}}if(null!=c.childNodes)for(t=0;t<c.childNodes.length;t++)m=
-(m<<5)-m+this.hashValue(c.childNodes[t],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(t=0;t<c.length;t++)f=(f<<5)-f+c.charCodeAt(t)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,m,t,v,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
-(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var k=f.createElement("mxlibrary");
-mxUtils.setTextContent(k,JSON.stringify(c,null,2));f.appendChild(k);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[c]}};
-EditorUi.prototype.repositionLibrary=function(c,f){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:k.firstChild.nextSibling.nextSibling;f=k.lastChild;var m=f.previousSibling;k.insertBefore(f,c);k.insertBefore(m,f)}};EditorUi.prototype.loadLibrary=function(c,f){var k=mxUtils.parseXml(c.getData());if("mxlibrary"==
-k.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(c,m,k.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,f){var k=c?"findReplace":"find",m=k+"Window";
-if(null==this[m]){var t="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,v=c?t?330:300:240;this[m]=new FindWindow(this,document.body.offsetWidth-(v+20),100,v,c?t?304:288:180,c);this[m].window.addListener("show",function(){this.fireEvent(new mxEventObject(k))});this[m].window.addListener("hide",function(){this.fireEvent(new mxEventObject(k))});this[m].window.setVisible(!0)}else null==f&&this[m].window.setVisible(!this[m].window.isVisible());null!=f&&(this[m].doSearch(f),
-this[m].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,k,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var t=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var v=0;v<this.openLibraries.length;v++)if(this.openLibraries[v].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[v],this.openLibraries);break}t={file:c,images:f,title:k,expand:m};this.openLibraries.push(t)}else this.scratchpad=
-c;v=this.sidebar.palettes[c.getHash()];v=null!=v?v[v.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var A=null,E=mxUtils.bind(this,function(G,H){0==G.length&&c.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),H.appendChild(A)):this.addLibraryEntries(G,H)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==k&&(k=c.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));
-var D=this.sidebar.addPalette(c.getHash(),k,null!=m?m:!0,mxUtils.bind(this,function(G){E(f,G)}));null!=t&&(t.div=D);this.repositionLibrary(v,"L.scratchpad"!=c.getHash());m=D.parentNode.previousSibling;k=m.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&m.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var B=document.createElement("div");B.style.backgroundColor="inherit";m.style.position="relative";var S=document.createElement("img");S.className="geLibraryButton";S.setAttribute("src",
-Editor.crossImage);S.setAttribute("title",mxResources.get("close"));var R=null;if(".scratchpad"!=c.title||this.closableScratchpad)B.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=R?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var T=
-this.editor.graph,P=null;k=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),D,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=S.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",B.insertBefore(P,B.firstChild),this.saveLibrary(c.getTitle(),
-f,c,c.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==R&&(R=S.cloneNode(!1),R.setAttribute("src",Editor.saveImage),R.setAttribute("title",mxResources.get("save")),B.insertBefore(R,B.firstChild),mxEvent.addListener(R,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==R||c.isModified()||(R.parentNode.removeChild(R),R=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(G,
-H,g,n){G=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(G)));for(var C=0;C<G.length;C++){var I=T.getCellGeometry(G[C]);null!=I&&I.translate(-H.x,-H.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,n||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=n&&(H.title=n);f.push(H);q(g);null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)}),J=
-mxUtils.bind(this,function(G){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(G),T.getRubberband().reset()):null!=G&&mxEvent.getSource(G).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=T.getSelectionCells(),g=T.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var n=T.view.scale;g.x/=n;g.y/=n;g.width/=n;g.height/=n;g.x-=T.view.translate.x;g.y-=T.view.translate.y;
+function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else v();return t};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,m=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var v=0;v<c.length;v++){this.updatePageRoot(c[v]);var B=c[v].node.cloneNode(!1);B.removeAttribute("name");m.root=c[v].root;
+var E=t.encode(m);this.editor.graph.saveViewState(c[v].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");B.appendChild(E);null!=f&&(f.eltCount+=B.getElementsByTagName("*").length,f.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(B,function(D,A,S,R){return!R||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?R&&"mxCell"==D.nodeName&&"previous"==A?null:S:Math.round(S)},f)<<0}return l};EditorUi.prototype.hashValue=
+function(c,f,l){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var t=0;t<c.attributes.length;t++){var v=c.attributes[t].name,B=null!=f?f(c,v,c.attributes[t].value,!0):c.attributes[t].value;null!=B&&(m^=this.hashValue(v,f,l)+this.hashValue(B,f,l))}}if(null!=c.childNodes)for(t=0;t<c.childNodes.length;t++)m=
+(m<<5)-m+this.hashValue(c.childNodes[t],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(t=0;t<c.length;t++)f=(f<<5)-f+c.charCodeAt(t)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,m,t,v,B){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
+(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");
+mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};
+EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var m=f.previousSibling;l.insertBefore(f,c);l.insertBefore(m,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==
+l.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,m,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,f){var l=c?"findReplace":"find",m=l+"Window";
+if(null==this[m]){var t="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,v=c?t?330:300:240;this[m]=new FindWindow(this,document.body.offsetWidth-(v+20),100,v,c?t?304:288:180,c);this[m].window.addListener("show",function(){this.fireEvent(new mxEventObject(l))});this[m].window.addListener("hide",function(){this.fireEvent(new mxEventObject(l))});this[m].window.setVisible(!0)}else null==f&&this[m].window.setVisible(!this[m].window.isVisible());null!=f&&(this[m].doSearch(f),
+this[m].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,l,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var t=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var v=0;v<this.openLibraries.length;v++)if(this.openLibraries[v].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[v],this.openLibraries);break}t={file:c,images:f,title:l,expand:m};this.openLibraries.push(t)}else this.scratchpad=
+c;v=this.sidebar.palettes[c.getHash()];v=null!=v?v[v.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var B=null,E=mxUtils.bind(this,function(G,H){0==G.length&&c.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),H.appendChild(B)):this.addLibraryEntries(G,H)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
+var D=this.sidebar.addPalette(c.getHash(),l,null!=m?m:!0,mxUtils.bind(this,function(G){E(f,G)}));null!=t&&(t.div=D);this.repositionLibrary(v,"L.scratchpad"!=c.getHash());m=D.parentNode.previousSibling;l=m.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&m.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var A=document.createElement("div");A.style.backgroundColor="inherit";m.style.position="relative";var S=document.createElement("img");S.className="geLibraryButton";S.setAttribute("src",
+Editor.crossImage);S.setAttribute("title",mxResources.get("close"));var R=null;if(".scratchpad"!=c.title||this.closableScratchpad)A.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=R?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var T=
+this.editor.graph,P=null;l=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),D,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=S.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",A.insertBefore(P,A.firstChild),this.saveLibrary(c.getTitle(),
+f,c,c.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==R&&(R=S.cloneNode(!1),R.setAttribute("src",Editor.saveImage),R.setAttribute("title",mxResources.get("save")),A.insertBefore(R,A.firstChild),mxEvent.addListener(R,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==R||c.isModified()||(R.parentNode.removeChild(R),R=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(G,
+H,g,p){G=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(G)));for(var C=0;C<G.length;C++){var I=T.getCellGeometry(G[C]);null!=I&&I.translate(-H.x,-H.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,p||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=p&&(H.title=p);f.push(H);q(g);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)}),J=
+mxUtils.bind(this,function(G){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(G),T.getRubberband().reset()):null!=G&&mxEvent.getSource(G).classList.contains("geLibraryButton")&&this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=T.getSelectionCells(),g=T.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var p=T.view.scale;g.x/=p;g.y/=p;g.width/=p;g.height/=p;g.x-=T.view.translate.x;g.y-=T.view.translate.y;
u(H,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(G)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(G))}),
mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,J(G),mxEvent.consume(G))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor=
"",D.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){D.style.backgroundColor="light-dark(#fefefe, #000000)";G.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){D.style.cursor="";D.style.backgroundColor="";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
-function(H,g,n,C,I,N,O,Q,U){if(null!=H&&"image/"==g.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,I,N),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,I,N),G,mxEvent.isAltDown(G)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
-Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));E(Z,D);f=f.concat(Z);q(G);this.spinner.stop();V=!0}catch(da){}else if("mxfile"==W.documentElement.nodeName)try{var ba=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<ba.length;Z++){var ia=this.stringToCells(Editor.getDiagramNodeXml(ba[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(ia);
-null!=ea&&u(ia,new mxRectangle(0,0,ea.width,ea.height),G)}V=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)});null!=U&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(U,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,O)&&null!=U?this.isExternalDataComms()?
+function(H,g,p,C,I,M,O,Q,U){if(null!=H&&"image/"==g.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,I,M),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,I,M),G,mxEvent.isAltDown(G)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==
+Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));E(Z,D);f=f.concat(Z);q(G);this.spinner.stop();V=!0}catch(da){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var ha=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(ha);
+null!=ea&&u(ha,new mxRectangle(0,0,ea.width,ea.height),G)}V=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)});null!=U&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(U,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,O)&&null!=U?this.isExternalDataComms()?
this.parseFile(U,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(H,g)}}));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"dragleave",function(G){D.style.cursor="";D.style.backgroundColor=
-"";G.stopPropagation();G.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));B.insertBefore(S,B.firstChild);mxEvent.addListener(S,"click",k);k=S.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));B.insertBefore(k,B.firstChild);mxEvent.addListener(k,"click",J);".scratchpad"==c.title&&(this.addSelectionToScratchpad=J);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||
-(k=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),k.className="geLibraryButton",B.insertBefore(k,B.firstChild))}m.appendChild(B);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var k=0;k<c.length;k++)try{var m=c[k],t=m.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var v="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(v+="aspect=fixed;");v=v+"image="+t+";";
-null!=m.style&&(v+=m.style);f.appendChild(this.sidebar.createVertexTemplate(v,m.w,m.h,"",m.title||"",!1,null,!0))}else if(null!=m.xml){var A=this.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml)),E=0==A.length?mxResources.get("drawingEmpty"):null!=m.title?m.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(A,m.w,m.h,E,!0,null,!0))}}catch(D){E=null!=D.message?mxResources.get("error")+": "+D.message:String(D),v=this.sidebar.createVertexTemplateFromCells(null,m.w,m.h,
-E,!0,null,!0),f.appendChild(v)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,k,m,t,v,A){c=new ImageDialog(this,c,f,k,m,
-t,v,A);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,k,m,t,v){var A=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=v&&v(E),E==A)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(f,JSON.stringify(D))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(B){this.handleError(B)}}),
-null,mxResources.get("close"),null,null,null,!0,null,null,t,k,m);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=k&&2<k.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,k,m){c=null!=c?c:mxUtils.bind(this,function(t,v,A,E){v||(t=new ChangePageSetup(this,m?A:null,t),t.ignoreColor=!m,null!=E&&m&&(t.shadowVisible=E),this.editor.graph.model.execute(t))});c=new BackgroundImageDialog(this,c,f,k,m);this.showDialog(c.container,400,
-m?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,k,m,t){c=new LibraryDialog(this,c,f,k,m,t);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var p=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=p.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&
-f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,k,m,t,v,A){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{A||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=
-D||null!=f){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var B=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(B=mxResources.get("cancel"),S=function(){E();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
+"";G.stopPropagation();G.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));A.insertBefore(S,A.firstChild);mxEvent.addListener(S,"click",l);l=S.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));A.insertBefore(l,A.firstChild);mxEvent.addListener(l,"click",J);".scratchpad"==c.title&&(this.addSelectionToScratchpad=J);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||
+(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",A.insertBefore(l,A.firstChild))}m.appendChild(A);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var m=c[l],t=m.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var v="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(v+="aspect=fixed;");v=v+"image="+t+";";
+null!=m.style&&(v+=m.style);f.appendChild(this.sidebar.createVertexTemplate(v,m.w,m.h,"",m.title||"",!1,null,!0))}else if(null!=m.xml){var B=this.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml)),E=0==B.length?mxResources.get("drawingEmpty"):null!=m.title?m.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(B,m.w,m.h,E,!0,null,!0))}}catch(D){E=null!=D.message?mxResources.get("error")+": "+D.message:String(D),v=this.sidebar.createVertexTemplateFromCells(null,m.w,m.h,
+E,!0,null,!0),f.appendChild(v)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,m,t,v,B){c=new ImageDialog(this,c,f,l,m,
+t,v,B);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,m,t,v){var B=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=v&&v(E),E==B)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(f,JSON.stringify(D))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(A){this.handleError(A)}}),
+null,mxResources.get("close"),null,null,null,!0,null,null,t,l,m);this.showDialog(c.container,660,480,!0,!1,null,null,null,new mxRectangle(0,0,null!=l&&2<l.length?500:440,280));c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,m){c=null!=c?c:mxUtils.bind(this,function(t,v,B,E){v||(t=new ChangePageSetup(this,m?B:null,t),t.ignoreColor=!m,null!=E&&m&&(t.shadowVisible=E),this.editor.graph.model.execute(t))});c=new BackgroundImageDialog(this,c,f,l,m);this.showDialog(c.container,400,
+m?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,m,t){c=new LibraryDialog(this,c,f,l,m,t);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var n=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=n.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&
+f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,m,t,v,B){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{B||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=
+D||null!=f){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var A=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(A=mxResources.get("cancel"),S=function(){E();D.retry()});if(404==D.code||404==D.status||403==D.code){B=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
" ("+this.drive.user.email+")":""),!1);var R=null!=t?null:null!=v?v:window.location.hash;if(null!=R&&("#G"==R.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==R.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){R="#U"==R.substring(0,2)?R.substring(45,R.lastIndexOf("%26ex")):R.substring(2);this.showError(f,
-A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+R);null!=m&&m()}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){J.innerText="";for(var G=0;G<P.length;G++){var H=document.createElement("option");mxUtils.write(H,P[G].displayName);H.value=G;J.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+P[G].email+">");H.setAttribute("disabled","disabled");
+B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+R);null!=m&&m()}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){J.innerText="";for(var G=0;G<P.length;G++){var H=document.createElement("option");mxUtils.write(H,P[G].displayName);H.value=G;J.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+P[G].email+">");H.setAttribute("disabled","disabled");
J.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=P.length;J.appendChild(H)}var P=this.drive.getUsersList(),q=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");q.appendChild(u);var J=document.createElement("select");J.style.width="100%";T();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var G=J.value,H=P.length!=G;H&&this.drive.setUser(P[G]);
-this.drive.authorize(H,mxUtils.bind(this,function(){H||(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));q.appendChild(J);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=D.message?A=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):
-mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?A=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(A=mxUtils.htmlEntities(D,!1)))}t=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):
-null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,t=D.alternateAction.funct);this.showError(f,A,B,k,S,null,null,c,t,null,null,null,m?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,f,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
-k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,k,m,t,v){c=null!=c?c:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){A();null!=f&&f()},function(){A();null!=k&&k()},m,t,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,v);c.init()};EditorUi.prototype.showBanner=function(c,f,k,m,t,v,A,E,D){v=!1;if(!(this.bannerShowing||this["hideBanner"+
-c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){A=null!=A?A:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var B=document.createElement("div");B.className="geBtn gePrimaryBtn geBanner"+(t?" geSmallBanner":"");B.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(B.style,"transform",A);mxUtils.setPrefixedStyle(B.style,"transition","all 1000ms ease");null!=D&&mxUtils.setPrefixedStyle(B.style,"transform-origin",D);D=D=document.createElement("img");
-D.setAttribute("src",Editor.crossImage);D.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));D.setAttribute("border","0");t||(v=document.createElement("img"),v.setAttribute("src",IMAGE_PATH+"/logo.png"),v.setAttribute("border","0"),v.setAttribute("align","absmiddle"),v.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",B.appendChild(v),D.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
-B.appendChild(D));mxUtils.write(B,f);document.body.appendChild(B);this.bannerShowing=!0;t&&(D.className="geLibraryButton",B.appendChild(D));f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var S=document.createElement("input");S.setAttribute("type","checkbox");S.setAttribute("id","geDoNotShowAgainCheckbox");S.style.marginRight="6px";if(!m){f.appendChild(S);var R=document.createElement("label");
-R.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(R,mxResources.get("doNotShowAgain"));f.appendChild(R);B.style.paddingBottom=t?"16px":"30px";B.appendChild(f)}var T=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,S.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=D&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);
-T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform",A);window.setTimeout(mxUtils.bind(this,function(){T()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=S&&u!=R?(null!=k&&k(),T(),mxEvent.consume(q)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform",E)}),500);window.setTimeout(P,t?5E3:3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=
-new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,f,k,m){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,k,m,t){var v="jpeg"==k?"jpg":k;m=this.getBaseFilename(m)+
-(null!=f?".drawio":"")+"."+v;c=this.createImageDataUri(c,f,k,t);this.saveData(m,v,c.substring(c.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));
-this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,k,m,t,v){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=v?v:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?this.base64ToBlob(c,k):new Blob([c],{type:k}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==
-k?mxUtils.popup(c,!0):(k.document.write(c),k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,k,m);else{var A=document.createElement("a");v=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-v=65==(E?parseInt(E[2],10):!1)?!1:v}if(v||this.isOffline()){A.href=URL.createObjectURL(m?this.base64ToBlob(c,k):new Blob([c],{type:k}));v?A.download=f:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(D){}}else this.createEchoRequest(c,f,k,m,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,m,t,v){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,
-c+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=v?"&base64="+v:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,m,t,v,A,E,D){v=null!=v?v:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var B=mxUtils.bind(this,function(R,T,P,q){try{if("_blank"==T)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,m);else if(null!=k&&"text/html"==k.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,
-450,240,!0,!0);u.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),J.document.close())}else if(T==App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(c,R,k,m,null,E);else if(null!=R&&0<R.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,R,k,m,T,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(T,G)}}catch(H){this.handleError(H)}});t=[];v||t.push(App.MODE_BROWSER);A||t.push("_blank");
-var S=new SaveDialog(this,f,mxUtils.bind(this,function(R,T,P){B(R.value,T,R,P);this.hideDialog(null,null,S.container)}),t,c,k,m,D);this.showDialog(S.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));S.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(c,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var v=mxUtils.parseXml(c).documentElement.style.backgroundColor;
-""!=v&&(t="background: "+v+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(v=k?c:btoa(unescape(encodeURIComponent(c))),m.document.write(t+'<img style="max-width:100%;" src="data:'+f+";base64,"+v+'"/></body></html>')):m.document.write(t+c+"</body></html>"):m.document.write(t+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");m.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;
+this.drive.authorize(H,mxUtils.bind(this,function(){H||(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));q.appendChild(J);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=D.message?B=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):
+mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?B=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?B=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?B=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(B=mxUtils.htmlEntities(D,!1)))}t=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):
+null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,t=D.alternateAction.funct);this.showError(f,B,A,l,S,null,null,c,t,null,null,null,m?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
+l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,m,t,v){c=null!=c?c:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){B();null!=f&&f()},function(){B();null!=l&&l()},m,t,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,v);c.init()};EditorUi.prototype.showBanner=function(c,f,l,m,t,v,B,E,D){v=!1;if(!(this.bannerShowing||this["hideBanner"+
+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){B=null!=B?B:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var A=document.createElement("div");A.className="geBtn gePrimaryBtn geBanner"+(t?" geSmallBanner":"");A.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(A.style,"transform",B);mxUtils.setPrefixedStyle(A.style,"transition","all 1000ms ease");null!=D&&mxUtils.setPrefixedStyle(A.style,"transform-origin",D);D=D=document.createElement("img");
+D.setAttribute("src",Editor.crossImage);D.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));D.setAttribute("border","0");t||(v=document.createElement("img"),v.setAttribute("src",IMAGE_PATH+"/logo.png"),v.setAttribute("border","0"),v.setAttribute("align","absmiddle"),v.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",A.appendChild(v),D.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",
+A.appendChild(D));mxUtils.write(A,f);document.body.appendChild(A);this.bannerShowing=!0;t&&(D.className="geLibraryButton",A.appendChild(D));f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var S=document.createElement("input");S.setAttribute("type","checkbox");S.setAttribute("id","geDoNotShowAgainCheckbox");S.style.marginRight="6px";if(!m){f.appendChild(S);var R=document.createElement("label");
+R.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(R,mxResources.get("doNotShowAgain"));f.appendChild(R);A.style.paddingBottom=t?"16px":"30px";A.appendChild(f)}var T=mxUtils.bind(this,function(){null!=A.parentNode&&(A.parentNode.removeChild(A),this.bannerShowing=!1,S.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=D&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);
+T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(A.style,"transform",B);window.setTimeout(mxUtils.bind(this,function(){T()}),1E3)});mxEvent.addListener(A,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=S&&u!=R?(null!=l&&l(),T(),mxEvent.consume(q)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(A.style,"transform",E)}),500);window.setTimeout(P,t?5E3:3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=
+new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,f,l,m){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,m,t){var v="jpeg"==l?"jpg":l;m=this.getBaseFilename(m)+
+(null!=f?".drawio":"")+"."+v;c=this.createImageDataUri(c,f,l,t);this.saveData(m,v,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));
+this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,m,t,v){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=v?v:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==
+l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,m);else{var B=document.createElement("a");v=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+v=65==(E?parseInt(E[2],10):!1)?!1:v}if(v||this.isOffline()){B.href=URL.createObjectURL(m?this.base64ToBlob(c,l):new Blob([c],{type:l}));v?B.download=f:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(D){}}else this.createEchoRequest(c,f,l,m,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,m,t,v){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,
+c+(null!=l?"&mime="+l:"")+(null!=t?"&format="+t:"")+(null!=v?"&base64="+v:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,m,t,v,B,E,D){v=null!=v?v:!1;B=null!=B?B:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var A=mxUtils.bind(this,function(R,T,P,q){try{if("_blank"==T)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,m);else if(null!=l&&"text/html"==l.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,
+450,240,!0,!0);u.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),J.document.close())}else if(T==App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(c,R,l,m,null,E);else if(null!=R&&0<R.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,R,l,m,T,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(T,G)}}catch(H){this.handleError(H)}});t=[];v||t.push(App.MODE_BROWSER);B||t.push("_blank");
+var S=new SaveDialog(this,f,mxUtils.bind(this,function(R,T,P){A(R.value,T,R,P);this.hideDialog(null,null,S.container)}),t,c,l,m,D);this.showDialog(S.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));S.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(c,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var v=mxUtils.parseXml(c).documentElement.style.backgroundColor;
+""!=v&&(t="background: "+v+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(v=l?c:btoa(unescape(encodeURIComponent(c))),m.document.write(t+'<img style="max-width:100%;" src="data:'+f+";base64,"+v+'"/></body></html>')):m.document.write(t+c+"</body></html>"):m.document.write(t+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");m.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(m){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,this.tagsComponent.div.style.backgroundColor=
"#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=f.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";
this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();
f.style.display=0<m.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&
(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.editor.isExportToCanvas()&&
-this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=c(mxUtils.bind(this,function(m){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var v=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
+this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=c(mxUtils.bind(this,function(m){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var v=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=v.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";v=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=v.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(E){A.stop();this.exportDialog.style.width=
+this.chromelessToolbar.offsetHeight+4+"px";v=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=v.zIndex;var B=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});B.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(E){B.stop();this.exportDialog.style.width=
"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight="140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",D);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+
-1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,k,m,t,v){this.isLocalFileSave()?this.saveLocalFile(k,
-c,m,t,f,v):this.saveRequest(c,f,mxUtils.bind(this,function(A,E){return this.createEchoRequest(k,A,m,t,f,E)}),k,t,m)};EditorUi.prototype.saveRequest=function(c,f,k,m,t,v,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,function(B,S,R,T){if("_blank"==S||null!=B&&0<B.length){var P=k("_blank"==S?null:B,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=P&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?P.simulate(document,"_blank"):(R=mxUtils.bind(this,
-function(q){v=null!=v?v:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,B,v,!0,S,q)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),B,v,!0,S,q)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),
-null!=T?R(T):this.pickFolder(S,R)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,c,mxUtils.bind(this,function(B,S,R){E(B.value,S,B,R);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,
-k,m,t,v){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,k){f(null)};EditorUi.prototype.exportSvg=function(c,f,k,m,t,v,A,E,D,B,S,R,T,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(c,f,k,m,t,v,A,E,D,B,S,R,T,P)}));this.handleError(W)})))try{var q=this.editor.graph.isSelectionEmpty();
-k=null!=k?k:q;var u=f?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==f&&(u=this.editor.graph.shapeBackgroundColor);var J=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var G=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==S||"dark"==S)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==S;var g=Graph.addFont,n={};Graph.addFont=function(W,Y,Z,ba){g.call(this,
-W,Y,Z,n)};var C=this.editor.graph.createSvgImageExport(t),I=C.drawCellState;C.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);I.apply(this,arguments)};var N=this.editor.graph.getSvg(u,c,A,E,null,k,null,C,"blank"==B?"_blank":"self"==B?"_top":null,null,!T,S,R);mxUtils.lightDarkColorSupported=G;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=J;m&&this.editor.graph.addSvgShadow(N);var O=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,
-function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var Q=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,c,A));P(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
-this.editor.addMathCss(N);var U=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&v&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&T?this.replaceAlternateContent(W,S,Q):Q(W)}),V=Graph.customFontElements;Graph.customFontElements=n;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=g;v&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,U,this.thumbImageCache)):U(W)});T?this.embedFonts(N,
-X):(this.editor.addFontCss(N),X(N))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(c,f,k){function m(R,T,P,q,u){var J=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");J.setAttribute("x",T);J.setAttribute("y",P+.5);J.setAttribute("width",q.width);J.setAttribute("height",q.height);null==J.setAttributeNS?J.setAttribute("xlink:href",u):J.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);R.replaceChild(J,R.lastChild);E()}function t(){if(A<S.length)S[A++](t)}
-var v="";f=c.getElementsByTagName("style");for(var A=0;A<f.length;A++)v+=f[A].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&k(c)}),D={},B={},S=[];for(A=0;A<f.length;A++)mxUtils.bind(this,function(R){var T=R.getElementsByTagName("div");if(0<T.length)try{var P=T[0].cloneNode(!0),q=parseInt(P.style.marginLeft),u=parseInt(P.style.paddingTop),J=P.getElementsByTagName("div")[1],G=T=!1,H=P.style.alignItems,g=P.style.justifyContent;
-if(null!=P.style.writingMode){var n=P.style.writingMode;G="vertical-"==n.substring(0,9);T="-rl"==n.substring(n.length-3)}var C=!G&&"1px"==P.style.width||G&&"1px"==P.style.height;if(!G&&"1px"==P.style.height||G&&"1px"==P.style.width)P.style.alignItems=G&&T?"unsafe flex-end":"unsafe flex-start";C&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,N=D[I];null==N&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),
-n=1,n="1px"==P.style.width?J.offsetWidth:parseInt(P.style.width),C=1,C="1px"==P.style.height?J.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),N=new mxRectangle(q,u,n,C),D[I]=N);"1px"==P.style.height&&("unsafe center"==H?u-=N.height/2:"unsafe flex-end"==H&&(u-=N.height));if("1px"==P.style.width)if(!G&&"unsafe center"==g||G&&"unsafe center"==H)q-=N.width/2;else if(!G&&"unsafe flex-end"==g||G&&(!T&&"unsafe flex-end"==H||T&&"unsafe flex-start"==H))q-=N.width;N=new mxRectangle(q,u,
-N.width,N.height+parseInt(J.style.fontSize)/4);S.push(mxUtils.bind(this,function(O){var Q=B[I];null==Q?Graph.htmlToPng(I,N.width,N.height,mxUtils.bind(this,function(U){m(R,q,u,N,U);B[I]=U;O()}),v):(m(R,q,u,N,Q),O())}))}catch(O){E()}else E()})(f[A]);0==counter&&k(c);A=0;t()};EditorUi.prototype.addRadiobox=function(c,f,k,m,t,v,A){return this.addCheckbox(c,k,m,t,v,A,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,k,m,t,v,A,E){v=null!=v?v:!0;var D=document.createElement("input");D.style.marginRight=
-"8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=E&&D.setAttribute("name",E);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);m&&D.setAttribute("disabled","disabled");v&&(c.appendChild(D),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",A),c.appendChild(k),t||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,f){var k=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);
-k.style.marginLeft="24px";var m=this.getCurrentFile(),t="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var v=document.createElement("select");v.style.maxWidth="200px";v.style.width="auto";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));v.appendChild(m);var A=document.createElement("option");A.setAttribute("value",
-"custom");mxUtils.write(A,mxResources.get("custom")+"...");v.appendChild(A);c.appendChild(v);mxEvent.addListener(v,"change",mxUtils.bind(this,function(){if("custom"==v.value){var E=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,A.setAttribute("title",D)):(v.value="blank",A.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){v.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
-function(){k.checked&&(null==f||f.checked)?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===v.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return v}}};EditorUi.prototype.addLinkSection=function(c,f){function k(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(E.style.border="1px solid black",
-E.style.backgroundColor=v):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));
+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,m,t,v){this.isLocalFileSave()?this.saveLocalFile(l,
+c,m,t,f,v):this.saveRequest(c,f,mxUtils.bind(this,function(B,E){return this.createEchoRequest(l,B,m,t,f,E)}),l,t,m)};EditorUi.prototype.saveRequest=function(c,f,l,m,t,v,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,function(A,S,R,T){if("_blank"==S||null!=A&&0<A.length){var P=l("_blank"==S?null:A,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=P&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?P.simulate(document,"_blank"):(R=mxUtils.bind(this,
+function(q){v=null!=v?v:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,A,v,!0,S,q)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),A,v,!0,S,q)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),
+null!=T?R(T):this.pickFolder(S,R)))}});t=[App.MODE_BROWSER];B||t.push("_blank");var D=new SaveDialog(this,c,mxUtils.bind(this,function(A,S,R){E(A.value,S,A,R);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,
+l,m,t,v){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(c,f,l,m,t,v,B,E,D,A,S,R,T,P)}));this.handleError(W)})))try{var q=this.editor.graph.isSelectionEmpty();
+l=null!=l?l:q;var u=f?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==f&&(u=this.editor.graph.shapeBackgroundColor);var J=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var G=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==S||"dark"==S)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==S;var g=Graph.addFont,p={};Graph.addFont=function(W,Y,Z,aa){g.call(this,
+W,Y,Z,p)};var C=this.editor.graph.createSvgImageExport(t),I=C.drawCellState;C.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);I.apply(this,arguments)};var M=this.editor.graph.getSvg(u,c,B,E,null,l,null,C,"blank"==A?"_blank":"self"==A?"_top":null,null,!T,S,R);mxUtils.lightDarkColorSupported=G;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=J;m&&this.editor.graph.addSvgShadow(M);var O=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,
+function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var Q=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,l,D,null,null,null,null,null,c,B));P(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&
+this.editor.addMathCss(M);var U=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&v&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&T?this.replaceAlternateContent(W,S,Q):Q(W)}),V=Graph.customFontElements;Graph.customFontElements=p;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=g;v&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,U,this.thumbImageCache)):U(W)});T?this.embedFonts(M,
+X):(this.editor.addFontCss(M),X(M))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function m(R,T,P,q,u){var J=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");J.setAttribute("x",T);J.setAttribute("y",P+.5);J.setAttribute("width",q.width);J.setAttribute("height",q.height);null==J.setAttributeNS?J.setAttribute("xlink:href",u):J.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);R.replaceChild(J,R.lastChild);E()}function t(){if(B<S.length)S[B++](t)}
+var v="";f=c.getElementsByTagName("style");for(var B=0;B<f.length;B++)v+=f[B].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),D={},A={},S=[];for(B=0;B<f.length;B++)mxUtils.bind(this,function(R){var T=R.getElementsByTagName("div");if(0<T.length)try{var P=T[0].cloneNode(!0),q=parseInt(P.style.marginLeft),u=parseInt(P.style.paddingTop),J=P.getElementsByTagName("div")[1],G=T=!1,H=P.style.alignItems,g=P.style.justifyContent;
+if(null!=P.style.writingMode){var p=P.style.writingMode;G="vertical-"==p.substring(0,9);T="-rl"==p.substring(p.length-3)}var C=!G&&"1px"==P.style.width||G&&"1px"==P.style.height;if(!G&&"1px"==P.style.height||G&&"1px"==P.style.width)P.style.alignItems=G&&T?"unsafe flex-end":"unsafe flex-start";C&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,M=D[I];null==M&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),
+p=1,p="1px"==P.style.width?J.offsetWidth:parseInt(P.style.width),C=1,C="1px"==P.style.height?J.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),M=new mxRectangle(q,u,p,C),D[I]=M);"1px"==P.style.height&&("unsafe center"==H?u-=M.height/2:"unsafe flex-end"==H&&(u-=M.height));if("1px"==P.style.width)if(!G&&"unsafe center"==g||G&&"unsafe center"==H)q-=M.width/2;else if(!G&&"unsafe flex-end"==g||G&&(!T&&"unsafe flex-end"==H||T&&"unsafe flex-start"==H))q-=M.width;M=new mxRectangle(q,u,
+M.width,M.height+parseInt(J.style.fontSize)/4);S.push(mxUtils.bind(this,function(O){var Q=A[I];null==Q?Graph.htmlToPng(I,M.width,M.height,mxUtils.bind(this,function(U){m(R,q,u,M,U);A[I]=U;O()}),v):(m(R,q,u,M,Q),O())}))}catch(O){E()}else E()})(f[B]);0==counter&&l(c);B=0;t()};EditorUi.prototype.addRadiobox=function(c,f,l,m,t,v,B){return this.addCheckbox(c,l,m,t,v,B,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,m,t,v,B,E){v=null!=v?v:!0;var D=document.createElement("input");D.style.marginRight=
+"8px";D.style.marginTop="16px";D.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();D.id=B;null!=E&&D.setAttribute("name",E);l&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);m&&D.setAttribute("disabled","disabled");v&&(c.appendChild(D),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",B),c.appendChild(l),t||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);
+l.style.marginLeft="24px";var m=this.getCurrentFile(),t="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var v=document.createElement("select");v.style.maxWidth="200px";v.style.width="auto";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));v.appendChild(m);var B=document.createElement("option");B.setAttribute("value",
+"custom");mxUtils.write(B,mxResources.get("custom")+"...");v.appendChild(B);c.appendChild(v);mxEvent.addListener(v,"change",mxUtils.bind(this,function(){if("custom"==v.value){var E=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,B.setAttribute("title",D)):(v.value="blank",B.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){v.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,
+function(){l.checked&&(null==f||f.checked)?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===v.value?"_blank":t:null},getEditInput:function(){return l},getEditSelect:function(){return v}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(E.style.border="1px solid black",
+E.style.backgroundColor=v):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));
m.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));m.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));m.appendChild(t);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));c.appendChild(m);mxUtils.write(c,mxResources.get("borderColor")+
-":");var v="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(v||"none",function(D){v=D;k()});mxEvent.consume(E)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";c.appendChild(A);mxUtils.br(c);return{getColor:function(){return v},getTarget:function(){return m.value},
-focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,k,m,t,v){v=null!=v?v:[];k&&(v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=f&&f!=mxConstants.NONE&&v.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),t&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));return v};EditorUi.prototype.createLink=function(c,f,k,m,t,v,A,E,D,B,S,R,T){var P=this.getCurrentFile();D=this.createUrlParameters(c,
-f,m,t,v,D);c=!0;null!=A?k="#U"+encodeURIComponent(A):E||null==P||""==P.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+P.getHash(),c=!1);c&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(P.getTitle()));B&&1<k.length&&(D.push("open="+k.substring(1)),k="");S&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());R&&D.push("transparent=1");
-null!=T&&D.push("dark="+T);return(m&&(null!=A||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(c,f,k,m,t,v,A,E,D,B,S,R,T){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==m&&(P.target=m);B||(P.lightbox=
-!1);P.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(P.zoom=k/100);k=[];A&&(k.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(k.push("zoom"),P.resize=!0);E&&k.push("layers");D&&k.push("tags");null!=T&&(P["dark-mode"]=T);0<k.length&&(B&&k.push("lightbox"),P.toolbar=k.join(" "));null!=S&&0<S.length&&(P.edit=S);null!=c?P.url=c:P.xml=this.getFileData(!0,null,null,null,null,!A);f='<div class="mxgraph" style="'+
-(v?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";R(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+
-'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,k,m){var t=document.createElement("div");t.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("html"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(v);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");v=E.cloneNode(!0);v.setAttribute("value","copy");A.appendChild(v);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(D);mxUtils.br(A);A.appendChild(E);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var B=this.getCurrentFile();null==k&&null!=B&&B.constructor==window.DriveFile&&(D=
-document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(B.getId(),B)})));v.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");t.appendChild(A);A=380;var S=this.addLinkSection(t),R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";
+":");var v="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(v||"none",function(D){v=D;l()});mxEvent.consume(E)}));l();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";c.appendChild(B);mxUtils.br(c);return{getColor:function(){return v},getTarget:function(){return m.value},
+focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,m,t,v){v=null!=v?v:[];l&&(v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=f&&f!=mxConstants.NONE&&v.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),t&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));return v};EditorUi.prototype.createLink=function(c,f,l,m,t,v,B,E,D,A,S,R,T){var P=this.getCurrentFile();D=this.createUrlParameters(c,
+f,m,t,v,D);c=!0;null!=B?l="#U"+encodeURIComponent(B):E||null==P||""==P.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+P.getHash(),c=!1);c&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(P.getTitle()));A&&1<l.length&&(D.push("open="+l.substring(1)),l="");S&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());R&&D.push("transparent=1");
+null!=T&&D.push("dark="+T);return(m&&(null!=B||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,m,t,v,B,E,D,A,S,R,T){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==m&&(P.target=m);A||(P.lightbox=
+!1);P.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(P.zoom=l/100);l=[];B&&(l.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),P.resize=!0);E&&l.push("layers");D&&l.push("tags");null!=T&&(P["dark-mode"]=T);0<l.length&&(A&&l.push("lightbox"),P.toolbar=l.join(" "));null!=S&&0<S.length&&(P.edit=S);null!=c?P.url=c:P.xml=this.getFileData(!0,null,null,null,null,!B);f='<div class="mxgraph" style="'+
+(v?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";R(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,m){var t=document.createElement("div");t.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("html"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(v);var B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");v=E.cloneNode(!0);v.setAttribute("value","copy");B.appendChild(v);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));B.appendChild(D);mxUtils.br(B);B.appendChild(E);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));B.appendChild(D);var A=this.getCurrentFile();null==l&&null!=A&&A.constructor==window.DriveFile&&(D=
+document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),B.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId(),A)})));v.setAttribute("checked","checked");null==l&&E.setAttribute("disabled","disabled");t.appendChild(B);B=380;var S=this.addLinkSection(t),R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";
R.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");R.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+
-":");t.appendChild(R);mxUtils.br(t);A+=26;var T=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";t.appendChild(P);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(t,mxResources.get("allPages"),D,!D),J=this.addCheckbox(t,mxResources.get("layers"),
-!0),G=this.addCheckbox(t,mxResources.get("tags"),!0),H=this.addCheckbox(t,mxResources.get("lightbox"),!0),g=null;if(EditorUi.enableHtmlEditOption){g=this.addEditButton(t,H);var n=g.getEditInput();n.style.marginBottom="16px";A+=50;mxEvent.addListener(H,"change",function(){H.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");n.checked&&H.checked?g.getEditSelect().removeAttribute("disabled"):g.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,t,mxUtils.bind(this,
-function(){m(E.checked?k:null,T.checked,P.value,S.getTarget(),S.getColor(),q.checked,u.checked,J.checked,G.checked,H.checked,null!=g?g.getLink():null,null!=R?R.value:null)}),null,c,f);this.showDialog(c.container,340,A,!0,!0);v.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,k,m,t,v,A,E,D,B,S,R){var T=document.createElement("div");T.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,c||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";
+":");t.appendChild(R);mxUtils.br(t);B+=26;var T=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";t.appendChild(P);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(t,mxResources.get("allPages"),D,!D),J=this.addCheckbox(t,mxResources.get("layers"),
+!0),G=this.addCheckbox(t,mxResources.get("tags"),!0),H=this.addCheckbox(t,mxResources.get("lightbox"),!0),g=null;if(EditorUi.enableHtmlEditOption){g=this.addEditButton(t,H);var p=g.getEditInput();p.style.marginBottom="16px";B+=50;mxEvent.addListener(H,"change",function(){H.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");p.checked&&H.checked?g.getEditSelect().removeAttribute("disabled"):g.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,t,mxUtils.bind(this,
+function(){m(E.checked?l:null,T.checked,P.value,S.getTarget(),S.getColor(),q.checked,u.checked,J.checked,G.checked,H.checked,null!=g?g.getLink():null,null!=R?R.value:null)}),null,c,f);this.showDialog(c.container,340,B,!0,!0);v.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,m,t,v,B,E,D,A,S,R){var T=document.createElement("div");T.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,c||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";
P.style.marginTop="2px";P.style.marginBottom="20px";T.appendChild(P);var q=document.createElement("select");c=30;q.className="geBtn";q.style.marginBottom="8px";q.style.marginLeft="0px";q.style.width="100%";q.style.boxSizing="border-box";if(null==E||""==E.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),q.appendChild(P);P=document.createElement("option");mxUtils.write(P,
-mxResources.get("authorizationRequired"));P.setAttribute("value","auth");q.appendChild(P);null!=E&&""!=E.getHash()||P.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");q.appendChild(E);null!=A?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",A),q.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));T.appendChild(q);
-mxUtils.br(T);q.focus();var u=null,J=null;if(null!=f||null!=k)c+=30,mxUtils.write(T,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",T.appendChild(u),mxUtils.write(T,mxResources.get("height")+":"),J=document.createElement("input"),J.setAttribute("type","text"),J.style.width="50px",J.style.marginLeft="6px",J.style.marginBottom=
-"10px",J.value=k+"px",T.appendChild(J),mxUtils.br(T);var G=this.addLinkSection(T,m),H=B?this.addCheckbox(T,mxResources.get("transparentBackground"),!1):null;null!=H&&(c+=20);var g=document.createElement("select");g.className="geBtn";g.style.marginTop="8px";f=document.createElement("option");mxUtils.write(f,mxResources.get("allPages"));f.setAttribute("value","allPages");g.appendChild(f);f=document.createElement("option");mxUtils.write(f,mxResources.get("currentPage"));f.setAttribute("value","currentPage");
-g.appendChild(f);var n=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),R&&(mxUtils.write(T,mxResources.get("pages")+":"),T.appendChild(g),mxUtils.br(T),c+=30),n=this.addCheckbox(T,mxResources.get("selectedPage")+": "+f));var C=document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginTop="16px";R=document.createElement("option");
+mxResources.get("authorizationRequired"));P.setAttribute("value","auth");q.appendChild(P);null!=E&&""!=E.getHash()||P.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");q.appendChild(E);null!=B?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",B),q.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));T.appendChild(q);
+mxUtils.br(T);q.focus();var u=null,J=null;if(null!=f||null!=l)c+=30,mxUtils.write(T,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",T.appendChild(u),mxUtils.write(T,mxResources.get("height")+":"),J=document.createElement("input"),J.setAttribute("type","text"),J.style.width="50px",J.style.marginLeft="6px",J.style.marginBottom=
+"10px",J.value=l+"px",T.appendChild(J),mxUtils.br(T);var G=this.addLinkSection(T,m),H=A?this.addCheckbox(T,mxResources.get("transparentBackground"),!1):null;null!=H&&(c+=20);var g=document.createElement("select");g.className="geBtn";g.style.marginTop="8px";f=document.createElement("option");mxUtils.write(f,mxResources.get("allPages"));f.setAttribute("value","allPages");g.appendChild(f);f=document.createElement("option");mxUtils.write(f,mxResources.get("currentPage"));f.setAttribute("value","currentPage");
+g.appendChild(f);var p=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),R&&(mxUtils.write(T,mxResources.get("pages")+":"),T.appendChild(g),mxUtils.br(T),c+=30),p=this.addCheckbox(T,mxResources.get("selectedPage")+": "+f));var C=document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginTop="16px";R=document.createElement("option");
R.setAttribute("value","0");mxUtils.write(R,mxResources.get("light"));C.appendChild(R);R=document.createElement("option");R.setAttribute("value","1");mxUtils.write(R,mxResources.get("dark"));C.appendChild(R);R=document.createElement("option");R.setAttribute("value","auto");mxUtils.write(R,mxResources.get("automatic"));R.setAttribute("selected","selected");C.appendChild(R);S&&(mxUtils.write(T,mxResources.get("appearance")+":"),T.appendChild(C),mxUtils.br(T),c+=30);var I=this.addCheckbox(T,mxResources.get("lightbox"),
-!0,null,null,!m),N=this.addEditButton(T,I),O=N.getEditInput();m&&(O.style.marginLeft=I.style.marginLeft,I.style.display="none",c-=20);var Q=this.addCheckbox(T,mxResources.get("layers"),!0);Q.style.marginLeft=O.style.marginLeft;Q.style.marginTop="8px";var U=this.addCheckbox(T,mxResources.get("tags"),!0);U.style.marginLeft=O.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(I,"change",function(){I.checked?(Q.removeAttribute("disabled"),O.removeAttribute("disabled"),
-U.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));O.checked&&I.checked?N.getEditSelect().removeAttribute("disabled"):N.getEditSelect().setAttribute("disabled","disabled")});m=new CustomDialog(this,T,mxUtils.bind(this,function(){D(G.getTarget(),G.getColor(),null==n?!1:n.checked,I.checked,N.getLink(),Q.checked,null!=u?u.value:null,null!=J?J.value:null,U.checked,q.value,null!=H?H.checked:!1,C.value,"allPages"==
-g.value)}),null,mxResources.get("create"),t,v);this.showDialog(m.container,340,296+c,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)):null==q.parentNode;G.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,k,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(t?"10":"4")+"px";v.appendChild(A);if(t){mxUtils.write(v,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";v.appendChild(E);mxUtils.write(v,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=
-this.lastExportBorder||"0";v.appendChild(D);mxUtils.br(v)}var B=this.addCheckbox(v,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=m?null:this.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var R=m?null:this.addCheckbox(v,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=R&&(R.style.marginBottom="16px");c=new CustomDialog(this,v,mxUtils.bind(this,function(){var T=
-parseInt(E.value)/100||1,P=parseInt(D.value)||0;k(!B.checked,null!=S?S.checked:!1,null!=R?R.checked:!1,T,P)}),null,c,f);this.showDialog(c.container,300,(t?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,k,m,t,v,A,E,D){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var S=this.editor.graph,R="jpeg"==E||"webp"==E?220:320,T=document.createElement("h3");mxUtils.write(T,c);T.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-B.appendChild(T);mxUtils.write(B,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";B.appendChild(P);mxUtils.write(B,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||
-"0";B.appendChild(q);mxUtils.br(B);var u=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(T=0;T<c.length;T++)if(!S.isSelectionEmpty()||"selectionOnly"!=c[T]){var H=
-document.createElement("option");mxUtils.write(H,mxResources.get(c[T]));H.setAttribute("value",c[T]);G.appendChild(H)}D?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(G),mxUtils.br(B),R+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(u.checked=!0)})):v&&(B.appendChild(J),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),R+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?
-D&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",R-=30):(G.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){G.value=u.checked?"selectionOnly":"diagram"}));var g=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),n=document.createElement("select");n.style.maxWidth="260px";n.style.marginLeft="8px";n.style.marginTop="16px";v=document.createElement("option");
-v.setAttribute("value","light");mxUtils.write(v,mxResources.get("light"));n.appendChild(v);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));n.appendChild(D);"svg"==E&&mxUtils.lightDarkColorSupported?(v=document.createElement("option"),v.setAttribute("value","auto"),mxUtils.write(v,mxResources.get("automatic")),v.setAttribute("selected","selected"),n.appendChild(v)):Editor.isDarkMode()?D.setAttribute("selected","selected"):v.setAttribute("selected",
-"selected");mxUtils.write(B,mxResources.get("appearance")+":");B.appendChild(n);mxUtils.br(B);R+=26;var C=this.addCheckbox(B,mxResources.get("shadow"),S.shadowVisible),I=null;if("png"==E||"jpeg"==E||"webp"==E)I=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),R+=30;S=null!=this.pages?this.pages.length:1;var N=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram")+(1<S?":":""),A,null,null,"jpeg"!=E&&"webp"!=E),O=document.createElement("select");O.style.maxWidth=
-"260px";O.style.marginLeft="28px";"png"==E||"svg"==E?(A=function(){N.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},v=document.createElement("option"),v.setAttribute("value","allPages"),mxUtils.write(v,mxResources.get("allPages")),O.appendChild(v),v=document.createElement("option"),v.setAttribute("value","currentPage"),mxUtils.write(v,mxResources.get("currentPage")),O.appendChild(v),1<S?(N.style.marginBottom="12px",O.style.marginBottom="16px",B.appendChild(O),mxUtils.br(B),
-R+=20):N.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(N,"change",A),A()):N.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");Q.id="geCheckbox-"+Editor.guid();var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+Editor.guid();f&&(Q.checked=null!=
-this.lastEmbedImages?this.lastEmbedImages:!0,B.appendChild(Q),A=document.createElement("label"),mxUtils.write(A,mxResources.get("embedImages")),A.setAttribute("for",Q.id),B.appendChild(A),mxUtils.br(B),U.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,B.appendChild(U),A=document.createElement("label"),mxUtils.write(A,mxResources.get("embedFonts")),A.setAttribute("for",U.id),B.appendChild(A),mxUtils.br(B),R+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
-"8px";v=document.createElement("option");v.setAttribute("value","auto");mxUtils.write(v,mxResources.get("automatic"));V.appendChild(v);A=document.createElement("option");A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));V.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));V.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";
-A.style.display="none";"svg"==E&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(V),B.appendChild(A),mxUtils.br(B),mxUtils.br(B),R+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=Q.checked;this.lastEmbedFonts=U.checked;this.lastEmbedInclude=O.value;t(P.value,g.checked,!u.checked,C.checked,N.checked,Q.checked&&f,q.value,J.checked,("png"==E||"svg"==E)&&"currentPage"==O.value,V.value,null!=I?I.checked:
-null,null!=n?n.value:null,G.value,U.checked)}),null,k,m);this.showDialog(k.container,340,R,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,k,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=f){var E=document.createElement("h3");mxUtils.write(E,f);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-v.appendChild(E)}var D=this.addCheckbox(v,mxResources.get("fit"),!0),B=this.addCheckbox(v,mxResources.get("shadow"),A.shadowVisible&&m,!m),S=this.addCheckbox(v,k),R=this.addCheckbox(v,mxResources.get("lightbox"),!0),T=this.addEditButton(v,R),P=T.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),u=this.addCheckbox(v,mxResources.get("layers"),q,!q);u.style.marginLeft=P.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(R,"change",function(){R.checked?
-(q&&u.removeAttribute("disabled"),P.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&R.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,v,mxUtils.bind(this,function(){c(D.checked,B.checked,S.checked,R.checked,T.getLink(),u.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(c,f,k,m,t,v,A,E){function D(P){var q=" ",u="";m&&(q=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",u+=
-"cursor:pointer;");c&&(u+="max-width:100%;");var J="";k&&(J=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');A('<img src="'+P+'"'+J+(""!=u?' style="'+u+'"':"")+q+"/>")}var B=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=m?this.getFileData(!0):null;P=this.createImageDataUri(P,q,"png");D(P)}),null,null,null,mxUtils.bind(this,function(P){E({message:mxResources.get("unknownError")})}),
-null,!0,k?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),B.width*B.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var R="";k&&(R="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var T=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+R+"&xml="+encodeURIComponent(f));T.send(mxUtils.bind(this,function(){200<=T.getStatus()&&299>=T.getStatus()?D("data:image/png;base64,"+T.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(c,f,k,m,t,v,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=E.getElementsByTagName("a");if(null!=D)for(var B=0;B<D.length;B++){var S=D[B].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==D[B].getAttribute("target")&&D[B].removeAttribute("target")}m&&E.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(E);if(k){var R=" ",T="";m&&(R="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",T+="cursor:pointer;");c&&(T+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(P){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=T?' style="'+T+'"':"")+R+"/>")}))}else T="",m&&(f=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}}})(this);"),T+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),t=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+t),T+="max-width:100%;max-height:"+t+"px;",E.removeAttribute("height")),""!=T&&E.setAttribute("style",T),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=
-Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var k=null;if("diagram"==c.nodeName)k=
-c;else if("mxfile"==c.nodeName){var m=c.getElementsByTagName("diagram");if(0<m.length){k=m[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(v){return"page"==v?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==v?1:t.apply(this,arguments)}}}null!=k&&(c=Editor.parseDiagramNode(k))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(v){}finally{this.editor.graph=m}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
-EditorUi.prototype.getPngFileProperties=function(c){var f=1,k=0;if(null!=c){if(c.hasAttribute("scale")){var m=parseFloat(c.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}c.hasAttribute("border")&&(m=parseInt(c.getAttribute("border")),!isNaN(m)&&0<m&&(k=m))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(c,f,k,m,t){try{var v=this.editor.graph,A=null;if(null!=k&&0<k.length)v=this.createTemporaryGraph(v.getStylesheet()),document.body.appendChild(v.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),v),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){v=this.createTemporaryGraph(v.getStylesheet());var E=v.getGlobalVariable;v.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?v.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&v.setBackgroundImage(D.viewState.backgroundImage);v.getGlobalVariable=function(B){return"page"==B?D.getName():"pagenumber"==B?1:E.apply(this,arguments)};document.body.appendChild(v.container);
-v.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(B){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var S=B.toDataURL("image/png");S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(A));c(S.substring(S.lastIndexOf(",")+1));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container)}catch(R){null!=f&&f(R)}}),null,null,null,mxUtils.bind(this,function(B){null!=f&&f(B)}),null,null,m,null,v.shadowVisible,null,v,t,null,
-null,null,"diagram",null)}catch(B){null!=f&&f(B)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,k,m,t,v,A,E,D,B,S,R,T){E=null!=E?E:!0;S=null!=S?S:0;A=null!=D?D:f.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==f.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=c);v=f.getSvg(A,B,S,null,null,v,null,D,null,f.shadowVisible||R,null,T,"diagram");(f.shadowVisible||R)&&f.addSvgShadow(v,null,null,0==S);null!=c&&v.setAttribute("content",c);null!=k&&v.setAttribute("resource",
-k);var P=mxUtils.bind(this,function(q){q=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});f.mathEnabled&&this.editor.addMathCss(v);if(null!=t)this.embedFonts(v,mxUtils.bind(this,function(q){E?this.editor.convertImages(q,mxUtils.bind(this,function(u){P(u)})):P(q)}));else return P(v)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),f(c)}catch(m){f(c)}}))}catch(k){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,k,m,t,v,A,E,D,B,S,R,T){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(c,f,k,m,t,v,A,E,D,B,S,R,T)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();
-k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,E,null,null,null,null,null,c,v):null,D,null==this.pages||0==this.pages.length,S)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,c||1,f,m,null,null,v,A,B,R,T)}catch(q){this.spinner.stop(),this.handleError(q)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,k,m,t,v,A){f=null!=f?f:0;k=null!=k?k:0;var E=[];try{var D=this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var B=mxUtils.parseXml(c);c={};var S=this.editor.extractGraphModel(B.documentElement,
+!0,null,null,!m),M=this.addEditButton(T,I),O=M.getEditInput();m&&(O.style.marginLeft=I.style.marginLeft,I.style.display="none",c-=20);var Q=this.addCheckbox(T,mxResources.get("layers"),!0);Q.style.marginLeft=O.style.marginLeft;Q.style.marginTop="8px";var U=this.addCheckbox(T,mxResources.get("tags"),!0);U.style.marginLeft=O.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(I,"change",function(){I.checked?(Q.removeAttribute("disabled"),O.removeAttribute("disabled"),
+U.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));O.checked&&I.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});m=new CustomDialog(this,T,mxUtils.bind(this,function(){D(G.getTarget(),G.getColor(),null==p?!1:p.checked,I.checked,M.getLink(),Q.checked,null!=u?u.value:null,null!=J?J.value:null,U.checked,q.value,null!=H?H.checked:!1,C.value,"allPages"==
+g.value)}),null,mxResources.get("create"),t,v);this.showDialog(m.container,340,296+c,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)):null==q.parentNode;G.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(t?"10":"4")+"px";v.appendChild(B);if(t){mxUtils.write(v,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";v.appendChild(E);mxUtils.write(v,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=
+this.lastExportBorder||"0";v.appendChild(D);mxUtils.br(v)}var A=this.addCheckbox(v,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=m?null:this.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var R=m?null:this.addCheckbox(v,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=R&&(R.style.marginBottom="16px");c=new CustomDialog(this,v,mxUtils.bind(this,function(){var T=
+parseInt(E.value)/100||1,P=parseInt(D.value)||0;l(!A.checked,null!=S?S.checked:!1,null!=R?R.checked:!1,T,P)}),null,c,f);this.showDialog(c.container,300,(t?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,m,t,v,B,E,D){B=null!=B?B:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var S=this.editor.graph,R="jpeg"==E||"webp"==E?220:320,T=document.createElement("h3");mxUtils.write(T,c);T.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+A.appendChild(T);mxUtils.write(A,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";A.appendChild(P);mxUtils.write(A,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||
+"0";A.appendChild(q);mxUtils.br(A);var u=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(T=0;T<c.length;T++)if(!S.isSelectionEmpty()||"selectionOnly"!=c[T]){var H=
+document.createElement("option");mxUtils.write(H,mxResources.get(c[T]));H.setAttribute("value",c[T]);G.appendChild(H)}D?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),R+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(u.checked=!0)})):v&&(A.appendChild(J),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),R+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?
+D&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",R-=30):(G.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){G.value=u.checked?"selectionOnly":"diagram"}));var g=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),p=document.createElement("select");p.style.maxWidth="260px";p.style.marginLeft="8px";p.style.marginTop="16px";v=document.createElement("option");
+v.setAttribute("value","light");mxUtils.write(v,mxResources.get("light"));p.appendChild(v);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));p.appendChild(D);"svg"==E&&mxUtils.lightDarkColorSupported?(v=document.createElement("option"),v.setAttribute("value","auto"),mxUtils.write(v,mxResources.get("automatic")),v.setAttribute("selected","selected"),p.appendChild(v)):Editor.isDarkMode()?D.setAttribute("selected","selected"):v.setAttribute("selected",
+"selected");mxUtils.write(A,mxResources.get("appearance")+":");A.appendChild(p);mxUtils.br(A);R+=26;var C=this.addCheckbox(A,mxResources.get("shadow"),S.shadowVisible),I=null;if("png"==E||"jpeg"==E||"webp"==E)I=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),R+=30;S=null!=this.pages?this.pages.length:1;var M=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram")+(1<S?":":""),B,null,null,"jpeg"!=E&&"webp"!=E),O=document.createElement("select");O.style.maxWidth=
+"260px";O.style.marginLeft="28px";"png"==E||"svg"==E?(B=function(){M.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},v=document.createElement("option"),v.setAttribute("value","allPages"),mxUtils.write(v,mxResources.get("allPages")),O.appendChild(v),v=document.createElement("option"),v.setAttribute("value","currentPage"),mxUtils.write(v,mxResources.get("currentPage")),O.appendChild(v),1<S?(M.style.marginBottom="12px",O.style.marginBottom="16px",A.appendChild(O),mxUtils.br(A),
+R+=20):M.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(M,"change",B),B()):M.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");Q.id="geCheckbox-"+Editor.guid();var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");U.id="geCheckbox-"+Editor.guid();f&&(Q.checked=null!=
+this.lastEmbedImages?this.lastEmbedImages:!0,A.appendChild(Q),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedImages")),B.setAttribute("for",Q.id),A.appendChild(B),mxUtils.br(A),U.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,A.appendChild(U),B=document.createElement("label"),mxUtils.write(B,mxResources.get("embedFonts")),B.setAttribute("for",U.id),A.appendChild(B),mxUtils.br(A),R+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft=
+"8px";v=document.createElement("option");v.setAttribute("value","auto");mxUtils.write(v,mxResources.get("automatic"));V.appendChild(v);B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("openInNewWindow"));V.appendChild(B);B=document.createElement("option");B.setAttribute("value","self");mxUtils.write(B,mxResources.get("openInThisWindow"));V.appendChild(B);B=document.createElement("div");mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";
+B.style.display="none";"svg"==E&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(V),A.appendChild(B),mxUtils.br(A),mxUtils.br(A),R+=50);l=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=Q.checked;this.lastEmbedFonts=U.checked;this.lastEmbedInclude=O.value;t(P.value,g.checked,!u.checked,C.checked,M.checked,Q.checked&&f,q.value,J.checked,("png"==E||"svg"==E)&&"currentPage"==O.value,V.value,null!=I?I.checked:
+null,null!=p?p.value:null,G.value,U.checked)}),null,l,m);this.showDialog(l.container,340,R,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var B=this.editor.graph;if(null!=f){var E=document.createElement("h3");mxUtils.write(E,f);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+v.appendChild(E)}var D=this.addCheckbox(v,mxResources.get("fit"),!0),A=this.addCheckbox(v,mxResources.get("shadow"),B.shadowVisible&&m,!m),S=this.addCheckbox(v,l),R=this.addCheckbox(v,mxResources.get("lightbox"),!0),T=this.addEditButton(v,R),P=T.getEditInput(),q=1<B.model.getChildCount(B.model.getRoot()),u=this.addCheckbox(v,mxResources.get("layers"),q,!q);u.style.marginLeft=P.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(R,"change",function(){R.checked?
+(q&&u.removeAttribute("disabled"),P.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&R.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,v,mxUtils.bind(this,function(){c(D.checked,A.checked,S.checked,R.checked,T.getLink(),u.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(c,f,l,m,t,v,B,E){function D(P){var q=" ",u="";m&&(q=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",u+=
+"cursor:pointer;");c&&(u+="max-width:100%;");var J="";l&&(J=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');B('<img src="'+P+'"'+J+(""!=u?' style="'+u+'"':"")+q+"/>")}var A=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=m?this.getFileData(!0):null;P=this.createImageDataUri(P,q,"png");D(P)}),null,null,null,mxUtils.bind(this,function(P){E({message:mxResources.get("unknownError")})}),
+null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),A.width*A.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var R="";l&&(R="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var T=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+R+"&xml="+encodeURIComponent(f));T.send(mxUtils.bind(this,function(){200<=T.getStatus()&&299>=T.getStatus()?D("data:image/png;base64,"+T.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(c,f,l,m,t,v,B){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),D=E.getElementsByTagName("a");if(null!=D)for(var A=0;A<D.length;A++){var S=D[A].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==D[A].getAttribute("target")&&D[A].removeAttribute("target")}m&&E.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(E);if(l){var R=" ",T="";m&&(R="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",T+="cursor:pointer;");c&&(T+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(P){B('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=T?' style="'+T+'"':"")+R+"/>")}))}else T="",m&&(f=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}}})(this);"),T+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),t=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+t),T+="max-width:100%;max-height:"+t+"px;",E.removeAttribute("height")),""!=T&&E.setAttribute("style",T),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),B(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=
+Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==c.nodeName)l=
+c;else if("mxfile"==c.nodeName){var m=c.getElementsByTagName("diagram");if(0<m.length){l=m[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(v){return"page"==v?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==v?1:t.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(v){}finally{this.editor.graph=m}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
+EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var m=parseFloat(c.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}c.hasAttribute("border")&&(m=parseInt(c.getAttribute("border")),!isNaN(m)&&0<m&&(l=m))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,m,t){try{var v=this.editor.graph,B=null;if(null!=l&&0<l.length)v=this.createTemporaryGraph(v.getStylesheet()),document.body.appendChild(v.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
+!0),v),B=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){v=this.createTemporaryGraph(v.getStylesheet());var E=v.getGlobalVariable;v.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?v.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&v.setBackgroundImage(D.viewState.backgroundImage);v.getGlobalVariable=function(A){return"page"==A?D.getName():"pagenumber"==A?1:E.apply(this,arguments)};document.body.appendChild(v.container);
+v.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(A){try{null==B&&(B=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var S=A.toDataURL("image/png");S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(B));c(S.substring(S.lastIndexOf(",")+1));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container)}catch(R){null!=f&&f(R)}}),null,null,null,mxUtils.bind(this,function(A){null!=f&&f(A)}),null,null,m,null,v.shadowVisible,null,v,t,null,
+null,null,"diagram",null)}catch(A){null!=f&&f(A)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,m,t,v,B,E,D,A,S,R,T){E=null!=E?E:!0;S=null!=S?S:0;B=null!=D?D:f.background;B==mxConstants.NONE&&(B=null);null==B&&"none"==f.getAdaptiveColors()&&(B="#ffffff");D=this.editor.graph.createSvgImageExport(null!=c);v=f.getSvg(B,A,S,null,null,v,null,D,null,f.shadowVisible||R,null,T,"diagram");(f.shadowVisible||R)&&f.addSvgShadow(v,null,null,0==S);null!=c&&v.setAttribute("content",c);null!=l&&v.setAttribute("resource",
+l);var P=mxUtils.bind(this,function(q){q=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});f.mathEnabled&&this.editor.addMathCss(v);if(null!=t)this.embedFonts(v,mxUtils.bind(this,function(q){E?this.editor.convertImages(q,mxUtils.bind(this,function(u){P(u)})):P(q)}));else return P(v)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(m){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,m,t,v,B,E,D,A,S,R,T){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(c,f,l,m,t,v,B,E,D,A,S,R,T)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();
+l=null!=l?l:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,l,E,null,null,null,null,null,c,v):null,D,null==this.pages||0==this.pages.length,S)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,l,c||1,f,m,null,null,v,B,A,R,T)}catch(q){this.spinner.stop(),this.handleError(q)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,m,t,v,B){f=null!=f?f:0;l=null!=l?l:0;var E=[];try{var D=this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var A=mxUtils.parseXml(c);c={};var S=this.editor.extractGraphModel(A.documentElement,
null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var R=S.getElementsByTagName("diagram");if(1==R.length&&!v){if(S=Editor.parseDiagramNode(R[0]),null!=this.currentPage&&(c[R[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var T=R[0].getAttribute("name");null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,T))}}else if(0<R.length){v=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[R[0].getAttribute("id")]=
this.pages[0].getId(),T=R[0].getAttribute("name"),null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],T)),S=Editor.parseDiagramNode(R[0]),m=!1,P=1);for(;P<R.length;P++){var q=R[P].getAttribute("id");R[P].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(R[P]));c[q]=R[P].getAttribute("id");var J=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[J+1]));D.model.execute(new ChangePage(this,u,u,J,!0));v.push(u)}this.updatePageLinks(c,
-v)}}if(null!=S&&"mxGraphModel"===S.nodeName){E=D.importGraphModel(S,f,k,m);if(null!=E)for(this.addLocalPagesToMapping(c),P=0;P<E.length;P++)this.updatePageLinksForCell(c,E[P]);var G=D.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var H=new ChangePageSetup(this,null,G);H.ignoreColor=!0;D.model.execute(H)}}A&&D.pasteCellStyles(D.includeDescendants(E),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(g){if(t)throw g;
-this.handleError(g)}return E};EditorUi.prototype.updatePageLinks=function(c,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(c,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(c,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc="data:page/id,"+k)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,f){var k=document.createElement("div"),m=this.editor.graph,t=m.getLinkForCell(f);null!=t&&m.setLinkForCell(f,this.updatePageLink(c,t));if(m.isHtmlLabel(f)){k.innerHTML=Graph.sanitizeHtml(m.getLabel(f));for(var v=k.getElementsByTagName("a"),A=!1,E=0;E<v.length;E++)t=v[E].getAttribute("href"),null!=t&&(v[E].setAttribute("href",this.updatePageLink(c,t)),A=!0);A&&m.labelChanged(f,k.innerHTML)}for(E=0;E<m.model.getChildCount(f);E++)this.updatePageLinksForCell(c,m.model.getChildAt(f,E))};EditorUi.prototype.updatePageLink=
-function(c,f){if(Graph.isPageLink(f)){var k=c[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var t=0;t<m.actions.length;t++){var v=m.actions[t];if(null!=v.open&&Graph.isPageLink(v.open)){var A=v.open.substring(v.open.indexOf(",")+1);k=c[A];null!=k?v.open="data:page/id,"+k:null==this.getPageById(A)&&delete v.open}}f="data:action/json,"+JSON.stringify(m)}}catch(E){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,k,m,t){var v=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){m=null!=m?m:c.name;var E=mxUtils.bind(this,function(B){A.clear()&&v(B)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var B=this.isRemoteVisioFormat(m);
-try{var S=m.lastIndexOf(".");if(0<=S&&S<m.length)m.substring(S+1).toUpperCase();else{var R=m.lastIndexOf("/");0<=R&&R<m.length&&(m=m.substring(R+1))}}catch(P){}if(B)if(null==VSS_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{B=new FormData;B.append("file1",c,m);var T=new XMLHttpRequest;T.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));T.responseType="blob";this.addRemoteServiceSecurityCheck(T);
-null!=t&&T.setRequestHeader("x-convert-custom",t);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState&&A.clear())if(200<=T.status&&299>=T.status)try{var P=T.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(u){try{f(u.target.result)}catch(J){E({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,f,E,m)}catch(u){E(u)}else try{""==T.responseType||"text"==T.responseType?E({message:T.responseText}):(q=new FileReader,
-q.onload=function(){try{E({message:JSON.parse(q.result).Message})}catch(u){null!=q.result&&0<q.result.length?E({message:q.result}):E(u)}},q.readAsText(T.response))}catch(u){E({})}});T.send(B)}else if(A.clear())try{this.doImportVisio(c,f,E,m)}catch(P){E(P)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,E))}),v)};
-EditorUi.prototype.importGraphML=function(c,f,k){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(E){t.clear()&&m(E)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,m)}catch(E){v(E)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
-this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,v))}),m)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(v){k.clear()&&f(v)}),t=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||m({message:mxResources.get("unknownError")})}catch(v){m(v)}else m({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,m))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};
-EditorUi.prototype.convertLucidChart=function(c,f,k){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(E){t.clear()&&m(E)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var E=JSON.parse(c);f(LucidImporter.importState(E));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),
-"convertLucidChart",E];null!=E.state&&D.push(JSON.parse(E.state));if(null!=E.svgThumbs)for(var B=0;B<E.svgThumbs.length;B++)D.push(Editor.createSvgDataUri(E.svgThumbs[B]));null!=E.thumb&&D.push(E.thumb);console.log.apply(console,D)}}catch(S){}}catch(S){null!=window.console&&console.error(S),v(S)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingExtensions=!0,"1"==
-urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,v))}),m)};EditorUi.prototype.createMermaidXml=function(c,f,k,
-m,t,v){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,m,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=v&&A.setAttributeForCell(k,"templatePrompt",v);c=(new mxCodec).encode(A.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,k){var m=0,t=function(){for(var A=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),
-E=0;E<A.length;E++)null!=A[E].parentNode&&A[E].parentNode.removeChild(A[E])},v=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(A){var E=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(B){A.clear()&&(t(),k(B))});E.send(mxUtils.bind(this,function(B){if(A.isAlive())if(200<=B.getStatus()&&299>=B.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var R=mxUtils.trim(B.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,
-function(T,P,q){this.tryAndHandle(mxUtils.bind(this,function(){A.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[R]),t(),f(R,T,P,q))}),D)}),D,mxUtils.bind(this,function(T){3>m++?A.clear()&&v():D(T)}))}),D);else{var S={message:mxResources.get("error")+" "+B.getStatus()};try{S=JSON.parse(B.getText()),S=S.error}catch(R){}D(S)}}),D)}),k)});v()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));
-var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var k=1<f.length?f[1]:null;if(null!=k){var m=k.indexOf("-");0<m&&(k=k.substring(0,m))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");k=f[0].split(" ")[0].replace(/:$/,"");m=k.indexOf("-");0<
-m&&(k=k.substring(0,m));try{"mindmap"==k&&2<f.length&&(c=extractMermaidMindmap(f))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,k,m,t){var v=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=m?m(E):this.handleError(E)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==
-typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var E=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');D=D.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var B=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<B.length&&
-"error"!=B[0].getAttribute("aria-roledescription")){var S=parseFloat(B[0].getAttribute("width")),R=parseFloat(B[0].getAttribute("height"));if(isNaN(S)||isNaN(R))try{var T=B[0].getAttribute("viewBox").split(/\s+/);S=parseFloat(T[2]);R=parseFloat(T[3])}catch(P){S=S||100,R=R||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),S,R)}else null!=t?t():m({message:mxResources.get("invalidInput")})}catch(P){m(P)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
-c).then(function(D){E(D.svg)}).catch(function(D){null!=t?t(D):m(D)})}catch(D){m(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,v)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,v))};
-EditorUi.prototype.generatePlantUmlImage=function(c,f,k,m){function t(E,D,B){c1=E>>2;c2=(E&3)<<4|D>>4;c3=(D&15)<<2|B>>6;c4=B&63;r="";r+=v(c1&63);r+=v(c2&63);r+=v(c3&63);return r+=v(c4&63)}function v(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";
-for(i=0;i<E.length;i+=3)r=i+2==E.length?r+t(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+t(E.charCodeAt(i),0,0):r+t(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==f)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(B){var S=new Image;S.onload=function(){try{var R=S.width,T=S.height;
-if(0==R&&0==T){var P=D.result,q=P.indexOf(","),u=decodeURIComponent(escape(atob(P.substring(q+1)))),J=mxUtils.parseXml(u).getElementsByTagName("svg");0<J.length&&(R=parseFloat(J[0].getAttribute("width")),T=parseFloat(J[0].getAttribute("height")))}k(D.result,R,T)}catch(G){m(G)}};S.src=D.result};D.onerror=function(B){m(B)}}else m(E)};A.onerror=function(E){m(E)};A.send()};EditorUi.prototype.insertAsPreText=function(c,f,k){var m=this.editor.graph,t=null;m.getModel().beginUpdate();try{t=m.insertVertex(null,
-null,"<pre>"+c+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(t,!0)}finally{m.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(c,f,k,m,t,v,A,E){v=null!=v?v:!0;A=null!=A?A:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(T){4==T.readyState&&200<=
-T.status&&299>=T.status&&this.editor.graph.setSelectionCells(this.insertTextAt(T.responseText,f,k,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var B=Editor.extractGraphModelFromPdf(c);if(null!=B&&0<B.length)return this.importXml(B,f,k,v,!0,E)}if(Editor.isPngDataUrl(c)&&(B=Editor.extractGraphModelFromPng(c),null!=B&&0<B.length))return this.importXml(B,f,k,v,
-!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(B=c.substring(c.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(c.substring(c.indexOf(",")+1));var S=this.importXml(B,f,k,v,!0,E);if(0<S.length)return S}catch(T){}this.loadImage(c,mxUtils.bind(this,function(T){if("data:"==c.substring(0,5))this.resizeImage(T,c,mxUtils.bind(this,function(u,J,G){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),
-D.snap(k),J,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),A,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/T.width,this.maxImageSize/T.height)),q=Math.round(T.width*P);T=Math.round(T.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(k),q,T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var T=null;D.getModel().beginUpdate();try{T=D.insertVertex(D.getDefaultParent(),null,c,D.snap(f),D.snap(k),1,1,"text;"+(m?"html=1;":"")),D.updateCellSize(T),D.fireEvent(new mxEventObject("textInserted","cells",[T]))}finally{D.getModel().endUpdate()}D.setSelectionCell(T)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,k,v,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(T){this.editor.graph.setSelectionCells(this.importXml(T,f,k,v,null,E))}),mxUtils.bind(this,function(T){this.handleError(T)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(k),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));m&&(c=D.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");t.value=c;D.updateCellSize(t);if(0<this.maxTextWidth&&
+v)}}if(null!=S&&"mxGraphModel"===S.nodeName){E=D.importGraphModel(S,f,l,m);if(null!=E)for(this.addLocalPagesToMapping(c),P=0;P<E.length;P++)this.updatePageLinksForCell(c,E[P]);var G=D.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var H=new ChangePageSetup(this,null,G);H.ignoreColor=!0;D.model.execute(H)}}B&&D.pasteCellStyles(D.includeDescendants(E),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(g){if(t)throw g;
+this.handleError(g)}return E};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
+function(c,f){var l=document.createElement("div"),m=this.editor.graph,t=m.getLinkForCell(f);null!=t&&m.setLinkForCell(f,this.updatePageLink(c,t));if(m.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(m.getLabel(f));for(var v=l.getElementsByTagName("a"),B=!1,E=0;E<v.length;E++)t=v[E].getAttribute("href"),null!=t&&(v[E].setAttribute("href",this.updatePageLink(c,t)),B=!0);B&&m.labelChanged(f,l.innerHTML)}for(E=0;E<m.model.getChildCount(f);E++)this.updatePageLinksForCell(c,m.model.getChildAt(f,E))};EditorUi.prototype.updatePageLink=
+function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var t=0;t<m.actions.length;t++){var v=m.actions[t];if(null!=v.open&&Graph.isPageLink(v.open)){var B=v.open.substring(v.open.indexOf(",")+1);l=c[B];null!=l?v.open="data:page/id,"+l:null==this.getPageById(B)&&delete v.open}}f="data:action/json,"+JSON.stringify(m)}}catch(E){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,m,t){var v=mxUtils.bind(this,function(B){this.loadingExtensions=!1;null!=l?l(B):this.handleError(B)});this.createTimeout(null,mxUtils.bind(this,function(B){m=null!=m?m:c.name;var E=mxUtils.bind(this,function(A){B.clear()&&v(A)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(m);
+try{var S=m.lastIndexOf(".");if(0<=S&&S<m.length)m.substring(S+1).toUpperCase();else{var R=m.lastIndexOf("/");0<=R&&R<m.length&&(m=m.substring(R+1))}}catch(P){}if(A)if(null==VSS_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",c,m);var T=new XMLHttpRequest;T.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));T.responseType="blob";this.addRemoteServiceSecurityCheck(T);
+null!=t&&T.setRequestHeader("x-convert-custom",t);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState&&B.clear())if(200<=T.status&&299>=T.status)try{var P=T.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(u){try{f(u.target.result)}catch(J){E({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,f,E,m)}catch(u){E(u)}else try{""==T.responseType||"text"==T.responseType?E({message:T.responseText}):(q=new FileReader,
+q.onload=function(){try{E({message:JSON.parse(q.result).Message})}catch(u){null!=q.result&&0<q.result.length?E({message:q.result}):E(u)}},q.readAsText(T.response))}catch(u){E({})}});T.send(A)}else if(B.clear())try{this.doImportVisio(c,f,E,m)}catch(P){E(P)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,E))}),v)};
+EditorUi.prototype.importGraphML=function(c,f,l){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=l?l(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(E){t.clear()&&m(E)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,m)}catch(E){v(E)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
+this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,v))}),m)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(v){l.clear()&&f(v)}),t=mxUtils.bind(this,function(){this.loadingExtensions=
+!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||m({message:mxResources.get("unknownError")})}catch(v){m(v)}else m({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,m))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};
+EditorUi.prototype.convertLucidChart=function(c,f,l){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=l?l(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(E){t.clear()&&m(E)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var E=JSON.parse(c);f(LucidImporter.importState(E));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),
+"convertLucidChart",E];null!=E.state&&D.push(JSON.parse(E.state));if(null!=E.svgThumbs)for(var A=0;A<E.svgThumbs.length;A++)D.push(Editor.createSvgDataUri(E.svgThumbs[A]));null!=E.thumb&&D.push(E.thumb);console.log.apply(console,D)}}catch(S){}}catch(S){null!=window.console&&console.error(S),v(S)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingExtensions=!0,"1"==
+urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",B,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,v))}),m)};EditorUi.prototype.createMermaidXml=function(c,f,l,
+m,t,v){var B=new Graph(document.createElement("div"));l=B.insertVertex(null,null,null,0,0,m,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");B.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=v&&B.setAttributeForCell(l,"templatePrompt",v);c=(new mxCodec).encode(B.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var m=0,t=function(){for(var B=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),
+E=0;E<B.length;E++)null!=B[E].parentNode&&B[E].parentNode.removeChild(B[E])},v=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(B){var E=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(A){B.clear()&&(t(),l(A))});E.send(mxUtils.bind(this,function(A){if(B.isAlive())if(200<=A.getStatus()&&299>=A.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var R=mxUtils.trim(A.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,
+function(T,P,q){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[R]),t(),f(R,T,P,q))}),D)}),D,mxUtils.bind(this,function(T){3>m++?B.clear()&&v():D(T)}))}),D);else{var S={message:mxResources.get("error")+" "+A.getStatus()};try{S=JSON.parse(A.getText()),S=S.error}catch(R){}D(S)}}),D)}),l)});v()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));
+var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var m=l.indexOf("-");0<m&&(l=l.substring(0,m))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");m=l.indexOf("-");0<
+m&&(l=l.substring(0,m));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,m,t){var v=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=m?m(E):this.handleError(E)}),B=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==
+typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var E=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');D=D.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var A=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<A.length&&
+"error"!=A[0].getAttribute("aria-roledescription")){var S=parseFloat(A[0].getAttribute("width")),R=parseFloat(A[0].getAttribute("height"));if(isNaN(S)||isNaN(R))try{var T=A[0].getAttribute("viewBox").split(/\s+/);S=parseFloat(T[2]);R=parseFloat(T[3])}catch(P){S=S||100,R=R||100}l(this.convertDataUri(Editor.createSvgDataUri(D)),S,R)}else null!=t?t():m({message:mxResources.get("invalidInput")})}catch(P){m(P)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
+c).then(function(D){E(D.svg)}).catch(function(D){null!=t?t(D):m(D)})}catch(D){m(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",B,null,null,null,v)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,v))};
+EditorUi.prototype.generatePlantUmlImage=function(c,f,l,m){function t(E,D,A){c1=E>>2;c2=(E&3)<<4|D>>4;c3=(D&15)<<2|A>>6;c4=A&63;r="";r+=v(c1&63);r+=v(c2&63);r+=v(c3&63);return r+=v(c4&63)}function v(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var B=new XMLHttpRequest;B.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";
+for(i=0;i<E.length;i+=3)r=i+2==E.length?r+t(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+t(E.charCodeAt(i),0,0):r+t(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(B.responseType="blob");B.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(A){var S=new Image;S.onload=function(){try{var R=S.width,T=S.height;
+if(0==R&&0==T){var P=D.result,q=P.indexOf(","),u=decodeURIComponent(escape(atob(P.substring(q+1)))),J=mxUtils.parseXml(u).getElementsByTagName("svg");0<J.length&&(R=parseFloat(J[0].getAttribute("width")),T=parseFloat(J[0].getAttribute("height")))}l(D.result,R,T)}catch(G){m(G)}};S.src=D.result};D.onerror=function(A){m(A)}}else m(E)};B.onerror=function(E){m(E)};B.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var m=this.editor.graph,t=null;m.getModel().beginUpdate();try{t=m.insertVertex(null,
+null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(t,!0)}finally{m.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(c,f,l,m,t,v,B,E){v=null!=v?v:!0;B=null!=B?B:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(T){4==T.readyState&&200<=
+T.status&&299>=T.status&&this.editor.graph.setSelectionCells(this.insertTextAt(T.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var A=Editor.extractGraphModelFromPdf(c);if(null!=A&&0<A.length)return this.importXml(A,f,l,v,!0,E)}if(Editor.isPngDataUrl(c)&&(A=Editor.extractGraphModelFromPng(c),null!=A&&0<A.length))return this.importXml(A,f,l,v,
+!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(A=c.substring(c.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(c.substring(c.indexOf(",")+1));var S=this.importXml(A,f,l,v,!0,E);if(0<S.length)return S}catch(T){}this.loadImage(c,mxUtils.bind(this,function(T){if("data:"==c.substring(0,5))this.resizeImage(T,c,mxUtils.bind(this,function(u,J,G){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),
+D.snap(l),J,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),B,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/T.width,this.maxImageSize/T.height)),q=Math.round(T.width*P);T=Math.round(T.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(l),q,T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var T=null;D.getModel().beginUpdate();try{T=D.insertVertex(D.getDefaultParent(),null,c,D.snap(f),D.snap(l),1,1,"text;"+(m?"html=1;":"")),D.updateCellSize(T),D.fireEvent(new mxEventObject("textInserted","cells",[T]))}finally{D.getModel().endUpdate()}D.setSelectionCell(T)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,v,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(T){this.editor.graph.setSelectionCells(this.importXml(T,f,l,v,null,E))}),mxUtils.bind(this,function(T){this.handleError(T)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(l),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));m&&(c=D.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");t.value=c;D.updateCellSize(t);if(0<this.maxTextWidth&&
t.geometry.width>this.maxTextWidth){var R=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=R.width;t.geometry.height=R.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=
-function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var k=
-document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,E){StorageFile.listFiles(this,"F",A,E)});window.openBrowserFile=
-mxUtils.bind(this,function(A,E,D){StorageFile.getFileContent(this,A,E,D)});window.deleteBrowserFile=mxUtils.bind(this,function(A,E,D){StorageFile.deleteFile(this,A,E,D)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,
-mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var t=this.dialog,v=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=m;v.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(c,f,k){var m=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(v){if(mxUtils.isEmptyObject(v.files))k();else{var A=0,E,D=!1;v.forEach(function(B,S){B=S.name.toLowerCase();"diagram/diagram.xml"==B?(D=!0,S.async("string").then(function(R){0==R.indexOf("<mxfile ")?f(R):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=S))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(B,
-c.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):m.parseFileData(B,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):k())}),c.name):k()}):D||k()}},function(v){k(v)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(c,f,k,m,t,v,A,
-E,D,B,S,R){B=null!=B?B:!0;var T=!1,P=null,q=mxUtils.bind(this,function(u){var J=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,A)),this.showSidebar()):J=this.importXml(u,k,m,B,null,null!=R?mxEvent.isControlDown(R):null);null!=E&&E(J)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(S=S?null:this.extractGraphModelFromPng(c),null!=S&&0<S.length&&(P=this.importXml(S,k,m,B,null,null!=R?mxEvent.isControlDown(R):null),D=!0)),D||(D=this.editor.graph,
-S=c.indexOf(";"),0<S&&(c=c.substring(0,S)+c.substring(c.indexOf(",",S+1))),B&&D.isGridEnabled()&&(k=D.snap(k),m=D.snap(m)),S="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(S+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",k,m,t,v,S+"image="+c+";")])):/(\.*<graphml )/.test(c)?(T=!0,this.importGraphML(c,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(T=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(T=!0,f=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?q(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,A):this.parseFile(D,f,A)):0==c.indexOf("PK")&&null!=D?(T=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=
-this.insertTextAt(this.validateFileData(c),k,m,!0,null,B);E(P)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(P=this.insertTextAt(this.validateFileData(c),k,m,!0,null,B,null,null!=R?mxEvent.isControlDown(R):null));T||null==E||E(P);return P};EditorUi.prototype.importFiles=function(c,f,k,m,t,v,A,E,D,B,S,R,T){m=null!=m?m:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var P=null!=f&&null!=k,q=!0;f=null!=f?f:0;k=null!=k?k:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var J=S||
-this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>J){u=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[f],"y",[k],"maxSize",[m],"maxBytes",[B],"resampleThreshold",[this.resampleThreshold],"largeImages",[u],"crop",[P],"resizeImages",[q],"ignoreEmbeddedXml",[R],"evt",[T]);var H=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;t=null!=t?t:mxUtils.bind(this,function(U,V,X,W,Y,Z,ba,
-ia,ea){try{if(null!=U&&"<mxlibrary"==U.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,ba)),this.showSidebar(),null;this.isCompatibleString(U)&&1==c.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=X=0);return this.importFile(U,V,X,W,Y,Z,ba,ia,ea,P,R,T)}catch(da){return this.handleError(da),null}});v=null!=v?v:mxUtils.bind(this,function(U){g.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=
-c.length,I=C,N=[],O=mxUtils.bind(this,function(U,V){N[U]=V;if(0==--I){this.spinner.stop();if(null!=E)E(N);else{var X=[];g.getModel().beginUpdate();try{for(U=0;U<N.length;U++){var W=N[U]();null!=W&&(X=X.concat(W))}}finally{g.getModel().endUpdate()}}v(X)}}),Q=0;Q<C;Q++)mxUtils.bind(this,function(U){var V=c[U];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==A||A(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),
-Z=Y.indexOf(","),ba=decodeURIComponent(escape(atob(Y.substring(Z+1)))),ia=mxUtils.parseXml(ba),ea=ia.getElementsByTagName("svg");if(0<ea.length){var da=ea[0],ja=R?null:da.getAttribute("content");null!=ja&&"<"!=ja.charAt(0)&&"%"!=ja.charAt(0)&&(ja=unescape(window.atob?atob(ja):Base64.decode(ja,!0)));null!=ja&&"%"==ja.charAt(0)&&(ja=decodeURIComponent(ja));null==ja||"<mxfile "!==ja.substring(0,8)&&"<mxGraphModel>"!==ja.substring(0,14)&&"<mxGraphModel "!==ja.substring(0,14)?O(U,mxUtils.bind(this,function(){try{if(null!=
-ia){var fa=ia.getElementsByTagName("svg");if(0<fa.length){var la=fa[0],ca=la.getAttribute("width"),va=la.getAttribute("height");ca=null!=ca&&"%"!=ca.charAt(ca.length-1)?parseFloat(ca):NaN;va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;var sa=la.getAttribute("viewBox");if(null==sa||0==sa.length)la.setAttribute("viewBox","0 0 "+ca+" "+va);else if(isNaN(ca)||isNaN(va)){var wa=sa.split(" ");3<wa.length&&(ca=parseFloat(wa[2]),va=parseFloat(wa[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(la));
-var pa=Math.min(1,Math.min(m/Math.max(1,ca)),m/Math.max(1,va)),ka=t(Y,V.type,f+U*n,k+U*n,Math.max(1,Math.round(ca*pa)),Math.max(1,Math.round(va*pa)),V.name);if(null!=ka&&(isNaN(ca)||isNaN(va))){var na=new Image;na.onload=mxUtils.bind(this,function(){ca=Math.max(1,na.width);va=Math.max(1,na.height);ka[0].geometry.width=ca;ka[0].geometry.height=va;la.setAttribute("viewBox","0 0 "+ca+" "+va);Y=Editor.createSvgDataUri(mxUtils.getXml(la));var xa=Y.indexOf(";");0<xa&&(Y=Y.substring(0,xa)+Y.substring(Y.indexOf(",",
-xa+1)));g.setCellStyles("image",Y,[ka[0]])});na.src=Editor.createSvgDataUri(mxUtils.getXml(la))}return ka}}}catch(xa){}return null})):O(U,mxUtils.bind(this,function(){return t(ja,"text/xml",f+U*n,k+U*n,0,0,V.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var ma=R?null:this.extractGraphModelFromPng(W.target.result);if(null!=ma&&0<ma.length){var aa=new Image;aa.src=W.target.result;O(U,mxUtils.bind(this,function(){return t(ma,"text/xml",f+U*n,k+U*n,aa.width,
-aa.height,V.name)}));Z=!0}}Z||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(W.target.result,mxUtils.bind(this,function(fa){this.resizeImage(fa,W.target.result,mxUtils.bind(this,function(la,ca,va){O(U,mxUtils.bind(this,function(){if(null!=la&&la.length<
-B){var sa=q&&this.isResampleImageSize(V.size,S)?Math.min(1,Math.min(m/ca,m/va)):1;return t(la,V.type,f+U*n,k+U*n,Math.round(ca*sa),Math.round(va*sa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,m,S,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,t(Y,V.type,f+U*n,k+U*n,240,160,V.name,function(fa){O(U,function(){return fa})},V)}catch(fa){O(U,mxUtils.bind(this,function(){return null})),
-null!=window.console&&console.error(fa,V)}else O(U,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?t(null,V.type,f+U*n,k+U*n,240,160,V.name,function(W){O(U,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(Q)});if(u){u=[];for(G=0;G<c.length;G++)u.push(c[G]);c=u;this.confirmImageResize(function(g){q=g;H()},D)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
-this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(v,A){if(v||f)mxSettings.setResizeImages(v?A:null),mxSettings.save();k();c(A)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(v){t(v,
-!0)},function(v){t(v,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):t(!1,m)};EditorUi.prototype.parseFile=function(c,f,k){k=null!=k?k:c.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,k)});m.readAsText(c)};EditorUi.prototype.parseFileData=
-function(c,f,k){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,k,m,t,v,
-A){t=null!=t?t:this.maxImageSize;var E=Math.max(1,c.width),D=Math.max(1,c.height),B=f;if(m&&this.isResampleImageSize(null!=A?A:f.length,v))try{var S=Math.max(E/t,D/t);if(1<S){var R=Math.round(E/S),T=Math.round(D/S),P=document.createElement("canvas");P.width=R;P.height=T;P.getContext("2d").drawImage(c,0,0,R,T);var q=P.toDataURL();if(q.length<f.length){var u=document.createElement("canvas");u.width=R;u.height=T;var J=u.toDataURL();q!==J&&(f=q,E=R,D=T)}}}catch(G){}m&&B!=f&&t>this.maxImageSize/2&&f.length>
-this.maxImageBytes?this.resizeImage(c,f,k,m,t/1.5,v,A):k(f,E,D)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,k){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=k&&(m.onerror=k);m.src=c}catch(t){if(null!=k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
+function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=
+document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(B,E){StorageFile.listFiles(this,"F",B,E)});window.openBrowserFile=
+mxUtils.bind(this,function(B,E,D){StorageFile.getFileContent(this,B,E,D)});window.deleteBrowserFile=mxUtils.bind(this,function(B,E,D){StorageFile.deleteFile(this,B,E,D)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(B){this.hideDialog(B)}));window.openFile.setConsumer(mxUtils.bind(this,function(B,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(B=new Blob([B],{type:"application/octet-stream"}),this.importVisio(B,
+mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(B,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var t=this.dialog,v=t.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=m;v.apply(t,arguments);B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
+function(c,f,l){var m=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(v){if(mxUtils.isEmptyObject(v.files))l();else{var B=0,E,D=!1;v.forEach(function(A,S){A=S.name.toLowerCase();"diagram/diagram.xml"==A?(D=!0,S.async("string").then(function(R){0==R.indexOf("<mxfile ")?f(R):l()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>B&&(B=A,E=S))});0<B?E.async("string").then(function(A){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(A,
+c.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):m.parseFileData(A,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):l())}),c.name):l()}):D||l()}},function(v){l(v)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,m,t,v,B,
+E,D,A,S,R){A=null!=A?A:!0;var T=!1,P=null,q=mxUtils.bind(this,function(u){var J=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,B)),this.showSidebar()):J=this.importXml(u,l,m,A,null,null!=R?mxEvent.isControlDown(R):null);null!=E&&E(J)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(S=S?null:this.extractGraphModelFromPng(c),null!=S&&0<S.length&&(P=this.importXml(S,l,m,A,null,null!=R?mxEvent.isControlDown(R):null),D=!0)),D||(D=this.editor.graph,
+S=c.indexOf(";"),0<S&&(c=c.substring(0,S)+c.substring(c.indexOf(",",S+1))),A&&D.isGridEnabled()&&(l=D.snap(l),m=D.snap(m)),S="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(S+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",l,m,t,v,S+"image="+c+";")])):/(\.*<graphml )/.test(c)?(T=!0,this.importGraphML(c,q)):null!=D&&null!=B&&EditorUi.isVisioFilename(B)?(T=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(T=!0,f=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?q(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,B):this.parseFile(D,f,B)):0==c.indexOf("PK")&&null!=D?(T=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=
+this.insertTextAt(this.validateFileData(c),l,m,!0,null,A);E(P)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(P=this.insertTextAt(this.validateFileData(c),l,m,!0,null,A,null,null!=R?mxEvent.isControlDown(R):null));T||null==E||E(P);return P};EditorUi.prototype.importFiles=function(c,f,l,m,t,v,B,E,D,A,S,R,T){m=null!=m?m:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var P=null!=f&&null!=l,q=!0;f=null!=f?f:0;l=null!=l?l:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var J=S||
+this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>J){u=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[f],"y",[l],"maxSize",[m],"maxBytes",[A],"resampleThreshold",[this.resampleThreshold],"largeImages",[u],"crop",[P],"resizeImages",[q],"ignoreEmbeddedXml",[R],"evt",[T]);var H=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;t=null!=t?t:mxUtils.bind(this,function(U,V,X,W,Y,Z,aa,
+ha,ea){try{if(null!=U&&"<mxlibrary"==U.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,aa)),this.showSidebar(),null;this.isCompatibleString(U)&&1==c.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=X=0);return this.importFile(U,V,X,W,Y,Z,aa,ha,ea,P,R,T)}catch(da){return this.handleError(da),null}});v=null!=v?v:mxUtils.bind(this,function(U){g.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=
+c.length,I=C,M=[],O=mxUtils.bind(this,function(U,V){M[U]=V;if(0==--I){this.spinner.stop();if(null!=E)E(M);else{var X=[];g.getModel().beginUpdate();try{for(U=0;U<M.length;U++){var W=M[U]();null!=W&&(X=X.concat(W))}}finally{g.getModel().endUpdate()}}v(X)}}),Q=0;Q<C;Q++)mxUtils.bind(this,function(U){var V=c[U];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),
+Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),ha=mxUtils.parseXml(aa),ea=ha.getElementsByTagName("svg");if(0<ea.length){var da=ea[0],ia=R?null:da.getAttribute("content");null!=ia&&"<"!=ia.charAt(0)&&"%"!=ia.charAt(0)&&(ia=unescape(window.atob?atob(ia):Base64.decode(ia,!0)));null!=ia&&"%"==ia.charAt(0)&&(ia=decodeURIComponent(ia));null==ia||"<mxfile "!==ia.substring(0,8)&&"<mxGraphModel>"!==ia.substring(0,14)&&"<mxGraphModel "!==ia.substring(0,14)?O(U,mxUtils.bind(this,function(){try{if(null!=
+ha){var fa=ha.getElementsByTagName("svg");if(0<fa.length){var ja=fa[0],ca=ja.getAttribute("width"),sa=ja.getAttribute("height");ca=null!=ca&&"%"!=ca.charAt(ca.length-1)?parseFloat(ca):NaN;sa=null!=sa&&"%"!=sa.charAt(sa.length-1)?parseFloat(sa):NaN;var pa=ja.getAttribute("viewBox");if(null==pa||0==pa.length)ja.setAttribute("viewBox","0 0 "+ca+" "+sa);else if(isNaN(ca)||isNaN(sa)){var ua=pa.split(" ");3<ua.length&&(ca=parseFloat(ua[2]),sa=parseFloat(ua[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(ja));
+var wa=Math.min(1,Math.min(m/Math.max(1,ca)),m/Math.max(1,sa)),ka=t(Y,V.type,f+U*p,l+U*p,Math.max(1,Math.round(ca*wa)),Math.max(1,Math.round(sa*wa)),V.name);if(null!=ka&&(isNaN(ca)||isNaN(sa))){var na=new Image;na.onload=mxUtils.bind(this,function(){ca=Math.max(1,na.width);sa=Math.max(1,na.height);ka[0].geometry.width=ca;ka[0].geometry.height=sa;ja.setAttribute("viewBox","0 0 "+ca+" "+sa);Y=Editor.createSvgDataUri(mxUtils.getXml(ja));var za=Y.indexOf(";");0<za&&(Y=Y.substring(0,za)+Y.substring(Y.indexOf(",",
+za+1)));g.setCellStyles("image",Y,[ka[0]])});na.src=Editor.createSvgDataUri(mxUtils.getXml(ja))}return ka}}}catch(za){}return null})):O(U,mxUtils.bind(this,function(){return t(ia,"text/xml",f+U*p,l+U*p,0,0,V.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==V.type){var la=R?null:this.extractGraphModelFromPng(W.target.result);if(null!=la&&0<la.length){var ba=new Image;ba.src=W.target.result;O(U,mxUtils.bind(this,function(){return t(la,"text/xml",f+U*p,l+U*p,ba.width,
+ba.height,V.name)}));Z=!0}}Z||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(W.target.result,mxUtils.bind(this,function(fa){this.resizeImage(fa,W.target.result,mxUtils.bind(this,function(ja,ca,sa){O(U,mxUtils.bind(this,function(){if(null!=ja&&ja.length<
+A){var pa=q&&this.isResampleImageSize(V.size,S)?Math.min(1,Math.min(m/ca,m/sa)):1;return t(ja,V.type,f+U*p,l+U*p,Math.round(ca*pa),Math.round(sa*pa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,m,S,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=W.target.result,t(Y,V.type,f+U*p,l+U*p,240,160,V.name,function(fa){O(U,function(){return fa})},V)}catch(fa){O(U,mxUtils.bind(this,function(){return null})),
+null!=window.console&&console.error(fa,V)}else O(U,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?t(null,V.type,f+U*p,l+U*p,240,160,V.name,function(W){O(U,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?X.readAsDataURL(V):X.readAsText(V)}})(Q)});if(u){u=[];for(G=0;G<c.length;G++)u.push(c[G]);c=u;this.confirmImageResize(function(g){q=g;H()},D)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(v,B){if(v||f)mxSettings.setResizeImages(v?B:null),mxSettings.save();l();c(B)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(v){t(v,
+!0)},function(v){t(v,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):t(!1,m)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,l)});m.readAsText(c)};EditorUi.prototype.parseFileData=
+function(c,f,l){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,m,t,v,
+B){t=null!=t?t:this.maxImageSize;var E=Math.max(1,c.width),D=Math.max(1,c.height),A=f;if(m&&this.isResampleImageSize(null!=B?B:f.length,v))try{var S=Math.max(E/t,D/t);if(1<S){var R=Math.round(E/S),T=Math.round(D/S),P=document.createElement("canvas");P.width=R;P.height=T;P.getContext("2d").drawImage(c,0,0,R,T);var q=P.toDataURL();if(q.length<f.length){var u=document.createElement("canvas");u.width=R;u.height=T;var J=u.toDataURL();q!==J&&(f=q,E=R,D=T)}}}catch(G){}m&&A!=f&&t>this.maxImageSize/2&&f.length>
+this.maxImageBytes?this.resizeImage(c,f,l,m,t/1.5,v,B):l(f,E,D)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=l&&(m.onerror=l);m.src=c}catch(t){if(null!=l)l(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
urlParams.rough:c)};var x=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());x.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var z=
-EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,k=f.isEnabled;f.isEnabled=function(){return k.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(n){var C=n.getEvent();return null==n.getState()&&!mxEvent.isMouseEvent(C)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(C)&&(null==n.getState()||mxEvent.isControlDown(C)||mxEvent.isShiftDown(C))});
-f.cellEditor.editPlantUmlData=function(n,C,I){var N=JSON.parse(I);C=new SimpleTextareaDialog(c,N.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,N.format,function(Q,U,V){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==N.format)f.labelChanged(n,"<pre>"+Q+"</pre>"),f.updateCellSize(n,!0);else{f.setCellStyles("image",c.convertDataUri(Q),[n]);var X=f.model.getGeometry(n);null!=X&&(X=X.clone(),X.width=U,X.height=V,f.cellsResized([n],
-[X],!1))}f.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:O,format:N.format}))}finally{f.getModel().endUpdate()}},function(Q){c.handleError(Q)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};f.cellEditor.editMermaidData=function(n,C,I){var N=JSON.parse(I);C=new SimpleTextareaDialog(c,N.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,N.config,function(Q,U,V){c.spinner.stop();
-f.getModel().beginUpdate();try{f.setCellStyles("image",Q,[n]);var X=f.model.getGeometry(n);null!=X&&(X=X.clone(),X.width=Math.max(X.width,U),X.height=Math.max(X.height,V),f.cellsResized([n],[X],!1));f.setAttributeForCell(n,"mermaidData",JSON.stringify({data:O,config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(Q){c.handleError(Q)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};var m=f.cellEditor.startEditing;f.cellEditor.startEditing=
-function(n,C){try{var I=this.graph.getAttributeForCell(n,"plantUmlData");if(null!=I)this.editPlantUmlData(n,C,I);else if(I=this.graph.getAttributeForCell(n,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(n,C,I);else{var N=f.getCellStyle(n);"1"==mxUtils.getValue(N,"metaEdit","0")?c.showDataDialog(n):m.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(n){return c.getLinkTitle(n)};f.customLinkClicked=function(n,C){var I=!1;try{var N=this.getGraphBounds();
-c.handleCustomLink(n,C);I=!0;c.chromelessResize&&!N.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(C))}catch(O){c.handleError(O)}return I};var t=f.parseBackgroundImage;f.parseBackgroundImage=function(n){var C=t.apply(this,arguments);null!=C&&null!=C.src&&Graph.isPageLink(C.src)&&(C={originalSrc:C.src});return C};var v=f.setBackgroundImage;f.setBackgroundImage=function(n){null!=n&&null!=n.originalSrc&&(n=c.createImageForPageLink(n.originalSrc,c.currentPage,this));v.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(n,C){n=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=n){var I=n.indexOf(",");if(0<I)for(n=n.substring(I+1),C=C.getProperty("patches"),I=0;I<C.length;I++)if(null!=C[I][EditorUi.DIFF_UPDATE]&&null!=C[I][EditorUi.DIFF_UPDATE][n]||
-null!=C[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(C[I][EditorUi.DIFF_REMOVE],n)){f.refreshBackgroundImage();break}}}));var A=f.getBackgroundImageObject;f.getBackgroundImageObject=function(n,C,I){var N=A.apply(this,arguments);null!=N&&null!=N.originalSrc&&(N=C?c.createImageForPageLink(N.originalSrc,I,null,!0):{src:N.originalSrc});return N};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||
-/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(n){n=null!=n?n:"";"1"==urlParams.dev&&(n+=(0<n.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(n,C,I){var N=C;C=function(O,Q,U){if(null==Q){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(Q=V.getAttribute("href"))}null!=Q&&f.isCustomLink(Q)&&(mxEvent.isTouchEvent(O)||
-!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(Q,U)&&mxEvent.consume(O);null!=N&&N(O,Q,U)};D.call(this,n,C,I)};z.apply(this,arguments);this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(n,C,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(n,["zoomIn","zoomOut","-"],null,I);B.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(n,
-["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(n,["-","exitGroup","home"],null,I)};var S=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(n,C,I){if(c.editor.graph.isSelectionEmpty())S.apply(this,arguments),c.menus.addMenuItems(n,["copyAsImage","copyAsSvg"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(n,C,I):this.addPopupMenuArrangeItems(n,C,I),this.addMenuItems(n,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),
-null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(n,C,I),this.addMenuItems(n,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(C)&&f.isCellEditable(C)&&(this.addSubmenu("editCell",n,null,mxResources.get("edit")),n.addSeparator(),f.getModel().isEdge(C))){this.addSubmenu("line",n);var N=f.getModel().getGeometry(C);null!=N&&null!=N.points&&0<N.points.length&&this.addMenuItems(n,["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(n,
-["enterGroup"],null,I);N=c.getSelectionState();null!=N.mergeCell?this.addMenuItem(n,"mergeCells"):(1<N.style.colspan||1<N.style.rowspan)&&this.addMenuItem(n,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,
-function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var R=f.getExportVariables;f.getExportVariables=function(){var n=R.apply(this,arguments),C=c.getCurrentFile();null!=C&&(n.filename=C.getTitle());n.pagecount=null!=c.pages?c.pages.length:1;n.page=null!=c.currentPage?c.currentPage.getName():"";n.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return n};var T=f.getGlobalVariable;f.getGlobalVariable=
-function(n){var C=c.getCurrentFile();return"filename"==n&&null!=C?C.getTitle():"page"==n&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==n?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==n?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var n=this.getCurrentFile(),C=null!=n&&null!=n.getTitle()?n.getTitle():this.defaultFilename;P!=C&&n==q&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),
-f.view.validate());P=C;q=n}));var u=f.labelLinkClicked;f.labelLinkClicked=function(n,C,I){var N=C.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))u.apply(this,arguments);else{if(!f.isEnabled()||null!=n&&f.isCellLocked(n.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var n=c.defaultFilename,C=c.getCurrentFile();null!=C&&(n=null!=C.getTitle()?C.getTitle():n);return n};var J=
+EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(p){var C=p.getEvent();return null==p.getState()&&!mxEvent.isMouseEvent(C)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(C)&&(null==p.getState()||mxEvent.isControlDown(C)||mxEvent.isShiftDown(C))});
+f.cellEditor.editPlantUmlData=function(p,C,I){var M=JSON.parse(I);C=new SimpleTextareaDialog(c,M.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,M.format,function(Q,U,V){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==M.format)f.labelChanged(p,"<pre>"+Q+"</pre>"),f.updateCellSize(p,!0);else{f.setCellStyles("image",c.convertDataUri(Q),[p]);var X=f.model.getGeometry(p);null!=X&&(X=X.clone(),X.width=U,X.height=V,f.cellsResized([p],
+[X],!1))}f.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:O,format:M.format}))}finally{f.getModel().endUpdate()}},function(Q){c.handleError(Q)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};f.cellEditor.editMermaidData=function(p,C,I){var M=JSON.parse(I);C=new SimpleTextareaDialog(c,M.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,M.config,function(Q,U,V){c.spinner.stop();
+f.getModel().beginUpdate();try{f.setCellStyles("image",Q,[p]);var X=f.model.getGeometry(p);null!=X&&(X=X.clone(),X.width=Math.max(X.width,U),X.height=Math.max(X.height,V),f.cellsResized([p],[X],!1));f.setAttributeForCell(p,"mermaidData",JSON.stringify({data:O,config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(Q){c.handleError(Q)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};var m=f.cellEditor.startEditing;f.cellEditor.startEditing=
+function(p,C){try{var I=this.graph.getAttributeForCell(p,"plantUmlData");if(null!=I)this.editPlantUmlData(p,C,I);else if(I=this.graph.getAttributeForCell(p,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(p,C,I);else{var M=f.getCellStyle(p);"1"==mxUtils.getValue(M,"metaEdit","0")?c.showDataDialog(p):m.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(p){return c.getLinkTitle(p)};f.customLinkClicked=function(p,C){var I=!1;try{var M=this.getGraphBounds();
+c.handleCustomLink(p,C);I=!0;c.chromelessResize&&!M.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(C))}catch(O){c.handleError(O)}return I};var t=f.parseBackgroundImage;f.parseBackgroundImage=function(p){var C=t.apply(this,arguments);null!=C&&null!=C.src&&Graph.isPageLink(C.src)&&(C={originalSrc:C.src});return C};var v=f.setBackgroundImage;f.setBackgroundImage=function(p){null!=p&&null!=p.originalSrc&&(p=c.createImageForPageLink(p.originalSrc,c.currentPage,this));v.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(p,C){p=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=p){var I=p.indexOf(",");if(0<I)for(p=p.substring(I+1),C=C.getProperty("patches"),I=0;I<C.length;I++)if(null!=C[I][EditorUi.DIFF_UPDATE]&&null!=C[I][EditorUi.DIFF_UPDATE][p]||
+null!=C[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(C[I][EditorUi.DIFF_REMOVE],p)){f.refreshBackgroundImage();break}}}));var B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(p,C,I){var M=B.apply(this,arguments);null!=M&&null!=M.originalSrc&&(M=C?c.createImageForPageLink(M.originalSrc,I,null,!0):{src:M.originalSrc});return M};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||
+/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(p){p=null!=p?p:"";"1"==urlParams.dev&&(p+=(0<p.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(p,C,I){var M=C;C=function(O,Q,U){if(null==Q){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(Q=V.getAttribute("href"))}null!=Q&&f.isCustomLink(Q)&&(mxEvent.isTouchEvent(O)||
+!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(Q,U)&&mxEvent.consume(O);null!=M&&M(O,Q,U)};D.call(this,p,C,I)};z.apply(this,arguments);this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(p,C,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(p,["zoomIn","zoomOut","-"],null,I);A.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(p,
+["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(p,["-","exitGroup","home"],null,I)};var S=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(p,C,I){if(c.editor.graph.isSelectionEmpty())S.apply(this,arguments),c.menus.addMenuItems(p,["copyAsImage","copyAsSvg"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(p,C,I):this.addPopupMenuArrangeItems(p,C,I),this.addMenuItems(p,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),
+null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(p,C,I),this.addMenuItems(p,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(C)&&f.isCellEditable(C)&&(this.addSubmenu("editCell",p,null,mxResources.get("edit")),p.addSeparator(),f.getModel().isEdge(C))){this.addSubmenu("line",p);var M=f.getModel().getGeometry(C);null!=M&&null!=M.points&&0<M.points.length&&this.addMenuItems(p,["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(p,
+["enterGroup"],null,I);M=c.getSelectionState();null!=M.mergeCell?this.addMenuItem(p,"mergeCells"):(1<M.style.colspan||1<M.style.rowspan)&&this.addMenuItem(p,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,
+function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var R=f.getExportVariables;f.getExportVariables=function(){var p=R.apply(this,arguments),C=c.getCurrentFile();null!=C&&(p.filename=C.getTitle());p.pagecount=null!=c.pages?c.pages.length:1;p.page=null!=c.currentPage?c.currentPage.getName():"";p.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return p};var T=f.getGlobalVariable;f.getGlobalVariable=
+function(p){var C=c.getCurrentFile();return"filename"==p&&null!=C?C.getTitle():"page"==p&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==p?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==p?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var p=this.getCurrentFile(),C=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;P!=C&&p==q&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),
+f.view.validate());P=C;q=p}));var u=f.labelLinkClicked;f.labelLinkClicked=function(p,C,I){var M=C.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))u.apply(this,arguments);else{if(!f.isEnabled()||null!=p&&f.isCellLocked(p.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var p=c.defaultFilename,C=c.getCurrentFile();null!=C&&(p=null!=C.getTitle()?C.getTitle():p);return p};var J=
this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,
-!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(n,C){null!=
-C&&f.isEnabled()&&!f.isEditing()&&null!=C.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(n){var C=f.cellEditor.text2,I=null;null!=C&&(mxEvent.addListener(C,"dragleave",function(N){null!=I&&(I.parentNode.removeChild(I),I=null);N.stopPropagation();N.preventDefault()}),
-mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==I&&(I=this.highlightElement(C));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(Q,U,V,X,W,Y){f.insertImage(Q,W,Y)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var U=0;U<Q.length;U++)Q[U]()},mxEvent.isControlDown(N));
-else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var O=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(Q){var U=Math.max(1,Q.width);Q=Math.max(1,Q.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,U)),V/Math.max(1,Q));f.insertImage(decodeURIComponent(O),U*V,Q*V)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,
-"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));N.stopPropagation();N.preventDefault()})))}));if(Editor.isSettingsEnabled()){J=this.editor.graph.view;var G=mxSettings.getUnit();J.setUnit(G);Editor.pageSizeUnit=G==mxConstants.METERS?mxConstants.MILLIMETERS:G;J.addListener("unitChanged",function(n,C){n=C.getProperty("unit");mxSettings.setUnit(n);
-mxSettings.save();Editor.pageSizeUnit=n==mxConstants.METERS?mxConstants.MILLIMETERS:n});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit);this.refresh()}if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",
-this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(n,C){0<this.editor.graph.getSelectionCount()?
-(n=this.editor.graph.getSelectionCell(),n=this.editor.graph.getModel().getStyle(n),this.styleInput.value=n||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(n){return mxEvent.getSource(n)==this.styleInput?!0:H.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var g=null;mxEvent.addListener(f.container,
-"dragleave",function(n){f.isEnabled()&&(null!=g&&(g.parentNode.removeChild(g),g=null),n.stopPropagation(),n.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(n){null==g&&(g=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();n.stopPropagation();n.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(f.isEnabled()){var C=mxUtils.convertPoint(f.container,
-mxEvent.getClientX(n),mxEvent.getClientY(n)),I=n.dataTransfer.files,N=f.view.translate,O=f.view.scale,Q=C.x/O-N.x,U=C.y/O-N.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(n)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(n)&&(U=Q=null),this.importFiles(I,Q,U,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(n),null,null,mxEvent.isShiftDown(n),n));else{mxEvent.isAltDown(n)&&(U=Q=0);var V=0<=mxUtils.indexOf(n.dataTransfer.types,
-"text/uri-list")?n.dataTransfer.getData("text/uri-list"):null;C=this.extractGraphModelFromEvent(n,null!=this.pages);if(null!=C)f.setSelectionCells(this.importXml(C,Q,U,!0));else if(0<=mxUtils.indexOf(n.dataTransfer.types,"text/html")){var X=n.dataTransfer.getData("text/html");C=document.createElement("div");C.innerHTML=Graph.sanitizeHtml(X);var W=null;I=C.getElementsByTagName("img");null!=I&&1==I.length?(X=I[0].getAttribute("src"),null==X&&(X=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||
-(W=!0)):(I=C.getElementsByTagName("a"),null!=I&&1==I.length?X=I[0].getAttribute("href"):(C=C.getElementsByTagName("pre"),null!=C&&1==C.length&&(X=mxUtils.getTextContent(C[0]))));var Y=!0,Z=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(X,Q,U,!0,W,null,Y,mxEvent.isControlDown(n)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(ba){Y=ba;Z()},mxEvent.isControlDown(n)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),
-mxUtils.bind(this,function(ba){var ia=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,ia)),ea/Math.max(1,ba));f.setSelectionCell(f.insertVertex(null,null,"",Q,U,ia*ea,ba*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(ba){f.setSelectionCells(this.insertTextAt(V,Q,U,!0))})):0<=mxUtils.indexOf(n.dataTransfer.types,"text/plain")&&
-f.setSelectionCells(this.insertTextAt(n.dataTransfer.getData("text/plain"),Q,U,!0))}}n.stopPropagation();n.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",
-function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var n=parseInt(this.div.offsetLeft),C=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,N=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),Q=c.embedViewport.y+c.embedViewport.height;
-this.div.style.left=Math.max(c.embedViewport.x,Math.min(n,I-C))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(N,Q-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(J=Editor.currentTheme,"simple"==J||"sketch"==J)this.doSetCurrentTheme(J,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():
+!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(p,C){null!=
+C&&f.isEnabled()&&!f.isEditing()&&null!=C.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(p){var C=f.cellEditor.text2,I=null;null!=C&&(mxEvent.addListener(C,"dragleave",function(M){null!=I&&(I.parentNode.removeChild(I),I=null);M.stopPropagation();M.preventDefault()}),
+mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(M){null==I&&(I=this.highlightElement(C));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(M){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,function(Q,U,V,X,W,Y){f.insertImage(Q,W,Y)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var U=0;U<Q.length;U++)Q[U]()},mxEvent.isControlDown(M));
+else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var O=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(Q){var U=Math.max(1,Q.width);Q=Math.max(1,Q.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,U)),V/Math.max(1,Q));f.insertImage(decodeURIComponent(O),U*V,Q*V)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,
+"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));if(Editor.isSettingsEnabled()){J=this.editor.graph.view;var G=mxSettings.getUnit();J.setUnit(G);Editor.pageSizeUnit=G==mxConstants.METERS?mxConstants.MILLIMETERS:G;J.addListener("unitChanged",function(p,C){p=C.getProperty("unit");mxSettings.setUnit(p);
+mxSettings.save();Editor.pageSizeUnit=p==mxConstants.METERS?mxConstants.MILLIMETERS:p});this.ruler=!Editor.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit);this.refresh()}if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",
+this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,C){0<this.editor.graph.getSelectionCount()?
+(p=this.editor.graph.getSelectionCell(),p=this.editor.graph.getModel().getStyle(p),this.styleInput.value=p||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==this.styleInput?!0:H.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var g=null;mxEvent.addListener(f.container,
+"dragleave",function(p){f.isEnabled()&&(null!=g&&(g.parentNode.removeChild(g),g=null),p.stopPropagation(),p.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(p){null==g&&(g=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();p.stopPropagation();p.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(p){null!=g&&(g.parentNode.removeChild(g),g=null);if(f.isEnabled()){var C=mxUtils.convertPoint(f.container,
+mxEvent.getClientX(p),mxEvent.getClientY(p)),I=p.dataTransfer.files,M=f.view.translate,O=f.view.scale,Q=C.x/O-M.x,U=C.y/O-M.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(p)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(p)&&(U=Q=null),this.importFiles(I,Q,U,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(p),null,null,mxEvent.isShiftDown(p),p));else{mxEvent.isAltDown(p)&&(U=Q=0);var V=0<=mxUtils.indexOf(p.dataTransfer.types,
+"text/uri-list")?p.dataTransfer.getData("text/uri-list"):null;C=this.extractGraphModelFromEvent(p,null!=this.pages);if(null!=C)f.setSelectionCells(this.importXml(C,Q,U,!0));else if(0<=mxUtils.indexOf(p.dataTransfer.types,"text/html")){var X=p.dataTransfer.getData("text/html");C=document.createElement("div");C.innerHTML=Graph.sanitizeHtml(X);var W=null;I=C.getElementsByTagName("img");null!=I&&1==I.length?(X=I[0].getAttribute("src"),null==X&&(X=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||
+(W=!0)):(I=C.getElementsByTagName("a"),null!=I&&1==I.length?X=I[0].getAttribute("href"):(C=C.getElementsByTagName("pre"),null!=C&&1==C.length&&(X=mxUtils.getTextContent(C[0]))));var Y=!0,Z=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(X,Q,U,!0,W,null,Y,mxEvent.isControlDown(p)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(p)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),
+mxUtils.bind(this,function(aa){var ha=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,ha)),ea/Math.max(1,aa));f.setSelectionCell(f.insertVertex(null,null,"",Q,U,ha*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(aa){f.setSelectionCells(this.insertTextAt(V,Q,U,!0))})):0<=mxUtils.indexOf(p.dataTransfer.types,"text/plain")&&
+f.setSelectionCells(this.insertTextAt(p.dataTransfer.getData("text/plain"),Q,U,!0))}}p.stopPropagation();p.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",
+function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var p=parseInt(this.div.offsetLeft),C=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,M=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),Q=c.embedViewport.y+c.embedViewport.height;
+this.div.style.left=Math.max(c.embedViewport.x,Math.min(p,I-C))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(M,Q-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(J=Editor.currentTheme,"simple"==J||"sketch"==J)this.doSetCurrentTheme(J,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():
(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));J=!1;if(null!=urlParams.dark)J=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)J="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||J&&"auto"!=mxSettings.settings.darkMode||(J=mxSettings.settings.darkMode);"auto"==J&&this.isAutoDarkModeSupported()&&(J=window.matchMedia("(prefers-color-scheme: dark)").matches);
-this.setDarkMode("string"===typeof J?"1"==J:J);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(n){this.isAutoDarkMode()&&this.setDarkMode(n.matches)}))}catch(n){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);
-Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(n,C){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=
+this.setDarkMode("string"===typeof J?"1"==J:J);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(p){this.isAutoDarkMode()&&this.setDarkMode(p.matches)}))}catch(p){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);
+Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(p,C){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=
0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var y=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<
-f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}y.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,m=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(B),mxEvent.getClientY(B)),
-this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var v=null,A=null,E=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(B){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(B);
-m.popupMenuHandler.hideMenu();mxEvent.consume(B)}));t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(B){E=parseInt(this.diagramContainer.style.width);v=mxEvent.getClientX(B);m.popupMenuHandler.hideMenu();mxEvent.consume(B)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(B){var S=!1;null!=v&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(B)-
-v)+"px",S=!0);null!=A&&(this.diagramContainer.style.height=Math.max(20,D+mxEvent.getClientY(B)-A)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(B){null==v&&null==A||mxEvent.consume(B);A=v=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility=
-"hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(B){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(B){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility=
-"hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect",
-"off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=
-!0;k.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(v){var A=mxEvent.getSource(v);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=v.keyCode&&(mxClient.IS_MAC||17!=v.keyCode)&&(!mxClient.IS_MAC||91!=v.keyCode&&93!=v.keyCode)||
-m||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",v=f.container.scrollLeft,A=f.container.scrollTop,f.container.appendChild(k),m=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=v,f.container.scrollTop=A)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(v){var A=v.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=A&&17!=A&&91!=A&&93!=A||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),
-k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),c()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k,!0),c()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(v){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(k.innerHTML=
-"&nbsp;",k.focus(),null!=v.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(v,k,!0,!0)),!mxEvent.isConsumed(v)){var A=f.container.scrollLeft,E=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=A,f.container.scrollTop=E,Graph.removePasteFormatting(k.firstChild),this.pasteCells(v,k,!1,!0)}catch(D){this.handleError(D)}}),0)}}catch(D){this.handleError(D)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==
-k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var k="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&
-"simple"==c||c==Editor.currentTheme;if(k||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return k};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,k=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?
-(k-=this.embedViewport.x,m-=this.embedViewport.y):(k+=this.embedViewport.x,m+=this.embedViewport.y));f={x:k,y:m,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,k=this.editor.graph.view.translate;if(null!=c.boundingRect){var m=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-m.x;c.y-=c.boundingRect.y-m.y}this.diagramContainer.scrollLeft=c.x+(k.x-c.tx)*f;
-this.diagramContainer.scrollTop=c.y+(k.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==
+f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}y.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,m=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(A){mxEvent.getSource(A)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(A),mxEvent.getClientY(A)),
+this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var v=null,B=null,E=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(A){D=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(A);
+m.popupMenuHandler.hideMenu();mxEvent.consume(A)}));t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(A){E=parseInt(this.diagramContainer.style.width);v=mxEvent.getClientX(A);m.popupMenuHandler.hideMenu();mxEvent.consume(A)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(A){var S=!1;null!=v&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(A)-
+v)+"px",S=!0);null!=B&&(this.diagramContainer.style.height=Math.max(20,D+mxEvent.getClientY(A)-B)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(A){null==v&&null==B||mxEvent.consume(A);B=v=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility=
+"hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(A){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(A){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility=
+"hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect",
+"off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=
+!0;l.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(v){var B=mxEvent.getSource(v);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=v.keyCode&&(mxClient.IS_MAC||17!=v.keyCode)&&(!mxClient.IS_MAC||91!=v.keyCode&&93!=v.keyCode)||
+m||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",v=f.container.scrollLeft,B=f.container.scrollTop,f.container.appendChild(l),m=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=v,f.container.scrollTop=B)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(v){var B=v.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=B&&17!=B&&91!=B&&93!=B||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),
+l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(v){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(v){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=
+"&nbsp;",l.focus(),null!=v.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(v,l,!0,!0)),!mxEvent.isConsumed(v)){var B=f.container.scrollLeft,E=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=B,f.container.scrollTop=E,Graph.removePasteFormatting(l.firstChild),this.pasteCells(v,l,!1,!0)}catch(D){this.handleError(D)}}),0)}}catch(D){this.handleError(D)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==
+l?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&
+"simple"==c||c==Editor.currentTheme;if(l||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return l};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?
+(l-=this.embedViewport.x,m-=this.embedViewport.y):(l+=this.embedViewport.x,m+=this.embedViewport.y));f={x:l,y:m,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var m=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-m.x;c.y-=c.boundingRect.y-m.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;
+this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==
Editor.currentTheme){var m=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=m&&null!=m.getAttribute("class");if(!f&&null!=m){m=m.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;m==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',
-f=!0)}this.statusContainer.style.display="none";m=32>=c.clientWidth;c.style.visibility=m&&""==this.editor.getStatus()?"hidden":"";if(m||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();
+f=!0)}this.statusContainer.style.display="none";m=32>=c.clientWidth;c.style.visibility=m&&""==this.editor.getStatus()?"hidden":"";if(m||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();
this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,
this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),
this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=
@@ -13150,597 +13152,597 @@ Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simp
Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&
f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&
(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,
-f,k,m){k=null!=k?k:"geButton";var t=this.menus.get(c);m=this.menubar.addMenu(mxResources.get(c),t.funct,null,m);m.className=k;m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(t,m,k);null!=f&&(m.style.backgroundImage="url("+f+")",m.innerText="");return m};EditorUi.prototype.addButton=function(c,f,k,m){c=this.createToolbarButton(c,f,k);m=null!=m?m:this.container;m.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,k){var m=document.createElement("a");m.className=
-"geButton";null!=c&&"data:"==c.substring(0,5)&&(m.style.backgroundImage="url("+c+")");null!=f&&m.setAttribute("title",f);null!=k&&mxEvent.addListener(m,"click",function(t){"disabled"!=m.getAttribute("disabled")&&k(t);mxEvent.consume(t)});mxEvent.preventDefault(m);return m};EditorUi.prototype.createMenuItem=function(c,f,k){var m=this.actions.get(c),t=null!=m?m.funct:null,v=this.createToolbarButton(f,mxResources.get(c)+(null!=m&&null!=m.shortcut?" ("+m.shortcut+")":""),t);null==m||k||(c=function(){m.isEnabled()?
-v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),m.addListener("stateChanged",c),c());return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=this,f=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),
-f,60,240,k,mxUtils.bind(this,function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var m=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=
+f,l,m){l=null!=l?l:"geButton";var t=this.menus.get(c);m=this.menubar.addMenu(mxResources.get(c),t.funct,null,m);m.className=l;m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(t,m,l);null!=f&&(m.style.backgroundImage="url("+f+")",m.innerText="");return m};EditorUi.prototype.addButton=function(c,f,l,m){c=this.createToolbarButton(c,f,l);m=null!=m?m:this.container;m.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,l){var m=document.createElement("a");m.className=
+"geButton";null!=c&&"data:"==c.substring(0,5)&&(m.style.backgroundImage="url("+c+")");null!=f&&m.setAttribute("title",f);null!=l&&mxEvent.addListener(m,"click",function(t){"disabled"!=m.getAttribute("disabled")&&l(t);mxEvent.consume(t)});mxEvent.preventDefault(m);return m};EditorUi.prototype.createMenuItem=function(c,f,l){var m=this.actions.get(c),t=null!=m?m.funct:null,v=this.createToolbarButton(f,mxResources.get(c)+(null!=m&&null!=m.shortcut?" ("+m.shortcut+")":""),t);null==m||l||(c=function(){m.isEnabled()?
+v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),m.addListener("stateChanged",c),c());return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=this,f=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),
+f,60,240,l,mxUtils.bind(this,function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var m=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=
t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");c.format.refresh();this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(v){mxEvent.getSource(v)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var v=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,A=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>v||690>A)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var F=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):
-F.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var k=this.hsplitPosition,m=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),t=c?f:0,v=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");
+window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,B=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>v||690>B)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var F=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):
+F.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));var l=this.hsplitPosition,m=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),t=c?f:0,v=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");
0!=t&&m();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+v+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,
-"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&m()}),1E3*v)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var M=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():M.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(A,E){var D=this.menus.get(A);A=this.createMenuElement(E,
-mxUtils.bind(this,function(){D.funct.apply(this,arguments)}));A.setAttribute("title",E);A.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";A.className="geButton";c.parentNode.appendChild(A);return A});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",
-f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var k=f("newLibrary","");k.style.left="0px";k.style.right="50%";var m=document.createElement("span");k.appendChild(m);
-var t=f("openLibraryFrom","");t.style.borderLeftWidth="1px";t.style.left="50%";t.style.right="0px";var v=document.createElement("span");t.appendChild(v);this.dependsOnLanguage(mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("newLibrary"));k.setAttribute("title",mxResources.get("newLibrary"));v.innerHTML="";mxUtils.write(v,mxResources.get("openLibraryFrom"));t.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow=
-"hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-
+"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&m()}),1E3*v)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var N=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():N.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(B,E){var D=this.menus.get(B);B=this.createMenuElement(E,
+mxUtils.bind(this,function(){D.funct.apply(this,arguments)}));B.setAttribute("title",E);B.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";B.className="geButton";c.parentNode.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",
+f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary","");l.style.left="0px";l.style.right="50%";var m=document.createElement("span");l.appendChild(m);
+var t=f("openLibraryFrom","");t.style.borderLeftWidth="1px";t.style.left="50%";t.style.right="0px";var v=document.createElement("span");t.appendChild(v);this.dependsOnLanguage(mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));v.innerHTML="";mxUtils.write(v,mxResources.get("openLibraryFrom"));t.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow=
+"hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-
f)/2):56,c-6,f-6,mxUtils.bind(this,function(m){this.createShapesPanel(m)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=
function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,
null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};
-EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,m=f.getAttribute("media");(m="all"==m||"not all"!=m&&k)&&!c?
-f.setAttribute("media",k?"not all":"(forced-colors: active)"):!m&&c&&f.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));
+EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,m=f.getAttribute("media");(m="all"==m||"not all"!=m&&l)&&!c?
+f.setAttribute("media",l?"not all":"(forced-colors: active)"):!m&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));
c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||
null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=
c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),
-(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",k.style.left="10px",k.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",
+(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",
this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var m=this.diagramContainer.getAttribute("data-bounds");if(null!=m){this.diagramContainer.removeAttribute("data-bounds");
var t=m.split(" ");m=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];this.diagramContainer.style.left=t[1];var v=parseInt(t[2]);t=parseInt(t[3]);v=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,v):v,m.width-80);t=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,t):t,m.height-80);this.diagramContainer.style.width=v+"px";this.diagramContainer.style.height=t+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||
-window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";k.style.display="";k.style.left=this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right=
+window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right=
"";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-
this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=
mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||
null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize=
"14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=
Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==
-Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var k=c.indexOf(",");0<k&&(f=this.getPageById(c.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,
-5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var k=JSON.parse(c.substring(17));null!=k&&null!=k.title&&(f=k.title)}catch(m){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,
+Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,
+5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(m){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,
f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,k){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,k){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));
-c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,k){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,k){mxSettings.setGridColor(c.view.defaultGridColor,
-!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",
-mxUtils.bind(this,function(f,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
-mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.writeImageToClipboard=function(c,f,k,m,t,v){m=null!=m?m:"image/png";var A=null==f||null==k?'<img src="'+c+'">':'<img src="'+c+'" width="'+f+'" height="'+k+'">',E={"text/html":new Blob([A],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(m)&&(E[m]=this.base64ToBlob(c.substring(c.indexOf(",")+1),m));var D=new ClipboardItem(E);
-navigator.clipboard.write([D]).then(t)["catch"](v);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",f,"h",k,"type",m,"html",[A],"data",[E],"item",[D])};EditorUi.prototype.writeHtmlToClipboard=function(c,f){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](f)};EditorUi.prototype.writeTextToClipboard=function(c,f){navigator.clipboard.writeText(c)["catch"](f)};
-EditorUi.prototype.copySvg=function(c,f,k){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var m=this.editor.graph.getSvg(null,k,null,null,null,null,null,null,null,null,null,null,null,0<c.length?c:null);m.setAttribute("content",f);var t=Editor.createSvgDataUri(mxUtils.getXml(m)),v=parseInt(m.getAttribute("width")),A=parseInt(m.getAttribute("height"));this.writeImageToClipboard(t,v,A,"image/svg+xml",null,mxUtils.bind(this,function(E){this.handleError(E)}))}}catch(E){this.handleError(E)}};
-EditorUi.prototype.copyImage=function(c,f,k){try{k=null!=k?k:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,t){try{this.spinner.stop();var v=this.createImageDataUri(m,f,"png"),A=Math.round(parseInt(t.getAttribute("width"))/k),E=Math.round(parseInt(t.getAttribute("height"))/k);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[f],"scale",[k]);this.writeImageToClipboard(v,
-A,E,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var D=this.getBaseFilename(!1)+(null!=f?".drawio":"")+".png";this.saveLocalFile(v.substring(v.lastIndexOf(",")+1),D,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,k,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,
-null,!1,null,0<c.length?c:null)}catch(m){this.handleError(m)}};EditorUi.prototype.copyCells=function(c,f){var k=this.editor.graph;if(k.isSelectionEmpty())c.innerText="";else{var m=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(m));mxUtils.setTextContent(c,encodeURIComponent(t));f?(k.removeCells(m,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=
-null;if(Editor.enableNativeClipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,k,m,t,v){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[f],"compat",[k],"evt",[m],"html",[t],"pt",[v]);t=null!=t?t:!0;var A=this.editor.graph,E=null!=v?v:Editor.pasteAtMousePointer&&A.isMouseInsertPoint()?
-A.getInsertPoint():null;v=null;A.lastPasteXml==c?null==E&&A.pasteCounter++:(A.lastPasteXml=c,A.pasteCounter=0);var D=A.pasteCounter*A.gridSize;if(k||this.isCompatibleString(c)){A.model.beginUpdate();try{if(v=this.importXml(c,D,D),null!=E){var B=A.getBoundingBoxFromGeometry(v,!0);if(null!=B){var S=Math.round(A.snap(E.x)),R=Math.round(A.snap(E.y));A.cellsMoved(v,S-B.x,R-B.y)}}}finally{A.model.endUpdate()}A.setSelectionCells(v)}else if(f&&1==A.getSelectionCount()){f=A.getStartEditingCell(A.getSelectionCell(),
-m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==A.getCurrentCellStyle(f)[mxConstants.STYLE_SHAPE])A.setCellStyles(mxConstants.STYLE_IMAGE,c,[f]);else{A.model.beginUpdate();try{A.labelChanged(f,c),Graph.isLink(c)&&A.setLinkForCell(f,c)}finally{A.model.endUpdate()}}A.setSelectionCell(f)}else E=null!=E?E:A.getInsertPoint(),A.isMouseInsertPoint()&&(D=0,A.lastPasteXml==c&&0<A.pasteCounter&&A.pasteCounter--),v=this.insertTextAt(c,E.x+D,E.y+D,t),A.setSelectionCells(v);A.isSelectionEmpty()||(A.scrollCellToVisible(A.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(A.view.getState(A.getSelectionCell())));return v};EditorUi.prototype.pasteCells=function(c,f,k,m){if(!mxEvent.isConsumed(c)){var t=c.clipboardData,v=this.editor.graph,A=!1,E=f;if(k&&null!=t&&t.getData){var D=t.getData("text/plain"),B=!1;if(null!=D&&0<D.length&&"%3CmxGraphModel%3E"==D.substring(0,18))try{var S=decodeURIComponent(D);this.isCompatibleString(S)&&(B=!0,D=S)}catch(G){}B=B?null:t.getData("text/html");null!=B&&0<B.length?(E=this.parseHtmlData(B),
-A="text/plain"!=E.getAttribute("data-type")):null!=D&&0<D.length&&(E=document.createElement("div"),mxUtils.setTextContent(E,B))}D=E.getElementsByTagName("span");if(null!=D&&0<D.length&&"application/vnd.lucid.chart.objects"===D[0].getAttribute("data-lucid-type"))k=D[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(G){var H=this.editor.graph;H.lastPasteXml==G?H.pasteCounter++:(H.lastPasteXml=G,H.pasteCounter=0);var g=H.pasteCounter*H.gridSize;
-H.setSelectionCells(this.importXml(G,g,g));H.scrollCellToVisible(H.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(c));else{var R=!1,T="";T=A?null!=E.textContent&&"<mxfile"==E.textContent.substring(0,7)&&"</mxfile>"==E.textContent.substring(E.textContent.length-9)||"<mxGraphModel"==E.textContent.substring(0,13)&&"</mxGraphModel>"==E.textContent.substring(E.textContent.length-15)?E.textContent.replace(/\u00a0/g," "):E.innerHTML:mxUtils.trim(null==E.innerText?
+"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));
+c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,
+!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",
+mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
+mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.writeImageToClipboard=function(c,f,l,m,t,v){m=null!=m?m:"image/png";var B=null==f||null==l?'<img src="'+c+'">':'<img src="'+c+'" width="'+f+'" height="'+l+'">',E={"text/html":new Blob([B],{type:"text/html"})};null!=ClipboardItem.supports&&ClipboardItem.supports(m)&&(E[m]=this.base64ToBlob(c.substring(c.indexOf(",")+1),m));var D=new ClipboardItem(E);
+navigator.clipboard.write([D]).then(t)["catch"](v);EditorUi.debug("EditorUi.writeImageToClipboard",[this],"dataUrl",[c],"w",f,"h",l,"type",m,"html",[B],"data",[E],"item",[D])};EditorUi.prototype.writeHtmlToClipboard=function(c,f){navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(c)],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})])["catch"](f)};EditorUi.prototype.writeTextToClipboard=function(c,f){navigator.clipboard.writeText(c)["catch"](f)};
+EditorUi.prototype.copySvg=function(c,f,l){try{if(null!=navigator.clipboard&&"function"===typeof window.ClipboardItem){var m=this.editor.graph.getSvg(null,l,null,null,null,null,null,null,null,null,null,null,null,0<c.length?c:null);m.setAttribute("content",f);var t=Editor.createSvgDataUri(mxUtils.getXml(m)),v=parseInt(m.getAttribute("width")),B=parseInt(m.getAttribute("height"));this.writeImageToClipboard(t,v,B,"image/svg+xml",null,mxUtils.bind(this,function(E){this.handleError(E)}))}}catch(E){this.handleError(E)}};
+EditorUi.prototype.copyImage=function(c,f,l){try{l=null!=l?l:4,null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,t){try{this.spinner.stop();var v=this.createImageDataUri(m,f,"png"),B=Math.round(parseInt(t.getAttribute("width"))/l),E=Math.round(parseInt(t.getAttribute("height"))/l);EditorUi.debug("EditorUi.copyImage",[this],"cells",[c],"xml",[f],"scale",[l]);this.writeImageToClipboard(v,
+B,E,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var D=this.getBaseFilename(!1)+(null!=f?".drawio":"")+".png";this.saveLocalFile(v.substring(v.lastIndexOf(",")+1),D,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,l,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,
+null,!1,null,0<c.length?c:null)}catch(m){this.handleError(m)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var m=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),t=mxUtils.getXml(l.encodeCells(m));mxUtils.setTextContent(c,encodeURIComponent(t));f?(l.removeCells(m,!1),l.lastPasteXml=null):(l.lastPasteXml=t,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=
+null;if(Editor.enableNativeClipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,m,t,v){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[f],"compat",[l],"evt",[m],"html",[t],"pt",[v]);t=null!=t?t:!0;var B=this.editor.graph,E=null!=v?v:Editor.pasteAtMousePointer&&B.isMouseInsertPoint()?
+B.getInsertPoint():null;v=null;B.lastPasteXml==c?null==E&&B.pasteCounter++:(B.lastPasteXml=c,B.pasteCounter=0);var D=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(c)){B.model.beginUpdate();try{if(v=this.importXml(c,D,D),null!=E){var A=B.getBoundingBoxFromGeometry(v,!0);if(null!=A){var S=Math.round(B.snap(E.x)),R=Math.round(B.snap(E.y));B.cellsMoved(v,S-A.x,R-A.y)}}}finally{B.model.endUpdate()}B.setSelectionCells(v)}else if(f&&1==B.getSelectionCount()){f=B.getStartEditingCell(B.getSelectionCell(),
+m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==B.getCurrentCellStyle(f)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,c,[f]);else{B.model.beginUpdate();try{B.labelChanged(f,c),Graph.isLink(c)&&B.setLinkForCell(f,c)}finally{B.model.endUpdate()}}B.setSelectionCell(f)}else E=null!=E?E:B.getInsertPoint(),B.isMouseInsertPoint()&&(D=0,B.lastPasteXml==c&&0<B.pasteCounter&&B.pasteCounter--),v=this.insertTextAt(c,E.x+D,E.y+D,t),B.setSelectionCells(v);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return v};EditorUi.prototype.pasteCells=function(c,f,l,m){if(!mxEvent.isConsumed(c)){var t=c.clipboardData,v=this.editor.graph,B=!1,E=f;if(l&&null!=t&&t.getData){var D=t.getData("text/plain"),A=!1;if(null!=D&&0<D.length&&"%3CmxGraphModel%3E"==D.substring(0,18))try{var S=decodeURIComponent(D);this.isCompatibleString(S)&&(A=!0,D=S)}catch(G){}A=A?null:t.getData("text/html");null!=A&&0<A.length?(E=this.parseHtmlData(A),
+B="text/plain"!=E.getAttribute("data-type")):null!=D&&0<D.length&&(E=document.createElement("div"),mxUtils.setTextContent(E,A))}D=E.getElementsByTagName("span");if(null!=D&&0<D.length&&"application/vnd.lucid.chart.objects"===D[0].getAttribute("data-lucid-type"))l=D[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(G){var H=this.editor.graph;H.lastPasteXml==G?H.pasteCounter++:(H.lastPasteXml=G,H.pasteCounter=0);var g=H.pasteCounter*H.gridSize;
+H.setSelectionCells(this.importXml(G,g,g));H.scrollCellToVisible(H.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(c));else{var R=!1,T="";T=B?null!=E.textContent&&"<mxfile"==E.textContent.substring(0,7)&&"</mxfile>"==E.textContent.substring(E.textContent.length-9)||"<mxGraphModel"==E.textContent.substring(0,13)&&"</mxGraphModel>"==E.textContent.substring(E.textContent.length-15)?E.textContent.replace(/\u00a0/g," "):E.innerHTML:mxUtils.trim(null==E.innerText?
mxUtils.getTextContent(E):E.innerText);try{var P=T.lastIndexOf("%3E");0<=P&&P<T.length-3&&(T=T.substring(0,P+3))}catch(G){}try{D=E.getElementsByTagName("span"),(S=null!=D&&0<D.length?mxUtils.trim(decodeURIComponent(D[0].textContent)):decodeURIComponent(T))&&(this.isCompatibleString(S)||0==S.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(R=!0,T=S)}catch(G){}S=null;try{if(!R&&""==E.textContent)for(P=0;P<t.items.length;P++){var q=t.items[P];if("file"===q.kind){S=q.getAsFile();break}}}catch(G){}EditorUi.debug("EditorUi.pasteCells",
-[this],"evt",[c],"realElt",[f.outerHTML],"elt",[E.outerHTML],"useEvent",k,"pasteAsLabel",m,"xml",[T],"compat",R,"asHtml",A,"data",t,"items",[t.items.length],"files",[t.files.length],"types",[JSON.stringify(t.types)],"blob",[S]);try{if(R||null==S)if(null!=T&&0<T.length){if(0==T.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var J=mxUtils.bind(this,function(){try{T=(new MiroImporter).importMiroJson(JSON.parse(T)),this.pasteXml(T,m,R,c)}catch(G){console.log("Miro import error:",G)}});
-"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",J):J()}else this.pasteXml(T,m,R,c,A);mxEvent.consume(c)}else k||(v.lastPasteXml=null,v.pasteCounter=0);else{var u=v.getInsertPoint();this.importFiles([S],u.x,u.y,this.maxImageSize);mxEvent.consume(c)}}catch(G){this.handleError(G)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var f=this.editor.graph;if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,
-function(k,m,t,v,A){if(null!=k){f.getModel().beginUpdate();try{this.pasteXml(k,!0,null,null,null,c)}finally{f.getModel().endUpdate()}}else k=null!=m?m:null!=t?t:v,null!=k?(c=null!=c?c:f.getInsertPoint(),this.importFiles([k],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(k){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var f=this.editor.graph;f.getModel().beginUpdate();try{f.moveCellsTo(mxClipboard.paste(f),c)}finally{f.getModel().endUpdate()}};
-EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){for(var k=null!=f.clipboardData?f.clipboardData:f.originalEvent.clipboardData,m=!1,t=null,v=0;v<k.types.length;v++)if("text/"===k.types[v].substring(0,5)){m=!0;break}for(v=0;v<k.items.length;v++){var A=k.items[v];if("file"===A.kind){t=A.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[f],"data",[k],"items",[k.items.length],"files",
-[k.files.length],"types",[JSON.stringify(k.types)],"containsText",m,"file",[t],"editing",c.isEditing());var E=mxUtils.bind(this,function(){try{if(!m&&null!=t){if(c.isEditing())this.importFiles([t],0,0,this.maxImageSize,function(B,S,R,T,P,q){c.insertImage(B,P,q)},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var S=0;S<B.length;S++)B[S]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([t],D.x,D.y,this.maxImageSize)}mxEvent.consume(f)}}catch(B){}});
-if(!mxEvent.isConsumed(f)&&!m)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(D){this.readTypeFromClipboardData(D,"image/svg+xml",mxUtils.bind(this,function(B){if(null!=B){B=new Blob([B],{type:"image/svg+xml"});var S=this.editor.graph.getInsertPoint();this.importFiles([B],S.x,S.y,this.maxImageSize)}else E()}),"image")}))["catch"](E);else E()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,
-function(f){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",f,"types",null!=f&&0<f.length?[JSON.stringify(f[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(f,mxUtils.bind(this,function(k,m){null!=k?c(k):this.readGraphModelFromImageClipboardData(f,mxUtils.bind(this,function(t,v,A){null!=t?c(t):this.readTypeFromClipboardData(f,"text/plain",mxUtils.bind(this,function(E){c(E,v,A,m,f)}))}))}))}catch(k){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=
-function(c,f){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(k){var m=null,t=null;try{var v=this.parseHtmlData(k);if(null!=v){m="text/plain"!=v.getAttribute("data-type")?v.innerHTML:mxUtils.trim(null==v.innerText?mxUtils.getTextContent(v):v.innerText);try{var A=m.lastIndexOf("%3E");0<=A&&A<m.length-3&&(m=m.substring(0,A+3))}catch(B){}try{null==m&&(k=null,""==v.textContent&&1==v.children.length&&"IMG"==v.firstChild.nodeName&&(k=v.firstChild.getAttribute("src")),null!=k&&0<
-k.length&&("data:image/png;base64,"==k.substring(0,22)?t=this.base64ToBlob(k.substring(k.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==k.substring(0,26)&&(t=this.base64ToBlob(k.substring(k.indexOf(",")+1),"image/svg+xml"))))}catch(B){}try{var E=v.getElementsByTagName("span"),D=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(m);this.isCompatibleString(D)&&(m=D)}catch(B){}}}catch(B){}f(this.isCompatibleString(m)?m:null,t)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=
-function(c,f){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(k,m){var t=null;try{null!=k&&(t=mxUtils.parseXml(k).documentElement.getAttribute("content"))}catch(v){}this.isCompatibleString(t)?f(t):this.readTypeFromClipboardData(c,"image/png",mxUtils.bind(this,function(v,A){t=Editor.extractGraphModelFromPng("data:image/png;base64,"+v);this.isCompatibleString(t)?f(t):f(null,m,A)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,f,k){var m=!1;if(null!=c&&0<c.length)for(var t=
-0;t<c.length&&!m;t++)(function(v){0<=mxUtils.indexOf(v.types,f)&&(m=!0,v.getType(f).then(mxUtils.bind(this,function(A){if("image/png"==f)A.arrayBuffer().then(function(E){k(btoa(Graph.arrayBufferToString(E)),A)})["catch"](function(){k(null)});else A.text().then(mxUtils.bind(this,function(E){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[f],"result",[E]);k(E,A)}))["catch"](function(){k(null)})}))["catch"](function(){k(null)}))})(c[t]);m||k()};EditorUi.prototype.parseHtmlData=
-function(c){var f=null;if(null!=c&&0<c.length){var k="<meta "==c.substring(0,6);f=document.createElement("div");f.innerHTML=(k?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;k=f.getElementsByTagName("style");if(null!=k)for(;0<k.length;)k[0].parentNode.removeChild(k[0]);if(null!=f.firstChild&&f.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=f.firstChild.nextSibling&&f.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==f.firstChild.nodeName&&"A"==f.firstChild.nextSibling.nodeName&&
-null==f.firstChild.nextSibling.nextSibling){var m=null==f.firstChild.nextSibling.innerText?mxUtils.getTextContent(f.firstChild.nextSibling):f.firstChild.nextSibling.innerText;m==f.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(f,m),asHtml=!1)}if(""==f.textContent&&(k=f.getElementsByTagName("img"),1==k.length&&(m=k[0].getAttribute("src"),k=null,null!=m))){if(Editor.isPngDataUrl(m)){var t=Editor.extractGraphModelFromPng(m);null!=t&&0<t.length&&(k=t)}else if("data:image/svg+xml;base64,"==
-m.substring(0,26)){img=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/svg+xml");m=Graph.getSvgFromDataUri(m);try{t=mxUtils.parseXml(m).documentElement.getAttribute("content"),this.isCompatibleString(t)&&(k=t)}catch(v){}}null!=k&&(mxUtils.setTextContent(f,k),asHtml=!1)}asHtml?Graph.removePasteFormatting(f):f.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[f],"asHtml",asHtml);return f};EditorUi.prototype.showPrintDialog=function(c,f,k){var m=
-330;this.editor.graph.isEnabled()&&(m+=40);null!=this.pages&&1<this.pages.length&&(m+=40,this.editor.graph.isEnabled()||(m+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(m+=20);this.showDialog((new PrintDialog(this,c,f,k)).container,320,m,!0,!0)};EditorUi.prototype.print=function(c,f){var k=this.editor,m=k.graph,t=this.getPageIndex(this.currentPage),v=null!=t?t+1:1,A=mxUtils.bind(this,function(G,H,g,n){var C=G.useCssTransforms,I=G.currentTranslate,N=G.currentScale,O=G.view.translate,
-Q=G.view.scale;G.useCssTransforms&&(G.useCssTransforms=!1,G.currentTranslate=new mxPoint(0,0),G.currentScale=1,G.view.translate=new mxPoint(0,0),G.view.scale=1);var U=G.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(G.pageFormat),Y=f.fit||f.crop||!G.pageVisible,Z=f.scale;W.width=Math.ceil(W.width*G.pageScale);W.height=Math.ceil(W.height*G.pageScale);var ba=1;if(f.fit){ba=f.sheetsAcross;var ia=f.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));ba=Math.min(W.height*
-ia/(U.height/G.view.scale),W.width*ba/(U.width/G.view.scale))}else ba=isNaN(Z)?1:Z;ba*=1;!Y&&G.pageVisible?(Z=G.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;f.crop&&(f.selection&&(U=m.getBoundingBox(m.getSelectionCells())),W.width=(U.width+1)*ba/G.view.scale,W.height=(U.height+1)*ba/G.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);n=null!=n?"page/id,"+n:null;if(null==H){H=PrintDialog.createPrintPreview(G,ba,null,0,V,X,Y);H.title=this.getBaseFilename(!0);H.pageSelector=
-!1;H.mathEnabled=!1;V=f.border;isNaN(V)||(H.pageMargin=V);f.selection&&(H.isCellVisible=function(ma){return G.isCellSelected(ma)});var ea=H.writeHead;H.writeHead=function(ma,aa){aa=null!=aa?aa:"";f.shadows||(aa+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(aa+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=k.fontCss&&(aa+=k.fontCss);ea.apply(this,arguments);for(var fa=G.getCustomFonts(),la=0;la<fa.length;la++){var ca=fa[la].name,
-va=fa[la].url;Graph.isCssFontUrl(va)?ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(va))+'" charset="UTF-8" type="text/css">'):(ma.writeln('<style type="text/css">'),ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ca)+'";\nsrc: url("'+mxUtils.htmlEntities(va)+'");\n}'),ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var da=H.drawBackgroundImage;H.drawBackgroundImage=function(ma){da.apply(this,arguments);null!=ma.node&&(EditorUi.embedSvgImages(ma.node),
-m.disableSvgLinks(ma.node,function(aa){aa.setAttribute("href","javascript:void(0)")}))}}var ja=H.addGraphFragment;H.addGraphFragment=function(ma,aa,fa,la,ca,va){ja.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:ca.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var sa=ca.getElementsByTagName("svg"),wa=0;wa<sa.length;wa++)G.addSvgShadow(sa[wa])};f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
-G.view.gridColor);H.open(null,null,g,!0,n,W,f.selection?G.getSelectionCells():null)}else{U=G.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";H.backgroundColor=U;H.autoOrigin=Y;f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:G.view.gridColor);H.appendGraph(G,ba,V,X,g,!0,n,W,f.selection?G.getSelectionCells():null);g=G.getCustomFonts();if(null!=H.wnd)for(W=0;W<g.length;W++)V=g[W].name,X=g[W].url,Graph.isCssFontUrl(X)?
-H.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(H.wnd.document.writeln('<style type="text/css">'),H.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),H.wnd.document.writeln("</style>"))}C&&(G.useCssTransforms=C,G.currentTranslate=I,G.currentScale=N,G.view.translate=O,G.view.scale=Q);return H}),E=f.pagesFrom,D=f.pagesTo,B=!f.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
-f);else{B&&(B=f.selection||E==v&&D==v);if(!B&&null!=this.pages&&this.pages.length){B=0;v=this.pages.length-1;f.allPages||(B=parseInt(E)-1,v=parseInt(D)-1);for(var S=B;S<=v;S++){var R=this.pages[S];E=R==this.currentPage?m:null;if(null==E){E=this.createTemporaryGraph(m.stylesheet);E.shapeForegroundColor=m.shapeForegroundColor;E.shapeBackgroundColor=m.shapeBackgroundColor;D=!0;var T=B=!1,P=null,q=null;null==R.viewState&&null==R.root&&this.updatePageRoot(R);null!=R.viewState&&(D=R.viewState.pageVisible,
-B=R.viewState.mathEnabled,T=R.viewState.shadowVisible,P=R.viewState.background,q=R.viewState.backgroundImage,E.pageFormat=R.viewState.pageFormat,E.gridSize=R.viewState.gridSize);null!=q&&null!=q.originalSrc&&(q=this.createImageForPageLink(q.originalSrc,R));E.background=P;E.backgroundImage=null!=q?new mxImage(q.src,q.width,q.height,q.x,q.y):null;E.pageVisible=D;E.mathEnabled=B;E.shadowVisible=T;var u=E.getGraphBounds;E.getGraphBounds=function(){var G=u.apply(this,arguments),H=this.backgroundImage;
-if(null!=H&&null!=H.width&&null!=H.height){var g=this.view.translate,n=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((g.x+H.x)*n,(g.y+H.y)*n,H.width*n,H.height*n))}return G};var J=E.getGlobalVariable;E.getGlobalVariable=function(G){return"page"==G?R.getName():"pagenumber"==G?S+1:"pagecount"==G?null!=this.pages?this.pages.length:1:J.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(R);E.model.setRoot(R.root)}t=A(E,t,S!=v,R.getId());E!=m&&E.container.parentNode.removeChild(E.container)}}else t=
-A(m);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(A=t.wnd.document,c||(t.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||c||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,k=0;k<c.length;k++)mxEvent.addListener(c[k],"dragleave",function(m){null!=
-f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(c[k],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(c[k],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
+[this],"evt",[c],"realElt",[f.outerHTML],"elt",[E.outerHTML],"useEvent",l,"pasteAsLabel",m,"xml",[T],"compat",R,"asHtml",B,"data",t,"items",[t.items.length],"files",[t.files.length],"types",[JSON.stringify(t.types)],"blob",[S]);try{if(R||null==S)if(null!=T&&0<T.length){if(0==T.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var J=mxUtils.bind(this,function(){try{T=(new MiroImporter).importMiroJson(JSON.parse(T)),this.pasteXml(T,m,R,c)}catch(G){console.log("Miro import error:",G)}});
+"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",J):J()}else this.pasteXml(T,m,R,c,B);mxEvent.consume(c)}else l||(v.lastPasteXml=null,v.pasteCounter=0);else{var u=v.getInsertPoint();this.importFiles([S],u.x,u.y,this.maxImageSize);mxEvent.consume(c)}}catch(G){this.handleError(G)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.pasteFromClipboard=function(c){var f=this.editor.graph;if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,
+function(l,m,t,v,B){if(null!=l){f.getModel().beginUpdate();try{this.pasteXml(l,!0,null,null,null,c)}finally{f.getModel().endUpdate()}}else l=null!=m?m:null!=t?t:v,null!=l?(c=null!=c?c:f.getInsertPoint(),this.importFiles([l],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(l){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var f=this.editor.graph;f.getModel().beginUpdate();try{f.moveCellsTo(mxClipboard.paste(f),c)}finally{f.getModel().endUpdate()}};
+EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){for(var l=null!=f.clipboardData?f.clipboardData:f.originalEvent.clipboardData,m=!1,t=null,v=0;v<l.types.length;v++)if("text/"===l.types[v].substring(0,5)){m=!0;break}for(v=0;v<l.items.length;v++){var B=l.items[v];if("file"===B.kind){t=B.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[f],"data",[l],"items",[l.items.length],"files",
+[l.files.length],"types",[JSON.stringify(l.types)],"containsText",m,"file",[t],"editing",c.isEditing());var E=mxUtils.bind(this,function(){try{if(!m&&null!=t){if(c.isEditing())this.importFiles([t],0,0,this.maxImageSize,function(A,S,R,T,P,q){c.insertImage(A,P,q)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var S=0;S<A.length;S++)A[S]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([t],D.x,D.y,this.maxImageSize)}mxEvent.consume(f)}}catch(A){}});
+if(!mxEvent.isConsumed(f)&&!m)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(D){this.readTypeFromClipboardData(D,"image/svg+xml",mxUtils.bind(this,function(A){if(null!=A){A=new Blob([A],{type:"image/svg+xml"});var S=this.editor.graph.getInsertPoint();this.importFiles([A],S.x,S.y,this.maxImageSize)}else E()}),"image")}))["catch"](E);else E()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,
+function(f){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",f,"types",null!=f&&0<f.length?[JSON.stringify(f[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(f,mxUtils.bind(this,function(l,m){null!=l?c(l):this.readGraphModelFromImageClipboardData(f,mxUtils.bind(this,function(t,v,B){null!=t?c(t):this.readTypeFromClipboardData(f,"text/plain",mxUtils.bind(this,function(E){c(E,v,B,m,f)}))}))}))}catch(l){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=
+function(c,f){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(l){var m=null,t=null;try{var v=this.parseHtmlData(l);if(null!=v){m="text/plain"!=v.getAttribute("data-type")?v.innerHTML:mxUtils.trim(null==v.innerText?mxUtils.getTextContent(v):v.innerText);try{var B=m.lastIndexOf("%3E");0<=B&&B<m.length-3&&(m=m.substring(0,B+3))}catch(A){}try{null==m&&(l=null,""==v.textContent&&1==v.children.length&&"IMG"==v.firstChild.nodeName&&(l=v.firstChild.getAttribute("src")),null!=l&&0<
+l.length&&("data:image/png;base64,"==l.substring(0,22)?t=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/png"):"data:image/svg+xml;base64,"==l.substring(0,26)&&(t=this.base64ToBlob(l.substring(l.indexOf(",")+1),"image/svg+xml"))))}catch(A){}try{var E=v.getElementsByTagName("span"),D=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(m);this.isCompatibleString(D)&&(m=D)}catch(A){}}}catch(A){}f(this.isCompatibleString(m)?m:null,t)}))};EditorUi.prototype.readGraphModelFromImageClipboardData=
+function(c,f){this.readTypeFromClipboardData(c,"image/svg+xml",mxUtils.bind(this,function(l,m){var t=null;try{null!=l&&(t=mxUtils.parseXml(l).documentElement.getAttribute("content"))}catch(v){}this.isCompatibleString(t)?f(t):this.readTypeFromClipboardData(c,"image/png",mxUtils.bind(this,function(v,B){t=Editor.extractGraphModelFromPng("data:image/png;base64,"+v);this.isCompatibleString(t)?f(t):f(null,m,B)}))}))};EditorUi.prototype.readTypeFromClipboardData=function(c,f,l){var m=!1;if(null!=c&&0<c.length)for(var t=
+0;t<c.length&&!m;t++)(function(v){0<=mxUtils.indexOf(v.types,f)&&(m=!0,v.getType(f).then(mxUtils.bind(this,function(B){if("image/png"==f)B.arrayBuffer().then(function(E){l(btoa(Graph.arrayBufferToString(E)),B)})["catch"](function(){l(null)});else B.text().then(mxUtils.bind(this,function(E){EditorUi.debug("EditorUi.readTypeFromClipboardData",[this],"data",[c],"type",[f],"result",[E]);l(E,B)}))["catch"](function(){l(null)})}))["catch"](function(){l(null)}))})(c[t]);m||l()};EditorUi.prototype.parseHtmlData=
+function(c){var f=null;if(null!=c&&0<c.length){var l="<meta "==c.substring(0,6);f=document.createElement("div");f.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(c);asHtml=!0;l=f.getElementsByTagName("style");if(null!=l)for(;0<l.length;)l[0].parentNode.removeChild(l[0]);if(null!=f.firstChild&&f.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=f.firstChild.nextSibling&&f.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==f.firstChild.nodeName&&"A"==f.firstChild.nextSibling.nodeName&&
+null==f.firstChild.nextSibling.nextSibling){var m=null==f.firstChild.nextSibling.innerText?mxUtils.getTextContent(f.firstChild.nextSibling):f.firstChild.nextSibling.innerText;m==f.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(f,m),asHtml=!1)}if(""==f.textContent&&(l=f.getElementsByTagName("img"),1==l.length&&(m=l[0].getAttribute("src"),l=null,null!=m))){if(Editor.isPngDataUrl(m)){var t=Editor.extractGraphModelFromPng(m);null!=t&&0<t.length&&(l=t)}else if("data:image/svg+xml;base64,"==
+m.substring(0,26)){img=this.base64ToBlob(m.substring(m.indexOf(",")+1),"image/svg+xml");m=Graph.getSvgFromDataUri(m);try{t=mxUtils.parseXml(m).documentElement.getAttribute("content"),this.isCompatibleString(t)&&(l=t)}catch(v){}}null!=l&&(mxUtils.setTextContent(f,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(f):f.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[f],"asHtml",asHtml);return f};EditorUi.prototype.showPrintDialog=function(c,f,l){var m=
+330;this.editor.graph.isEnabled()&&(m+=40);null!=this.pages&&1<this.pages.length&&(m+=40,this.editor.graph.isEnabled()||(m+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(m+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,m,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,m=l.graph,t=this.getPageIndex(this.currentPage),v=null!=t?t+1:1,B=mxUtils.bind(this,function(G,H,g,p){var C=G.useCssTransforms,I=G.currentTranslate,M=G.currentScale,O=G.view.translate,
+Q=G.view.scale;G.useCssTransforms&&(G.useCssTransforms=!1,G.currentTranslate=new mxPoint(0,0),G.currentScale=1,G.view.translate=new mxPoint(0,0),G.view.scale=1);var U=G.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(G.pageFormat),Y=f.fit||f.crop||!G.pageVisible,Z=f.scale;W.width=Math.ceil(W.width*G.pageScale);W.height=Math.ceil(W.height*G.pageScale);var aa=1;if(f.fit){aa=f.sheetsAcross;var ha=f.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*
+ha/(U.height/G.view.scale),W.width*aa/(U.width/G.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&G.pageVisible?(Z=G.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;f.crop&&(f.selection&&(U=m.getBoundingBox(m.getSelectionCells())),W.width=(U.width+1)*aa/G.view.scale,W.height=(U.height+1)*aa/G.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);p=null!=p?"page/id,"+p:null;if(null==H){H=PrintDialog.createPrintPreview(G,aa,null,0,V,X,Y);H.title=this.getBaseFilename(!0);H.pageSelector=
+!1;H.mathEnabled=!1;V=f.border;isNaN(V)||(H.pageMargin=V);f.selection&&(H.isCellVisible=function(la){return G.isCellSelected(la)});var ea=H.writeHead;H.writeHead=function(la,ba){ba=null!=ba?ba:"";f.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ba+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(ba+=l.fontCss);ea.apply(this,arguments);for(var fa=G.getCustomFonts(),ja=0;ja<fa.length;ja++){var ca=fa[ja].name,
+sa=fa[ja].url;Graph.isCssFontUrl(sa)?la.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(sa))+'" charset="UTF-8" type="text/css">'):(la.writeln('<style type="text/css">'),la.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ca)+'";\nsrc: url("'+mxUtils.htmlEntities(sa)+'");\n}'),la.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var da=H.drawBackgroundImage;H.drawBackgroundImage=function(la){da.apply(this,arguments);null!=la.node&&(EditorUi.embedSvgImages(la.node),
+m.disableSvgLinks(la.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var ia=H.addGraphFragment;H.addGraphFragment=function(la,ba,fa,ja,ca,sa){ia.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:ca.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var pa=ca.getElementsByTagName("svg"),ua=0;ua<pa.length;ua++)G.addSvgShadow(pa[ua])};f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
+G.view.gridColor);H.open(null,null,g,!0,p,W,f.selection?G.getSelectionCells():null)}else{U=G.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";H.backgroundColor=U;H.autoOrigin=Y;f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:G.view.gridColor);H.appendGraph(G,aa,V,X,g,!0,p,W,f.selection?G.getSelectionCells():null);g=G.getCustomFonts();if(null!=H.wnd)for(W=0;W<g.length;W++)V=g[W].name,X=g[W].url,Graph.isCssFontUrl(X)?
+H.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(H.wnd.document.writeln('<style type="text/css">'),H.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),H.wnd.document.writeln("</style>"))}C&&(G.useCssTransforms=C,G.currentTranslate=I,G.currentScale=M,G.view.translate=O,G.view.scale=Q);return H}),E=f.pagesFrom,D=f.pagesTo,A=!f.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
+f);else{A&&(A=f.selection||E==v&&D==v);if(!A&&null!=this.pages&&this.pages.length){A=0;v=this.pages.length-1;f.allPages||(A=parseInt(E)-1,v=parseInt(D)-1);for(var S=A;S<=v;S++){var R=this.pages[S];E=R==this.currentPage?m:null;if(null==E){E=this.createTemporaryGraph(m.stylesheet);E.shapeForegroundColor=m.shapeForegroundColor;E.shapeBackgroundColor=m.shapeBackgroundColor;D=!0;var T=A=!1,P=null,q=null;null==R.viewState&&null==R.root&&this.updatePageRoot(R);null!=R.viewState&&(D=R.viewState.pageVisible,
+A=R.viewState.mathEnabled,T=R.viewState.shadowVisible,P=R.viewState.background,q=R.viewState.backgroundImage,E.pageFormat=R.viewState.pageFormat,E.gridSize=R.viewState.gridSize);null!=q&&null!=q.originalSrc&&(q=this.createImageForPageLink(q.originalSrc,R));E.background=P;E.backgroundImage=null!=q?new mxImage(q.src,q.width,q.height,q.x,q.y):null;E.pageVisible=D;E.mathEnabled=A;E.shadowVisible=T;var u=E.getGraphBounds;E.getGraphBounds=function(){var G=u.apply(this,arguments),H=this.backgroundImage;
+if(null!=H&&null!=H.width&&null!=H.height){var g=this.view.translate,p=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((g.x+H.x)*p,(g.y+H.y)*p,H.width*p,H.height*p))}return G};var J=E.getGlobalVariable;E.getGlobalVariable=function(G){return"page"==G?R.getName():"pagenumber"==G?S+1:"pagecount"==G?null!=this.pages?this.pages.length:1:J.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(R);E.model.setRoot(R.root)}t=B(E,t,S!=v,R.getId());E!=m&&E.container.parentNode.removeChild(E.container)}}else t=
+B(m);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(B=t.wnd.document,c||(t.wnd.IMMEDIATE_PRINT=!0),B.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||c||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(m){null!=
+f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(m);if(null==t){var v=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=v&&(10==document.documentMode||11==document.documentMode?t=v.getData("Text"):(t=null,t=0<=mxUtils.indexOf(v.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(v.types,"text/html")?
v.getData("text/html"):null,null!=t&&0<t.length?(v=document.createElement("div"),v.innerHTML=Graph.sanitizeHtml(t),v=v.getElementsByTagName("img"),0<v.length&&(t=v[0].getAttribute("src"))):0<=mxUtils.indexOf(v.types,"text/plain")&&(t=v.getData("text/plain"))),null!=t&&(Editor.isPngDataUrl(t)?(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,
-"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()?this.openLocalFile(A.getText(),null,!0):this.showError(mxResources.get("error"),413==A.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
-"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,k=0;if(null==c){var m=document.body;var t=document.documentElement;var v=(m.clientWidth||t.clientWidth)-3;m=Math.max(m.clientHeight||0,t.clientHeight)-3}else m=c.getBoundingClientRect(),f=m.top,k=m.left,v=m.width,m=m.height;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+2;t.style.border="3px dotted rgb(254, 137, 12)";
-t.style.pointerEvents="none";t.style.position="absolute";t.style.top=f+"px";t.style.left=k+"px";t.style.width=Math.max(0,v-3)+"px";t.style.height=Math.max(0,m-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var k=new mxCodec(f.ownerDocument),m=new mxGraphModel;k.decode(f,
-m);f=m.getChildAt(m.getRoot(),0);for(k=0;k<m.getChildCount(f);k++)c.push(m.getChildAt(f,k))}return c};EditorUi.prototype.openFileHandle=function(c,f,k,m,t,v){if(null!=f&&0<f.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var A=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,D,f)),this.showSidebar()}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,m)});if(EditorUi.isVisioFilename(f))this.importVisio(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?A(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),
-this.convertLucidChart(c,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,m)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,c,k.name)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==
-c.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,m)}));else{if("image/png"==k.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==k.type){var E=Editor.extractGraphModelFromPdf(c);null!=E&&(t=null,m=!0,c=E)}this.spinner.stop();this.openLocalFile(c,f,m,t,null!=t?k:null,v)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=
-0;k<c.length;k++)mxUtils.bind(this,function(m){var t=new FileReader;t.onload=mxUtils.bind(this,function(v){try{this.openFileHandle(v.target.result,m.name,m,f)}catch(A){this.handleError(A)}});t.onerror=mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?t.readAsText(m):t.readAsDataURL(m)})(c[k])};EditorUi.prototype.openLocalFile=function(c,f,k,m,t,v){var A=this.getCurrentFile(),
-E=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(c);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,k,m,t,v))});if(null!=c&&0<c.length)null==A||!A.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?E():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var k in c)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function k(A){if(null!=A){var E=A.lastIndexOf(".");0<E&&(A=A.substring(E+1,A.length));null==f[A]&&(f[A]=!0)}}var m=this.editor.graph,t=m.getCellStyle(c);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));m.model.isEdge(c)&&
-(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=m.model.getChildCount(c);for(var v=0;v<t;v++)this.addBasenamesForCell(m.model.getChildAt(c,v),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
-this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,m,t){c||(c=!0,this.spinner.stop(),
-this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(t)try{var v=this.editor.graph;v.setGridEnabled(!1);v.pageVisible=!1;var A=v.model.cells,E;for(E in A){var D=A[E];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();f(k)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,
-page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
-exit:null!=c?!c:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,m,1,this.embedExportBorder,null,this.embedExportTheme)}else c||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){c||this.handleError(t)}};
-EditorUi.prototype.installMessageHandler=function(c){var f=null,k=!1,m=!1,t=null,v=mxUtils.bind(this,function(D,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,v);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var B=
-D.data,S=null,R=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(fa){}return aa});if("json"==urlParams.proto){var T=
-!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[B])}catch(aa){B=null}try{if(null==B)return;if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):mxUtils.htmlEntities(B.message),null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayouts(this.editor.graph.createLayouts(B.layouts));
-return}if("prompt"==B.action){this.spinner.stop();var P=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:B}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")});this.showDialog(P.container,300,80,!0,!1);
-P.init();return}if("draft"==B.action){var q=R(B.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?
-mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{P.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var u=1==B.enableRecent,J=1==B.enableSearch,G=1==B.enableCustomTemp;P=new NewDialog(this,!1,B.templatesOnly?
-!1:null!=B.callback,mxUtils.bind(this,function(aa,fa,la,ca){aa=aa||this.emptyDiagramXml;null!=B.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:fa,tempUrl:la,libs:ca,builtIn:!0,message:B}),"*"):(c(aa,D,aa!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):null,
-J?mxUtils.bind(this,function(aa,fa){this.remoteInvoke("searchDiagrams",[aa,null],null,fa,function(){fa(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,fa,la){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:fa,name:la}),"*")}),null,null,G?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==B.withoutType,null,B.templatesOnly);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&
-this.sidebar.hideTooltip();aa&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==B.action){var H=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:H,message:B}),"*");return}if("status"==B.action){this.updateStatus(mxUtils.bind(this,function(){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message))}));null!=B.modified&&(this.editor.modified=
-B.modified);return}if("spinner"==B.action){var g=null!=B.messageKey?mxResources.get(B.messageKey):B.message;null==B.show||B.show?this.spinner.spin(document.body,g):this.spinner.stop();return}if("exit"==B.action){this.actions.get("exit").funct();return}if("viewport"==B.action){if(null!=B.viewport){var n=this.editor.graph,C=n.view.translate.x,I=n.view.translate.y;this.embedViewport=B.viewport;n.refresh();this.diagramContainer.scrollTop-=(I-n.view.translate.y)*n.view.scale;this.diagramContainer.scrollLeft-=
-(C-n.view.translate.x)*n.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==B.action){P=null;try{var N=this.diagramContainer.getAttribute("data-scrollState");null!=N&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(N))}catch(aa){}Editor.inlineFullscreen=B.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==B.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
-B.action){if("png"==B.format||"xmlpng"==B.format){if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var O=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);n=this.editor.graph;var Q=mxUtils.bind(this,function(aa,fa){if(B.withSvg)B.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(ca){Q(aa,ca)},null,null,B.embedImages,this.editor.graph.background,B.scale,B.border,B.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var la=this.createLoadMessage("export");la.format=B.format;la.message=B;la.data=aa;la.svg=fa;la.xml=O;A.postMessage(JSON.stringify(la),"*")}}),U=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==B.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(O)));n!=this.editor.graph&&n.container.parentNode.removeChild(n.container);Q(aa)}),V=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var aa=n.getGlobalVariable;n=this.createTemporaryGraph(n.getStylesheet());for(var fa,la=0;la<this.pages.length;la++)if(this.pages[la].getId()==V){fa=this.updatePageRoot(this.pages[la]);break}null==fa&&(fa=this.currentPage);n.getGlobalVariable=function(wa){return"page"==wa?fa.getName():"pagenumber"==wa?1:aa.apply(this,arguments)};document.body.appendChild(n.container);n.model.setRoot(fa.root)}if(null!=B.layerIds){var ca=
-n.model,va=ca.getChildCells(ca.getRoot()),sa={};for(la=0;la<B.layerIds.length;la++)sa[B.layerIds[la]]=!0;for(la=0;la<va.length;la++)ca.setVisible(va[la],sa[va[la].id]||!1)}la=null;B.keepTheme&&(la=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){U(wa.toDataURL("image/png"))}),B.width,null,B.background,mxUtils.bind(this,function(){U(null)}),null,null,B.scale,B.transparent,B.shadow,null,n,B.border,null,B.grid,la)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(O),
-k=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(O))).send(mxUtils.bind(this,function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?Q("data:image/png;base64,"+aa.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(X=mxUtils.bind(this,
-function(){var aa=this.createLoadMessage("export");aa.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var fa=this.getXmlFileData();aa.xml=mxUtils.getXml(fa);aa.data=this.getFileData(null,null,!0,null,null,null,fa);aa.format=B.format}else if("html"==B.format)fa=this.editor.getGraphXml(),aa.data=this.getHtml(fa,this.editor.graph),aa.xml=mxUtils.getXml(fa),aa.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;fa=null!=B.background?
-B.background:this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var la=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=B.asText?va:Editor.createSvgDataUri(va);A.postMessage(JSON.stringify(aa),"*")}),ca="auto";B.keepTheme&&(ca=Editor.isDarkMode()?"dark":"light");null!=B.theme&&(ca=B.theme);if("xmlsvg"==B.format){if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,
-null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){ca=null;if(this.isAutoDarkMode()||Editor.isDarkMode())ca="auto";null!=B.theme&&(ca=B.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,la,null,null,B.embedImages,fa,B.scale,B.border,B.shadow,ca)}}else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),fa=this.editor.graph.getSvg(fa,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-B.shadow,null,ca),(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(fa),this.embedFonts(fa,mxUtils.bind(this,function(va){B.embedImages||null==B.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(sa){la(mxUtils.getXml(sa))})):la(mxUtils.getXml(va))}));return}A.postMessage(JSON.stringify(aa),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}k=!0;this.setFileData(B.xml);
-k=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==B.action){T=B.toSketch;m=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&
-(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var Y=Editor.sketchMode;this.doSetSketchMode(B.rough);Y!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=B.dark&&this.setDarkMode(B.dark);null!=B.border&&(this.embedExportBorder=B.border);null!=B.theme&&(this.embedExportTheme=B.theme);null!=B.background&&
-(this.embedExportBackground=B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,B.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,B.rect.top)+"px";this.minInlineWidth=B.minWidth;this.minInlineHeight=B.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var ba=B.maxFitScale,
-ia=B.rect.width+2*Z,ea=B.rect.height+2*Z;S=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();ia=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ia):ia,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,aa.height-80);this.diagramContainer.style.width=ia+"px";this.diagramContainer.style.height=aa+"px";var fa=this.editor.graph;aa=fa.maxFitScale;fa.maxFitScale=ba;fa.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=
-this.minInlineWidth&&fa.getGraphBounds().width<this.minInlineWidth){var la=fa.container.scrollTop;this.resetScrollbars();fa.container.scrollTop=la}fa.maxFitScale=aa;fa.container.scrollTop-=Z;fa.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[B]));fa.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=fa.container.style.top);
-var ca=fa.getGraphBounds();fa.container.clientWidth>ca.width+2*Z&&(fa.container.scrollLeft=ca.x+(ca.width+Z-fa.container.clientWidth)/2)}),10)})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn);null!=B.title&&null!=this.buttonContainer&&this.setEmbedTitle(B.title);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(aa){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var da=this.getCurrentFile();
-null!=da&&(q=R(B.xml),null!=q&&""!=q&&da.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:B,error:aa}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,D.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),
-"*");return}}catch(aa){this.handleError(aa)}}var ja=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ma=mxUtils.bind(this,function(aa,fa){k=!0;try{c(aa,fa,null,T)}catch(la){this.handleError(la)}k=!1;null!=urlParams.modified&&this.clearStatus();t=ja();m&&null==f&&(f=mxUtils.bind(this,function(la,ca){la=ja();la==t||k||(ca=this.createLoadMessage("autosave"),ca.xml=la,(window.opener||window.parent).postMessage(JSON.stringify(ca),
-"*"));t=la}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",
-f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)fa=this.createLoadMessage("load"),fa.xml=aa,A.postMessage(JSON.stringify(fa),"*");null!=S&&S()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(R="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(aa){ma(aa,D)},mxUtils.bind(this,function(aa){this.handleError(aa)}),R)):null!=
-B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?ma(aa.responseText,D):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=B&&"function"===typeof B.substring&&
-this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(aa){ma(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==B||"object"!==typeof B||null==B.format||null==B.data&&null==B.url?(B=R(B),ma(B,D)):this.loadDescriptor(B,mxUtils.bind(this,function(aa){ma(ja(),D)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;v="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
-"ready";A.postMessage(v,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(D,B,S){E.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",href:D,target:B,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,k,m){var t=document.createElement("button");t.className="geEmbedBtn geBtn";t.setAttribute("title",c+(null!=k?" ("+k+")":""));mxUtils.write(t,c);m&&t.classList.add("gePrimaryBtn");mxEvent.addListener(t,"click",
+"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(B){200<=B.getStatus()&&299>=B.getStatus()?this.openLocalFile(B.getText(),null,!0):this.showError(mxResources.get("error"),413==B.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var m=document.body;var t=document.documentElement;var v=(m.clientWidth||t.clientWidth)-3;m=Math.max(m.clientHeight||0,t.clientHeight)-3}else m=c.getBoundingClientRect(),f=m.top,l=m.left,v=m.width,m=m.height;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+2;t.style.border="3px dotted rgb(254, 137, 12)";
+t.style.pointerEvents="none";t.style.position="absolute";t.style.top=f+"px";t.style.left=l+"px";t.style.width=Math.max(0,v-3)+"px";t.style.height=Math.max(0,m-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),m=new mxGraphModel;l.decode(f,
+m);f=m.getChildAt(m.getRoot(),0);for(l=0;l<m.getChildCount(f);l++)c.push(m.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,m,t,v){if(null!=f&&0<f.length){if(!Editor.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var B=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,D,f)),this.showSidebar()}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,m)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?B(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),
+this.convertLucidChart(c,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,m)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==
+c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,m)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var E=Editor.extractGraphModelFromPdf(c);null!=E&&(t=null,m=!0,c=E)}this.spinner.stop();this.openLocalFile(c,f,m,t,null!=t?l:null,v)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=
+0;l<c.length;l++)mxUtils.bind(this,function(m){var t=new FileReader;t.onload=mxUtils.bind(this,function(v){try{this.openFileHandle(v.target.result,m.name,m,f)}catch(B){this.handleError(B)}});t.onerror=mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?t.readAsText(m):t.readAsDataURL(m)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,m,t,v){var B=this.getCurrentFile(),
+E=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(c);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,l,m,t,v))});if(null!=c&&0<c.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?E():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=
+0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function l(B){if(null!=B){var E=B.lastIndexOf(".");0<E&&(B=B.substring(E+1,B.length));null==f[B]&&(f[B]=!0)}}var m=this.editor.graph,t=m.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));m.model.isEdge(c)&&
+(l(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=m.model.getChildCount(c);for(var v=0;v<t;v++)this.addBasenamesForCell(m.model.getChildAt(c,v),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
+this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,m,t){c||(c=!0,this.spinner.stop(),
+this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(t)try{var v=this.editor.graph;v.setGridEnabled(!1);v.pageVisible=!1;var B=v.model.cells,E;for(E in B){var D=B[E];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(A){console.log(A)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,
+page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
+exit:null!=c?!c:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,m,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){c||this.handleError(t)}};
+EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,m=!1,t=null,v=mxUtils.bind(this,function(D,A){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,v);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var A=
+D.data,S=null,R=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(fa){}return ba});if("json"==urlParams.proto){var T=
+!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[A])}catch(ba){A=null}try{if(null==A)return;if("dialog"==A.action){this.showError(null!=A.titleKey?mxResources.get(A.titleKey):A.title,null!=A.messageKey?mxResources.get(A.messageKey):mxUtils.htmlEntities(A.message),null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayouts(this.editor.graph.createLayouts(A.layouts));
+return}if("prompt"==A.action){this.spinner.stop();var P=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(ba){null!=ba?B.postMessage(JSON.stringify({event:"prompt",value:ba,message:A}),"*"):B.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title,null,null,null,null,function(){B.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")});this.showDialog(P.container,300,80,!0,!1);
+P.init();return}if("draft"==A.action){var q=R(A.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),"*")}),A.editKey?mxResources.get(A.editKey):null,A.discardKey?mxResources.get(A.discardKey):null,A.ignore?
+mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));try{P.init()}catch(ba){B.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();var u=1==A.enableRecent,J=1==A.enableSearch,G=1==A.enableCustomTemp;P=new NewDialog(this,!1,A.templatesOnly?
+!1:null!=A.callback,mxUtils.bind(this,function(ba,fa,ja,ca){ba=ba||this.emptyDiagramXml;null!=A.callback?B.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:fa,tempUrl:ja,libs:ca,builtIn:!0,message:A}),"*"):(c(ba,D,ba!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,
+J?mxUtils.bind(this,function(ba,fa){this.remoteInvoke("searchDiagrams",[ba,null],null,fa,function(){fa(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,fa,ja){B.postMessage(JSON.stringify({event:"template",docUrl:ba,info:fa,name:ja}),"*")}),null,null,G?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==A.withoutType,null,A.templatesOnly);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&
+this.sidebar.hideTooltip();ba&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==A.action){var H=this.getDiagramTextContent();B.postMessage(JSON.stringify({event:"textContent",data:H,message:A}),"*");return}if("status"==A.action){this.updateStatus(mxUtils.bind(this,function(){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message))}));null!=A.modified&&(this.editor.modified=
+A.modified);return}if("spinner"==A.action){var g=null!=A.messageKey?mxResources.get(A.messageKey):A.message;null==A.show||A.show?this.spinner.spin(document.body,g):this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){if(null!=A.viewport){var p=this.editor.graph,C=p.view.translate.x,I=p.view.translate.y;this.embedViewport=A.viewport;p.refresh();this.diagramContainer.scrollTop-=(I-p.view.translate.y)*p.view.scale;this.diagramContainer.scrollLeft-=
+(C-p.view.translate.x)*p.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==A.action){P=null;try{var M=this.diagramContainer.getAttribute("data-scrollState");null!=M&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(M))}catch(ba){}Editor.inlineFullscreen=A.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
+A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var O=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);p=this.editor.graph;var Q=mxUtils.bind(this,function(ba,fa){if(A.withSvg)A.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(ca){Q(ba,ca)},null,null,A.embedImages,this.editor.graph.background,A.scale,A.border,A.shadow,"auto");else{this.editor.graph.setEnabled(!0);
+this.spinner.stop();var ja=this.createLoadMessage("export");ja.format=A.format;ja.message=A;ja.data=ba;ja.svg=fa;ja.xml=O;B.postMessage(JSON.stringify(ja),"*")}}),U=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==A.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(O)));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);Q(ba)}),V=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=p.getGlobalVariable;p=this.createTemporaryGraph(p.getStylesheet());for(var fa,ja=0;ja<this.pages.length;ja++)if(this.pages[ja].getId()==V){fa=this.updatePageRoot(this.pages[ja]);break}null==fa&&(fa=this.currentPage);p.getGlobalVariable=function(ua){return"page"==ua?fa.getName():"pagenumber"==ua?1:ba.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(fa.root)}if(null!=A.layerIds){var ca=
+p.model,sa=ca.getChildCells(ca.getRoot()),pa={};for(ja=0;ja<A.layerIds.length;ja++)pa[A.layerIds[ja]]=!0;for(ja=0;ja<sa.length;ja++)ca.setVisible(sa[ja],pa[sa[ja].id]||!1)}ja=null;A.keepTheme&&(ja=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(ua){U(ua.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){U(null)}),null,null,A.scale,A.transparent,A.shadow,null,p,A.border,null,A.grid,ja)});null!=A.xml&&0<A.xml.length&&(l=!0,this.setFileData(O),
+l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(O))).send(mxUtils.bind(this,function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?Q("data:image/png;base64,"+ba.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(X=mxUtils.bind(this,
+function(){var ba=this.createLoadMessage("export");ba.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var fa=this.getXmlFileData();ba.xml=mxUtils.getXml(fa);ba.data=this.getFileData(null,null,!0,null,null,null,fa);ba.format=A.format}else if("html"==A.format)fa=this.editor.getGraphXml(),ba.data=this.getHtml(fa,this.editor.graph),ba.xml=mxUtils.getXml(fa),ba.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=null;fa=null!=A.background?
+A.background:this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var ja=mxUtils.bind(this,function(sa){this.editor.graph.setEnabled(!0);this.spinner.stop();ba.data=A.asText?sa:Editor.createSvgDataUri(sa);B.postMessage(JSON.stringify(ba),"*")}),ca="auto";A.keepTheme&&(ca=Editor.isDarkMode()?"dark":"light");null!=A.theme&&(ca=A.theme);if("xmlsvg"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,
+null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){ca=null;if(this.isAutoDarkMode()||Editor.isDarkMode())ca="auto";null!=A.theme&&(ca=A.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,ja,null,null,A.embedImages,fa,A.scale,A.border,A.shadow,ca)}}else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),fa=this.editor.graph.getSvg(fa,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
+A.shadow,null,ca),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(fa),this.embedFonts(fa,mxUtils.bind(this,function(sa){A.embedImages||null==A.embedImages?this.editor.convertImages(sa,mxUtils.bind(this,function(pa){ja(mxUtils.getXml(pa))})):ja(mxUtils.getXml(sa))}));return}B.postMessage(JSON.stringify(ba),"*")}),null!=A.xml&&0<A.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);X()}}l=!0;this.setFileData(A.xml);
+l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==A.action){T=A.toSketch;m=1==A.autosave;this.hideDialog();null!=A.modified&&null==urlParams.modified&&(urlParams.modified=A.modified);null!=A.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=A.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&
+(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=A.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=A.noSaveBtn);if(null!=A.rough){var Y=Editor.sketchMode;this.doSetSketchMode(A.rough);Y!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=A.dark&&this.setDarkMode(A.dark);null!=A.border&&(this.embedExportBorder=A.border);null!=A.theme&&(this.embedExportTheme=A.theme);null!=A.background&&
+(this.embedExportBackground=A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,A.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,A.rect.top)+"px";this.minInlineWidth=A.minWidth;this.minInlineHeight=A.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var aa=A.maxFitScale,
+ha=A.rect.width+2*Z,ea=A.rect.height+2*Z;S=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();ha=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ha):ha,ba.width-80);ba=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,ba.height-80);this.diagramContainer.style.width=ha+"px";this.diagramContainer.style.height=ba+"px";var fa=this.editor.graph;ba=fa.maxFitScale;fa.maxFitScale=aa;fa.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=
+this.minInlineWidth&&fa.getGraphBounds().width<this.minInlineWidth){var ja=fa.container.scrollTop;this.resetScrollbars();fa.container.scrollTop=ja}fa.maxFitScale=ba;fa.container.scrollTop-=Z;fa.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[A]));fa.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=fa.container.style.top);
+var ca=fa.getGraphBounds();fa.container.clientWidth>ca.width+2*Z&&(fa.container.scrollLeft=ca.x+(ca.width+Z-fa.container.clientWidth)/2)}),10)})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&this.setEmbedTitle(A.title);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(ba){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var da=this.getCurrentFile();
+null!=da&&(q=R(A.xml),null!=q&&""!=q&&da.mergeFile(new LocalFile(this,q),function(){B.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(ba){B.postMessage(JSON.stringify({event:"merge",message:A,error:ba}),"*")}))}else"remoteInvokeReady"==A.action?this.handleRemoteInvokeReady(B):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,D.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):B.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),
+"*");return}}catch(ba){this.handleError(ba)}}var ia=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),la=mxUtils.bind(this,function(ba,fa){l=!0;try{c(ba,fa,null,T)}catch(ja){this.handleError(ja)}l=!1;null!=urlParams.modified&&this.clearStatus();t=ia();m&&null==f&&(f=mxUtils.bind(this,function(ja,ca){ja=ia();ja==t||l||(ca=this.createLoadMessage("autosave"),ca.xml=ja,(window.opener||window.parent).postMessage(JSON.stringify(ca),
+"*"));t=ja}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",
+f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)fa=this.createLoadMessage("load"),fa.xml=ba,B.postMessage(JSON.stringify(fa),"*");null!=S&&S()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?(R="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(ba){la(ba,D)},mxUtils.bind(this,function(ba){this.handleError(ba)}),R)):null!=
+A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?la(ba.responseText,D):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=A&&"function"===typeof A.substring&&
+this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(ba){la(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=R(A),la(A,D)):this.loadDescriptor(A,mxUtils.bind(this,function(ba){la(ia(),D)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var B=window.opener||window.parent;v="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
+"ready";B.postMessage(v,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(D,A,S){E.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",href:D,target:A,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,m){var t=document.createElement("button");t.className="geEmbedBtn geBtn";t.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(t,c);m&&t.classList.add("gePrimaryBtn");mxEvent.addListener(t,"click",
f);return t};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==
this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),
mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};
EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new SimpleTextareaDialog(this,Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),mxResources.get("import"),"https://www.drawio.com/blog/insert-from-csv"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,new mxRectangle(0,0,320,280));this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(k){if(0<k.length)try{var m=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(m));this.customLayoutConfig=m;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,m){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var v=m.value;m.value=JSON.stringify(JSON.parse(v));m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));m.value=v}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),m=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;f.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,m)},null,null,null,m)},null,null,null,m)},null,null,null,m):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,m))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var k=c.split("\n"),m=[],t=[],v=[],A={};if(0<k.length){var E={},D=this.editor.graph,B=null,S=null,R=null,T=null,
-P=null,q=null,u=null,J="whiteSpace=wrap;html=1;",G=null,H=null,g="",n="auto",C="auto",I=!1,N=null,O=null,Q=40,U=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=f?f(Na):(D.setSelectionCells(Na),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=D.getFreeInsertPoint(),Z=Y.x,ba=Y.y;Y=ba;var ia=null,ea="auto";H=null;for(var da=[],ja=null,ma=null,aa=0;aa<k.length&&"#"==k[aa].charAt(0);){c=k[aa].replace(/\r$/,
-"");for(aa++;aa<k.length&&"\\"==c.charAt(c.length-1)&&"#"==k[aa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(k[aa].substring(1)),aa++;if("#"!=c.charAt(1)){var fa=c.indexOf(":");if(0<fa){var la=mxUtils.trim(c.substring(1,fa)),ca=mxUtils.trim(c.substring(fa+1));"label"==la?ia=Graph.sanitizeHtml(ca):"labelname"==la&&0<ca.length&&"-"!=ca?P=ca:"labels"==la&&0<ca.length&&"-"!=ca?u=JSON.parse(ca):"style"==la?S=ca:"parentstyle"==la?J=ca:"unknownStyle"==la&&"-"!=ca?q=ca:"stylename"==la&&0<ca.length&&
-"-"!=ca?T=ca:"styles"==la&&0<ca.length&&"-"!=ca?R=JSON.parse(ca):"vars"==la&&0<ca.length&&"-"!=ca?B=JSON.parse(ca):"identity"==la&&0<ca.length&&"-"!=ca?G=ca:"parent"==la&&0<ca.length&&"-"!=ca?H=ca:"namespace"==la&&0<ca.length&&"-"!=ca?g=ca:"width"==la?n=ca:"height"==la?C=ca:"collapsed"==la&&"-"!=ca?I="true"==ca:"left"==la&&0<ca.length?N=ca:"top"==la&&0<ca.length?O=ca:"ignore"==la?ma=ca.split(","):"connect"==la?da.push(JSON.parse(ca)):"link"==la?ja=ca:"padding"==la?X=parseFloat(ca):"edgespacing"==
-la?Q=parseFloat(ca):"nodespacing"==la?U=parseFloat(ca):"levelspacing"==la?V=parseFloat(ca):"layout"==la&&(ea=ca)}}}if(null==k[aa])throw Error(mxResources.get("invalidOrMissingFile"));var va=this.editor.csvToArray(k[aa].replace(/\r$/,""));fa=c=null;la=[];for(ca=0;ca<va.length;ca++)G==va[ca]&&(c=ca),H==va[ca]&&(fa=ca),la.push(mxUtils.trim(va[ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ia&&(ia="%"+la[0]+"%");if(null!=da)for(var sa=0;sa<da.length;sa++)null==E[da[sa].to]&&
-(E[da[sa].to]={});G=[];for(ca=aa+1;ca<k.length;ca++){var wa=this.editor.csvToArray(k[ca].replace(/\r$/,""));if(null==wa){var pa=40<k[ca].length?k[ca].substring(0,40)+"...":k[ca];throw Error(pa+" ("+ca+"):\n"+mxResources.get("containsValidationErrors"));}0<wa.length&&G.push(wa)}D.model.beginUpdate();try{for(ca=0;ca<G.length;ca++){wa=G[ca];var ka=null,na=null!=c?g+wa[c]:null;k=!1;null!=na&&(ka=D.model.getCell(na),k=null==ka||0<=mxUtils.indexOf(m,ka));var xa=new mxCell(ia,new mxGeometry(Z,Y,0,0),S||
-"whiteSpace=wrap;html=1;");xa.collapsed=I;xa.vertex=!0;xa.id=na;null==ka||k||D.model.setCollapsed(ka,I);for(var ta=0;ta<wa.length;ta++)D.setAttributeForCell(xa,la[ta],wa[ta]),null==ka||k||D.setAttributeForCell(ka,la[ta],wa[ta]);if(null!=P&&null!=u){var za=u[xa.getAttribute(P)];null!=za&&(D.labelChanged(xa,za),null==ka||k||D.cellLabelChanged(ka,za))}if(null!=T&&null!=R){var Ca=R[xa.getAttribute(T)];null!=Ca&&(xa.style=Ca)}D.setAttributeForCell(xa,"placeholders","1");xa.style=D.replacePlaceholders(xa,
-xa.style,B);null==ka||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[xa])):(D.model.setStyle(ka,xa.style),0>mxUtils.indexOf(v,ka)&&v.push(ka),D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])));k=null!=ka;ka=xa;if(!k)for(sa=0;sa<da.length;sa++)E[da[sa].to][ka.getAttribute(da[sa].to)]=ka;null!=ja&&"link"!=ja&&(D.setLinkForCell(ka,ka.getAttribute(ja)),D.setAttributeForCell(ka,ja,null));var Ga=this.editor.graph.getPreferredSizeForCell(ka);H=null!=fa?D.model.getCell(g+wa[fa]):null;
-if(ka.vertex){pa=null!=H?0:Z;aa=null!=H?0:ba;null!=N&&null!=ka.getAttribute(N)&&(ka.geometry.x=pa+parseFloat(ka.getAttribute(N)));null!=O&&null!=ka.getAttribute(O)&&(ka.geometry.y=aa+parseFloat(ka.getAttribute(O)));var Aa="@"==n.charAt(0)?ka.getAttribute(n.substring(1)):null;ka.geometry.width=null!=Aa&&"auto"!=Aa?parseFloat(ka.getAttribute(n.substring(1))):"auto"==n||"auto"==Aa?Ga.width+X:parseFloat(n);var Da="@"==C.charAt(0)?ka.getAttribute(C.substring(1)):null;ka.geometry.height=null!=Da&&"auto"!=
-Da&&"width"!=C?parseFloat(Da):"auto"==C||"auto"==Da?Ga.height+X:"width"==C?ka.geometry.width:parseFloat(C);Y+=ka.geometry.height+U}k?(null==A[na]&&(A[na]=[]),A[na].push(ka)):(m.push(ka),null!=H?(H.style=D.replacePlaceholders(H,J,B),D.addCell(ka,H),t.push(H)):v.push(D.addCell(ka)))}for(ca=0;ca<t.length;ca++)Aa="@"==n.charAt(0)?t[ca].getAttribute(n.substring(1)):null,Da="@"==C.charAt(0)?t[ca].getAttribute(C.substring(1)):null,"auto"!=n&&"auto"!=Aa||"auto"!=C&&"auto"!=Da||D.updateGroupBounds([t[ca]],
-X,!0);var Ka=v.slice(),Na=v.slice();for(sa=0;sa<da.length;sa++){var Ba=da[sa];for(ca=0;ca<m.length;ca++){ka=m[ca];var Ia=mxUtils.bind(this,function(Ta,Wa,ha){var ua=Wa.getAttribute(ha.from);if(null!=ua&&""!=ua){ua=ua.split(",");for(var qa=0;qa<ua.length;qa++){var oa=E[ha.to][ua[qa]];if(null==oa&&null!=q){oa=new mxCell(ua[qa],new mxGeometry(Z,ba,0,0),q);oa.style=D.replacePlaceholders(Wa,oa.style,B);var ra=this.editor.graph.getPreferredSizeForCell(oa);oa.geometry.width=ra.width+X;oa.geometry.height=
-ra.height+X;E[ha.to][ua[qa]]=oa;oa.vertex=!0;oa.id=ua[qa];v.push(D.addCell(oa))}if(null!=oa){ra=ha.label;null!=ha.fromlabel&&(ra=(Wa.getAttribute(ha.fromlabel)||"")+(ra||""));null!=ha.sourcelabel&&(ra=D.replacePlaceholders(Wa,ha.sourcelabel,B)+(ra||""));null!=ha.tolabel&&(ra=(ra||"")+(oa.getAttribute(ha.tolabel)||""));null!=ha.targetlabel&&(ra=(ra||"")+D.replacePlaceholders(oa,ha.targetlabel,B));var ya="target"==ha.placeholders==!ha.invert?oa:Ta;ya=null!=ha.style?D.replacePlaceholders(ya,ha.style,
-B):D.createCurrentEdgeStyle();ra=D.insertEdge(null,null,ra||"",ha.invert?oa:Ta,ha.invert?Ta:oa,ya);if(null!=ha.labels)for(ya=0;ya<ha.labels.length;ya++){var Fa=ha.labels[ya],Ja=new mxCell(Fa.label||ya,new mxGeometry(null!=Fa.x?Fa.x:0,null!=Fa.y?Fa.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Fa.placeholders&&(Ja.value=D.replacePlaceholders("target"==Fa.placeholders==!ha.invert?oa:Ta,Ja.value,B));if(null!=Fa.dx||null!=Fa.dy)Ja.geometry.offset=new mxPoint(null!=
-Fa.dx?Fa.dx:0,null!=Fa.dy?Fa.dy:0);ra.insert(Ja)}if(null!=ha.data)for(var Ma in ha.data)D.setAttributeForCell(ra,Ma,ha.data[Ma]);Na.push(ra);mxUtils.remove(ha.invert?Ta:oa,Ka)}}}});Ia(ka,ka,Ba);if(null!=A[ka.id])for(ta=0;ta<A[ka.id].length;ta++)Ia(ka,A[ka.id][ta],Ba)}}if(null!=ma)for(ca=0;ca<m.length;ca++)for(ka=m[ca],ta=0;ta<ma.length;ta++)D.setAttributeForCell(ka,mxUtils.trim(ma[ta]),null);if(0<v.length){var Qa=new mxParallelEdgeLayout(D);Qa.spacing=Q;Qa.checkOverlap=!0;var La=function(){0<Qa.spacing&&
-Qa.execute(D.getDefaultParent());for(var Ta=0;Ta<v.length;Ta++){var Wa=D.getCellGeometry(v[Ta]);Wa.x=Math.round(D.snap(Wa.x));Wa.y=Math.round(D.snap(Wa.y));"auto"==n&&(Wa.width=Math.round(D.snap(Wa.width)));"auto"==C&&(Wa.height=Math.round(D.snap(Wa.height)))}};if("["==ea.charAt(0)){var Ha=W;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ea)),function(){La();Ha()});W=null}else if("circle"==ea){var Sa=new mxCircleLayout(D);Sa.disableEdgeStyle=!1;Sa.resetEdges=!1;var $a=Sa.isVertexIgnored;
-Sa.isVertexIgnored=function(Ta){return $a.apply(this,arguments)||0>mxUtils.indexOf(v,Ta)};this.executeLayout(function(){Sa.execute(D.getDefaultParent());La()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Na.length==2*v.length-1&&1==Ka.length){D.view.validate();var db=new mxCompactTreeLayout(D,"horizontaltree"==ea);db.levelDistance=U;db.edgeRouting=!1;db.resetEdges=!1;db.sortEdges=!0;this.executeLayout(function(){db.execute(D.getDefaultParent(),0<Ka.length?Ka[0]:null)},
-!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==Ka.length){D.view.validate();var fb=new mxHierarchicalLayout(D,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=U;fb.parallelEdgeSpacing=Q;fb.interRankCellSpacing=V;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(D.getDefaultParent(),Na);D.moveCells(Na,Z,ba)},!0,W);W=null}else if("orgchart"==ea){D.view.validate();var Ya=new mxOrgChartLayout(D,2,V,U),eb=Ya.isVertexIgnored;
-Ya.isVertexIgnored=function(Ta){return eb.apply(this,arguments)||0>mxUtils.indexOf(v,Ta)};this.executeLayout(function(){Ya.execute(D.getDefaultParent());La()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Na.length>v.length){D.view.validate();var Xa=new mxFastOrganicLayout(D);Xa.forceConstant=3*U;Xa.disableEdgeStyle=!1;Xa.resetEdges=!1;var jb=Xa.isVertexIgnored;Xa.isVertexIgnored=function(Ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(v,Ta)};this.executeLayout(function(){Xa.execute(D.getDefaultParent());
-La()},!0,W);W=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=W&&W()}}catch(Ta){this.handleError(Ta)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var k="?",m;for(m in urlParams)0>mxUtils.indexOf(c,m)&&null!=urlParams[m]&&(f+=k+m+"="+urlParams[m],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;
-if("1"==urlParams.offline)c+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(k,m)&&(c=0==f?c+"?":c+"&",null!=urlParams[m]&&(c+=m+"="+urlParams[m],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,k,m,t){c=new LinkDialog(this,c,f,k,!0,m,t);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&
+function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var m=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(m));this.customLayoutConfig=m;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(l,m){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var v=m.value;m.value=JSON.stringify(JSON.parse(v));m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));m.value=v}catch(B){this.handleError(B)}}));t.setAttribute("title","copy");t.className="geBtn";l.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
+!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),m=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;f.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,m)},null,null,null,m)},null,null,null,m)},null,null,null,m):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,m))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),m=[],t=[],v=[],B={};if(0<l.length){var E={},D=this.editor.graph,A=null,S=null,R=null,T=null,
+P=null,q=null,u=null,J="whiteSpace=wrap;html=1;",G=null,H=null,g="",p="auto",C="auto",I=!1,M=null,O=null,Q=40,U=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=f?f(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=D.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var ha=null,ea="auto";H=null;for(var da=[],ia=null,la=null,ba=0;ba<l.length&&"#"==l[ba].charAt(0);){c=l[ba].replace(/\r$/,
+"");for(ba++;ba<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[ba].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[ba].substring(1)),ba++;if("#"!=c.charAt(1)){var fa=c.indexOf(":");if(0<fa){var ja=mxUtils.trim(c.substring(1,fa)),ca=mxUtils.trim(c.substring(fa+1));"label"==ja?ha=Graph.sanitizeHtml(ca):"labelname"==ja&&0<ca.length&&"-"!=ca?P=ca:"labels"==ja&&0<ca.length&&"-"!=ca?u=JSON.parse(ca):"style"==ja?S=ca:"parentstyle"==ja?J=ca:"unknownStyle"==ja&&"-"!=ca?q=ca:"stylename"==ja&&0<ca.length&&
+"-"!=ca?T=ca:"styles"==ja&&0<ca.length&&"-"!=ca?R=JSON.parse(ca):"vars"==ja&&0<ca.length&&"-"!=ca?A=JSON.parse(ca):"identity"==ja&&0<ca.length&&"-"!=ca?G=ca:"parent"==ja&&0<ca.length&&"-"!=ca?H=ca:"namespace"==ja&&0<ca.length&&"-"!=ca?g=ca:"width"==ja?p=ca:"height"==ja?C=ca:"collapsed"==ja&&"-"!=ca?I="true"==ca:"left"==ja&&0<ca.length?M=ca:"top"==ja&&0<ca.length?O=ca:"ignore"==ja?la=ca.split(","):"connect"==ja?da.push(JSON.parse(ca)):"link"==ja?ia=ca:"padding"==ja?X=parseFloat(ca):"edgespacing"==
+ja?Q=parseFloat(ca):"nodespacing"==ja?U=parseFloat(ca):"levelspacing"==ja?V=parseFloat(ca):"layout"==ja&&(ea=ca)}}}if(null==l[ba])throw Error(mxResources.get("invalidOrMissingFile"));var sa=this.editor.csvToArray(l[ba].replace(/\r$/,""));fa=c=null;ja=[];for(ca=0;ca<sa.length;ca++)G==sa[ca]&&(c=ca),H==sa[ca]&&(fa=ca),ja.push(mxUtils.trim(sa[ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ha&&(ha="%"+ja[0]+"%");if(null!=da)for(var pa=0;pa<da.length;pa++)null==E[da[pa].to]&&
+(E[da[pa].to]={});G=[];for(ca=ba+1;ca<l.length;ca++){var ua=this.editor.csvToArray(l[ca].replace(/\r$/,""));if(null==ua){var wa=40<l[ca].length?l[ca].substring(0,40)+"...":l[ca];throw Error(wa+" ("+ca+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&G.push(ua)}D.model.beginUpdate();try{for(ca=0;ca<G.length;ca++){ua=G[ca];var ka=null,na=null!=c?g+ua[c]:null;l=!1;null!=na&&(ka=D.model.getCell(na),l=null==ka||0<=mxUtils.indexOf(m,ka));var za=new mxCell(ha,new mxGeometry(Z,Y,0,0),S||
+"whiteSpace=wrap;html=1;");za.collapsed=I;za.vertex=!0;za.id=na;null==ka||l||D.model.setCollapsed(ka,I);for(var ra=0;ra<ua.length;ra++)D.setAttributeForCell(za,ja[ra],ua[ra]),null==ka||l||D.setAttributeForCell(ka,ja[ra],ua[ra]);if(null!=P&&null!=u){var ya=u[za.getAttribute(P)];null!=ya&&(D.labelChanged(za,ya),null==ka||l||D.cellLabelChanged(ka,ya))}if(null!=T&&null!=R){var Ca=R[za.getAttribute(T)];null!=Ca&&(za.style=Ca)}D.setAttributeForCell(za,"placeholders","1");za.style=D.replacePlaceholders(za,
+za.style,A);null==ka||l?D.fireEvent(new mxEventObject("cellsInserted","cells",[za])):(D.model.setStyle(ka,za.style),0>mxUtils.indexOf(v,ka)&&v.push(ka),D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])));l=null!=ka;ka=za;if(!l)for(pa=0;pa<da.length;pa++)E[da[pa].to][ka.getAttribute(da[pa].to)]=ka;null!=ia&&"link"!=ia&&(D.setLinkForCell(ka,ka.getAttribute(ia)),D.setAttributeForCell(ka,ia,null));var Ha=this.editor.graph.getPreferredSizeForCell(ka);H=null!=fa?D.model.getCell(g+ua[fa]):null;
+if(ka.vertex){wa=null!=H?0:Z;ba=null!=H?0:aa;null!=M&&null!=ka.getAttribute(M)&&(ka.geometry.x=wa+parseFloat(ka.getAttribute(M)));null!=O&&null!=ka.getAttribute(O)&&(ka.geometry.y=ba+parseFloat(ka.getAttribute(O)));var Ba="@"==p.charAt(0)?ka.getAttribute(p.substring(1)):null;ka.geometry.width=null!=Ba&&"auto"!=Ba?parseFloat(ka.getAttribute(p.substring(1))):"auto"==p||"auto"==Ba?Ha.width+X:parseFloat(p);var Fa="@"==C.charAt(0)?ka.getAttribute(C.substring(1)):null;ka.geometry.height=null!=Fa&&"auto"!=
+Fa&&"width"!=C?parseFloat(Fa):"auto"==C||"auto"==Fa?Ha.height+X:"width"==C?ka.geometry.width:parseFloat(C);Y+=ka.geometry.height+U}l?(null==B[na]&&(B[na]=[]),B[na].push(ka)):(m.push(ka),null!=H?(H.style=D.replacePlaceholders(H,J,A),D.addCell(ka,H),t.push(H)):v.push(D.addCell(ka)))}for(ca=0;ca<t.length;ca++)Ba="@"==p.charAt(0)?t[ca].getAttribute(p.substring(1)):null,Fa="@"==C.charAt(0)?t[ca].getAttribute(C.substring(1)):null,"auto"!=p&&"auto"!=Ba||"auto"!=C&&"auto"!=Fa||D.updateGroupBounds([t[ca]],
+X,!0);var Pa=v.slice(),Aa=v.slice();for(pa=0;pa<da.length;pa++){var Da=da[pa];for(ca=0;ca<m.length;ca++){ka=m[ca];var Ia=mxUtils.bind(this,function(Sa,db,La){var hb=db.getAttribute(La.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var ob=0;ob<hb.length;ob++){var Ja=E[La.to][hb[ob]];if(null==Ja&&null!=q){Ja=new mxCell(hb[ob],new mxGeometry(Z,aa,0,0),q);Ja.style=D.replacePlaceholders(db,Ja.style,A);var Wa=this.editor.graph.getPreferredSizeForCell(Ja);Ja.geometry.width=Wa.width+X;Ja.geometry.height=
+Wa.height+X;E[La.to][hb[ob]]=Ja;Ja.vertex=!0;Ja.id=hb[ob];v.push(D.addCell(Ja))}if(null!=Ja){Wa=La.label;null!=La.fromlabel&&(Wa=(db.getAttribute(La.fromlabel)||"")+(Wa||""));null!=La.sourcelabel&&(Wa=D.replacePlaceholders(db,La.sourcelabel,A)+(Wa||""));null!=La.tolabel&&(Wa=(Wa||"")+(Ja.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(Wa=(Wa||"")+D.replacePlaceholders(Ja,La.targetlabel,A));var gb="target"==La.placeholders==!La.invert?Ja:Sa;gb=null!=La.style?D.replacePlaceholders(gb,La.style,
+A):D.createCurrentEdgeStyle();Wa=D.insertEdge(null,null,Wa||"",La.invert?Ja:Sa,La.invert?Sa:Ja,gb);if(null!=La.labels)for(gb=0;gb<La.labels.length;gb++){var ab=La.labels[gb],pb=new mxCell(ab.label||gb,new mxGeometry(null!=ab.x?ab.x:0,null!=ab.y?ab.y:0,0,0),"resizable=0;html=1;");pb.vertex=!0;pb.connectable=!1;pb.geometry.relative=!0;null!=ab.placeholders&&(pb.value=D.replacePlaceholders("target"==ab.placeholders==!La.invert?Ja:Sa,pb.value,A));if(null!=ab.dx||null!=ab.dy)pb.geometry.offset=new mxPoint(null!=
+ab.dx?ab.dx:0,null!=ab.dy?ab.dy:0);Wa.insert(pb)}if(null!=La.data)for(var cb in La.data)D.setAttributeForCell(Wa,cb,La.data[cb]);Aa.push(Wa);mxUtils.remove(La.invert?Sa:Ja,Pa)}}}});Ia(ka,ka,Da);if(null!=B[ka.id])for(ra=0;ra<B[ka.id].length;ra++)Ia(ka,B[ka.id][ra],Da)}}if(null!=la)for(ca=0;ca<m.length;ca++)for(ka=m[ca],ra=0;ra<la.length;ra++)D.setAttributeForCell(ka,mxUtils.trim(la[ra]),null);if(0<v.length){var Oa=new mxParallelEdgeLayout(D);Oa.spacing=Q;Oa.checkOverlap=!0;var Ga=function(){0<Oa.spacing&&
+Oa.execute(D.getDefaultParent());for(var Sa=0;Sa<v.length;Sa++){var db=D.getCellGeometry(v[Sa]);db.x=Math.round(D.snap(db.x));db.y=Math.round(D.snap(db.y));"auto"==p&&(db.width=Math.round(D.snap(db.width)));"auto"==C&&(db.height=Math.round(D.snap(db.height)))}};if("["==ea.charAt(0)){var Ka=W;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ea)),function(){Ga();Ka()});W=null}else if("circle"==ea){var Xa=new mxCircleLayout(D);Xa.disableEdgeStyle=!1;Xa.resetEdges=!1;var qb=Xa.isVertexIgnored;
+Xa.isVertexIgnored=function(Sa){return qb.apply(this,arguments)||0>mxUtils.indexOf(v,Sa)};this.executeLayout(function(){Xa.execute(D.getDefaultParent());Ga()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Aa.length==2*v.length-1&&1==Pa.length){D.view.validate();var bb=new mxCompactTreeLayout(D,"horizontaltree"==ea);bb.levelDistance=U;bb.edgeRouting=!1;bb.resetEdges=!1;bb.sortEdges=!0;this.executeLayout(function(){bb.execute(D.getDefaultParent(),0<Pa.length?Pa[0]:null)},
+!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==Pa.length){D.view.validate();var rb=new mxHierarchicalLayout(D,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);rb.intraCellSpacing=U;rb.parallelEdgeSpacing=Q;rb.interRankCellSpacing=V;rb.disableEdgeStyle=!1;this.executeLayout(function(){rb.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Z,aa)},!0,W);W=null}else if("orgchart"==ea){D.view.validate();var Va=new mxOrgChartLayout(D,2,V,U),fb=Va.isVertexIgnored;
+Va.isVertexIgnored=function(Sa){return fb.apply(this,arguments)||0>mxUtils.indexOf(v,Sa)};this.executeLayout(function(){Va.execute(D.getDefaultParent());Ga()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Aa.length>v.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*U;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var jb=$a.isVertexIgnored;$a.isVertexIgnored=function(Sa){return jb.apply(this,arguments)||0>mxUtils.indexOf(v,Sa)};this.executeLayout(function(){$a.execute(D.getDefaultParent());
+Ga()},!0,W);W=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=W&&W()}}catch(Sa){this.handleError(Sa)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",m;for(m in urlParams)0>mxUtils.indexOf(c,m)&&null!=urlParams[m]&&(f+=l+m+"="+urlParams[m],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;
+if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(l,m)&&(c=0==f?c+"?":c+"&",null!=urlParams[m]&&(c+=m+"="+urlParams[m],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,m,t){c=new LinkDialog(this,c,f,l,!0,m,t);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&
"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);
-this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));
+this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));
c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);this.menus.get("edgeShape").setEnabled(c);this.menus.get("edgeStyle").setEnabled(c);
this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=
-0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),k=this.getSelectionState(),m=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&
-t);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("explore").setEnabled(m&&(1==k.edges.length||1==k.vertices.length));this.actions.get("editConnectionPoints").setEnabled(m&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(m&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(m&&k.image&&0<k.cells.length);
-this.actions.get("pageSetup").setEnabled(m);this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&m&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<k.cells.length);this.actions.get("createShape").setEnabled(m);
+0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),m=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&
+t);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("explore").setEnabled(m&&(1==l.edges.length||1==l.vertices.length));this.actions.get("editConnectionPoints").setEnabled(m&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(m&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(m&&l.image&&0<l.cells.length);
+this.actions.get("pageSetup").setEnabled(m);this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&m&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<l.cells.length);this.actions.get("createShape").setEnabled(m);
this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=
this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?
-"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var L=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);L.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,k,m,
-t,v,A,E){var D=c.editor.graph;if("xml"==k)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==k)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(D.getSvg(m,t,v)),"image/svg+xml");else{var B=c.getFileData(!0,null,null,null,null,!0),S=D.getGraphBounds(),R=Math.floor(S.width*t/D.view.scale),T=Math.floor(S.height*t/D.view.scale);if(B.length<=MAX_REQUEST_SIZE&&R*T<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.editor.isExportToCanvas()){var P=
-{globalVars:D.getExportVariables()};E&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(f,k,function(q,u){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(u||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<A?"&dpi="+A:"")+"&bg="+(null!=m?m:"none")+"&w="+R+"&h="+T+"&border="+v+"&xml="+encodeURIComponent(B))})}else"png"==k?c.exportImage(t,null==m||"none"==m,!0,!1,!1,v,!0,!1,null,E,A):c.exportImage(t,
-!1,!0,!1,!1,v,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var m=c;this.currentPage!=this.pages[k]&&(m=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[k]),m.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+m.getIndexableText()+" "}else f=c.getIndexableText();
-this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},k=document.createElement("div");k.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(c));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var v={};try{var A=mxSettings.getCustomLibraries();for(c=0;c<A.length;c++){var E=A[c];if("R"==E.substring(0,1)){var D=JSON.parse(decodeURIComponent(E.substring(1)));v[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(B){t.innerText="";if(0==B.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<
-B.length;S++){var R=B[S];v[R.id]&&(f[R.id]=R);var T=this.addCheckbox(t,R.title,v[R.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?f[P.id]=P:delete f[P.id]})})(R,T)}},mxUtils.bind(this,function(B){t.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));t.appendChild(S)}));k.appendChild(t);k=new CustomDialog(this,
-k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,S;for(S in f)null==v[S]&&(B++,mxUtils.bind(this,function(R){this.remoteInvoke("getFileContent",[R.downloadUrl],null,mxUtils.bind(this,function(T){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,T,R)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));
-for(S in v)f[S]||this.closeLibrary(new RemoteLibrary(this,null,v[S]));0==B&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
-EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):
-k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,k,m,t){var v=!0,A=window.setTimeout(mxUtils.bind(this,function(){v=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(A);v&&m.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(A);v&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:E,error:D});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var k=mxUtils.bind(this,function(B,S){var R={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=S?R.error={errResp:S}:null!=B&&(R.resp=B);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var m=c.funtionName,t=
-this.remoteInvokableFns[m];if(null!=t&&"function"===typeof this[m]){if(t.allowedDomains){for(var v=!1,A=0;A<t.allowedDomains.length;A++)if(f=="https://"+t.allowedDomains[A]){v=!0;break}if(!v){k(null,"Invalid Call: "+m+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(t.isAsync)E.push(function(){k(Array.prototype.slice.apply(arguments))}),E.push(function(B){k(null,B||"Unkown Error")}),this[m].apply(this,E);else{var D=this[m].apply(this,E);k([D])}}else k(null,"Invalid Call: "+
-m+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var m=k.open("database",2);m.onupgradeneeded=function(t){try{var v=m.result;1>t.oldVersion&&v.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(v.createObjectStore("files",{keyPath:"title"}),v.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(A){null!=f&&f(A)}};m.onsuccess=mxUtils.bind(this,function(t){try{var v=m.result;this.database=v;EditorUi.migrateStorageFiles&&(StorageFile.migrate(v),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if((!A||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";
-E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var D=!0,B=!1,S,R=0,T=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){R++;q()}),q=mxUtils.bind(this,function(){try{if(R>=S.length)T();else{var J=S[R];StorageFile.getFileContent(this,J,mxUtils.bind(this,
-function(G){null==G||".scratchpad"==J&&G==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[J]}),"*"):P()}),P)}}catch(G){console.log(G)}}),u=mxUtils.bind(this,function(J){try{this.setDatabaseItem(null,[{title:J.title,size:J.data.length,lastModified:Date.now(),type:J.isLib?"L":"F"},{title:J.title,data:J.data}],P,P,["filesInfo","files"])}catch(G){console.log(G)}});A=mxUtils.bind(this,function(J){try{if(J.source==E.contentWindow){var G=
-{};try{G=JSON.parse(J.data)}catch(H){}"init"==G.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||B||(D?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(S=G.resp[0],D=!1,q()):T():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?u(G.resp[0]):P())}}catch(H){console.log(H)}});window.addEventListener("message",A)}})));c(v);v.onversionchange=
-function(){v.close()}}catch(A){null!=f?f(A):null!=window.console&&console.warn(A)}});m.onerror=f;m.onblocked=function(){}}catch(t){null!=f?f(t):null!=window.console&&console.error(t)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,k,m,t){this.openDatabase(mxUtils.bind(this,function(v){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c],f=[f]);var A=v.transaction(t,"readwrite");A.oncomplete=k;A.onerror=m;for(v=0;v<t.length;v++)A.objectStore(t[v]).put(null!=
-c&&null!=c[v]?{key:c[v],data:f[v]}:f[v])}catch(E){null!=m&&m(E)}}),m)};EditorUi.prototype.removeDatabaseItem=function(c,f,k,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c]);var v=t.transaction(m,"readwrite");v.oncomplete=f;v.onerror=k;for(t=0;t<m.length;t++)v.objectStore(m[t]).delete(c[t])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=function(c,f,k,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";var v=t.transaction([m],
-"readonly").objectStore(m).get(c);v.onsuccess=function(){f(v.result)};v.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var t=m.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),v=[];t.onsuccess=function(A){null==A.target.result?c(v):(v.push(A.target.result.value),A.target.result.continue())};t.onerror=f}catch(A){null!=f&&f(A)}}),f)};EditorUi.prototype.getDatabaseItemKeys=
-function(c,f,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var t=m.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){c(t.result)};t.onerror=f}catch(v){null!=f&&f(v)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
-function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var k=this.getCurrentFile();null!=k?k.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,k){var m=this.getCurrentFile();null!=m?m.addComment(c,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=
-c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var k=this.getCurrentFile();return null!=k?k.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=
-function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,k,m,t,v,A,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(c,f,k,m,t,v,A,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,k,m,t,v,A,E,D,B,S,R,T,P,q,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,k,m,t,v,A,E,D,B,S,R,T,P,q,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(c,f,k,m)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,k,m)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,k,m,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,k,m,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),m=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<m.length){var t=
-"<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(t||m)&&c.push(k)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,l,p,d,x,z){function y(){for(var u=E.getElementsByTagName("div"),J=0,G=0;G<u.length;G++)"none"!=u[G].style.display&&u[G].parentNode==E&&J++;D.style.display=0==J?"block":"none"}function F(u,J,G,H){function g(){J.removeChild(I);J.removeChild(N);C.style.display="block";n.style.display="block"}t={div:J,comment:u,saveCallback:G,deleteOnCancel:H};var n=J.querySelector(".geCommentTxt"),C=J.querySelector(".geCommentActionsList"),I=document.createElement("textarea");I.className=
-"geCommentEditTxtArea";I.style.minHeight=n.offsetHeight+"px";I.value=u.content;J.insertBefore(I,n);var N=document.createElement("div");N.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){H?(J.parentNode.removeChild(J),y()):g();t=null});O.className="geCommentEditBtn";N.appendChild(O);var Q=mxUtils.button(mxResources.get("save"),function(){n.innerText="";u.content=I.value;mxUtils.write(n,u.content);g();G(u);t=null});mxEvent.addListener(I,"keydown",mxUtils.bind(this,
-function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(Q.click(),mxEvent.consume(U)):27==U.keyCode&&(O.click(),mxEvent.consume(U)))}));Q.focus();Q.className="geCommentEditBtn gePrimaryBtn";N.appendChild(Q);J.insertBefore(N,n);C.style.display="none";n.style.display="none";I.focus()}function M(u,J){J.innerText="";u=new Date(u.modifiedDate);var G=b.timeSince(u);null==G&&(G=mxResources.get("lessThanAMinute"));mxUtils.write(J,mxResources.get("timeAgo",
-[G],"{1} ago"));J.setAttribute("title",u.toLocaleDateString()+" "+u.toLocaleTimeString())}function K(u){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";u.appendChild(J);u.busyImg=J}function L(u){u.style.border="1px solid red";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function c(u){u.style.border="";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function f(u,J,G,H,g){function n(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
-var ba=document.createElement("a");ba.className="geCommentActionLnk";mxUtils.write(ba,X);Z.appendChild(ba);mxEvent.addListener(ba,"click",function(ia){W(ia,u);ia.preventDefault();mxEvent.consume(ia)});V.appendChild(Z);Y&&(Z.style.display="none")}function C(){function X(Z){W.push(Y);if(null!=Z.replies)for(var ba=0;ba<Z.replies.length;ba++)Y=Y.nextSibling,X(Z.replies[ba])}var W=[],Y=N;X(u);return{pdiv:Y,replies:W}}function I(X,W,Y,Z,ba){function ia(){K(ma);u.addReply(ja,function(aa){ja.id=aa;u.replies.push(ja);
-c(ma);Y&&Y()},function(aa){ea();L(ma);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,ba)}function ea(){F(ja,ma,function(aa){ia()},!0)}var da=C().pdiv,ja=b.newComment(X,b.getCurrentUser());ja.pCommentId=u.id;null==u.replies&&(u.replies=[]);var ma=f(ja,u.replies,da,H+1);W?ea():ia()}if(g||!u.isResolved){D.style.display="none";var N=document.createElement("div");N.className="geCommentContainer";N.setAttribute("data-commentId",u.id);N.style.marginLeft=20*H+
+"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var L=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);L.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,m,
+t,v,B,E){var D=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(D.getSvg(m,t,v)),"image/svg+xml");else{var A=c.getFileData(!0,null,null,null,null,!0),S=D.getGraphBounds(),R=Math.floor(S.width*t/D.view.scale),T=Math.floor(S.height*t/D.view.scale);if(A.length<=MAX_REQUEST_SIZE&&R*T<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.editor.isExportToCanvas()){var P=
+{globalVars:D.getExportVariables()};E&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(f,l,function(q,u){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(u||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<B?"&dpi="+B:"")+"&bg="+(null!=m?m:"none")+"&w="+R+"&h="+T+"&border="+v+"&xml="+encodeURIComponent(A))})}else"png"==l?c.exportImage(t,null==m||"none"==m,!0,!1,!1,v,!0,!1,null,E,B):c.exportImage(t,
+!1,!0,!1,!1,v,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var m=c;this.currentPage!=this.pages[l]&&(m=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),m.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+m.getIndexableText()+" "}else f=c.getIndexableText();
+this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(c));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(m);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
+IMAGE_PATH+'/spin.gif"></div>';var v={};try{var B=mxSettings.getCustomLibraries();for(c=0;c<B.length;c++){var E=B[c];if("R"==E.substring(0,1)){var D=JSON.parse(decodeURIComponent(E.substring(1)));v[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(A){t.innerText="";if(0==A.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<
+A.length;S++){var R=A[S];v[R.id]&&(f[R.id]=R);var T=this.addCheckbox(t,R.title,v[R.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?f[P.id]=P:delete f[P.id]})})(R,T)}},mxUtils.bind(this,function(A){t.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));t.appendChild(S)}));l.appendChild(t);l=new CustomDialog(this,
+l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,S;for(S in f)null==v[S]&&(A++,mxUtils.bind(this,function(R){this.remoteInvoke("getFileContent",[R.downloadUrl],null,mxUtils.bind(this,function(T){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,T,R)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));
+for(S in v)f[S]||this.closeLibrary(new RemoteLibrary(this,null,v[S]));0==A&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
+EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):
+l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,m,t){var v=!0,B=window.setTimeout(mxUtils.bind(this,function(){v=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(B);v&&m.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(B);v&&t.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:E,error:D});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(A,S){var R={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=S?R.error={errResp:S}:null!=A&&(R.resp=A);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var m=c.funtionName,t=
+this.remoteInvokableFns[m];if(null!=t&&"function"===typeof this[m]){if(t.allowedDomains){for(var v=!1,B=0;B<t.allowedDomains.length;B++)if(f=="https://"+t.allowedDomains[B]){v=!0;break}if(!v){l(null,"Invalid Call: "+m+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(t.isAsync)E.push(function(){l(Array.prototype.slice.apply(arguments))}),E.push(function(A){l(null,A||"Unkown Error")}),this[m].apply(this,E);else{var D=this[m].apply(this,E);l([D])}}else l(null,"Invalid Call: "+
+m+" is not found.")}catch(A){l(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var m=l.open("database",2);m.onupgradeneeded=function(t){try{var v=m.result;1>t.oldVersion&&v.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(v.createObjectStore("files",{keyPath:"title"}),v.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
+isLocalStorage)}catch(B){null!=f&&f(B)}};m.onsuccess=mxUtils.bind(this,function(t){try{var v=m.result;this.database=v;EditorUi.migrateStorageFiles&&(StorageFile.migrate(v),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(B){if((!B||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";
+E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var D=!0,A=!1,S,R=0,T=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){R++;q()}),q=mxUtils.bind(this,function(){try{if(R>=S.length)T();else{var J=S[R];StorageFile.getFileContent(this,J,mxUtils.bind(this,
+function(G){null==G||".scratchpad"==J&&G==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[J]}),"*"):P()}),P)}}catch(G){console.log(G)}}),u=mxUtils.bind(this,function(J){try{this.setDatabaseItem(null,[{title:J.title,size:J.data.length,lastModified:Date.now(),type:J.isLib?"L":"F"},{title:J.title,data:J.data}],P,P,["filesInfo","files"])}catch(G){console.log(G)}});B=mxUtils.bind(this,function(J){try{if(J.source==E.contentWindow){var G=
+{};try{G=JSON.parse(J.data)}catch(H){}"init"==G.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||A||(D?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(S=G.resp[0],D=!1,q()):T():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?u(G.resp[0]):P())}}catch(H){console.log(H)}});window.addEventListener("message",B)}})));c(v);v.onversionchange=
+function(){v.close()}}catch(B){null!=f?f(B):null!=window.console&&console.warn(B)}});m.onerror=f;m.onblocked=function(){}}catch(t){null!=f?f(t):null!=window.console&&console.error(t)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,m,t){this.openDatabase(mxUtils.bind(this,function(v){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c],f=[f]);var B=v.transaction(t,"readwrite");B.oncomplete=l;B.onerror=m;for(v=0;v<t.length;v++)B.objectStore(t[v]).put(null!=
+c&&null!=c[v]?{key:c[v],data:f[v]}:f[v])}catch(E){null!=m&&m(E)}}),m)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c]);var v=t.transaction(m,"readwrite");v.oncomplete=f;v.onerror=l;for(t=0;t<m.length;t++)v.objectStore(m[t]).delete(c[t])}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";var v=t.transaction([m],
+"readonly").objectStore(m).get(c);v.onsuccess=function(){f(v.result)};v.onerror=l}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(m){try{l=l||"objects";var t=m.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),v=[];t.onsuccess=function(B){null==B.target.result?c(v):(v.push(B.target.result.value),B.target.result.continue())};t.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.getDatabaseItemKeys=
+function(c,f,l){this.openDatabase(mxUtils.bind(this,function(m){try{l=l||"objects";var t=m.transaction([l],"readonly").objectStore(l).getAllKeys();t.onsuccess=function(){c(t.result)};t.onerror=f}catch(v){null!=f&&f(v)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=
+function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var l=this.getCurrentFile();null!=l?l.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,l){var m=this.getCurrentFile();null!=m?m.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=
+c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=
+function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,m,t,v,B,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(c,f,l,m,t,v,B,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,m,t,v,B,E,D,A,S,R,T,P,q,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.convertImages(c,f,l,m)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,m)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,m,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,m,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),m=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<m.length){var t=
+"<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(t||m)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,k,n,d,x,z){function y(){for(var u=E.getElementsByTagName("div"),J=0,G=0;G<u.length;G++)"none"!=u[G].style.display&&u[G].parentNode==E&&J++;D.style.display=0==J?"block":"none"}function F(u,J,G,H){function g(){J.removeChild(I);J.removeChild(M);C.style.display="block";p.style.display="block"}t={div:J,comment:u,saveCallback:G,deleteOnCancel:H};var p=J.querySelector(".geCommentTxt"),C=J.querySelector(".geCommentActionsList"),I=document.createElement("textarea");I.className=
+"geCommentEditTxtArea";I.style.minHeight=p.offsetHeight+"px";I.value=u.content;J.insertBefore(I,p);var M=document.createElement("div");M.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){H?(J.parentNode.removeChild(J),y()):g();t=null});O.className="geCommentEditBtn";M.appendChild(O);var Q=mxUtils.button(mxResources.get("save"),function(){p.innerText="";u.content=I.value;mxUtils.write(p,u.content);g();G(u);t=null});mxEvent.addListener(I,"keydown",mxUtils.bind(this,
+function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(Q.click(),mxEvent.consume(U)):27==U.keyCode&&(O.click(),mxEvent.consume(U)))}));Q.focus();Q.className="geCommentEditBtn gePrimaryBtn";M.appendChild(Q);J.insertBefore(M,p);C.style.display="none";p.style.display="none";I.focus()}function N(u,J){J.innerText="";u=new Date(u.modifiedDate);var G=b.timeSince(u);null==G&&(G=mxResources.get("lessThanAMinute"));mxUtils.write(J,mxResources.get("timeAgo",
+[G],"{1} ago"));J.setAttribute("title",u.toLocaleDateString()+" "+u.toLocaleTimeString())}function K(u){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";u.appendChild(J);u.busyImg=J}function L(u){u.style.border="1px solid red";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function c(u){u.style.border="";u.busyImg.parentNode==u&&u.removeChild(u.busyImg)}function f(u,J,G,H,g){function p(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";
+var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(ha){W(ha,u);ha.preventDefault();mxEvent.consume(ha)});V.appendChild(Z);Y&&(Z.style.display="none")}function C(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=M;X(u);return{pdiv:Y,replies:W}}function I(X,W,Y,Z,aa){function ha(){K(la);u.addReply(ia,function(ba){ia.id=ba;u.replies.push(ia);
+c(la);Y&&Y()},function(ba){ea();L(la);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){F(ia,la,function(ba){ha()},!0)}var da=C().pdiv,ia=b.newComment(X,b.getCurrentUser());ia.pCommentId=u.id;null==u.replies&&(u.replies=[]);var la=f(ia,u.replies,da,H+1);W?ea():ha()}if(g||!u.isResolved){D.style.display="none";var M=document.createElement("div");M.className="geCommentContainer";M.setAttribute("data-commentId",u.id);M.style.marginLeft=20*H+
5+"px";u.isResolved&&(v.style.opacity="0.7");var O=document.createElement("div");O.className="geCommentHeader";var Q=document.createElement("img");Q.className="geCommentUserImg";Q.src=null!=u.user&&null!=u.user.pictureUrl?u.user.pictureUrl:Editor.userImage;O.appendChild(Q);Q=document.createElement("div");Q.className="geCommentHeaderTxt";O.appendChild(Q);var U=document.createElement("div");U.className="geCommentUsername";mxUtils.write(U,null!=u.user?u.user.displayName:mxResources.get("unknownUser"));
-Q.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",u.id);M(u,U);Q.appendChild(U);N.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,u.content||"");N.appendChild(O);u.isLocked&&(N.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);k||u.isLocked||0!=H&&!m||n(mxResources.get("reply"),
-function(){I("",!0)},u.isResolved);Q=b.getCurrentUser();null==Q||null==u.user||Q.id!=u.user.id||k||u.isLocked||(n(mxResources.get("edit"),function(){function X(){F(u,N,function(){K(N);u.editComment(u.content,function(){c(N)},function(W){L(N);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},u.isResolved),n(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(N);u.deleteComment(function(X){if(!0===X){X=N.querySelector(".geCommentTxt");
-X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=N.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);c(N);N.style.opacity="0.5"}else{W=C(u).replies;for(X=0;X<W.length;X++)E.removeChild(W[X]);for(X=0;X<J.length;X++)if(J[X]==u){J.splice(X,1);break}D.style.display=0==E.getElementsByTagName("div").length?"block":"none"}},function(X){L(N);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},u.isResolved));
-k||u.isLocked||0!=H||n(u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";u.isResolved=!u.isResolved;mxUtils.write(Y,u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=u.isResolved?"none":"",ba=C(u).replies,ia="light-dark("+(u.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<ba.length;ea++){ba[ea].style.backgroundColor=ia;for(var da=ba[ea].querySelectorAll(".geCommentAction"),ja=0;ja<da.length;ja++)da[ja]!=
-Y.parentNode&&(da[ja].style.display=Z);T||(ba[ea].style.display="none")}y()}u.isResolved?I(mxResources.get("reOpened")+": ",!0,W,!1,!0):I(mxResources.get("markedAsResolved"),!1,W,!0)});N.appendChild(O);null!=G?E.insertBefore(N,G.nextSibling):E.appendChild(N);for(G=0;null!=u.replies&&G<u.replies.length;G++)O=u.replies[G],O.isResolved=u.isResolved,f(O,u.replies,null,H+1,g);null!=t&&(t.comment.id==u.id?(g=u.content,u.content=t.comment.content,F(u,N,t.saveCallback,t.deleteOnCancel),u.content=g):null==
-t.comment.id&&t.comment.pCommentId==u.id&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return N}}var k=!b.canComment(),m=b.canReplyToReplies(),t=null,v=document.createElement("div");v.className="geCommentsWin";var A=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.bottom=parseInt(A)+7+"px";v.appendChild(E);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,
-mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=A;B.style.padding="3px 4px 4px 4px";A=document.createElement("a");A.className="geButton";if(!k){var S=A.cloneNode();S.style.backgroundImage="url("+Editor.plusImage+")";S.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(S,"click",function(u){function J(){F(G,H,function(g){K(H);b.addComment(g,function(n){g.id=n;P.push(g);c(H)},function(n){L(H);
-J();b.handleError(n,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),H=f(G,P,null,0);J();u.preventDefault();mxEvent.consume(u)});B.appendChild(S)}var R=A.cloneNode();R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(R,"click",function(u){(T=!T)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");q();u.preventDefault();mxEvent.consume(u)});
-B.appendChild(R);b.commentsRefreshNeeded()&&(S=A.cloneNode(),S.style.backgroundImage="url("+Editor.refreshImage+")",S.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(S,"click",function(u){q();u.preventDefault();mxEvent.consume(u)}),B.appendChild(S));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,
-"click",function(u){z();u.preventDefault();mxEvent.consume(u)}),B.appendChild(A));v.appendChild(B);var P=[],q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var u=t.div.querySelector(".geCommentEditTxtArea"),J=t.div.querySelector(".geCommentEditBtns");t.comment.content=u.value;u.parentNode.removeChild(u);J.parentNode.removeChild(J)}catch(G){b.handleError(G)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function H(g){if(null!=g){g.sort(function(C,I){return new Date(C.modifiedDate)-new Date(I.modifiedDate)});for(var n=0;n<g.length;n++)H(g[n].replies)}}G.sort(function(g,n){return new Date(g.modifiedDate)-new Date(n.modifiedDate)});E.innerText="";E.appendChild(D);D.style.display="block";P=G;for(G=0;G<P.length;G++)H(P[G].replies),f(P[G],P,null,0,T);null!=t&&null==t.comment.id&&
-null==t.comment.pCommentId&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(G){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});q();this.refreshComments=q;B=mxUtils.bind(this,function(){function u(n){var C=G[n.id];if(null!=C)for(M(n,C),C=0;null!=n.replies&&C<n.replies.length;C++)u(n.replies[C])}if(this.window.isVisible()){for(var J=
-E.querySelectorAll(".geCommentDate"),G={},H=0;H<J.length;H++){var g=J[H];G[g.getAttribute("data-commentId")]=g}for(H=0;H<P.length;H++)u(P[H])}});setInterval(B,6E4);this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),v,l,p,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
-function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,l,p,d,x,z,y,F,M,K,L){var c=document.createElement("div");c.style.textAlign="center";L=null!=L?L:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=L+"px";f.style.lineHeight="1.2em";mxUtils.write(f,l);c.appendChild(f);null!=K&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",l=document.createElement("img"),l.setAttribute("src",K),f.appendChild(l),
-c.appendChild(f));K=document.createElement("div");K.style.textAlign="center";K.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");z=mxUtils.button(z||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(k.checked)});z.className="geBtn";null!=F&&(z.innerHTML=F+"<br>"+z.innerHTML,z.style.display="inline-block",z.style.paddingBottom="8px",z.style.paddingTop="8px",z.style.height="auto",z.style.width="40%");b.editor.cancelFirst&&K.appendChild(z);
-var m=mxUtils.button(x||mxResources.get("ok"),function(){b.hideDialog();null!=p&&p(k.checked)});K.appendChild(m);null!=y?(m.innerHTML=y+"<br>"+m.innerHTML+"<br>",m.style.display="inline-block",m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.className="geBtn",m.style.width="40%"):m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(z);c.appendChild(K);M?(K.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.style.marginBottom=
-"0px",f.appendChild(k),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),f.appendChild(x),c.appendChild(f),mxEvent.addListener(x,"click",function(t){k.checked=!k.checked;mxEvent.consume(t)})):K.style.marginTop="12px";this.init=function(){m.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
+Q.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",u.id);N(u,U);Q.appendChild(U);M.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,u.content||"");M.appendChild(O);u.isLocked&&(M.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);l||u.isLocked||0!=H&&!m||p(mxResources.get("reply"),
+function(){I("",!0)},u.isResolved);Q=b.getCurrentUser();null==Q||null==u.user||Q.id!=u.user.id||l||u.isLocked||(p(mxResources.get("edit"),function(){function X(){F(u,M,function(){K(M);u.editComment(u.content,function(){c(M)},function(W){L(M);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},u.isResolved),p(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(M);u.deleteComment(function(X){if(!0===X){X=M.querySelector(".geCommentTxt");
+X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=M.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);c(M);M.style.opacity="0.5"}else{W=C(u).replies;for(X=0;X<W.length;X++)E.removeChild(W[X]);for(X=0;X<J.length;X++)if(J[X]==u){J.splice(X,1);break}D.style.display=0==E.getElementsByTagName("div").length?"block":"none"}},function(X){L(M);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},u.isResolved));
+l||u.isLocked||0!=H||p(u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";u.isResolved=!u.isResolved;mxUtils.write(Y,u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=u.isResolved?"none":"",aa=C(u).replies,ha="light-dark("+(u.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=ha;for(var da=aa[ea].querySelectorAll(".geCommentAction"),ia=0;ia<da.length;ia++)da[ia]!=
+Y.parentNode&&(da[ia].style.display=Z);T||(aa[ea].style.display="none")}y()}u.isResolved?I(mxResources.get("reOpened")+": ",!0,W,!1,!0):I(mxResources.get("markedAsResolved"),!1,W,!0)});M.appendChild(O);null!=G?E.insertBefore(M,G.nextSibling):E.appendChild(M);for(G=0;null!=u.replies&&G<u.replies.length;G++)O=u.replies[G],O.isResolved=u.isResolved,f(O,u.replies,null,H+1,g);null!=t&&(t.comment.id==u.id?(g=u.content,u.content=t.comment.content,F(u,M,t.saveCallback,t.deleteOnCancel),u.content=g):null==
+t.comment.id&&t.comment.pCommentId==u.id&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return M}}var l=!b.canComment(),m=b.canReplyToReplies(),t=null,v=document.createElement("div");v.className="geCommentsWin";var B=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.bottom=parseInt(B)+7+"px";v.appendChild(E);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,
+mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=B;A.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var S=B.cloneNode();S.style.backgroundImage="url("+Editor.plusImage+")";S.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(S,"click",function(u){function J(){F(G,H,function(g){K(H);b.addComment(g,function(p){g.id=p;P.push(g);c(H)},function(p){L(H);
+J();b.handleError(p,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),H=f(G,P,null,0);J();u.preventDefault();mxEvent.consume(u)});A.appendChild(S)}var R=B.cloneNode();R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(R,"click",function(u){(T=!T)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");q();u.preventDefault();mxEvent.consume(u)});
+A.appendChild(R);b.commentsRefreshNeeded()&&(S=B.cloneNode(),S.style.backgroundImage="url("+Editor.refreshImage+")",S.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(S,"click",function(u){q();u.preventDefault();mxEvent.consume(u)}),A.appendChild(S));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geButton geAdaptiveAsset",mxEvent.addListener(B,
+"click",function(u){z();u.preventDefault();mxEvent.consume(u)}),A.appendChild(B));v.appendChild(A);var P=[],q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var u=t.div.querySelector(".geCommentEditTxtArea"),J=t.div.querySelector(".geCommentEditBtns");t.comment.content=u.value;u.parentNode.removeChild(u);J.parentNode.removeChild(J)}catch(G){b.handleError(G)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function H(g){if(null!=g){g.sort(function(C,I){return new Date(C.modifiedDate)-new Date(I.modifiedDate)});for(var p=0;p<g.length;p++)H(g[p].replies)}}G.sort(function(g,p){return new Date(g.modifiedDate)-new Date(p.modifiedDate)});E.innerText="";E.appendChild(D);D.style.display="block";P=G;for(G=0;G<P.length;G++)H(P[G].replies),f(P[G],P,null,0,T);null!=t&&null==t.comment.id&&
+null==t.comment.pCommentId&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(G){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});q();this.refreshComments=q;A=mxUtils.bind(this,function(){function u(p){var C=G[p.id];if(null!=C)for(N(p,C),C=0;null!=p.replies&&C<p.replies.length;C++)u(p.replies[C])}if(this.window.isVisible()){for(var J=
+E.querySelectorAll(".geCommentDate"),G={},H=0;H<J.length;H++){var g=J[H];G[g.getAttribute("data-commentId")]=g}for(H=0;H<P.length;H++)u(P[H])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),v,k,n,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
+function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,k,n,d,x,z,y,F,N,K,L){var c=document.createElement("div");c.style.textAlign="center";L=null!=L?L:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=L+"px";f.style.lineHeight="1.2em";mxUtils.write(f,k);c.appendChild(f);null!=K&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",k=document.createElement("img"),k.setAttribute("src",K),f.appendChild(k),
+c.appendChild(f));K=document.createElement("div");K.style.textAlign="center";K.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");z=mxUtils.button(z||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(l.checked)});z.className="geBtn";null!=F&&(z.innerHTML=F+"<br>"+z.innerHTML,z.style.display="inline-block",z.style.paddingBottom="8px",z.style.paddingTop="8px",z.style.height="auto",z.style.width="40%");b.editor.cancelFirst&&K.appendChild(z);
+var m=mxUtils.button(x||mxResources.get("ok"),function(){b.hideDialog();null!=n&&n(l.checked)});K.appendChild(m);null!=y?(m.innerHTML=y+"<br>"+m.innerHTML+"<br>",m.style.display="inline-block",m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.className="geBtn",m.style.width="40%"):m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(z);c.appendChild(K);N?(K.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.style.marginBottom=
+"0px",f.appendChild(l),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),f.appendChild(x),c.appendChild(f),mxEvent.addListener(x,"click",function(t){l.checked=!l.checked;mxEvent.consume(t)})):K.style.marginTop="12px";this.init=function(){m.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
-EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,l,p,d,x){if(null!=l)for(var z=0;z<l.length;z++)null!=l[z]&&(b=this.patchPages(b,l[z],p,d,x));return b};
-EditorUi.prototype.patchPages=function(b,l,p,d,x){var z={},y=[],F={},M={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var c in d[EditorUi.DIFF_UPDATE])z[c]=d[EditorUi.DIFF_UPDATE][c];if(null!=l[EditorUi.DIFF_REMOVE])for(d=0;d<l[EditorUi.DIFF_REMOVE].length;d++)M[l[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=l[EditorUi.DIFF_INSERT])for(d=0;d<l[EditorUi.DIFF_INSERT].length;d++)F[l[EditorUi.DIFF_INSERT][d].previous]=l[EditorUi.DIFF_INSERT][d];if(null!=l[EditorUi.DIFF_UPDATE])for(c in l[EditorUi.DIFF_UPDATE])d=
-l[EditorUi.DIFF_UPDATE][c],null!=d.previous&&(L[d.previous]=c);if(null!=b){var f="";for(d=0;d<b.length;d++){var k=b[d].getId();K[k]=b[d];null!=L[f]||M[k]||null!=l[EditorUi.DIFF_UPDATE]&&null!=l[EditorUi.DIFF_UPDATE][k]&&null!=l[EditorUi.DIFF_UPDATE][k].previous||(L[f]=k);f=k}}var m={},t=mxUtils.bind(this,function(A){var E=null!=A?A.getId():"";if(null!=A&&!m[E]){m[E]=!0;y.push(A);var D=null!=l[EditorUi.DIFF_UPDATE]?l[EditorUi.DIFF_UPDATE][E]:null;null!=D&&(this.updatePageRoot(A),null!=D.name&&A.setName(D.name),
-null!=D.view&&this.patchViewState(A,D.view),null!=D.cells&&this.patchPage(A,D.cells,z[A.getId()],x),!p||null==D.cells&&null==D.view||(A.needsUpdate=!0))}A=L[E];null!=A&&(delete L[E],t(K[A]));A=F[E];null!=A&&(delete F[E],v(A))}),v=mxUtils.bind(this,function(A){A=mxUtils.parseXml(A.data).documentElement;A=new DiagramPage(A);this.updatePageRoot(A);var E=K[A.getId()];null==E?t(A):(this.patchPage(E,this.diffPages([E],[A]),z[E.getId()],x),p&&(E.needsUpdate=!0))});t();for(c in L)t(K[L[c]]),delete L[c];for(c in F)v(F[c]),
-delete F[c];return y};EditorUi.prototype.patchViewState=function(b,l){if(null!=b.viewState&&null!=l){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var p in l)try{this.patchViewStateProperty(b,l,p)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,l,p){b.viewState[p]=JSON.parse(l[p])};
-EditorUi.prototype.createParentLookup=function(b,l){function p(K){var L=d[K];null==L&&(L={inserted:[],moved:{}},d[K]=L);return L}var d={};if(null!=l[EditorUi.DIFF_INSERT])for(var x=0;x<l[EditorUi.DIFF_INSERT].length;x++){var z=l[EditorUi.DIFF_INSERT][x],y=null!=z.parent?z.parent:"",F=null!=z.previous?z.previous:"";p(y).inserted[F]=z}if(null!=l[EditorUi.DIFF_UPDATE])for(var M in l[EditorUi.DIFF_UPDATE])z=l[EditorUi.DIFF_UPDATE][M],null!=z.previous&&(y=z.parent,null==y&&(x=b.getCell(M),null!=x&&(x=
-b.getParent(x),null!=x&&(y=x.getId()))),null!=y&&(p(y).moved[z.previous]=M));return d};
-EditorUi.prototype.patchPage=function(b,l,p,d){var x=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),z=this.createParentLookup(x,l);x.beginUpdate();try{var y=x.updateEdgeParent,F=new mxDictionary,M=[];x.updateEdgeParent=function(v,A){!F.get(v)&&d&&(F.put(v,!0),M.push(v))};var K=z[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,c=null;null!=L&&(c=this.getCellForJson(L));if(null==c){var f=null!=K&&null!=K.moved?K.moved[""]:null;null!=f&&(c=x.getCell(f))}null!=c&&(x.setRoot(c),
-b.root=c,EditorUi.debug("EditorUi.patchPage: Root changed",c.id));this.patchCellRecursive(b,x,x.root,z,l);if(null!=l[EditorUi.DIFF_REMOVE])for(var k=0;k<l[EditorUi.DIFF_REMOVE].length;k++){f=l[EditorUi.DIFF_REMOVE][k];var m=x.getCell(f);null!=m&&x.remove(m)}if(null!=l[EditorUi.DIFF_UPDATE]){var t=null!=p&&null!=p.cells?p.cells[EditorUi.DIFF_UPDATE]:null;for(f in l[EditorUi.DIFF_UPDATE])m=x.getCell(f),null!=m?this.patchCell(x,m,l[EditorUi.DIFF_UPDATE][f],null!=t?t[f]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
-f,"diff",[l[EditorUi.DIFF_UPDATE][f]])}if(null!=l[EditorUi.DIFF_INSERT])for(k=0;k<l[EditorUi.DIFF_INSERT].length;k++)L=l[EditorUi.DIFF_INSERT][k],m=x.getCell(L.id),null!=m&&(x.setTerminal(m,x.getCell(L.source),!0),x.setTerminal(m,x.getCell(L.target),!1));x.updateEdgeParent=y;if(d&&0<M.length)for(k=0;k<M.length;k++)x.contains(M[k])&&x.updateEdgeParent(M[k])}finally{x.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,l,p,d,x){if(null!=p){var z=d[p.getId()],y=null!=z&&null!=z.inserted?z.inserted:{};z=null!=z&&null!=z.moved?z.moved:{};for(var F=0,M=l.getChildCount(p),K="",L=0;L<M;L++){var c=l.getChildAt(p,L).getId();null==z[K]&&(null==x[EditorUi.DIFF_UPDATE]||null==x[EditorUi.DIFF_UPDATE][c]||null==x[EditorUi.DIFF_UPDATE][c].previous&&null==x[EditorUi.DIFF_UPDATE][c].parent)&&(z[K]=c);K=c}M=mxUtils.bind(this,function(f,k){var m=null!=f?f.getId():"";null==m&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",f);null!=f&&k&&(k=l.getCell(m),null!=k&&k!=f&&(f=null));null!=f&&(l.getChildAt(p,F)!=f&&l.add(p,f,F),this.patchCellRecursive(b,l,f,d,x),F++);return m});for(K=[null];0<K.length;)if(L=K.shift(),L=M(null!=L?L.child:null,null!=L?L.insert:!1),c=z[L],null!=c&&(delete z[L],K.push({child:l.getCell(c)})),c=y[L],null!=c&&(delete y[L],K.push({child:this.getCellForJson(c),insert:!0})),0==K.length){for(L in z)K.push({child:l.getCell(z[L])}),delete z[L];for(L in y)K.push({child:this.getCellForJson(y[L]),
+EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,k,n,d,x){if(null!=k)for(var z=0;z<k.length;z++)null!=k[z]&&(b=this.patchPages(b,k[z],n,d,x));return b};
+EditorUi.prototype.patchPages=function(b,k,n,d,x){var z={},y=[],F={},N={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var c in d[EditorUi.DIFF_UPDATE])z[c]=d[EditorUi.DIFF_UPDATE][c];if(null!=k[EditorUi.DIFF_REMOVE])for(d=0;d<k[EditorUi.DIFF_REMOVE].length;d++)N[k[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=k[EditorUi.DIFF_INSERT])for(d=0;d<k[EditorUi.DIFF_INSERT].length;d++)F[k[EditorUi.DIFF_INSERT][d].previous]=k[EditorUi.DIFF_INSERT][d];if(null!=k[EditorUi.DIFF_UPDATE])for(c in k[EditorUi.DIFF_UPDATE])d=
+k[EditorUi.DIFF_UPDATE][c],null!=d.previous&&(L[d.previous]=c);if(null!=b){var f="";for(d=0;d<b.length;d++){var l=b[d].getId();K[l]=b[d];null!=L[f]||N[l]||null!=k[EditorUi.DIFF_UPDATE]&&null!=k[EditorUi.DIFF_UPDATE][l]&&null!=k[EditorUi.DIFF_UPDATE][l].previous||(L[f]=l);f=l}}var m={},t=mxUtils.bind(this,function(B){var E=null!=B?B.getId():"";if(null!=B&&!m[E]){m[E]=!0;y.push(B);var D=null!=k[EditorUi.DIFF_UPDATE]?k[EditorUi.DIFF_UPDATE][E]:null;null!=D&&(this.updatePageRoot(B),null!=D.name&&B.setName(D.name),
+null!=D.view&&this.patchViewState(B,D.view),null!=D.cells&&this.patchPage(B,D.cells,z[B.getId()],x),!n||null==D.cells&&null==D.view||(B.needsUpdate=!0))}B=L[E];null!=B&&(delete L[E],t(K[B]));B=F[E];null!=B&&(delete F[E],v(B))}),v=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var E=K[B.getId()];null==E?t(B):(this.patchPage(E,this.diffPages([E],[B]),z[E.getId()],x),n&&(E.needsUpdate=!0))});t();for(c in L)t(K[L[c]]),delete L[c];for(c in F)v(F[c]),
+delete F[c];return y};EditorUi.prototype.patchViewState=function(b,k){if(null!=b.viewState&&null!=k){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var n in k)try{this.patchViewStateProperty(b,k,n)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,k,n){b.viewState[n]=JSON.parse(k[n])};
+EditorUi.prototype.createParentLookup=function(b,k){function n(K){var L=d[K];null==L&&(L={inserted:[],moved:{}},d[K]=L);return L}var d={};if(null!=k[EditorUi.DIFF_INSERT])for(var x=0;x<k[EditorUi.DIFF_INSERT].length;x++){var z=k[EditorUi.DIFF_INSERT][x],y=null!=z.parent?z.parent:"",F=null!=z.previous?z.previous:"";n(y).inserted[F]=z}if(null!=k[EditorUi.DIFF_UPDATE])for(var N in k[EditorUi.DIFF_UPDATE])z=k[EditorUi.DIFF_UPDATE][N],null!=z.previous&&(y=z.parent,null==y&&(x=b.getCell(N),null!=x&&(x=
+b.getParent(x),null!=x&&(y=x.getId()))),null!=y&&(n(y).moved[z.previous]=N));return d};
+EditorUi.prototype.patchPage=function(b,k,n,d){var x=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),z=this.createParentLookup(x,k);x.beginUpdate();try{var y=x.updateEdgeParent,F=new mxDictionary,N=[];x.updateEdgeParent=function(v,B){!F.get(v)&&d&&(F.put(v,!0),N.push(v))};var K=z[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,c=null;null!=L&&(c=this.getCellForJson(L));if(null==c){var f=null!=K&&null!=K.moved?K.moved[""]:null;null!=f&&(c=x.getCell(f))}null!=c&&(x.setRoot(c),
+b.root=c,EditorUi.debug("EditorUi.patchPage: Root changed",c.id));this.patchCellRecursive(b,x,x.root,z,k);if(null!=k[EditorUi.DIFF_REMOVE])for(var l=0;l<k[EditorUi.DIFF_REMOVE].length;l++){f=k[EditorUi.DIFF_REMOVE][l];var m=x.getCell(f);null!=m&&x.remove(m)}if(null!=k[EditorUi.DIFF_UPDATE]){var t=null!=n&&null!=n.cells?n.cells[EditorUi.DIFF_UPDATE]:null;for(f in k[EditorUi.DIFF_UPDATE])m=x.getCell(f),null!=m?this.patchCell(x,m,k[EditorUi.DIFF_UPDATE][f],null!=t?t[f]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
+f,"diff",[k[EditorUi.DIFF_UPDATE][f]])}if(null!=k[EditorUi.DIFF_INSERT])for(l=0;l<k[EditorUi.DIFF_INSERT].length;l++)L=k[EditorUi.DIFF_INSERT][l],m=x.getCell(L.id),null!=m&&(x.setTerminal(m,x.getCell(L.source),!0),x.setTerminal(m,x.getCell(L.target),!1));x.updateEdgeParent=y;if(d&&0<N.length)for(l=0;l<N.length;l++)x.contains(N[l])&&x.updateEdgeParent(N[l])}finally{x.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,k,n,d,x){if(null!=n){var z=d[n.getId()],y=null!=z&&null!=z.inserted?z.inserted:{};z=null!=z&&null!=z.moved?z.moved:{};for(var F=0,N=k.getChildCount(n),K="",L=0;L<N;L++){var c=k.getChildAt(n,L).getId();null==z[K]&&(null==x[EditorUi.DIFF_UPDATE]||null==x[EditorUi.DIFF_UPDATE][c]||null==x[EditorUi.DIFF_UPDATE][c].previous&&null==x[EditorUi.DIFF_UPDATE][c].parent)&&(z[K]=c);K=c}N=mxUtils.bind(this,function(f,l){var m=null!=f?f.getId():"";null==m&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",f);null!=f&&l&&(l=k.getCell(m),null!=l&&l!=f&&(f=null));null!=f&&(k.getChildAt(n,F)!=f&&k.add(n,f,F),this.patchCellRecursive(b,k,f,d,x),F++);return m});for(K=[null];0<K.length;)if(L=K.shift(),L=N(null!=L?L.child:null,null!=L?L.insert:!1),c=z[L],null!=c&&(delete z[L],K.push({child:k.getCell(c)})),c=y[L],null!=c&&(delete y[L],K.push({child:this.getCellForJson(c),insert:!0})),0==K.length){for(L in z)K.push({child:k.getCell(z[L])}),delete z[L];for(L in y)K.push({child:this.getCellForJson(y[L]),
insert:!0}),delete y[L]}}};
-EditorUi.prototype.patchCell=function(b,l,p,d){if(null!=l&&null!=p){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in p?b.setValue(l,p.value):null!=p.xmlValue&&b.setValue(l,mxUtils.parseXml(p.xmlValue).documentElement);null!=d&&null!=d.style||null==p.style||b.setStyle(l,p.style);null!=p.visible&&b.setVisible(l,1==p.visible);null!=p.collapsed&&b.setCollapsed(l,1==p.collapsed);null!=p.vertex&&(l.vertex=1==p.vertex);null!=p.edge&&(l.edge=1==p.edge);null!=p.connectable&&(l.connectable=
-1==p.connectable);null!=p.geometry&&b.setGeometry(l,this.codec.decode(mxUtils.parseXml(p.geometry).documentElement));null!=p.source&&b.setTerminal(l,b.getCell(p.source),!0);null!=p.target&&b.setTerminal(l,b.getCell(p.target),!1);for(var x in p)this.cellProperties[x]||(l[x]=p[x])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var l=null;null!=b&&(l=mxUtils.getXml(b));return l};
-EditorUi.prototype.getNodeForPages=function(b){var l=null;if(null!=this.fileNode&&null!=b){l=this.fileNode.cloneNode(!1);for(var p=0;p<b.length;p++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[p].root));this.editor.graph.saveViewState(b[p].viewState,d);var x=b[p].node.cloneNode(!1);x.appendChild(d);l.appendChild(x)}}return l};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
-EditorUi.prototype.getPagesForNode=function(b,l){var p=this.editor.extractGraphModel(b,!0,!0);null!=p&&(b=p);l=b.getElementsByTagName(l||"diagram");p=[];if(0<l.length)for(b=0;b<l.length;b++){var d=new DiagramPage(l[b]);this.updatePageRoot(d,!0);p.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),p.push(d));return p};
-EditorUi.prototype.diffPages=function(b,l){var p=[],d=[],x={},z={},y={},F=null;if(null!=b&&null!=l){for(var M=0;M<l.length;M++)z[l[M].getId()]={page:l[M],prev:F},F=l[M];F=null;for(M=0;M<b.length;M++){var K=b[M].getId();l=z[K];if(null==l)d.push(K);else{this.updatePageRoot(b[M]);this.updatePageRoot(l.page);var L=this.diffCells(b[M].root,l.page.root),c={};mxUtils.isEmptyObject(L)||(c.cells=L);L=this.diffViewState(b[M],l.page);mxUtils.isEmptyObject(L)||(c.view=L);if((null!=l.prev?null==F:null!=F)||null!=
-F&&null!=l.prev&&F.getId()!=l.prev.getId())c.previous=null!=l.prev?l.prev.getId():"";null!=l.page.getName()&&b[M].getName()!=l.page.getName()&&(c.name=l.page.getName());mxUtils.isEmptyObject(c)||(y[K]=c)}delete z[b[M].getId()];F=b[M]}for(K in z)l=z[K],p.push({id:l.page.getId(),data:mxUtils.getXml(l.page.node),previous:null!=l.prev?l.prev.getId():""});mxUtils.isEmptyObject(y)||(x[EditorUi.DIFF_UPDATE]=y);0<d.length&&(x[EditorUi.DIFF_REMOVE]=d);0<p.length&&(x[EditorUi.DIFF_INSERT]=p)}return x};
-EditorUi.prototype.createCellLookup=function(b,l,p){p=null!=p?p:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):p[b.getId()]={cell:b,prev:l};var d=b.getChildCount();l=null;for(var x=0;x<d;x++){var z=b.getChildAt(x);this.createCellLookup(z,l,p);l=z}return p};
-EditorUi.prototype.diffCellRecursive=function(b,l,p,d,x){d=null!=d?d:{};var z=p[b.getId()];delete p[b.getId()];if(null==z)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):x.push(b.getId());else{var y=this.diffCell(b,z.cell);if(null!=y.parent||(null!=z.prev?null==l:null!=l)||null!=l&&null!=z.prev&&l.getId()!=z.prev.getId())y.previous=null!=z.prev?z.prev.getId():"";mxUtils.isEmptyObject(y)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
-b,"diff",y):d[b.getId()]=y)}z=b.getChildCount();l=null;for(y=0;y<z;y++){var F=b.getChildAt(y);this.diffCellRecursive(F,l,p,d,x);l=F}return d};
-EditorUi.prototype.diffCells=function(b,l){var p={},d=[],x=this.createCellLookup(l);l.id==b.id?(l=[],b=this.diffCellRecursive(b,null,x,null,l),mxUtils.isEmptyObject(b)||(p[EditorUi.DIFF_UPDATE]=b),0<l.length&&(p[EditorUi.DIFF_REMOVE]=l)):EditorUi.debug("EditorUi.diffCells: Root changed",l.id);for(var z in x)b=x[z],d.push(this.getJsonForCell(b.cell,b.prev));0<d.length&&(p[EditorUi.DIFF_INSERT]=d);return p};
-EditorUi.prototype.diffViewState=function(b,l){var p=b.viewState,d=l.viewState,x={};b==this.currentPage&&(p=this.editor.graph.getViewState());l==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=p&&null!=d)for(var z in this.viewStateProperties)this.diffViewStateProperty(p,d,z,x);return x};EditorUi.prototype.diffViewStateProperty=function(b,l,p,d){b=JSON.stringify(this.getViewStateProperty(b,p));l=JSON.stringify(this.getViewStateProperty(l,p));b!=l&&(d[p]=l)};
-EditorUi.prototype.getViewStateProperty=function(b,l){b=b[l];"backgroundImage"==l&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==l&&null==b&&(b=[]);return b};
-EditorUi.prototype.getCellForJson=function(b){var l=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,p=b.value;null!=b.xmlValue&&(p=mxUtils.parseXml(b.xmlValue).documentElement);l=new mxCell(p,l,b.style);l.connectable=0!=b.connectable;l.collapsed=1==b.collapsed;l.visible=0!=b.visible;l.vertex=1==b.vertex;l.edge=1==b.edge;l.id=b.id;for(var d in b)this.cellProperties[d]||(l[d]=b[d]);return l};
-EditorUi.prototype.getJsonForCell=function(b,l){var p={id:b.getId()};b.vertex&&(p.vertex=1);b.edge&&(p.edge=1);b.connectable||(p.connectable=0);null!=b.parent&&(p.parent=b.parent.getId());null!=l&&(p.previous=l.getId());null!=b.source&&(p.source=b.source.getId());null!=b.target&&(p.target=b.target.getId());null!=b.style&&(p.style=b.style);null!=b.geometry&&(p.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(p.collapsed=1);b.visible||(p.visible=0);null!=b.value&&("object"===typeof b.value&&
-"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?p.xmlValue=mxUtils.getXml(b.value):p.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(p[d]=b[d]);return p};
-EditorUi.prototype.diffCell=function(b,l){function p(y){return null!=y&&"object"===typeof y&&"number"===typeof y.nodeType&&"string"===typeof y.nodeName&&"function"===typeof y.getAttribute}var d={};b.vertex!=l.vertex&&(d.vertex=l.vertex?1:0);b.edge!=l.edge&&(d.edge=l.edge?1:0);b.connectable!=l.connectable&&(d.connectable=l.connectable?1:0);if((null!=b.parent?null==l.parent:null!=l.parent)||null!=b.parent&&null!=l.parent&&b.parent.getId()!=l.parent.getId())d.parent=null!=l.parent?l.parent.getId():"";
-if((null!=b.source?null==l.source:null!=l.source)||null!=b.source&&null!=l.source&&b.source.getId()!=l.source.getId())d.source=null!=l.source?l.source.getId():"";if((null!=b.target?null==l.target:null!=l.target)||null!=b.target&&null!=l.target&&b.target.getId()!=l.target.getId())d.target=null!=l.target?l.target.getId():"";p(b.value)&&p(l.value)?b.value.isEqualNode(l.value)||(d.xmlValue=mxUtils.getXml(l.value)):b.value!=l.value&&(p(l.value)?d.xmlValue=mxUtils.getXml(l.value):d.value=null!=l.value?
-l.value:null);b.style!=l.style&&(d.style=l.style);b.visible!=l.visible&&(d.visible=l.visible?1:0);b.collapsed!=l.collapsed&&(d.collapsed=l.collapsed?1:0);if(!this.isObjectEqual(b.geometry,l.geometry,new mxGeometry)){var x=this.codec.encode(l.geometry);null!=x&&(d.geometry=mxUtils.getXml(x))}for(var z in b)this.cellProperties[z]||"function"===typeof b[z]||"function"===typeof l[z]||b[z]==l[z]||(d[z]=void 0===l[z]?null:l[z]);for(z in l)z in b||this.cellProperties[z]||"function"===typeof b[z]||"function"===
-typeof l[z]||b[z]==l[z]||(d[z]=void 0===l[z]?null:l[z]);return d};EditorUi.prototype.resolveCrossReferences=function(b,l){var p={};mxUtils.isEmptyObject(l)||(this.adoptTheirPages(b,l,p),this.adoptTheirCells(b,l,p));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",l,"resolve",p);return p};
-EditorUi.prototype.adoptTheirPages=function(b,l,p){var d={};if(null!=l[EditorUi.DIFF_INSERT])for(var x=0;x<l[EditorUi.DIFF_INSERT].length;x++)d[l[EditorUi.DIFF_INSERT][x].id]=l[EditorUi.DIFF_INSERT][x];for(var z in b[EditorUi.DIFF_UPDATE])null!=d[z]&&(null==p[EditorUi.DIFF_INSERT]&&(p[EditorUi.DIFF_INSERT]=[]),null==p[EditorUi.DIFF_UPDATE]&&(p[EditorUi.DIFF_UPDATE]={}),p[EditorUi.DIFF_INSERT].push(d[z]),p[EditorUi.DIFF_UPDATE][z]=b[EditorUi.DIFF_UPDATE][z],delete b[EditorUi.DIFF_UPDATE][z])};
-EditorUi.prototype.adoptTheirCells=function(b,l,p){for(var d in b[EditorUi.DIFF_UPDATE]){var x=b[EditorUi.DIFF_UPDATE][d];null!=x.cells&&this.adoptTheirCellsFromPage(x,l,d,p)}};
-EditorUi.prototype.adoptTheirCellsFromPage=function(b,l,p,d){var x=null!=l[EditorUi.DIFF_UPDATE]?l[EditorUi.DIFF_UPDATE][p]:null;if(null!=x&&null!=x.cells&&null!=x.cells[EditorUi.DIFF_INSERT]){l=x.cells[EditorUi.DIFF_UPDATE];for(var z={},y=0;y<x.cells[EditorUi.DIFF_INSERT].length;y++){var F=x.cells[EditorUi.DIFF_INSERT][y];z[F.id]=F}x={cells:{}};x.cells[EditorUi.DIFF_INSERT]=[];x.cells[EditorUi.DIFF_UPDATE]={};x.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],z,x);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
-z,l,x);null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});delete x.inserted;d[EditorUi.DIFF_UPDATE][p]=x}};EditorUi.prototype.resolveOwnInsertedCells=function(b,l,p){if(null!=b)for(var d=0;d<b.length;d++){var x=b[d];null!=x&&(this.adoptParentCell(x.id,null,l,p),this.adoptTerminalCell(x.id,x,l,!0,p),this.adoptTerminalCell(x.id,x,l,!1,p))}};
-EditorUi.prototype.resolveOwnUpdatedCells=function(b,l,p,d){if(null!=b)for(var x in b){var z=l[x];null!=z?(d.inserted[x]||(d.cells[EditorUi.DIFF_INSERT].push(z),d.inserted[x]=!0),d.cells[EditorUi.DIFF_UPDATE][x]=b[x]):null!=p&&(z=p[x],null!=z&&(this.adoptParentCell(x,z,l,d),this.adoptTerminalCell(x,z,l,!0,d,x),this.adoptTerminalCell(x,z,l,!1,d,x)))}};
-EditorUi.prototype.adoptParentCell=function(b,l,p,d){var x=p[b],z=null!=l?l.parent:null!=x?x.parent:null;null!=z&&this.adoptParentCell(z,null,p,d);null!=x?d.inserted[b]||(d.cells[EditorUi.DIFF_INSERT].push(x),d.inserted[b]=!0):null!=l&&(null==d.cells[EditorUi.DIFF_UPDATE][b]&&(d.cells[EditorUi.DIFF_UPDATE][b]={}),d.cells[EditorUi.DIFF_UPDATE][b]=l)};
-EditorUi.prototype.adoptTerminalCell=function(b,l,p,d,x){l=d?l.source:l.target;p=p[l];null!=p&&(x.inserted[l]||(x.cells[EditorUi.DIFF_INSERT].push(p),x.inserted[l]=!0),null==x.cells[EditorUi.DIFF_UPDATE][b]&&(x.cells[EditorUi.DIFF_UPDATE][b]={}),x.cells[EditorUi.DIFF_UPDATE][b][d?"source":"target"]=l)};
-EditorUi.prototype.isObjectEqual=function(b,l,p){if(null==b&&null==l)return!0;if(null!=b?null==l:null!=l)return!1;var d=function(x,z){return null==p||p[x]!=z?!0===z?1:z:void 0};return JSON.stringify(b,d)==JSON.stringify(l,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
-mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var l=mxSettings.getMainSettings();l.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(l))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,
-l){l?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},setCustomFonts:function(b){mxSettings.settings.customFonts=
-b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],l=0;l<b.length;l++)"string"===typeof b[l]&&(b[l]={name:b[l],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,
-0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(b){mxSettings.settings.recentColors=
-b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=
-b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,
-createTarget:"1"==urlParams.sketch,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!1,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,darkMode:"auto",autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,
-mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(b){}},load:function(){try{isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key))}catch(b){null!=window.console&&console.log("Error loading settings:",mxSettings.key,b)}null==mxSettings.settings&&mxSettings.init()},parse:function(b){b=null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!=Editor.config&&
-Editor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),
-null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&
-(mxSettings.settings.showStartScreen=!1),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=
-!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,l){this.file=b;this.sync=l};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;
-DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var l=mxUtils.bind(this,function(){this.poll(0,p)}),p=mxUtils.bind(this,function(){this.thread=setTimeout(l,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});p();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};
+EditorUi.prototype.patchCell=function(b,k,n,d){if(null!=k&&null!=n){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in n?b.setValue(k,n.value):null!=n.xmlValue&&b.setValue(k,mxUtils.parseXml(n.xmlValue).documentElement);null!=d&&null!=d.style||null==n.style||b.setStyle(k,n.style);null!=n.visible&&b.setVisible(k,1==n.visible);null!=n.collapsed&&b.setCollapsed(k,1==n.collapsed);null!=n.vertex&&(k.vertex=1==n.vertex);null!=n.edge&&(k.edge=1==n.edge);null!=n.connectable&&(k.connectable=
+1==n.connectable);null!=n.geometry&&b.setGeometry(k,this.codec.decode(mxUtils.parseXml(n.geometry).documentElement));null!=n.source&&b.setTerminal(k,b.getCell(n.source),!0);null!=n.target&&b.setTerminal(k,b.getCell(n.target),!1);for(var x in n)this.cellProperties[x]||(k[x]=n[x])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var k=null;null!=b&&(k=mxUtils.getXml(b));return k};
+EditorUi.prototype.getNodeForPages=function(b){var k=null;if(null!=this.fileNode&&null!=b){k=this.fileNode.cloneNode(!1);for(var n=0;n<b.length;n++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[n].root));this.editor.graph.saveViewState(b[n].viewState,d);var x=b[n].node.cloneNode(!1);x.appendChild(d);k.appendChild(x)}}return k};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+EditorUi.prototype.getPagesForNode=function(b,k){var n=this.editor.extractGraphModel(b,!0,!0);null!=n&&(b=n);k=b.getElementsByTagName(k||"diagram");n=[];if(0<k.length)for(b=0;b<k.length;b++){var d=new DiagramPage(k[b]);this.updatePageRoot(d,!0);n.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),n.push(d));return n};
+EditorUi.prototype.diffPages=function(b,k){var n=[],d=[],x={},z={},y={},F=null;if(null!=b&&null!=k){for(var N=0;N<k.length;N++)z[k[N].getId()]={page:k[N],prev:F},F=k[N];F=null;for(N=0;N<b.length;N++){var K=b[N].getId();k=z[K];if(null==k)d.push(K);else{this.updatePageRoot(b[N]);this.updatePageRoot(k.page);var L=this.diffCells(b[N].root,k.page.root),c={};mxUtils.isEmptyObject(L)||(c.cells=L);L=this.diffViewState(b[N],k.page);mxUtils.isEmptyObject(L)||(c.view=L);if((null!=k.prev?null==F:null!=F)||null!=
+F&&null!=k.prev&&F.getId()!=k.prev.getId())c.previous=null!=k.prev?k.prev.getId():"";null!=k.page.getName()&&b[N].getName()!=k.page.getName()&&(c.name=k.page.getName());mxUtils.isEmptyObject(c)||(y[K]=c)}delete z[b[N].getId()];F=b[N]}for(K in z)k=z[K],n.push({id:k.page.getId(),data:mxUtils.getXml(k.page.node),previous:null!=k.prev?k.prev.getId():""});mxUtils.isEmptyObject(y)||(x[EditorUi.DIFF_UPDATE]=y);0<d.length&&(x[EditorUi.DIFF_REMOVE]=d);0<n.length&&(x[EditorUi.DIFF_INSERT]=n)}return x};
+EditorUi.prototype.createCellLookup=function(b,k,n){n=null!=n?n:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):n[b.getId()]={cell:b,prev:k};var d=b.getChildCount();k=null;for(var x=0;x<d;x++){var z=b.getChildAt(x);this.createCellLookup(z,k,n);k=z}return n};
+EditorUi.prototype.diffCellRecursive=function(b,k,n,d,x){d=null!=d?d:{};var z=n[b.getId()];delete n[b.getId()];if(null==z)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):x.push(b.getId());else{var y=this.diffCell(b,z.cell);if(null!=y.parent||(null!=z.prev?null==k:null!=k)||null!=k&&null!=z.prev&&k.getId()!=z.prev.getId())y.previous=null!=z.prev?z.prev.getId():"";mxUtils.isEmptyObject(y)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
+b,"diff",y):d[b.getId()]=y)}z=b.getChildCount();k=null;for(y=0;y<z;y++){var F=b.getChildAt(y);this.diffCellRecursive(F,k,n,d,x);k=F}return d};
+EditorUi.prototype.diffCells=function(b,k){var n={},d=[],x=this.createCellLookup(k);k.id==b.id?(k=[],b=this.diffCellRecursive(b,null,x,null,k),mxUtils.isEmptyObject(b)||(n[EditorUi.DIFF_UPDATE]=b),0<k.length&&(n[EditorUi.DIFF_REMOVE]=k)):EditorUi.debug("EditorUi.diffCells: Root changed",k.id);for(var z in x)b=x[z],d.push(this.getJsonForCell(b.cell,b.prev));0<d.length&&(n[EditorUi.DIFF_INSERT]=d);return n};
+EditorUi.prototype.diffViewState=function(b,k){var n=b.viewState,d=k.viewState,x={};b==this.currentPage&&(n=this.editor.graph.getViewState());k==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=n&&null!=d)for(var z in this.viewStateProperties)this.diffViewStateProperty(n,d,z,x);return x};EditorUi.prototype.diffViewStateProperty=function(b,k,n,d){b=JSON.stringify(this.getViewStateProperty(b,n));k=JSON.stringify(this.getViewStateProperty(k,n));b!=k&&(d[n]=k)};
+EditorUi.prototype.getViewStateProperty=function(b,k){b=b[k];"backgroundImage"==k&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==k&&null==b&&(b=[]);return b};
+EditorUi.prototype.getCellForJson=function(b){var k=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,n=b.value;null!=b.xmlValue&&(n=mxUtils.parseXml(b.xmlValue).documentElement);k=new mxCell(n,k,b.style);k.connectable=0!=b.connectable;k.collapsed=1==b.collapsed;k.visible=0!=b.visible;k.vertex=1==b.vertex;k.edge=1==b.edge;k.id=b.id;for(var d in b)this.cellProperties[d]||(k[d]=b[d]);return k};
+EditorUi.prototype.getJsonForCell=function(b,k){var n={id:b.getId()};b.vertex&&(n.vertex=1);b.edge&&(n.edge=1);b.connectable||(n.connectable=0);null!=b.parent&&(n.parent=b.parent.getId());null!=k&&(n.previous=k.getId());null!=b.source&&(n.source=b.source.getId());null!=b.target&&(n.target=b.target.getId());null!=b.style&&(n.style=b.style);null!=b.geometry&&(n.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(n.collapsed=1);b.visible||(n.visible=0);null!=b.value&&("object"===typeof b.value&&
+"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?n.xmlValue=mxUtils.getXml(b.value):n.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(n[d]=b[d]);return n};
+EditorUi.prototype.diffCell=function(b,k){function n(y){return null!=y&&"object"===typeof y&&"number"===typeof y.nodeType&&"string"===typeof y.nodeName&&"function"===typeof y.getAttribute}var d={};b.vertex!=k.vertex&&(d.vertex=k.vertex?1:0);b.edge!=k.edge&&(d.edge=k.edge?1:0);b.connectable!=k.connectable&&(d.connectable=k.connectable?1:0);if((null!=b.parent?null==k.parent:null!=k.parent)||null!=b.parent&&null!=k.parent&&b.parent.getId()!=k.parent.getId())d.parent=null!=k.parent?k.parent.getId():"";
+if((null!=b.source?null==k.source:null!=k.source)||null!=b.source&&null!=k.source&&b.source.getId()!=k.source.getId())d.source=null!=k.source?k.source.getId():"";if((null!=b.target?null==k.target:null!=k.target)||null!=b.target&&null!=k.target&&b.target.getId()!=k.target.getId())d.target=null!=k.target?k.target.getId():"";n(b.value)&&n(k.value)?b.value.isEqualNode(k.value)||(d.xmlValue=mxUtils.getXml(k.value)):b.value!=k.value&&(n(k.value)?d.xmlValue=mxUtils.getXml(k.value):d.value=null!=k.value?
+k.value:null);b.style!=k.style&&(d.style=k.style);b.visible!=k.visible&&(d.visible=k.visible?1:0);b.collapsed!=k.collapsed&&(d.collapsed=k.collapsed?1:0);if(!this.isObjectEqual(b.geometry,k.geometry,new mxGeometry)){var x=this.codec.encode(k.geometry);null!=x&&(d.geometry=mxUtils.getXml(x))}for(var z in b)this.cellProperties[z]||"function"===typeof b[z]||"function"===typeof k[z]||b[z]==k[z]||(d[z]=void 0===k[z]?null:k[z]);for(z in k)z in b||this.cellProperties[z]||"function"===typeof b[z]||"function"===
+typeof k[z]||b[z]==k[z]||(d[z]=void 0===k[z]?null:k[z]);return d};EditorUi.prototype.resolveCrossReferences=function(b,k){var n={};mxUtils.isEmptyObject(k)||(this.adoptTheirPages(b,k,n),this.adoptTheirCells(b,k,n));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",k,"resolve",n);return n};
+EditorUi.prototype.adoptTheirPages=function(b,k,n){var d={};if(null!=k[EditorUi.DIFF_INSERT])for(var x=0;x<k[EditorUi.DIFF_INSERT].length;x++)d[k[EditorUi.DIFF_INSERT][x].id]=k[EditorUi.DIFF_INSERT][x];for(var z in b[EditorUi.DIFF_UPDATE])null!=d[z]&&(null==n[EditorUi.DIFF_INSERT]&&(n[EditorUi.DIFF_INSERT]=[]),null==n[EditorUi.DIFF_UPDATE]&&(n[EditorUi.DIFF_UPDATE]={}),n[EditorUi.DIFF_INSERT].push(d[z]),n[EditorUi.DIFF_UPDATE][z]=b[EditorUi.DIFF_UPDATE][z],delete b[EditorUi.DIFF_UPDATE][z])};
+EditorUi.prototype.adoptTheirCells=function(b,k,n){for(var d in b[EditorUi.DIFF_UPDATE]){var x=b[EditorUi.DIFF_UPDATE][d];null!=x.cells&&this.adoptTheirCellsFromPage(x,k,d,n)}};
+EditorUi.prototype.adoptTheirCellsFromPage=function(b,k,n,d){var x=null!=k[EditorUi.DIFF_UPDATE]?k[EditorUi.DIFF_UPDATE][n]:null;if(null!=x&&null!=x.cells&&null!=x.cells[EditorUi.DIFF_INSERT]){k=x.cells[EditorUi.DIFF_UPDATE];for(var z={},y=0;y<x.cells[EditorUi.DIFF_INSERT].length;y++){var F=x.cells[EditorUi.DIFF_INSERT][y];z[F.id]=F}x={cells:{}};x.cells[EditorUi.DIFF_INSERT]=[];x.cells[EditorUi.DIFF_UPDATE]={};x.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],z,x);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
+z,k,x);null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});delete x.inserted;d[EditorUi.DIFF_UPDATE][n]=x}};EditorUi.prototype.resolveOwnInsertedCells=function(b,k,n){if(null!=b)for(var d=0;d<b.length;d++){var x=b[d];null!=x&&(this.adoptParentCell(x.id,null,k,n),this.adoptTerminalCell(x.id,x,k,!0,n),this.adoptTerminalCell(x.id,x,k,!1,n))}};
+EditorUi.prototype.resolveOwnUpdatedCells=function(b,k,n,d){if(null!=b)for(var x in b){var z=k[x];null!=z?(d.inserted[x]||(d.cells[EditorUi.DIFF_INSERT].push(z),d.inserted[x]=!0),d.cells[EditorUi.DIFF_UPDATE][x]=b[x]):null!=n&&(z=n[x],null!=z&&(this.adoptParentCell(x,z,k,d),this.adoptTerminalCell(x,z,k,!0,d,x),this.adoptTerminalCell(x,z,k,!1,d,x)))}};
+EditorUi.prototype.adoptParentCell=function(b,k,n,d){var x=n[b],z=null!=k?k.parent:null!=x?x.parent:null;null!=z&&this.adoptParentCell(z,null,n,d);null!=x?d.inserted[b]||(d.cells[EditorUi.DIFF_INSERT].push(x),d.inserted[b]=!0):null!=k&&(null==d.cells[EditorUi.DIFF_UPDATE][b]&&(d.cells[EditorUi.DIFF_UPDATE][b]={}),d.cells[EditorUi.DIFF_UPDATE][b]=k)};
+EditorUi.prototype.adoptTerminalCell=function(b,k,n,d,x){k=d?k.source:k.target;n=n[k];null!=n&&(x.inserted[k]||(x.cells[EditorUi.DIFF_INSERT].push(n),x.inserted[k]=!0),null==x.cells[EditorUi.DIFF_UPDATE][b]&&(x.cells[EditorUi.DIFF_UPDATE][b]={}),x.cells[EditorUi.DIFF_UPDATE][b][d?"source":"target"]=k)};
+EditorUi.prototype.isObjectEqual=function(b,k,n){if(null==b&&null==k)return!0;if(null!=b?null==k:null!=k)return!1;var d=function(x,z){return null==n||n[x]!=z?!0===z?1:z:void 0};return JSON.stringify(b,d)==JSON.stringify(k,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var k=mxSettings.getMainSettings();k.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(k))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){var k=b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor;mxUtils.isLightDarkColor(k)&&
+(k=mxUtils.getLightDarkColor(k),k=b?k.dark:k.light);return k},setGridColor:function(b,k){k?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
+b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],k=0;k<b.length;k++)"string"===typeof b[k]&&(b[k]={name:b[k],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
+b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},
+setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||
+mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
+plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarget:"1"==urlParams.sketch,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!1,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,darkMode:"auto",autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},
+save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(b){}},load:function(){try{isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key))}catch(b){null!=window.console&&console.log("Error loading settings:",mxSettings.key,b)}null==mxSettings.settings&&mxSettings.init()},parse:function(b){b=
+null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!=Editor.config&&Editor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),
+null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),
+null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!1),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&
+(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,k){this.file=b;this.sync=k};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;
+DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var k=mxUtils.bind(this,function(){this.poll(0,n)}),n=mxUtils.bind(this,function(){this.thread=setTimeout(k,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});n();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};
DrawioFilePolling.prototype.updateStatus=function(){this.hasOtherWriters()&&(this.sync.lastMessage=mxResources.get("otherUsersEditing"));this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()};
-DrawioFilePolling.prototype.poll=function(b,l){b=null!=b?b:0;var p=mxUtils.bind(this,function(d){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,l)})):l()});this.file.getLatestVersionId(mxUtils.bind(this,function(d){if(-1!=d){var x=this.file.getCurrentRevisionId();d!=x?this.file.getLatestVersion(mxUtils.bind(this,function(z){this.file.mergeFile(z,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();l()}),p)}),p):
-(this.updateStatus(),l())}else l()}),p)};DrawioFilePolling.prototype.retryPoll=function(b){var l=300+300*Math.random();window.setTimeout(b,l);EditorUi.debug("StorageFile.retryPoll",[this],"delay",l)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};
+DrawioFilePolling.prototype.poll=function(b,k){b=null!=b?b:0;var n=mxUtils.bind(this,function(d){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,k)})):k()});this.file.getLatestVersionId(mxUtils.bind(this,function(d){if(-1!=d){var x=this.file.getCurrentRevisionId();d!=x?this.file.getLatestVersion(mxUtils.bind(this,function(z){this.file.mergeFile(z,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();k()}),n)}),n):
+(this.updateStatus(),k())}else k()}),n)};DrawioFilePolling.prototype.retryPoll=function(b){var k=300+300*Math.random();window.setTimeout(b,k);EditorUi.debug("StorageFile.retryPoll",[this],"delay",k)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};
DrawioFilePolling.prototype.hasOtherWriters=function(){return null!=this.lastOtherWriter&&6E4>Date.now()-this.lastOtherWriter};DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&!this.ui.isOffline(!0)?this.fileChangedNotify():this.updateStatus()});mxEvent.addListener(window,"offline",this.onlineListener);mxEvent.addListener(window,"online",this.onlineListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});this.ui.editor.addListener("autosaveChanged",
-this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(l){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,
-"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(l){null!=l.error&&null!=l.error.data&&4004===l.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();
-this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(l){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var p=this.stringToObject(l);null!=p&&(EditorUi.debug("DrawioFileSync.message",[this],p,l.length,"bytes"),p.v>DrawioFileSync.PROTOCOL?
-this.file.redirectToNewApp(mxUtils.bind(this,function(){})):p.v===DrawioFileSync.PROTOCOL&&null!=p.d&&this.handleMessageData(p.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;
+this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(k){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,
+"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(k){null!=k.error&&null!=k.error.data&&4004===k.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();
+this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(k){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var n=this.stringToObject(k);null!=n&&(EditorUi.debug("DrawioFileSync.message",[this],n,k.length,"bytes"),n.v>DrawioFileSync.PROTOCOL?
+this.file.redirectToNewApp(mxUtils.bind(this,function(){})):n.v===DrawioFileSync.PROTOCOL&&null!=n.d&&this.handleMessageData(n.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;
DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=15E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;
DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());var b=!1;if(this.file.isPolling())"hidden"!=document.visibilityState&&(null==this.polling&&(this.polling=new DrawioFilePolling(this.file,this)),this.polling.start(this.file.getPollingInterval()),b=!0);else if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=
-this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(l){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this],"version",DrawioFileSync.PROTOCOL,"rev",this.file.getCurrentRevisionId())}catch(l){}this.installListeners()}b=!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();
+this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(k){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this],"version",DrawioFileSync.PROTOCOL,"rev",this.file.getCurrentRevisionId())}catch(k){}this.installListeners()}b=!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();
this.updateStatus()},0));this.updateRealtime()};
DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(),
this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};
DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:null!=this.polling?this.polling.isConnected():!1};DrawioFileSync.prototype.updateOnlineState=function(){"1"!=urlParams.embedRT&&this.file.fireEvent(new mxEventObject("realtimeStateChanged"))};
DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing||(this.enabled&&null!=this.ui.statusContainer?(this.ui.updateStatus(mxUtils.bind(this,function(){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));
-var l=this.lastMessage;this.lastMessage=null;null!=l&&40<l.length&&(l=l.substring(0,40)+"...");var p=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var d=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"",x=mxUtils.htmlEntities(b)+(this.file.isRevisionHistorySupported()?" - "+mxUtils.htmlEntities(mxResources.get("revisionHistory")):"");this.ui.editor.setStatus("<div "+d+'title="'+x+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?
-' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=p?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(p)+'">'+mxUtils.htmlEntities(p)+"</div>":"")+(null!=l?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(l)+'">'+mxUtils.htmlEntities(l)+
+var k=this.lastMessage;this.lastMessage=null;null!=k&&40<k.length&&(k=k.substring(0,40)+"...");var n=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var d=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"",x=mxUtils.htmlEntities(b)+(this.file.isRevisionHistorySupported()?" - "+mxUtils.htmlEntities(mxResources.get("revisionHistory")):"");this.ui.editor.setStatus("<div "+d+'title="'+x+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?
+' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=n?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(n)+'">'+mxUtils.htmlEntities(n)+"</div>":"")+(null!=k?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(k)+'">'+mxUtils.htmlEntities(k)+
"</div>":""))})),this.resetUpdateStatusThread()):this.ui.updateStatus(mxUtils.bind(this,function(){this.file.addAllSavedStatus()})))};DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),Editor.updateStatusInterval))};
DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
DrawioFileSync.prototype.notify=function(b){this.file.stats.msgSent++;this.file.isPolling()||(Editor.enableRealtimeCache&&!Editor.p2pSyncNotify?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(b))):null!=this.p2pCollab&&this.p2pCollab.sendNotification(b));EditorUi.debug("DrawioFileSync.notify",[this],"enableRealtimeCache",Editor.enableRealtimeCache,"p2pSyncNotify",Editor.p2pSyncNotify,"msg",b)};
-DrawioFileSync.prototype.sendJoinMessage=function(){if(!this.announced){var b=this.file.getCurrentUser(),l={a:"join"};null!=b&&(l.name=encodeURIComponent(b.displayName),l.uid=b.id);this.notify(this.createMessage(l));this.announced=!0}};
+DrawioFileSync.prototype.sendJoinMessage=function(){if(!this.announced){var b=this.file.getCurrentUser(),k={a:"join"};null!=b&&(k.name=encodeURIComponent(b.displayName),k.uid=b.id);this.notify(this.createMessage(k));this.announced=!0}};
DrawioFileSync.prototype.handleMessageData=function(b){"desc"==b.a?this.file.savingFile||this.reloadDescriptor():"join"==b.a||"leave"==b.a?("join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus())):"change"==b.a?this.receiveRemoteChanges(b):null!=b.m&&(b=new Date(b.m),null==this.lastMessageModified||this.lastMessageModified<b)&&(this.lastMessageModified=
b,this.fileChangedNotify())};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(l){this.reloadThread=null;if(null!=l){var p=this.file.getCurrentRevisionId(),d=l.getCurrentRevisionId();
-p==d?this.optimisticSync(b+1):this.file.mergeFile(l,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};
-DrawioFileSync.prototype.fileChangedNotify=function(b,l){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",l,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var p=this.fileChanged(mxUtils.bind(this,function(d){this.updateStatus()}),mxUtils.bind(this,function(d){this.file.handleFileError(d)}),mxUtils.bind(this,function(){return!this.file.savingFile&&
-this.notifyThread!=p}),!0,l)};DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
-DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var l=this.clientId+"."+this.syncChangeCounter++,p=this.createMessage({a:"change",c:b,id:l,t:Date.now()});l=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(p):"1"==urlParams.dev?(p=encodeURIComponent(this.objectToString(p)),0==this.maxSyncMessageSize||p.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+p):l=!0):l=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
-"changes",b,l?"(skipped)":"")}};
-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(x,z){return x.id<z.id?-1:x.id>z.id?1:0});for(var l=null,p=0;p<this.receivedData.length;p++){var d=JSON.stringify(this.receivedData[p].c);d!=l&&this.doReceiveRemoteChanges(this.receivedData[p].c);
-l=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};
-DrawioFileSync.prototype.scheduleCleanup=function(b){var l=Math.min(15,Math.floor(this.file.getSize()/5E6));l=0==b?0:this.cleanupDelay+1E3*l;var p=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),l);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",l,"prev",p,"thread",this.cleanupThread)};
-DrawioFileSync.prototype.cleanup=function(b,l,p){var d=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var x=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",d,"patches",x,"checkFile",p,"checksum",this.ui.getHashValueForPages(this.ui.pages));
-this.file.ignorePatches(x)||this.file.patch(x);p?this.file.getLatestVersion(mxUtils.bind(this,function(z){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var y=z.getShadowPages();x=[this.ui.diffPages(this.ui.pages,y),this.ui.diffPages(y,this.file.ownPages)];this.file.ignorePatches(x)||this.file.patch(x);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",z,"patches",x)}null!=b&&b()}catch(F){null!=l&&l(F)}}),l):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
-this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",p,"modified",this.file.isModified()))};
-DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),l=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(p){if(!document.hidden){var d=this.ui.getHashValueForPages(p.getShadowPages()),x=p.getDescriptorChecksum(p.getDescriptor()),z=p.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,
-"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[p],"rev",z==l,"desc",x==d,"checksum",d);d!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(p){EditorUi.debug("DrawioFileSync.testChecksum",
-[this],"checksum test error",p)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var l={};null!=b[EditorUi.DIFF_REMOVE]&&(l[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var p in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][p];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==l[EditorUi.DIFF_UPDATE]&&(l[EditorUi.DIFF_UPDATE]={});l[EditorUi.DIFF_UPDATE][p]={};var x=l[EditorUi.DIFF_UPDATE][p];x.cells={};x.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return l};
-DrawioFileSync.prototype.patchRealtime=function(b,l,p,d){var x=null;if(this.file.isRealtime()){x=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var z=this.extractRemove(this.extractLocal(x)),y=(null==p?b:b.concat(p)).concat([z]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,y,!0,l);mxUtils.isEmptyObject(z)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",l,"own",p,
+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(k){this.reloadThread=null;if(null!=k){var n=this.file.getCurrentRevisionId(),d=k.getCurrentRevisionId();
+n==d?this.optimisticSync(b+1):this.file.mergeFile(k,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};
+DrawioFileSync.prototype.fileChangedNotify=function(b,k){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",k,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var n=this.fileChanged(mxUtils.bind(this,function(d){this.updateStatus()}),mxUtils.bind(this,function(d){this.file.handleFileError(d)}),mxUtils.bind(this,function(){return!this.file.savingFile&&
+this.notifyThread!=n}),!0,k)};DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
+DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var k=this.clientId+"."+this.syncChangeCounter++,n=this.createMessage({a:"change",c:b,id:k,t:Date.now()});k=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(n):"1"==urlParams.dev?(n=encodeURIComponent(this.objectToString(n)),0==this.maxSyncMessageSize||n.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+n):k=!0):k=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+"changes",b,k?"(skipped)":"")}};
+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(x,z){return x.id<z.id?-1:x.id>z.id?1:0});for(var k=null,n=0;n<this.receivedData.length;n++){var d=JSON.stringify(this.receivedData[n].c);d!=k&&this.doReceiveRemoteChanges(this.receivedData[n].c);
+k=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};
+DrawioFileSync.prototype.scheduleCleanup=function(b){var k=Math.min(15,Math.floor(this.file.getSize()/5E6));k=0==b?0:this.cleanupDelay+1E3*k;var n=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),k);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",k,"prev",n,"thread",this.cleanupThread)};
+DrawioFileSync.prototype.cleanup=function(b,k,n){var d=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var x=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",d,"patches",x,"checkFile",n,"checksum",this.ui.getHashValueForPages(this.ui.pages));
+this.file.ignorePatches(x)||this.file.patch(x);n?this.file.getLatestVersion(mxUtils.bind(this,function(z){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var y=z.getShadowPages();x=[this.ui.diffPages(this.ui.pages,y),this.ui.diffPages(y,this.file.ownPages)];this.file.ignorePatches(x)||this.file.patch(x);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",z,"patches",x)}null!=b&&b()}catch(F){null!=k&&k(F)}}),k):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
+this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",n,"modified",this.file.isModified()))};
+DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),k=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(n){if(!document.hidden){var d=this.ui.getHashValueForPages(n.getShadowPages()),x=n.getDescriptorChecksum(n.getDescriptor()),z=n.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,
+"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[n],"rev",z==k,"desc",x==d,"checksum",d);d!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(n){EditorUi.debug("DrawioFileSync.testChecksum",
+[this],"checksum test error",n)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
+DrawioFileSync.prototype.extractRemove=function(b){var k={};null!=b[EditorUi.DIFF_REMOVE]&&(k[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var n in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][n];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==k[EditorUi.DIFF_UPDATE]&&(k[EditorUi.DIFF_UPDATE]={});k[EditorUi.DIFF_UPDATE][n]={};var x=k[EditorUi.DIFF_UPDATE][n];x.cells={};x.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return k};
+DrawioFileSync.prototype.patchRealtime=function(b,k,n,d){var x=null;if(this.file.isRealtime()){x=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var z=this.extractRemove(this.extractLocal(x)),y=(null==n?b:b.concat(n)).concat([z]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,y,!0,k);mxUtils.isEmptyObject(z)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",k,"own",n,
"all",x,"local",z,"applied",y,"immediate",d)}return x};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
-DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),l=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,l,!0);this.snapshot=b;var p=this.ui.resolveCrossReferences(l,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,p,!0);this.isRealtimeActive()&&this.doSendLocalChanges([p,l])}this.localFileWasChanged=
+DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),k=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,k,!0);this.snapshot=b;var n=this.ui.resolveCrossReferences(k,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,n,!0);this.isRealtimeActive()&&this.doSendLocalChanges([n,k])}this.localFileWasChanged=
!1}catch(d){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,d)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,l,p,d,x,z,y){try{this.file.stats.merged++;this.lastModified=new Date;var F=this.file.getDescriptorRevisionId(p);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var M=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(M,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(M,this.file.ownPages):null;M=this.ui.applyPatches(M,b);var c=null==l?null:this.ui.getHashValueForPages(M);
-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",l,"current",c,"valid",l==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",F,"etag",this.file.getDescriptorEtag(p),"immediate",y);if(null!=l&&l!=c){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=x&&x()}),z,null,y);return}this.file.setShadowPages(M);null==this.patchRealtime(b,null,L,y)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
-K:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),p);null!=d&&d(!0)}catch(m){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=x&&x(m);try{var f=this.file.getCurrentUser(),k=null!=f?f.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),k,m)}catch(t){}}};
-DrawioFileSync.prototype.fileChanged=function(b,l,p,d,x){var z=window.setTimeout(mxUtils.bind(this,function(){null!=p&&p()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",x,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(y){null!=p&&p()||(this.isValidState()?this.catchup(y,b,l,p,x):null!=l&&l())}),l)):null!=l&&l())}),d?this.cacheReadyDelay:0);return this.notifyThread=
+DrawioFileSync.prototype.merge=function(b,k,n,d,x,z,y){try{this.file.stats.merged++;this.lastModified=new Date;var F=this.file.getDescriptorRevisionId(n);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var N=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(N,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(N,this.file.ownPages):null;N=this.ui.applyPatches(N,b);var c=null==k?null:this.ui.getHashValueForPages(N);
+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",k,"current",c,"valid",k==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",F,"etag",this.file.getDescriptorEtag(n),"immediate",y);if(null!=k&&k!=c){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=x&&x()}),z,null,y);return}this.file.setShadowPages(N);null==this.patchRealtime(b,null,L,y)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
+K:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),n);null!=d&&d(!0)}catch(m){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=x&&x(m);try{var f=this.file.getCurrentUser(),l=null!=f?f.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),l,m)}catch(t){}}};
+DrawioFileSync.prototype.fileChanged=function(b,k,n,d,x){var z=window.setTimeout(mxUtils.bind(this,function(){null!=n&&n()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",x,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(y){null!=n&&n()||(this.isValidState()?this.catchup(y,b,k,n,x):null!=k&&k())}),k)):null!=k&&k())}),d?this.cacheReadyDelay:0);return this.notifyThread=
z};
-DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var l=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var p=0;p<this.file.ownPages.length;p++)null!=l[p]&&this.ui.getHashValueForPages([this.file.ownPages[p]])!=this.ui.getHashValueForPages([l[p]])&&(this.file.ownPages[p].needsUpdate=!0);l=this.cleanupThread;window.clearTimeout(this.cleanupThread);
-this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",l,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};
+DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var k=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var n=0;n<this.file.ownPages.length;n++)null!=k[n]&&this.ui.getHashValueForPages([this.file.ownPages[n]])!=this.ui.getHashValueForPages([k[n]])&&(this.file.ownPages[n].needsUpdate=!0);k=this.cleanupThread;window.clearTimeout(this.cleanupThread);
+this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",k,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,l,p,d,x){if(null!=b&&(null==d||!d())){var z=this.file.getCurrentRevisionId(),y=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",z,"to",y,"immediate",x,"valid",this.isValidState());if(z==y)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=l&&l(!0);else if(this.isValidState()){var F=this.file.getDescriptorChecksum(b),M=this.file.getDescriptorSecret(b);if(null!=F&&F==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=l&&l(!0);else if(Editor.enableRealtimeCache&&null!=M&&"1"!=urlParams.lockdown){var K=0,L=!1,c=mxUtils.bind(this,function(){if(null==d||!d())if(z!=this.file.getCurrentRevisionId())null!=l&&
-l(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(l,p,d,null,x)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(z)+"&to="+encodeURIComponent(y)+(null!=M?"&secret="+encodeURIComponent(M):""),mxUtils.bind(this,function(m){this.file.stats.bytesReceived+=m.getText().length;window.clearTimeout(k);if(f&&(null==d||!d()))if(z!=this.file.getCurrentRevisionId())null!=
-l&&l(!0);else if(this.isValidState()){var t=null,v=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[m],"status",m.getStatus(),"cacheReadyRetryCount",K,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=m.getStatus()&&299>=m.getStatus()&&0<m.getText().length)try{var A=JSON.parse(m.getText());if(null!=A&&0<A.length)for(var E=0;E<A.length;E++){var D=this.stringToObject(A[E]);if(D.v>DrawioFileSync.PROTOCOL){L=!0;v=[];break}else if(D.v===DrawioFileSync.PROTOCOL&&null!=D.d)t=D.d.checksum,
-v.push(D.d.patch);else{L=!0;v=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"status",L?"failed":"ok","temp",v,"checksum",t)}catch(B){v=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<v.length?(this.file.stats.cacheHits++,this.merge(v,t,b,l,p,d,x)):K<=this.maxCacheReadyRetries-1&&!L&&401!=m.getStatus()&&503!=m.getStatus()&&410!=m.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(c,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
-this.reload(l,p,d,null,x))}catch(B){null!=p&&p(B)}}else null!=p&&p()}),p)}else null!=p&&p()});window.setTimeout(c,this.cacheReadyDelay)}else this.reload(l,p,d,null,x)}else null!=p&&p()}};DrawioFileSync.prototype.reload=function(b,l,p,d,x){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",x);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(z){null!=l&&l(z)}),p,d,x)};
-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var l=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),p=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(p)+"&msg="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
-EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",p)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,l,p){var d=!0,x=window.setTimeout(mxUtils.bind(this,function(){d=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(z){window.clearTimeout(x);d&&(200<=z.getStatus()&&299>=z.getStatus()?l(z.getText()):p({code:z.getStatus(),message:"Token Error "+z.getStatus()}))}),p)};
+DrawioFileSync.prototype.catchup=function(b,k,n,d,x){if(null!=b&&(null==d||!d())){var z=this.file.getCurrentRevisionId(),y=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",z,"to",y,"immediate",x,"valid",this.isValidState());if(z==y)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=k&&k(!0);else if(this.isValidState()){var F=this.file.getDescriptorChecksum(b),N=this.file.getDescriptorSecret(b);if(null!=F&&F==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=k&&k(!0);else if(Editor.enableRealtimeCache&&null!=N&&"1"!=urlParams.lockdown){var K=0,L=!1,c=mxUtils.bind(this,function(){if(null==d||!d())if(z!=this.file.getCurrentRevisionId())null!=k&&
+k(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;this.reload(k,n,d,null,x)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(z)+"&to="+encodeURIComponent(y)+(null!=N?"&secret="+encodeURIComponent(N):""),mxUtils.bind(this,function(m){this.file.stats.bytesReceived+=m.getText().length;window.clearTimeout(l);if(f&&(null==d||!d()))if(z!=this.file.getCurrentRevisionId())null!=
+k&&k(!0);else if(this.isValidState()){var t=null,v=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[m],"status",m.getStatus(),"cacheReadyRetryCount",K,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=m.getStatus()&&299>=m.getStatus()&&0<m.getText().length)try{var B=JSON.parse(m.getText());if(null!=B&&0<B.length)for(var E=0;E<B.length;E++){var D=this.stringToObject(B[E]);if(D.v>DrawioFileSync.PROTOCOL){L=!0;v=[];break}else if(D.v===DrawioFileSync.PROTOCOL&&null!=D.d)t=D.d.checksum,
+v.push(D.d.patch);else{L=!0;v=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",L?"failed":"ok","temp",v,"checksum",t)}catch(A){v=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<v.length?(this.file.stats.cacheHits++,this.merge(v,t,b,k,n,d,x)):K<=this.maxCacheReadyRetries-1&&!L&&401!=m.getStatus()&&503!=m.getStatus()&&410!=m.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(c,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+this.reload(k,n,d,null,x))}catch(A){null!=n&&n(A)}}else null!=n&&n()}),n)}else null!=n&&n()});window.setTimeout(c,this.cacheReadyDelay)}else this.reload(k,n,d,null,x)}else null!=n&&n()}};DrawioFileSync.prototype.reload=function(b,k,n,d,x){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",x);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(z){null!=k&&k(z)}),n,d,x)};
+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var k=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),n=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(n)+"&msg="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
+EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",n)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
+DrawioFileSync.prototype.createToken=function(b,k,n){var d=!0,x=window.setTimeout(mxUtils.bind(this,function(){d=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(z){window.clearTimeout(x);d&&(200<=z.getStatus()&&299>=z.getStatus()?k(z.getText()):n({code:z.getStatus(),message:"Token Error "+z.getStatus()}))}),n)};
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,l,p,d,x,z){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var y=this.file.getDescriptorSecret(this.file.getDescriptor()),F=this.createMessage({m:this.lastModified.getTime()}),M=this.file.getDescriptorRevisionId(l),K=this.file.getCurrentRevisionId();if(null!=y&&null!=x&&
-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);l=this.file.getDescriptorSecret(l);z=null!=z?z:this.ui.getHashValueForPages(b);var c=this.objectToString(this.createMessage({patch:L,checksum:z}));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(M)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(F)))+(null!=y?"&secret="+encodeURIComponent(y):"")+(null!=l?"&last-secret="+encodeURIComponent(l):"")+(c.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(c):"")+(null!=x?"&token="+encodeURIComponent(x):""),mxUtils.bind(this,function(m){window.clearTimeout(k);f&&(200<=m.getStatus()&&299>=m.getStatus()?(Editor.p2pSyncNotify&&this.notify(F),null!=p&&p()):d({message:mxResources.get("realtimeCollaboration")+
-(0!=m.getStatus()?": "+m.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",M,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,c.length,"bytes","msg",F,"checksum",z)}else this.notify(F),null!=p&&p(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",M,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,k,n,d,x,z){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var y=this.file.getDescriptorSecret(this.file.getDescriptor()),F=this.createMessage({m:this.lastModified.getTime()}),N=this.file.getDescriptorRevisionId(k),K=this.file.getCurrentRevisionId();if(null!=y&&null!=x&&
+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);k=this.file.getDescriptorSecret(k);z=null!=z?z:this.ui.getHashValueForPages(b);var c=this.objectToString(this.createMessage({patch:L,checksum:z}));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
+"&from="+encodeURIComponent(N)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(F)))+(null!=y?"&secret="+encodeURIComponent(y):"")+(null!=k?"&last-secret="+encodeURIComponent(k):"")+(c.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(c):"")+(null!=x?"&token="+encodeURIComponent(x):""),mxUtils.bind(this,function(m){window.clearTimeout(l);f&&(200<=m.getStatus()&&299>=m.getStatus()?(Editor.p2pSyncNotify&&this.notify(F),null!=n&&n()):d({message:mxResources.get("realtimeCollaboration")+
+(0!=m.getStatus()?": "+m.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",N,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,c.length,"bytes","msg",F,"checksum",z)}else this.notify(F),null!=n&&n(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",N,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
-DrawioFileSync.prototype.fileConflict=function(b,l,p){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,l,p):this.fileChanged(l,p)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=p&&p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
+DrawioFileSync.prototype.fileConflict=function(b,k,n){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,k,n):this.fileChanged(k,n)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=n&&n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
this.polling=null);this.updateOnlineState();this.updateStatus()};
-DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),l={a:"leave"};null!=b&&(l.name=encodeURIComponent(b.displayName),l.uid=b.id);this.notify(this.createMessage(l))}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"offline",this.onlineListener),mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.removeListener(this.autosaveListener),this.autosaveListener=
+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),k={a:"leave"};null!=b&&(k.name=encodeURIComponent(b.displayName),k.uid=b.id);this.notify(this.createMessage(k))}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"offline",this.onlineListener),mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.removeListener(this.autosaveListener),this.autosaveListener=
null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),
-mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,l,p){EditorUi.call(this,b,l,null!=p?p:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,k,n){EditorUi.call(this,b,k,null!=n?n:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(d,x,z){if("1"==urlParams.openInSameWin||navigator.standalone)null!=z&&z();else{var y=null;try{y=window.open(d)}catch(F){}null==y||void 0===y?this.showDialog((new PopupDialog(this,d,x,z)).container,340,140,!0,!0):null!=x&&x()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";
App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL=window.PUSHER_URL||"https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL="js/simplepeer/simplepeer9.10.0.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon webcola tags".split(" ");
-App.loadScripts=function(b,l,p){for(var d=b.length,x=!1,z=0;z<b.length;z++)mxscript(b[z],function(){0!=--d||x||null==l||l()},null,null,null,function(y,F){x=!0;null!=p&&p(Error(y));console.error("Error loading script",y,F,F.stack)})};
-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var l=document.cookie.split(";"),p=0;p<l.length;p++){var d=mxUtils.trim(l[p]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}if(null!=b&&isLocalStorage){var x=new Date;x.setYear(x.getFullYear()-1);document.cookie="MODE=; expires="+x.toUTCString();localStorage.setItem(".mode",b)}}catch(z){}return b};
+App.loadScripts=function(b,k,n){for(var d=b.length,x=!1,z=0;z<b.length;z++)mxscript(b[z],function(){0!=--d||x||null==k||k()},null,null,null,function(y,F){x=!0;null!=n&&n(Error(y));console.error("Error loading script",y,F,F.stack)})};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var k=document.cookie.split(";"),n=0;n<k.length;n++){var d=mxUtils.trim(k[n]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}if(null!=b&&isLocalStorage){var x=new Date;x.setYear(x.getFullYear()-1);document.cookie="MODE=; expires="+x.toUTCString();localStorage.setItem(".mode",b)}}catch(z){}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&"1"!=urlParams.embed&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=
window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
-App.clearServiceWorker=function(b,l){navigator.serviceWorker.getRegistration().then(function(p){null!=p&&p.unregister().then(function(){null!=b&&(b(),b=null)})})["catch"](function(){null!=l&&l()})};App.isSameDomain=function(b){var l=document.createElement("a");l.href=b;return l.protocol===window.location.protocol||l.host===window.location.host};App.isBuiltInPlugin=function(b){for(var l in App.pluginRegistry)if(App.pluginRegistry[l]==b)return!0;return!1};
+App.clearServiceWorker=function(b,k){navigator.serviceWorker.getRegistration().then(function(n){null!=n&&n.unregister().then(function(){null!=b&&(b(),b=null)})})["catch"](function(){null!=k&&k()})};App.isSameDomain=function(b){var k=document.createElement("a");k.href=b;return k.protocol===window.location.protocol||k.host===window.location.host};App.isBuiltInPlugin=function(b){for(var k in App.pluginRegistry)if(App.pluginRegistry[k]==b)return!0;return!1};
App.isSimpleThemePreferred=function(){var b=navigator.userAgent||navigator.vendor||window.opera;return 1024>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||/android/i.test(b)||/iPad|iPhone|iPod/.test(b)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints};
-App.main=function(b,l){try{var p=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var L=parseInt(mxSettings.settings.autosaveDelay);!isNaN(L)&&0<L?(DrawioFile.prototype.autosaveDelay=L,EditorUi.debug("Setting autosaveDelay",L)):EditorUi.debug("Invalid autosaveDelay",L)}null!=mxSettings.settings.defaultEdgeLength&&(L=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(L)&&0<L?(Graph.prototype.defaultEdgeLength=L,EditorUi.debug("Using defaultEdgeLength",L)):
+App.main=function(b,k){try{var n=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var L=parseInt(mxSettings.settings.autosaveDelay);!isNaN(L)&&0<L?(DrawioFile.prototype.autosaveDelay=L,EditorUi.debug("Setting autosaveDelay",L)):EditorUi.debug("Invalid autosaveDelay",L)}null!=mxSettings.settings.defaultEdgeLength&&(L=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(L)&&0<L?(Graph.prototype.defaultEdgeLength=L,EditorUi.debug("Using defaultEdgeLength",L)):
EditorUi.debug("Invalid defaultEdgeLength",L))}}catch(f){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(f.stack)):console.error(f)}try{if(null!=Menus.prototype.defaultFonts)for(L=0;L<Menus.prototype.defaultFonts.length;L++){var c=Menus.prototype.defaultFonts[L];"string"!==typeof c&&null!=c.fontFamily&&null!=c.fontUrl&&Graph.addFont(c.fontFamily,c.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
mxLanguage))}catch(f){document.body.innerHTML="",c=document.createElement("pre"),mxUtils.write(c,f.stack),document.body.appendChild(c)}},d=function(L){mxUtils.getAll("1"!=urlParams.dev?[L]:[L,STYLE_PATH+"/default.xml"],function(c){function f(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
-"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(E){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var A=null!=l?l():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
+"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(E){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var B=null!=k?k():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&
"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
-"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(A);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,A,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?
-(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(c[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var k=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=k){EditorUi.debug("Setting configuration",JSON.stringify(k));if(null!=k.merge){var m=localStorage.getItem(Editor.configurationKey);if(null!=
-m)try{var t=JSON.parse(m),v;for(v in k.merge)t[v]=k.merge[v];k=t}catch(A){window.location.hash="",alert(A)}else k=k.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(k)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(A){window.location.hash="",alert(A)}1<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
-c[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?f():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],f,function(A){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,A.stack);document.body.appendChild(E)}))},function(c){c=document.getElementById("geStatus");null!=c&&(c.innerHTML="Error loading page. <a>Please try refreshing.</a>",c.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
+"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(B);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,B,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?
+(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(c[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var m=localStorage.getItem(Editor.configurationKey);if(null!=
+m)try{var t=JSON.parse(m),v;for(v in l.merge)t[v]=l.merge[v];l=t}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}1<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
+c[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?f():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],f,function(B){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,B.stack);document.body.appendChild(E)}))},function(c){c=document.getElementById("geStatus");null!=c&&(c.innerHTML="Error loading page. <a>Please try refreshing.</a>",c.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
"en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(Editor.loadCompatibleCss(),App.isMainCalled=!0,window.onerror=function(L,
-c,f,k,m){EditorUi.logError("Global: "+(null!=L?L:""),c,f,k,m,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",k,"\nError:",m)):console.error("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",k,"\nError:",m);window.setTimeout(function(){alert("Error: "+(null!=L?L:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==
+c,f,l,m){EditorUi.logError("Global: "+(null!=L?L:""),c,f,l,m,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",l,"\nError:",m)):console.error("Message:",L,"\nURL:",c,"\nLine:",f,"\nColumn:",l,"\nError:",m);window.setTimeout(function(){alert("Error: "+(null!=L?L:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==
urlParams.embed||"1"==urlParams.lightbox){var x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"!=urlParams.enableSW&&
"1"==urlParams.dev)?(EditorUi.debug("App.main","Uninstalling service worker"),App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")})):Editor.enableServiceWorker&&navigator.serviceWorker.getRegistration().then(function(L){null!=L?(EditorUi.debug("App.main","Updating service worker"),L.update()):!Editor.isSettingsEnabled()||null!=mxSettings.settings&&!mxSettings.settings.isNew||"1"==urlParams.enableSW?(EditorUi.debug("App.main","Installing service worker"),navigator.serviceWorker.register("service-worker.js")):
EditorUi.debug("App.main","Skipping service worker (first load)")})}catch(L){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var z=
null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var y=JSON.parse(localStorage.getItem(mxSettings.key));null!=y&&(z=y.plugins)}catch(L){}y=urlParams.p;App.initPluginCallback();null!=y&&App.loadPlugins(y.split(";"));if(null!=z&&0<z.length&&"0"!=urlParams.plugins)for(x=0;x<z.length;x++)try{("/"==z[x].charAt(0)&&(z[x]=PLUGINS_BASE_PATH+z[x]),App.isSameDomain(z[x]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(z[x])?null==
App.pluginsLoaded[z[x]]&&(App.pluginsLoaded[z[x]]=!0,App.embedModePluginsCount++,mxscript(z[x])):null!=window.console&&console.log("Unknown plugin:",z[x]):null!=window.console&&console.log("Blocked plugin:",z[x])}catch(L){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
-null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var F=window.opener||window.parent,M=function(L){if(L.source==F)try{var c=JSON.parse(L.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",M),Editor.configure(c.config),mxSettings.load(),null!=c.config.darkColor&&document.body.style.setProperty("--dark-color",c.config.darkColor),c.colorSchemeMeta&&mxmeta("color-scheme",
-"dark light"),p())}catch(f){null!=window.console&&console.log("Error in configure message: "+f,L.data)}};mxEvent.addListener(window,"message",M);F.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}if(isLocalStorage&&
-null!=localStorage&&"1"!=urlParams.embed){var K=localStorage.getItem(Editor.configurationKey);if(null!=K)try{K=JSON.parse(K),null!=K&&(EditorUi.debug("Using local configuration",K),Editor.configure(K),mxSettings.load())}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}}}p()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(L){document.body.innerHTML="",z=
+null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var F=window.opener||window.parent,N=function(L){if(L.source==F)try{var c=JSON.parse(L.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",N),Editor.configure(c.config),mxSettings.load(),null!=c.config.darkColor&&document.body.style.setProperty("--dark-color",c.config.darkColor),c.colorSchemeMeta&&mxmeta("color-scheme",
+"dark light"),n())}catch(f){null!=window.console&&console.log("Error in configure message: "+f,L.data)}};mxEvent.addListener(window,"message",N);F.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}if(isLocalStorage&&
+null!=localStorage&&"1"!=urlParams.embed){var K=localStorage.getItem(Editor.configurationKey);if(null!=K)try{K=JSON.parse(K),null!=K&&(EditorUi.debug("Using local configuration",K),Editor.configure(K),mxSettings.load())}catch(L){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(L.stack)):console.error(L)}}}n()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(L){document.body.innerHTML="",z=
document.createElement("pre"),mxUtils.write(z,L.stack),document.body.appendChild(z)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,l){EditorUi.debug("Loading plugins",b);for(var p=0;p<b.length;p++)if(null!=b[p]&&0<b[p].length)try{if(null!=App.pluginRegistry[b[p]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[p]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?l?mxinclude(d):mxscript(d):l?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[p])}catch(x){null!=window.console&&console.log("Error loading plugin:",
-b[p],x)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.loadPlugins=function(b,k){EditorUi.debug("Loading plugins",b);for(var n=0;n<b.length;n++)if(null!=b[n]&&0<b[n].length)try{if(null!=App.pluginRegistry[b[n]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[n]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?k?mxinclude(d):mxscript(d):k?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[n])}catch(x){null!=window.console&&console.log("Error loading plugin:",
+b[n],x)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){if(!App.blockedAncestorFrames()){this.buttonContainer=this.createButtonContainer();EditorUi.prototype.init.apply(this,arguments);this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(!0)}));try{this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||
"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(y){null!=window.console&&console.log("GitHubClient disabled: "+y.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&this.gitLab.addListener("userChanged",
mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(y){null!=window.console&&console.log("GitLabClient disabled: "+y.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",
-this.oneDrive))}catch(y){null!=window.console&&console.log("OneDriveClient disabled: "+y.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var l=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",
-"client",this.trello))}catch(y){null!=window.console&&console.log("TrelloClient disabled: "+y.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=l)});l()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var p=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var y=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
-this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(F){null!=window.console&&console.log("DriveClient disabled: "+F.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,y),window.DrawGapiClientCallback=null):y()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=p)});p()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
+this.oneDrive))}catch(y){null!=window.console&&console.log("OneDriveClient disabled: "+y.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var k=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",
+"client",this.trello))}catch(y){null!=window.console&&console.log("TrelloClient disabled: "+y.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var n=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var y=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
+this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(F){null!=window.console&&console.log("DriveClient disabled: "+F.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,y),window.DrawGapiClientCallback=null):y()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=n)});n()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(y){null!=window.console&&console.log("DropboxClient disabled: "+y.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed&&(this.setGraphEnabled(!1),"1"==urlParams.local?this.setMode(App.MODE_DEVICE):
this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(y){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),mxUtils.bind(this,function(){y.prompt()}),!0,!0)})),!this.isOwnGDriveDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var y=this.getCurrentFile();y=null!=y?y.getMode():
null;mxClient.IS_CHROMEAPP||mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||y!=App.MODE_DEVICE&&y!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&!this.editor.editable))){var x=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=
!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(y){Editor.enableRealtimeCache=200<=y.getStatus()&&299>=y.getStatus();window.clearTimeout(x)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(x)})}this.updateHeader();if(null!=this.menubar){if("sketch"!=Editor.currentTheme&&("simple"!=Editor.currentTheme||"1"!=urlParams.embed)){var z=mxUtils.bind(this,function(){"1"!=urlParams.embed?this.menubar.container.appendChild(this.buttonContainer):this.toolbarContainer.appendChild(this.buttonContainer)});
this.addListener("languageChanged",z);this.addListener("currentThemeChanged",z);z()}("kennedy"==Editor.currentTheme&&"1"==urlParams.embed||"atlas"==Editor.currentTheme&&"1"!=urlParams.embed)&&this.setCompactMode(!0);if("atlas"==Editor.currentTheme||"1"==urlParams.atlas)this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.className="geSmallAppIcon","1"!=urlParams.embed&&(this.icon.style.cursor=
"pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(y){this.appIconClicked(y)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild)}this.editor.graph.isViewer()&&this.initializeViewerMode()}};
-App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var l=0;l<window.location.ancestorOrigins.length;l++)if(b+=" -> "+window.location.ancestorOrigins[l],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-2-ll3likebca-uc.a.run.app"))return!0}}catch(p){}return!1};
+App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var k=0;k<window.location.ancestorOrigins.length;k++)if(b+=" -> "+window.location.ancestorOrigins[k],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-2-ll3likebca-uc.a.run.app"))return!0}}catch(n){}return!1};
App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
-App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var l=null!=b.sync?"client_"+
-b.sync.clientId:"nosync";b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(l+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);l=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(l=this.timeSince(b.lastSaved),null==l&&(l=mxResources.get("lessThanAMinute")),l=mxResources.get("lastSaved",[l]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),l,mxResources.get("ignore"),
+App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var k=null!=b.sync?"client_"+
+b.sync.clientId:"nosync";b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(k+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);k=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(k=this.timeSince(b.lastSaved),null==k&&(k=mxResources.get("lessThanAMinute")),k=mxResources.get("lastSaved",[k]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),k,mxResources.get("ignore"),
mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,140,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isOwnGDriveDomain=function(){return"test.draw.io"==window.location.hostname||"preprod.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname)};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnGDriveDomain()};App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};
-App.prototype.searchHelp=function(b){var l="https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(b);this.openLink(l);0<b.length&&EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b})};
+App.prototype.searchHelp=function(b){var k="https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(b);this.openLink(k);0<b.length&&EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b})};
App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")}),!0)};App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink("https://get.diagrams.net/")}),!0,!0)};
App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,
-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("border","0");l.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(l);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var p=document.createElement("img");
-p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.setAttribute("title","1 star");p.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");p.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(p);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("border","0");k.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(k);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var n=document.createElement("img");
+n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.setAttribute("title","1 star");n.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");n.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(n);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(d);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.setAttribute("title","3 star");x.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");x.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(x);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.setAttribute("title","4 star");z.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");z.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(z);this.bannerShowing=!0;var y=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(l,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(p,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(F){mxEvent.consume(F);y()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(z,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");y()}));l=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){y()}),1E3)});window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(l,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),l=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=l&&null!=b.id){var p=l.lastIndexOf("@"),d=0<=p?l.substring(p+1):"";b=Editor.crc32(b.id);"gmail.com"!==d.toLowerCase()&&mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(x){try{if(200<=x.getStatus()&&299>=x.getStatus()){var z=x.getText();if(0<z.length){var y=JSON.parse(z);
-null!=y&&this.handleLicense(y,d)}}}catch(F){}}))}};App.prototype.handleLicense=function(b,l){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
-App.prototype.addRecent=function(b,l,p){if(isLocalStorage&&null!=localStorage){l=null!=l?l:"";var d=this.getRecent(l);if(null==d)d=[];else for(var x=0;x<d.length;x++)d[x].mode==b.mode&&d[x].id==b.id&&d.splice(x,1);null!=d&&(p=null!=p?p:10,d.unshift(b),d=d.slice(0,p),localStorage.setItem(".recent"+l,JSON.stringify(d)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var l=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=l)return JSON.parse(l)}catch(p){}return null}};
-App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(l){}};
+b.appendChild(z);this.bannerShowing=!0;var y=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(k,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(n,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(F){mxEvent.consume(F);y()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);y()}));mxEvent.addListener(z,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");y()}));k=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){y()}),1E3)});window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(k,6E4)}};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),k=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=k&&null!=b.id){var n=k.lastIndexOf("@"),d=0<=n?k.substring(n+1):"";b=Editor.crc32(b.id);"gmail.com"!==d.toLowerCase()&&mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(x){try{if(200<=x.getStatus()&&299>=x.getStatus()){var z=x.getText();if(0<z.length){var y=JSON.parse(z);
+null!=y&&this.handleLicense(y,d)}}}catch(F){}}))}};App.prototype.handleLicense=function(b,k){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.addRecent=function(b,k,n){if(isLocalStorage&&null!=localStorage){k=null!=k?k:"";var d=this.getRecent(k);if(null==d)d=[];else for(var x=0;x<d.length;x++)d[x].mode==b.mode&&d[x].id==b.id&&d.splice(x,1);null!=d&&(n=null!=n?n:10,d.unshift(b),d=d.slice(0,n),localStorage.setItem(".recent"+k,JSON.stringify(d)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var k=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=k)return JSON.parse(k)}catch(n){}return null}};
+App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(k){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");this.unloading=!0;var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,l=this.getCurrentFile();null==l||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=l&&(b=(null!=l.getTitle()?l.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
-App.prototype.getThumbnail=function(b,l,p){p=null!=p?p:0;var d=!1;try{var x=!0,z=window.setTimeout(mxUtils.bind(this,function(){x=!1;l(null)}),this.timeout),y=mxUtils.bind(this,function(P){window.clearTimeout(z);x&&l(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var F=this.editor.graph,M=F.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());F.setBackgroundImage=this.editor.graph.setBackgroundImage;
-var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(M):null!=L.viewState&&null!=L.viewState&&(M=L.viewState.backgroundImage,F.setBackgroundImage(M));F.getGlobalVariable=function(P){return"page"==P?L.getName():"pagenumber"==P?1:K.apply(this,arguments)};F.getGlobalVariable=K;document.body.appendChild(F.container);F.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{F!=this.editor.graph&&null!=F.container.parentNode&&
-F.container.parentNode.removeChild(F.container)}catch(q){P=null}y(P)}),b,this.thumbImageCache,"#ffffff",function(){y()},null,null,null,null,null,null,F,p,null,null,null,"diagram",null),d=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var c=document.createElement("canvas"),f=F.getGraphBounds(),k=F.view.translate,m=F.view.scale;null!=M&&(f=mxRectangle.fromRectangle(f),f.add(new mxRectangle((k.x+M.x)*m,(k.y+M.y)*m,M.width*m,M.height*m)));var t=b/f.width;t=Math.min(1,Math.min(3*b/(4*
-f.height),t));var v=Math.floor(f.x),A=Math.floor(f.y);c.setAttribute("width",Math.ceil(t*(f.width+4)));c.setAttribute("height",Math.ceil(t*(f.height+4)));var E=c.getContext("2d");E.scale(t,t);E.translate(-v,-A);var D=F.background;if(null==D||""==D||D==mxConstants.NONE)D="#ffffff";E.save();E.fillStyle=D;E.fillRect(v,A,Math.ceil(f.width+4),Math.ceil(f.height+4));E.restore();if(null!=M){var B=new Image;B.src=M.src;E.drawImage(B,M.x*t,M.y*t,M.width*t,M.height*t)}var S=new mxJsCanvas(c),R=new mxAsyncCanvas(this.thumbImageCache);
+App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,k=this.getCurrentFile();null==k||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=k&&(b=(null!=k.getTitle()?k.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
+App.prototype.getThumbnail=function(b,k,n){n=null!=n?n:0;var d=!1;try{var x=!0,z=window.setTimeout(mxUtils.bind(this,function(){x=!1;k(null)}),this.timeout),y=mxUtils.bind(this,function(P){window.clearTimeout(z);x&&k(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var F=this.editor.graph,N=F.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());F.setBackgroundImage=this.editor.graph.setBackgroundImage;
+var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(N):null!=L.viewState&&null!=L.viewState&&(N=L.viewState.backgroundImage,F.setBackgroundImage(N));F.getGlobalVariable=function(P){return"page"==P?L.getName():"pagenumber"==P?1:K.apply(this,arguments)};F.getGlobalVariable=K;document.body.appendChild(F.container);F.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{F!=this.editor.graph&&null!=F.container.parentNode&&
+F.container.parentNode.removeChild(F.container)}catch(q){P=null}y(P)}),b,this.thumbImageCache,"#ffffff",function(){y()},null,null,null,null,null,null,F,n,null,null,null,"diagram",null),d=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var c=document.createElement("canvas"),f=F.getGraphBounds(),l=F.view.translate,m=F.view.scale;null!=N&&(f=mxRectangle.fromRectangle(f),f.add(new mxRectangle((l.x+N.x)*m,(l.y+N.y)*m,N.width*m,N.height*m)));var t=b/f.width;t=Math.min(1,Math.min(3*b/(4*
+f.height),t));var v=Math.floor(f.x),B=Math.floor(f.y);c.setAttribute("width",Math.ceil(t*(f.width+4)));c.setAttribute("height",Math.ceil(t*(f.height+4)));var E=c.getContext("2d");E.scale(t,t);E.translate(-v,-B);var D=F.background;if(null==D||""==D||D==mxConstants.NONE)D="#ffffff";E.save();E.fillStyle=D;E.fillRect(v,B,Math.ceil(f.width+4),Math.ceil(f.height+4));E.restore();if(null!=N){var A=new Image;A.src=N.src;E.drawImage(A,N.x*t,N.y*t,N.width*t,N.height*t)}var S=new mxJsCanvas(c),R=new mxAsyncCanvas(this.thumbImageCache);
S.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(P,q){P.shape instanceof mxShape&&P.shape.checkBounds()&&(q.save(),q.translate(.5,.5),P.shape.paint(q),q.translate(-.5,-.5),q.restore())};T.drawText=function(P,q){};T.drawState(F.getView().getState(F.model.root),R);R.finish(mxUtils.bind(this,function(){try{T.drawState(F.getView().getState(F.model.root),S),F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}catch(P){c=null}y(c)}));
d=!0}}catch(P){d=!1,null!=F&&F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}d||window.clearTimeout(z);return d};
-(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(l,p){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();l=null!=d?d.getMode():l;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){l==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):l==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
-mxResources.get("openIt",[mxResources.get("dropbox")])):l==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(p)try{if(isLocalStorage)localStorage.setItem(".mode",l);else if("undefined"!=typeof Storage){var x=new Date;x.setYear(x.getFullYear()+1);document.cookie="MODE="+l+"; expires="+
+(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(k,n){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();k=null!=d?d.getMode():k;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){k==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):k==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
+mxResources.get("openIt",[mxResources.get("dropbox")])):k==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(n)try{if(isLocalStorage)localStorage.setItem(".mode",k);else if("undefined"!=typeof Storage){var x=new Date;x.setYear(x.getFullYear()+1);document.cookie="MODE="+k+"; expires="+
x.toUTCString()}}catch(z){}}})();
-App.prototype.appIconClicked=function(b){var l=this.getCurrentFile(),p=null!=l?l.getMode():null;l=null!=l?mxEvent.isAltDown(b)?l.getFolderUrl():l.getFileUrl():null;null!=l?this.openLink(l):p==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):p==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):p==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):p==App.MODE_GITHUB?this.openLink("https://github.com/"):p==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):p==App.MODE_TRELLO?
-this.openLink("https://trello.com/"):p==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var l=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(l.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(p,d,x){this.spinner.stop();null==d&&(d=urlParams.title,x=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(Editor.useCanvasForExport?
--1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,p,d):new LocalFile(this,p,d,x))}))}}catch(p){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.appIconClicked=function(b){var k=this.getCurrentFile(),n=null!=k?k.getMode():null;k=null!=k?mxEvent.isAltDown(b)?k.getFolderUrl():k.getFileUrl():null;null!=k?this.openLink(k):n==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):n==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):n==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):n==App.MODE_GITHUB?this.openLink("https://github.com/"):n==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):n==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):n==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var k=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(k.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(n,d,x){this.spinner.stop();null==d&&(d=urlParams.title,x=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(Editor.useCanvasForExport?
+-1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,n,d):new LocalFile(this,n,d,x))}))}}catch(n){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){try{if("1"!=urlParams.embed)try{if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}catch(b){this.handleError(b)}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})}catch(b){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(b.stack)):(EditorUi.logError(b.message,null,null,null,b),alert(b.message))}};
-App.prototype.showRefreshDialog=function(b,l){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),l||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&p.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
+App.prototype.showRefreshDialog=function(b,k){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),k||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&n.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
(b=this.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.dialog.container.appendChild(b)))};
-App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var l=document.createElement("div");l.className="geAlert";l.style.zIndex=2E9;l.style.left="50%";l.style.top="-100%";l.style.maxWidth="80%";l.style.width="max-content";l.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");l.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
-b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");l.appendChild(b);mxEvent.addListener(b,"click",function(p){null!=l.parentNode&&(l.parentNode.removeChild(l),mxEvent.consume(p))});document.body.appendChild(l);window.setTimeout(function(){l.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(l.style,"transition","all 2s ease");l.style.opacity="0";window.setTimeout(function(){null!=l.parentNode&&l.parentNode.removeChild(l)},
+App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var k=document.createElement("div");k.className="geAlert";k.style.zIndex=2E9;k.style.left="50%";k.style.top="-100%";k.style.maxWidth="80%";k.style.width="max-content";k.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");k.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
+b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");k.appendChild(b);mxEvent.addListener(b,"click",function(n){null!=k.parentNode&&(k.parentNode.removeChild(k),mxEvent.consume(n))});document.body.appendChild(k);window.setTimeout(function(){k.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(k.style,"transition","all 2s ease");k.style.opacity="0";window.setTimeout(function(){null!=k.parentNode&&k.parentNode.removeChild(k)},
2E3)},15E3)}};
-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(M,K,L,c,f){"ResizeObserver loop limit exceeded"!=M&&(EditorUi.logError("Uncaught: "+(null!=M?M:""),K,L,c,f,null,!0),b.handleError({message:M},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(M){var K=this.getCurrentFile();EditorUi.debug("storage event",[M],
-[K]);null!=K&&".draft-alive-check"==M.key&&null!=M.newValue&&null!=K.draftId&&(this.draftAliveCheck=M.newValue,K.saveDraft())}))}catch(M){}var l=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(M){try{var K=this.getDiagramId();if(K!=l){l=K;var L=this.getCurrentFile();null!=L&&L.getHash()==K||this.loadFile(K,!0)}else{var c=this.getHashObject();if(null!=c&&null!=c.pageId&&null!=this.currentPage&&c.pageId!=this.currentPage.getId()){var f=this.getPageById(c.pageId);
-null!=f&&this.selectPage(f)}}}catch(k){null!=document.body&&this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(M){this.handleError(M,mxResources.get("errorLoadingFile"))}))}catch(M){this.handleError(M,mxResources.get("errorLoadingFile"))}else if((null==
-window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var p=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var M=mxUtils.bind(this,function(c){Editor.isPngDataUrl(c)&&(c=Editor.extractGraphModelFromPng(c));var f=urlParams.title;f=null!=f?decodeURIComponent(f):this.defaultFilename;c=new LocalFile(this,
-c,f,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(c.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(c);this.editor.chromeless||(c.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),K=window.opener||window.parent;if(K!=window){var L=urlParams.create;null!=L?M(K[decodeURIComponent(L)]):(L=urlParams.data,null!=L?M(decodeURIComponent(L)):this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.createTimeout(2E3,mxUtils.bind(this,function(c){this.installMessageHandler(mxUtils.bind(this,function(f,k){k.source==K&&c.clear()&&(this.spinner.stop(),M(f))}))}),mxUtils.bind(this,function(c){this.handleError(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)L=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=L;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,
+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(N,K,L,c,f){"ResizeObserver loop limit exceeded"!=N&&(EditorUi.logError("Uncaught: "+(null!=N?N:""),K,L,c,f,null,!0),b.handleError({message:N},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(N){var K=this.getCurrentFile();EditorUi.debug("storage event",[N],
+[K]);null!=K&&".draft-alive-check"==N.key&&null!=N.newValue&&null!=K.draftId&&(this.draftAliveCheck=N.newValue,K.saveDraft())}))}catch(N){}var k=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(N){try{var K=this.getDiagramId();if(K!=k){k=K;var L=this.getCurrentFile();null!=L&&L.getHash()==K||this.loadFile(K,!0)}else{var c=this.getHashObject();if(null!=c&&null!=c.pageId&&null!=this.currentPage&&c.pageId!=this.currentPage.getId()){var f=this.getPageById(c.pageId);
+null!=f&&this.selectPage(f)}}}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(N){this.handleError(N,mxResources.get("errorLoadingFile"))}))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}else if((null==
+window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var n=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var N=mxUtils.bind(this,function(c){Editor.isPngDataUrl(c)&&(c=Editor.extractGraphModelFromPng(c));var f=urlParams.title;f=null!=f?decodeURIComponent(f):this.defaultFilename;c=new LocalFile(this,
+c,f,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(c.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(c);this.editor.chromeless||(c.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),K=window.opener||window.parent;if(K!=window){var L=urlParams.create;null!=L?N(K[decodeURIComponent(L)]):(L=urlParams.data,null!=L?N(decodeURIComponent(L)):this.spinner.spin(document.body,mxResources.get("loading"))&&
+this.createTimeout(2E3,mxUtils.bind(this,function(c){this.installMessageHandler(mxUtils.bind(this,function(f,l){l.source==K&&c.clear()&&(this.spinner.stop(),N(f))}))}),mxUtils.bind(this,function(c){this.handleError(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)L=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=L;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,
!0),this.actions.get("insertTemplate").funct();else{L=!1;try{L=null!=window.opener&&null!=window.opener.openFile}catch(c){}L?this.spinner.spin(document.body,mxResources.get("loading")):(L=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=L&&0!=L.length||this.editor.isChromelessView()?null!=L&&0<L.length?this.loadFile(L,null,null,mxUtils.bind(this,function(){var c=decodeURIComponent(urlParams.viewbox||"");if(""!=c)try{var f=JSON.parse(c);this.editor.graph.fitWindow(f,
-f.border)}catch(k){console.error(k)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(d=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,
-8))&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var x=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),z=mxUtils.bind(this,function(M){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,M,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var K=urlParams.title;K=null!=K?decodeURIComponent(K):this.defaultFilename;M=this.getServiceCount(!0);
-isLocalStorage&&M++;var L=4>=M?2:6<M?4:3;K=new CreateDialog(this,K,mxUtils.bind(this,function(c,f){if(null==f){this.hideDialog();var k=Editor.useLocalStorage;this.createFile(0<c.length?c:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(f,mxUtils.bind(this,function(m){this.createFile(c,this.getFileData(!0),null,f,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,L,null,null,null,this.editor.fileExtensions);this.showDialog(K.container,
-420,M>L?390:280,!0,!1,mxUtils.bind(this,function(c){c&&null==this.getCurrentFile()&&this.showSplash()}));K.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0)){this.spinner.stop();d=JSON.parse(d);var y=mxUtils.bind(this,function(M){this.createFile(null!=M.filename?M.filename:this.defaultFilename,M,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+
-this.getSearch(["create"]));window.location.hash="R"+Graph.compress(M)}),!0,null,!0)}),F=d.data;d.compressed&&(F=Graph.decompress(F));"mermaid"==d.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(M){M!=this.emptyDiagramXml&&y(M)})),this.generateMermaidImage(F,null,function(){},mxUtils.bind(this,function(M){for(var K=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),L=0;L<K.length;L++)K[L].parentNode.removeChild(K[L]);mxMermaidToDrawio.resetListeners();
-this.handleError(M)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):"generate"==d.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+F+"'")&&this.generateDiagram(F,mxUtils.bind(this,function(M){this.spinner.stop();y(M)}),mxUtils.bind(this,function(M){this.handleError(M,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[d]?z(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(M){this.handleError(M,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(M){z(M)},mxUtils.bind(this,function(M){this.handleError(M,mxResources.get("errorLoadingFile"),x)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash=
+f.border)}catch(l){console.error(l)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(d=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,
+8))&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var x=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),z=mxUtils.bind(this,function(N){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,N,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var K=urlParams.title;K=null!=K?decodeURIComponent(K):this.defaultFilename;N=this.getServiceCount(!0);
+isLocalStorage&&N++;var L=4>=N?2:6<N?4:3;K=new CreateDialog(this,K,mxUtils.bind(this,function(c,f){if(null==f){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<c.length?c:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(f,mxUtils.bind(this,function(m){this.createFile(c,this.getFileData(!0),null,f,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,L,null,null,null,this.editor.fileExtensions);this.showDialog(K.container,
+420,N>L?390:280,!0,!1,mxUtils.bind(this,function(c){c&&null==this.getCurrentFile()&&this.showSplash()}));K.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0)){this.spinner.stop();d=JSON.parse(d);var y=mxUtils.bind(this,function(N){this.createFile(null!=N.filename?N.filename:this.defaultFilename,N,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+
+this.getSearch(["create"]));window.location.hash="R"+Graph.compress(N)}),!0,null,!0)}),F=d.data;d.compressed&&(F=Graph.decompress(F));"mermaid"==d.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){N!=this.emptyDiagramXml&&y(N)})),this.generateMermaidImage(F,null,function(){},mxUtils.bind(this,function(N){for(var K=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),L=0;L<K.length;L++)K[L].parentNode.removeChild(K[L]);mxMermaidToDrawio.resetListeners();
+this.handleError(N)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):"generate"==d.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+F+"'")&&this.generateDiagram(F,mxUtils.bind(this,function(N){this.spinner.stop();y(N)}),mxUtils.bind(this,function(N){this.handleError(N,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[d]?z(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(N){this.handleError(N,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(N){z(N)},mxUtils.bind(this,function(N){this.handleError(N,mxResources.get("errorLoadingFile"),x)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state","splash"])),window.location.hash=
"G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&
-window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),p())}}catch(M){this.handleError(M)}};
-App.prototype.openTemplateDialog=function(b){var l=this.editor.graph;l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(p){this.hideDialog();if(null!=p){var d=this.editor.graph.getFreeInsertPoint();l.setSelectionCells(this.importXml(p,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
+window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),n())}}catch(N){this.handleError(N)}};
+App.prototype.openTemplateDialog=function(b){var k=this.editor.graph;k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&(b=new NewDialog(this,null,!1,mxUtils.bind(this,function(n){this.hideDialog();if(null!=n){var d=this.editor.graph.getFreeInsertPoint(!0);k.setSelectionCells(this.importXml(n,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));k.scrollCellToVisible(k.getSelectionCell())}}),null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,b),this.showDialog(b.container,
620,460,!0,!0,mxUtils.bind(this,function(){this.sidebar.hideTooltip()})),b.init())};
-App.prototype.generateDiagram=function(b,l,p){var d=!1,x=null,z='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(y){y!=this.emptyDiagramXml&&(d=!0,x=y)}));this.generateOpenAiMermaidDiagram(z,function(y,F,M,K){x=d?x:this.createMermaidXml(y,EditorUi.defaultMermaidConfig,F,M,K,b);
-l(x,F)},p)};App.prototype.loadDraft=function(b,l){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&(p.fileChanged(),null!=l&&l())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,l,p){function d(){p(x)}var x=[];try{this.getDatabaseItems(mxUtils.bind(this,function(z){EditorUi.debug("App.filterDrafts",[this],"items",z);for(var y=0;y<z.length;y++)try{var F=z[y].key;if(null!=F&&".draft_"==F.substring(0,7)){var M=JSON.parse(z[y].data);null!=M&&"draft"==M.type&&M.aliveCheck!=l&&(null==b&&null==M.fileObject||null!=M.fileObject&&M.fileObject.path==b)&&(M.key=F,x.push(M))}}catch(K){}d()}),d)}catch(z){d()}};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(l){if(1==l.length)this.loadDraft(l[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(l[0].key)}));else if(1<l.length){var p=new Date(l[0].modified);p=new DraftDialog(this,1<l.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[p.toLocaleDateString()+" "+p.toLocaleTimeString()]),1<l.length?null:l[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d&&null!=l[d]?d:0;this.loadDraft(l[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(l[d].key)}))}),mxUtils.bind(this,function(d,x){this.removeDatabaseItem(l[""!=d?d:0].key);null!=x&&x()}),null,null,null,1<l.length?l:null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(d){d&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
-this.getFileData(),null,null,null,null,null,!0))}));p.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(l){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var l=this.getServiceCount(!0),p=mxUtils.bind(this,function(){var x=new SplashDialog(this);this.showDialog(x.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(z,y){!z&&!y||mxClient.IS_CHROMEAPP||(z=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=z)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&p();else{b=4==l?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();p()}),b);this.showDialog(d.container,3>b?200:300,3<l?320:210,!0,!1)}}};
-App.prototype.addLanguageMenu=function(b,l,p){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),this.setElementTitle(d,"language"),d.className="geAdaptiveAsset",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor="pointer",d.style.bottom="20px",d.style.right=
-null!=p?p:"22px",l&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=p?p:"24px",l=document.createElement("span"),l.style.display="inline-block",l.style.fontSize="12px",l.style.margin="2px 24px 0 0",l.style.userSelect="none",mxUtils.write(l,mxResources.get("language")),d.appendChild(l),l.className="geAdaptiveAsset"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(x){this.editor.graph.popupMenuHandler.hideMenu();var z=new mxPopupMenu(this.menus.get("language").funct);
+App.prototype.generateDiagram=function(b,k,n){var d=!1,x=null,z='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(y){y!=this.emptyDiagramXml&&(d=!0,x=y)}));this.generateOpenAiMermaidDiagram(z,function(y,F,N,K){x=d?x:this.createMermaidXml(y,EditorUi.defaultMermaidConfig,F,N,K,b);
+k(x,F)},n)};App.prototype.loadDraft=function(b,k){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&(n.fileChanged(),null!=k&&k())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,k,n){function d(){n(x)}var x=[];try{this.getDatabaseItems(mxUtils.bind(this,function(z){EditorUi.debug("App.filterDrafts",[this],"items",z);for(var y=0;y<z.length;y++)try{var F=z[y].key;if(null!=F&&".draft_"==F.substring(0,7)){var N=JSON.parse(z[y].data);null!=N&&"draft"==N.type&&N.aliveCheck!=k&&(null==b&&null==N.fileObject||null!=N.fileObject&&N.fileObject.path==b)&&(N.key=F,x.push(N))}}catch(K){}d()}),d)}catch(z){d()}};
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(k){if(1==k.length)this.loadDraft(k[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(k[0].key)}));else if(1<k.length){var n=new Date(k[0].modified);n=new DraftDialog(this,1<k.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
+[n.toLocaleDateString()+" "+n.toLocaleTimeString()]),1<k.length?null:k[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d&&null!=k[d]?d:0;this.loadDraft(k[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(k[d].key)}))}),mxUtils.bind(this,function(d,x){this.removeDatabaseItem(k[""!=d?d:0].key);null!=x&&x()}),null,null,null,1<k.length?k:null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(d){d&&("0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
+this.getFileData(),null,null,null,null,null,!0))}));n.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(k){}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var k=this.getServiceCount(!0),n=mxUtils.bind(this,function(){var x=new SplashDialog(this);this.showDialog(x.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(z,y){!z&&!y||mxClient.IS_CHROMEAPP||(z=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=z)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&n();else{b=4==k?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();n()}),b);this.showDialog(d.container,3>b?200:300,3<k?320:210,!0,!1)}}};
+App.prototype.addLanguageMenu=function(b,k,n){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),this.setElementTitle(d,"language"),d.className="geAdaptiveAsset",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor="pointer",d.style.bottom="20px",d.style.right=
+null!=n?n:"22px",k&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=n?n:"24px",k=document.createElement("span"),k.style.display="inline-block",k.style.fontSize="12px",k.style.margin="2px 24px 0 0",k.style.userSelect="none",mxUtils.write(k,mxResources.get("language")),d.appendChild(k),k.className="geAdaptiveAsset"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(x){this.editor.graph.popupMenuHandler.hideMenu();var z=new mxPopupMenu(this.menus.get("language").funct);
z.smartSeparators=!0;z.showDisabled=!0;z.autoExpand=!0;z.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(z,arguments);z.destroy()});var y=mxUtils.getOffset(d);z.popup(y.x,y.y+d.offsetHeight,null,x);this.setCurrentMenu(z)})),b.appendChild(d));return d};
-App.prototype.loadFileSystemEntry=function(b,l,p){p=null!=p?p:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var x=new FileReader;x.onload=mxUtils.bind(this,function(z){var y=mxUtils.bind(this,function(F){try{if(null!=l){var M=z.target.result;"image/png"==d.type&&(M=this.extractGraphModelFromPng(M));l(new LocalFile(this,M,d.name,null,b,d,F))}else this.openFileHandle(z.target.result,d.name,d,!1,b,F)}catch(K){p(K)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
-function(F){y("denied"!==F)})):b.createWritable().then(mxUtils.bind(this,function(){y(!0)}),mxUtils.bind(this,function(F){y(!1)}))});x.onerror=p;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?x.readAsText(d):x.readAsDataURL(d)}),p)}catch(d){p(d)}};
-App.prototype.createFileSystemOptions=function(b){var l=[],p=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(p=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var x={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};x.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==p?l.splice(0,0,
-x):this.editor.diagramFileTypes[d].extension==p?l.splice(0,0,x):l.push(x)}return{types:l,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,l,p){l=null!=l?l:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});p=null!=p?p:this.createFileSystemOptions();window.showSaveFilePicker(p).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(x){b(d,x)}),l)}),l)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var l=this.getServiceForName(b);if(null!=l)l.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(y){null!=y&&0<y.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(y[0])}),
-mxUtils.bind(this,function(y){"AbortError"!=y.name&&this.handleError(y)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var p=document.createElement("input");p.setAttribute("type","file");mxEvent.addListener(p,"change",mxUtils.bind(this,function(){null!=p.files&&(this.openFiles(p.files),p.type="",p.type="file",p.value="")}));p.style.display="none";document.body.appendChild(p);this.openFileInputElt=p}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(y,F){StorageFile.listFiles(this,"F",y,F)});window.openBrowserFile=mxUtils.bind(this,function(y,F,M){StorageFile.getFileContent(this,y,F,M)});window.deleteBrowserFile=mxUtils.bind(this,function(y,F,M){StorageFile.deleteFile(this,y,F,M)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(y,F){var M=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=F.substring(F.length-4)||(F=F.substring(0,F.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,y,F):new LocalFile(this,y,F))}),K=this.getCurrentFile();null!=K&&K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M()}));var x=this.dialog,z=x.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=
+App.prototype.loadFileSystemEntry=function(b,k,n){n=null!=n?n:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var x=new FileReader;x.onload=mxUtils.bind(this,function(z){var y=mxUtils.bind(this,function(F){try{if(null!=k){var N=z.target.result;"image/png"==d.type&&(N=this.extractGraphModelFromPng(N));k(new LocalFile(this,N,d.name,null,b,d,F))}else this.openFileHandle(z.target.result,d.name,d,!1,b,F)}catch(K){n(K)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
+function(F){y("denied"!==F)})):b.createWritable().then(mxUtils.bind(this,function(){y(!0)}),mxUtils.bind(this,function(F){y(!1)}))});x.onerror=n;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?x.readAsText(d):x.readAsDataURL(d)}),n)}catch(d){n(d)}};
+App.prototype.createFileSystemOptions=function(b){var k=[],n=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(n=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var x={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};x.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==n?k.splice(0,0,
+x):this.editor.diagramFileTypes[d].extension==n?k.splice(0,0,x):k.push(x)}return{types:k,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,k,n){k=null!=k?k:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});n=null!=n?n:this.createFileSystemOptions();window.showSaveFilePicker(n).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(x){b(d,x)}),k)}),k)};
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var k=this.getServiceForName(b);if(null!=k)k.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(y){null!=y&&0<y.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(y[0])}),
+mxUtils.bind(this,function(y){"AbortError"!=y.name&&this.handleError(y)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var n=document.createElement("input");n.setAttribute("type","file");mxEvent.addListener(n,"change",mxUtils.bind(this,function(){null!=n.files&&(this.openFiles(n.files),n.type="",n.type="file",n.value="")}));n.style.display="none";document.body.appendChild(n);this.openFileInputElt=n}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(y,F){StorageFile.listFiles(this,"F",y,F)});window.openBrowserFile=mxUtils.bind(this,function(y,F,N){StorageFile.getFileContent(this,y,F,N)});window.deleteBrowserFile=mxUtils.bind(this,function(y,F,N){StorageFile.deleteFile(this,y,F,N)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(y,F){var N=mxUtils.bind(this,function(){Editor.useCanvasForExport||".png"!=F.substring(F.length-4)||(F=F.substring(0,F.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,y,F):new LocalFile(this,y,F))}),K=this.getCurrentFile();null!=K&&K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()}));var x=this.dialog,z=x.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=
d;z.apply(x,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(y){this.handleError(y)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var l=mxUtils.bind(this,function(z){try{this.loadLibrary(z);this.showSidebar();try{this.sidebar.palettes[z.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(y){}}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var p=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
-this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=p&&p.pickLibrary(mxUtils.bind(this,function(z,y){null!=y?l(y):this.spinner.spin(document.body,mxResources.get("loading"))&&p.getLibrary(z,mxUtils.bind(this,function(F){this.spinner.stop();l(F)}),mxUtils.bind(this,function(F){this.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");
-d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var z=0;z<d.files.length;z++)mxUtils.bind(this,function(y){var F=new FileReader;F.onload=mxUtils.bind(this,function(M){l(new LocalLibrary(this,M.target.result,y.name))});F.readAsText(y)})(d.files[z]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(z,y){StorageFile.listFiles(this,"L",z,y)});window.openBrowserFile=mxUtils.bind(this,function(z,y,F){StorageFile.getFileContent(this,z,y,F)});window.deleteBrowserFile=mxUtils.bind(this,function(z,y,F){StorageFile.deleteFile(this,z,y,F)});var x=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,y){l(b==App.MODE_BROWSER?new StorageLibrary(this,
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var k=mxUtils.bind(this,function(z){try{this.loadLibrary(z);this.showSidebar();try{this.sidebar.palettes[z.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(y){}}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var n=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
+this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=n&&n.pickLibrary(mxUtils.bind(this,function(z,y){null!=y?k(y):this.spinner.spin(document.body,mxResources.get("loading"))&&n.getLibrary(z,mxUtils.bind(this,function(F){this.spinner.stop();k(F)}),mxUtils.bind(this,function(F){this.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");
+d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var z=0;z<d.files.length;z++)mxUtils.bind(this,function(y){var F=new FileReader;F.onload=mxUtils.bind(this,function(N){k(new LocalLibrary(this,N.target.result,y.name))});F.readAsText(y)})(d.files[z]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(z,y){StorageFile.listFiles(this,"L",z,y)});window.openBrowserFile=mxUtils.bind(this,function(z,y,F){StorageFile.getFileContent(this,z,y,F)});window.deleteBrowserFile=mxUtils.bind(this,function(z,y,F){StorageFile.deleteFile(this,z,y,F)});var x=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,y){k(b==App.MODE_BROWSER?new StorageLibrary(this,
z,y):new LocalLibrary(this,z,y))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=x;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,l,p,d,x,z,y){try{d=null!=d?d:this.mode;x=null!=x?x:!1;z=null!=z?z:!1;var F=this.createLibraryDataFromImages(l),M=mxUtils.bind(this,function(c){this.spinner.stop();null!=y&&y();this.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)});null==p&&d==App.MODE_DEVICE&&(p=new LocalLibrary(this,F,b));if(null==p)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,F,c,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),M,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),M,c):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),M,c):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),M,c):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(f,l)}),M,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,l)}),M,c):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,F,b),mxUtils.bind(this,function(f){this.hideDialog(!0);this.libraryLoaded(f,l)}),M):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
-else if(x||this.spinner.spin(document.body,mxResources.get("saving"))){p.setData(F);var K=mxUtils.bind(this,function(){p.save(!0,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);z||this.libraryLoaded(p,l);null!=y&&y()}),M)});if(b!=p.getTitle()){var L=p.getHash();p.rename(b,mxUtils.bind(this,function(c){p.constructor!=LocalLibrary&&L!=p.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(p.getHash()));this.removeLibrarySidebar(L);K()}),M)}else K()}}catch(c){this.handleError(c)}};
-App.prototype.saveFile=function(b,l){var p=this.getCurrentFile(),d=this.mode;if(null!=p){var x=mxUtils.bind(this,function(){EditorUi.enableDrafts&&p.removeDraft();this.getCurrentFile()==p||p.isModified()||(p.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=l&&l()});if(b||null==p.getTitle()||null!=p.invalidFileHandle||null==this.mode)if(null!=p&&p.constructor==LocalFile&&
-null!=p.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(F,M){p.invalidFileHandle=null;p.fileHandle=F;p.title=M.name;p.desc=M;p.editable=null;this.save(M.name,x)}),null,this.createFileSystemOptions(p.getTitle()));else{b=null!=p.getTitle()?p.getTitle():this.defaultFilename;var z=mxUtils.bind(this,function(F,M,K,L){if(null!=F&&0<F.length)if(/(\.pdf)$/i.test(F))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
-mxUtils.bind(this,function(){K.value=F.split(".").slice(0,-1).join(".");K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&M==App.MODE_DEVICE)null!=p&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(f,k){p.fileHandle=f;p.mode=App.MODE_DEVICE;p.title=k.name;p.desc=k;this.setMode(App.MODE_DEVICE);this.save(k.name,x)}),mxUtils.bind(this,
-function(f){"AbortError"!=f.name&&this.handleError(f)}),this.createFileSystemOptions(F)):(this.setMode(App.MODE_DEVICE),this.save(F,x));else if("download"==M)(new LocalFile(this,null,F)).save();else if("_blank"==M)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=M){var c=mxUtils.bind(this,function(f){var k=this.editor.graph,m=k.getSelectionCells(),t=k.getViewState(),
-v=this.currentPage;this.createFile(F,this.getFileData(/(\.xml)$/i.test(F)||0>F.indexOf(".")||/(\.drawio)$/i.test(F),/(\.svg)$/i.test(F),/(\.html)$/i.test(F)),null,M,x,null==this.mode,f,null,null,mxUtils.bind(this,function(){this.restoreViewState(v,t,m)}))});null!=L?c(L):this.pickFolder(M,c)}else null!=M&&this.save(F,x)}),y=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(F,M,K){z(F.value,M,F,K);this.hideDialog()}),y?null:["_blank"]);this.showDialog(b.container,
-420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(p.getTitle(),x)}};
-App.prototype.loadTemplate=function(b,l,p,d,x){var z=!1,y=b,F=null!=d?d:b;d=/\.png$/i.test(F)||/\.pdf$/i.test(F);var M=EditorUi.isVisioFilename(F);this.editor.isCorsEnabledForUrl(y)||(z=d||M,y="t="+(new Date).getTime(),y=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+y+(z?"&base64=1":""));this.editor.loadUrl(y,mxUtils.bind(this,function(K){try{var L=z?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(K):atob(K):K;if(M||this.isVisioData(L))M||(F=x?this.isRemoteVisioData(L)?"raw.vss":"raw.vssx":
-this.isRemoteVisioData(L)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(c){l(c)},p,F);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,F))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(c){4==c.readyState&&200<=c.status&&299>=c.status&&"<mxGraphModel"==c.responseText.substring(0,13)&&l(c.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,p);else if(this.isLucidChartData(L))this.convertLucidChart(L,
-mxUtils.bind(this,function(c){l(c)}),mxUtils.bind(this,function(c){p(c)}));else{if(/(\.png)($|\?)/i.test(F)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);l(L)}}catch(c){p(c)}}),p,/(\.png)($|\?)/i.test(F)||M,null,null,z)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
+App.prototype.saveLibrary=function(b,k,n,d,x,z,y){try{d=null!=d?d:this.mode;x=null!=x?x:!1;z=null!=z?z:!1;var F=this.createLibraryDataFromImages(k),N=mxUtils.bind(this,function(c){this.spinner.stop();null!=y&&y();this.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)});null==n&&d==App.MODE_DEVICE&&(n=new LocalLibrary(this,F,b));if(null==n)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,F,c,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,F,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,k)}),N,c):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,F,b),mxUtils.bind(this,function(f){this.hideDialog(!0);this.libraryLoaded(f,k)}),N):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
+else if(x||this.spinner.spin(document.body,mxResources.get("saving"))){n.setData(F);var K=mxUtils.bind(this,function(){n.save(!0,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);z||this.libraryLoaded(n,k);null!=y&&y()}),N)});if(b!=n.getTitle()){var L=n.getHash();n.rename(b,mxUtils.bind(this,function(c){n.constructor!=LocalLibrary&&L!=n.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(n.getHash()));this.removeLibrarySidebar(L);K()}),N)}else K()}}catch(c){this.handleError(c)}};
+App.prototype.saveFile=function(b,k){var n=this.getCurrentFile(),d=this.mode;if(null!=n){var x=mxUtils.bind(this,function(){EditorUi.enableDrafts&&n.removeDraft();this.getCurrentFile()==n||n.isModified()||(n.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=k&&k()});if(b||null==n.getTitle()||null!=n.invalidFileHandle||null==this.mode)if(null!=n&&n.constructor==LocalFile&&
+null!=n.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(F,N){n.invalidFileHandle=null;n.fileHandle=F;n.title=N.name;n.desc=N;n.editable=null;this.save(N.name,x)}),null,this.createFileSystemOptions(n.getTitle()));else{b=null!=n.getTitle()?n.getTitle():this.defaultFilename;var z=mxUtils.bind(this,function(F,N,K,L){if(null!=F&&0<F.length)if(/(\.pdf)$/i.test(F))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
+mxUtils.bind(this,function(){K.value=F.split(".").slice(0,-1).join(".");K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&N==App.MODE_DEVICE)null!=n&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(f,l){n.fileHandle=f;n.mode=App.MODE_DEVICE;n.title=l.name;n.desc=l;this.setMode(App.MODE_DEVICE);this.save(l.name,x)}),mxUtils.bind(this,
+function(f){"AbortError"!=f.name&&this.handleError(f)}),this.createFileSystemOptions(F)):(this.setMode(App.MODE_DEVICE),this.save(F,x));else if("download"==N)(new LocalFile(this,null,F)).save();else if("_blank"==N)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=N){var c=mxUtils.bind(this,function(f){var l=this.editor.graph,m=l.getSelectionCells(),t=l.getViewState(),
+v=this.currentPage;this.createFile(F,this.getFileData(/(\.xml)$/i.test(F)||0>F.indexOf(".")||/(\.drawio)$/i.test(F),/(\.svg)$/i.test(F),/(\.html)$/i.test(F)),null,N,x,null==this.mode,f,null,null,mxUtils.bind(this,function(){this.restoreViewState(v,t,m)}))});null!=L?c(L):this.pickFolder(N,c)}else null!=N&&this.save(F,x)}),y=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(F,N,K){z(F.value,N,F,K);this.hideDialog()}),y?null:["_blank"]);this.showDialog(b.container,
+420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(n.getTitle(),x)}};
+App.prototype.loadTemplate=function(b,k,n,d,x){var z=!1,y=b,F=null!=d?d:b;d=/\.png$/i.test(F)||/\.pdf$/i.test(F);var N=EditorUi.isVisioFilename(F);this.editor.isCorsEnabledForUrl(y)||(z=d||N,y="t="+(new Date).getTime(),y=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+y+(z?"&base64=1":""));this.editor.loadUrl(y,mxUtils.bind(this,function(K){try{var L=z?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(K):atob(K):K;if(N||this.isVisioData(L))N||(F=x?this.isRemoteVisioData(L)?"raw.vss":"raw.vssx":
+this.isRemoteVisioData(L)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(c){k(c)},n,F);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,F))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(c){4==c.readyState&&200<=c.status&&299>=c.status&&"<mxGraphModel"==c.responseText.substring(0,13)&&k(c.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,n);else if(this.isLucidChartData(L))this.convertLucidChart(L,
+mxUtils.bind(this,function(c){k(c)}),mxUtils.bind(this,function(c){n(c)}));else{if(/(\.png)($|\?)/i.test(F)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);k(L)}}catch(c){n(c)}}),n,/(\.png)($|\?)/i.test(F)||N,null,null,z)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===
typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};
-App.prototype.uncompressPages=function(b){if(null!=b)try{var l=mxUtils.parseXml(b);if("mxfile"==l.documentElement.nodeName){for(var p=l.documentElement.getElementsByTagName("diagram"),d=0;d<p.length;d++){var x=Editor.parseDiagramNode(p[d],!0);null!=x&&(mxUtils.setTextContent(p[d],""),p[d].appendChild(x))}b=mxUtils.getPrettyXml(l.documentElement)}}catch(z){}return b};
-App.prototype.createFile=function(b,l,p,d,x,z,y,F,M,K){EditorUi.debug("App.createFile",[this],"title",[b],"data",[l],"libs",[p],"mode",[d]);d=F?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){l=null!=l?l:this.emptyDiagramXml;null==l||Editor.defaultCompressed||(l=this.uncompressPages(l));var L=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(k){L();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
-null!=k&&this.handleError(k)});try{var f=mxUtils.bind(this,function(k){L();this.fileCreated(k,p,z,x,M,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==y&&null!=this.stateArg&&null!=this.stateArg.folderId&&(y=this.stateArg.folderId),this.drive.insertFile(b,l,y,f,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,l,f,c,!1,y):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,l,f,c,!1,y):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,l,f,c,!1,y):d==App.MODE_DROPBOX&&
-null!=this.dropbox?this.dropbox.insertFile(b,l,f,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,l,f,c,!1,y):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,l,f,c):!F&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(k,m){var t=new LocalFile(this,l,m.name,null,k,m);t.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,p,z,x,M,K)}),c,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&c(k)}),this.createFileSystemOptions(b))):
-(L(),this.fileCreated(new LocalFile(this,l,b,null==d),p,z,x,M,K))}catch(k){L(),this.handleError(k)}}};
-App.prototype.fileCreated=function(b,l,p,d,x,z){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[l],"replace",[p]);var y=window.location.pathname;null!=l&&0<l.length&&(y+="?libs="+l);null!=x&&0<x.length&&(y+="?clibs="+x);y=this.getUrl(y);b.getMode()!=App.MODE_DEVICE&&(y+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var F=b.getData();F=0<F.length?this.editor.extractGraphModel(mxUtils.parseXml(F).documentElement,!0):null;var M=window.location.protocol+
-"//"+window.location.hostname+y,K=F,L=null;null!=F&&/\.svg$/i.test(b.getTitle())&&(L=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(F,L,b,M));null!=L&&L.container.parentNode.removeChild(L.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var k=this.getCurrentFile();null==p&&null!=k&&(p=!k.isModified()&&(null==k.getMode()||EditorUi.isElectronApp));
-var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,z);p&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=l&&this.sidebar.showEntries(l);if(null!=x){for(var v=[],A=x.split(";"),E=0;E<A.length;E++)v.push(decodeURIComponent(A[E]));this.loadLibraries(v)}null!=d&&d()}),t=mxUtils.bind(this,function(){p||null==k||!k.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});
-null==p||p?t():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(y,null,t))});b.constructor==LocalFile?f():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){f()}),mxUtils.bind(this,function(k){c();null!=k&&"AbortError"==k.name||this.handleError(k)}))}};
-App.prototype.loadFile=function(b,l,p,d,x){if("1"==urlParams.openInSameWin||navigator.standalone)l=!0;this.hideDialog();var z=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var M=mxUtils.bind(this,function(k){this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=
-null!=m?m.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(k){null!=k?(this.fileLoaded(new StorageFile(this,k,b)),null!=d&&d()):M({message:mxResources.get("fileNotFound")})}),M)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();window.location.hash=null!=k?k.getHash():""}));else if(null!=p)this.spinner.stop(),this.fileLoaded(p),
+App.prototype.uncompressPages=function(b){if(null!=b)try{var k=mxUtils.parseXml(b);if("mxfile"==k.documentElement.nodeName){for(var n=k.documentElement.getElementsByTagName("diagram"),d=0;d<n.length;d++){var x=Editor.parseDiagramNode(n[d],!0);null!=x&&(mxUtils.setTextContent(n[d],""),n[d].appendChild(x))}b=mxUtils.getPrettyXml(k.documentElement)}}catch(z){}return b};
+App.prototype.createFile=function(b,k,n,d,x,z,y,F,N,K){EditorUi.debug("App.createFile",[this],"title",[b],"data",[k],"libs",[n],"mode",[d]);d=F?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){k=null!=k?k:this.emptyDiagramXml;null==k||Editor.defaultCompressed||(k=this.uncompressPages(k));var L=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(l){L();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():
+null!=l&&this.handleError(l)});try{var f=mxUtils.bind(this,function(l){L();this.fileCreated(l,n,z,x,N,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==y&&null!=this.stateArg&&null!=this.stateArg.folderId&&(y=this.stateArg.folderId),this.drive.insertFile(b,k,y,f,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,k,f,c,!1,y):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,k,f,c,!1,y):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,k,f,c,!1,y):d==App.MODE_DROPBOX&&
+null!=this.dropbox?this.dropbox.insertFile(b,k,f,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,k,f,c,!1,y):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,k,f,c):!F&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(l,m){var t=new LocalFile(this,k,m.name,null,l,m);t.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,n,z,x,N,K)}),c,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&c(l)}),this.createFileSystemOptions(b))):
+(L(),this.fileCreated(new LocalFile(this,k,b,null==d),n,z,x,N,K))}catch(l){L(),this.handleError(l)}}};
+App.prototype.fileCreated=function(b,k,n,d,x,z){EditorUi.debug("App.fileCreated",[this],"file",[b],"libs",[k],"replace",[n]);var y=window.location.pathname;null!=k&&0<k.length&&(y+="?libs="+k);null!=x&&0<x.length&&(y+="?clibs="+x);y=this.getUrl(y);b.getMode()!=App.MODE_DEVICE&&(y+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var F=b.getData();F=0<F.length?this.editor.extractGraphModel(mxUtils.parseXml(F).documentElement,!0):null;var N=window.location.protocol+
+"//"+window.location.hostname+y,K=F,L=null;null!=F&&/\.svg$/i.test(b.getTitle())&&(L=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(F,L,b,N));null!=L&&L.container.parentNode.removeChild(L.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var l=this.getCurrentFile();null==n&&null!=l&&(n=!l.isModified()&&(null==l.getMode()||EditorUi.isElectronApp));
+var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,z);n&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=k&&this.sidebar.showEntries(k);if(null!=x){for(var v=[],B=x.split(";"),E=0;E<B.length;E++)v.push(decodeURIComponent(B[E]));this.loadLibraries(v)}null!=d&&d()}),t=mxUtils.bind(this,function(){n||null==l||!l.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});
+null==n||n?t():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(y,null,t))});b.constructor==LocalFile?f():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){f()}),mxUtils.bind(this,function(l){c();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};
+App.prototype.loadFile=function(b,k,n,d,x){if("1"==urlParams.openInSameWin||navigator.standalone)k=!0;this.hideDialog();var z=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var N=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=
+null!=m?m.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=d&&d()):N({message:mxResources.get("fileNotFound")})}),N)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}));else if(null!=n)this.spinner.stop(),this.fileLoaded(n),
null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var K=decodeURIComponent(b.substring(1));"<"!=K.charAt(0)&&(K=Graph.decompress(K));K=new LocalFile(this,K,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
-!0);K.getHash=function(){return b};this.fileLoaded(K);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(k,m){this.spinner.stop();this.fileLoaded(new EmbedFile(this,k,m));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
-else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),c=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var k=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var m=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+m,l,null,mxUtils.bind(this,function(){var t=this.getCurrentFile();null!=t&&this.editor.chromeless&&!this.editor.editable&&(t.getHash=
-function(){return"G"+m},window.location.hash="#"+t.getHash());null!=d&&d()}));return!0}return!1});!k()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",k);return!0});this.loadTemplate(L,mxUtils.bind(this,function(k){this.spinner.stop();if(null!=k&&0<k.length){var m=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var t=L,v=L.lastIndexOf("."),A=t.lastIndexOf("/");v>A&&0<A&&(t=t.substring(A+1,v),v=L.substring(v),Editor.useCanvasForExport||
-".png"!=v||(v=".drawio"),".svg"===v||".xml"===v||".html"===v||".png"===v||".drawio"===v)&&(m=t+v)}k=new LocalFile(this,k,null!=urlParams.title?decodeURIComponent(urlParams.title):m,!0);k.getHash=function(){return b};this.fileLoaded(k,!0)?null!=d&&d():c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){c()||(this.spinner.stop(),
-this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var f=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var k=this.getServiceForName(f);if(null==k)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var t=this.getCurrentFile();window.location.hash=null!=
-t?t.getHash():""}));else{var m=b.charAt(0);b=decodeURIComponent(b.substring(1));k.getFile(b,mxUtils.bind(this,function(t){this.spinner.stop();this.fileLoaded(t);var v=this.getCurrentFile();if(null==v)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){v.getHash=function(){return m+b};t="#"+v.getHash();try{var A=this.getHashObject();null==A||mxUtils.isEmptyObject(A)||(t=t+"#"+encodeURIComponent(JSON.stringify(A)))}catch(E){}window.location.replace(t)}else t==
-v&&null==t.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var E=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+E+'" class="geStatusAlert">'+E+"</div>")}));null!=d&&d()}),mxUtils.bind(this,function(t){null!=window.console&&null!=t&&console.log("error in loadFile:",b,t);var v=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==t||"AbortError"!=t.name?this.handleError(t,
-null!=t?mxResources.get("errorLoadingFile"):null,v,null,null,"#"+m+b):v()}))}})()}}),y=this.getCurrentFile(),F=mxUtils.bind(this,function(){x||null==y||!y.isModified()?z():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=y&&(window.location.hash=y.getHash())}),z,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==l&&null!=y&&!y.isModified()&&this.isBlankFile()?F():null==y||l?F():this.showDialog((new PopupDialog(this,this.getUrl()+
+!0);K.getHash=function(){return b};this.fileLoaded(K);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(l,m){this.spinner.stop();this.fileLoaded(new EmbedFile(this,l,m));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
+else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),c=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var l=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var m=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+m,k,null,mxUtils.bind(this,function(){var t=this.getCurrentFile();null!=t&&this.editor.chromeless&&!this.editor.editable&&(t.getHash=
+function(){return"G"+m},window.location.hash="#"+t.getHash());null!=d&&d()}));return!0}return!1});!l()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",l);return!0});this.loadTemplate(L,mxUtils.bind(this,function(l){this.spinner.stop();if(null!=l&&0<l.length){var m=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var t=L,v=L.lastIndexOf("."),B=t.lastIndexOf("/");v>B&&0<B&&(t=t.substring(B+1,v),v=L.substring(v),Editor.useCanvasForExport||
+".png"!=v||(v=".drawio"),".svg"===v||".xml"===v||".html"===v||".png"===v||".drawio"===v)&&(m=t+v)}l=new LocalFile(this,l,null!=urlParams.title?decodeURIComponent(urlParams.title):m,!0);l.getHash=function(){return b};this.fileLoaded(l,!0)?null!=d&&d():c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){c()||(this.spinner.stop(),
+this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var f=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var l=this.getServiceForName(f);if(null==l)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var t=this.getCurrentFile();window.location.hash=null!=
+t?t.getHash():""}));else{var m=b.charAt(0);b=decodeURIComponent(b.substring(1));l.getFile(b,mxUtils.bind(this,function(t){this.spinner.stop();this.fileLoaded(t);var v=this.getCurrentFile();if(null==v)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){v.getHash=function(){return m+b};t="#"+v.getHash();try{var B=this.getHashObject();null==B||mxUtils.isEmptyObject(B)||(t=t+"#"+encodeURIComponent(JSON.stringify(B)))}catch(E){}window.location.replace(t)}else t==
+v&&null==t.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var E=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+E+'" class="geStatusAlert">'+E+"</div>")}));null!=d&&d()}),mxUtils.bind(this,function(t){null!=window.console&&null!=t&&console.log("error in loadFile:",b,t);var v=mxUtils.bind(this,function(){var B=this.getCurrentFile();null==B?(window.location.hash="",this.showSplash()):window.location.hash="#"+B.getHash()});null==t||"AbortError"!=t.name?this.handleError(t,
+null!=t?mxResources.get("errorLoadingFile"):null,v,null,null,"#"+m+b):v()}))}})()}}),y=this.getCurrentFile(),F=mxUtils.bind(this,function(){x||null==y||!y.isModified()?z():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=y&&(window.location.hash=y.getHash())}),z,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length||null==k&&null!=y&&!y.isModified()&&this.isBlankFile()?F():null==y||k?F():this.showDialog((new PopupDialog(this,this.getUrl()+
"#"+b,null,F)).container,340,140,!0,!0)};
-App.prototype.getLibraryStorageHint=function(b){var l=b.getTitle();b.constructor!=LocalLibrary&&(l+="\n"+b.getHash());b.constructor==DriveLibrary?l+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?l+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?l+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?l+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?l+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?l+=" ("+
-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(l+=" ("+mxResources.get("device")+")");return l};App.prototype.restoreLibraries=function(){function b(p){for(var d=0;d<p.length;d++)""!=p[d]&&0>mxUtils.indexOf(l,p[d])&&l.push(p[d])}var l=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(l)};
-App.prototype.loadLibraries=function(b,l){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var p=mxUtils.bind(this,function(K,L){L||mxSettings.removeCustomLibrary(K);delete this.loadedLibraries[K]}),d=0,x=[],z=0<b.length&&"L.scratchpad"==b[0]?1:0,y=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var K=b.length-1;0<=K;K--)null!=x[K]&&this.loadLibrary(x[K],K<=z);null!=l&&l()}});if(null!=b)for(var F=0;F<b.length;F++){var M=encodeURIComponent(decodeURIComponent(b[F]));
-mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var c=mxUtils.bind(this,function(A){x[L]=A;d--;y()}),f=mxUtils.bind(this,function(A){p(K,A);d--;y()}),k=K.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var A=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,A,mxUtils.bind(this,function(E){".scratchpad"==A&&null==
-E&&(E=this.emptyLibraryXml);null!=E?c(new StorageLibrary(this,E,A)):f()}),f)}catch(E){f()}}),0);else if("U"==k){var m=decodeURIComponent(K.substring(1));this.isOffline()?f(!0):this.loadTemplate(m,mxUtils.bind(this,function(A){null!=A&&0<A.length?c(new UrlLibrary(this,A,m)):f()}),function(){f()},null,!0)}else if("R"==k){k=decodeURIComponent(K.substring(1));try{k=JSON.parse(k);var t={id:k[0],title:k[1],downloadUrl:k[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(A){try{c(new RemoteLibrary(this,
-A,t))}catch(E){f()}}),function(){f()})}catch(A){f()}}else if("S"==k&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(A){c(A)},f)}catch(A){f()}else{var v=null;"G"==k?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==k&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(A){try{c(A)}catch(E){f()}}),function(A){f()}):f(!0)}}})(M,F)}y()}};
+App.prototype.getLibraryStorageHint=function(b){var k=b.getTitle();b.constructor!=LocalLibrary&&(k+="\n"+b.getHash());b.constructor==DriveLibrary?k+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?k+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?k+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?k+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?k+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?k+=" ("+
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(k+=" ("+mxResources.get("device")+")");return k};App.prototype.restoreLibraries=function(){function b(n){for(var d=0;d<n.length;d++)""!=n[d]&&0>mxUtils.indexOf(k,n[d])&&k.push(n[d])}var k=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(k)};
+App.prototype.loadLibraries=function(b,k){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var n=mxUtils.bind(this,function(K,L){L||mxSettings.removeCustomLibrary(K);delete this.loadedLibraries[K]}),d=0,x=[],z=0<b.length&&"L.scratchpad"==b[0]?1:0,y=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var K=b.length-1;0<=K;K--)null!=x[K]&&this.loadLibrary(x[K],K<=z);null!=k&&k()}});if(null!=b)for(var F=0;F<b.length;F++){var N=encodeURIComponent(decodeURIComponent(b[F]));
+mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var c=mxUtils.bind(this,function(B){x[L]=B;d--;y()}),f=mxUtils.bind(this,function(B){n(K,B);d--;y()}),l=K.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var B=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,B,mxUtils.bind(this,function(E){".scratchpad"==B&&null==
+E&&(E=this.emptyLibraryXml);null!=E?c(new StorageLibrary(this,E,B)):f()}),f)}catch(E){f()}}),0);else if("U"==l){var m=decodeURIComponent(K.substring(1));this.isOffline()?f(!0):this.loadTemplate(m,mxUtils.bind(this,function(B){null!=B&&0<B.length?c(new UrlLibrary(this,B,m)):f()}),function(){f()},null,!0)}else if("R"==l){l=decodeURIComponent(K.substring(1));try{l=JSON.parse(l);var t={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(B){try{c(new RemoteLibrary(this,
+B,t))}catch(E){f()}}),function(){f()})}catch(B){f()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(B){c(B)},f)}catch(B){f()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==l&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(B){try{c(B)}catch(E){f()}}),function(B){f()}):f(!0)}}})(N,F)}y()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(EditorUi.isElectronApp||this.isOffline()||(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
else{this.buttonContainer.style.display="";var b=this.getCurrentFile();null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.buttonContainer&&this.buttonContainer.appendChild(this.notificationBtn);"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(null==this.commentButton&&(this.commentButton=document.createElement("a"),this.setElementTitle(this.commentButton,"comments"),this.commentButton.className="geButton geRoundButton",this.commentButton.style.backgroundImage="url("+Editor.commentImage+
-")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var l=document.createElement("div");l.className="geButton";l.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(l);
-this.dependsOnLanguage(mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
-document.createElement("a");this.userButton.className="geButton geRoundButton";var p=document.createElement("img");this.userButton.appendChild(p);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(F){this.toggleUserPanel();var M=this.userButton.getBoundingClientRect(),K=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=M.bottom+"px";this.userPanel.style.right=K-M.right+"px";mxEvent.consume(F)}));var d=document.createElement("img");d.style.position=
-"absolute";d.style.width="10px";this.userButton.appendChild(d);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){p=this.userButton.getElementsByTagName("img")[0];d=this.userButton.getElementsByTagName("img")[1];var x=mxResources.get("changeUser"),z=this.getMainUser();null!=z&&null!=z.displayName&&(x=z.displayName);null!=z&&null!=z.pictureUrl?(p.classList.remove("geAdaptiveAsset"),p.src=z.pictureUrl,d.style.top="3px",d.style.right="0"):(p.classList.add("geAdaptiveAsset"),p.src=
-Editor.userImage,d.style.top="6px",d.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){d.style.display="";p=b.getRealtimeError();var y=b.getRealtimeState();x+=" (";1==y?(d.src=Editor.syncImage,x+=mxResources.get("online")):(d.src=Editor.syncProblemImage,x=null!=p&&null!=p.message?x+p.message:x+mxResources.get("disconnected"));x+=")"}else d.style.display="none",d.src=Editor.cloudImage;this.userButton.setAttribute("title",x);this.userButton.style.display="draw.io"!=this.getServiceName()||
+")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var k=document.createElement("div");k.className="geButton";k.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(k);
+this.dependsOnLanguage(mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
+document.createElement("a");this.userButton.className="geButton geRoundButton";var n=document.createElement("img");this.userButton.appendChild(n);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(F){this.toggleUserPanel();var N=this.userButton.getBoundingClientRect(),K=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=N.bottom+"px";this.userPanel.style.right=K-N.right+"px";mxEvent.consume(F)}));var d=document.createElement("img");d.style.position=
+"absolute";d.style.width="10px";this.userButton.appendChild(d);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){n=this.userButton.getElementsByTagName("img")[0];d=this.userButton.getElementsByTagName("img")[1];var x=mxResources.get("changeUser"),z=this.getMainUser();null!=z&&null!=z.displayName&&(x=z.displayName);null!=z&&null!=z.pictureUrl?(n.classList.remove("geAdaptiveAsset"),n.src=z.pictureUrl,d.style.top="3px",d.style.right="0"):(n.classList.add("geAdaptiveAsset"),n.src=
+Editor.userImage,d.style.top="6px",d.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){d.style.display="";n=b.getRealtimeError();var y=b.getRealtimeState();x+=" (";1==y?(d.src=Editor.syncImage,x+=mxResources.get("online")):(d.src=Editor.syncProblemImage,x=null!=n&&null!=n.message?x+n.message:x+mxResources.get("disconnected"));x+=")"}else d.style.display="none",d.src=Editor.cloudImage;this.userButton.setAttribute("title",x);this.userButton.style.display="draw.io"!=this.getServiceName()||
null==z||"1"==urlParams.embed||this.isStandaloneApp()||null==b?"none":""}}}};
-App.prototype.fetchAndShowNotification=function(b,l){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var p=null,d=mxUtils.bind(this,function(x){x=x.filter(function(M){return!M.targets||-1<M.targets.indexOf(b)||null!=l&&-1<M.targets.indexOf(l)});for(var z=b+"NotifReadTS",y=isLocalStorage?parseInt(localStorage.getItem(z)):!0,F=0;F<x.length;F++)x[F].isNew=!y||x[F].timestamp>y;this.showNotification(x,z)});try{isLocalStorage&&(p=JSON.parse(localStorage.getItem(".notifCache")))}catch(x){}null==
-p||p.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus())try{var z=JSON.parse(x.getText());z.sort(function(y,F){return F.timestamp-y.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:z}));this.fetchingNotif=!1;d(z)}catch(y){}}))):d(p.notifs)}};
-App.prototype.showNotification=function(b,l){function p(K){var L=document.querySelector(".geNotification-count");null!=L&&(L.innerHTML=K,L.style.display=0==K?"none":"",L=document.querySelector(".geNotification-bell"),L.style.animation=0==K?"none":"",L.className="geNotification-bell"+(0==K?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==K?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var x=d=0;x<b.length;x++)b[x].isNew&&
-d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var z=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var K=this.notificationWin.querySelectorAll(".circle.active"),L=0;L<K.length;L++)K[L].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(l,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
+App.prototype.fetchAndShowNotification=function(b,k){if(!this.fetchingNotif&&null!=NOTIFICATIONS_URL){b=b||"online";var n=null,d=mxUtils.bind(this,function(x){x=x.filter(function(N){return!N.targets||-1<N.targets.indexOf(b)||null!=k&&-1<N.targets.indexOf(k)});for(var z=b+"NotifReadTS",y=isLocalStorage?parseInt(localStorage.getItem(z)):!0,F=0;F<x.length;F++)x[F].isNew=!y||x[F].timestamp>y;this.showNotification(x,z)});try{isLocalStorage&&(n=JSON.parse(localStorage.getItem(".notifCache")))}catch(x){}null==
+n||n.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus())try{var z=JSON.parse(x.getText());z.sort(function(y,F){return F.timestamp-y.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:z}));this.fetchingNotif=!1;d(z)}catch(y){}}))):d(n.notifs)}};
+App.prototype.showNotification=function(b,k){function n(K){var L=document.querySelector(".geNotification-count");null!=L&&(L.innerHTML=K,L.style.display=0==K?"none":"",L=document.querySelector(".geNotification-bell"),L.style.animation=0==K?"none":"",L.className="geNotification-bell"+(0==K?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==K?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var x=d=0;x<b.length;x++)b[x].isNew&&
+d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var z=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var K=this.notificationWin.querySelectorAll(".circle.active"),L=0;L<K.length;L++)K[L].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(k,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";x=document.createElement("span");x.className="geBell-top";d.appendChild(x);x=document.createElement("span");x.className="geBell-middle";d.appendChild(x);x=document.createElement("span");x.className="geBell-bottom";d.appendChild(x);x=document.createElement("span");x.className="geBell-rad";d.appendChild(x);
this.notificationBtn.appendChild(d);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);x=document.createElement("div");x.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");x.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";x.appendChild(d);this.notificationWin.appendChild(x);
x=document.createElement("div");x.className="notifications clearfix";var y=document.createElement("div");y.setAttribute("id","geNotifList");y.style.position="relative";x.appendChild(y);this.notificationWin.appendChild(x);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var K=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=
-K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";p(0)}else z()}));mxEvent.addListener(d,"click",z)}else this.notificationBtn.style.display="";var F=0,M=document.getElementById("geNotifList");if(null!=M){M.innerHTML='<div class="line"></div>';for(x=0;x<b.length;x++)(function(K,L){L.isNew&&F++;var c=document.createElement("div");c.className="notification";K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));
-c.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(c,"click",function(){window.open(L.link,"notifWin")});M.appendChild(c)})(this,b[x]);p(F)}}};
-App.prototype.save=function(b,l){var p=this.getCurrentFile(),d=!0,x=mxUtils.bind(this,function(){d&&(d=!1,p.handleFileSuccess(!0),null!=l&&l())}),z=mxUtils.bind(this,function(y){if(d){d=!1;Editor.addRetryToError(y,mxUtils.bind(this,function(){this.save(b,l)}));if(null!=y&&null!=y.retry){var F=y.retry;y.retry=function(){d=!0;try{p.isModified()?F():x()}catch(M){z(M)}}}p.handleFileError(y,null==y||"AbortError"!=y.name)}});if(null!=p&&this.spinner.spin(document.body,mxResources.get("saving"),z,3*this.timeout))try{this.clearStatus(),
-this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==p.getTitle()?p.save(!0,x,z):p.saveAs(b,x,z)}catch(y){z(y)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
+K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";n(0)}else z()}));mxEvent.addListener(d,"click",z)}else this.notificationBtn.style.display="";var F=0,N=document.getElementById("geNotifList");if(null!=N){N.innerHTML='<div class="line"></div>';for(x=0;x<b.length;x++)(function(K,L){L.isNew&&F++;var c=document.createElement("div");c.className="notification";K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));
+c.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(c,"click",function(){window.open(L.link,"notifWin")});N.appendChild(c)})(this,b[x]);n(F)}}};
+App.prototype.save=function(b,k){var n=this.getCurrentFile(),d=!0,x=mxUtils.bind(this,function(){d&&(d=!1,n.handleFileSuccess(!0),null!=k&&k())}),z=mxUtils.bind(this,function(y){if(d){d=!1;Editor.addRetryToError(y,mxUtils.bind(this,function(){this.save(b,k)}));if(null!=y&&null!=y.retry){var F=y.retry;y.retry=function(){d=!0;try{n.isModified()?F():x()}catch(N){z(N)}}}n.handleFileError(y,null==y||"AbortError"!=y.name)}});if(null!=n&&this.spinner.spin(document.body,mxResources.get("saving"),z,3*this.timeout))try{this.clearStatus(),
+this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==n.getTitle()?n.save(!0,x,z):n.saveAs(b,x,z)}catch(y){z(y)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};
-App.prototype.pickFolder=function(b,l,p,d,x,z){p=null!=p?p:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var y=this.spinner.pause();p&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(F){y();if(F.action==google.picker.Action.PICKED){var M=null;null!=F.docs&&0<F.docs.length&&"folder"==F.docs[0].type&&(M=F.docs[0].id);l(z?F:M)}}),x):p&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(F){y();
-if(null!=F&&null!=F.value&&0<F.value.length){var M=OneDriveFile.prototype.getIdOf(F.value[0]);l(z?F:M)}}),d):p&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(F){y();l(F)})):p&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(F){y();l(F)})):p&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(F){y();l(F)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,l,p,d,x,z){x==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(l,d?this.base64ToBlob(b,p):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)})):x==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(l,b,z,mxUtils.bind(this,function(y){this.spinner.stop()}),
-mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),p,d):x==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(l,d?this.base64ToBlob(b,p):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!1,z):x==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(l,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!0,z,d):x==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(l,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!0,z,d):x==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(l,d?this.base64ToBlob(b,
-p):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!1,z):x==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(p="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,l):new StorageFile(this,b,l),StorageFile.doInsertFile(p,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))):(p=mxUtils.bind(this,
-function(){localStorage.setItem(l,b)}),null==localStorage.getItem(l)?p():this.confirm(mxResources.get("replaceIt",[l]),p)))};
-App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var l=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,l)}l=this.editor.graph;var p=b.isEditable();l.isEnabled()&&!p&&l.reset();l.setEnabled(p);null==urlParams.rev&&(this.updateDocumentTitle(),l=b.getHash(),0<l.length?(l!=this.getDiagramId()&&(window.location.hash=l),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=
+App.prototype.pickFolder=function(b,k,n,d,x,z){n=null!=n?n:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var y=this.spinner.pause();n&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(F){y();if(F.action==google.picker.Action.PICKED){var N=null;null!=F.docs&&0<F.docs.length&&"folder"==F.docs[0].type&&(N=F.docs[0].id);k(z?F:N)}}),x):n&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(F){y();
+if(null!=F&&null!=F.value&&0<F.value.length){var N=OneDriveFile.prototype.getIdOf(F.value[0]);k(z?F:N)}}),d):n&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(F){y();k(F)})):n&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(F){y();k(F)})):n&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(F){y();k(F)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,k,n,d,x,z){x==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(k,d?this.base64ToBlob(b,n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)})):x==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(k,b,z,mxUtils.bind(this,function(y){this.spinner.stop()}),
+mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),n,d):x==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(k,d?this.base64ToBlob(b,n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!1,z):x==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(k,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!0,z,d):x==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(k,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!0,z,d):x==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(k,d?this.base64ToBlob(b,
+n):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),!1,z):x==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(n="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,k):new StorageFile(this,b,k),StorageFile.doInsertFile(n,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))):(n=mxUtils.bind(this,
+function(){localStorage.setItem(k,b)}),null==localStorage.getItem(k)?n():this.confirm(mxResources.get("replaceIt",[k]),n)))};
+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var k=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,k)}k=this.editor.graph;var n=b.isEditable();k.isEnabled()&&!n&&k.reset();k.setEnabled(n);null==urlParams.rev&&(this.updateDocumentTitle(),k=b.getHash(),0<k.length?(k!=this.getDiagramId()&&(window.location.hash=k),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=
""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,l,p,d){var x=this.spinner.pause();this.showDialog((new AuthDialog(this,b,l,mxUtils.bind(this,function(z){try{null!=p&&p(z,mxUtils.bind(this,function(){this.hideDialog();x()}))}catch(y){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(y.message))}))}}))).container,300,l?180:140,!0,!0,mxUtils.bind(this,function(z){null!=d&&d(z);z&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,l,p,d,x,z,y,F){var M=l;/\.svg$/i.test(M)||(M=M.substring(0,l.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(l)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(F)for(var c in F)L.setRequestHeader(c,F[c]);L.onload=mxUtils.bind(this,function(){if(200<=
-L.status&&299>=L.status){var k=null;K?(k=JSON.parse(L.responseText),k=this.base64ToBlob(k.content,"application/octet-stream")):k=new Blob([L.response],{type:"application/octet-stream"});this.importVisio(k,mxUtils.bind(this,function(m){x(new LocalFile(this,m,M,!0))}),z,l)}else null!=z&&z({message:mxResources.get("errorLoadingFile")})});L.onerror=z;L.send()}else{var f=mxUtils.bind(this,function(k){try{if(/\.pdf$/i.test(l)){var m=Editor.extractGraphModelFromPdf(k);null!=m&&0<m.length&&x(new LocalFile(this,
-m,M,!0))}else/\.png$/i.test(l)?(m=this.extractGraphModelFromPng(k),null!=m?x(new LocalFile(this,m,M,!0)):x(new LocalFile(this,k,l,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,b)?this.parseFileData(k,mxUtils.bind(this,function(t){4==t.readyState&&(200<=t.status&&299>=t.status?x(new LocalFile(this,t.responseText,M,!0)):null!=z&&z({message:mxResources.get("errorLoadingFile")}))}),l):x(new LocalFile(this,k,M,!0))}catch(t){null!=z&&z(t)}});p=/\.png$/i.test(l)||/\.jpe?g$/i.test(l)||
-/\.pdf$/i.test(l)||null!=p&&"image/"==p.substring(0,6);K?mxUtils.get(b,mxUtils.bind(this,function(k){if(200<=k.getStatus()&&299>=k.getStatus()){if(null!=x){k=JSON.parse(k.getText());var m=k.content;"base64"===k.encoding&&(m=/\.png$/i.test(l)?"data:image/png;base64,"+m:/\.pdf$/i.test(l)?"data:application/pdf;base64,"+m:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):atob(m));f(m)}}else null!=z&&z({code:App.ERROR_UNKNOWN})}),function(){null!=z&&z({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=z&&z({code:App.ERROR_TIMEOUT,retry:fn})},F):null!=y?y(b,f,z,p):this.editor.loadUrl(b,f,z,p,null,null,null,F)}};
+App.prototype.showAuthDialog=function(b,k,n,d){var x=this.spinner.pause();this.showDialog((new AuthDialog(this,b,k,mxUtils.bind(this,function(z){try{null!=n&&n(z,mxUtils.bind(this,function(){this.hideDialog();x()}))}catch(y){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(y.message))}))}}))).container,300,k?180:140,!0,!0,mxUtils.bind(this,function(z){null!=d&&d(z);z&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,k,n,d,x,z,y,F){var N=k;/\.svg$/i.test(N)||(N=N.substring(0,k.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(k)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(F)for(var c in F)L.setRequestHeader(c,F[c]);L.onload=mxUtils.bind(this,function(){if(200<=
+L.status&&299>=L.status){var l=null;K?(l=JSON.parse(L.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([L.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(m){x(new LocalFile(this,m,N,!0))}),z,k)}else null!=z&&z({message:mxResources.get("errorLoadingFile")})});L.onerror=z;L.send()}else{var f=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(k)){var m=Editor.extractGraphModelFromPdf(l);null!=m&&0<m.length&&x(new LocalFile(this,
+m,N,!0))}else/\.png$/i.test(k)?(m=this.extractGraphModelFromPng(l),null!=m?x(new LocalFile(this,m,N,!0)):x(new LocalFile(this,l,k,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,b)?this.parseFileData(l,mxUtils.bind(this,function(t){4==t.readyState&&(200<=t.status&&299>=t.status?x(new LocalFile(this,t.responseText,N,!0)):null!=z&&z({message:mxResources.get("errorLoadingFile")}))}),k):x(new LocalFile(this,l,N,!0))}catch(t){null!=z&&z(t)}});n=/\.png$/i.test(k)||/\.jpe?g$/i.test(k)||
+/\.pdf$/i.test(k)||null!=n&&"image/"==n.substring(0,6);K?mxUtils.get(b,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus()){if(null!=x){l=JSON.parse(l.getText());var m=l.content;"base64"===l.encoding&&(m=/\.png$/i.test(k)?"data:image/png;base64,"+m:/\.pdf$/i.test(k)?"data:application/pdf;base64,"+m:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):atob(m));f(m)}}else null!=z&&z({code:App.ERROR_UNKNOWN})}),function(){null!=z&&z({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=z&&z({code:App.ERROR_TIMEOUT,retry:fn})},F):null!=y?y(b,f,z,n):this.editor.loadUrl(b,f,z,n,null,null,null,F)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(y){this.appIconClicked(y)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var y=this.getCurrentFile();null!=y&&(y=y.getMode(),y==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
"url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):y==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):y==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):y==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize=
"70%"):y==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="90%"):y==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize=""}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);
this.fnameWrapper=document.createElement("div");this.fname=document.createElement("a");this.fnameWrapper.className="geFilenameContainer";this.fname.className="geFilename";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(y){var F=this.getCurrentFile();null!=F&&F.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(y)}));mxEvent.preventDefault(this.fname);this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
-this.menubarContainer.appendChild(this.fnameWrapper);var l=document.createElement("div");l.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(l);var p=document.createElement("a");p.style.backgroundImage="url('"+Editor.fullscreenImage+"')";p.className="geButton";l.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(y){var F=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!F,null,Editor.transitionDelay);this.toggleShapesPanel(F);
-this.toggleFormatPanel(F);this.fullscreenMode=!F;p.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(y)}));mxEvent.preventDefault(p);var d=document.createElement("a");d.className="geButton";l.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(y){this.actions.get("format").funct();mxEvent.consume(y)}));mxEvent.preventDefault(d);var x=mxUtils.bind(this,function(){d.style.backgroundImage=0<this.formatWidth?
-"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",x);x();var z=document.createElement("a");z.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')";z.className="geButton";"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(l.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(y){this.setCompactMode(!this.compactMode,!0,Editor.transitionDelay);mxEvent.consume(y)})),
-mxEvent.preventDefault(z),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof z.click&&window.setTimeout(mxUtils.bind(this,function(){z.click()}),0),this.addListener("compactModeChanged",mxUtils.bind(this,function(){z.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')"})));this.dependsOnLanguage(mxUtils.bind(this,function(){this.fname.setAttribute("title",mxResources.get("rename"));p.setAttribute("title",mxResources.get("fullscreen"));z.setAttribute("title",
+this.menubarContainer.appendChild(this.fnameWrapper);var k=document.createElement("div");k.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(k);var n=document.createElement("a");n.style.backgroundImage="url('"+Editor.fullscreenImage+"')";n.className="geButton";k.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(y){var F=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!F,null,Editor.transitionDelay);this.toggleShapesPanel(F);
+this.toggleFormatPanel(F);this.fullscreenMode=!F;n.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(y)}));mxEvent.preventDefault(n);var d=document.createElement("a");d.className="geButton";k.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(y){this.actions.get("format").funct();mxEvent.consume(y)}));mxEvent.preventDefault(d);var x=mxUtils.bind(this,function(){d.style.backgroundImage=0<this.formatWidth?
+"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",x);x();var z=document.createElement("a");z.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')";z.className="geButton";"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(k.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(y){this.setCompactMode(!this.compactMode,!0,Editor.transitionDelay);mxEvent.consume(y)})),
+mxEvent.preventDefault(z),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof z.click&&window.setTimeout(mxUtils.bind(this,function(){z.click()}),0),this.addListener("compactModeChanged",mxUtils.bind(this,function(){z.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')"})));this.dependsOnLanguage(mxUtils.bind(this,function(){this.fname.setAttribute("title",mxResources.get("rename"));n.setAttribute("title",mxResources.get("fullscreen"));z.setAttribute("title",
mxResources.get("collapseExpand"));d.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+"+Editor.shiftKey+"+P)")}))}};
-App.prototype.setCompactMode=function(b,l,p){var d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;p=null!=p?p:0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition","all "+p+"s ease-in-out");mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition","all "+p+"s ease-in-out");b?d.classList.add("geCompactMode"):d.classList.remove("geCompactMode");window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition",null);this.compactMode=b;this.refresh(!0);this.fireEvent(new mxEventObject("compactModeChanged"));isLocalStorage&&l&&(mxSettings.settings.compactMode=this.compactMode,mxSettings.save())}),1E3*p)}),0)};
+App.prototype.setCompactMode=function(b,k,n){var d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;n=null!=n?n:0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition","all "+n+"s ease-in-out");mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition","all "+n+"s ease-in-out");b?d.classList.add("geCompactMode"):d.classList.remove("geCompactMode");window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition",null);this.compactMode=b;this.refresh(!0);this.fireEvent(new mxEventObject("compactModeChanged"));isLocalStorage&&k&&(mxSettings.settings.compactMode=this.compactMode,mxSettings.save())}),1E3*n)}),0)};
App.prototype.getMainUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());return b};
App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};
-App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(y){mxEvent.isConsumed(y)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var l=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
-mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var p=this.drive.getUsersList();if(0<p.length){var d=mxUtils.bind(this,function(y,F){var M=this.getCurrentFile();null!=M&&M.constructor==DriveFile?(this.spinner.spin(document.body,F),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
-function(){this.spinner.stop();y()}),2E3)):y()});b=mxUtils.bind(this,function(y){var F=document.createElement("tr"),M=document.createElement("td");M.setAttribute("valig","middle");M.style.height="59px";M.style.width="66px";var K=document.createElement("img");K.setAttribute("width","50");K.setAttribute("height","50");K.setAttribute("border","0");K.setAttribute("src",null!=y.pictureUrl?y.pictureUrl:Editor.userImage);K.style.borderRadius="50%";K.style.margin="4px 8px 0 8px";M.appendChild(K);F.appendChild(M);
-M=document.createElement("td");M.setAttribute("valign","middle");M.style.whiteSpace="nowrap";M.style.paddingTop="4px";M.style.maxWidth="0";M.style.overflow="hidden";M.style.textOverflow="ellipsis";mxUtils.write(M,y.displayName+(y.isCurrent&&1<p.length?" ("+mxResources.get("default")+")":""));null!=y.email&&(mxUtils.br(M),K=document.createElement("small"),K.style.color="gray",mxUtils.write(K,y.email),M.appendChild(K));K=document.createElement("div");K.style.marginTop="4px";var L=document.createElement("i");
-mxUtils.write(L,mxResources.get("googleDrive"));K.appendChild(L);M.appendChild(K);F.appendChild(M);y.isCurrent?F.setAttribute("title","User ID: "+y.id):(F.setAttribute("title",mxResources.get("login")+" (User ID: "+y.id+")"),F.style.cursor="pointer",F.style.opacity="0.3",mxEvent.addListener(F,"mouseenter",mxUtils.bind(this,function(){F.style.opacity="1"})),mxEvent.addListener(F,"mouseleave",mxUtils.bind(this,function(){F.style.opacity="0.3"})),mxEvent.addListener(F,"click",mxUtils.bind(this,function(c){this.hideUserPanel();
-d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(y);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(f){this.handleError(f)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(c)})));return F});l=!0;var x=document.createElement("table");x.style.borderSpacing="0";x.style.fontSize="10pt";x.style.width="100%";x.style.padding="10px";for(var z=0;z<p.length;z++)x.appendChild(b(p[z]));
+App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(y){mxEvent.isConsumed(y)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var k=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
+mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var n=this.drive.getUsersList();if(0<n.length){var d=mxUtils.bind(this,function(y,F){var N=this.getCurrentFile();null!=N&&N.constructor==DriveFile?(this.spinner.spin(document.body,F),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
+function(){this.spinner.stop();y()}),2E3)):y()});b=mxUtils.bind(this,function(y){var F=document.createElement("tr"),N=document.createElement("td");N.setAttribute("valig","middle");N.style.height="59px";N.style.width="66px";var K=document.createElement("img");K.setAttribute("width","50");K.setAttribute("height","50");K.setAttribute("border","0");K.setAttribute("src",null!=y.pictureUrl?y.pictureUrl:Editor.userImage);K.style.borderRadius="50%";K.style.margin="4px 8px 0 8px";N.appendChild(K);F.appendChild(N);
+N=document.createElement("td");N.setAttribute("valign","middle");N.style.whiteSpace="nowrap";N.style.paddingTop="4px";N.style.maxWidth="0";N.style.overflow="hidden";N.style.textOverflow="ellipsis";mxUtils.write(N,y.displayName+(y.isCurrent&&1<n.length?" ("+mxResources.get("default")+")":""));null!=y.email&&(mxUtils.br(N),K=document.createElement("small"),K.style.color="gray",mxUtils.write(K,y.email),N.appendChild(K));K=document.createElement("div");K.style.marginTop="4px";var L=document.createElement("i");
+mxUtils.write(L,mxResources.get("googleDrive"));K.appendChild(L);N.appendChild(K);F.appendChild(N);y.isCurrent?F.setAttribute("title","User ID: "+y.id):(F.setAttribute("title",mxResources.get("login")+" (User ID: "+y.id+")"),F.style.cursor="pointer",F.style.opacity="0.3",mxEvent.addListener(F,"mouseenter",mxUtils.bind(this,function(){F.style.opacity="1"})),mxEvent.addListener(F,"mouseleave",mxUtils.bind(this,function(){F.style.opacity="0.3"})),mxEvent.addListener(F,"click",mxUtils.bind(this,function(c){this.hideUserPanel();
+d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(y);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(f){this.handleError(f)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(c)})));return F});k=!0;var x=document.createElement("table");x.style.borderSpacing="0";x.style.fontSize="10pt";x.style.width="100%";x.style.padding="10px";for(var z=0;z<n.length;z++)x.appendChild(b(n[z]));
this.userPanel.appendChild(x);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";x=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));
x.className="geBtn";x.style.float="right";b.appendChild(x);x=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var y=this.drive.createAuthWin();y.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(F){this.handleError(F)}),!0,y)}),mxResources.get("closingFile")+"...")}));x.className="geBtn";x.style.margin="0px";
-b.appendChild(x);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(y,F,M,K){if(null!=y){l&&this.userPanel.appendChild(document.createElement("hr"));l=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var c=document.createElement("tbody"),f=document.createElement("tr"),k=document.createElement("td");k.setAttribute("valig","top");k.style.width="40px";if(null!=F){var m=document.createElement("img");m.setAttribute("width",
-"40");m.setAttribute("height","40");m.setAttribute("border","0");m.setAttribute("src",F);m.style.marginRight="6px";k.appendChild(m)}f.appendChild(k);k=document.createElement("td");k.setAttribute("valign","middle");k.style.whiteSpace="nowrap";k.style.maxWidth="0";k.style.overflow="hidden";k.style.textOverflow="ellipsis";mxUtils.write(k,y.displayName);null!=y.email&&(mxUtils.br(k),F=document.createElement("small"),F.style.color="gray",mxUtils.write(F,y.email),k.appendChild(F));null!=K&&(y=document.createElement("div"),
-y.style.marginTop="4px",F=document.createElement("i"),mxUtils.write(F,K),y.appendChild(F),k.appendChild(y));f.appendChild(k);c.appendChild(f);L.appendChild(c);this.userPanel.appendChild(L);y=document.createElement("div");y.style.textAlign="center";y.style.padding="10px";y.style.whiteSpace="nowrap";null!=M&&(M=mxUtils.button(mxResources.get("signOut"),M),M.className="geBtn",y.appendChild(M));this.userPanel.appendChild(y)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
+b.appendChild(x);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(y,F,N,K){if(null!=y){k&&this.userPanel.appendChild(document.createElement("hr"));k=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var c=document.createElement("tbody"),f=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=F){var m=document.createElement("img");m.setAttribute("width",
+"40");m.setAttribute("height","40");m.setAttribute("border","0");m.setAttribute("src",F);m.style.marginRight="6px";l.appendChild(m)}f.appendChild(l);l=document.createElement("td");l.setAttribute("valign","middle");l.style.whiteSpace="nowrap";l.style.maxWidth="0";l.style.overflow="hidden";l.style.textOverflow="ellipsis";mxUtils.write(l,y.displayName);null!=y.email&&(mxUtils.br(l),F=document.createElement("small"),F.style.color="gray",mxUtils.write(F,y.email),l.appendChild(F));null!=K&&(y=document.createElement("div"),
+y.style.marginTop="4px",F=document.createElement("i"),mxUtils.write(F,K),y.appendChild(F),l.appendChild(y));f.appendChild(l);c.appendChild(f);L.appendChild(c);this.userPanel.appendChild(L);y=document.createElement("div");y.style.textAlign="center";y.style.padding="10px";y.style.whiteSpace="nowrap";null!=N&&(N=mxUtils.button(mxResources.get("signOut"),N),N.className="geBtn",y.appendChild(N));this.userPanel.appendChild(y)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
mxUtils.bind(this,function(){var y=this.getCurrentFile();if(null!=y&&y.constructor==DropboxFile){var F=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var y=
this.getCurrentFile();if(null!=y&&y.constructor==OneDriveFile){var F=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var y=this.getCurrentFile();if(null!=y&&y.constructor==GitHubFile){var F=
mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var y=this.getCurrentFile();if(null!=y&&y.constructor==GitLabFile){var F=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
@@ -13748,10 +13750,10 @@ mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});y.is
null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(x=this.getCurrentFile(),null!=x&&x.isRealtimeEnabled()&&x.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize="9pt",z=x.getRealtimeError(),1!=x.getRealtimeState()&&
(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=z&&null!=z.message?z.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
-Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(p){return this.editorUi.createHelpIcon(p)};Menus.prototype.addLinkToItem=function(p,d){null!=p&&p.firstChild.nextSibling.appendChild(this.createHelpLink(d))};
-Menus.prototype.removeCustomFont=function(p,d){for(var x=0;x<this.customFonts.length;x++)if(this.customFonts[x].name==p&&this.customFonts[x].url==d){this.customFonts.splice(x,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(p,d){for(var x=0;x<this.customFonts.length;x++)if(this.customFonts[x].name==p&&this.customFonts[x].url==d)return!0;for(x=0;x<this.defaultFonts.length;x++){var z=this.defaultFonts[x];
-if("string"!==typeof z&&z.fontFamily==p&&z.fontUrl==d||"string"===typeof z&&z==p&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(p,d){null==p||this.containsFont(p,d)||(this.customFonts.push({name:p,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var l=Menus.prototype.init;Menus.prototype.init=function(){function p(q,u,J){d.editor.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
-"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(G,H,g,n,C,I,N,O,Q,U,V,X,W){var Y=parseInt(G);!isNaN(Y)&&0<Y&&(d.exportImage(Y/100,H&&"png"==q,g,n,C&&"png"==q,N,!O,Q,q,V,null,X,W),null!=J&&J(G,H,g,n,C,I,N,O,Q,U,V,X,W))}),!0,u,q,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(G,H,g,n,C){d.downloadFile(H&&"png"==q?"xmlpng":q,null,null,G,null,null,g,n,C)}),!1,!0)}l.apply(this,arguments);
+Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(n){return this.editorUi.createHelpIcon(n)};Menus.prototype.addLinkToItem=function(n,d){null!=n&&n.firstChild.nextSibling.appendChild(this.createHelpLink(d))};
+Menus.prototype.removeCustomFont=function(n,d){for(var x=0;x<this.customFonts.length;x++)if(this.customFonts[x].name==n&&this.customFonts[x].url==d){this.customFonts.splice(x,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(n,d){for(var x=0;x<this.customFonts.length;x++)if(this.customFonts[x].name==n&&this.customFonts[x].url==d)return!0;for(x=0;x<this.defaultFonts.length;x++){var z=this.defaultFonts[x];
+if("string"!==typeof z&&z.fontFamily==n&&z.fontUrl==d||"string"===typeof z&&z==n&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(n,d){null==n||this.containsFont(n,d)||(this.customFonts.push({name:n,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var k=Menus.prototype.init;Menus.prototype.init=function(){function n(q,u,J){d.editor.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
+"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(G,H,g,p,C,I,M,O,Q,U,V,X,W){var Y=parseInt(G);!isNaN(Y)&&0<Y&&(d.exportImage(Y/100,H&&"png"==q,g,p,C&&"png"==q,M,!O,Q,q,V,null,X,W),null!=J&&J(G,H,g,p,C,I,M,O,Q,U,V,X,W))}),!0,u,q,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(G,H,g,p,C){d.downloadFile(H&&"png"==q?"xmlpng":q,null,null,G,null,null,g,p,C)}),!1,!0)}k.apply(this,arguments);
var d=this.editorUi,x=d.editor.graph,z=mxUtils.bind(x,x.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));d.actions.addAction("new...",function(){var q=d.isOffline(),u=new NewDialog(d,q,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(u.container,q?350:620,q?70:460,!0,!0,function(J){null!=d.sidebar&&d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()});u.init()});Editor.enableChatGpt&&
d.isExternalDataComms()&&"draw.io"==d.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(d.actions.put("generate",new Action("generate...",function(){d.openTemplateDialog("")})).isEnabled=z);d.actions.put("insertTemplate",new Action("template...",function(){d.openTemplateDialog()})).isEnabled=z;var y=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isShareCursorPosition()});
y=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isShowRemoteCursors()});y=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.POINTS});y=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});y.setToggleAction(!0);
@@ -13763,7 +13765,7 @@ y=d.actions.put("darkMode",new Action("dark",function(q){d.setAndPersistDarkMode
d.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=z;window.mxFreehand&&(y=d.actions.put("insertFreehand",new Action("freehand...",function(){x.isEnabled()&&(null==d.freehandWindow&&(d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,180,126,!0)),x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing(),d.freehandWindow.window.setVisible(x.freehand.isDrawing()))},null,null,"X")),y.isEnabled=function(){return z()},y.setToggleAction(!0),y.setSelectedCallback(function(){return null!=
d.freehandWindow&&d.freehandWindow.window.isVisible()}));d.actions.put("exportXml",new Action("formatXml...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var u=null==d.pages||1>=d.pages.length,J=document.createElement("h3");mxUtils.write(J,mxResources.get("formatXml"));J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(J);var G=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,x.isSelectionEmpty()),H=d.addCheckbox(q,mxResources.get("compressed"),
Editor.defaultCompressed),g=d.addCheckbox(q,mxResources.get("allPages"),!u,u);g.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!G.checked,u||!g.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action("url...",function(){d.showPublishLinkDialog(mxResources.get("url"),
-null,null,null,null,null,null,null,function(q,u,J,G,H,g,n,C,I,N,O,Q,U){n=[];G&&I&&n.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,u,U,G,H,g,null,!0,n,null,J,null,Q));d.showDialog(q.container,450,270,!0,!0);q.init()},null,!0,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("export"),null,q,function(u,J,G,H,g,n,C,I,N,O,Q,U){d.createHtml(u,J,G,H,g,n,C,I,N,O,Q,mxUtils.bind(this,function(V,
+null,null,null,null,null,null,null,function(q,u,J,G,H,g,p,C,I,M,O,Q,U){p=[];G&&I&&p.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,u,U,G,H,g,null,!0,p,null,J,null,Q));d.showDialog(q.container,450,270,!0,!0);q.init()},null,!0,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("export"),null,q,function(u,J,G,H,g,p,C,I,M,O,Q,U){d.createHtml(u,J,G,H,g,p,C,I,M,O,Q,mxUtils.bind(this,function(V,
X){var W=d.getBaseFilename(C);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";d.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),U)})})}));d.actions.put("exportPdf",new Action("formatPdf...",function(){d.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||
!d.isOffline()&&!d.printPdfExport?mxUtils.bind(this,function(q,u){q=null!=d.pages?d.pages.length:1;var J=null==d.pages||1>=d.pages.length,G=d.getPageIndex(d.currentPage);G=null!=G?G+1:1;d.downloadFile("pdf",null,null,!u.selection,J||!u.allPages&&u.pagesFrom==G&&u.pagesTo==G,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==G&&u.pagesTo==G?null:{from:Math.max(0,Math.min(q-1,u.pagesFrom-1)),to:Math.max(0,Math.min(q-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown,
u.shadows)}):null,mxResources.get("export"))}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function q(){null!=u&&u.removeDraft();d.fileLoaded(new LocalFile(d,d.emptyDiagramXml))}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==x.getSelectionCount()){var q=x.getSelectionCell(),
@@ -13776,7 +13778,7 @@ y.setToggleAction(!0);y.setSelectedCallback(function(){return"simple"==x.adaptiv
"noAdaptiveColors"],u)})));isLocalStorage&&(y=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var F=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});F.setToggleAction(!0);F.setSelectedCallback(function(){return F.isEnabled()&&
d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var q=x.getSelectionCells(),u=[],J=0;J<q.length;J++)x.getModel().isVertex(q[J])&&u.push(q[J]);0<u.length&&(q=new EditGeometryDialog(d,u),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");d.actions.addAction("copyStyle",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var q=x.getSelectionCell(),u=x.getCellStyle(q,!1);d.copiedStyle={};var J=[],G=[],H;for(H in u)J.push(u[H]),
G.push(H);x.copyCellStyles([q],G,J,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,Editor.altKey+"+C");d.actions.addAction("pasteStyle",function(){x.isEnabled()&&!x.isSelectionEmpty()&&null!=d.copiedStyle&&x.pasteCellStyles(x.includeDescendants(x.getSelectionCells()),d.copiedStyle,d.copiedStyle,!0)},null,null,Editor.altKey+"+V");d.actions.put("exportSvg",new Action("formatSvg...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",
-mxUtils.bind(this,function(q,u,J,G,H,g,n,C,I,N,O,Q,U,V){q=parseInt(q);d.lastExportSvgEditable=H;!isNaN(q)&&0<q&&d.exportSvg(q/100,u,J,G,H,g,n,!C,I,N,Q,U,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action("formatPng...",function(){p("png",d.lastExportPngEditable,function(q,u,J,G,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action("formatJpg...",function(){p("jpeg")}));d.actions.put("exportWebp",new Action("formatWebp...",function(){p("webp")}));y=d.actions.addAction("copyAsImage",
+mxUtils.bind(this,function(q,u,J,G,H,g,p,C,I,M,O,Q,U,V){q=parseInt(q);d.lastExportSvgEditable=H;!isNaN(q)&&0<q&&d.exportSvg(q/100,u,J,G,H,g,p,!C,I,M,Q,U,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action("formatPng...",function(){n("png",d.lastExportPngEditable,function(q,u,J,G,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action("formatJpg...",function(){n("jpeg")}));d.actions.put("exportWebp",new Action("formatWebp...",function(){n("webp")}));y=d.actions.addAction("copyAsImage",
mxUtils.bind(this,function(){var q=mxUtils.sortCells(x.model.getTopmostCells(x.getSelectionCells())),u=mxUtils.getXml(0==q.length?d.editor.getGraphXml():x.encodeCells(q));d.copyImage(q,u)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");y.visible=Editor.enableNativeClipboard&&d.editor.isExportToCanvas();y=d.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var q=mxUtils.sortCells(x.model.getTopmostCells(x.getSelectionCells())),u=mxUtils.getXml(0==q.length?d.editor.getGraphXml():x.encodeCells(q));
d.copySvg(q,u)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");y.visible=Editor.enableNativeClipboard&&d.editor.isExportToCanvas();y=d.actions.put("shadowVisible",new Action("shadow",function(){x.setShadowVisible(!x.shadowVisible)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return x.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,u){d.isOwnGDriveDomain()&&mxEvent.isShiftDown(u)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),
urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("downloadDesktop...",function(){d.openLink("https://get.diagrams.net/")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
@@ -13788,15 +13790,15 @@ null,null,Editor.ctrlKey+"+F");y=new Action("exportVsdx",function(){var q=null==
function(){d.exportVisio(!G.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}});y.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};d.actions.put("exportVsdx",y);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(Editor.isSettingsEnabled()&&
("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";u.style.alignItems="center";u.style.cssFloat="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(q);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(G){mxEvent.getSource(G)!=q&&(q.checked=!q.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),
function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(G){d.handleError(G)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var J=d.actions.get("plugins");null==J||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),J.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(G,H){if(0<H.value.length)try{var g=
-JSON.parse(H.value),n=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(g)),C=new EmbedDialog(d,n);d.showDialog(C.container,450,240,!0);C.init()}catch(I){d.handleError(I)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
+JSON.parse(H.value),p=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(g)),C=new EmbedDialog(d,p);d.showDialog(C.container,450,240,!0);C.init()}catch(I){d.handleError(I)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(G){d.handleError(G)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,u,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});
-(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(q,u){var J=mxLanguage;null==urlParams.lang&&isLocalStorage&&(J=mxSettings.settings.language);var G=mxUtils.bind(this,function(g){var n=""==g?mxResources.get("automatic"):mxLanguageMap[g],C=null;""!=n&&(C=q.addItem(n,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(g)}),u),(g==J||""==g&&null==J)&&q.addCheckmark(C,Editor.checkmarkImage));return C});G("");q.addSeparator(u);for(var H in mxLanguageMap)G(H)})));
+(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(q,u){var J=mxLanguage;null==urlParams.lang&&isLocalStorage&&(J=mxSettings.settings.language);var G=mxUtils.bind(this,function(g){var p=""==g?mxResources.get("automatic"):mxLanguageMap[g],C=null;""!=p&&(C=q.addItem(p,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(g)}),u),(g==J||""==g&&null==J)&&q.addCheckmark(C,Editor.checkmarkImage));return C});G("");q.addSeparator(u);for(var H in mxLanguageMap)G(H)})));
d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));d.adaptiveColorsWindow.window.setVisible(!0)}));
-y=this.get("viewZoom");var M=y.funct;y.funct=mxUtils.bind(this,function(q,u){M.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],u)});y=this.get("layout");var K=y.funct;y.funct=function(q,u){K.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var J=null,G=20,H=20,g=function(){"undefined"!==typeof mxOrgChartLayout&&null!=J&&d.tryAndHandle(mxUtils.bind(this,function(){var V=d.editor.graph,X=new mxOrgChartLayout(V,
-J,G,H),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(W=V.getSelectionCell());X.execute(W)}))},n=document.createElement("div"),C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("orgChartType")+": ");n.appendChild(C);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";C=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
-mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var N=0;N<C.length;N++){var O=document.createElement("option");mxUtils.write(O,C[N]);O.value=N;2==N&&O.setAttribute("selected","selected");I.appendChild(O)}mxEvent.addListener(I,"change",function(){J=I.value});n.appendChild(I);C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,
-mxResources.get("parentChildSpacing")+": ");n.appendChild(C);var Q=document.createElement("input");Q.type="number";Q.value=G;Q.style.width="160px";Q.style.boxSizing="border-box";n.appendChild(Q);mxEvent.addListener(Q,"change",function(){G=Q.value});C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("siblingSpacing")+": ");n.appendChild(C);var U=document.createElement("input");U.type="number";U.value=H;U.style.width=
-"160px";U.style.boxSizing="border-box";n.appendChild(U);mxEvent.addListener(U,"change",function(){H=U.value});C=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(U.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});C.className="geBtn";n=new CustomDialog(d,n,function(){null==J&&(J=2);d.loadOrgChartLayouts(g)},null,null,null,C);d.showDialog(n.container,
+y=this.get("viewZoom");var N=y.funct;y.funct=mxUtils.bind(this,function(q,u){N.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],u)});y=this.get("layout");var K=y.funct;y.funct=function(q,u){K.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var J=null,G=20,H=20,g=function(){"undefined"!==typeof mxOrgChartLayout&&null!=J&&d.tryAndHandle(mxUtils.bind(this,function(){var V=d.editor.graph,X=new mxOrgChartLayout(V,
+J,G,H),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(W=V.getSelectionCell());X.execute(W)}))},p=document.createElement("div"),C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("orgChartType")+": ");p.appendChild(C);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";C=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var M=0;M<C.length;M++){var O=document.createElement("option");mxUtils.write(O,C[M]);O.value=M;2==M&&O.setAttribute("selected","selected");I.appendChild(O)}mxEvent.addListener(I,"change",function(){J=I.value});p.appendChild(I);C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,
+mxResources.get("parentChildSpacing")+": ");p.appendChild(C);var Q=document.createElement("input");Q.type="number";Q.value=G;Q.style.width="160px";Q.style.boxSizing="border-box";p.appendChild(Q);mxEvent.addListener(Q,"change",function(){G=Q.value});C=document.createElement("div");C.style.marginTop="6px";C.style.display="inline-block";C.style.width="180px";mxUtils.write(C,mxResources.get("siblingSpacing")+": ");p.appendChild(C);var U=document.createElement("input");U.type="number";U.value=H;U.style.width=
+"160px";U.style.boxSizing="border-box";p.appendChild(U);mxEvent.addListener(U,"change",function(){H=U.value});C=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(U.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});C.className="geBtn";p=new CustomDialog(d,p,function(){null==J&&(J=2);d.loadOrgChartLayouts(g)},null,null,null,C);d.showDialog(p.container,
355,140,!0,!0)},u,null,z());q.addSeparator(u);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var J=new mxParallelEdgeLayout(x);J.checkOverlap=!0;d.prompt(mxResources.get("spacing"),J.spacing,mxUtils.bind(this,function(G){d.tryAndHandle(mxUtils.bind(this,function(){J.spacing=G;d.executeLayout(function(){J.execute(x.getDefaultParent(),x.isSelectionEmpty()?null:x.getSelectionCells())},!1)}))}))}))}),u);q.addSeparator(u);d.menus.addMenuItem(q,
"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,u){if(mxClient.IS_CHROMEAPP||!d.isOffline()&&!navigator.standalone){var J=q.addItem(mxResources.get("search")+":",null,null,u,null,null,!1);J.style.cursor="default";var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("size","25");G.style.borderWidth="1px";G.style.marginLeft="8px";mxEvent.addListener(G,"keydown",mxUtils.bind(this,function(H){var g=mxUtils.trim(G.value);
13==H.keyCode&&0<g.length?(this.editorUi.searchHelp(g),G.value="",window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(G.value="")}));J.firstChild.nextSibling.appendChild(G);mxEvent.addGestureListeners(G,function(H){document.activeElement!=G&&G.focus();mxEvent.consume(H)},function(H){mxEvent.consume(H)},function(H){mxEvent.consume(H)});window.setTimeout(function(){G.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),
@@ -13804,76 +13806,76 @@ d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.p
"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),u)):this.addMenuItems(q,"- keyboardShortcuts quickStart downloadDesktop support - about".split(" "),u)}else this.addMenuItems(q,["keyboardShortcuts","-","about"],u);"1"==urlParams.test&&(q.addSeparator(u),this.addSubmenu("testDevelop",q,u))})));d.actions.addAction("languageCode...",function(){var q=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=
0<u.length?u:null,Graph.translateDiagram=!0,x.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["languageCode","-"],u);u=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;x.refresh()},u);Graph.translateDiagram||q.addCheckmark(u,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");
mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");
-mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!x.isSelectionEmpty()){var q=x.cloneCells(x.getSelectionCells()),u=x.getBoundingBoxFromGeometry(q,!0);q=x.moveCells(q,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(x.encodeCells(q)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(n){return null==
-n||null==n.boundingBox||!isNaN(n.boundingBox.x)&&!isNaN(n.boundingBox.y)&&!isNaN(n.boundingBox.width)&&!isNaN(n.boundingBox.height)}var u=x.isSelectionEmpty()?x.getGraphBounds():x.getBoundingBox(x.getSelectionCells()),J=x.view.translate,G=x.view.scale;x.insertVertex(x.getDefaultParent(),null,"",u.x/G-J.x,u.y/G-J.y,u.width/G,u.height/G,"fillColor=none;strokeColor=red;");var H=0,g=0;x.view.states.visit(function(n,C){n=!0;q(C.shape)||(console.log("invalid shape",C.cell.id,C.shape),n=!1);q(C.text)||(console.log("invalid text",
-C.cell.id,C.text),n=!1);n||H++;g++});console.log("states checked",g,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(u){if(0<u.length)try{var J=function(C){function I(ba){if(null==Z[ba]){if(Z[ba]=!0,null!=Q[ba]){for(;0<Q[ba].length;){var ia=Q[ba].pop();I(ia)}delete Q[ba]}}else mxLog.debug(N+": Visited: "+ba)}var N=C.parentNode.id,
-O=C.childNodes;C={};for(var Q={},U=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==C[W.id]){C[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=U?mxLog.debug(N+": Multiple roots: "+W.id):U=W.id:(null==Q[Y]&&(Q[Y]=[]),Q[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=N+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(N+": Checked");var Z={};null==U?mxLog.debug(N+": No root"):(I(U),Object.keys(Z).length!=Object.keys(C).length&&
-(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",Q)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var G=mxUtils.parseXml(u),H=d.getPagesForNode(G.documentElement,"mxGraphModel");if(null!=H&&0<H.length)try{var g=d.getHashValueForPages(H);mxLog.debug("Checksum: ",g)}catch(C){mxLog.debug("Error: ",C.message)}else mxLog.debug("No pages found for checksum");var n=G.getElementsByTagName("root");for(u=0;u<n.length;u++)J(n[u]);
+mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!x.isSelectionEmpty()){var q=x.cloneCells(x.getSelectionCells()),u=x.getBoundingBoxFromGeometry(q,!0);q=x.moveCells(q,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(x.encodeCells(q)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(p){return null==
+p||null==p.boundingBox||!isNaN(p.boundingBox.x)&&!isNaN(p.boundingBox.y)&&!isNaN(p.boundingBox.width)&&!isNaN(p.boundingBox.height)}var u=x.isSelectionEmpty()?x.getGraphBounds():x.getBoundingBox(x.getSelectionCells()),J=x.view.translate,G=x.view.scale;x.insertVertex(x.getDefaultParent(),null,"",u.x/G-J.x,u.y/G-J.y,u.width/G,u.height/G,"fillColor=none;strokeColor=red;");var H=0,g=0;x.view.states.visit(function(p,C){p=!0;q(C.shape)||(console.log("invalid shape",C.cell.id,C.shape),p=!1);q(C.text)||(console.log("invalid text",
+C.cell.id,C.text),p=!1);p||H++;g++});console.log("states checked",g,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(u){if(0<u.length)try{var J=function(C){function I(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=Q[aa]){for(;0<Q[aa].length;){var ha=Q[aa].pop();I(ha)}delete Q[aa]}}else mxLog.debug(M+": Visited: "+aa)}var M=C.parentNode.id,
+O=C.childNodes;C={};for(var Q={},U=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==C[W.id]){C[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=U?mxLog.debug(M+": Multiple roots: "+W.id):U=W.id:(null==Q[Y]&&(Q[Y]=[]),Q[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=M+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(M+": Checked");var Z={};null==U?mxLog.debug(M+": No root"):(I(U),Object.keys(Z).length!=Object.keys(C).length&&
+(mxLog.debug(M+": Invalid tree: (see console)"),console.log(M+": Invalid tree",Q)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var G=mxUtils.parseXml(u),H=d.getPagesForNode(G.documentElement,"mxGraphModel");if(null!=H&&0<H.length)try{var g=d.getHashValueForPages(H);mxLog.debug("Checksum: ",g)}catch(C){mxLog.debug("Error: ",C.message)}else mxLog.debug("No pages found for checksum");var p=G.getElementsByTagName("root");for(u=0;u<p.length;u++)J(p[u]);
mxLog.show()}catch(C){d.handleError(C),null!=window.console&&console.error(C)}});d.showDialog(q.container,620,460,!0,!0);q.init()}));var L=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(u){var J=d.getCurrentFile();if(0<u.length&&null!=J)try{var G=JSON.parse(u);J.patch([G],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,J){L=d.getPagesForXml(d.getFileData(!0));
q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(L)}],["Diff",function(u,J){try{q.textarea.value=JSON.stringify(d.diffPages(L,d.pages),null,2)}catch(G){d.handleError(G)}}]]);null==L?(L=d.getPagesForXml(d.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(L)):q.textarea.value=JSON.stringify(d.diffPages(L,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));
-d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=d.getCurrentFile();null!=d.pages&&null!=q?d.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(u){d.spinner.stop();var J=d.getHashValueForPages(d.pages),G=q.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),g=u.getDescriptorChecksum(u.getDescriptor()),n=u.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",J);console.log("Remote File",[u],"rev",
-n==G,"desc",g==H,"checksum",H);d.alert("Checksums "+(H==J?"match":"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",
+d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=d.getCurrentFile();null!=d.pages&&null!=q?d.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(u){d.spinner.stop();var J=d.getHashValueForPages(d.pages),G=q.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),g=u.getDescriptorChecksum(u.getDescriptor()),p=u.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",J);console.log("Remote File",[u],"rev",
+p==G,"desc",g==H,"checksum",H);d.alert("Checksums "+(H==J?"match":"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",
d.diffPages(q.ownPages,q.theirPages));var u=q.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,q.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(q.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(q.theirPages,u)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(q.ownPages,
q.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(q.theirPages,q.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(q.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(q.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(q.theirPages,d.pages)))}null!=q&&console.log("Shadow pages",[d.getXmlForPages(q.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));
d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var q=d.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([d.diffPages(q.shadowPages,d.pages)])),q.ownPages=d.clonePages(d.pages),q.theirPages=d.clonePages(d.pages),q.shadowPages=d.clonePages(d.pages),null!=q.sync&&(q.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){x.model.beginUpdate();
-try{var q=x.model.cells,u=0,J=[],G=[],H;for(H in q){var g=q[H],n=x.getCurrentCellStyle(g)[mxConstants.STYLE_IMAGE];null!=n&&"data:"==n.substring(0,5)&&(null==J[n]&&(J[n]=(J[n]||0)+1,u++),G.push(g))}x.setCellStyles(mxConstants.STYLE_IMAGE,null,G);console.log("Removed",u,"image(s) from",G.length,"cell(s): ",[G,J])}finally{x.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,x.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=
-new mxImageExport,u=x.getGraphBounds(),J=x.view.scale,G=mxUtils.createXmlDocument(),H=G.createElement("output");G.appendChild(H);G=new mxXmlCanvas2D(H);G.translate(Math.floor((1-u.x)/J),Math.floor((1-u.y)/J));G.scale(1/J);var g=0,n=G.save;G.save=function(){g++;n.apply(this,arguments)};var C=G.restore;G.restore=function(){g--;C.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(N){mxLog.debug("entering shape",N,g);I.apply(this,arguments);mxLog.debug("leaving shape",N,g)};q.drawState(x.getView().getState(x.model.root),
-G);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",g)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var c=null,f=null,k=null,m=null,t=null,v=null,A=null,E=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(x.view.revalidate=c,c=null):(c=x.view.revalidate,x.view.revalidate=function(){var q=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
-[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=f?(d.selectPage=f,f=null):(f=d.selectPage,d.selectPage=function(){var q=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=k?(d.diffPages=k,k=null):(k=d.diffPages,d.diffPages=function(){var q=Date.now(),u=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);
-return u});null!=m?(d.patchPages=m,m=null):(m=d.patchPages,d.patchPages=function(){var q=Date.now(),u=m.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=t?(d.clonePages=t,t=null):(t=d.clonePages,d.clonePages=function(){var q=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=A?(d.getHashValueForPages=A,
-A=null):(A=d.getHashValueForPages,d.getHashValueForPages=function(){var q=Date.now(),u=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=E?(d.resolveCrossReferences=E,E=null):(E=d.resolveCrossReferences,d.resolveCrossReferences=function(){var q=Date.now(),u=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return u});
+try{var q=x.model.cells,u=0,J=[],G=[],H;for(H in q){var g=q[H],p=x.getCurrentCellStyle(g)[mxConstants.STYLE_IMAGE];null!=p&&"data:"==p.substring(0,5)&&(null==J[p]&&(J[p]=(J[p]||0)+1,u++),G.push(g))}x.setCellStyles(mxConstants.STYLE_IMAGE,null,G);console.log("Removed",u,"image(s) from",G.length,"cell(s): ",[G,J])}finally{x.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,x.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=
+new mxImageExport,u=x.getGraphBounds(),J=x.view.scale,G=mxUtils.createXmlDocument(),H=G.createElement("output");G.appendChild(H);G=new mxXmlCanvas2D(H);G.translate(Math.floor((1-u.x)/J),Math.floor((1-u.y)/J));G.scale(1/J);var g=0,p=G.save;G.save=function(){g++;p.apply(this,arguments)};var C=G.restore;G.restore=function(){g--;C.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(M){mxLog.debug("entering shape",M,g);I.apply(this,arguments);mxLog.debug("leaving shape",M,g)};q.drawState(x.getView().getState(x.model.root),
+G);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",g)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var c=null,f=null,l=null,m=null,t=null,v=null,B=null,E=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(x.view.revalidate=c,c=null):(c=x.view.revalidate,x.view.revalidate=function(){var q=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
+[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=f?(d.selectPage=f,f=null):(f=d.selectPage,d.selectPage=function(){var q=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=l?(d.diffPages=l,l=null):(l=d.diffPages,d.diffPages=function(){var q=Date.now(),u=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);
+return u});null!=m?(d.patchPages=m,m=null):(m=d.patchPages,d.patchPages=function(){var q=Date.now(),u=m.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=t?(d.clonePages=t,t=null):(t=d.clonePages,d.clonePages=function(){var q=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=B?(d.getHashValueForPages=B,
+B=null):(B=d.getHashValueForPages,d.getHashValueForPages=function(){var q=Date.now(),u=B.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-q+" ms","args",arguments);return u});null!=E?(d.resolveCrossReferences=E,E=null):(E=d.resolveCrossReferences,d.resolveCrossReferences=function(){var q=Date.now(),u=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return u});
null!=v?(d.getFileData=v,v=null):(v=d.getFileData,d.getFileData=function(){var q=Date.now(),u=v.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-q+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),
u);var J=q.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&q.addCheckmark(J,Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action("moreShapes...",function(q){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?
300:280:260,!0,!0)}));d.actions.put("createShape",new Action("shape...",function(q){x.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(d,q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=z;d.isOffline()||("1"!=urlParams.embed&&(d.actions.put("embedNotion",new Action("notion...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";
q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));q.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(J){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(J)});d.getPublicUrl(d.getCurrentFile(),function(J){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,J,d.getCurrentFile(),function(G,H,g,n,C,I,N,O,Q,U,V,X){N=["border=0"];Q&&N.push("tags=%7B%7D");G=new EmbedDialog(d,d.createLink(G,H,!0,n,C,I,"public"==U?J:null,null,N,null,g,null,X));d.showDialog(G.container,450,240,!0,!0);G.init()},null,!0)})})),d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")})),
-d.actions.put("embedHtml",new Action("html...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(u,J,G,H,g,n,C,I,N,O,Q,U){d.createHtml(u,J,G,H,g,n,C,I,N,O,Q,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
-Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!ba){var ia=Y.document.createElement("div");ia.marginLeft="26px";ia.marginTop="26px";mxUtils.write(ia,mxResources.get("updatingDocument"));var ea=Y.document.createElement("img");
-ea.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ea.style.marginLeft="6px";ia.appendChild(ea);Y.document.body.insertBefore(ia,Y.document.body.firstChild);window.setTimeout(function(){var da=document.createElement("script");da.type="text/javascript";da.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(da);ia.parentNode.removeChild(ia)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(da){d.handleError(da)}});
+mxEvent.consume(J)});d.getPublicUrl(d.getCurrentFile(),function(J){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,J,d.getCurrentFile(),function(G,H,g,p,C,I,M,O,Q,U,V,X){M=["border=0"];Q&&M.push("tags=%7B%7D");G=new EmbedDialog(d,d.createLink(G,H,!0,p,C,I,"public"==U?J:null,null,M,null,g,null,X));d.showDialog(G.container,450,240,!0,!0);G.init()},null,!0)})})),d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")})),
+d.actions.put("embedHtml",new Action("html...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(u,J,G,H,g,p,C,I,M,O,Q,U){d.createHtml(u,J,G,H,g,p,C,I,M,O,Q,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&
+Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var ha=Y.document.createElement("div");ha.marginLeft="26px";ha.marginTop="26px";mxUtils.write(ha,mxResources.get("updatingDocument"));var ea=Y.document.createElement("img");
+ea.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ea.style.marginLeft="6px";ha.appendChild(ea);Y.document.body.insertBefore(ha,Y.document.body.firstChild);window.setTimeout(function(){var da=document.createElement("script");da.type="text/javascript";da.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(da);ha.parentNode.removeChild(ha)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(da){d.handleError(da)}});
d.showDialog(W.container,450,240,!0,!0);W.init()}),U)})})})),d.actions.put("liveImage",new Action("Live image...",function(){var q=d.getCurrentFile();null!=q&&d.getPublicUrl(q,function(u){null!=u?(u=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})})),d.actions.put("embedImage",new Action("image...",function(){d.showEmbedImageDialog(function(q,
-u,J,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,u,J,G,H,g,function(n){d.spinner.stop();n=new EmbedDialog(d,n);d.showDialog(n.container,450,240,!0,!0);n.init()},function(n){d.spinner.stop();d.handleError(n)})},mxResources.get("image"),mxResources.get("retina"),d.editor.isExportToCanvas())})),d.actions.put("embedSvg",new Action("formatSvg...",function(){d.showEmbedImageDialog(function(q,u,J,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,
-u,J,G,H,g,function(n){d.spinner.stop();n=new EmbedDialog(d,n);d.showDialog(n.container,450,240,!0,!0);n.init()},function(n){d.spinner.stop();d.handleError(n)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),d.actions.put("embedIframe",new Action("iframe...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){var u=x.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/x.view.scale))+
-2,null,null,null,q,d.getCurrentFile(),function(J,G,H,g,n,C,I,N,O,Q,U,V){var X=[];O&&X.push("tags=%7B%7D");J=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+I+";height:"+N+';" src="'+d.createLink(J,G,!0,g,n,C,"public"==Q?q:null,null,X,null,H,U,V)+'"'+(U?' allowtransparency="true"':"")+"></iframe>");d.showDialog(J.container,450,240,!0,!0);J.init()},!0,!0)})})));d.actions.put("publishLink",new Action("link...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showPublishLinkDialog(null,
-null,null,null,null,null,q,d.getCurrentFile(),function(u,J,G,H,g,n,C,I,N,O,Q,U){C=[];H&&N&&C.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,J,!0,H,g,n,"public"==O?q:null,null,C,null,G,null,U));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})},null,null,null,!d.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)y=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&
+u,J,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,u,J,G,H,g,function(p){d.spinner.stop();p=new EmbedDialog(d,p);d.showDialog(p.container,450,240,!0,!0);p.init()},function(p){d.spinner.stop();d.handleError(p)})},mxResources.get("image"),mxResources.get("retina"),d.editor.isExportToCanvas())})),d.actions.put("embedSvg",new Action("formatSvg...",function(){d.showEmbedImageDialog(function(q,u,J,G,H,g){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,
+u,J,G,H,g,function(p){d.spinner.stop();p=new EmbedDialog(d,p);d.showDialog(p.container,450,240,!0,!0);p.init()},function(p){d.spinner.stop();d.handleError(p)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),d.actions.put("embedIframe",new Action("iframe...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){var u=x.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/x.view.scale))+
+2,null,null,null,q,d.getCurrentFile(),function(J,G,H,g,p,C,I,M,O,Q,U,V){var X=[];O&&X.push("tags=%7B%7D");J=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+I+";height:"+M+';" src="'+d.createLink(J,G,!0,g,p,C,"public"==Q?q:null,null,X,null,H,U,V)+'"'+(U?' allowtransparency="true"':"")+"></iframe>");d.showDialog(J.container,450,240,!0,!0);J.init()},!0,!0)})})));d.actions.put("publishLink",new Action("link...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showPublishLinkDialog(null,
+null,null,null,null,null,q,d.getCurrentFile(),function(u,J,G,H,g,p,C,I,M,O,Q,U){C=[];H&&M&&C.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,J,!0,H,g,p,"public"==O?q:null,null,C,null,G,null,U));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})},null,null,null,!d.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)y=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&
d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(y=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),y.setToggleAction(!0),y.setSelectedCallback(function(){return d.isHighContrast()}));y=d.actions.addAction("search",function(){if(null!=d.sidebar){var q=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",
!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});y.label=mxResources.get("searchShapes");y.setToggleAction(!0);y.setSelectedCallback(function(){return null!=d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(q){x.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(q){x.isEditing()&&x.stopEditing();
var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var J=d.createLoadMessage("save");J.xml=u;!0!==q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(J.exit=!0);u=JSON.stringify(J)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.clearStatus());q=d.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&
null==q.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var q=function(){d.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):
"";(window.opener||window.parent).postMessage(u,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,u){d.editor.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],u),Editor.jpgSupported&&this.addMenuItems(q,["exportJpg"],u),Editor.webpSupported&&this.addMenuItems(q,["exportWebp"],u)):d.isOffline()||
mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],u);this.addMenuItems(q,["exportSvg","-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(q,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],u);!d.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(q,["exportVsdx"],u);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(q.addSeparator(u),
-this.addMenuItem(q,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||d.isOffline()||this.addMenuItems(q,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||d.isOffline()||(q.addSeparator(u),d.menus.addSubmenu("embed",q,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,u){function J(g){g.pickFile(function(n){d.spinner.spin(document.body,
-mxResources.get("loading"))&&g.getFile(n,function(C){var I="data:image/"==C.getData().substring(0,11)?H(C.getTitle()):"text/xml";/\.svg$/i.test(C.getTitle())&&!d.editor.isDataSvg(C.getData())&&(C.setData(Editor.createSvgDataUri(C.getData())),I="image/svg+xml");G(C.getData(),I,C.getTitle())},function(C){d.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)},g==d.drive)},!0)}var G=mxUtils.bind(this,function(g,n,C){var I=x.view,N=x.getGraphBounds(),O=x.snap(Math.ceil(Math.max(0,N.x/I.scale-
-I.translate.x)+4*x.gridSize)),Q=x.snap(Math.ceil(Math.max(0,(N.y+N.height)/I.scale-I.translate.y)+4*x.gridSize));"data:image/"==g.substring(0,11)?d.loadImage(g,mxUtils.bind(this,function(U){var V=!0,X=mxUtils.bind(this,function(){d.resizeImage(U,g,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(d.maxImageSize/Y,d.maxImageSize/Z)):1;d.importFile(g,n,O,Q,Math.round(Y*W),Math.round(Z*W),C,function(ba){d.spinner.stop();x.setSelectionCells(ba);x.scrollCellToVisible(x.getSelectionCell())})}),
-V)});g.length>d.resampleThreshold?d.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(g,n,O,Q,0,0,C,function(U){d.spinner.stop();x.setSelectionCells(U);x.scrollCellToVisible(x.getSelectionCell())})}),H=mxUtils.bind(this,function(g){var n="text/xml";/\.png$/i.test(g)?n="image/png":/\.jpe?g$/i.test(g)?n="image/jpg":/\.gif$/i.test(g)?n="image/gif":/\.pdf$/i.test(g)&&(n="application/pdf");return n});"undefined"!=
+this.addMenuItem(q,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||d.isOffline()||this.addMenuItems(q,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||d.isOffline()||(q.addSeparator(u),d.menus.addSubmenu("embed",q,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,u){function J(g){g.pickFile(function(p){d.spinner.spin(document.body,
+mxResources.get("loading"))&&g.getFile(p,function(C){var I="data:image/"==C.getData().substring(0,11)?H(C.getTitle()):"text/xml";/\.svg$/i.test(C.getTitle())&&!d.editor.isDataSvg(C.getData())&&(C.setData(Editor.createSvgDataUri(C.getData())),I="image/svg+xml");G(C.getData(),I,C.getTitle())},function(C){d.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)},g==d.drive)},!0)}var G=mxUtils.bind(this,function(g,p,C){var I=x.view,M=x.getGraphBounds(),O=x.snap(Math.ceil(Math.max(0,M.x/I.scale-
+I.translate.x)+4*x.gridSize)),Q=x.snap(Math.ceil(Math.max(0,(M.y+M.height)/I.scale-I.translate.y)+4*x.gridSize));"data:image/"==g.substring(0,11)?d.loadImage(g,mxUtils.bind(this,function(U){var V=!0,X=mxUtils.bind(this,function(){d.resizeImage(U,g,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(d.maxImageSize/Y,d.maxImageSize/Z)):1;d.importFile(g,p,O,Q,Math.round(Y*W),Math.round(Z*W),C,function(aa){d.spinner.stop();x.setSelectionCells(aa);x.scrollCellToVisible(x.getSelectionCell())})}),
+V)});g.length>d.resampleThreshold?d.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(g,p,O,Q,0,0,C,function(U){d.spinner.stop();x.setSelectionCells(U);x.scrollCellToVisible(x.getSelectionCell())})}),H=mxUtils.bind(this,function(g){var p="text/xml";/\.png$/i.test(g)?p="image/png":/\.jpe?g$/i.test(g)?p="image/jpg":/\.gif$/i.test(g)?p="image/gif":/\.pdf$/i.test(g)&&(p="application/pdf");return p});"undefined"!=
typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){J(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){J(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){J(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){J(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){J(d.gitLab)},
u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){J(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||
-(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var g=new FilenameDialog(d,"",mxResources.get("import"),function(n){if(null!=n&&0<n.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var C=/(\.png)($|\?)/i.test(n)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(n),function(I){G(I,C,n)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==C)}},mxResources.get("url"));d.showDialog(g.container,
+(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var g=new FilenameDialog(d,"",mxResources.get("import"),function(p){if(null!=p&&0<p.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var C=/(\.png)($|\?)/i.test(p)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(p),function(I){G(I,C,p)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==C)}},mxResources.get("url"));d.showDialog(g.container,
300,80,!0,!0);g.init()},u))}))).isEnabled=z;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,u){var J=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>J&&this.addSubmenu("viewZoom",q,u,mxResources.get("zoom")),460>J&&d.isPageMenuVisible()&&this.addSubmenu("pages",q,u),320>J&&this.addSubmenu("insert",q,u),360>J&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",q,u))})));this.put("appearance",
new Menu(mxUtils.bind(this,function(q,u){if(d.isAutoDarkModeSupported()){var J=d.menus.addMenuItem(q,"autoMode",u);null!=J&&J.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(q,["lightMode","darkMode","-"],u);J=d.menus.addMenuItem(q,"highContrast",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(J,"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",
function(q){x.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(q)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(q,u){var J="1"==urlParams.sketch?"sketch":mxSettings.getUi(),G=q.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},u),H=q.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme("kennedy")},
-u),g=!1;if("kennedy"==J||"dark"==J)q.addCheckmark(H,Editor.checkmarkImage),g=!0;for(var n=0;n<Editor.themes.length;n++)mxUtils.bind(this,function(C){H=q.addItem(mxResources.get("min"==C?"minimal":C),null,function(){d.setCurrentTheme(C)},u);J==C&&(q.addCheckmark(H,Editor.checkmarkImage),g=!0);"simple"==C&&q.addSeparator(u)})(Editor.themes[n]);g||q.addCheckmark(G,Editor.checkmarkImage)})));y=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();
+u),g=!1;if("kennedy"==J||"dark"==J)q.addCheckmark(H,Editor.checkmarkImage),g=!0;for(var p=0;p<Editor.themes.length;p++)mxUtils.bind(this,function(C){H=q.addItem(mxResources.get("min"==C?"minimal":C),null,function(){d.setCurrentTheme(C)},u);J==C&&(q.addCheckmark(H,Editor.checkmarkImage),g=!0);"simple"==C&&q.addSeparator(u)})(Editor.themes[p]);g||q.addCheckmark(G,Editor.checkmarkImage)})));y=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();
if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(J,G){q.invalidFileHandle=null;q.fileHandle=J;q.title=G.name;q.desc=G;d.save(G.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var u=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(J){null!=J&&0<J.length&&null!=q&&J!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
q.rename(J,mxUtils.bind(this,function(G){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(G){this.editorUi.handleError(G,null!=G?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(J){if(null!=J&&0<J.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,
-340,100,!0,!0);u.init()}}));y.isEnabled=function(){return this.enabled&&z.apply(this,arguments)};y.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var u=d.getCopyFilename(q);q.constructor==DriveFile?(u=new SaveDialog(d,u,mxUtils.bind(this,function(J,G,H){d.hideDialog();q.copyFile(mxUtils.bind(this,function(g){q.move(H,mxUtils.bind(this,function(n){d.spinner.stop()}),mxUtils.bind(this,function(n){d.handleError(n)}))}),
+340,100,!0,!0);u.init()}}));y.isEnabled=function(){return this.enabled&&z.apply(this,arguments)};y.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var u=d.getCopyFilename(q);q.constructor==DriveFile?(u=new SaveDialog(d,u,mxUtils.bind(this,function(J,G,H){d.hideDialog();q.copyFile(mxUtils.bind(this,function(g){q.move(H,mxUtils.bind(this,function(p){d.spinner.stop()}),mxUtils.bind(this,function(p){d.handleError(p)}))}),
mxUtils.bind(this,function(g){d.handleError(g)}),J.value)}),null,null,null,null,null,null,[App.MODE_GOOGLE],mxResources.get("ok")),d.showDialog(u.container,420,150,!0,!1,mxUtils.bind(this,function(){d.hideDialog()})),u.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));y=new Action("openFolder",function(q,u){q=d.getCurrentFile();null!=q&&d.openLink(q.getFolderUrl())});y.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};d.actions.put("openFolder",
y);d.actions.addAction("openFile...",mxUtils.bind(this,function(){var q=d.getCurrentFile();null!=q&&d.openLink(q.getFileUrl())}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var u=new SaveDialog(d,"",mxUtils.bind(this,function(J,G,H){d.hideDialog();d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(H,mxUtils.bind(this,function(g){d.spinner.stop()}),mxUtils.bind(this,function(g){d.handleError(g)}))}),
null,null,null,null,null,q.getMode());d.showDialog(u.container,420,70,!0,!1,mxUtils.bind(this,function(){d.hideDialog()}));u.init()}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["publishLink","presentationMode"],u)})));EditorUi.isElectronApp||!d.isOwnGDriveDomain()||"draw.io"!=d.getServiceName()||navigator.standalone||d.actions.put("presentationMode",new Action("presentationMode...",function(){var q=null!=d.getCurrentFile()?d.getCurrentFile().getTitle():null;
d.editor.editAsNew(d.getFileData(!0),q,!0,null!=d.currentPage?d.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=d.getCurrentFile();null!=q&&q.share()}catch(u){d.handleError(u)}})).isEnabled=z;this.put("embed",new Menu(mxUtils.bind(this,function(q,u){var J=d.getCurrentFile();null==J||J.getMode()!=App.MODE_GOOGLE&&J.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(J.getTitle())||this.addMenuItems(q,["liveImage","-"],u);this.addMenuItems(q,
["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],u);this.addMenuItems(q,["-","microsoftOffice","-","embedNotion"],u)})));y=function(q){var u=mxResources.get(q)+"...";d.actions.put(q,new Action(u,function(J){if("fromText"==q||"formatSql"==q||"plantUml"==q||"mermaid"==q){var G=new ParseDialog(d,u,q);d.showDialog(G.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else G=new CreateGraphDialog(d,u,q),d.showDialog(G.container,
620,420,!0,!1,function(H,g){if(g)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=G.graph&&(null!=G.graph.container.parentNode&&G.graph.container.parentNode.removeChild(G.graph.container),G.graph.destroy(),G.graph=null)});G.init()})).isEnabled=z};y("mermaid");y("horizontalFlow");y("verticalFlow");y("horizontalTree");y("verticalTree");y("radialTree");y("organic");y("circle");y("fromText");y("formatSql");("https://plant-aws.diagrams.net"!=window.PLANT_URL||EditorUi.enablePlantUml&&
-!d.isOffline())&&y("plantUml");var D=function(q){x.getModel().beginUpdate();try{q=x.addCell(q),x.fireEvent(new mxEventObject("cellsInserted","cells",[q])),x.model.isVertex(q)&&x.isAutoSizeCell(q)&&x.updateCellSize(q)}finally{x.getModel().endUpdate()}x.scrollCellToVisible(q);x.setSelectionCell(q);x.container.focus();x.editAfterInsert&&x.startEditing(q);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(x.view.getState(q))},0);return q},B=function(q,u,J,G,H){q=new mxCell(q,new mxGeometry(0,
-0,u,J),G);q.vertex=!0;null==H&&(H=x.getCenterInsertPoint(x.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=H.x;q.geometry.y=H.y;return D(q)};d.actions.put("insertText",new Action("text",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&x.startEditingAtCell(B("Text",60,30,x.appendFontSize(Editor.defaultTextStyle,x.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint()))},null,null,"A")).isEnabled=z;d.actions.put("insertRectangle",
-new Action("rectangle",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&B("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"D")).isEnabled=z;d.actions.put("insertNote",new Action("note",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&B("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"S")).isEnabled=z;d.actions.put("insertEllipse",new Action("ellipse",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&B("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"F")).isEnabled=z;d.actions.put("insertRhombus",new Action("rhombus",function(q){x.isEnabled()&&
-!x.isCellLocked(x.getDefaultParent())&&B("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"R")).isEnabled=z;d.actions.put("insertEdge",new Action("line",function(q){if(x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())){var u=x.defaultEdgeLength;q=null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint();null==q&&(q=x.getCenterInsertPoint(x.getBoundingBoxFromGeometry([J],
+!d.isOffline())&&y("plantUml");var D=function(q){x.getModel().beginUpdate();try{q=x.addCell(q),x.fireEvent(new mxEventObject("cellsInserted","cells",[q])),x.model.isVertex(q)&&x.isAutoSizeCell(q)&&x.updateCellSize(q)}finally{x.getModel().endUpdate()}x.scrollCellToVisible(q);x.setSelectionCell(q);x.container.focus();x.editAfterInsert&&x.startEditing(q);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(x.view.getState(q))},0);return q},A=function(q,u,J,G,H){q=new mxCell(q,new mxGeometry(0,
+0,u,J),G);q.vertex=!0;null==H&&(H=x.getCenterInsertPoint(x.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=H.x;q.geometry.y=H.y;return D(q)};d.actions.put("insertText",new Action("text",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&x.startEditingAtCell(A("Text",60,30,x.appendFontSize(Editor.defaultTextStyle,x.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint()))},null,null,"A")).isEnabled=z;d.actions.put("insertRectangle",
+new Action("rectangle",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"D")).isEnabled=z;d.actions.put("insertNote",new Action("note",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&A("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"S")).isEnabled=z;d.actions.put("insertEllipse",new Action("ellipse",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"F")).isEnabled=z;d.actions.put("insertRhombus",new Action("rhombus",function(q){x.isEnabled()&&
+!x.isCellLocked(x.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint())},null,null,"R")).isEnabled=z;d.actions.put("insertEdge",new Action("line",function(q){if(x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())){var u=x.defaultEdgeLength;q=null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint();null==q&&(q=x.getCenterInsertPoint(x.getBoundingBoxFromGeometry([J],
!0)));var J=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");J.geometry.setTerminalPoint(q,!0);J.geometry.setTerminalPoint(new mxPoint(q.x+J.geometry.width,q.y),!1);J.geometry.points=[];J.geometry.relative=!0;J.edge=!0;D(J)}},null,null,"C")).isEnabled=z;y=d.actions.put("toggleShapes",new Action("shapes",function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},
null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+K"));y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==d.sidebarWindow&&0<d.hsplitPosition}));this.put("insert",new Menu(mxUtils.bind(this,function(q,u){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(q,["toggleShapes"],u),d.menus.addSubmenu("table",q,u),q.addSeparator(u),d.menus.addMenuItems(q,["insertImage","insertLink","-"],u),d.insertTemplateEnabled&&
!d.isOffline()&&d.menus.addMenuItems(q,["insertTemplate"],u),d.menus.addMenuItems(q,["generate"],u),window.isMermaidEnabled&&d.menus.addMenuItems(q,["mermaid"],u),q.addSeparator(u),d.menus.addSubmenu("insertAdvanced",q,u,mxResources.get("advanced")),d.menus.addSubmenu("layout",q,u)):(this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u),window.isMermaidEnabled&&this.addMenuItems(q,
["mermaid"],u),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["-","insertTemplate"],u),d.menus.addMenuItems(q,["generate","-"],u),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",q,u),this.addSubmenu("insertLayout",q,u,mxResources.get("insert")),q.addSeparator(u),this.addSubmenu("table",q,u)):this.addSubmenu("insertLayout",q,u,mxResources.get("layout")),this.addSubmenu("insertAdvanced",q,u,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,
-function(q,u){d.menus.addInsertTableCellItem(q,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),u)})));d.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){x.popupMenuHandler.hideMenu();d.showImportCsvDialog()})).isEnabled=z;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["fromText","plantUml","formatSql",
-"csv"],u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(q,u){var J=d.getRecent();if(null!=J){for(var G=0;G<J.length;G++)(function(H){var g=H.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");q.addItem(H.title+" ("+mxResources.get(g)+")",null,function(){d.loadFile(H.id)},u)})(J[G]);q.addSeparator(u)}q.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},
-u)}));this.put("openFrom",new Menu(function(q,u){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+
+function(q,u){d.menus.addInsertTableCellItem(q,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),u)})));d.actions.put("csv",new Action(mxResources.get("csv")+"...",function(){x.popupMenuHandler.hideMenu();d.showImportCsvDialog()})).isEnabled=z;this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,u){var J=["fromText","plantUml","formatSql","csv"];EditorUi.enablePlantUml||
+J.splice(1,1);this.addMenuItems(q,J,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(q,u){var J=d.getRecent();if(null!=J){for(var G=0;G<J.length;G++)(function(H){var g=H.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");q.addItem(H.title+" ("+mxResources.get(g)+")",null,function(){d.loadFile(H.id)},u)})(J[G]);q.addSeparator(u)}q.addItem(mxResources.get("reset"),
+null,function(){d.resetRecent()},u)}));this.put("openFrom",new Menu(function(q,u){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&
q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},u);"1"!=
urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},u);d.isOffline()||(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var J=new FilenameDialog(d,"",mxResources.get("open"),function(G){null!=G&&0<G.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(G):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://app.diagrams.net/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(G)))},
@@ -13885,7 +13887,7 @@ urlParams.confLib&&q.addItem(mxResources.get("confluenceCloud")+"...",null,funct
u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},u):d.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
"...)",null,function(){},u,null,!1);q.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},u):d.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+
mxResources.get("loading")+"...)",null,function(){},u,null,!1);q.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},u);d.isOffline()||(q.addSeparator(u),q.addItem(mxResources.get("url")+"...",null,function(){var J=new FilenameDialog(d,"",mxResources.get("open"),function(G){if(null!=G&&
-0<G.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var H=G;d.editor.isCorsEnabledForUrl(G)||(H=PROXY_URL+"?url="+encodeURIComponent(G));mxUtils.get(H,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(d,g.getText(),G)),d.showSidebar()}catch(n){d.handleError(n,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},
+0<G.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var H=G;d.editor.isCorsEnabledForUrl(G)||(H=PROXY_URL+"?url="+encodeURIComponent(G));mxUtils.get(H,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(d,g.getText(),G)),d.showSidebar()}catch(p){d.handleError(p,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},
mxResources.get("url"));d.showDialog(J.container,300,80,!0,!0);J.init()},u));"1"==urlParams.confLib&&(q.addSeparator(u),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},u))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"undo redo - cut copy copyAsImage copyAsSvg paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
y=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(q,u){var J=
@@ -13895,8 +13897,8 @@ u);null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(q,
this.addMenuItems(q,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",q,u);q.addSeparator(u);d.isPageMenuVisible()&&d.menus.addMenuItems(q,["pageTabs"],u);this.addMenuItems(q,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),u);"1"!=urlParams.sketch&&this.addMenuItems(q,["-","fullscreen"],u)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
u)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(q,u){var J=d.currentPage;null!=J&&(q.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(J,J.getName())}),u),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(J)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",q,u,mxResources.get("move")),q.addSeparator(u)),q.addSeparator(u),q.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(J,
mxResources.get("copyOf",[J.getName()]))}),u),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||q.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,u){var J=d.currentPage;d.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),
-u,null,d.editor.graph.isEnabled()),q.addSeparator(u));if(null!=d.pages)for(var G=0;G<d.pages.length;G++)mxUtils.bind(this,function(H){var g=null;g=d.pages[H]==J&&!d.editor.graph.isLightboxView()&&d.editor.graph.isEnabled()?d.menus.addSubmenu("currentPage",q,u,d.getShortPageName(J)):q.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u);var n=d.pages[H].getId();g.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=n?" ["+
-n+"]":""));d.pages[H]==J&&q.addCheckmark(g,Editor.checkmarkImage)})(G)})));if(EditorUi.isElectronApp){var S="1"==urlParams.enableSpellCheck;y=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();S=!S;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return S});var R="1"==urlParams.enableStoreBkp;y=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();R=!R});y.setToggleAction(!0);y.setSelectedCallback(function(){return R});
+u,null,d.editor.graph.isEnabled()),q.addSeparator(u));if(null!=d.pages)for(var G=0;G<d.pages.length;G++)mxUtils.bind(this,function(H){var g=null;g=d.pages[H]==J&&!d.editor.graph.isLightboxView()&&d.editor.graph.isEnabled()?d.menus.addSubmenu("currentPage",q,u,d.getShortPageName(J)):q.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u);var p=d.pages[H].getId();g.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=p?" ["+
+p+"]":""));d.pages[H]==J&&q.addCheckmark(g,Editor.checkmarkImage)})(G)})));if(EditorUi.isElectronApp){var S="1"==urlParams.enableSpellCheck;y=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();S=!S;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return S});var R="1"==urlParams.enableStoreBkp;y=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();R=!R});y.setToggleAction(!0);y.setSelectedCallback(function(){return R});
var T="1"==urlParams.isGoogleFontsEnabled;y=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();T=!T;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return T});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var q=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=
1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(q.container,320,80,!0,!0);q.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,u){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==P||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",q,u);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
"1"==urlParams.embedInline||d.menus.addSubmenu("appearance",q,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",q,u);q.addSeparator(u);d.menus.addSubmenu("units",q,u);d.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var J=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],u),d.menus.addMenuItems(q,["ruler","-"],
@@ -13921,188 +13923,188 @@ this.addMenuItem(q,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||Edit
J.fileHandle||(q.addSeparator(u),G=this.addMenuItem(q,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==J||this.addMenuItems(q,["share","-"],u),null!=J&&J.isRenamable()&&this.addMenuItems(q,["rename"],u),d.isOfflineApp()?this.addMenuItems(q,["upload"],
u):(this.addMenuItems(q,["makeCopy"],u),null!=J&&(J.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],u),null!=J.getFolderUrl()&&d.menus.addMenuItems(q,["openFolder"],u)))),q.addSeparator(u),this.addSubmenu("importFrom",q,u),this.addSubmenu("exportAs",q,u),d.isOffline()||(q.addSeparator(u),this.addSubmenu("embed",q,u),this.addSubmenu("publish",q,u)),q.addSeparator(u),this.addSubmenu("newLibrary",q,u),this.addSubmenu("openLibraryFrom",q,u),d.isRevisionHistorySupported()&&this.addMenuItems(q,
["-","revisionHistory"],u),null!=J&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(G=null!=J.getTitle()?J.getTitle():d.defaultFilename,(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(q,["-","properties"])),this.addMenuItems(q,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],u),this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,u){function J(O){var Q=encodeURIComponent(O.name)+
-(null==O.url?"":"@"+encodeURIComponent(O.url));if(!H[Q]){for(var U=O.name,V=0;null!=I[U.toLowerCase()];)U=O.name+" ("+ ++V+")";null==C[Q]&&(N.push({name:O.name,url:O.url,label:U,title:O.url}),I[U.toLowerCase()]=O,C[Q]=O)}}for(var G=mxUtils.bind(this,function(O,Q,U,V,X){var W=d.editor.graph,Y=this.styleChange(q,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=Q?encodeURIComponent(Q):null,null],null,u,function(){W.setFont(O,Q);d.fireEvent(new mxEventObject("styleChanged","keys",
+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!H[Q]){for(var U=O.name,V=0;null!=I[U.toLowerCase()];)U=O.name+" ("+ ++V+")";null==C[Q]&&(M.push({name:O.name,url:O.url,label:U,title:O.url}),I[U.toLowerCase()]=O,C[Q]=O)}}for(var G=mxUtils.bind(this,function(O,Q,U,V,X){var W=d.editor.graph,Y=this.styleChange(q,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=Q?encodeURIComponent(Q):null,null],null,u,function(){W.setFont(O,Q);d.fireEvent(new mxEventObject("styleChanged","keys",
[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=Q?encodeURIComponent(Q):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});U&&(U=document.createElement("img"),U.className="geAdaptiveAsset",U.setAttribute("src",Editor.crossImage),U.setAttribute("title",mxResources.get("delete")),U.setAttribute("valign","absmiddle"),
U.setAttribute("border","0"),U.style.position="relative",U.style.top="2px",U.style.width="14px",U.style.cursor="default",U.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,Q);this.editorUi.hideCurrentMenu();mxEvent.consume(Z)})));Graph.addFont(O,Q);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=Q&&(X+=" ("+Q+")");Y.setAttribute("title",X)}),
-H={},g=0;g<this.defaultFonts.length;g++){var n=this.defaultFonts[g];"string"===typeof n?G(n):null!=n.fontFamily&&null!=n.fontUrl&&(H[encodeURIComponent(n.fontFamily)+"@"+encodeURIComponent(n.fontUrl)]=!0,G(n.fontFamily,n.fontUrl))}q.addSeparator(u);var C={},I={},N=[];for(g=0;g<this.customFonts.length;g++)J(this.customFonts[g]);N.sort(function(O,Q){return O.label<Q.label?-1:O.label>Q.label?1:0});if(0<N.length){for(g=0;g<N.length;g++)G(N[g].name,N[g].url,!0,N[g].label);q.addSeparator(u)}q.addItem(mxResources.get("reset"),
+H={},g=0;g<this.defaultFonts.length;g++){var p=this.defaultFonts[g];"string"===typeof p?G(p):null!=p.fontFamily&&null!=p.fontUrl&&(H[encodeURIComponent(p.fontFamily)+"@"+encodeURIComponent(p.fontUrl)]=!0,G(p.fontFamily,p.fontUrl))}q.addSeparator(u);var C={},I={},M=[];for(g=0;g<this.customFonts.length;g++)J(this.customFonts[g]);M.sort(function(O,Q){return O.label<Q.label?-1:O.label>Q.label?1:0});if(0<M.length){for(g=0;g<M.length;g++)G(M[g].name,M[g].url,!0,M[g].label);q.addSeparator(u)}q.addItem(mxResources.get("reset"),
null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);q.addSeparator(u);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,Q=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",V=null;if(O.isEditing()){var X=O.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){Q=mxUtils.getCssFontFamily(W.fontFamily);W=O.getView().getState(O.cellEditor.getEditingCell());
V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=O.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==Q){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,U="g"):U="w")}}}else W=O.getView().getState(O.getSelectionCell()),null!=W&&(Q=W.style[mxConstants.STYLE_FONTFAMILY]||Q,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),
-Graph.isGoogleFontUrl(X)?U="g":(U="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,V,U,mxUtils.bind(this,function(Z,ba,ia){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,ba),O.isEditing())O.setFont(Z,ba);else{O.getModel().beginUpdate();try{O.stopEditing(!1),
-O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),u,null,!0)})))}})();function DiagramPage(b,l){this.node=b;null!=l?this.node.setAttribute("id",l):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,l,p){this.ui=b;this.page=l;this.previous=this.name=p}
-RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,l,p){this.ui=b;this.oldIndex=l;this.newIndex=p}
-MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,l,p){this.ui=b;this.previousPage=this.page=l;null!=l&&(this.ui.updatePageRoot(l),null!=p&&(l.viewState=p))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var l=this.ui.editor,p=l.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(l.getGraphXml(!0)));b.viewState=p.getViewState();b.root=p.model.root;null!=b.model&&b.model.rootChanged(b.root);p.view.clear(b.root,!0);p.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
-p.model.prefix=Editor.guid()+"-";p.model.rootChanged(b.root);p.setViewState(b.viewState);p.gridEnabled=p.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);l.graph.fireEvent(new mxEventObject(mxEvent.ROOT));l.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,l,p,d,x){SelectPage.call(this,b,p);this.relatedPage=l;this.index=d;this.previousIndex=null;this.noSelect=x}mxUtils.extend(ChangePage,SelectPage);
-ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,l){this.ui=b;this.data=l}
-ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,l=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var p=new mxCodec(this.data.ownerDocument),d=new mxGraphModel;p.decode(this.data,d);this.data=l;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=d.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
-!0);b.model.rootChanged(d.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,l){Editor.isSettingsEnabled()&&l&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var l=null;if(null!=this.pages&&null!=b)for(var p=0;p<this.pages.length;p++)if(this.pages[p]==b){l=p;break}return l};EditorUi.prototype.getPageById=function(b,l){l=null!=l?l:this.pages;if(null!=l)for(var p=0;p<l.length;p++)if(l[p].getId()==b)return l[p];return null};
-EditorUi.prototype.createImageForPageLink=function(b,l,p,d){var x=b.indexOf(","),z=null;0<x&&(x=this.getPageById(b.substring(x+1)),null!=x&&x!=l&&(z=this.getImageForPage(x,l,p,d),z.originalSrc=b));null==z&&(z={originalSrc:b});return z};
-EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,l=this.currentPage;null!=l&&(b.tooltipHandler.hide(),null==l.viewState||null==l.viewState.scrollTop||null==l.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(l.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
-EditorUi.prototype.getImageForPage=function(b,l,p,d){p=null!=p?p:this.editor.graph;var x=p.getGlobalVariable;p=this.createTemporaryGraph(p.getStylesheet());var z=this.getPageIndex(null!=l?l:this.currentPage);p.getGlobalVariable=function(F){return"pagenumber"==F?z+1:"page"==F&&null!=l?l.getName():x.apply(this,arguments)};document.body.appendChild(p.container);this.updatePageRoot(b);p.setAdaptiveColors(b.viewState.adaptiveColors);p.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
-"";d=p.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var y=p.getGraphBounds();document.body.removeChild(p.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),y.width,y.height,y.x,y.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,l=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){l.apply(b.view,
-arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(y,F){y=F.getProperty("edit").changes;for(F=0;F<y.length;F++)if(y[F]instanceof RenamePage||y[F]instanceof ChangePage||y[F]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==y.length&&y[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var p=b.sizeDidChange,d=null,x=this;b.sizeDidChange=
-function(){var y=p.apply(this,arguments);null!=x.currentPage&&d!=x.currentPage&&(d=x.currentPage,x.pageSelected());return y};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var z=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",z);this.editor.addListener("pagesPatched",z);this.editor.addListener("pageRenamed",z);this.editor.addListener("pageMoved",z);this.editor.addListener("fileLoaded",z);
+Graph.isGoogleFontUrl(X)?U="g":(U="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,V,U,mxUtils.bind(this,function(Z,aa,ha){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),O.isEditing())O.setFont(Z,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1),
+O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),u,null,!0)})))}})();function DiagramPage(b,k){this.node=b;null!=k?this.node.setAttribute("id",k):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,k,n){this.ui=b;this.page=k;this.previous=this.name=n}
+RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,k,n){this.ui=b;this.oldIndex=k;this.newIndex=n}
+MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,k,n){this.ui=b;this.previousPage=this.page=k;null!=k&&(this.ui.updatePageRoot(k),null!=n&&(k.viewState=n))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var k=this.ui.editor,n=k.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(k.getGraphXml(!0)));b.viewState=n.getViewState();b.root=n.model.root;null!=b.model&&b.model.rootChanged(b.root);n.view.clear(b.root,!0);n.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
+n.model.prefix=Editor.guid()+"-";n.model.rootChanged(b.root);n.setViewState(b.viewState);n.gridEnabled=n.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);k.graph.fireEvent(new mxEventObject(mxEvent.ROOT));k.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,k,n,d,x){SelectPage.call(this,b,n);this.relatedPage=k;this.index=d;this.previousIndex=null;this.noSelect=x}mxUtils.extend(ChangePage,SelectPage);
+ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,k){this.ui=b;this.data=k}
+ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,k=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var n=new mxCodec(this.data.ownerDocument),d=new mxGraphModel;n.decode(this.data,d);this.data=k;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=d.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
+!0);b.model.rootChanged(d.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,k){Editor.isSettingsEnabled()&&k&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
+EditorUi.prototype.getPageIndex=function(b){var k=null;if(null!=this.pages&&null!=b)for(var n=0;n<this.pages.length;n++)if(this.pages[n]==b){k=n;break}return k};EditorUi.prototype.getPageById=function(b,k){k=null!=k?k:this.pages;if(null!=k)for(var n=0;n<k.length;n++)if(k[n].getId()==b)return k[n];return null};
+EditorUi.prototype.createImageForPageLink=function(b,k,n,d){var x=b.indexOf(","),z=null;0<x&&(x=this.getPageById(b.substring(x+1)),null!=x&&x!=k&&(z=this.getImageForPage(x,k,n,d),z.originalSrc=b));null==z&&(z={originalSrc:b});return z};
+EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,k=this.currentPage;null!=k&&(b.tooltipHandler.hide(),null==k.viewState||null==k.viewState.scrollTop||null==k.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(k.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
+EditorUi.prototype.getImageForPage=function(b,k,n,d){n=null!=n?n:this.editor.graph;var x=n.getGlobalVariable;n=this.createTemporaryGraph(n.getStylesheet());var z=this.getPageIndex(null!=k?k:this.currentPage);n.getGlobalVariable=function(F){return"pagenumber"==F?z+1:"page"==F&&null!=k?k.getName():x.apply(this,arguments)};document.body.appendChild(n.container);this.updatePageRoot(b);n.setAdaptiveColors(b.viewState.adaptiveColors);n.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
+"";d=n.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var y=n.getGraphBounds();document.body.removeChild(n.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),y.width,y.height,y.x,y.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,k=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){k.apply(b.view,
+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(y,F){y=F.getProperty("edit").changes;for(F=0;F<y.length;F++)if(y[F]instanceof RenamePage||y[F]instanceof ChangePage||y[F]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==y.length&&y[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var n=b.sizeDidChange,d=null,x=this;b.sizeDidChange=
+function(){var y=n.apply(this,arguments);null!=x.currentPage&&d!=x.currentPage&&(d=x.currentPage,x.pageSelected());return y};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var z=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",z);this.editor.addListener("pagesPatched",z);this.editor.addListener("pageRenamed",z);this.editor.addListener("pageMoved",z);this.editor.addListener("fileLoaded",z);
this.editor.addListener("pageSelected",mxUtils.bind(this,function(y,F){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(y,F){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
-EditorUi.prototype.scrollToPage=function(b,l){var p=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),d=null!=b?b:this.currentPage;null!=p&&null!=this.tabScroller&&this.tabScroller.children.length>p&&null!=this.tabScroller.children[p]&&(d!=this.lastScrollPage||l)&&(this.tabScroller.children[p].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[p].className="geTab gePageTab geActivePage",this.lastScrollPage=d)};
-EditorUi.prototype.restoreViewState=function(b,l,p){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,l):(d.setViewState(l),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+l.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+l.scrollTop,d.restoreSelection(p))};
-Graph.prototype.createViewState=function(b){var l=b.getAttribute("page"),p=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),x=parseFloat(b.getAttribute("pageHeight")),z=b.getAttribute("background"),y=this.parseBackgroundImage(b.getAttribute("backgroundImage")),F=b.getAttribute("extFonts");if(F)try{F=F.split("|").map(function(M){M=M.split("^");return{name:M[0],url:M[1]}})}catch(M){console.log("ExtFonts format error: "+M.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=l?"0"!=l:this.defaultPageVisible,background:null!=z&&0<z.length?z:null,backgroundImage:y,pageScale:isNaN(p)?mxGraph.prototype.pageScale:p,pageFormat:isNaN(d)||isNaN(x)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+EditorUi.prototype.scrollToPage=function(b,k){var n=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),d=null!=b?b:this.currentPage;null!=n&&null!=this.tabScroller&&this.tabScroller.children.length>n&&null!=this.tabScroller.children[n]&&(d!=this.lastScrollPage||k)&&(this.tabScroller.children[n].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[n].className="geTab gePageTab geActivePage",this.lastScrollPage=d)};
+EditorUi.prototype.restoreViewState=function(b,k,n){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,k):(d.setViewState(k),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+k.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+k.scrollTop,d.restoreSelection(n))};
+Graph.prototype.createViewState=function(b){var k=b.getAttribute("page"),n=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),x=parseFloat(b.getAttribute("pageHeight")),z=b.getAttribute("background"),y=this.parseBackgroundImage(b.getAttribute("backgroundImage")),F=b.getAttribute("extFonts");if(F)try{F=F.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}})}catch(N){console.log("ExtFonts format error: "+N.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=k?"0"!=k:this.defaultPageVisible,background:null!=z&&0<z.length?z:null,backgroundImage:y,pageScale:isNaN(n)?mxGraph.prototype.pageScale:n,pageFormat:isNaN(d)||isNaN(x)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,d,x),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:F||[]}};
-Graph.prototype.saveViewState=function(b,l,p,d,x){p||(l.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),l.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),l.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),l.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),l.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),l.setAttribute("connect",null==b||b.connect?"1":"0"),l.setAttribute("arrows",null==b||b.arrows?"1":"0"),
-l.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));l.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);p=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=p&&(l.setAttribute("pageWidth",p.width),l.setAttribute("pageHeight",p.height));null!=b&&(null!=b.background&&l.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,
-d,x),null!=d&&l.setAttribute("backgroundImage",JSON.stringify(d)));l.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");l.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?l.removeAttribute("adaptiveColors"):l.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&l.setAttribute("extFonts",b.extFonts.map(function(z){return z.name+"^"+z.url}).join("|"))};
+Graph.prototype.saveViewState=function(b,k,n,d,x){n||(k.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),k.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),k.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),k.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),k.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),k.setAttribute("connect",null==b||b.connect?"1":"0"),k.setAttribute("arrows",null==b||b.arrows?"1":"0"),
+k.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));k.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);n=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=n&&(k.setAttribute("pageWidth",n.width),k.setAttribute("pageHeight",n.height));null!=b&&(null!=b.background&&k.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,
+d,x),null!=d&&k.setAttribute("backgroundImage",JSON.stringify(d)));k.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");k.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?k.removeAttribute("adaptiveColors"):k.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&k.setAttribute("extFonts",b.extFonts.map(function(z){return z.name+"^"+z.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,l){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
-this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var p=this.extFonts;this.extFonts=b.extFonts||[];if(l&&null!=p)for(l=0;l<p.length;l++){var d=document.getElementById("extFont_"+p[l].name);null!=d&&d.parentNode.removeChild(d)}for(l=0;l<this.extFonts.length;l++)this.addExtFont(this.extFonts[l].name,
-this.extFonts[l].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
+Graph.prototype.setViewState=function(b,k){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
+this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var n=this.extFonts;this.extFonts=b.extFonts||[];if(k&&null!=n)for(k=0;k<n.length;k++){var d=document.getElementById("extFont_"+n[k].name);null!=d&&d.parentNode.removeChild(d)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,
+this.extFonts[k].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=
-null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,l,p){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=l*this.view.scale+b.scrollLeft,this.container.scrollTop=p*this.view.scale+b.scrollTop)};
-Graph.prototype.addExtFont=function(b,l,p){if(b&&l){var d="extFont_"+b;if(null==document.getElementById(d))if(0==l.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",l,null,d);else{document.getElementsByTagName("head");var x=document.createElement("style");x.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+l+'");\n}'));x.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(x)}if(!p){null==this.extFonts&&(this.extFonts=[]);p=this.extFonts;
-d=!0;for(x=0;x<p.length;x++)if(p[x].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:l})}}};
-EditorUi.prototype.updatePageRoot=function(b,l){if(null==b.root){l=this.editor.extractGraphModel(b.node,null,l);var p=Editor.extractParserError(l);if(p)throw Error(p);null!=l?(b.graphModelNode=l,b.viewState=this.editor.graph.createViewState(l),p=new mxCodec(l.ownerDocument),b.root=p.decode(l).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){l=this.editor.extractGraphModel(b.node);
-if(p=Editor.extractParserError(l))throw Error(p);null!=l&&(b.graphModelNode=l)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)l=new mxCell,l.setId("1"),b.root.insert(l),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
-EditorUi.prototype.updateDiagramData=function(b,l){if(null==this.getPageIndex(b.page))this.insertPage(null,null,l);else{var p=new mxCodec(b.node.ownerDocument),d=new mxGraphModel;p.decode(b.node,d);p=new mxCodec(l.ownerDocument);var x=new mxGraphModel;p.decode(l,x);this.selectPage(b.page);l=this.diffCells(d.root,x.root);this.patchPage(b.page,l,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
-EditorUi.prototype.selectPage=function(b,l,p){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);l=null!=l?l:!1;d.isMouseDown=!1;d.reset();var x=d.model.createUndoableEdit();x.ignoreEdit=!0;var z=new SelectPage(this,b,p);z.execute();x.add(z);x.notify();l||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",x))}}catch(y){this.handleError(y)}};
-EditorUi.prototype.selectNextPage=function(b){var l=this.currentPage;null!=l&&null!=this.pages&&(l=mxUtils.indexOf(this.pages,l),b?this.selectPage(this.pages[mxUtils.mod(l+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(l-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,l,p){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),p),l=null!=l?l:this.pages.length,l=new ChangePage(this,b,b,l),this.editor.graph.model.execute(l));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,l,p){l=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),l);l.setName(null!=b?b:this.createPageName());this.initDiagramNode(l,p);return l};EditorUi.prototype.createPageName=function(){for(var b={},l=0;l<this.pages.length;l++){var p=this.pages[l].getName();null!=p&&0<p.length&&(b[p]=p)}l=this.pages.length;do p=mxResources.get("pageWithNumber",[++l]);while(null!=b[p]);return p};
-EditorUi.prototype.removePage=function(b){try{var l=this.editor.graph,p=mxUtils.indexOf(this.pages,b);if(l.isEnabled()&&0<=p){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);l.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(p==this.pages.length-1?p--:p++,d=this.pages[p]):1>=this.pages.length&&(d=this.insertPage(),l.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));l.model.execute(new ChangePage(this,b,d))}finally{l.model.endUpdate()}}}catch(x){this.handleError(x)}return b};
-EditorUi.prototype.duplicatePage=function(b,l){var p=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var x=b.node.cloneNode(!1);x.removeAttribute("id");var z={},y=d.createCellLookup([d.model.root]);p=new DiagramPage(x);p.root=d.cloneCell(d.model.root,null,z);var F=new mxGraphModel;F.prefix=Editor.guid()+"-";F.setRoot(p.root);d.updateCustomLinks(d.createCellMapping(z,y),[p.root]);p.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(p);
-p.viewState.scale=1;delete p.viewState.scrollLeft;delete p.viewState.scrollTop;delete p.viewState.currentRoot;delete p.viewState.defaultParent;p.setName(l);p=this.insertPage(p,mxUtils.indexOf(this.pages,b)+1)}}catch(M){this.handleError(M)}return p};EditorUi.prototype.initDiagramNode=function(b,l){null==l&&(l=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,l);EditorUi.removeChildNodes(b.node);b.node.appendChild(l)};
-EditorUi.prototype.clonePages=function(b){for(var l=[],p=[],d=0;d<b.length;d++)try{p.push(this.clonePage(b[d]))}catch(x){l.push(mxResources.get("pageWithNumber",[d+1])+": "+x.toString())}if(0<l.length){b=Error(l.join("\n"));try{0<p.length&&(b.fallbackFileData=this.getXmlForPages(p))}catch(x){}throw b;}return p};
-EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var l=new DiagramPage(b.node.cloneNode(!0)),p=b==this.currentPage?this.editor.graph.getViewState():b.viewState;l.viewState=mxUtils.clone(p,EditorUi.transientViewStateProperties);l.root=this.editor.graph.model.cloneCell(b.root,null,!0);l.diagramModified=b.diagramModified;return l};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var l=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(p){null!=p&&0<p.length&&this.editor.graph.model.execute(new RenamePage(this,b,p))}),mxResources.get("rename"));this.showDialog(l.container,300,80,!0,!0);l.init()}return b};EditorUi.prototype.movePage=function(b,l){this.editor.graph.model.execute(new MovePage(this,b,l))};
+null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,k,n){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=k*this.view.scale+b.scrollLeft,this.container.scrollTop=n*this.view.scale+b.scrollTop)};
+Graph.prototype.addExtFont=function(b,k,n){if(b&&k){var d="extFont_"+b;if(null==document.getElementById(d))if(0==k.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",k,null,d);else{document.getElementsByTagName("head");var x=document.createElement("style");x.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+k+'");\n}'));x.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(x)}if(!n){null==this.extFonts&&(this.extFonts=[]);n=this.extFonts;
+d=!0;for(x=0;x<n.length;x++)if(n[x].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:k})}}};
+EditorUi.prototype.updatePageRoot=function(b,k){if(null==b.root){k=this.editor.extractGraphModel(b.node,null,k);var n=Editor.extractParserError(k);if(n)throw Error(n);null!=k?(b.graphModelNode=k,b.viewState=this.editor.graph.createViewState(k),n=new mxCodec(k.ownerDocument),b.root=n.decode(k).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){k=this.editor.extractGraphModel(b.node);
+if(n=Editor.extractParserError(k))throw Error(n);null!=k&&(b.graphModelNode=k)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)k=new mxCell,k.setId("1"),b.root.insert(k),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
+EditorUi.prototype.updateDiagramData=function(b,k){if(null==this.getPageIndex(b.page))this.insertPage(null,null,k);else{var n=new mxCodec(b.node.ownerDocument),d=new mxGraphModel;n.decode(b.node,d);n=new mxCodec(k.ownerDocument);var x=new mxGraphModel;n.decode(k,x);this.selectPage(b.page);k=this.diffCells(d.root,x.root);this.patchPage(b.page,k,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
+EditorUi.prototype.selectPage=function(b,k,n){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);k=null!=k?k:!1;d.isMouseDown=!1;d.reset();var x=d.model.createUndoableEdit();x.ignoreEdit=!0;var z=new SelectPage(this,b,n);z.execute();x.add(z);x.notify();k||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",x))}}catch(y){this.handleError(y)}};
+EditorUi.prototype.selectNextPage=function(b){var k=this.currentPage;null!=k&&null!=this.pages&&(k=mxUtils.indexOf(this.pages,k),b?this.selectPage(this.pages[mxUtils.mod(k+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(k-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,k,n){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),n),k=null!=k?k:this.pages.length,k=new ChangePage(this,b,b,k),this.editor.graph.model.execute(k));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,k,n){k=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),k);k.setName(null!=b?b:this.createPageName());this.initDiagramNode(k,n);return k};EditorUi.prototype.createPageName=function(){for(var b={},k=0;k<this.pages.length;k++){var n=this.pages[k].getName();null!=n&&0<n.length&&(b[n]=n)}k=this.pages.length;do n=mxResources.get("pageWithNumber",[++k]);while(null!=b[n]);return n};
+EditorUi.prototype.removePage=function(b){try{var k=this.editor.graph,n=mxUtils.indexOf(this.pages,b);if(k.isEnabled()&&0<=n){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);k.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(n==this.pages.length-1?n--:n++,d=this.pages[n]):1>=this.pages.length&&(d=this.insertPage(),k.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));k.model.execute(new ChangePage(this,b,d))}finally{k.model.endUpdate()}}}catch(x){this.handleError(x)}return b};
+EditorUi.prototype.duplicatePage=function(b,k){var n=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var x=b.node.cloneNode(!1);x.removeAttribute("id");var z={},y=d.createCellLookup([d.model.root]);n=new DiagramPage(x);n.root=d.cloneCell(d.model.root,null,z);var F=new mxGraphModel;F.prefix=Editor.guid()+"-";F.setRoot(n.root);d.updateCustomLinks(d.createCellMapping(z,y),[n.root]);n.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(n);
+n.viewState.scale=1;delete n.viewState.scrollLeft;delete n.viewState.scrollTop;delete n.viewState.currentRoot;delete n.viewState.defaultParent;n.setName(k);n=this.insertPage(n,mxUtils.indexOf(this.pages,b)+1)}}catch(N){this.handleError(N)}return n};EditorUi.prototype.initDiagramNode=function(b,k){null==k&&(k=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,k);EditorUi.removeChildNodes(b.node);b.node.appendChild(k)};
+EditorUi.prototype.clonePages=function(b){for(var k=[],n=[],d=0;d<b.length;d++)try{n.push(this.clonePage(b[d]))}catch(x){k.push(mxResources.get("pageWithNumber",[d+1])+": "+x.toString())}if(0<k.length){b=Error(k.join("\n"));try{0<n.length&&(b.fallbackFileData=this.getXmlForPages(n))}catch(x){}throw b;}return n};
+EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var k=new DiagramPage(b.node.cloneNode(!0)),n=b==this.currentPage?this.editor.graph.getViewState():b.viewState;k.viewState=mxUtils.clone(n,EditorUi.transientViewStateProperties);k.root=this.editor.graph.model.cloneCell(b.root,null,!0);k.diagramModified=b.diagramModified;return k};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var k=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(n){null!=n&&0<n.length&&this.editor.graph.model.execute(new RenamePage(this,b,n))}),mxResources.get("rename"));this.showDialog(k.container,300,80,!0,!0);k.init()}return b};EditorUi.prototype.movePage=function(b,k){this.editor.graph.model.execute(new MovePage(this,b,k))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,l=document.createElement("div");l.className="geTabScroller";for(var p=null,d=0;d<this.pages.length;d++)mxUtils.bind(this,function(x,z){z.className="geTab gePageTab";this.pages[x]==this.currentPage&&z.classList.add("geActivePage");z.setAttribute("draggable",
-"true");mxEvent.addListener(z,"dragstart",mxUtils.bind(this,function(y){b.isEnabled()?(mxClient.IS_FF&&y.dataTransfer.setData("Text","<diagram/>"),p=x):mxEvent.consume(y)}));mxEvent.addListener(z,"dragend",mxUtils.bind(this,function(y){p=null;y.stopPropagation();y.preventDefault()}));mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(y){null!=p&&(y.dataTransfer.dropEffect="move");y.stopPropagation();y.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(y){null!=p&&
-x!=p&&this.movePage(p,x);y.stopPropagation();y.preventDefault()}));l.appendChild(z)})(d,this.createTabForPage(this.pages[d],d+1));d=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(l);this.leftScrollTab=this.createLeftScrollTab();
-this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=l;this.tabScroller.scrollLeft=d;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(x){this.checkTabScrollerOverflow()}))}};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,k=document.createElement("div");k.className="geTabScroller";for(var n=null,d=0;d<this.pages.length;d++)mxUtils.bind(this,function(x,z){z.className="geTab gePageTab";this.pages[x]==this.currentPage&&z.classList.add("geActivePage");z.setAttribute("draggable",
+"true");mxEvent.addListener(z,"dragstart",mxUtils.bind(this,function(y){b.isEnabled()?(mxClient.IS_FF&&y.dataTransfer.setData("Text","<diagram/>"),n=x):mxEvent.consume(y)}));mxEvent.addListener(z,"dragend",mxUtils.bind(this,function(y){n=null;y.stopPropagation();y.preventDefault()}));mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(y){null!=n&&(y.dataTransfer.dropEffect="move");y.stopPropagation();y.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(y){null!=n&&
+x!=n&&this.movePage(n,x);y.stopPropagation();y.preventDefault()}));k.appendChild(z)})(d,this.createTabForPage(this.pages[d],d+1));d=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(k);this.leftScrollTab=this.createLeftScrollTab();
+this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=k;this.tabScroller.scrollLeft=d;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(x){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):
this.rightScrollTab.classList.remove("mxDisabled")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};
-EditorUi.prototype.getShortPageName=function(b){var l=null;null!=b&&(l=b.getName(),null!=l&&36<l.length&&(l=l.substring(0,34)+"..."));return l};EditorUi.prototype.createControlTab=function(b,l,p){var d=this.createTab();d.className="geTab geControlTab";null!=b&&d.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+l+")";d.appendChild(b);mxEvent.addListener(d,"click",p);return d};
-EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(l){this.handleError(l)}mxEvent.consume(b)}))};
-EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var l=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-l,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=l;mxEvent.consume(b)}))};
-EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var l=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:l,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=l;mxEvent.consume(b)}))};
-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var l=new mxPopupMenu(mxUtils.bind(this,function(x,z){this.menus.get("pages").funct(x,z)}));l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var p=mxEvent.getClientX(b),d=mxEvent.getClientY(b);l.popup(p,
-d,null,b);this.setCurrentMenu(l);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,l){var p=this.createTab(),d=b.getName()||mxResources.get("untitled"),x=b.getId();p.setAttribute("title",d+(null!=x?" ("+x+")":"")+" ["+l+"]");l=document.createElement("span");l.style.maxWidth="160px";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,d);p.appendChild(l);this.addTabListeners(b,p);return p};
-EditorUi.prototype.addTabListeners=function(b,l){mxEvent.disableContextMenu(l);var p=this.editor.graph;mxEvent.addListener(l,"dblclick",mxUtils.bind(this,function(M){this.renamePage(b);mxEvent.consume(M)}));var d=document.createElement("div");d.style.backgroundImage="url("+Editor.thinExpandImage+")";d.className="geButton";l.appendChild(d);var x=!1,z=!1,y=mxUtils.bind(this,function(M){x=null!=this.currentMenu;z=b==this.currentPage;this.scrollToPage(b);p.isMouseDown||z||this.selectPage(b)}),F=mxUtils.bind(this,
-function(M){if(!p.isMouseDown&&(z&&(mxEvent.isTouchEvent(M)||mxEvent.getSource(M)==d)||mxEvent.isPopupTrigger(M))&&(p.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(M)||!x)){var K=new mxPopupMenu(this.createPageMenu(b));K.smartSeparators=!0;K.showDisabled=!0;K.autoExpand=!0;K.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(M),c=mxEvent.getClientY(M);K.popup(L,c,null,M);
-this.setCurrentMenu(K,l)}mxEvent.consume(M)});mxEvent.addGestureListeners(d,y,null,F);mxEvent.addGestureListeners(l,y,null,F)};
-EditorUi.prototype.createPageMenu=function(b,l){return mxUtils.bind(this,function(p,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||p.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));this.editor.graph.isEnabled()&&(p.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),d),p.addSeparator(d),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",p,d,mxResources.get("move")),p.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d),p.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,l)}),d))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,x,z,y,F){x=null!=x?x:!1;null==z&&(z=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var M=z.slice(),K=0;K<z.length;K++)"1"==mxUtils.getValue(this.getCurrentCellStyle(z[K]),"treeFolding","0")&&this.foldTreeCell(d,z[K]);z=M;z=b.apply(this,arguments)}finally{this.model.endUpdate()}return z};Graph.prototype.foldTreeCell=function(d,x){this.model.beginUpdate();try{var z=
-[];this.traverse(x,!0,mxUtils.bind(this,function(F,M){var K=null!=M&&this.isTreeEdge(M);K&&z.push(M);F==x||null!=M&&!K||z.push(F);return(null==M||K)&&(F==x||!this.model.isCollapsed(F))}));this.model.setCollapsed(x,d);for(var y=0;y<z.length;y++)this.model.setVisible(z[y],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,x,z,y,F,M){return this.model.filterCells(this.getEdges(d,x,z,y,F,M),mxUtils.bind(this,
-function(K){return this.isTreeEdge(K)}))};Graph.prototype.getIncomingTreeEdges=function(d,x){return this.getTreeEdges(d,x,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,x){return this.getTreeEdges(d,x,!1,!0,!1)};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){l.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(H){return t.isVertex(H)&&z(H)}function x(H){var g=!1;null!=H&&(g="1"==
+EditorUi.prototype.getShortPageName=function(b){var k=null;null!=b&&(k=b.getName(),null!=k&&36<k.length&&(k=k.substring(0,34)+"..."));return k};EditorUi.prototype.createControlTab=function(b,k,n){var d=this.createTab();d.className="geTab geControlTab";null!=b&&d.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+k+")";d.appendChild(b);mxEvent.addListener(d,"click",n);return d};
+EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(k){this.handleError(k)}mxEvent.consume(b)}))};
+EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var k=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-k,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=k;mxEvent.consume(b)}))};
+EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var k=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:k,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=k;mxEvent.consume(b)}))};
+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var k=new mxPopupMenu(mxUtils.bind(this,function(x,z){this.menus.get("pages").funct(x,z)}));k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);k.destroy()});var n=mxEvent.getClientX(b),d=mxEvent.getClientY(b);k.popup(n,
+d,null,b);this.setCurrentMenu(k);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,k){var n=this.createTab(),d=b.getName()||mxResources.get("untitled"),x=b.getId();n.setAttribute("title",d+(null!=x?" ("+x+")":"")+" ["+k+"]");k=document.createElement("span");k.style.maxWidth="160px";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,d);n.appendChild(k);this.addTabListeners(b,n);return n};
+EditorUi.prototype.addTabListeners=function(b,k){mxEvent.disableContextMenu(k);var n=this.editor.graph;mxEvent.addListener(k,"dblclick",mxUtils.bind(this,function(N){this.renamePage(b);mxEvent.consume(N)}));var d=document.createElement("div");d.style.backgroundImage="url("+Editor.thinExpandImage+")";d.className="geButton";k.appendChild(d);var x=!1,z=!1,y=mxUtils.bind(this,function(N){x=null!=this.currentMenu;z=b==this.currentPage;this.scrollToPage(b);n.isMouseDown||z||this.selectPage(b)}),F=mxUtils.bind(this,
+function(N){if(!n.isMouseDown&&(z&&(mxEvent.isTouchEvent(N)||mxEvent.getSource(N)==d)||mxEvent.isPopupTrigger(N))&&(n.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(N)||!x)){var K=new mxPopupMenu(this.createPageMenu(b));K.smartSeparators=!0;K.showDisabled=!0;K.autoExpand=!0;K.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(N),c=mxEvent.getClientY(N);K.popup(L,c,null,N);
+this.setCurrentMenu(K,k)}mxEvent.consume(N)});mxEvent.addGestureListeners(d,y,null,F);mxEvent.addGestureListeners(k,y,null,F)};
+EditorUi.prototype.createPageMenu=function(b,k){return mxUtils.bind(this,function(n,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||n.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));this.editor.graph.isEnabled()&&(n.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
+[b.getName()]))}),d),n.addSeparator(d),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",n,d,mxResources.get("move")),n.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d),n.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,k)}),d))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,x,z,y,F){x=null!=x?x:!1;null==z&&(z=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var N=z.slice(),K=0;K<z.length;K++)"1"==mxUtils.getValue(this.getCurrentCellStyle(z[K]),"treeFolding","0")&&this.foldTreeCell(d,z[K]);z=N;z=b.apply(this,arguments)}finally{this.model.endUpdate()}return z};Graph.prototype.foldTreeCell=function(d,x){this.model.beginUpdate();try{var z=
+[];this.traverse(x,!0,mxUtils.bind(this,function(F,N){var K=null!=N&&this.isTreeEdge(N);K&&z.push(N);F==x||null!=N&&!K||z.push(F);return(null==N||K)&&(F==x||!this.model.isCollapsed(F))}));this.model.setCollapsed(x,d);for(var y=0;y<z.length;y++)this.model.setVisible(z[y],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,x,z,y,F,N){return this.model.filterCells(this.getEdges(d,x,z,y,F,N),mxUtils.bind(this,
+function(K){return this.isTreeEdge(K)}))};Graph.prototype.getIncomingTreeEdges=function(d,x){return this.getTreeEdges(d,x,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,x){return this.getTreeEdges(d,x,!1,!0,!1)};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(H){return t.isVertex(H)&&z(H)}function x(H){var g=!1;null!=H&&(g="1"==
m.getCurrentCellStyle(H).treeMoving);return g}function z(H){var g=!1;null!=H&&(H=t.getParent(H),g=m.view.getState(H),g="tree"==(null!=g?g.style:m.getCellStyle(H)).containerType);return g}function y(H){var g=!1;null!=H&&(H=t.getParent(H),g=m.view.getState(H),m.view.getState(H),g=null!=(null!=g?g.style:m.getCellStyle(H)).childLayout);return g}function F(H){H=m.view.getState(H);if(null!=H){var g=m.getIncomingTreeEdges(H.cell);if(0<g.length&&(g=m.view.getState(g[0]),null!=g&&(g=g.absolutePoints,null!=
-g&&0<g.length&&(g=g[g.length-1],null!=g)))){if(g.y==H.y&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(g.y==H.y+H.height&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(g.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function M(H,g){g=null!=g?g:!0;m.model.beginUpdate();try{var n=m.model.getParent(H),C=m.getIncomingTreeEdges(H),I=m.cloneCells([C[0],H]);m.model.setTerminal(I[0],m.model.getTerminal(C[0],
-!0),!0);var N=F(H),O=n.geometry;N==mxConstants.DIRECTION_SOUTH||N==mxConstants.DIRECTION_NORTH?I[1].geometry.x+=g?H.geometry.width+10:-I[1].geometry.width-10:I[1].geometry.y+=g?H.geometry.height+10:-I[1].geometry.height-10;m.view.currentRoot!=n&&(I[1].geometry.x-=O.x,I[1].geometry.y-=O.y);var Q=m.view.getState(H),U=m.view.scale;if(null!=Q){var V=mxRectangle.fromRectangle(Q);N==mxConstants.DIRECTION_SOUTH||N==mxConstants.DIRECTION_NORTH?V.x+=(g?H.geometry.width+10:-I[1].geometry.width-10)*U:V.y+=(g?
-H.geometry.height+10:-I[1].geometry.height-10)*U;var X=m.getOutgoingTreeEdges(m.model.getTerminal(C[0],!0));if(null!=X){for(var W=N==mxConstants.DIRECTION_SOUTH||N==mxConstants.DIRECTION_NORTH,Y=O=C=0;Y<X.length;Y++){var Z=m.model.getTerminal(X[Y],!1);if(N==F(Z)){var ba=m.view.getState(Z);Z!=H&&null!=ba&&(W&&g!=ba.getCenterX()<Q.getCenterX()||!W&&g!=ba.getCenterY()<Q.getCenterY())&&mxUtils.intersects(V,ba)&&(C=10+Math.max(C,(Math.min(V.x+V.width,ba.x+ba.width)-Math.max(V.x,ba.x))/U),O=10+Math.max(O,
-(Math.min(V.y+V.height,ba.y+ba.height)-Math.max(V.y,ba.y))/U))}}W?O=0:C=0;for(Y=0;Y<X.length;Y++)if(Z=m.model.getTerminal(X[Y],!1),N==F(Z)&&(ba=m.view.getState(Z),Z!=H&&null!=ba&&(W&&g!=ba.getCenterX()<Q.getCenterX()||!W&&g!=ba.getCenterY()<Q.getCenterY()))){var ia=[];m.traverse(ba.cell,!0,function(ea,da){var ja=null!=da&&m.isTreeEdge(da);ja&&ia.push(da);(null==da||ja)&&ia.push(ea);return null==da||ja});m.moveCells(ia,(g?1:-1)*C,(g?1:-1)*O)}}}return m.addCells(I,n)}finally{m.model.endUpdate()}}function K(H){m.model.beginUpdate();
-try{var g=F(H),n=m.getIncomingTreeEdges(H),C=m.cloneCells([n[0],H]);m.model.setTerminal(n[0],C[1],!1);m.model.setTerminal(C[0],C[1],!0);m.model.setTerminal(C[0],H,!1);var I=m.model.getParent(H),N=I.geometry,O=[];m.view.currentRoot!=I&&(C[1].geometry.x-=N.x,C[1].geometry.y-=N.y);m.traverse(H,!0,function(V,X){var W=null!=X&&m.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var Q=H.geometry.width+40,U=H.geometry.height+40;g==mxConstants.DIRECTION_SOUTH?Q=0:g==mxConstants.DIRECTION_NORTH?
-(Q=0,U=-U):g==mxConstants.DIRECTION_WEST?(Q=-Q,U=0):g==mxConstants.DIRECTION_EAST&&(U=0);m.moveCells(O,Q,U);return m.addCells(C,I)}finally{m.model.endUpdate()}}function L(H,g){m.model.beginUpdate();try{var n=m.model.getParent(H),C=m.getIncomingTreeEdges(H),I=F(H);0==C.length&&(C=[m.createEdge(n,null,"",null,null,m.createCurrentEdgeStyle())],I=g);var N=m.cloneCells([C[0],H]);m.model.setTerminal(N[0],H,!0);null==m.model.getTerminal(N[0],!1)&&(m.model.setTerminal(N[0],N[1],!1),m.applyNewEdgeStyle(N[1],
-[N[0]],I));C=m.getOutgoingTreeEdges(H);var O=n.geometry;g=[];m.view.currentRoot==n&&(O=new mxRectangle);for(var Q=0;Q<C.length;Q++){var U=m.model.getTerminal(C[Q],!1);null!=U&&g.push(U)}var V=m.view.getBounds(g),X=m.view.translate,W=m.view.scale;I==mxConstants.DIRECTION_SOUTH?(N[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-N[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,N[1].geometry.y+=N[1].geometry.height-O.y+40):I==mxConstants.DIRECTION_NORTH?(N[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-
-N[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,N[1].geometry.y-=N[1].geometry.height+O.y+40):(N[1].geometry.x=I==mxConstants.DIRECTION_WEST?N[1].geometry.x-(N[1].geometry.width+O.x+40):N[1].geometry.x+(N[1].geometry.width-O.x+40),N[1].geometry.y=null==V?H.geometry.y+(H.geometry.height-N[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return m.addCells(N,n)}finally{m.model.endUpdate()}}function c(H,g,n){H=m.getOutgoingTreeEdges(H);n=m.view.getState(n);var C=[];if(null!=n&&null!=H){for(var I=
-0;I<H.length;I++){var N=m.view.getState(m.model.getTerminal(H[I],!1));null!=N&&(!g&&Math.min(N.x+N.width,n.x+n.width)>=Math.max(N.x,n.x)||g&&Math.min(N.y+N.height,n.y+n.height)>=Math.max(N.y,n.y))&&C.push(N)}C.sort(function(O,Q){return g?O.x+O.width-Q.x-Q.width:O.y+O.height-Q.y-Q.height})}return C}function f(H,g){var n=F(H),C=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;(n==mxConstants.DIRECTION_EAST||n==mxConstants.DIRECTION_WEST)==C&&n!=g?k.actions.get("selectParent").funct():n==
-g?(g=m.getOutgoingTreeEdges(H),null!=g&&0<g.length&&m.setSelectionCell(m.model.getTerminal(g[0],!1))):(n=m.getIncomingTreeEdges(H),null!=n&&0<n.length&&(C=c(m.model.getTerminal(n[0],!0),C,H),H=m.view.getState(H),null!=H&&(H=mxUtils.indexOf(C,H),0<=H&&(H+=g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=C.length-1&&m.setSelectionCell(C[H].cell)))))}var k=this,m=k.editor.graph,t=m.getModel(),v=k.menus.createPopupMenu;k.menus.createPopupMenu=function(H,g,n){v.apply(this,arguments);
-if(1==m.getSelectionCount()){g=m.getSelectionCell();var C=m.getOutgoingTreeEdges(g);H.addSeparator();0<C.length&&(d(m.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,n),this.addMenuItems(H,["selectDescendants"],null,n));d(m.getSelectionCell())?(H.addSeparator(),0<m.getIncomingTreeEdges(g).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,n)):0<m.model.getEdgeCount(g)&&this.addMenuItems(H,["selectConnections"],null,n)}};k.actions.addAction("selectChildren",function(H){if(m.isEnabled()&&
-1==m.getSelectionCount()){var g=m.getSelectionCell();H=mxEvent.isControlDown(H)?null:m.getOutgoingTreeEdges(g);if(null!=H&&0<H.length){g=[];for(var n=0;n<H.length;n++)g.push(m.model.getTerminal(H[n],!1));m.setSelectionCells(g)}else m.setSelectionCells(m.model.getChildren(g))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");k.actions.addAction("selectDescendants",function(H){var g=m.getSelectionCell();if(m.isEnabled()&&null!=g){var n=[];mxEvent.isControlDown(H)||m.traverse(g,!0,function(C,I){var N=
-null!=I&&m.isTreeEdge(I);N&&mxEvent.isControlDown(H)&&n.push(I);(null==I||N)&&n.push(C);return null==I||N});if(0==n.length||1==n.length&&n[0]==g)n=m.model.getDescendants(g);m.setSelectionCells(n)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");k.actions.addAction("selectParent",function(H){var g=m.getSelectionCell();m.isEnabled()&&null!=g&&(H=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g),null!=H&&0<H.length?m.setSelectionCell(m.model.getTerminal(H[0],!0)):m.selectParentCell())},null,
-null,Editor.altKey+"+"+Editor.shiftKey+"+P");k.actions.addAction("selectSiblings",function(H){if(m.isEnabled()&&1==m.getSelectionCount()){var g=m.getSelectionCell(),n=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g);H=[];if(null!=n&&0<n.length&&(n=m.getOutgoingTreeEdges(m.model.getTerminal(n[0],!0)),null!=n))for(var C=0;C<n.length;C++)H.push(m.model.getTerminal(n[C],!1));0==H.length&&(H=m.model.getChildren(m.model.getParent(g)));m.setSelectionCells(H)}},null,null,Editor.altKey+"+"+Editor.shiftKey+
-"+S");var A=m.removeCells;m.removeCells=function(H,g){g=null!=g?g:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));g&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var n=[],C=0;C<H.length;C++){var I=H[C];t.isEdge(I)&&z(I)&&(n.push(I),I=t.getTerminal(I,!1));if(d(I)){var N=[];m.traverse(I,!0,function(O,Q){var U=null!=Q&&m.isTreeEdge(Q);U&&N.push(Q);(null==Q||U)&&N.push(O);return null==Q||U});0<N.length&&(n=n.concat(N),I=m.getIncomingTreeEdges(H[C]),H=H.concat(I))}else null!=I&&
-n.push(H[C])}H=n;return A.apply(this,arguments)};k.hoverIcons.getStateAt=function(H,g,n){return d(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(g,n))};var E=m.duplicateCells;m.duplicateCells=function(H,g){H=null!=H?H:this.getSelectionCells();for(var n=H.slice(0),C=0;C<n.length;C++){var I=m.view.getState(n[C]);if(null!=I&&d(I.cell)){var N=m.getIncomingTreeEdges(I.cell);for(I=0;I<N.length;I++)mxUtils.remove(N[I],H)}}this.model.beginUpdate();try{var O=E.call(this,H,g);if(O.length==H.length)for(C=
-0;C<H.length;C++)if(d(H[C])){var Q=m.getIncomingTreeEdges(O[C]);N=m.getIncomingTreeEdges(H[C]);if(0==Q.length&&0<N.length){var U=this.cloneCell(N[0]);this.addEdge(U,m.getDefaultParent(),this.model.getTerminal(N[0],!0),O[C])}}}finally{this.model.endUpdate()}return O};var D=m.moveCells;m.moveCells=function(H,g,n,C,I,N,O){for(var Q=null,U=[],V=0;V<H.length;V++)(x(H[V])||d(H[V]))&&!y(H[V])&&this.isCellCollapsed(H[V])?U=U.concat(this.getSubtree(H[V])):U.push(H[V]);H=mxUtils.removeDuplicates(U);this.model.beginUpdate();
-try{U=I;var X=this.getCurrentCellStyle(I);if(null!=H&&d(I)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<H.length;V++)if(d(H[V])||m.model.isEdge(H[V])&&null==m.model.getTerminal(H[V],!0)){I=m.model.getParent(H[V]);break}if(null!=U&&I!=U&&null!=this.view.getState(H[0])){var W=m.getIncomingTreeEdges(H[0]);if(0<W.length){var Y=m.view.getState(m.model.getTerminal(W[0],!0));if(null!=Y){var Z=m.view.getState(U);null!=Z&&(g=(Z.getCenterX()-Y.getCenterX())/m.view.scale,n=(Z.getCenterY()-Y.getCenterY())/
+g&&0<g.length&&(g=g[g.length-1],null!=g)))){if(g.y==H.y&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(g.y==H.y+H.height&&Math.abs(g.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(g.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function N(H,g){g=null!=g?g:!0;m.model.beginUpdate();try{var p=m.model.getParent(H),C=m.getIncomingTreeEdges(H),I=m.cloneCells([C[0],H]);m.model.setTerminal(I[0],m.model.getTerminal(C[0],
+!0),!0);var M=F(H),O=p.geometry;M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?I[1].geometry.x+=g?H.geometry.width+10:-I[1].geometry.width-10:I[1].geometry.y+=g?H.geometry.height+10:-I[1].geometry.height-10;m.view.currentRoot!=p&&(I[1].geometry.x-=O.x,I[1].geometry.y-=O.y);var Q=m.view.getState(H),U=m.view.scale;if(null!=Q){var V=mxRectangle.fromRectangle(Q);M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH?V.x+=(g?H.geometry.width+10:-I[1].geometry.width-10)*U:V.y+=(g?
+H.geometry.height+10:-I[1].geometry.height-10)*U;var X=m.getOutgoingTreeEdges(m.model.getTerminal(C[0],!0));if(null!=X){for(var W=M==mxConstants.DIRECTION_SOUTH||M==mxConstants.DIRECTION_NORTH,Y=O=C=0;Y<X.length;Y++){var Z=m.model.getTerminal(X[Y],!1);if(M==F(Z)){var aa=m.view.getState(Z);Z!=H&&null!=aa&&(W&&g!=aa.getCenterX()<Q.getCenterX()||!W&&g!=aa.getCenterY()<Q.getCenterY())&&mxUtils.intersects(V,aa)&&(C=10+Math.max(C,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/U),O=10+Math.max(O,
+(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/U))}}W?O=0:C=0;for(Y=0;Y<X.length;Y++)if(Z=m.model.getTerminal(X[Y],!1),M==F(Z)&&(aa=m.view.getState(Z),Z!=H&&null!=aa&&(W&&g!=aa.getCenterX()<Q.getCenterX()||!W&&g!=aa.getCenterY()<Q.getCenterY()))){var ha=[];m.traverse(aa.cell,!0,function(ea,da){var ia=null!=da&&m.isTreeEdge(da);ia&&ha.push(da);(null==da||ia)&&ha.push(ea);return null==da||ia});m.moveCells(ha,(g?1:-1)*C,(g?1:-1)*O)}}}return m.addCells(I,p)}finally{m.model.endUpdate()}}function K(H){m.model.beginUpdate();
+try{var g=F(H),p=m.getIncomingTreeEdges(H),C=m.cloneCells([p[0],H]);m.model.setTerminal(p[0],C[1],!1);m.model.setTerminal(C[0],C[1],!0);m.model.setTerminal(C[0],H,!1);var I=m.model.getParent(H),M=I.geometry,O=[];m.view.currentRoot!=I&&(C[1].geometry.x-=M.x,C[1].geometry.y-=M.y);m.traverse(H,!0,function(V,X){var W=null!=X&&m.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var Q=H.geometry.width+40,U=H.geometry.height+40;g==mxConstants.DIRECTION_SOUTH?Q=0:g==mxConstants.DIRECTION_NORTH?
+(Q=0,U=-U):g==mxConstants.DIRECTION_WEST?(Q=-Q,U=0):g==mxConstants.DIRECTION_EAST&&(U=0);m.moveCells(O,Q,U);return m.addCells(C,I)}finally{m.model.endUpdate()}}function L(H,g){m.model.beginUpdate();try{var p=m.model.getParent(H),C=m.getIncomingTreeEdges(H),I=F(H);0==C.length&&(C=[m.createEdge(p,null,"",null,null,m.createCurrentEdgeStyle())],I=g);var M=m.cloneCells([C[0],H]);m.model.setTerminal(M[0],H,!0);null==m.model.getTerminal(M[0],!1)&&(m.model.setTerminal(M[0],M[1],!1),m.applyNewEdgeStyle(M[1],
+[M[0]],I));C=m.getOutgoingTreeEdges(H);var O=p.geometry;g=[];m.view.currentRoot==p&&(O=new mxRectangle);for(var Q=0;Q<C.length;Q++){var U=m.model.getTerminal(C[Q],!1);null!=U&&g.push(U)}var V=m.view.getBounds(g),X=m.view.translate,W=m.view.scale;I==mxConstants.DIRECTION_SOUTH?(M[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-M[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,M[1].geometry.y+=M[1].geometry.height-O.y+40):I==mxConstants.DIRECTION_NORTH?(M[1].geometry.x=null==V?H.geometry.x+(H.geometry.width-
+M[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,M[1].geometry.y-=M[1].geometry.height+O.y+40):(M[1].geometry.x=I==mxConstants.DIRECTION_WEST?M[1].geometry.x-(M[1].geometry.width+O.x+40):M[1].geometry.x+(M[1].geometry.width-O.x+40),M[1].geometry.y=null==V?H.geometry.y+(H.geometry.height-M[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return m.addCells(M,p)}finally{m.model.endUpdate()}}function c(H,g,p){H=m.getOutgoingTreeEdges(H);p=m.view.getState(p);var C=[];if(null!=p&&null!=H){for(var I=
+0;I<H.length;I++){var M=m.view.getState(m.model.getTerminal(H[I],!1));null!=M&&(!g&&Math.min(M.x+M.width,p.x+p.width)>=Math.max(M.x,p.x)||g&&Math.min(M.y+M.height,p.y+p.height)>=Math.max(M.y,p.y))&&C.push(M)}C.sort(function(O,Q){return g?O.x+O.width-Q.x-Q.width:O.y+O.height-Q.y-Q.height})}return C}function f(H,g){var p=F(H),C=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;(p==mxConstants.DIRECTION_EAST||p==mxConstants.DIRECTION_WEST)==C&&p!=g?l.actions.get("selectParent").funct():p==
+g?(g=m.getOutgoingTreeEdges(H),null!=g&&0<g.length&&m.setSelectionCell(m.model.getTerminal(g[0],!1))):(p=m.getIncomingTreeEdges(H),null!=p&&0<p.length&&(C=c(m.model.getTerminal(p[0],!0),C,H),H=m.view.getState(H),null!=H&&(H=mxUtils.indexOf(C,H),0<=H&&(H+=g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=C.length-1&&m.setSelectionCell(C[H].cell)))))}var l=this,m=l.editor.graph,t=m.getModel(),v=l.menus.createPopupMenu;l.menus.createPopupMenu=function(H,g,p){v.apply(this,arguments);
+if(1==m.getSelectionCount()){g=m.getSelectionCell();var C=m.getOutgoingTreeEdges(g);H.addSeparator();0<C.length&&(d(m.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,p),this.addMenuItems(H,["selectDescendants"],null,p));d(m.getSelectionCell())?(H.addSeparator(),0<m.getIncomingTreeEdges(g).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,p)):0<m.model.getEdgeCount(g)&&this.addMenuItems(H,["selectConnections"],null,p)}};l.actions.addAction("selectChildren",function(H){if(m.isEnabled()&&
+1==m.getSelectionCount()){var g=m.getSelectionCell();H=mxEvent.isControlDown(H)?null:m.getOutgoingTreeEdges(g);if(null!=H&&0<H.length){g=[];for(var p=0;p<H.length;p++)g.push(m.model.getTerminal(H[p],!1));m.setSelectionCells(g)}else m.setSelectionCells(m.model.getChildren(g))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(H){var g=m.getSelectionCell();if(m.isEnabled()&&null!=g){var p=[];mxEvent.isControlDown(H)||m.traverse(g,!0,function(C,I){var M=
+null!=I&&m.isTreeEdge(I);M&&mxEvent.isControlDown(H)&&p.push(I);(null==I||M)&&p.push(C);return null==I||M});if(0==p.length||1==p.length&&p[0]==g)p=m.model.getDescendants(g);m.setSelectionCells(p)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(H){var g=m.getSelectionCell();m.isEnabled()&&null!=g&&(H=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g),null!=H&&0<H.length?m.setSelectionCell(m.model.getTerminal(H[0],!0)):m.selectParentCell())},null,
+null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(H){if(m.isEnabled()&&1==m.getSelectionCount()){var g=m.getSelectionCell(),p=mxEvent.isControlDown(H)?null:m.getIncomingTreeEdges(g);H=[];if(null!=p&&0<p.length&&(p=m.getOutgoingTreeEdges(m.model.getTerminal(p[0],!0)),null!=p))for(var C=0;C<p.length;C++)H.push(m.model.getTerminal(p[C],!1));0==H.length&&(H=m.model.getChildren(m.model.getParent(g)));m.setSelectionCells(H)}},null,null,Editor.altKey+"+"+Editor.shiftKey+
+"+S");var B=m.removeCells;m.removeCells=function(H,g){g=null!=g?g:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));g&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var p=[],C=0;C<H.length;C++){var I=H[C];t.isEdge(I)&&z(I)&&(p.push(I),I=t.getTerminal(I,!1));if(d(I)){var M=[];m.traverse(I,!0,function(O,Q){var U=null!=Q&&m.isTreeEdge(Q);U&&M.push(Q);(null==Q||U)&&M.push(O);return null==Q||U});0<M.length&&(p=p.concat(M),I=m.getIncomingTreeEdges(H[C]),H=H.concat(I))}else null!=I&&
+p.push(H[C])}H=p;return B.apply(this,arguments)};l.hoverIcons.getStateAt=function(H,g,p){return d(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(g,p))};var E=m.duplicateCells;m.duplicateCells=function(H,g){H=null!=H?H:this.getSelectionCells();for(var p=H.slice(0),C=0;C<p.length;C++){var I=m.view.getState(p[C]);if(null!=I&&d(I.cell)){var M=m.getIncomingTreeEdges(I.cell);for(I=0;I<M.length;I++)mxUtils.remove(M[I],H)}}this.model.beginUpdate();try{var O=E.call(this,H,g);if(O.length==H.length)for(C=
+0;C<H.length;C++)if(d(H[C])){var Q=m.getIncomingTreeEdges(O[C]);M=m.getIncomingTreeEdges(H[C]);if(0==Q.length&&0<M.length){var U=this.cloneCell(M[0]);this.addEdge(U,m.getDefaultParent(),this.model.getTerminal(M[0],!0),O[C])}}}finally{this.model.endUpdate()}return O};var D=m.moveCells;m.moveCells=function(H,g,p,C,I,M,O){for(var Q=null,U=[],V=0;V<H.length;V++)(x(H[V])||d(H[V]))&&!y(H[V])&&this.isCellCollapsed(H[V])?U=U.concat(this.getSubtree(H[V])):U.push(H[V]);H=mxUtils.removeDuplicates(U);this.model.beginUpdate();
+try{U=I;var X=this.getCurrentCellStyle(I);if(null!=H&&d(I)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<H.length;V++)if(d(H[V])||m.model.isEdge(H[V])&&null==m.model.getTerminal(H[V],!0)){I=m.model.getParent(H[V]);break}if(null!=U&&I!=U&&null!=this.view.getState(H[0])){var W=m.getIncomingTreeEdges(H[0]);if(0<W.length){var Y=m.view.getState(m.model.getTerminal(W[0],!0));if(null!=Y){var Z=m.view.getState(U);null!=Z&&(g=(Z.getCenterX()-Y.getCenterX())/m.view.scale,p=(Z.getCenterY()-Y.getCenterY())/
m.view.scale)}}}}Q=D.apply(this,arguments);if(null!=Q&&null!=H&&Q.length==H.length)for(V=0;V<Q.length;V++)if(this.model.isEdge(Q[V]))d(U)&&0>mxUtils.indexOf(Q,this.model.getTerminal(Q[V],!0))&&this.model.setTerminal(Q[V],U,!0);else if(d(H[V])&&(W=m.getIncomingTreeEdges(H[V]),0<W.length))if(!C)d(U)&&0>mxUtils.indexOf(H,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],U,!0);else if(0==m.getIncomingTreeEdges(Q[V]).length){X=U;if(null==X||X==m.model.getParent(H[V]))X=m.model.getTerminal(W[0],
-!0);C=this.cloneCell(W[0]);this.addEdge(C,m.getDefaultParent(),X,Q[V])}}finally{this.model.endUpdate()}return Q};if(null!=k.sidebar){var B=k.sidebar.dropAndConnect;k.sidebar.dropAndConnect=function(H,g,n,C){var I=m.model,N=null;I.beginUpdate();try{if(N=B.apply(this,arguments),d(H))for(var O=0;O<N.length;O++)if(I.isEdge(N[O])&&null==I.getTerminal(N[O],!0)){I.setTerminal(N[O],H,!0);var Q=m.getCellGeometry(N[O]);Q.points=null;null!=Q.getTerminalPoint(!0)&&Q.setTerminalPoint(null,!0)}}finally{I.endUpdate()}return N}}var S=
-{67:k.actions.get("selectChildren"),88:k.actions.get("selectDescendants"),80:k.actions.get("selectParent"),83:k.actions.get("selectSiblings")},R={67:k.actions.get("copyStyle"),86:k.actions.get("pasteStyle")},T=k.onKeyDown;k.onKeyDown=function(H){try{var g=m.getSelectionCell();if(m.isEnabled()&&!m.isEditing()&&null!=g){var n=mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)?S[H.keyCode]:mxEvent.isAltDown(H)?R[H.keyCode]:null;null!=n?(n.funct(H),mxEvent.consume(H)):d(g)&&(n=null,0<m.getIncomingTreeEdges(g).length&&
-(9==H.which?n=mxEvent.isShiftDown(H)?K(g):L(g):13==H.which&&(n=M(g,!mxEvent.isShiftDown(H)))),null!=n&&0<n.length?(1==n.length&&m.model.isEdge(n[0])?m.setSelectionCell(m.model.getTerminal(n[0],!1)):m.setSelectionCell(n[n.length-1]),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(g)),m.startEditingAtCell(g),mxEvent.consume(H)):37==H.keyCode?(f(g,mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(f(g,mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(f(g,mxConstants.DIRECTION_EAST),
-mxEvent.consume(H)):40==H.keyCode&&(f(g,mxConstants.DIRECTION_SOUTH),mxEvent.consume(H)))}}catch(C){k.handleError(C)}mxEvent.isConsumed(H)||T.apply(this,arguments)};var P=m.connectVertex;m.connectVertex=function(H,g,n,C,I,N,O){var Q=m.getIncomingTreeEdges(H);if(d(H)){var U=F(H),V=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,X=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;return U==g||0==Q.length?L(H,g):V==X?K(H):M(H,g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_WEST)}return P.apply(this,
-arguments)};m.getSubtree=function(H){var g=[H];!x(H)&&!d(H)||y(H)||m.traverse(H,!0,function(n,C){var I=null!=C&&m.isTreeEdge(C);I&&0>mxUtils.indexOf(g,C)&&g.push(C);(null==C||I)&&0>mxUtils.indexOf(g,n)&&g.push(n);return null==C||I});return g};var q=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){q.apply(this,arguments);(x(this.state.cell)||d(this.state.cell))&&!y(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?
+!0);C=this.cloneCell(W[0]);this.addEdge(C,m.getDefaultParent(),X,Q[V])}}finally{this.model.endUpdate()}return Q};if(null!=l.sidebar){var A=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(H,g,p,C){var I=m.model,M=null;I.beginUpdate();try{if(M=A.apply(this,arguments),d(H))for(var O=0;O<M.length;O++)if(I.isEdge(M[O])&&null==I.getTerminal(M[O],!0)){I.setTerminal(M[O],H,!0);var Q=m.getCellGeometry(M[O]);Q.points=null;null!=Q.getTerminalPoint(!0)&&Q.setTerminalPoint(null,!0)}}finally{I.endUpdate()}return M}}var S=
+{67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},R={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},T=l.onKeyDown;l.onKeyDown=function(H){try{var g=m.getSelectionCell();if(m.isEnabled()&&!m.isEditing()&&null!=g){var p=mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)?S[H.keyCode]:mxEvent.isAltDown(H)?R[H.keyCode]:null;null!=p?(p.funct(H),mxEvent.consume(H)):d(g)&&(p=null,0<m.getIncomingTreeEdges(g).length&&
+(9==H.which?p=mxEvent.isShiftDown(H)?K(g):L(g):13==H.which&&(p=N(g,!mxEvent.isShiftDown(H)))),null!=p&&0<p.length?(1==p.length&&m.model.isEdge(p[0])?m.setSelectionCell(m.model.getTerminal(p[0],!1)):m.setSelectionCell(p[p.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(g)),m.startEditingAtCell(g),mxEvent.consume(H)):37==H.keyCode?(f(g,mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(f(g,mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(f(g,mxConstants.DIRECTION_EAST),
+mxEvent.consume(H)):40==H.keyCode&&(f(g,mxConstants.DIRECTION_SOUTH),mxEvent.consume(H)))}}catch(C){l.handleError(C)}mxEvent.isConsumed(H)||T.apply(this,arguments)};var P=m.connectVertex;m.connectVertex=function(H,g,p,C,I,M,O){var Q=m.getIncomingTreeEdges(H);if(d(H)){var U=F(H),V=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,X=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;return U==g||0==Q.length?L(H,g):V==X?K(H):N(H,g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_WEST)}return P.apply(this,
+arguments)};m.getSubtree=function(H){var g=[H];!x(H)&&!d(H)||y(H)||m.traverse(H,!0,function(p,C){var I=null!=C&&m.isTreeEdge(C);I&&0>mxUtils.indexOf(g,C)&&g.push(C);(null==C||I)&&0>mxUtils.indexOf(g,p)&&g.push(p);return null==C||I});return g};var q=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){q.apply(this,arguments);(x(this.state.cell)||d(this.state.cell))&&!y(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?
null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),
-this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);this.graph.isMouseDown=!0;k.hoverIcons.reset();mxEvent.consume(H)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var u=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){u.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=
+this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(H)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var u=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){u.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=
this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,g){G.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var p=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=p.apply(this,arguments),x=this.graph,z=this;return d.concat([this.addEntry("tree container",function(){var y=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");y.vertex=!0;var F=new mxCell("Parent",
-new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var M=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');M.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);M.insertEdge(K,!1);y.insert(K);y.insert(F);y.insert(M);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var y=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");y.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-F.vertex=!0;var M=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');M.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);M.insertEdge(K,!1);var L=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var n=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=n.apply(this,arguments),x=this.graph,z=this;return d.concat([this.addEntry("tree container",function(){var y=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");y.vertex=!0;var F=new mxCell("Parent",
+new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var N=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);N.insertEdge(K,!1);y.insert(K);y.insert(F);y.insert(N);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var y=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");y.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+F.vertex=!0;var N=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);N.insertEdge(K,!1);var L=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),K.style);c.geometry.relative=!0;c.edge=!0;F.insertEdge(c,!0);L.insertEdge(c,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),K.style);k.geometry.relative=!0;k.edge=!0;F.insertEdge(k,!0);f.insertEdge(k,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),K.style);t.geometry.relative=!0;t.edge=!0;F.insertEdge(t,!0);m.insertEdge(t,!1);y.insert(K);y.insert(c);y.insert(k);y.insert(t);y.insert(F);y.insert(M);y.insert(L);y.insert(f);y.insert(m);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var y=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+f.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),K.style);l.geometry.relative=!0;l.edge=!0;F.insertEdge(l,!0);f.insertEdge(l,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),K.style);t.geometry.relative=!0;t.edge=!0;F.insertEdge(t,!0);m.insertEdge(t,!1);y.insert(K);y.insert(c);y.insert(l);y.insert(t);y.insert(F);y.insert(N);y.insert(L);y.insert(f);y.insert(m);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var y=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
y.vertex=!0;return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var y=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);return z.createVertexTemplateFromCells([y,F],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var y=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);return z.createVertexTemplateFromCells([y,F],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree orgchart organization division",function(){var y=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var M=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');M.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);M.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;F.insertEdge(c,!0);L.insertEdge(c,!1);y.insert(K);y.insert(c);y.insert(F);y.insert(M);y.insert(L);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree root",function(){var y=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;return z.createVertexTemplateFromCells([y],
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var N=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+K.geometry.relative=!0;K.edge=!0;F.insertEdge(K,!0);N.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;F.insertEdge(c,!0);L.insertEdge(c,!1);y.insert(K);y.insert(c);y.insert(F);y.insert(N);y.insert(L);return z.createVertexTemplateFromCells([y],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree root",function(){var y=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;return z.createVertexTemplateFromCells([y],
y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree division",function(){var y=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);return z.createVertexTemplateFromCells([y,F],y.geometry.width,y.geometry.height,y.value)}),this.addEntry("tree sub sections",function(){var y=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");y.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);var M=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");M.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),F.style);K.geometry.setTerminalPoint(new mxPoint(110,-40),!0);K.geometry.relative=!0;K.edge=!0;M.insertEdge(K,!1);return z.createVertexTemplateFromCells([F,K,y,M],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!1);var N=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");N.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),F.style);K.geometry.setTerminalPoint(new mxPoint(110,-40),!0);K.geometry.relative=!0;K.edge=!0;N.insertEdge(K,!1);return z.createVertexTemplateFromCells([F,K,y,N],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(K,L){if(EditorUi.windowed){var c=K.editor.graph;c.popupMenuHandler.hideMenu();null==K.formatWindow?(K.formatWindow=new WrapperWindow(K,"",Math.max(10,K.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(f){f.className="geSidebarContainer geFormatContainer";K.createFormat(f).init()}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.formatWindow.window.setTitle(mxResources.get("format"))})),K.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){K.formatWindow.window.fit()})),K.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):K.formatWindow.window.setVisible(null!=L?L:!K.formatWindow.window.isVisible())}else null==K.formatElt&&(K.formatElt=K.createSidebarContainer(),K.createFormat(K.formatElt).init(),K.formatElt.style.border="none",K.formatElt.style.width="240px",K.formatElt.style.borderLeftWidth="1px",K.formatElt.style.borderLeftStyle="solid",K.formatElt.style.right="0px"),L=K.diagramContainer.parentNode,
-null!=K.formatElt.parentNode?(K.formatElt.parentNode.removeChild(K.formatElt),L.style.right="0px"):(L.parentNode.appendChild(K.formatElt),L.style.right=K.formatElt.style.width)}function l(K,L){if(EditorUi.windowed){var c=K.editor.graph;c.popupMenuHandler.hideMenu();null==K.sidebarWindow?(K.sidebarWindow=new WrapperWindow(K,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(f){K.createShapesPanel(f)}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
+null!=K.formatElt.parentNode?(K.formatElt.parentNode.removeChild(K.formatElt),L.style.right="0px"):(L.parentNode.appendChild(K.formatElt),L.style.right=K.formatElt.style.width)}function k(K,L){if(EditorUi.windowed){var c=K.editor.graph;c.popupMenuHandler.hideMenu();null==K.sidebarWindow?(K.sidebarWindow=new WrapperWindow(K,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(f){K.createShapesPanel(f)}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
K.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){K.sidebarWindow.window.fit()})),K.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),K.sidebarWindow.window.setVisible(!0),isLocalStorage&&K.getLocalData("sidebar",function(f){K.sidebar.showEntries(f,null,!0)}),K.restoreLibraries()):K.sidebarWindow.window.setVisible(null!=L?L:!K.sidebarWindow.window.isVisible())}else null==K.sidebarElt&&(K.sidebarElt=K.createSidebarContainer(),K.createShapesPanel(K.sidebarElt),K.sidebarElt.style.border=
-"none",K.sidebarElt.style.width="210px",K.sidebarElt.style.borderRight="1px solid gray"),L=K.diagramContainer.parentNode,null!=K.sidebarElt.parentNode?(K.sidebarElt.parentNode.removeChild(K.sidebarElt),L.style.left="0px"):(L.parentNode.appendChild(K.sidebarElt),L.style.left=K.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var p=0;try{p=window.innerWidth||document.documentElement.clientWidth||
+"none",K.sidebarElt.style.width="210px",K.sidebarElt.style.borderRight="1px solid gray"),L=K.diagramContainer.parentNode,null!=K.sidebarElt.parentNode?(K.sidebarElt.parentNode.removeChild(K.sidebarElt),L.style.left="0px"):(L.parentNode.appendChild(K.sidebarElt),L.style.left=K.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth}catch(K){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(K,L){null!=L.shortcut&&900>p&&!mxClient.IS_IOS?K.firstChild.nextSibling.setAttribute("title",L.shortcut):x.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(K,L){null!=L.shortcut&&900>n&&!mxClient.IS_IOS?K.firstChild.nextSibling.setAttribute("title",L.shortcut):x.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
function(K){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=K?K:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var z=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();z.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(K){y.apply(this,
arguments);if(K){var L=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=L&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=L&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};EditorUi.prototype.installFormatToolbar=function(K){var L=
-this.editor.graph,c=document.createElement("div");c.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";L.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(f,k){0<L.getSelectionCount()?(K.appendChild(c),c.innerHTML="Selected: "+L.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var F=!1;EditorUi.prototype.initFormatWindow=
+this.editor.graph,c=document.createElement("div");c.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";L.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(f,l){0<L.getSelectionCount()?(K.appendChild(c),c.innerHTML="Selected: "+L.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var F=!1;EditorUi.prototype.initFormatWindow=
function(){if(!F&&null!=this.formatWindow){F=!0;var K=this.formatWindow.window.toggleMinimized,L=240;this.formatWindow.window.toggleMinimized=function(){K.apply(this,arguments);this.minimized?(L=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+L-140+"px"):(this.div.style.width=L+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-L+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var M=EditorUi.prototype.init;EditorUi.prototype.init=function(){function K(C,I,N){var O=m.menus.get(C);I=A.addMenu(mxResources.get(C),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));I.className="geButton";I.setAttribute("title",mxResources.get(C));m.menus.menuCreated(O,I,"geButton");null!=N&&
-(I.style.backgroundImage="url("+N+")",I.innerText="");return I}function L(C,I,N,O,Q,U){var V=document.createElement("a");V.className="geButton";v.appendChild(V);null!=U?V.style.backgroundImage="url("+U+")":mxUtils.write(V,C);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&I(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=Q&&(C=function(){Q.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},Q.addListener("stateChanged",
-C),t.addListener("enabledChanged",C),C());return V}function c(C,I,N){I=document.createElement("div");I.className="geButtonGroup";for(N=0;N<C.length;N++)null!=C[N]&&I.appendChild(C[N]);v.appendChild(I);return I}function f(){p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;v.innerHTML="";var C=1E3>p,I=K("diagram",null,C?Editor.menuImage:null);c([I,L(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var N=EditorUi.prototype.init;EditorUi.prototype.init=function(){function K(C,I,M){var O=m.menus.get(C);I=B.addMenu(mxResources.get(C),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));I.className="geButton";I.setAttribute("title",mxResources.get(C));m.menus.menuCreated(O,I,"geButton");null!=M&&
+(I.style.backgroundImage="url("+M+")",I.innerText="");return I}function L(C,I,M,O,Q,U){var V=document.createElement("a");V.className="geButton";v.appendChild(V);null!=U?V.style.backgroundImage="url("+U+")":mxUtils.write(V,C);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&I(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=Q&&(C=function(){Q.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},Q.addListener("stateChanged",
+C),t.addListener("enabledChanged",C),C());return V}function c(C,I,M){I=document.createElement("div");I.className="geButtonGroup";for(M=0;M<C.length;M++)null!=C[M]&&I.appendChild(C[M]);v.appendChild(I);return I}function f(){n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;v.innerHTML="";var C=1E3>n,I=K("diagram",null,C?Editor.menuImage:null);c([I,L(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),
C?Editor.shapesImage:null),L(mxResources.get("format"),m.actions.get("format").funct,null,mxResources.get("format")+" ("+m.actions.get("format").shortcut+")",m.actions.get("image"),C?Editor.formatImage:null)]);I=K("insert",!0,C?R:null);c([I,L(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),C?Editor.trashImage:null)]);t.isEnabled()||I.setAttribute("disabled","disabled");H.setAttribute("title",mxResources.get("undo")+" ("+J.shortcut+")");
-g.setAttribute("title",mxResources.get("redo")+" ("+G.shortcut+")");n.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=p&&(c([H,g]),520<=p&&c([n,640<=p?L("",q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",q,Editor.zoomInImage):null,640<=p?L("",u.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",u,Editor.zoomOutImage):null]));v.appendChild(m.statusContainer);v.appendChild(m.buttonContainer)}M.apply(this,arguments);var k=mxUtils.isAncestorNode(document.body,
-this.container)?this.container:this.editor.graph.container;null!=k&&(k.classList.add("geSimple"),k.classList.add("geMinimal"),k.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=p||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&
-1E3<=p&&(b(this,!0),this.formatWindow.window.setVisible(!0));var m=this,t=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));var v=document.createElement("div");v.className="geMenubarContainer";var A=new Menubar(m,v),E=m.hideCurrentMenu;m.hideCurrentMenu=function(){E.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var D=m.descriptorChanged;m.descriptorChanged=function(){D.apply(this,arguments);var C=m.getCurrentFile();if(null!=C&&null!=C.getTitle()){var I=C.getMode();
-"google"==I?I="googleDrive":"github"==I?I="gitHub":"gitlab"==I?I="gitLab":"onedrive"==I&&(I="oneDrive");I=mxResources.get(I);v.setAttribute("title",C.getTitle()+(null!=I?" ("+I+")":""))}else v.removeAttribute("title")};m.setStatusText(m.editor.getStatus());v.appendChild(m.statusContainer);m.buttonContainer=this.createButtonContainer();v.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=this.createTabContainer();var B=this.createZoomInput(!0),S=m.updateTabContainer;
-m.updateTabContainer=function(){S.apply(this,arguments);m.tabContainer.appendChild(B)};var R=Editor.addBoxImage;if(null!=m.hoverIcons){var T=m.hoverIcons.update;m.hoverIcons.update=function(){t.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=t.freehand){var P=t.freehand.createStyle;t.freehand.createStyle=function(C){return P.apply(this,arguments)+"sketch=0;"}}m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));m.setStatusText(m.editor.getStatus());
-var q=m.actions.get("zoomIn"),u=m.actions.get("zoomOut");k=m.actions.get("resetView");var J=m.actions.get("undo"),G=m.actions.get("redo"),H=L("",J.funct,null,"",J,Editor.undoImage),g=L("",G.funct,null,"",G,Editor.redoImage),n=L("",function(C){mxEvent.isAltDown(C)?(m.hideCurrentMenu(),m.actions.get("customZoom").funct()):(m.hideCurrentMenu(),m.actions.get("smartFit").funct());mxEvent.consume(C)},!0,"",k,Editor.zoomFitImage);m.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){l(m,null)});
-m.container.appendChild(m.tabContainer);m.container.appendChild(v);m.updateTabContainer();!EditorUi.windowed&&1E3<=p&&b(this,!0);f();m.addListener("lockedChanged",f);m.addListener("languageChanged",f);m.editor.graph.addListener("enabledChanged",f);mxEvent.addListener(window,"resize",function(){f();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();
-null!=m.menus.chatWindow&&m.menus.chatWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var l=EditorUi.initTheme;EditorUi.initTheme=function(){l.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,x,z,y){var F=x.y,M=x.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=x){var c=this,f=new mxCellState,k=this.graph.getView().scale,m=Math.max(2,this.getGuideTolerance()/2);f.x=d.x+M;f.y=d.y+F;f.width=d.width;f.height=d.height;for(var t=[],v=[],A=0;A<this.states.length;A++){var E=this.states[A];E instanceof mxCellState&&(y||!this.graph.isCellSelected(E.cell))&&((f.x>=E.x&&f.x<=E.x+E.width||E.x>=f.x&&E.x<=f.x+f.width)&&(f.y>
-E.y+E.height+4||f.y+f.height+4<E.y)?t.push(E):(f.y>=E.y&&f.y<=E.y+E.height||E.y>=f.y&&E.y<=f.y+f.height)&&(f.x>E.x+E.width+4||f.x+f.width+4<E.x)&&v.push(E))}var D=0,B=0,S=E=0,R=0,T=0,P=0,q=0,u=5*k;if(1<t.length){t.push(f);t.sort(function(g,n){return g.y-n.y});var J=!1;A=f==t[0];k=f==t[t.length-1];if(!A&&!k)for(A=1;A<t.length-1;A++)if(f==t[A]){k=t[A-1];A=t[A+1];E=B=S=(A.y-k.y-k.height-f.height)/2;break}for(A=0;A<t.length-1;A++){k=t[A];var G=t[A+1],H=f==k||f==G;G=G.y-k.y-k.height;J|=f==k;if(0==B&&0==
-D)B=G,D=1;else if(Math.abs(B-G)<=(H||1==A&&J?m:0))D+=1;else if(1<D&&J){t=t.slice(0,A+1);break}else if(3<=t.length-A&&!J)D=0,E=B=0!=S?S:0,t.splice(0,0==A?1:A),A=-1;else break;0!=E||H||(B=E=G)}3==t.length&&t[1]==f&&(E=0)}if(1<v.length){v.push(f);v.sort(function(g,n){return g.x-n.x});J=!1;A=f==v[0];k=f==v[v.length-1];if(!A&&!k)for(A=1;A<v.length-1;A++)if(f==v[A]){k=v[A-1];A=v[A+1];P=T=q=(A.x-k.x-k.width-f.width)/2;break}for(A=0;A<v.length-1;A++){k=v[A];G=v[A+1];H=f==k||f==G;G=G.x-k.x-k.width;J|=f==k;
-if(0==T&&0==R)T=G,R=1;else if(Math.abs(T-G)<=(H||1==A&&J?m:0))R+=1;else if(1<R&&J){v=v.slice(0,A+1);break}else if(3<=v.length-A&&!J)R=0,P=T=0!=q?q:0,v.splice(0,0==A?1:A),A=-1;else break;0!=P||H||(T=P=G)}3==v.length&&v[1]==f&&(P=0)}m=function(g,n,C,I){var N=[];if(I){I=u;var O=0}else I=0,O=u;N.push(new mxPoint(g.x-I,g.y-O));N.push(new mxPoint(g.x+I,g.y+O));N.push(g);N.push(n);N.push(new mxPoint(n.x-I,n.y-O));N.push(new mxPoint(n.x+I,n.y+O));if(null!=C)return C.points=N,C;g=new mxPolyline(N,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);g.dialect=mxConstants.DIALECT_SVG;g.pointerEvents=!1;g.init(c.graph.getView().getOverlayPane());return g};T=function(g,n){if(g&&null!=c.guidesArrHor)for(g=0;g<c.guidesArrHor.length;g++)c.guidesArrHor[g].node.style.visibility="hidden";if(n&&null!=c.guidesArrVer)for(g=0;g<c.guidesArrVer.length;g++)c.guidesArrVer[g].node.style.visibility="hidden"};if(1<R&&R==v.length-1){R=[];q=c.guidesArrHor;K=[];M=0;A=v[0]==f?1:0;J=v[A].y+v[A].height;if(0<P)for(A=0;A<v.length-1;A++)k=
-v[A],G=v[A+1],f==k?(M=G.x-k.width-P,K.push(new mxPoint(M+k.width+u,J)),K.push(new mxPoint(G.x-u,J))):f==G?(K.push(new mxPoint(k.x+k.width+u,J)),M=k.x+k.width+P,K.push(new mxPoint(M-u,J))):(K.push(new mxPoint(k.x+k.width+u,J)),K.push(new mxPoint(G.x-u,J)));else k=v[0],A=v[2],M=k.x+k.width+(A.x-k.x-k.width-f.width)/2,K.push(new mxPoint(k.x+k.width+u,J)),K.push(new mxPoint(M-u,J)),K.push(new mxPoint(M+f.width+u,J)),K.push(new mxPoint(A.x-u,J));for(A=0;A<K.length;A+=2)v=K[A],P=K[A+1],v=m(v,P,null!=q?
-q[A/2]:null),v.node.style.visibility="visible",v.redraw(),R.push(v);for(A=K.length/2;null!=q&&A<q.length;A++)q[A].destroy();c.guidesArrHor=R;M-=d.x;K=!0}else T(!0);if(1<D&&D==t.length-1){R=[];q=c.guidesArrVer;L=[];F=0;A=t[0]==f?1:0;D=t[A].x+t[A].width;if(0<E)for(A=0;A<t.length-1;A++)k=t[A],G=t[A+1],f==k?(F=G.y-k.height-E,L.push(new mxPoint(D,F+k.height+u)),L.push(new mxPoint(D,G.y-u))):f==G?(L.push(new mxPoint(D,k.y+k.height+u)),F=k.y+k.height+E,L.push(new mxPoint(D,F-u))):(L.push(new mxPoint(D,k.y+
-k.height+u)),L.push(new mxPoint(D,G.y-u)));else k=t[0],A=t[2],F=k.y+k.height+(A.y-k.y-k.height-f.height)/2,L.push(new mxPoint(D,k.y+k.height+u)),L.push(new mxPoint(D,F-u)),L.push(new mxPoint(D,F+f.height+u)),L.push(new mxPoint(D,A.y-u));for(A=0;A<L.length;A+=2)v=L[A],P=L[A+1],v=m(v,P,null!=q?q[A/2]:null,!0),v.node.style.visibility="visible",v.redraw(),R.push(v);for(A=L.length/2;null!=q&&A<q.length;A++)q[A].destroy();c.guidesArrVer=R;F-=d.y;L=!0}else T(!1,!0)}if(K||L)return f=new mxPoint(M,F),t=b.call(this,
-d,f,z,y),K&&!L?f.y=t.y:L&&!K&&(f.x=t.x),t.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;T(!0,!0);return b.apply(this,arguments)};var l=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){l.call(this,d);var x=this.guidesArrVer,z=this.guidesArrHor;if(null!=x)for(var y=0;y<x.length;y++)x[y].node.style.visibility=d?"visible":"hidden";if(null!=
-z)for(y=0;y<z.length;y++)z[y].node.style.visibility=d?"visible":"hidden"};var p=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){p.call(this);var d=this.guidesArrVer,x=this.guidesArrHor;if(null!=d){for(var z=0;z<d.length;z++)d[z].destroy();this.guidesArrVer=null}if(null!=x){for(z=0;z<x.length;z++)x[z].destroy();this.guidesArrHor=null}}})();function mxRuler(b,l,p,d){function x(){var D=b.getDiagramContainerOffset(),B=b.diagramContainer;c.style.top=B.offsetTop-D.y+"px";c.style.left=B.offsetLeft-D.x+"px";c.style.width=(p?0:B.offsetWidth)+M+"px";c.style.height=(p?B.offsetHeight:0)+M+"px"}function z(D,B,S){if(null!=y)return D;var R;return function(){var T=this,P=arguments,q=S&&!R;clearTimeout(R);R=setTimeout(function(){R=null;S||D.apply(T,P)},B);q&&D.apply(T,P)}}var y=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
-window.msRequestAnimationFrame,F=window.cancelAnimationFrame||window.mozCancelAnimationFrame,M=this.RULER_THICKNESS,K=this;this.unit=l;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},c=document.createElement("div");c.className="geRuler";c.style.position="fixed";this.updateStyle=mxUtils.bind(this,
-function(){L=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};c.style[p?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;c.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(c);mxEvent.disableContextMenu(c);this.editorUiRefresh=b.refresh;b.refresh=function(D){K.editorUiRefresh.apply(b,
-arguments);x()};x();var f=document.createElement("canvas");f.width=c.offsetWidth;f.height=c.offsetHeight;c.style.overflow="hidden";f.style.position="relative";c.appendChild(f);var k=f.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=c;this.canvas=f;var t=function(D,B,S,R,T){D=Math.round(D);B=Math.round(B);S=Math.round(S);R=Math.round(R);k.beginPath();k.moveTo(D+.5,B+.5);k.lineTo(S+.5,R+.5);k.stroke();T&&(p?(k.save(),k.translate(D,B),k.rotate(-Math.PI/2),k.fillText(T,0,0),
-k.restore()):k.fillText(T,D,B))},v=function(){k.clearRect(0,0,f.width,f.height);k.beginPath();k.lineWidth=.7;k.strokeStyle=L.strokeClr;k.setLineDash([]);k.font="9px Arial";k.textAlign="center";var D=m.view.scale,B=m.view.getBackgroundPageBounds(),S=m.view.translate,R=m.pageVisible;S=R?M+(p?B.y-m.container.scrollTop:B.x-m.container.scrollLeft):M+(p?S.y*D-m.container.scrollTop:S.x*D-m.container.scrollLeft);var T=0;R&&(T=m.getPageLayout(),T=p?T.y*m.pageFormat.height:T.x*m.pageFormat.width);var P;switch(K.unit){case mxConstants.POINTS:var q=
-P=10;var u=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=D||4<=D?8:16,q=mxConstants.PIXELS_PER_INCH/P,u=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var J=q;2<=D?J=q/(2*Math.floor(D/2)):.5>=D&&(J=q*Math.floor(1/D/2)*(K.unit==mxConstants.MILLIMETERS?2:1));q=null;B=R?Math.min(S+(p?B.height:B.width),p?
-f.height:f.width):p?f.height:f.width;if(R)if(k.fillStyle=L.outBkgClr,p){var G=S-M;0<G&&k.fillRect(0,M,M,G);B<f.height&&k.fillRect(0,B,M,f.height)}else G=S-M,0<G&&k.fillRect(M,0,G,M),B<f.width&&k.fillRect(B,0,f.width,M);k.fillStyle=L.fontClr;for(R=R?S:S%(J*D);R<=B;R+=J*D)if(G=Math.round((R-S)/D/J),!(R<M||G==q)){q=G;var H=null;0==G%P&&(H=K.formatText(T+G*J)+"");p?t(M-u[Math.abs(G)%P],R,M,R,H):t(R,M-u[Math.abs(G)%P],R,M,H)}k.lineWidth=1;t(p?0:M,p?M:0,M,M);k.fillStyle=L.cornerClr;k.fillRect(0,0,M,M)},
-A=-1,E=function(){null!=y?(null!=F&&F(A),A=y(v)):v()};this.drawRuler=E;this.sizeListener=l=z(function(){var D=m.container;p?(D=D.offsetHeight+M,f.height!=D&&(f.height=D,c.style.height=D+"px",E())):(D=D.offsetWidth+M,f.width!=D&&(f.width=D,c.style.width=D+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=d=z(function(){var D=p?m.container.scrollTop:m.container.scrollLeft;K.lastScroll!=D&&(K.lastScroll=D,E())},10);this.unitListener=function(D,B){K.setUnit(B.getProperty("unit"))};
-m.addListener(mxEvent.SIZE,l);m.container.addEventListener("scroll",d);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(D){L=D;c.style.background=L.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(D,B,S,R){if(p&&4<D.height||!p&&4<D.width){if(null!=K.guidePart)try{k.putImageData(K.guidePart.imgData1,
-K.guidePart.x1,K.guidePart.y1),k.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),k.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(I){}var T=K.origGuideMove.apply(this,arguments);try{k.lineWidth=.5;k.strokeStyle=L.guideClr;k.setLineDash([2]);if(p){var P=D.y+T.y+M-this.graph.container.scrollTop;var q=0;var u=P+D.height/2;var J=M/2;var G=P+D.height;var H=0;var g=k.getImageData(q,P-1,M,3);t(q,P,M,P);P--;var n=k.getImageData(J,u-1,M,3);t(J,u,M,u);u--;var C=k.getImageData(H,
-G-1,M,3);t(H,G,M,G);G--}else P=0,q=D.x+T.x+M-this.graph.container.scrollLeft,u=M/2,J=q+D.width/2,G=0,H=q+D.width,g=k.getImageData(q-1,P,3,M),t(q,P,q,M),q--,n=k.getImageData(J-1,u,3,M),t(J,u,J,M),J--,C=k.getImageData(H-1,G,3,M),t(H,G,H,M),H--;if(null==K.guidePart||K.guidePart.x1!=q||K.guidePart.y1!=P)K.guidePart={imgData1:g,x1:q,y1:P,imgData2:n,x2:J,y2:u,imgData3:C,x3:H,y3:G}}catch(I){}}else T=K.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
-function(){var D=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{k.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),k.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),k.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(B){}return D}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+g.setAttribute("title",mxResources.get("redo")+" ("+G.shortcut+")");p.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=n&&(c([H,g]),520<=n&&c([p,640<=n?L("",q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",q,Editor.zoomInImage):null,640<=n?L("",u.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",u,Editor.zoomOutImage):null]));v.appendChild(m.statusContainer);v.appendChild(m.buttonContainer)}N.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,
+this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&
+1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var m=this,t=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));var v=document.createElement("div");v.className="geMenubarContainer";var B=new Menubar(m,v),E=m.hideCurrentMenu;m.hideCurrentMenu=function(){E.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var D=m.descriptorChanged;m.descriptorChanged=function(){D.apply(this,arguments);var C=m.getCurrentFile();if(null!=C&&null!=C.getTitle()){var I=C.getMode();
+"google"==I?I="googleDrive":"github"==I?I="gitHub":"gitlab"==I?I="gitLab":"onedrive"==I&&(I="oneDrive");I=mxResources.get(I);v.setAttribute("title",C.getTitle()+(null!=I?" ("+I+")":""))}else v.removeAttribute("title")};m.setStatusText(m.editor.getStatus());v.appendChild(m.statusContainer);m.buttonContainer=this.createButtonContainer();v.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=this.createTabContainer();var A=this.createZoomInput(!0),S=m.updateTabContainer;
+m.updateTabContainer=function(){S.apply(this,arguments);m.tabContainer.appendChild(A)};var R=Editor.addBoxImage;if(null!=m.hoverIcons){var T=m.hoverIcons.update;m.hoverIcons.update=function(){t.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=t.freehand){var P=t.freehand.createStyle;t.freehand.createStyle=function(C){return P.apply(this,arguments)+"sketch=0;"}}m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));m.setStatusText(m.editor.getStatus());
+var q=m.actions.get("zoomIn"),u=m.actions.get("zoomOut");l=m.actions.get("resetView");var J=m.actions.get("undo"),G=m.actions.get("redo"),H=L("",J.funct,null,"",J,Editor.undoImage),g=L("",G.funct,null,"",G,Editor.redoImage),p=L("",function(C){mxEvent.isAltDown(C)?(m.hideCurrentMenu(),m.actions.get("customZoom").funct()):(m.hideCurrentMenu(),m.actions.get("smartFit").funct());mxEvent.consume(C)},!0,"",l,Editor.zoomFitImage);m.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){k(m,null)});
+m.container.appendChild(m.tabContainer);m.container.appendChild(v);m.updateTabContainer();!EditorUi.windowed&&1E3<=n&&b(this,!0);f();m.addListener("lockedChanged",f);m.addListener("languageChanged",f);m.editor.graph.addListener("enabledChanged",f);mxEvent.addListener(window,"resize",function(){f();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();
+null!=m.menus.chatWindow&&m.menus.chatWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var k=EditorUi.initTheme;EditorUi.initTheme=function(){k.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,x,z,y){var F=x.y,N=x.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=x){var c=this,f=new mxCellState,l=this.graph.getView().scale,m=Math.max(2,this.getGuideTolerance()/2);f.x=d.x+N;f.y=d.y+F;f.width=d.width;f.height=d.height;for(var t=[],v=[],B=0;B<this.states.length;B++){var E=this.states[B];E instanceof mxCellState&&(y||!this.graph.isCellSelected(E.cell))&&((f.x>=E.x&&f.x<=E.x+E.width||E.x>=f.x&&E.x<=f.x+f.width)&&(f.y>
+E.y+E.height+4||f.y+f.height+4<E.y)?t.push(E):(f.y>=E.y&&f.y<=E.y+E.height||E.y>=f.y&&E.y<=f.y+f.height)&&(f.x>E.x+E.width+4||f.x+f.width+4<E.x)&&v.push(E))}var D=0,A=0,S=E=0,R=0,T=0,P=0,q=0,u=5*l;if(1<t.length){t.push(f);t.sort(function(g,p){return g.y-p.y});var J=!1;B=f==t[0];l=f==t[t.length-1];if(!B&&!l)for(B=1;B<t.length-1;B++)if(f==t[B]){l=t[B-1];B=t[B+1];E=A=S=(B.y-l.y-l.height-f.height)/2;break}for(B=0;B<t.length-1;B++){l=t[B];var G=t[B+1],H=f==l||f==G;G=G.y-l.y-l.height;J|=f==l;if(0==A&&0==
+D)A=G,D=1;else if(Math.abs(A-G)<=(H||1==B&&J?m:0))D+=1;else if(1<D&&J){t=t.slice(0,B+1);break}else if(3<=t.length-B&&!J)D=0,E=A=0!=S?S:0,t.splice(0,0==B?1:B),B=-1;else break;0!=E||H||(A=E=G)}3==t.length&&t[1]==f&&(E=0)}if(1<v.length){v.push(f);v.sort(function(g,p){return g.x-p.x});J=!1;B=f==v[0];l=f==v[v.length-1];if(!B&&!l)for(B=1;B<v.length-1;B++)if(f==v[B]){l=v[B-1];B=v[B+1];P=T=q=(B.x-l.x-l.width-f.width)/2;break}for(B=0;B<v.length-1;B++){l=v[B];G=v[B+1];H=f==l||f==G;G=G.x-l.x-l.width;J|=f==l;
+if(0==T&&0==R)T=G,R=1;else if(Math.abs(T-G)<=(H||1==B&&J?m:0))R+=1;else if(1<R&&J){v=v.slice(0,B+1);break}else if(3<=v.length-B&&!J)R=0,P=T=0!=q?q:0,v.splice(0,0==B?1:B),B=-1;else break;0!=P||H||(T=P=G)}3==v.length&&v[1]==f&&(P=0)}m=function(g,p,C,I){var M=[];if(I){I=u;var O=0}else I=0,O=u;M.push(new mxPoint(g.x-I,g.y-O));M.push(new mxPoint(g.x+I,g.y+O));M.push(g);M.push(p);M.push(new mxPoint(p.x-I,p.y-O));M.push(new mxPoint(p.x+I,p.y+O));if(null!=C)return C.points=M,C;g=new mxPolyline(M,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);g.dialect=mxConstants.DIALECT_SVG;g.pointerEvents=!1;g.init(c.graph.getView().getOverlayPane());return g};T=function(g,p){if(g&&null!=c.guidesArrHor)for(g=0;g<c.guidesArrHor.length;g++)c.guidesArrHor[g].node.style.visibility="hidden";if(p&&null!=c.guidesArrVer)for(g=0;g<c.guidesArrVer.length;g++)c.guidesArrVer[g].node.style.visibility="hidden"};if(1<R&&R==v.length-1){R=[];q=c.guidesArrHor;K=[];N=0;B=v[0]==f?1:0;J=v[B].y+v[B].height;if(0<P)for(B=0;B<v.length-1;B++)l=
+v[B],G=v[B+1],f==l?(N=G.x-l.width-P,K.push(new mxPoint(N+l.width+u,J)),K.push(new mxPoint(G.x-u,J))):f==G?(K.push(new mxPoint(l.x+l.width+u,J)),N=l.x+l.width+P,K.push(new mxPoint(N-u,J))):(K.push(new mxPoint(l.x+l.width+u,J)),K.push(new mxPoint(G.x-u,J)));else l=v[0],B=v[2],N=l.x+l.width+(B.x-l.x-l.width-f.width)/2,K.push(new mxPoint(l.x+l.width+u,J)),K.push(new mxPoint(N-u,J)),K.push(new mxPoint(N+f.width+u,J)),K.push(new mxPoint(B.x-u,J));for(B=0;B<K.length;B+=2)v=K[B],P=K[B+1],v=m(v,P,null!=q?
+q[B/2]:null),v.node.style.visibility="visible",v.redraw(),R.push(v);for(B=K.length/2;null!=q&&B<q.length;B++)q[B].destroy();c.guidesArrHor=R;N-=d.x;K=!0}else T(!0);if(1<D&&D==t.length-1){R=[];q=c.guidesArrVer;L=[];F=0;B=t[0]==f?1:0;D=t[B].x+t[B].width;if(0<E)for(B=0;B<t.length-1;B++)l=t[B],G=t[B+1],f==l?(F=G.y-l.height-E,L.push(new mxPoint(D,F+l.height+u)),L.push(new mxPoint(D,G.y-u))):f==G?(L.push(new mxPoint(D,l.y+l.height+u)),F=l.y+l.height+E,L.push(new mxPoint(D,F-u))):(L.push(new mxPoint(D,l.y+
+l.height+u)),L.push(new mxPoint(D,G.y-u)));else l=t[0],B=t[2],F=l.y+l.height+(B.y-l.y-l.height-f.height)/2,L.push(new mxPoint(D,l.y+l.height+u)),L.push(new mxPoint(D,F-u)),L.push(new mxPoint(D,F+f.height+u)),L.push(new mxPoint(D,B.y-u));for(B=0;B<L.length;B+=2)v=L[B],P=L[B+1],v=m(v,P,null!=q?q[B/2]:null,!0),v.node.style.visibility="visible",v.redraw(),R.push(v);for(B=L.length/2;null!=q&&B<q.length;B++)q[B].destroy();c.guidesArrVer=R;F-=d.y;L=!0}else T(!1,!0)}if(K||L)return f=new mxPoint(N,F),t=b.call(this,
+d,f,z,y),K&&!L?f.y=t.y:L&&!K&&(f.x=t.x),t.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;T(!0,!0);return b.apply(this,arguments)};var k=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){k.call(this,d);var x=this.guidesArrVer,z=this.guidesArrHor;if(null!=x)for(var y=0;y<x.length;y++)x[y].node.style.visibility=d?"visible":"hidden";if(null!=
+z)for(y=0;y<z.length;y++)z[y].node.style.visibility=d?"visible":"hidden"};var n=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){n.call(this);var d=this.guidesArrVer,x=this.guidesArrHor;if(null!=d){for(var z=0;z<d.length;z++)d[z].destroy();this.guidesArrVer=null}if(null!=x){for(z=0;z<x.length;z++)x[z].destroy();this.guidesArrHor=null}}})();function mxRuler(b,k,n,d){function x(){var D=b.getDiagramContainerOffset(),A=b.diagramContainer;c.style.top=A.offsetTop-D.y+"px";c.style.left=A.offsetLeft-D.x+"px";c.style.width=(n?0:A.offsetWidth)+N+"px";c.style.height=(n?A.offsetHeight:0)+N+"px"}function z(D,A,S){if(null!=y)return D;var R;return function(){var T=this,P=arguments,q=S&&!R;clearTimeout(R);R=setTimeout(function(){R=null;S||D.apply(T,P)},A);q&&D.apply(T,P)}}var y=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
+window.msRequestAnimationFrame,F=window.cancelAnimationFrame||window.mozCancelAnimationFrame,N=this.RULER_THICKNESS,K=this;this.unit=k;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},c=document.createElement("div");c.className="geRuler";c.style.position="fixed";this.updateStyle=mxUtils.bind(this,
+function(){L=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};c.style[n?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;c.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(c);mxEvent.disableContextMenu(c);this.editorUiRefresh=b.refresh;b.refresh=function(D){K.editorUiRefresh.apply(b,
+arguments);x()};x();var f=document.createElement("canvas");f.width=c.offsetWidth;f.height=c.offsetHeight;c.style.overflow="hidden";f.style.position="relative";c.appendChild(f);var l=f.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=c;this.canvas=f;var t=function(D,A,S,R,T){D=Math.round(D);A=Math.round(A);S=Math.round(S);R=Math.round(R);l.beginPath();l.moveTo(D+.5,A+.5);l.lineTo(S+.5,R+.5);l.stroke();T&&(n?(l.save(),l.translate(D,A),l.rotate(-Math.PI/2),l.fillText(T,0,0),
+l.restore()):l.fillText(T,D,A))},v=function(){l.clearRect(0,0,f.width,f.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=L.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var D=m.view.scale,A=m.view.getBackgroundPageBounds(),S=m.view.translate,R=m.pageVisible;S=R?N+(n?A.y-m.container.scrollTop:A.x-m.container.scrollLeft):N+(n?S.y*D-m.container.scrollTop:S.x*D-m.container.scrollLeft);var T=0;R&&(T=m.getPageLayout(),T=n?T.y*m.pageFormat.height:T.x*m.pageFormat.width);var P;switch(K.unit){case mxConstants.POINTS:var q=
+P=10;var u=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=D||4<=D?8:16,q=mxConstants.PIXELS_PER_INCH/P,u=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var J=q;2<=D?J=q/(2*Math.floor(D/2)):.5>=D&&(J=q*Math.floor(1/D/2)*(K.unit==mxConstants.MILLIMETERS?2:1));q=null;A=R?Math.min(S+(n?A.height:A.width),n?
+f.height:f.width):n?f.height:f.width;if(R)if(l.fillStyle=L.outBkgClr,n){var G=S-N;0<G&&l.fillRect(0,N,N,G);A<f.height&&l.fillRect(0,A,N,f.height)}else G=S-N,0<G&&l.fillRect(N,0,G,N),A<f.width&&l.fillRect(A,0,f.width,N);l.fillStyle=L.fontClr;for(R=R?S:S%(J*D);R<=A;R+=J*D)if(G=Math.round((R-S)/D/J),!(R<N||G==q)){q=G;var H=null;0==G%P&&(H=K.formatText(T+G*J)+"");n?t(N-u[Math.abs(G)%P],R,N,R,H):t(R,N-u[Math.abs(G)%P],R,N,H)}l.lineWidth=1;t(n?0:N,n?N:0,N,N);l.fillStyle=L.cornerClr;l.fillRect(0,0,N,N)},
+B=-1,E=function(){null!=y?(null!=F&&F(B),B=y(v)):v()};this.drawRuler=E;this.sizeListener=k=z(function(){var D=m.container;n?(D=D.offsetHeight+N,f.height!=D&&(f.height=D,c.style.height=D+"px",E())):(D=D.offsetWidth+N,f.width!=D&&(f.width=D,c.style.width=D+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=d=z(function(){var D=n?m.container.scrollTop:m.container.scrollLeft;K.lastScroll!=D&&(K.lastScroll=D,E())},10);this.unitListener=function(D,A){K.setUnit(A.getProperty("unit"))};
+m.addListener(mxEvent.SIZE,k);m.container.addEventListener("scroll",d);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(D){L=D;c.style.background=L.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(D,A,S,R){if(n&&4<D.height||!n&&4<D.width){if(null!=K.guidePart)try{l.putImageData(K.guidePart.imgData1,
+K.guidePart.x1,K.guidePart.y1),l.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),l.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(I){}var T=K.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=L.guideClr;l.setLineDash([2]);if(n){var P=D.y+T.y+N-this.graph.container.scrollTop;var q=0;var u=P+D.height/2;var J=N/2;var G=P+D.height;var H=0;var g=l.getImageData(q,P-1,N,3);t(q,P,N,P);P--;var p=l.getImageData(J,u-1,N,3);t(J,u,N,u);u--;var C=l.getImageData(H,
+G-1,N,3);t(H,G,N,G);G--}else P=0,q=D.x+T.x+N-this.graph.container.scrollLeft,u=N/2,J=q+D.width/2,G=0,H=q+D.width,g=l.getImageData(q-1,P,3,N),t(q,P,q,N),q--,p=l.getImageData(J-1,u,3,N),t(J,u,J,N),J--,C=l.getImageData(H-1,G,3,N),t(H,G,H,N),H--;if(null==K.guidePart||K.guidePart.x1!=q||K.guidePart.y1!=P)K.guidePart={imgData1:g,x1:q,y1:P,imgData2:p,x2:J,y2:u,imgData3:C,x3:H,y3:G}}catch(I){}}else T=K.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+function(){var D=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{l.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),l.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),l.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(A){}return D}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(b,l){var p=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return p};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,l,!0);this.hRuler=new mxRuler(b,l,!1,!0);l=mxUtils.bind(this,function(d){var x=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
+function mxDualRuler(b,k){var n=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return n};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,k,!0);this.hRuler=new mxRuler(b,k,!1,!0);k=mxUtils.bind(this,function(d){var x=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
function(z){x=null!=b.currentMenu;mxEvent.consume(z)}),null,mxUtils.bind(this,function(z){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(z)||mxEvent.isPopupTrigger(z))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(z)||!x){var y=new mxPopupMenu(mxUtils.bind(this,function(K,L){b.menus.addMenuItems(K,["points","inches","millimeters","meters"],L)}));y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,
-function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);b.resetCurrentMenu();y.destroy()});var F=mxEvent.getClientX(z),M=mxEvent.getClientY(z);y.popup(F,M,null,z);b.setCurrentMenu(y,d)}mxEvent.consume(z)}}))});l(this.hRuler.container);l(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var l=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=l){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var p=mxFreehand.prototype.MILD_SMOOTHING,d=null,x=[],z,y=[],F,M=!1,K=!0,L=!0,c=!0,f=!0,k=[],m=!1,t=!1,v=!1,A="default",E={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},D=!0;this.setClosedPath=function(u){M=u};this.setAutoClose=function(u){K=u};this.setAutoInsert=
-function(u){L=u};this.setAutoScroll=function(u){c=u};this.setOpenFill=function(u){f=u};this.setStopClickEnabled=function(u){t=u};this.setSelectInserted=function(u){v=u};this.setSmoothing=function(u){p=u};this.getSmoothing=function(){return p};this.setPerfectFreehandMode=function(u){D=u};this.isPerfectFreehandMode=function(){return D};this.setBrushSize=function(u){E.size=u};this.getBrushSize=function(){return E.size};var B=function(u){m=u;b.getRubberband().setEnabled(!u);b.graphHandler.setSelectEnabled(!u);
-b.graphHandler.setMoveEnabled(!u);b.container.style.cursor=u?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){B(!0)};this.isDrawing=function(){return m};var S=mxUtils.bind(this,function(u){if(d){var J=F.length,G=t&&0<y.length&&null!=F&&2>F.length;G||y.push.apply(y,F);F=[];y.push(null);x.push(d);d=null;(G||L)&&this.stopDrawing();L&&(!G||2<=J)&&this.startDrawing();mxEvent.consume(u)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(u){var J=null!=
-A?A:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=J||u||(J=b.shapeForegroundColor);return J};this.setStrokeColor=function(u){A=u};this.createStyle=function(u){var J=";fillColor=none;";D&&(J=";lineShape=1;");J+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+u+J};this.stopDrawing=function(){if(0<x.length){if(D){for(var u=[],J=0;J<y.length;J++)null!=y[J]&&u.push([y[J].x,
-y[J].y]);u=PerfectFreehand.getStroke(u,E);y=[];for(J=0;J<u.length;J++)y.push({x:u[J][0],y:u[J][1]});y.push(null)}u=y[0].x;var G=y[0].x,H=y[0].y,g=y[0].y;for(J=1;J<y.length;J++)null!=y[J]&&(u=Math.max(u,y[J].x),G=Math.min(G,y[J].x),H=Math.max(H,y[J].y),g=Math.min(g,y[J].y));u-=G;H-=g;if(0<u&&0<H){var n=100/u,C=100/H;y.map(function(U){if(null==U)return U;U.x=(U.x-G)*n;U.y=(U.y-g)*C;return U});var I='<shape strokewidth="inherit"><foreground>',N=0;for(J=0;J<y.length;J++){var O=y[J];if(null==O){O=!1;N=
-y[N];var Q=y[J-1];!M&&K&&(O=N.x-Q.x,Q=N.y-Q.y,O=Math.sqrt(O*O+Q*Q)<=b.tolerance);if(M||O)I+='<line x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>';I+="</path>"+(f||M||O?"<fillstroke/>":"<stroke/>");N=J+1}else I=J==N?I+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):I+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}I+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=this.createStyle("stencil("+Graph.compress(I)+")");I=b.view.scale;N=b.view.translate;
-J=new mxCell("",new mxGeometry(G/I-N.x,g/I-N.y,u/I,H/I),J);J.vertex=1;b.model.beginUpdate();try{J=b.addCell(J),b.fireEvent(new mxEventObject("cellsInserted","cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}v&&b.setSelectionCells([J])}}for(J=0;J<x.length;J++)x[J].parentNode.removeChild(x[J]);d=null;x=[];y=[]}B(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,J){u=J.getProperty("eventName");J=J.getProperty("event");u==mxEvent.MOUSE_MOVE&&
-m&&(null!=J.sourceState&&J.sourceState.setCursor("crosshair"),J.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(u,J){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u=J.getEvent(),m&&!mxEvent.isPopupTrigger(u)&&!mxEvent.isMiddleMouseButton(u)&&!mxEvent.isMultiTouchEvent(u))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var H=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");
-d.setAttribute("fill",D?H:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",H);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(H=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",H=H.split(" ").map(function(g){return parseFloat(g)*G}).join(" "),d.setAttribute("stroke-dasharray",H));k=[];u=T(u);P(u);z="M"+u.x+" "+u.y;y.push(u);F=[];d.setAttribute("d",D?PerfectFreehand.getSvgPathFromStroke([[u.x,u.y]],E):z);l.appendChild(d);J.consume()}}),
-mouseMove:mxUtils.bind(this,function(u,J){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=J.getEvent();u=T(u);P(u);var G=q(0);if(G)if(y.push(G),D){var H=[];for(G=0;G<y.length;G++)H.push([y[G].x,y[G].y]);F=[];for(var g=2;g<k.length;g+=2)G=q(g),H.push([G.x,G.y]),F.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(H,E))}else{z+=" L"+G.x+" "+G.y;H="";F=[];for(g=2;g<k.length;g+=2)G=q(g),H+=" L"+G.x+" "+G.y,F.push(G);d.setAttribute("d",z+H)}c&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(u.x-
-G.x,u.y-G.y)).grow(20)));J.consume()}}),mouseUp:mxUtils.bind(this,function(u,J){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(S(J.getEvent()),J.consume())})});var T=function(u){return mxUtils.convertPoint(b.container,mxEvent.getClientX(u),mxEvent.getClientY(u))},P=function(u){for(k.push(u);k.length>p;)k.shift()},q=function(u){var J=k.length;if(1===J%2||J>=p){var G=0,H=0,g,n=0;for(g=u;g<J;g++)n++,u=k[g],G+=u.x,H+=u.y;return{x:G/n,y:H/n}}return null}}}
-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,l,p,d,x){this.id=b;this.email=l;this.displayName=p;this.pictureUrl=d;this.locale=x};DrawioComment=function(b,l,p,d,x,z,y){this.file=b;this.id=l;this.content=p;this.modifiedDate=d;this.createdDate=x;this.isResolved=z;this.user=y;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,l,p,d,x){l()};DrawioComment.prototype.editComment=function(b,l,p){l()};DrawioComment.prototype.deleteComment=function(b,l){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);b.resetCurrentMenu();y.destroy()});var F=mxEvent.getClientX(z),N=mxEvent.getClientY(z);y.popup(F,N,null,z);b.setCurrentMenu(y,d)}mxEvent.consume(z)}}))});k(this.hRuler.container);k(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var k=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=k){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var n=mxFreehand.prototype.MILD_SMOOTHING,d=null,x=[],z,y=[],F,N=!1,K=!0,L=!0,c=!0,f=!0,l=[],m=!1,t=!1,v=!1,B="default",E={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},D=!0;this.setClosedPath=function(u){N=u};this.setAutoClose=function(u){K=u};this.setAutoInsert=
+function(u){L=u};this.setAutoScroll=function(u){c=u};this.setOpenFill=function(u){f=u};this.setStopClickEnabled=function(u){t=u};this.setSelectInserted=function(u){v=u};this.setSmoothing=function(u){n=u};this.getSmoothing=function(){return n};this.setPerfectFreehandMode=function(u){D=u};this.isPerfectFreehandMode=function(){return D};this.setBrushSize=function(u){E.size=u};this.getBrushSize=function(){return E.size};var A=function(u){m=u;b.getRubberband().setEnabled(!u);b.graphHandler.setSelectEnabled(!u);
+b.graphHandler.setMoveEnabled(!u);u?b.container.classList.add("geFreehandMode"):b.container.classList.remove("geFreehandMode");b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return m};var S=mxUtils.bind(this,function(u){if(d){var J=F.length,G=t&&0<y.length&&null!=F&&2>F.length;G||y.push.apply(y,F);F=[];y.push(null);x.push(d);d=null;(G||L)&&this.stopDrawing();L&&(!G||2<=J)&&this.startDrawing();mxEvent.consume(u)}}),R=new mxCell;
+R.edge=!0;this.getStrokeColor=function(u){var J=null!=B?B:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=J||u||(J=b.shapeForegroundColor);return J};this.setStrokeColor=function(u){B=u};this.createStyle=function(u){var J=";fillColor=none;";D&&(J=";lineShape=1;");J+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+u+J};this.stopDrawing=function(){if(0<x.length){if(D){for(var u=
+[],J=0;J<y.length;J++)null!=y[J]&&u.push([y[J].x,y[J].y]);u=PerfectFreehand.getStroke(u,E);y=[];for(J=0;J<u.length;J++)y.push({x:u[J][0],y:u[J][1]});y.push(null)}u=y[0].x;var G=y[0].x,H=y[0].y,g=y[0].y;for(J=1;J<y.length;J++)null!=y[J]&&(u=Math.max(u,y[J].x),G=Math.min(G,y[J].x),H=Math.max(H,y[J].y),g=Math.min(g,y[J].y));u-=G;H-=g;if(0<u&&0<H){var p=100/u,C=100/H;y.map(function(U){if(null==U)return U;U.x=(U.x-G)*p;U.y=(U.y-g)*C;return U});var I='<shape strokewidth="inherit"><foreground>',M=0;for(J=
+0;J<y.length;J++){var O=y[J];if(null==O){O=!1;M=y[M];var Q=y[J-1];!N&&K&&(O=M.x-Q.x,Q=M.y-Q.y,O=Math.sqrt(O*O+Q*Q)<=b.tolerance);if(N||O)I+='<line x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>';I+="</path>"+(f||N||O?"<fillstroke/>":"<stroke/>");M=J+1}else I=J==M?I+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):I+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}I+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=this.createStyle("stencil("+
+Graph.compress(I)+")");I=b.view.scale;M=b.view.translate;J=new mxCell("",new mxGeometry(G/I-M.x,g/I-M.y,u/I,H/I),J);J.vertex=1;b.model.beginUpdate();try{J=b.addCell(J),b.fireEvent(new mxEventObject("cellsInserted","cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}v&&b.setSelectionCells([J])}}for(J=0;J<x.length;J++)x[J].parentNode.removeChild(x[J]);d=null;x=[];y=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,J){m&&J.getProperty("event").consume()}));
+b.addMouseListener({mouseDown:mxUtils.bind(this,function(u,J){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u=J.getEvent(),m&&!mxEvent.isPopupTrigger(u)&&!mxEvent.isMiddleMouseButton(u)&&!mxEvent.isMultiTouchEvent(u))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var H=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",D?H:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",
+H);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(H=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",H=H.split(" ").map(function(g){return parseFloat(g)*G}).join(" "),d.setAttribute("stroke-dasharray",H));l=[];u=T(u);P(u);z="M"+u.x+" "+u.y;y.push(u);F=[];d.setAttribute("d",D?PerfectFreehand.getSvgPathFromStroke([[u.x,u.y]],E):z);k.appendChild(d);J.consume()}}),mouseMove:mxUtils.bind(this,function(u,J){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=
+J.getEvent();u=T(u);P(u);var G=q(0);if(G)if(y.push(G),D){var H=[];for(G=0;G<y.length;G++)H.push([y[G].x,y[G].y]);F=[];for(var g=2;g<l.length;g+=2)G=q(g),H.push([G.x,G.y]),F.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(H,E))}else{z+=" L"+G.x+" "+G.y;H="";F=[];for(g=2;g<l.length;g+=2)G=q(g),H+=" L"+G.x+" "+G.y,F.push(G);d.setAttribute("d",z+H)}c&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(u.x-G.x,u.y-G.y)).grow(20)));J.consume()}}),mouseUp:mxUtils.bind(this,function(u,
+J){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(S(J.getEvent()),J.consume())})});var T=function(u){return mxUtils.convertPoint(b.container,mxEvent.getClientX(u),mxEvent.getClientY(u))},P=function(u){for(l.push(u);l.length>n;)l.shift()},q=function(u){var J=l.length;if(1===J%2||J>=n){var G=0,H=0,g,p=0;for(g=u;g<J;g++)p++,u=l[g],G+=u.x,H+=u.y;return{x:G/p,y:H/p}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;
+mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,k,n,d,x){this.id=b;this.email=k;this.displayName=n;this.pictureUrl=d;this.locale=x};DrawioComment=function(b,k,n,d,x,z,y){this.file=b;this.id=k;this.content=n;this.modifiedDate=d;this.createdDate=x;this.isResolved=z;this.user=y;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,k,n,d,x){k()};DrawioComment.prototype.editComment=function(b,k,n){k()};DrawioComment.prototype.deleteComment=function(b,k){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function u(f){if(f&&null!=LucidImporter.imgSrcRepl){var p=LucidImporter.imgSrcRepl.attMap;if(p[f])f=p[f];else{p=LucidImporter.imgSrcRepl.imgRepl;for(var n=0;n<p.length;n++){var e=p[n];f=f.replace(e.searchVal,e.replVal)}LucidImporter.hasExtImgs=!0}}return f}function A(f){gb="";try{if(f){var p=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(p=LucidImporter.advImpConfig.fontMapping[f]);if(p){for(var n in p)gb+=n+"="+p[n]+";";return p.fontFamily?"font-family: "+p.fontFamily:
diff --git a/src/main/webapp/js/sanitizer/purify.min.js b/src/main/webapp/js/sanitizer/purify.min.js
index 3bc845738..1dd0360a2 100644
--- a/src/main/webapp/js/sanitizer/purify.min.js
+++ b/src/main/webapp/js/sanitizer/purify.min.js
@@ -1,2 +1,3 @@
-/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...M,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Ie=!1,Me=!0,ke=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,M),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...I]),yt=w({},[...M,...k]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Ie&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!Me&&S(/\/>/i,m)){At(a,e);continue}ke&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),s||(s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const u=w(Array.prototype.forEach),m=w(Array.prototype.lastIndexOf),p=w(Array.prototype.pop),f=w(Array.prototype.push),d=w(Array.prototype.splice),h=w(String.prototype.toLowerCase),g=w(String.prototype.toString),T=w(String.prototype.match),y=w(String.prototype.replace),E=w(String.prototype.indexOf),A=w(String.prototype.trim),_=w(Object.prototype.hasOwnProperty),b=w(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function R(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function D(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function C(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=D(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=C(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=o(e)}return function(){return null}}const O=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),x=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:W});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.3.0",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:w,Element:D,NodeFilter:B,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Y,trustedTypes:j}=n,q=D.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:be}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const we=R({},[...O,...x,...L,...I,...U]);let Re=null;const De=R({},[...z,...P,...F,...H]);let Ce=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Oe=null;const xe=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,ke=!0,Ie=!1,Me=!0,Ue=!1,ze=!0,Pe=!1,Fe=!1,He=!1,Be=!1,Ge=!1,We=!1,Ye=!0,je=!1,Xe=!0,qe=!1,$e={},Ke=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=R({},["audio","video","img","source","image","track"]);let Qe=null;const et=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let rt=ot,it=!1,at=null;const lt=R({},[tt,nt,ot],g);let ct=R({},["mi","mo","mn","ms","mtext"]),st=R({},["annotation-xml"]);const ut=R({},["title","style","font","a","script"]);let mt=null;const pt=["application/xhtml+xml","text/html"];let ft=null,dt=null;const ht=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),mt=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===mt?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ft):we,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ft):De,at=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):lt,Qe=_(e,"ADD_URI_SAFE_ATTR")?R(C(et),e.ADD_URI_SAFE_ATTR,ft):et,Ze=_(e,"ADD_DATA_URI_TAGS")?R(C(Je),e.ADD_DATA_URI_TAGS,ft):Je,Ke=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ft):Ve,ve=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ft):C({}),Oe=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ft):C({}),$e=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ge=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Xe=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,rt=e.NAMESPACE||ot,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(ke=!1),Ge&&(Be=!0),$e&&(Ne=R({},U),Re=[],!0===$e.html&&(R(Ne,O),R(Re,z)),!0===$e.svg&&(R(Ne,x),R(Re,P),R(Re,H)),!0===$e.svgFilters&&(R(Ne,L),R(Re,P),R(Re,H)),!0===$e.mathMl&&(R(Ne,I),R(Re,F),R(Re,H))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?xe.tagCheck=e.ADD_TAGS:(Ne===we&&(Ne=C(Ne)),R(Ne,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?xe.attributeCheck=e.ADD_ATTR:(Re===De&&(Re=C(Re)),R(Re,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&R(Qe,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.FORBID_CONTENTS,ft)),Xe&&(Ne["#text"]=!0),Pe&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),dt=e}},yt=R({},[...x,...L,...k]),Et=R({},[...I,...M]),At=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},_t=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Ge)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(rt===ot)try{t=(new Y).parseFromString(o,mt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(rt,"template",null);try{t.documentElement.innerHTML=it?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===ot?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},wt=function(e){return"function"==typeof w&&e instanceof w};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,dt)}))}const Dt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return At(e),!0;const n=ft(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),ze&&e.hasChildNodes()&&!wt(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return At(e),!0;if(e.nodeType===ee)return At(e),!0;if(ze&&e.nodeType===te&&b(/<[/\w]/g,e.data))return At(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(n))&&(!Ne[n]||ve[n])){if(!ve[n]&&vt(n)){if(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Xe&&!Ke[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return At(e),!0}return e instanceof D&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===ot?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===ot?"math"===n:t.namespaceURI===nt?"math"===n&&st[o]:Boolean(Et[n]):e.namespaceURI===ot?!(t.namespaceURI===nt&&!st[o])&&!(t.namespaceURI===tt&&!ct[o])&&!Et[n]&&(ut[n]||!yt[n]):!("application/xhtml+xml"!==mt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(At(e),!0)},Ct=function(e,t,n){if(Ye&&("id"===t||"name"===t)&&(n in r||n in ht))return!1;if(ke&&!Oe[t]&&b(ye,t));else if(Le&&b(Ee,t));else if(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e));else if(!Re[t]||Oe[t]){if(!(vt(e)&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&b(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Qe[t]);else if(b(Se,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ze[e]){if(Ie&&!b(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&T(e,be)},Ot=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ft(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!je||"id"!==s&&"name"!==s||(_t(a,e),f="user-content-"+f),ze&&b(/((--!?|])>)|<\/(style|title|textarea)/i,f)){_t(a,e);continue}if("attributename"===s&&T(f,"href")){_t(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(a,e);continue}if(!Me&&b(/\/>/i,f)){_t(a,e);continue}Ue&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=ft(e.nodeName);if(Ct(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Nt(e)?At(e):p(o.removed)}catch(t){_t(a,e)}}else _t(a,e)}Rt(de.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),Dt(n),Ot(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!wt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Fe||Tt(t),o.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=ft(e.nodeName);if(!Ne[t]||ve[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=bt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Be&&!Ue&&!Pe&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=bt(e),!n)return Be?null:We?ce:""}n&&He&&At(n.firstChild);const c=St(qe?e:n);for(;i=c.nextNode();)Dt(i),Ot(i),i.content instanceof s&&xt(i.content);if(qe)return e;if(Be){if(Ge)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ue&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},o.clearConfig=function(){dt=null,Fe=!1},o.isValidAttribute=function(e,t,n){dt||Tt({});const o=ft(e),r=ft(t);return Ct(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+//# sourceMappingURL=purify.min.js.map
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 6f9562c72..908cf2c45 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -2,8 +2,9 @@ window.PROXY_URL=window.PROXY_URL||"https://viewer.diagrams.net/proxy";window.ST
window.mxImageBasePath=window.mxImageBasePath||"https://viewer.diagrams.net/mxgraph/images";window.mxBasePath=window.mxBasePath||"https://viewer.diagrams.net/mxgraph/";window.mxLoadStylesheets=window.mxLoadStylesheets||!1;
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...M,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Ie=!1,Me=!0,ke=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,M),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...I]),yt=w({},[...M,...k]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Ie&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!Me&&S(/\/>/i,m)){At(a,e);continue}ke&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),s||(s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const u=w(Array.prototype.forEach),m=w(Array.prototype.lastIndexOf),p=w(Array.prototype.pop),f=w(Array.prototype.push),d=w(Array.prototype.splice),h=w(String.prototype.toLowerCase),g=w(String.prototype.toString),T=w(String.prototype.match),y=w(String.prototype.replace),E=w(String.prototype.indexOf),A=w(String.prototype.trim),_=w(Object.prototype.hasOwnProperty),b=w(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function R(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function D(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function C(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=D(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=C(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=o(e)}return function(){return null}}const O=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),x=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:W});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.3.0",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:w,Element:D,NodeFilter:B,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Y,trustedTypes:j}=n,q=D.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:be}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const we=R({},[...O,...x,...L,...I,...U]);let Re=null;const De=R({},[...z,...P,...F,...H]);let Ce=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Oe=null;const xe=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,ke=!0,Ie=!1,Me=!0,Ue=!1,ze=!0,Pe=!1,Fe=!1,He=!1,Be=!1,Ge=!1,We=!1,Ye=!0,je=!1,Xe=!0,qe=!1,$e={},Ke=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=R({},["audio","video","img","source","image","track"]);let Qe=null;const et=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let rt=ot,it=!1,at=null;const lt=R({},[tt,nt,ot],g);let ct=R({},["mi","mo","mn","ms","mtext"]),st=R({},["annotation-xml"]);const ut=R({},["title","style","font","a","script"]);let mt=null;const pt=["application/xhtml+xml","text/html"];let ft=null,dt=null;const ht=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),mt=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===mt?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ft):we,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ft):De,at=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):lt,Qe=_(e,"ADD_URI_SAFE_ATTR")?R(C(et),e.ADD_URI_SAFE_ATTR,ft):et,Ze=_(e,"ADD_DATA_URI_TAGS")?R(C(Je),e.ADD_DATA_URI_TAGS,ft):Je,Ke=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ft):Ve,ve=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ft):C({}),Oe=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ft):C({}),$e=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ge=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Xe=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,rt=e.NAMESPACE||ot,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(ke=!1),Ge&&(Be=!0),$e&&(Ne=R({},U),Re=[],!0===$e.html&&(R(Ne,O),R(Re,z)),!0===$e.svg&&(R(Ne,x),R(Re,P),R(Re,H)),!0===$e.svgFilters&&(R(Ne,L),R(Re,P),R(Re,H)),!0===$e.mathMl&&(R(Ne,I),R(Re,F),R(Re,H))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?xe.tagCheck=e.ADD_TAGS:(Ne===we&&(Ne=C(Ne)),R(Ne,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?xe.attributeCheck=e.ADD_ATTR:(Re===De&&(Re=C(Re)),R(Re,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&R(Qe,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.FORBID_CONTENTS,ft)),Xe&&(Ne["#text"]=!0),Pe&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),dt=e}},yt=R({},[...x,...L,...k]),Et=R({},[...I,...M]),At=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},_t=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Ge)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(rt===ot)try{t=(new Y).parseFromString(o,mt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(rt,"template",null);try{t.documentElement.innerHTML=it?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===ot?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},wt=function(e){return"function"==typeof w&&e instanceof w};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,dt)}))}const Dt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return At(e),!0;const n=ft(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),ze&&e.hasChildNodes()&&!wt(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return At(e),!0;if(e.nodeType===ee)return At(e),!0;if(ze&&e.nodeType===te&&b(/<[/\w]/g,e.data))return At(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(n))&&(!Ne[n]||ve[n])){if(!ve[n]&&vt(n)){if(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Xe&&!Ke[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return At(e),!0}return e instanceof D&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===ot?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===ot?"math"===n:t.namespaceURI===nt?"math"===n&&st[o]:Boolean(Et[n]):e.namespaceURI===ot?!(t.namespaceURI===nt&&!st[o])&&!(t.namespaceURI===tt&&!ct[o])&&!Et[n]&&(ut[n]||!yt[n]):!("application/xhtml+xml"!==mt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(At(e),!0)},Ct=function(e,t,n){if(Ye&&("id"===t||"name"===t)&&(n in r||n in ht))return!1;if(ke&&!Oe[t]&&b(ye,t));else if(Le&&b(Ee,t));else if(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e));else if(!Re[t]||Oe[t]){if(!(vt(e)&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&b(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Qe[t]);else if(b(Se,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ze[e]){if(Ie&&!b(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&T(e,be)},Ot=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ft(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!je||"id"!==s&&"name"!==s||(_t(a,e),f="user-content-"+f),ze&&b(/((--!?|])>)|<\/(style|title|textarea)/i,f)){_t(a,e);continue}if("attributename"===s&&T(f,"href")){_t(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(a,e);continue}if(!Me&&b(/\/>/i,f)){_t(a,e);continue}Ue&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=ft(e.nodeName);if(Ct(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Nt(e)?At(e):p(o.removed)}catch(t){_t(a,e)}}else _t(a,e)}Rt(de.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),Dt(n),Ot(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!wt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Fe||Tt(t),o.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=ft(e.nodeName);if(!Ne[t]||ve[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=bt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Be&&!Ue&&!Pe&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=bt(e),!n)return Be?null:We?ce:""}n&&He&&At(n.firstChild);const c=St(qe?e:n);for(;i=c.nextNode();)Dt(i),Ot(i),i.content instanceof s&&xt(i.content);if(qe)return e;if(Be){if(Ge)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ue&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},o.clearConfig=function(){dt=null,Fe=!1},o.isValidAttribute=function(e,t,n){dt||Tt({});const o=ft(e),r=ft(t);return Ct(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+//# sourceMappingURL=purify.min.js.map
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,i=30,r=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);var _=new Array(60);e(_);var f=new Array(512);e(f);var u=new Array(256);e(u);var c=new Array(29);e(c);var w,m,b,g=new Array(i);function p(t,e,a,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(g);var k=function(t){return t<256?f[t]:f[256+(t>>>7)]},y=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},z=function(t,e,a){x(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,i,s=new Array(16),o=0;for(n=1;n<=r;n++)o=o+a[n-1]<<1,s[n]=o;for(i=0;i<=e;i++){var l=t[2*i+1];0!==l&&(t[2*i]=A(s[l]++,l))}},R=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Z=function(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var i=2*e,r=2*a;return t[i]<t[r]||t[i]===t[r]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],i=a<<1;i<=t.heap_len&&(i<t.heap_len&&S(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!S(e,n,t.heap[i],t.depth));)t.heap[a]=t.heap[i],a=i,i<<=1;t.heap[a]=n},D=function(t,e,n){var i,r,l,h,d=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+d++],i+=(255&t.pending_buf[t.sym_buf+d++])<<8,r=t.pending_buf[t.sym_buf+d++],0===i?z(t,r,e):(l=u[r],z(t,l+a+1,e),0!==(h=s[l])&&(r-=c[l],x(t,r,h)),i--,l=k(i),z(t,l,n),0!==(h=o[l])&&(i-=g[l],x(t,i,h)))}while(d<t.sym_next);z(t,256,e)},T=function(t,e){var a,n,i,s=e.dyn_tree,o=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.elems,d=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==s[2*a]?(t.heap[++t.heap_len]=d=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=d<2?++d:0)]=1,t.depth[i]=0,t.opt_len--,l&&(t.static_len-=o[2*i+1]);for(e.max_code=d,a=t.heap_len>>1;a>=1;a--)U(t,s,a);i=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*i]=s[2*a]+s[2*n],t.depth[i]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=i,t.heap[1]=i++,U(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,i,s,o,l,h=e.dyn_tree,d=e.max_code,_=e.stat_desc.static_tree,f=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,w=e.stat_desc.max_length,m=0;for(s=0;s<=r;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=h[2*h[2*(n=t.heap[a])+1]+1]+1)>w&&(s=w,m++),h[2*n+1]=s,n>d||(t.bl_count[s]++,o=0,n>=c&&(o=u[n-c]),l=h[2*n],t.opt_len+=l*(s+o),f&&(t.static_len+=l*(_[2*n+1]+o)));if(0!==m){do{for(s=w-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[w]--,m-=2}while(m>0);for(s=w;0!==s;s--)for(n=t.bl_count[s];0!==n;)(i=t.heap[--a])>d||(h[2*i+1]!==s&&(t.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(t,e),E(s,d,t.bl_count)},O=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)i=s,s=e[2*(n+1)+1],++o<l&&i===s||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==r&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4))},I=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),n=0;n<=a;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(o<h)do{z(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==r&&(z(t,i,t.bl_tree),o--),z(t,16,t.bl_tree),x(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),x(t,o-3,3)):(z(t,18,t.bl_tree),x(t,o-11,7));o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4)}},F=!1,L=function(t,e,a,n){x(t,0+(n?1:0),3),Z(t),y(t,a),y(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a},N=function(t,e,n,i){var r,s,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),T(t,t.l_desc),T(t,t.d_desc),o=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=n+5,n+4<=r&&-1!==e?L(t,e,n,i):4===t.strategy||s===r?(x(t,2+(i?1:0),3),D(t,d,_)):(x(t,4+(i?1:0),3),function(t,e,a,n){var i;for(x(t,e-257,5),x(t,a-1,5),x(t,n-4,4),i=0;i<n;i++)x(t,t.bl_tree[2*h[i]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),D(t,t.dyn_ltree,t.dyn_dtree)),R(t),i&&Z(t)},B={_tr_init:function(t){F||(!function(){var t,e,a,h,v,k=new Array(16);for(a=0,h=0;h<28;h++)for(c[h]=a,t=0;t<1<<s[h];t++)u[a++]=h;for(u[a-1]=h,v=0,h=0;h<16;h++)for(g[h]=v,t=0;t<1<<o[h];t++)f[v++]=h;for(v>>=7;h<i;h++)for(g[h]=v<<7,t=0;t<1<<o[h]-7;t++)f[256+v++]=h;for(e=0;e<=r;e++)k[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,k[8]++;for(;t<=255;)d[2*t+1]=9,t++,k[9]++;for(;t<=279;)d[2*t+1]=7,t++,k[7]++;for(;t<=287;)d[2*t+1]=8,t++,k[8]++;for(E(d,287,k),t=0;t<i;t++)_[2*t+1]=5,_[2*t]=A(t,5);w=new p(d,s,257,n,r),m=new p(_,o,0,i,r),b=new p(new Array(0),l,0,19,7)}(),F=!0),t.l_desc=new v(t.dyn_ltree,w),t.d_desc=new v(t.dyn_dtree,m),t.bl_desc=new v(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,R(t)},_tr_stored_block:L,_tr_flush_block:N,_tr_tally:function(t,e,n){return t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(u[n]+a+1)]++,t.dyn_dtree[2*k(e)]++),t.sym_next===t.sym_end},_tr_align:function(t){x(t,2,3),z(t,256,d),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var i=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{r=r+(i=i+e[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0},M=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),H=function(t,e,a,n){var i=M,r=n+a;t^=-1;for(var s=n;s<r;s++)t=t>>>8^i[255&(t^e[s])];return-1^t},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,Y=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,it=K.Z_BUF_ERROR,rt=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,ot=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,ht=K.Z_FIXED,dt=K.Z_DEFAULT_STRATEGY,_t=K.Z_UNKNOWN,ft=K.Z_DEFLATED,ut=258,ct=262,wt=42,mt=113,bt=666,gt=function(t,e){return t.msg=j[e],e},pt=function(t){return 2*t-(t>4?9:0)},vt=function(t){for(var e=t.length;--e>=0;)t[e]=0},kt=function(t){var e,a,n,i=t.w_size;n=e=t.hash_size;do{a=t.head[--n],t.head[n]=a>=i?a-i:0}while(--e);n=e=i;do{a=t.prev[--n],t.prev[n]=a>=i?a-i:0}while(--e)},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},xt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},At=function(t,e){t.pending_buf[t.pending++]=e},Et=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Rt=function(t,e,a,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),a),1===t.state.wrap?t.adler=C(t.adler,e,i,a):2===t.state.wrap&&(t.adler=H(t.adler,e,i,a)),t.next_in+=i,t.total_in+=i,i)},Zt=function(t,e){var a,n,i=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ut,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<f);if(n=ut-(f-r),r=f-ut,n>s){if(t.match_start=e,s=n,n>=o)break;u=h[r+s-1],c=h[r+s]}}}while((e=_[e&d])>l&&0!=--i);return s<=t.lookahead?s:t.lookahead},St=function(t){var e,a,n,i=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=i+(i-ct)&&(t.window.set(t.window.subarray(i,i+i-a),0),t.match_start-=i,t.strstart-=i,t.block_start-=i,t.insert>t.strstart&&(t.insert=t.strstart),kt(t),a+=i),0===t.strm.avail_in)break;if(e=Rt(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=e,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=yt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){var a,n,i,r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,o=t.strm.avail_in;do{if(a=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,a>(n=t.strstart-t.block_start)+t.strm.avail_in&&(a=n+t.strm.avail_in),a>i&&(a=i),a<r&&(0===a&&e!==V||e===q||a!==n+t.strm.avail_in))break;s=e===V&&a===n+t.strm.avail_in?1:0,Y(t,0,0,s),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),n&&(n>a&&(n=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,a-=n),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===s);return(o-=t.strm.avail_in)&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==q&&e!==V&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Rt(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,r=(i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i)>t.w_size?t.w_size:i,((n=t.strstart-t.block_start)>=r||(n||e===V)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(a=n>i?i:n,s=e===V&&0===t.strm.avail_in&&a===n?1:0,Y(t,t.block_start,a,s),t.block_start+=a,xt(t.strm)),s?3:1)},Dt=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2},Tt=function(t,e){for(var a,n,i;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,e,a,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=i}var It=[new Ot(0,0,0,0,Ut),new Ot(4,4,8,4,Dt),new Ot(4,5,16,8,Dt),new Ot(4,6,32,32,Dt),new Ot(4,4,16,16,Tt),new Ot(8,16,32,32,Tt),new Ot(8,16,128,128,Tt),new Ot(8,32,128,256,Tt),new Ot(32,128,258,1024,Tt),new Ot(32,258,258,4096,Tt)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Lt=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==wt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==bt?1:0},Nt=function(t){if(Lt(t))return gt(t,at);t.total_in=t.total_out=0,t.data_type=_t;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?wt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,P(e),tt},Bt=function(t){var e,a=Nt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,vt(e.head),e.max_lazy_match=It[e.level].max_lazy,e.good_match=It[e.level].good_length,e.nice_match=It[e.level].nice_length,e.max_chain_length=It[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ct=function(t,e,a,n,i,r){if(!t)return at;var s=1;if(e===rt&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||a!==ft||n<8||n>15||e<0||e>9||r<0||r>ht||8===n&&1!==s)return gt(t,at);8===n&&(n=9);var o=new Ft;return t.state=o,o.strm=t,o.status=wt,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=r,o.method=a,Bt(t)},Mt={deflateInit:function(t,e){return Ct(t,e,ft,15,8,dt)},deflateInit2:Ct,deflateReset:Bt,deflateResetKeep:Nt,deflateSetHeader:function(t,e){return Lt(t)||2!==t.state.wrap?at:(t.state.gzhead=e,tt)},deflate:function(t,e){if(Lt(t)||e>$||e<0)return t?gt(t,at):at;var a=t.state;if(!t.output||0!==t.avail_in&&!t.input||a.status===bt&&e!==V)return gt(t,0===t.avail_out?it:at);var n=a.last_flush;if(a.last_flush=e,0!==a.pending){if(xt(t),0===t.avail_out)return a.last_flush=-1,tt}else if(0===t.avail_in&&pt(e)<=pt(n)&&e!==V)return gt(t,it);if(a.status===bt&&0!==t.avail_in)return gt(t,it);if(a.status===wt&&0===a.wrap&&(a.status=mt),a.status===wt){var i=ft+(a.w_bits-8<<4)<<8;if(i|=(a.strategy>=ot||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(i|=32),Et(a,i+=31-i%31),0!==a.strstart&&(Et(a,t.adler>>>16),Et(a,65535&t.adler)),t.adler=1,a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(57===a.status)if(t.adler=0,At(a,31),At(a,139),At(a,8),a.gzhead)At(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),At(a,255&a.gzhead.time),At(a,a.gzhead.time>>8&255),At(a,a.gzhead.time>>16&255),At(a,a.gzhead.time>>24&255),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(At(a,255&a.gzhead.extra.length),At(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=H(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(At(a,0),At(a,0),At(a,0),At(a,0),At(a,0),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,3),a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;if(69===a.status){if(a.gzhead.extra){for(var r=a.pending,s=(65535&a.gzhead.extra.length)-a.gzindex;a.pending+s>a.pending_buf_size;){var o=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+o),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex+=o,xt(t),0!==a.pending)return a.last_flush=-1,tt;r=0,s-=o}var l=new Uint8Array(a.gzhead.extra);a.pending_buf.set(l.subarray(a.gzindex,a.gzindex+s),a.pending),a.pending+=s,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){var h,d=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),xt(t),0!==a.pending)return a.last_flush=-1,tt;d=0}h=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,At(a,h)}while(0!==h);a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){var _,f=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f)),xt(t),0!==a.pending)return a.last_flush=-1,tt;f=0}_=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,At(a,_)}while(0!==_);a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(xt(t),0!==a.pending))return a.last_flush=-1,tt;At(a,255&t.adler),At(a,t.adler>>8&255),t.adler=0}if(a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(0!==t.avail_in||0!==a.lookahead||e!==q&&a.status!==bt){var u=0===a.level?Ut(a,e):a.strategy===ot?function(t,e){for(var a;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):a.strategy===lt?function(t,e){for(var a,n,i,r,s=t.window;;){if(t.lookahead<=ut){if(St(t),t.lookahead<=ut&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){r=t.strstart+ut;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<r);t.match_length=ut-(r-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):It[a.level].func(a,e);if(3!==u&&4!==u||(a.status=bt),1===u||3===u)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===u&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(vt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et)},deflateEnd:function(t){if(Lt(t))return at;var e=t.state.status;return t.state=null,e===mt?gt(t,nt):tt},deflateSetDictionary:function(t,e){var a=e.length;if(Lt(t))return at;var n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==wt||n.lookahead)return at;if(1===i&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var r=new Uint8Array(n.w_size);r.set(e.subarray(a-n.w_size,a),0),e=r,a=n.w_size}var s=t.avail_in,o=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,St(n);n.lookahead>=3;){var h=n.strstart,d=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[h+3-1]),n.prev[h&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=h,h++}while(--d);n.strstart=h,n.lookahead=2,St(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=l,t.avail_in=s,n.wrap=i,tt},deflateInfo:"pako deflate (from Nodeca project)"};function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}var jt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Kt=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!==Ht(a))throw new TypeError(a+"must be non-object");for(var n in a)jt(a,n)&&(t[n]=a[n])}}return t},Pt=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var i=new Uint8Array(e),r=0,s=0,o=t.length;r<o;r++){var l=t[r];i.set(l,s),s+=l.length}return i},Yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Yt=!1}for(var Gt=new Uint8Array(256),Xt=0;Xt<256;Xt++)Gt[Xt]=Xt>=252?6:Xt>=248?5:Xt>=240?4:Xt>=224?3:Xt>=192?2:1;Gt[254]=Gt[254]=1;var Wt=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,i,r,s=t.length,o=0;for(i=0;i<s;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),r=0,i=0;r<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),a<128?e[r++]=a:a<2048?(e[r++]=192|a>>>6,e[r++]=128|63&a):a<65536?(e[r++]=224|a>>>12,e[r++]=128|a>>>6&63,e[r++]=128|63&a):(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63,e[r++]=128|a>>>6&63,e[r++]=128|63&a);return e},qt=function(t,e){var a,n,i=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));var r=new Array(2*i);for(n=0,a=0;a<i;){var s=t[a++];if(s<128)r[n++]=s;else{var o=Gt[s];if(o>4)r[n++]=65533,a+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&a<i;)s=s<<6|63&t[a++],o--;o>1?r[n++]=65533:s<65536?r[n++]=s:(s-=65536,r[n++]=55296|s>>10&1023,r[n++]=56320|1023&s)}}}return function(t,e){if(e<65534&&t.subarray&&Yt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}(r,n)},Jt=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Gt[t[a]]>e?a:e};var Qt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Vt=Object.prototype.toString,$t=K.Z_NO_FLUSH,te=K.Z_SYNC_FLUSH,ee=K.Z_FULL_FLUSH,ae=K.Z_FINISH,ne=K.Z_OK,ie=K.Z_STREAM_END,re=K.Z_DEFAULT_COMPRESSION,se=K.Z_DEFAULT_STRATEGY,oe=K.Z_DEFLATED;function le(t){this.options=Kt({level:re,method:oe,chunkSize:16384,windowBits:15,memLevel:8,strategy:se},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ne)throw new Error(j[a]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Wt(e.dictionary):"[object ArrayBuffer]"===Vt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=Mt.deflateSetDictionary(this.strm,n))!==ne)throw new Error(j[a]);this._dict_set=!0}}function he(t,e){var a=new le(e);if(a.push(t,!0),a.err)throw a.msg||j[a.err];return a.result}le.prototype.push=function(t,e){var a,n,i=this.strm,r=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ae:$t,"string"==typeof t?i.input=Wt(t):"[object ArrayBuffer]"===Vt.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(r),i.next_out=0,i.avail_out=r),(n===te||n===ee)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((a=Mt.deflate(i,n))===ie)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),a=Mt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ne;if(0!==i.avail_out){if(n>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},le.prototype.onData=function(t){this.chunks.push(t)},le.prototype.onEnd=function(t){t===ne&&(this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var de={Deflate:le,deflate:he,deflateRaw:function(t,e){return(e=e||{}).raw=!0,he(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,he(t,e)},constants:K},_e=16209,fe=function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=t.state;a=t.next_in,z=t.input,n=a+(t.avail_in-5),i=t.next_out,A=t.output,r=i-(e-t.avail_out),s=i+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,u=E.bits,c=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=c[f&m];e:for(;;){if(f>>>=p=g>>>24,u-=p,0===(p=g>>>16&255))A[i++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=c[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=_e;break t}v=65535&g,(p&=15)&&(u<p&&(f+=z[a++]<<u,u+=8),v+=f&(1<<p)-1,f>>>=p,u-=p),u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=w[f&b];a:for(;;){if(f>>>=p=g>>>24,u-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=_e;break t}if(k=65535&g,u<(p&=15)&&(f+=z[a++]<<u,(u+=8)<p&&(f+=z[a++]<<u,u+=8)),(k+=f&(1<<p)-1)>o){t.msg="invalid distance too far back",E.mode=_e;break t}if(f>>>=p,u-=p,k>(p=i-r)){if((p=k-p)>h&&E.sane){t.msg="invalid distance too far back",E.mode=_e;break t}if(y=0,x=_,0===d){if(y+=l-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}else if(d<p){if(y+=l+d-p,(p-=d)<v){v-=p;do{A[i++]=_[y++]}while(--p);if(y=0,d<v){v-=p=d;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}}else if(y+=d-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}for(;v>2;)A[i++]=x[y++],A[i++]=x[y++],A[i++]=x[y++],v-=3;v&&(A[i++]=x[y++],v>1&&(A[i++]=x[y++]))}else{y=i-k;do{A[i++]=A[y++],A[i++]=A[y++],A[i++]=A[y++],v-=3}while(v>2);v&&(A[i++]=A[y++],v>1&&(A[i++]=A[y++]))}break}}break}}while(a<n&&i<s);a-=v=u>>3,f&=(1<<(u-=v<<3))-1,t.next_in=a,t.next_out=i,t.avail_in=a<n?n-a+5:5-(a-n),t.avail_out=i<s?s-i+257:257-(i-s),E.hold=f,E.bits=u},ue=15,ce=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),we=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),me=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),be=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),ge=function(t,e,a,n,i,r,s,o){var l,h,d,_,f,u,c,w,m,b=o.bits,g=0,p=0,v=0,k=0,y=0,x=0,z=0,A=0,E=0,R=0,Z=null,S=new Uint16Array(16),U=new Uint16Array(16),D=null;for(g=0;g<=ue;g++)S[g]=0;for(p=0;p<n;p++)S[e[a+p]]++;for(y=b,k=ue;k>=1&&0===S[k];k--);if(y>k&&(y=k),0===k)return i[r++]=20971520,i[r++]=20971520,o.bits=1,0;for(v=1;v<k&&0===S[v];v++);for(y<v&&(y=v),A=1,g=1;g<=ue;g++)if(A<<=1,(A-=S[g])<0)return-1;if(A>0&&(0===t||1!==k))return-1;for(U[1]=0,g=1;g<ue;g++)U[g+1]=U[g]+S[g];for(p=0;p<n;p++)0!==e[a+p]&&(s[U[e[a+p]]++]=p);if(0===t?(Z=D=s,u=20):1===t?(Z=ce,D=we,u=257):(Z=me,D=be,u=0),R=0,p=0,g=v,f=r,x=y,z=0,d=-1,_=(E=1<<y)-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){c=g-z,s[p]+1<u?(w=0,m=s[p]):s[p]>=u?(w=D[s[p]-u],m=Z[s[p]-u]):(w=96,m=0),l=1<<g-z,v=h=1<<x;do{i[f+(R>>z)+(h-=l)]=c<<24|w<<16|m|0}while(0!==h);for(l=1<<g-1;R&l;)l>>=1;if(0!==l?(R&=l-1,R+=l):R=0,p++,0==--S[g]){if(g===k)break;g=e[a+s[p]]}if(g>y&&(R&_)!==d){for(0===z&&(z=y),f+=v,A=1<<(x=g-z);x+z<k&&!((A-=S[x+z])<=0);)x++,A<<=1;if(E+=1<<x,1===t&&E>852||2===t&&E>592)return 1;i[d=R&_]=y<<24|x<<16|f-r|0}}return 0!==R&&(i[f+R]=g-z<<24|64<<16|0),o.bits=y,0},pe=K.Z_FINISH,ve=K.Z_BLOCK,ke=K.Z_TREES,ye=K.Z_OK,xe=K.Z_STREAM_END,ze=K.Z_NEED_DICT,Ae=K.Z_STREAM_ERROR,Ee=K.Z_DATA_ERROR,Re=K.Z_MEM_ERROR,Ze=K.Z_BUF_ERROR,Se=K.Z_DEFLATED,Ue=16180,De=16190,Te=16191,Oe=16192,Ie=16194,Fe=16199,Le=16200,Ne=16206,Be=16209,Ce=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function Me(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var He,je,Ke=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode<Ue||e.mode>16211?1:0},Pe=function(t){if(Ke(t))return Ae;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ue,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ye},Ye=function(t){if(Ke(t))return Ae;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Pe(t)},Ge=function(t,e){var a;if(Ke(t))return Ae;var n=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Ae:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=a,n.wbits=e,Ye(t))},Xe=function(t,e){if(!t)return Ae;var a=new Me;t.state=a,a.strm=t,a.window=null,a.mode=Ue;var n=Ge(t,e);return n!==ye&&(t.state=null),n},We=!0,qe=function(t){if(We){He=new Int32Array(512),je=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ge(1,t.lens,0,288,He,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ge(2,t.lens,0,32,je,0,t.work,{bits:5}),We=!1}t.lencode=He,t.lenbits=9,t.distcode=je,t.distbits=5},Je=function(t,e,a,n){var i,r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),n>=r.wsize?(r.window.set(e.subarray(a-r.wsize,a),0),r.wnext=0,r.whave=r.wsize):((i=r.wsize-r.wnext)>n&&(i=n),r.window.set(e.subarray(a-n,a-n+i),r.wnext),(n-=i)?(r.window.set(e.subarray(a-n,a),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},Qe={inflateReset:Ye,inflateReset2:Ge,inflateResetKeep:Pe,inflateInit:function(t){return Xe(t,15)},inflateInit2:Xe,inflate:function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=0,R=new Uint8Array(4),Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ke(t)||!t.output||!t.input&&0!==t.avail_in)return Ae;(a=t.state).mode===Te&&(a.mode=Oe),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=ye;t:for(;;)switch(a.mode){case Ue:if(0===a.wrap){a.mode=Oe;break}for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=Be;break}if((15&h)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=Be;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:Te,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=Be;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,a.check=H(a.check,R,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&((u=a.length)>o&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(n.subarray(r,r+u),y)),512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=Be;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=Te;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}t.adler=a.check=Ce(h),h=0,d=0,a.mode=De;case De:if(0===a.havedict)return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,ze;t.adler=a.check=1,a.mode=Te;case Te:if(e===ve||e===ke)break t;case Oe:if(a.last){h>>>=7&d,d-=7&d,a.mode=Ne;break}for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}switch(a.last=1&h,d-=1,3&(h>>>=1)){case 0:a.mode=16193;break;case 1:if(qe(a),a.mode=Fe,e===ke){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=Be}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Be;break}if(a.length=65535&h,h=0,d=0,a.mode=Ie,e===ke)break t;case Ie:a.mode=16195;case 16195:if(u=a.length){if(u>o&&(u=o),u>l&&(u=l),0===u)break t;i.set(n.subarray(r,r+u),s),o-=u,r+=u,l-=u,s+=u,a.length-=u;break}a.mode=Te;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Be;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=ge(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=Be;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(A=m+2;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=Be;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===g){for(A=m+3;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=3+(7&(h>>>=m)),h>>>=3,d-=3}else{for(A=m+7;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=11+(127&(h>>>=m)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Be;break}for(;u--;)a.lens[a.have++]=y}}if(a.mode===Be)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Be;break}if(a.lenbits=9,z={bits:a.lenbits},x=ge(1,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=Be;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=ge(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=Be;break}if(a.mode=Fe,e===ke)break t;case Fe:a.mode=Le;case Le:if(o>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,fe(t,f),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,a.mode===Te&&(a.back=-1);break}for(a.back=0;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,v=b,k=g;b=(E=a.lencode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=Te;break}if(64&b){t.msg="invalid literal/length code",a.mode=Be;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;b=(E=a.distcode[h&(1<<a.distbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(0==(240&b)){for(p=m,v=b,k=g;b=(E=a.distcode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=Be;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Be;break}a.mode=16204;case 16204:if(0===l)break t;if(u=f-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Be;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),w=a.window}else w=i,c=s-a.offset,u=a.length;u>l&&(u=l),l-=u,a.length-=u;do{i[s++]=w[c++]}while(--u);0===a.length&&(a.mode=Le);break;case 16205:if(0===l)break t;i[s++]=a.length,l--,a.mode=Le;break;case Ne:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=n[r++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,s-f):C(a.check,i,f,s-f)),f=l,4&a.wrap&&(a.flags?h:Ce(h))!==a.check){t.msg="incorrect data check",a.mode=Be;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=Be;break}h=0,d=0}a.mode=16208;case 16208:x=xe;break t;case Be:x=Ee;break t;case 16210:return Re;default:return Ae}return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<Be&&(a.mode<Ne||e!==pe))&&Je(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,t.next_out-f):C(a.check,i,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(a.mode===Te?128:0)+(a.mode===Fe||a.mode===Ie?256:0),(0===_&&0===f||e===pe)&&x===ye&&(x=Ze),x},inflateEnd:function(t){if(Ke(t))return Ae;var e=t.state;return e.window&&(e.window=null),t.state=null,ye},inflateGetHeader:function(t,e){if(Ke(t))return Ae;var a=t.state;return 0==(2&a.wrap)?Ae:(a.head=e,e.done=!1,ye)},inflateSetDictionary:function(t,e){var a,n=e.length;return Ke(t)||0!==(a=t.state).wrap&&a.mode!==De?Ae:a.mode===De&&C(1,e,n,0)!==a.check?Ee:Je(t,e,n,n)?(a.mode=16210,Re):(a.havedict=1,ye)},inflateInfo:"pako inflate (from Nodeca project)"};var Ve=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},$e=Object.prototype.toString,ta=K.Z_NO_FLUSH,ea=K.Z_FINISH,aa=K.Z_OK,na=K.Z_STREAM_END,ia=K.Z_NEED_DICT,ra=K.Z_STREAM_ERROR,sa=K.Z_DATA_ERROR,oa=K.Z_MEM_ERROR;function la(t){this.options=Kt({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Qe.inflateInit2(this.strm,e.windowBits);if(a!==aa)throw new Error(j[a]);if(this.header=new Ve,Qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Wt(e.dictionary):"[object ArrayBuffer]"===$e.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Qe.inflateSetDictionary(this.strm,e.dictionary))!==aa))throw new Error(j[a])}function ha(t,e){var a=new la(e);if(a.push(t),a.err)throw a.msg||j[a.err];return a.result}la.prototype.push=function(t,e){var a,n,i,r=this.strm,s=this.options.chunkSize,o=this.options.dictionary;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ea:ta,"[object ArrayBuffer]"===$e.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(a=Qe.inflate(r,n))===ia&&o&&((a=Qe.inflateSetDictionary(r,o))===aa?a=Qe.inflate(r,n):a===sa&&(a=ia));r.avail_in>0&&a===na&&r.state.wrap>0&&0!==t[r.next_in];)Qe.inflateReset(r),a=Qe.inflate(r,n);switch(a){case ra:case sa:case ia:case oa:return this.onEnd(a),this.ended=!0,!1}if(i=r.avail_out,r.next_out&&(0===r.avail_out||a===na))if("string"===this.options.to){var l=Jt(r.output,r.next_out),h=r.next_out-l,d=qt(r.output,l);r.next_out=h,r.avail_out=s-h,h&&r.output.set(r.output.subarray(l,l+h),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==aa||0!==i){if(a===na)return a=Qe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},la.prototype.onData=function(t){this.chunks.push(t)},la.prototype.onEnd=function(t){t===aa&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var da={Inflate:la,inflate:ha,inflateRaw:function(t,e){return(e=e||{}).raw=!0,ha(t,e)},ungzip:ha,constants:K},_a=de.Deflate,fa=de.deflate,ua=de.deflateRaw,ca=de.gzip,wa=da.Inflate,ma=da.inflate,ba=da.inflateRaw,ga=da.ungzip,pa=K,va={Deflate:_a,deflate:fa,deflateRaw:ua,gzip:ca,Inflate:wa,inflate:ma,inflateRaw:ba,ungzip:ga,constants:pa};t.Deflate=_a,t.Inflate=wa,t.constants=pa,t.default=va,t.deflate=fa,t.deflateRaw=ua,t.gzip=ca,t.inflate=ma,t.inflateRaw=ba,t.ungzip=ga,Object.defineProperty(t,"__esModule",{value:!0})}));
var rough=function(){"use strict";function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&"number"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;e<t.length-1;e++){const s=t[e],n=t[e+1];if(s[1]!==n[1]){const t=Math.min(s[1],n[1]);h.push({ymin:t,ymax:Math.max(s[1],n[1]),x:t===s[1]?s[0]:n[0],islope:(n[0]-s[0])/(n[1]-s[1])})}}if(h.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;e<h.length&&!(h[e].ymin>i);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t<r.length;t+=2){const e=t+1;if(e>=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:"fillSketch",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t<c;t++){const a=p+l+t*n,r=u-h+2*Math.random()*h,i=a-h+2*Math.random()*h,c=this.helper.ellipse(r,i,o,o,e);s.push(...c.ops)}}return{type:"fillSketch",ops:s}}}class c{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){const s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,n=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach((t=>{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t<r;t++){const a=t*(s+n),h=a+s,r=[c[0]+a*Math.cos(u)+i*Math.cos(u),c[1]+a*Math.sin(u)+i*Math.sin(u)],l=[c[0]+h*Math.cos(u)+i*Math.cos(u),c[1]+h*Math.sin(u)+i*Math.sin(u)];o.push(...this.helper.doubleLineOps(r[0],r[1],l[0],l[1],e))}})),o}}class l{constructor(t){this.helper=t}fillPolygons(t,e){const s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,o=e.zigzagOffset<0?s:e.zigzagOffset,a=n(t,e=Object.assign({},e,{hachureGap:s+o}));return{type:"fillSketch",ops:this.zigzagLines(a,o,e)}}zigzagLines(t,e,s){const n=[];return t.forEach((t=>{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;t<h;t++){const o=2*t*e,a=2*(t+1)*e,h=Math.sqrt(2*Math.pow(e,2)),i=[r[0]+o*Math.cos(c),r[1]+o*Math.sin(c)],l=[r[0]+a*Math.cos(c),r[1]+a*Math.sin(c)],u=[i[0]+h*Math.cos(c+Math.PI/4),i[1]+h*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(i[0],i[1],u[0],u[1],s),...this.helper.doubleLineOps(u[0],u[1],l[0],l[1],s))}})),n}}const u={};class p{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f=0,d=1,g=2,M={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function k(t,e){return t.type===e}function b(t){const e=[],s=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:f,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:d,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:g,text:""},e}(t);let n="BOD",o=0,a=s[o];for(;!k(a,g);){let h=0;const r=[];if("BOD"===n){if("M"!==a.text&&"m"!==a.text)return b("M0,0"+t);o++,h=M[a.text],n=a.text}else k(a,d)?h=M[n]:(o++,h=M[a.text],n=a.text);if(!(o+h<s.length))throw new Error("Path data ended short");for(let t=o;t<o+h;t++){const e=s[t];if(!k(e,d))throw new Error("Param not a number: "+n+","+e.text);r[r.length]=+e.text}if("number"!=typeof M[n])throw new Error("Bad segment: "+n);{const t={key:n,data:r};e.push(t),o+=h,a=s[o],"M"===n&&(n="L"),"m"===n&&(n="l")}}return e}function y(t){let e=0,s=0,n=0,o=0;const a=[];for(const{key:h,data:r}of t)switch(h){case"M":a.push({key:"M",data:[...r]}),[e,s]=r,[n,o]=r;break;case"m":e+=r[0],s+=r[1],a.push({key:"M",data:[e,s]}),n=e,o=s;break;case"L":a.push({key:"L",data:[...r]}),[e,s]=r;break;case"l":e+=r[0],s+=r[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...r]}),e=r[4],s=r[5];break;case"c":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...r]}),e=r[2],s=r[3];break;case"q":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...r]}),e=r[5],s=r[6];break;case"a":e+=r[5],s+=r[6],a.push({key:"A",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case"H":a.push({key:"H",data:[...r]}),e=r[0];break;case"h":e+=r[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...r]}),s=r[0];break;case"v":s+=r[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...r]}),e=r[2],s=r[3];break;case"s":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...r]}),e=r[0],s=r[1];break;case"t":e+=r[0],s+=r[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s="",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case"M":e.push({key:"M",data:[...l]}),[n,o]=l,[a,h]=l;break;case"C":e.push({key:"C",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case"L":e.push({key:"L",data:[...l]}),[n,o]=l;break;case"H":n=l[0],e.push({key:"L",data:[n,o]});break;case"V":o=l[0],e.push({key:"L",data:[n,o]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:"C",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case"T":{const[t,a]=l;let h=0,c=0;"Q"===s||"T"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:"C",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case"Q":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:"C",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case"A":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:"C",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:"C",data:t})})),n=i,o=c}break}case"Z":e.push({key:"Z",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),t<g&&(f=Math.PI-f),s<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),i&&f>d&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e<p.length;e+=3){const s=w(p[e][0],p[e][1],l),n=w(p[e+1][0],p[e+1][1],l),o=w(p[e+2][0],p[e+2][1],l);t.push([s[0],s[1],n[0],n[1],o[0],o[1]])}return t}}const P={randOffset:function(t,e){return G(t,e)},randOffsetWithRange:function(t,e,s){return E(t,e,s)},ellipse:function(t,e,s,n,o){const a=T(s,n,o);return D(t,e,o,a).opset},doubleLineOps:function(t,e,s,n,o){return $(t,e,s,n,o,!0)}};function v(t,e,s,n,o){return{type:"path",ops:$(t,e,s,n,o)}}function S(t,e,s){const n=(t||[]).length;if(n>2){const o=[];for(let e=0;e<n-1;e++)o.push(...$(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&o.push(...$(t[n-1][0],t[n-1][1],t[0][0],t[0][1],s)),{type:"path",ops:o}}return 2===n?v(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function O(t,e,s,n,o){return function(t,e){return S(t,!0,e)}([[t,e],[t+s,e],[t+s,e+n],[t,e+n]],o)}function L(t,e){if(t.length){const s="number"==typeof t[0][0]?[t]:t,n=j(s[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:j(s[0],1.5*(1+.22*e.roughness),z(e));for(let t=1;t<s.length;t++){const a=s[t];if(a.length){const t=j(a,1*(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:j(a,1.5*(1+.22*e.roughness),z(e));for(const e of t)"move"!==e.op&&n.push(e);for(const t of s)"move"!==t.op&&o.push(t)}}return{type:"path",ops:n.concat(o)}}return{type:"path",ops:[]}}function T(t,e,s){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/o;let h=Math.abs(t/2),r=Math.abs(e/2);const i=1-s.curveFitting;return h+=G(h*i,s),r+=G(r*i,s),{increment:a,rx:h,ry:r}}function D(t,e,s,n){const[o,a]=F(n.increment,t,e,n.rx,n.ry,1,n.increment*E(.1,E(.4,1,s),s),s);let h=q(o,null,s);if(!s.disableMultiStroke&&0!==s.roughness){const[o]=F(n.increment,t,e,n.rx,n.ry,1.5,0,s),a=q(o,null,s);h=h.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function A(t,e,s,n,o,a,h,r,i){const c=t,l=e;let u=Math.abs(s/2),p=Math.abs(n/2);u+=G(.01*u,i),p+=G(.01*p,i);let f=o,d=a;for(;f<0;)f+=2*Math.PI,d+=2*Math.PI;d-f>2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:"path",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case"M":a=[h[0],h[1]],o=[h[0],h[1]];break;case"L":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case"C":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case"Z":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:"move",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a<o;a++)s.push({op:"lineTo",data:[n[a][0]+G(t,e),n[a][1]+G(t,e)]})}}return{type:"fillPath",ops:s}}function C(t,e){return function(t,e){let s=t.fillStyle||"hachure";if(!u[s])switch(s){case"zigzag":u[s]||(u[s]=new h(e));break;case"cross-hatch":u[s]||(u[s]=new r(e));break;case"dots":u[s]||(u[s]=new i(e));break;case"dashed":u[s]||(u[s]=new c(e));break;case"zigzag-line":u[s]||(u[s]=new l(e));break;default:s="hachure",u[s]||(u[s]=new o(e))}return u[s]}(e,P).fillPolygons(t,e)}function z(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function W(t){return t.randomizer||(t.randomizer=new p(t.seed||0)),t.randomizer.next()}function E(t,e,s,n=1){return s.roughness*n*(W(s)*(e-t)+t)}function G(t,e,s=1){return E(-t,t,e,s)}function $(t,e,s,n,o,a=!1){const h=a?o.disableMultiStrokeFill:o.disableMultiStroke,r=R(t,e,s,n,o,!0,!1);if(h)return r;const i=R(t,e,s,n,o,!0,!0);return r.concat(i)}function R(t,e,s,n,o,a,h){const r=Math.pow(t-s,2)+Math.pow(e-n,2),i=Math.sqrt(r);let c=1;c=i<200?1:i>500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:"move",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:"move",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:"bcurveTo",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o<t.length;o++)n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]),o===t.length-1&&n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]);return q(n,null,s)}function q(t,e,s){const n=t.length,o=[];if(n>3){const a=[],h=1-s.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;e++){const s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(h*t[e+1][0]-h*t[e-1][0])/6,s[1]+(h*t[e+1][1]-h*t[e-1][1])/6],a[2]=[t[e+1][0]+(h*t[e][0]-h*t[e+2][0])/6,t[e+1][1]+(h*t[e][1]-h*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=s.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+G(t,s),e[1]+G(t,s)]})}}else 3===n?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return o}function F(t,e,s,n,o,a,h,r){const i=[],c=[];if(0===r.roughness){t/=4,c.push([e+n*Math.cos(-t),s+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+n*Math.cos(a),s+o*Math.sin(a)];i.push(t),c.push(t)}c.push([e+n*Math.cos(0),s+o*Math.sin(0)]),c.push([e+n*Math.cos(t),s+o*Math.sin(t)])}else{const l=G(.5,r)-Math.PI/2;c.push([G(a,r)+e+.9*n*Math.cos(l-t),G(a,r)+s+.9*o*Math.sin(l-t)]);const u=2*Math.PI+l-.01;for(let h=l;h<u;h+=t){const t=[G(a,r)+e+n*Math.cos(h),G(a,r)+s+o*Math.sin(h)];i.push(t),c.push(t)}c.push([G(a,r)+e+n*Math.cos(l+2*Math.PI+.5*h),G(a,r)+s+o*Math.sin(l+2*Math.PI+.5*h)]),c.push([G(a,r)+e+.98*n*Math.cos(l+h),G(a,r)+s+.98*o*Math.sin(l+h)]),c.push([G(a,r)+e+.9*n*Math.cos(l+.5*h),G(a,r)+s+.9*o*Math.sin(l+.5*h)])}return[c,i]}function V(t,e,s,n,o,a,h,r,i){const c=a+G(.1,i),l=[];l.push([G(r,i)+e+.9*n*Math.cos(c-t),G(r,i)+s+.9*o*Math.sin(c-t)]);for(let a=c;a<=h;a+=t)l.push([G(r,i)+e+n*Math.cos(a),G(r,i)+s+o*Math.sin(a)]);return l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),q(l,null,i)}function Z(t,e,s,n,o,a,h,r){const i=[],c=[r.maxRandomnessOffset||1,(r.maxRandomnessOffset||1)+.3];let l=[0,0];const u=r.disableMultiStroke?1:2,p=r.preserveVertices;for(let f=0;f<u;f++)0===f?i.push({op:"move",data:[h[0],h[1]]}):i.push({op:"move",data:[h[0]+(p?0:G(c[0],r)),h[1]+(p?0:G(c[0],r))]}),l=p?[o,a]:[o+G(c[f],r),a+G(c[f],r)],i.push({op:"bcurveTo",data:[t+G(c[f],r),e+G(c[f],r),s+G(c[f],r),n+G(c[f],r),l[0],l[1]]});return i}function Q(t){return[...t]}function H(t,e=0){const s=t.length;if(s<3)throw new Error("A curve must have at least three points.");const n=[];if(3===s)n.push(Q(t[0]),Q(t[1]),Q(t[2]),Q(t[2]));else{const s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);const o=[],a=1-e;n.push(Q(s[0]));for(let t=1;t+2<s.length;t++){const e=s[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],o[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],o[3]=[s[t+1][0],s[t+1][1]],n.push(o[1],o[2],o[3])}}return n}function N(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function B(t,e,s){const n=N(e,s);if(0===n)return N(t,e);let o=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/n;return o=Math.max(0,Math.min(1,o)),N(t,J(e,s,o))}function J(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function K(t,e,s,n){const o=n||[];if(function(t,e){const s=t[e+0],n=t[e+1],o=t[e+2],a=t[e+3];let h=3*n[0]-2*s[0]-a[0];h*=h;let r=3*n[1]-2*s[1]-a[1];r*=r;let i=3*o[0]-2*a[0]-s[0];i*=i;let c=3*o[1]-2*a[1]-s[1];return c*=c,h<i&&(h=i),r<c&&(r=c),h+r}(t,e)<s){const s=t[e+0];if(o.length){(a=o[o.length-1],h=s,Math.sqrt(N(a,h)))>1&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;n<s-1;++n){const e=B(t[n],h,r);e>i&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s<o;s++){K(t,3*s,e,n)}return s&&s>0?X(n,0,n.length,s):n}const tt="none";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d("line",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];"solid"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d("rectangle",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if("solid"===a.fillStyle){const s=D(t,e,a,r).opset;s.type="fillPath",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d("ellipse",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape="circle",o}linearPath(t,e){const s=this._o(e);return this._d("linearPath",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if("solid"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type="fillPath",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d("arc",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if("solid"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d("curve",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&("solid"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d("polygon",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d("path",n,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=s.fill&&"transparent"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case"M":c(),h=[e[0],e[1]],a.push(h);break;case"L":i(),a.push([e[0],e[1]]);break;case"C":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case"Z":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if("solid"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d("path",n,s)}opsToPath(t,e){let s="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case"fillPath":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case"fillSketch":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===s.stroke?"transparent":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=s.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,o,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||"",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n="nonzero"){t.beginPath();for(const n of e.ops){const e="number"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt="http://www.w3.org/2000/svg";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case"path":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke",s.stroke),e.setAttribute("stroke-width",s.strokeWidth+""),e.setAttribute("fill","none"),s.strokeLineDash&&e.setAttribute("stroke-dasharray",s.strokeLineDash.join(" ").trim()),s.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${s.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",s.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,"path");return o.setAttribute("d",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute("stroke",s.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),s.fillLineDash&&o.setAttribute("stroke-dasharray",s.fillLineDash.join(" ").trim()),s.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}return{canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()}}();
@@ -29,7 +30,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -1987,78 +1988,78 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFi
Editor.prototype.createUndoManager=function(){var b=this.graph,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],C=0;C<u.length;C++)null!=b.view.getState(u[C])&&(q.push(u[C]),
y||(b.scrollCellToVisible(u[C]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,f,l,u,y,q,C,J,R,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(R?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
+function Dialog(b,f,l,u,y,q,C,J,S,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!P)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=C;this.container=y;null!=D&&this.addResizeHandler(D);
b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";
Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";
Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,f){return new mxPoint(b,f)};
-Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(D){l=mxEvent.getClientX(D);u=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,J,R);mxEvent.consume(D)}),
-J=mxUtils.bind(this,function(D){if(null!=l&&null!=u){var P=mxEvent.getClientX(D)-l,c=mxEvent.getClientY(D)-u;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),R=mxUtils.bind(this,function(D){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,J,R),mxEvent.consume(D))});mxEvent.addGestureListeners(f,C,J,R);this.container.appendChild(f)};
+Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(D){l=mxEvent.getClientX(D);u=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,J,S);mxEvent.consume(D)}),
+J=mxUtils.bind(this,function(D){if(null!=l&&null!=u){var P=mxEvent.getClientX(D)-l,c=mxEvent.getClientY(D)-u;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),S=mxUtils.bind(this,function(D){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,J,S),mxEvent.consume(D))});mxEvent.addGestureListeners(f,C,J,S);this.container.appendChild(f)};
Dialog.prototype.close=function(b,f){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,f))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,f,l,u,y,q,C,J,R,D,P){R=null!=R?R:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
+var ErrorDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof l&&(l=l.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(l);c.appendChild(f);l=document.createElement("div");l.style.marginTop="12px";l.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",l.appendChild(f),l.style.textAlign="center");null!=D&&(D=mxUtils.button(D,function(){null!=P&&P()}),D.className="geBtn",l.appendChild(D));
-var m=mxUtils.button(u,function(){R&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){R&&b.hideDialog();null!=J&&J()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};
+var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){S&&b.hideDialog();null!=J&&J()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};
PrintDialog.prototype.create=function(b){function f(m){var n=C.checked||D.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/l.pageScale;if(n){var M=C.checked?1:parseInt(P.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);H*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):
-n=!0;n=PrintDialog.createPrintPreview(l,H,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";J.appendChild(C);var R=document.createElement("span");mxUtils.write(R," "+mxResources.get("fitPage"));
-J.appendChild(R);mxEvent.addListener(R,"click",function(m){C.checked=!C.checked;D.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){D.checked=!C.checked});q.appendChild(J);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(D);R=document.createElement("span");mxUtils.write(R," "+mxResources.get("posterPrint")+":");J.appendChild(R);mxEvent.addListener(R,
+n=!0;n=PrintDialog.createPrintPreview(l,H,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";J.appendChild(C);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
+J.appendChild(S);mxEvent.addListener(S,"click",function(m){C.checked=!C.checked;D.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){D.checked=!C.checked});q.appendChild(J);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(D);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");J.appendChild(S);mxEvent.addListener(S,
"click",function(m){D.checked=!D.checked;C.checked=!D.checked;mxEvent.consume(m)});q.appendChild(J);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(P);mxUtils.write(J," "+mxResources.get("pages")+" (max)");q.appendChild(J);y.appendChild(q);mxEvent.addListener(D,"change",
function(){D.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");C.checked=!D.checked});q=q.cloneNode(!1);J=document.createElement("td");mxUtils.write(J,mxResources.get("pageScale")+":");q.appendChild(J);J=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";J.appendChild(c);q.appendChild(J);y.appendChild(q);q=document.createElement("tr");J=document.createElement("td");J.colSpan=2;
-J.style.paddingTop="20px";J.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});R.className="geBtn";b.editor.cancelFirst&&J.appendChild(R);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";J.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";J.appendChild(g);b.editor.cancelFirst||
-J.appendChild(R);q.appendChild(J);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
-PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var J=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&J.apply(this,arguments)};var R=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(R.apply(this,arguments))};return f};
+J.style.paddingTop="20px";J.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&J.appendChild(S);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";J.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";J.appendChild(g);b.editor.cancelFirst||
+J.appendChild(S);q.appendChild(J);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
+PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var J=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&J.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(P.style.backgroundImage="url("+x.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(P.style.backgroundColor=g,P.style.display="inline-block")}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");
var q=document.createElement("tr");var C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";mxUtils.write(C,mxResources.get("paperSize")+":");q.appendChild(C);C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";var J=PageSetupDialog.addPageFormatPanel(C,"pagesetupdialog",l.pageFormat);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("gridSize")+":");q.appendChild(C);
-C=document.createElement("td");C.style.whiteSpace="nowrap";var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","0");R.style.width="40px";R.style.marginLeft="6px";R.value=l.getGridSize();C.appendChild(R);mxEvent.addListener(R,"change",function(){var x=parseInt(R.value);R.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");
+C=document.createElement("td");C.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=l.getGridSize();C.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");
q.appendChild(C);C=document.createElement("td");var D=document.createElement("button");D.className="geBtn";D.style.margin="0px";mxUtils.write(D,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";
P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,H,M,L){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(D,"click",n);mxEvent.addListener(P,"click",n);f();C.appendChild(P);C.appendChild(D);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");
-C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&C.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(R.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,J.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&
+C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&C.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,J.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&
(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";C.appendChild(n);b.editor.cancelFirst||C.appendChild(D);q.appendChild(C);y.appendChild(q);u.appendChild(y);this.container=u};
PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var C=document.createElement("select");C.style.position="relative";C.style.marginBottom="4px";C.style.borderRadius="4px";C.style.borderWidth="1px";C.style.borderStyle="solid";
-C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.marginLeft="4px";J.style.width="210px";J.style.height="24px";y.style.marginRight="6px";J.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));J.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";J.appendChild(q);var R=document.createElement("span");R.style.width="100px";mxUtils.write(R,
-mxResources.get("landscape"));J.appendChild(R);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
+C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.marginLeft="4px";J.style.width="210px";J.style.height="24px";y.style.marginRight="6px";J.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));J.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";J.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
+mxResources.get("landscape"));J.appendChild(S);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
"right";D.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var m=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<m.length;n++){var x=document.createElement("option");x.setAttribute("value",m[n].unit);mxUtils.write(x,m[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;D.appendChild(g);
J.style.display="none";D.style.display="none";var F={},H=PageSetupDialog.getFormats();for(n=0;n<H.length;n++)m=H[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),C.appendChild(x);var M=function(){C.value="custom";for(var K=0;K<H.length;K++){var Z=H[K];null!=Z.format&&("a4"==Z.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==Z.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),
l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==Z.format.width&&l.height==Z.format.height?(C.value=Z.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==Z.format.height&&l.height==Z.format.width&&(C.value=Z.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==
C.value?(P.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),C.value="custom",J.style.display="none",D.style.display=""):(J.style.display="",D.style.display="none")};M();b.appendChild(C);mxUtils.br(b);b.appendChild(J);b.appendChild(D);var L=function(K,Z){K=F[C.value];null!=K.format?(P.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),D.style.display=
"none",J.style.display=""):(J.style.display="none",D.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(l.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(l.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));Z||K.width==l.width&&K.height==l.height||(l=K,null!=u&&u(l))};mxEvent.addListener(f,"click",function(K){y.checked=!0;L(K);mxEvent.consume(K)});
-mxEvent.addListener(R,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",L);mxEvent.addListener(P,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
+mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",L);mxEvent.addListener(P,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;L(K,!0);mxEvent.consume(K)});L(null,!0);return{set:function(K){l=K;M(null,null,!0)},get:function(){return l},widthInput:P,heightInput:c}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,f,l,u,y,q,C,J,R,D,P){R=null!=R?R:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
-n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))R&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+var FilenameDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
+n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))S&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
y||null==C)if(null!=P?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=g.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor=
"#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(L){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),F.click());L.stopPropagation();L.preventDefault()}))}}};m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.gap="4px";m.style.whiteSpace="nowrap";m.appendChild(x);g.appendChild(m);
null==y&&null!=C||null==P||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),
f.style.width="100%",m.appendChild(f));null!=C&&g.appendChild(C);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=D&&D()});m.className="geBtn";null==J||b.isOffline()||row.appendChild(b.createHelpIcon(J));
b.editor.cancelFirst&&row.appendChild(m);mxEvent.addListener(x,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(m);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var C=f.value.lastIndexOf(".drawio.");C=0<C?C:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<C?f.value.substring(0,C+1)+q:f.value+"."+q;"createEvent"in
-document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,J=0;J<l.length;J++){var R=l[J].extension,D=null;"drawio"!=R&&(D=R,R=".drawio."+R);if(q.substring(q.length-R.length-1)=="."+R||null!=D&&q.substring(q.length-D.length-1)=="."+D){C=J;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};
+document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,J=0;J<l.length;J++){var S=l[J].extension,D=null;"drawio"!=S&&(D=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=D&&q.substring(q.length-D.length-1)=="."+D){C=J;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};
var WrapperWindow=function(b,f,l,u,y,q,C,J){J=null!=J?J:document.createElement("div");this.window=new mxWindow(f,J,l,u,y,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);C(J)};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var J=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var R=C.container.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(this.backgroundPageShape=this.createBackgroundPageShape(J),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(C.container),R.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,R),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){C.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var J=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=C.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(J),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(C.container),S.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){C.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
C.tooltipHandler&&C.tooltipHandler.isHideOnHover()&&C.tooltipHandler.hide();C.isMouseDown&&!mxEvent.isConsumed(D)&&C.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(D))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=J,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(C,J,R){var D=this.graph;C=null!=C?C:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
-10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=D.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;J=null!=J?J-this.translate.x*this.scale:0;R=null!=R?R-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,H=J%F;F=R%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
-this.scale-g+J,n)+H*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+R,n)+F*C)+"px"}C=D.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=m,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
+mxGraphView.prototype.validateBackgroundStyles=function(C,J,S){var D=this.graph;C=null!=C?C:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
+10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=D.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;J=null!=J?J-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,H=J%F;F=S%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
+this.scale-g+J,n)+H*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*C)+"px"}C=D.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=m,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
"none"==D.getAdaptiveColors()?"light":"",C.style.backgroundImage="none",C.style.backgroundColor="",D.container.style.backgroundColor=g?D.diagramBackgroundColor:""):(C.style.backgroundPosition=n,C.style.backgroundImage=m,"1"==urlParams.transparent?D.container.style.background="transparent":!g||null!=D.background&&D.background!=mxConstants.NONE?C.style.backgroundColor=P:(C.style.backgroundColor=D.diagramBackgroundColor,D.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(C,
-J){for(var R=this.graph.gridSize*this.scale*(null!=J?J:1);R<this.minGridSize;)R*=2;J=this.gridSteps*R;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*R;D.push("M 0 "+c+" L "+J+" "+c+" M "+c+" 0 L "+c+" "+J)}C=mxUtils.getLightDarkColor(C);R="color-scheme: light dark;";mxClient.IS_SF&&(R="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+R+'" width="'+J+'" height="'+J+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
+J){for(var S=this.graph.gridSize*this.scale*(null!=J?J:1);S<this.minGridSize;)S*=2;J=this.gridSteps*S;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*S;D.push("M 0 "+c+" L "+J+" "+c+" M "+c+" 0 L "+c+" "+J)}C=mxUtils.getLightDarkColor(C);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+J+'" height="'+J+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
J+'" height="'+J+'" patternUnits="userSpaceOnUse"><path d="'+D.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" opacity="0.2" stroke-width="1"/><path d="M '+J+" 0 L 0 0 0 "+J+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var R=this.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+C,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+J,D))+"px";R.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(C,J,R){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,m=this.view.getBackgroundPageBounds();
-J=m.width;R=m.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(R/n.height)-1:0,F=C?Math.ceil(J/n.width)-1:0,H=m.x+J,M=m.y+R;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+C,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+J,D))+"px";S.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,m=this.view.getBackgroundPageBounds();
+J=m.width;S=m.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=C?Math.ceil(J/n.width)-1:0,H=m.x+J,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
Math.round(m.y+(Z+1)*n.height)),new mxPoint(Math.round(H),Math.round(m.y+(Z+1)*n.height))]:[new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(M))];null!=L[Z]?(L[Z].points=ha,L[Z].redraw()):(ha=new mxPolyline(ha,this.pageBreakColor),ha.dialect=this.dialect,ha.isDashed=this.pageBreakDashed,ha.pointerEvents=!1,ha.init(this.view.backgroundPane),ha.redraw(),L[Z]=ha)}for(Z=K;Z<L.length;Z++)null!=L[Z]&&L[Z].destroy();L.splice(K,L.length-K)}});
-C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,J,R){for(var D=0;D<J.length;D++){if(this.graph.isTableCell(J[D])||this.graph.isTableRow(J[D]))return!1;if(this.graph.getModel().isVertex(J[D])){var P=this.graph.getCellGeometry(J[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(J,R){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),J=0<C.width?C.x/this.scale-this.translate.x:0,R=0<C.height?C.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
-P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,J)/c);var g=Math.floor(Math.min(0,R)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,J+C.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,R+C.height/this.scale)/D)-g)*D)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=J+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,J,R,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(C,J,R){var D=this.graph.model.getParent(C);if(J){var P=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(C)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(C))}else if(P=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(R.getEvent())||
-this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(R.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var J=this.graph.getModel(),R=J.getParent(C),D=this.graph.view.getState(R),P=this.graph.isCellSelected(C);null!=D&&(J.isVertex(R)||J.isEdge(R));){var c=this.graph.isCellSelected(R);P=P||c;if(c||!P&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=R;R=J.getParent(R)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var ba=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};y.useCssTransforms&&
+C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,J,S){for(var D=0;D<J.length;D++){if(this.graph.isTableCell(J[D])||this.graph.isTableRow(J[D]))return!1;if(this.graph.getModel().isVertex(J[D])){var P=this.graph.getCellGeometry(J[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(J,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),J=0<C.width?C.x/this.scale-this.translate.x:0,S=0<C.height?C.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
+P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,J)/c);var g=Math.floor(Math.min(0,S)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,J+C.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,S+C.height/this.scale)/D)-g)*D)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=J+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,J,S,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(C,J,S){var D=this.graph.model.getParent(C);if(J){var P=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(C)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(C))}else if(P=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||
+this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var J=this.graph.getModel(),S=J.getParent(C),D=this.graph.view.getState(S),P=this.graph.isCellSelected(C);null!=D&&(J.isVertex(S)||J.isEdge(S));){var c=this.graph.isCellSelected(S);P=P||c;if(c||!P&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=S;S=J.getParent(S)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var ba=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};y.useCssTransforms&&
(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(ba,V){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=
-function(){return!1};y.panningHandler.isForcePanningEvent=function(ba){for(var V=ba.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ba.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var J=!1,R=!1;this.setDefaultStyle=function(ba){try{y.getModel().isEdge(ba)?
-R=y.pasteEdgeStyle=!1:J=!1;var V=y.getCellStyle(ba,!1),k=[],v=[],I;for(I in V)k.push(V[I]),v.push(I);y.getModel().isEdge(ba)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[ba],"force",!0));y.getModel().isEdge(ba)?R=y.pasteEdgeStyle=!0:J=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);J=R=y.pasteEdgeStyle=
+function(){return!1};y.panningHandler.isForcePanningEvent=function(ba){for(var V=ba.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ba.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var J=!1,S=!1;this.setDefaultStyle=function(ba){try{y.getModel().isEdge(ba)?
+S=y.pasteEdgeStyle=!1:J=!1;var V=y.getCellStyle(ba,!1),k=[],v=[],I;for(I in V)k.push(V[I]),v.push(I);y.getModel().isEdge(ba)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[ba],"force",!0));y.getModel().isEdge(ba)?S=y.pasteEdgeStyle=!0:J=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);J=S=y.pasteEdgeStyle=
!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(ba,V){y.pasteCellStyles(y.includeDescendants(V.getProperty("cells")))});y.addListener("textInserted",function(ba,V){y.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(ba){null==ba&&(ba=window.event);return y.isEditing()||null!=ba&&this.isSelectionAllowed(ba)});this.container!=document.body||this.editor.chromeless&&
!this.editor.editable||(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,null!=this.tabContainer&&(this.tabContainer.onselectstart=D),mxClient.IS_IOS&&(f=function(){var ba=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=
navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{ba=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(k){}}return ba}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
@@ -2074,13 +2075,13 @@ ba=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",V);mxEvent.addList
y.fireMouseEvent;y.fireMouseEvent=function(ba,V,k){try{ba==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(v){u.handleError(v)}};var aa=y.foldCells;y.foldCells=function(ba,V,k,v,I){try{aa.apply(this,arguments)}catch(N){u.handleError(N)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(ba,V,k){this.menus.createPopupMenu(ba,V,k)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(ba){y.popupMenuHandler.hideMenu()}));
this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(ba,V){var k=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(k.push(V.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(k[k.length-1]))},0));y.pasteCellStyles(k)});var oa=null,da=null;b=mxUtils.bind(this,function(){if(null!=this.toolbar){var ba=this.getSelectionState();y.isEnabled()&&
0<ba.edges.length?(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+this.getImageForEdgeStyle(ba.style)+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+this.getImageForEdgeShape(ba.style)+")")):(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")"))}});y.selectionModel.addListener(mxEvent.CHANGE,
-b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(ba,V){ba=V.getProperty("force");(this.updateDefaultStyle||ba)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,J,R);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
+b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(ba,V){ba=V.getProperty("force");(this.updateDefaultStyle||ba)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,J,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
null!=this.toolbar.edgeStyleMenu&&(oa=this.getImageForEdgeStyle(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")")),null!=this.toolbar.edgeShapeMenu&&(da=this.getImageForEdgeShape(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")")))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var ba=y.currentVertexStyle.fontFamily||"Helvetica",V=String(y.currentVertexStyle.fontSize||"12"),k=y.getView().getState(y.getSelectionCell());
null!=k&&(ba=k.style[mxConstants.STYLE_FONTFAMILY]||ba,V=k.style[mxConstants.STYLE_FONTSIZE]||V,10<ba.length&&(ba=ba.substring(0,8)+"..."));this.toolbar.setFontName(ba);this.toolbar.setFontSize(V)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(ba,V){ba=V.getProperty("cells");V=V.getProperty("parent");null!=V&&y.getModel().isLayer(V)&&!y.isCellVisible(V)&&null!=ba&&0<ba.length&&y.getModel().setVisible(V,!0)});
Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var ba=y.getLayerForCells(y.getSelectionCells());null!=ba&&y.setDefaultParent(ba)}});this.gestureHandler=mxUtils.bind(this,function(ba){this.isHideCurrentMenuEvent(ba)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ka=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ka&&window.clearTimeout(ka);ka=window.setTimeout(mxUtils.bind(this,
function(){ka=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,f,l){function u(J,R){var D=q;q+=R;return J.substring(D,q)}function y(J){J=u(J,4);return J.charCodeAt(3)+(J.charCodeAt(2)<<8)+(J.charCodeAt(1)<<16)+(J.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,f,l){function u(J,S){var D=q;q+=S;return J.substring(D,q)}function y(J){J=u(J,4);return J.charCodeAt(3)+(J.charCodeAt(2)<<8)+(J.charCodeAt(1)<<16)+(J.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var u=b.getRubberband();null!=u&&u.cancel()}));mxEvent.addListener(b.container,
@@ -2088,34 +2089,34 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);l.updateActionStates()};b.showLinkDialog=mxUtils.bind(l,l.showLinkDialog);b.editLink=l.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,f=b.getSelectionCells(),l=this.initSelectionState(),u=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(l,f[y],f,u),u=!1)}this.updateSelectionStateForTableCells(l);if(Editor.enableCustomProperties){l.customProperties={};b=l.vertices;f=l.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],l.customProperties,0==y,l);
for(y=0;y<f.length;y++)this.findCommonProperties(f[y],l.customProperties,0==b.length&&0==y,l)}return l};
-EditorUi.prototype.findCommonProperties=function(b,f,l,u){u=mxUtils.bind(this,function(R){if(null!=R)if(l)for(var D=0;D<R.length;D++)f[R[D].name]=R[D];else for(var P in f)if(null!=P){var c=!1;for(D=0;D<R.length;D++)if(R[D].name==P&&R[D].type==f[P].type){c=!0;break}c||delete f[P]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
-q.shape.stencil&&null!=q.shape.stencil.desc){var C=q.shape.stencil,J=mxUtils.bind(this,function(R){R=C.desc.getElementsByTagName(R);for(var D=[],P=0;P<R.length;P++){var c=R[P].getAttribute("color");if(!mxUtils.isValidColor(c)){var g=R[P].getAttribute("name");g=null!=g?g:Editor.getLabelForStylename(c);var m=R[P].getAttribute("default");m=null!=m?m:C.getDefaultColorValue(R[P],y);D.push({name:c,type:"color",primary:"false"!=R[P].getAttribute("primary"),defVal:m,defaultColor:m,undefinedColor:m,dispName:g})}}return D});
-Array.prototype.push.apply(q.shape.customProperties,J("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,J("strokecolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}u(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{u(JSON.parse(b))}catch(R){}};
+EditorUi.prototype.findCommonProperties=function(b,f,l,u){u=mxUtils.bind(this,function(D){if(null!=D)if(l)for(var P=0;P<D.length;P++)f[D[P].name]=D[P];else for(var c in f)if(null!=c){var g=!1;for(P=0;P<D.length;P++)if(D[P].name==c&&D[P].type==f[c].type){g=!0;break}g||delete f[c]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
+q.shape.stencil&&null!=q.shape.stencil.desc){var C=q.shape.stencil,J=[],S=mxUtils.bind(this,function(D){D=C.desc.getElementsByTagName(D);for(var P=[],c=0;c<D.length;c++){var g=D[c].getAttribute("color");if(!mxUtils.isValidColor(g)&&!J[g]){J[g]=!0;var m=D[c].getAttribute("name");m=null!=m?m:Editor.getLabelForStylename(g);var n=D[c].getAttribute("default");n=null!=n?n:C.getDefaultColorValue(D[c],y);P.push({name:g,type:"color",primary:"false"!=D[c].getAttribute("primary"),defVal:n,defaultColor:n,undefinedColor:n,
+dispName:m})}}return P});Array.prototype.push.apply(q.shape.customProperties,S("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,S("strokecolor"));Array.prototype.push.apply(q.shape.customProperties,S("fontcolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}u(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{u(JSON.parse(b))}catch(D){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),J=null,R=1,D=1,P=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=J&&R!=J||(J=R,R=0,D++,u=l.getParent(c),c=C+D<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+D),q):null);var m=this.editor.graph.view.getState(g);
-if(g==l.getChildAt(u,q+R)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))R++;else break}P==D*R-1&&(b.mergeCell=f[0],b.colspan=R,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),J=null,S=1,D=1,P=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=J&&S!=J||(J=S,S=0,D++,u=l.getParent(c),c=C+D<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+D),q):null);var m=this.editor.graph.view.getState(g);
+if(g==l.getChildAt(u,q+S)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))S++;else break}P==D*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(J){y.clear()&&(u=!1,J=null!=J?J:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(J):this.handleError(J))}),C=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(C);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};
EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(l){null!=f?f(l):this.handleError(l)}};
-EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var J=u.getCellStyle(b[C],!1);if(null!=J)for(var R=0;R<y.length;R++)try{var D=J[y[R]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);u.setCellStyles(y[R],P.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&
+EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var J=u.getCellStyle(b[C],!1);if(null!=J)for(var S=0;S<y.length;S++)try{var D=J[y[S]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);u.setCellStyles(y[S],P.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&
"0"!=mxUtils.getValue(J,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[C])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[C],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){P=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,P.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};
EditorUi.prototype.updateSelectionStateForCell=function(b,f,l,u){l=this.editor.graph;b.cells.push(f);if(l.getModel().isVertex(f)){b.connections=0<l.model.getEdgeCount(f);b.unlocked=b.unlocked&&!l.isCellLocked(f);b.resizable=b.resizable&&l.isCellResizable(f);b.rotatable=b.rotatable&&l.isCellRotatable(f);b.movable=b.movable&&l.isCellMovable(f)&&!l.isTableRow(f)&&!l.isTableCell(f);b.swimlane=b.swimlane||l.isSwimlane(f);b.table=b.table||l.isTable(f);b.cell=b.cell||l.isTableCell(f);b.row=b.row||l.isTableRow(f);
b.vertices.push(f);var y=l.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else l.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);q=l.view.getState(f);null!=q&&(b.html=b.html&&l.isHtmlLabel(f),b.autoSize=b.autoSize||l.isAutoSizeState(q),b.glass=b.glass&&l.isGlassState(q),b.rounded=b.rounded&&l.isRoundedState(q),b.lineJumps=b.lineJumps&&l.isLineJumpState(q),b.image=b.image||l.isImageState(q),b.shadow=b.shadow&&l.isShadowState(q),b.fill=b.fill&&l.isFillState(q),b.gradient=b.fill&&l.isGradientState(q),b.stroke=b.stroke&&l.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
"image"==f,l.mergeStyle(q.style,b.style,u))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(R,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(R,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(R)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(R),mxEvent.getClientY(R));mxEvent.consume(R);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(R,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(R.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(R.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
-x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var J=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(R,D){null!=J&&window.clearTimeout(J);J=window.setTimeout(mxUtils.bind(this,function(){var P=
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(S,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(S.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
+x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var J=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J);J=window.setTimeout(mxUtils.bind(this,function(){var P=
D.getProperty("arrow"),c=D.getProperty("direction"),g=D.getProperty("event");P=P.getBoundingClientRect();var m=mxUtils.getOffset(b.container),n=b.container.scrollLeft+P.x-m.x;m=b.container.scrollTop+P.y-m.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,m,x,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(M,L,K){K(H);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(H))},
-function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(R,D){null!=J&&window.clearTimeout(J)}))}};
+function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J)}))}};
EditorUi.prototype.centerShapePicker=function(b,f,l,u,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(l-=q.width/2-10,u-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(l-=q.width/2-10,u+=f.height+6):y==mxConstants.DIRECTION_WEST?(l-=q.width+6,u-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(l+=f.width+6,u-=q.height/2-10);b.style.left=l+"px";b.style.top=u+"px"};
-EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,J,R){var D=null;this.editor.graph.freehand.isDrawing()||(J=J||null==l,D=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,J),q,C,J,R),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=D));return D};
-EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,J,R,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;R=null!=R?R:function(x){x=x[0];var F=0,H=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,H=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-H))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");
+EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,J,S){var D=null;this.editor.graph.freehand.isDrawing()||(J=J||null==l,D=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,J),q,C,J,S),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=D));return D};
+EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,J,S,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,H=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,H=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-H))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");
y=c.view.getState(l);var n=null==l||null!=y&&c.isTransparentState(y)?null:c.copyStyle(l);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");J||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var H=x.geometry;c.model.isEdge(x)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([x],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=R([L]);c.model.isEdge(L)?
+this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var H=x.geometry;c.model.isEdge(x)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([x],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=S([L]);c.model.isEdge(L)?
L.geometry.translate(K.x,K.y):(L.geometry.x=K.x,L.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);P&&c.startEditing(L);null!=m.hoverIcons&&m.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=l?[l]:c.getSelectionCells()),c.updateShapes(x,L);null!=q&&q(M);mxEvent.consume(M)}}),25,25,null,null,l),H.style.display="flex",H.style.alignItems=
"center",H.style.justifyContent="center",F.appendChild(H))});for(D=0;D<(J?Math.min(C.length,4):C.length);D++)y(C[D]);C=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<C&&(g.style.top=Math.max(c.container.scrollTop+22,f-C)+"px");C=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<C&&(g.style.left=Math.max(c.container.scrollLeft+22,b-C)+"px")}return g};
-EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,J,R){return u.createVertex(null,null,R||"",0,0,C||120,J||60,q,!1)});f=mxUtils.bind(this,function(q,C,J){q=new mxCell(J||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=
+EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,J,S){return u.createVertex(null,null,S||"",0,0,C||120,J||60,q,!1)});f=mxUtils.bind(this,function(q,C,J){q=new mxCell(J||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=
!0;return q});if(null!=b)try{b=u.cloneCell(b),u.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(u.appendFontSize(Editor.defaultTextStyle,u.vertexFontSize),60,30,"Text"));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
120,60),y("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),y("triangle;whiteSpace=wrap;html=1;",60,80),y("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),y("shape=tape;whiteSpace=wrap;html=1;",120,100),y("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),y("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",
80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];l&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),f("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",
@@ -2132,8 +2133,8 @@ EditorUi.prototype.getImageForEdgeShape=function(b){var f=Format.connectionImage
EditorUi.prototype.getImageForEdgeStyle=function(b){var f=Format.orthogonalImage.src,l=mxUtils.getValue(b,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(b,mxConstants.STYLE_NOEDGESTYLE,null)&&(l=null);"orthogonalEdgeStyle"==l&&"1"==mxUtils.getValue(b,mxConstants.STYLE_CURVED,null)?f=Format.curvedImage.src:"straight"==l||"none"==l||null==l?f=Format.straightImage.src:"entityRelationEdgeStyle"==l?f=Format.entityImage.src:"elbowEdgeStyle"==l?f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,
null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==l&&(f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,f=this.actions.get("paste"),l=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));l.setEnabled(f.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var J={},R=q.createCellLookup(C),D=q.cloneCells(C,null,J),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
-0),g=0;g<D.length;g++){P.add(c,D[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(C[g])&&null==R[mxObjectIdentity.get(P.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(J,R),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=
+EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var J={},S=q.createCellLookup(C),D=q.cloneCells(C,null,J),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
+0),g=0;g<D.length;g++){P.add(c,D[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(C[g])&&null==S[mxObjectIdentity.get(P.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(J,S),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=
null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):C=l.apply(this,arguments);b.updatePasteActionStates();return C};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,C){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var U=this.graph.getPageLayout(),Y=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*Y.width),this.scale*(this.translate.y+U.y*Y.height),this.scale*U.width*Y.width,
@@ -2144,10 +2145,10 @@ Ia=mxRectangle.fromRectangle(la);Ia.x=Ia.x/wa-ya.x;Ia.y=Ia.y/wa-ya.y;Ia.width/=w
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var C=0;q=mxUtils.bind(this,function(U,Y,fa){C++;
var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var J=Graph.sanitizeLink(y.backBtn.url);null!=J&&q(mxUtils.bind(this,function(U){window.location.href=
-J;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var R=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
+J;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(D);var P=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){D.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(D,U+1+" / "+this.pages.length);D.setAttribute("title",mxResources.get("currentPage")+
-": "+this.currentPage.getName());R.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});R.style.paddingLeft="0px";R.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",R.style.display=
-"",D.style.display="inline-block"):(P.style.display="none",R.style.display="none",D.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
+": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display=
+"",D.style.display="inline-block"):(P.style.display="none",S.style.display="none",D.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
"mouseleave",mxUtils.bind(this,function(){Y.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(U)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,x=null,F=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),
600)}),U||200)}),H=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
@@ -2193,7 +2194,7 @@ l.width-f.clientWidth,l.x-10)),l.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=M
EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,l=mxUtils.hasScrollbars(f.container),u=0,y=0;l&&(u=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(l){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();l&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-u,f.container.scrollTop=f.view.translate.y*
f.view.scale-y);f.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var C=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,C-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var C=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,R=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-R));q=Math.max(0,Math.min(q,J-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(R,D)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,
+J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-S));q=Math.max(0,Math.min(q,J-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,D)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,
"resize",u);b.window.destroy();null!=l&&l()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,l,u,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=l;this.previousFormat=this.format=u;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var l=this.previousImage;null!=l&&Graph.isPageLink(l.src)&&(l=this.ui.createImageForPageLink(l.src,this.ui.currentPage));this.ui.setBackgroundImage(l);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,
f=b.pageFormat,this.previousFormat.width!=f.width||this.previousFormat.height!=f.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=f);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=b))};
@@ -2222,17 +2223,17 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(l,100);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setOpacity(l,0);window.setTimeout(mxUtils.bind(this,function(){null!=l.parentNode&&l.parentNode.removeChild(l)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};
EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var f=document.createElement("div");f.className="geStatusDiv";f.setAttribute("title",b);f.innerText=b;return f};
EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createDiv=function(b){var f=document.createElement("div");f.className=b;return f};
-EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,J+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);J!=P()&&(R=!0,D=null)}}function q(c){y(c);C=J=null}var C=null,J=null,R=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),
-mxEvent.getClientY(c));J=P();R=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!R&&this.hsplitClickEnabled){var g=null!=D?D-l:0;D=P();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
+EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,J+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);J!=P()&&(S=!0,D=null)}}function q(c){y(c);C=J=null}var C=null,J=null,S=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),
+mxEvent.getClientY(c));J=P();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=D?D-l:0;D=P();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
EditorUi.prototype.prompt=function(b,f,l){b=new FilenameDialog(this,f,mxResources.get("apply"),function(u){l(parseFloat(u))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,f,l,u,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,l,null,null,null,null,null,null,null,null,u?l:null)}else null!=l&&l()};
-EditorUi.prototype.showError=function(b,f,l,u,y,q,C,J,R,D,P,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,J,R);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,J,R,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,J,R,D);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,f,l,u,y,q,C,J,S,D,P,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,J,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,J,S,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,J,S,D);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,f,l){var u=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){u=this.dialogs[y];break}null==u||null!=l&&l!=this.dialog.container.firstChild||(u.closing=!0,0==u.close(b,f)?delete u.closing:(delete u.closing,b=mxUtils.lastIndexOf(this.dialogs,u),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
"dialog",u)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(C){this.handleError(C)}};
-EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),J=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(R){q.cellEditor.restoreSelection(C);f(R)},function(){q.cellEditor.restoreSelection(C)},l,u,y);this.showDialog(b.container,230,J,!0,!1);b.init()};
+EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),J=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(C);f(S)},function(){q.cellEditor.restoreSelection(C)},l,u,y);this.showDialog(b.container,230,J,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,J=Math.min(C+1024,l),R=Array(J-C),D=0;C<J;++D,++C)R[D]=b[C].charCodeAt(0);y[q]=new Uint8Array(R)}return new Blob(y,{type:f})};
+EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,J=Math.min(C+1024,l),S=Array(J-C),D=0;C<J;++D,++C)S[D]=b[C].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var l=b.indexOf("&lt;mxGraphModel ");if(0<=l){var u=b.lastIndexOf("&lt;/mxGraphModel&gt;");u>l&&(f=b.substring(l,u+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(y){}return f};
EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,l=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(l=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==l||0==l.length)&&(l=b.getData("text/plain")),null!=l&&(l=Graph.zapGremlins(mxUtils.trim(l)),b=this.extractGraphModelFromHtml(l),null!=b&&(l=b))));null!=l&&this.isCompatibleString(l)&&(f=l);return f};
EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(f){this.save(f)}),null,mxUtils.bind(this,function(f){if(null!=f&&0<f.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,340,96,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
@@ -2249,24 +2250,24 @@ EditorUi.prototype.createKeyHandler=function(b){function f(c,g,m){if(!u.isSelect
F))}}finally{u.getModel().endUpdate()}}else{F=u.model.getParent(x);var H=u.getView().scale;m=null;1==u.getSelectionCount()&&u.model.isVertex(x)&&null!=u.layoutManager&&!u.isCellLocked(x)&&(m=u.layoutManager.getLayout(F));if(null!=m&&m.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?u.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&u.model.add(F,x,Math.min(u.model.getChildCount(F),g+1));else{var M=u.graphHandler;null!=M&&(null==M.first&&M.start(x,0,0,u.getMovableCells(n)),null!=M.first&&(x=
n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*H,M.currentDy+=x*H,M.checkPreview(),M.updatePreview()),null!=C&&window.clearTimeout(C),C=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/H),K=M.roundLength(M.currentDy/H);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&q.apply(this,arguments)};y.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&
-(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,J={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},R=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
+(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,J={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
g=l.actions.get(l.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=l.actions.get(l.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var m=document.getElementById("geOmniSearch");null!=m&&30<m.clientWidth&&m.focus()};if(null!=J[c.keyCode]&&!u.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(u.model.isVertex(u.getSelectionCell()))return function(){var m=
-u.connectVertex(u.getSelectionCell(),J[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return R.apply(this,
+u.connectVertex(u.getSelectionCell(),J[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return S.apply(this,
arguments)};y.bindAction=mxUtils.bind(this,function(c,g,m,n){var x=this.actions.get(m);null!=x&&(m=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,m):y.bindControlKey(c,m):n?y.bindShiftKey(c,m):y.bindKey(c,m))});var D=this,P=y.escape;y.escape=function(c){P.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){u.exitGroup()});y.bindControlShiftKey(35,function(){u.enterGroup()});y.bindShiftKey(36,function(){u.home()});y.bindKey(35,function(){u.refresh()});
y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zoomOut");y.bindAction(61,!0,"zoomIn");y.bindAction(187,!0,"zoomIn");y.bindAction(222,!0,"zoomIn");y.bindAction(173,!0,"zoomOut");y.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)y.bindAction(79,!0,"outline",!0),y.bindControlKey(36,function(){u.isEnabled()&&u.foldCells(!0)}),y.bindControlKey(35,function(){u.isEnabled()&&u.foldCells(!1)}),y.bindControlKey(13,function(){D.ctrlEnter()}),y.bindAction(8,
!1,"delete"),y.bindAction(8,!0,"deleteAll"),y.bindAction(8,!1,"deleteLabels",!0),y.bindAction(46,!1,"delete"),y.bindAction(46,!0,"deleteAll"),y.bindAction(46,!1,"deleteLabels",!0),y.bindAction(36,!1,"resetView"),y.bindAction(72,!0,"fitWindow",!0),y.bindAction(74,!0,"fitPage"),y.bindAction(74,!0,"fitTwoPages",!0),y.bindAction(48,!0,"customZoom"),y.bindAction(82,!0,"turn"),y.bindAction(82,!0,"clearDefaultStyle",!0),y.bindAction(83,!0,"save"),y.bindAction(83,!0,"saveAs",!0),y.bindAction(65,!0,"selectAll"),
y.bindAction(65,!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,
"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,
!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){u.isEnabled()&&u.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,l){var u=document.createElement("a");this.addMenuHandler(u,f,l);mxUtils.write(u,b);u.className="geItem";return u};
-EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(J){null!=l&&l(J);if(!mxEvent.isConsumed(J)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var R=new mxPopupMenu(f);R.smartSeparators=!0;R.showDisabled=!0;R.autoExpand=!0;R.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(R,arguments);this.resetCurrentMenu();y=null;R.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
-var D=mxUtils.getOffset(b);R.popup(D.x,D.y+b.offsetHeight,null,J);this.setCurrentMenu(R,b);y=R}u||mxEvent.consume(J)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(J){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var R=this.currentMenuElt;this.hideCurrentMenu();R.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(J)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(J){!this.menus.autoPopup&&
+EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(J){null!=l&&l(J);if(!mxEvent.isConsumed(J)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
+var D=mxUtils.getOffset(b);S.popup(D.x,D.y+b.offsetHeight,null,J);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(J)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(J){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(J)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(J){!this.menus.autoPopup&&
null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(J)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(J).nodeName?J.preventDefault():J.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(J){C(J);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(J){C(J);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(J){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,
function(J){this.hideCurrentMenu();13!=J.keyCode&&27!=J.keyCode&&(C(J),q=!0)})))}};
EditorUi.prototype.addShapePicker=function(b,f){var l=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(u){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,
y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(u)}))};
EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var l=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,
function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
-mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,J,R){f.value=Math.round(100*this.editor.graph.view.scale*(null!=R?R:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
+mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,J,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
this.hideCurrentMenu(),mxEvent.consume(C)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(C,J){q(C,J,J.getProperty("factor"))}))})(f);return f};
EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(l){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(l)}));return f};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(this.selectionStateListener),this.selectionStateListener=null);null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&
@@ -2275,27 +2276,27 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.g
null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,C){return l(Graph.sanitizeHtml(u),y,q,C)}})();
Date.prototype.toISOString||function(){function b(f){f=String(f);1===f.length&&(f="0"+f);return f}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,C;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(C=
-arguments[2])}var J=Number(y.length);J=isNaN(J)?0:0!==J&&isFinite(J)?(0<J?1:-1)*Math.floor(Math.abs(J)):J;J=Math.min(Math.max(J,0),l);for(var R=f(this)?Object(new this(J)):Array(J),D=0,P;D<J;)P=y[D],R[D]=q?"undefined"===typeof C?q(P,D):q.call(C,P,D):P,D+=1;R.length=J;return R}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
+arguments[2])}var J=Number(y.length);J=isNaN(J)?0:0!==J&&isFinite(J)?(0<J?1:-1)*Math.floor(Math.abs(J)):J;J=Math.min(Math.max(J,0),l);for(var S=f(this)?Object(new this(J)):Array(J),D=0,P;D<J;)P=y[D],S[D]=q?"undefined"===typeof C?q(P,D):q.call(C,P,D):P,D+=1;S.length=J;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(f){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";
mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
mxShape.prototype.getConstraints=function(b,f,l){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,l,u,y,q){return"default"==y&&null!=q?"fillcolor"==u.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,l,u){null==u&&(u=f);return b.apply(this,[f,l,u])}})();
-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,J,R){var D=b.apply(this,arguments);if(null!=l){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,J,S){var D=b.apply(this,arguments);if(null!=l){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
Graph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);
-return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,J=null,R=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var I=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=I&&(c=this.isCellSelected(I.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(I.cell);
+return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,J=null,S=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var I=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=I&&(c=this.isCellSelected(I.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(I.cell);
if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),W=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=W+2;T.grow(W);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&!this.isCellSelected(I.cell)&&!(mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+
N,k.getGraphY()-N))){var U=this.model.getParent(I.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){W*=v;var Y=2*W;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(I.x,I.y-W,I.width,Y))||this.model.getChildAt(U,0)!=I.cell&&mxUtils.intersects(T,new mxRectangle(I.x-W,I.y,Y,I.height))||mxUtils.intersects(T,new mxRectangle(I.x,I.y+I.height-W,I.width,Y))||mxUtils.intersects(T,new mxRectangle(I.x+I.width-W,I.y,Y,I.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,
k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(W=N.getHandleForEvent(k),null!=W&&(N.start(k.getGraphX(),k.getGraphY(),W),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=I&&(this.isTableCell(I.cell)||this.isTableRow(I.cell)||this.isTable(I.cell));)this.isSwimlane(I.cell)&&this.isCellMovable(I.cell)&&(N=this.getActualStartSize(I.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(I.x+(N.x-N.width-1)*v+(0==N.x?I.width:0),I.y,1,I.height))||(0<N.y||
0<N.height)&&mxUtils.intersects(T,new mxRectangle(I.x,I.y+(N.y-N.height-1)*v+(0==N.y?I.height:0),I.width,1)))&&(this.selectCellForEvent(I.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(I.cell),null!=N&&null!=N.customHandles&&(W=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),W),k.consume())),I=this.view.getState(this.model.getParent(I.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&
-this.isEnabled()){k=v.getProperty("event");var I=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==I||!this.model.isEdge(I.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(I.cell),R=I,J=k,null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(I.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
-this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var I in k)if(null!=k[I].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=C&&null!=R&&null!=J){if(I=R,null!=D||Math.abs(C.x-v.getGraphX())>N||Math.abs(C.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(I.cell));if(null!=T&&null!=
+this.isEnabled()){k=v.getProperty("event");var I=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==I||!this.model.isEdge(I.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(I.cell),S=I,J=k,null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(I.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
+this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var I in k)if(null!=k[I].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=C&&null!=S&&null!=J){if(I=S,null!=D||Math.abs(C.x-v.getGraphX())>N||Math.abs(C.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(I.cell));if(null!=T&&null!=
T.bends&&0<T.bends.length){T.redrawHandles();var W=null!=D?D:T.getHandleForEvent(J),U=this.view.getEdgeStyle(I),Y=U==mxEdgeStyle.EntityRelation;N=I.absolutePoints;P||(W=D);W!=mxEvent.LABEL_HANDLE&&null!=N&&(W=D,null==W&&(k=new mxRectangle(C.x,C.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?W=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?W=T.bends.length-1:null!=N&&(null==U&&null==W||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?W=2:(W=mxUtils.findNearestSegment(I,C.x,C.y),W=null==U?mxEvent.VIRTUAL_HANDLE-W:W+1))),null==W&&(W=mxEvent.VIRTUAL_HANDLE));k=W==mxEvent.LABEL_HANDLE||0==W||W==T.bends.length-1;if(!Y&&(null!=I.visibleSourceState||null!=I.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),W),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
-this.isCellSelected(I.cell)||(this.selectionCellsHandler.handlers.put(I.cell,T),this.selectCellForEvent(I.cell,v.getEvent())):this.isCellSelected(I.cell)||T.destroy());P=!1;C=J=R=D=null}}else if(I=v.getState(),null!=I&&this.isCellEditable(I.cell)){k=this.model.getParent(I.cell);T=null;if(this.model.isEdge(I.cell)&&!this.isCellSelected(I.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(I.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
+this.isCellSelected(I.cell)||(this.selectionCellsHandler.handlers.put(I.cell,T),this.selectCellForEvent(I.cell,v.getEvent())):this.isCellSelected(I.cell)||T.destroy());P=!1;C=J=S=D=null}}else if(I=v.getState(),null!=I&&this.isCellEditable(I.cell)){k=this.model.getParent(I.cell);T=null;if(this.model.isEdge(I.cell)&&!this.isCellSelected(I.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(I.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=I.absolutePoints,null!=N)null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(I),U==mxEdgeStyle.EntityRelation||null==I.visibleSourceState&&null==I.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(I,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&(v=this.model.getParent(I.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(I.x,
I.y-2,I.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(I.x,I.y+I.height-2,I.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(I.x-2,I.y,4,I.height))&&this.model.getChildAt(v,0)!=I.cell||mxUtils.intersects(k,new mxRectangle(I.x+I.width-2,I.y,4,I.height)))T="col-resize";for(v=I;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),
-W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&I.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=C=J=R=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
+W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&I.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=C=J=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;
this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],I=this.graph.pageFormat,N=this.graph.pageScale,T=I.width*N;I=I.height*N;N=this.graph.view.translate;for(var W=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*W,(U.y*I+N.y)*W,T*W,I*W));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*W,((U.y+Y)*I+N.y)*W,T*W,I*W));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=
@@ -2324,13 +2325,13 @@ Graph.createSvgImage=function(b,f,l,u,y){l=unescape(encodeURIComponent(Graph.svg
Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};
Graph.createSvgNode=function(b,f,l,u,y){var q=mxUtils.createXmlDocument(),C=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&C.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);C.setAttribute("version","1.1");C.setAttribute("width",
l+"px");C.setAttribute("height",u+"px");C.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(C);return C};
-Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var J=document.createElement("img");J.onload=mxUtils.bind(this,function(){try{var D=C.getContext("2d");D.scale(q,q);D.drawImage(J,0,0);u(C.toDataURL())}catch(P){u(null)}});var R=mxUtils.createXmlDocument();R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"svg"):R.createElement("svg");b=(new mxSvgCanvas2D(R)).convertHtml(b);J.onerror=
+Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var J=document.createElement("img");J.onload=mxUtils.bind(this,function(){try{var D=C.getContext("2d");D.scale(q,q);D.drawImage(J,0,0);u(C.toDataURL())}catch(P){u(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);J.onerror=
function(D){u(null)};J.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,J=!1,R=0;R<q.length;R++)if(q[R]!=b&&null!=q[R].style){C=null;for(var D=0;D<q[R].style.length;D++){var P=q[R].style.item(D),c=q[R].style.getPropertyValue(P);J=y(q[R],P,c)||J}"FONT"==q[R].nodeName&&
-""==q[R].style.getPropertyValue("color")&&(c=q[R].getAttribute("color"),J=y(q[R],"color",c)||J);null!=f&&null!=C&&q[R].setAttribute(f,JSON.stringify(C))}return J};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var J=q[C];""==J?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=J;l=!0}}}catch(R){}return l};
+Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,J=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){C=null;for(var D=0;D<q[S].style.length;D++){var P=q[S].style.item(D),c=q[S].style.getPropertyValue(P);J=y(q[S],P,c)||J}"FONT"==q[S].nodeName&&
+""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),J=y(q[S],"color",c)||J);null!=f&&null!=C&&q[S].setAttribute(f,JSON.stringify(C))}return J};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var J=q[C];""==J?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=J;l=!0}}}catch(S){}return l};
Graph.getGivenColor=function(b,f){var l=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var u=b.getAttribute(Graph.backupStyleAttribute);if(null!=u){var y=JSON.parse(u);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?l=b.getAttribute("color"):""!=y[f]&&(l=y[f]))}}catch(q){}null==l&&""!=b.style[f]&&(l=b.style[f])}return l};
-Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],J=0;J<q.length;J++)C.push({node:q[J],value:q[J].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(J=0;J<b.length;J++){if(J<C.length&&C[J].node==b[J]&&C[J].value!=b[J].style[y]&&""==b[J].style[y])try{if(q=b[J].getAttribute(Graph.backupStyleAttribute),null!=q){var R=JSON.parse(q);R[y]=
-"";b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}}catch(D){}if(l&&b[J].getAttribute("color")==u||b[J].style[y]==u){l&&b[J].getAttribute("color")==u&&b[J].removeAttribute("color");b[J].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[J].getAttribute(Graph.backupStyleAttribute),R=null!=q?JSON.parse(q):{},R[y]=f!=mxConstants.NONE?f:"",b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}catch(D){}if(l&&mxClient.IS_FF){f=b[J];l=f.firstChild;if(null!=
+Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],J=0;J<q.length;J++)C.push({node:q[J],value:q[J].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(J=0;J<b.length;J++){if(J<C.length&&C[J].node==b[J]&&C[J].value!=b[J].style[y]&&""==b[J].style[y])try{if(q=b[J].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=
+"";b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(D){}if(l&&b[J].getAttribute("color")==u||b[J].style[y]==u){l&&b[J].getAttribute("color")==u&&b[J].removeAttribute("color");b[J].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[J].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(D){}if(l&&mxClient.IS_FF){f=b[J];l=f.firstChild;if(null!=
l&&"A"==l.nodeName&&null==l.nextSibling&&null!=l.firstChild){f.parentNode.insertBefore(l,f);for(u=l.firstChild;null!=u;)y=u.nextSibling,f.appendChild(u),u=y;l.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=b.charCodeAt(l);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=String.fromCharCode(b[l]);return f.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,l){return String.fromCharCode(parseInt(l,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var l=b.byteLength,u=0;u<l;u++)f+=String.fromCharCode(b[u]);return f};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(f){return f.charCodeAt(0)})};
@@ -2344,9 +2345,9 @@ null==Z[L].getTerminal(!0)),F=0;F<Z[L].getChildCount();F++){var ha=Z[L].getChild
ca.referenceCell=x;ca.startIndex=Math.max(0,(g.startIndex||0)-pageSize);Z.splice(0,0,ca)}if(H.length>(g.startIndex||0)+pageSize){var aa=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");aa.referenceCell=x;aa.startIndex=(g.startIndex||0)+pageSize;Z.splice(0,0,aa)}for(var oa in c.getModel().cells){var da=c.getModel().getCell(oa);da!=c.rootCell&&
!c.getModel().isAncestor(c.rootCell,da)&&c.getModel().isVertex(da)&&c.removeCells([da])}c.addCells(Z);var ka=c.getModel().getGeometry(c.rootCell);null!=ka&&(ka=ka.clone(),ka.x=m-ka.width/2,ka.y=n-ka.height/3,c.getModel().setGeometry(c.rootCell,ka));g=[];for(oa in c.getModel().cells)da=c.getModel().getCell(oa),da!=c.rootCell&&c.getModel().isVertex(da)&&c.getModel().getParent(da)==c.getDefaultParent()&&(g.push(da),ka=c.getModel().getGeometry(da),null!=ka&&(ka.x=m-ka.width/2,ka.y=n-ka.height/2));var ba=
g.length,V=2*Math.PI/ba,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ba;m++)ka=c.getModel().getGeometry(g[m]),null!=ka&&(ka=ka.clone(),ka.x+=k*Math.sin(m*V),ka.y+=k*Math.cos(m*V),c.getModel().setGeometry(g[m],ka))}finally{c.getModel().endUpdate()}}}var J=document.createElement("div");J.style.position="absolute";J.style.display="block";J.style.overflow="auto";J.style.width="100%";J.style.height="100%";J.style.left="0px";J.style.top="0px";J.style.zIndex=
-2;J.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var R=document.createElement("img");R.setAttribute("src",Editor.closeBlackImage);R.style.position="absolute";R.style.cursor="pointer";R.style.right="10px";R.style.top="10px";J.appendChild(R);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
-mxUtils.write(D,mxResources.get("close"));J.appendChild(D);document.body.appendChild(J);var P=function(c){27==c.keyCode&&R.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
-u.scrollCellToVisible(y)};mxEvent.addListener(R,"click",m);mxEvent.addListener(D,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var H=
+2;J.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";J.appendChild(S);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
+mxUtils.write(D,mxResources.get("close"));J.appendChild(D);document.body.appendChild(J);var P=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
+u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(D,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var H=
!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){H||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,H=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var Z=K.layout;K.layout=function(ha){K.spacing=Math.min(60,Math.max(30,60-5*ha.length));Z.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);H=!1}))});C(g,F)})(J)})(b,
f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};
Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==
@@ -2354,7 +2355,7 @@ l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.
Graph.sanitizeLink=function(b){if(null==b)return null;var f=document.createElement("a");f.setAttribute("href",b);Graph.sanitizeNode(f);return f.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,f){window.DOM_PURIFY_CONFIG.IN_PLACE=f;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),C=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-
-1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var J=y[0].getAttribute("viewBox");if(null!=J&&!isNaN(q)&&!isNaN(C)){var R=J.split(" ");4<=J.length&&(l=parseFloat(R[2])/q,u=parseFloat(R[3])/C,new mxRectangle(parseFloat(R[0]),parseFloat(R[1]),parseFloat(R[2]),parseFloat(R[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(C=0;C<P.length;C++)q=Math.max(q,parseFloat(P[C].getAttribute("stroke-width")));D=new mxRectangle(D.x,
+1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var J=y[0].getAttribute("viewBox");if(null!=J&&!isNaN(q)&&!isNaN(C)){var S=J.split(" ");4<=J.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/C,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(C=0;C<P.length;C++)q=Math.max(q,parseFloat(P[C].getAttribute("stroke-width")));D=new mxRectangle(D.x,
D.y,D.width,D.height);D.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",D.x+" "+D.y+" "+D.width+" "+D.height);f.getElementsByTagName("svg")[0].setAttribute("width",D.width/l);f.getElementsByTagName("svg")[0].setAttribute("height",D.height/u)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};
Graph.createRemoveIcon=function(b,f){var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.clearImage);l.setAttribute("title",b);l.setAttribute("width","13");l.setAttribute("height","10");l.style.marginLeft="4px";l.style.marginBottom="-1px";l.style.cursor="pointer";mxEvent.addListener(l,"click",f);return l};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
Graph.rewritePageLinks=function(b,f){function l(y,q){var C=y.getAttribute(q);if(null!=C){Graph.isPageLink(C)&&(C="#"+C.substring(C.indexOf(":")+1));var J=q;f&&"xlink:href"==q&&(y.removeAttribute(q),J="href");y.setAttribute(J,C)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
@@ -2363,32 +2364,32 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBa
Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,J=mxUtils.bind(this,function(P){q=!0;C=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),R=mxUtils.bind(this,function(P){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(P))<y&&Math.abs(C.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
-c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,J,R,D);mxEvent.addListener(u.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,J=mxUtils.bind(this,function(P){q=!0;C=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(P))<y&&Math.abs(C.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
+c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,J,S,D);mxEvent.addListener(u.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=
u&&this.graph.isCustomLink(u)&&(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&this.graph.customLinkClicked(u)&&mxEvent.consume(l))}))}}this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(C.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(C.style,"lineShape",null)&&(this.model.isVertex(C.cell)||"arrow"==J||"pipe"==J||"wire"==J||"filledEdge"==J||"flexArrow"==J||"mxgraph.arrows2.wedgeArrow"==
-J)};Graph.prototype.isGradientState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=J&&"pipe"!=J};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,J){for(var R=J?"color":"background-color",D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,R);null==D&&null!=C&&C!=this.cellEditor.textarea.parentNode;)D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,R),C=C.parentNode;
+J)};Graph.prototype.isGradientState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=J&&"pipe"!=J};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,J){for(var S=J?"color":"background-color",D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S);null==D&&null!=C&&C!=this.cellEditor.textarea.parentNode;)D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S),C=C.parentNode;
if("rgba(0, 0, 0, 0)"==D||"transparent"==D)D=mxConstants.NONE;return D};Graph.prototype.isSpecialColor=function(C){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],C)};Graph.prototype.isGlassState=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return"label"==C||"rectangle"==C||"internalStorage"==C||"ext"==C||"umlLifeline"==C||"swimlane"==C||"process"==C};Graph.prototype.isRoundedState=function(C){return null!=
C.shape?C.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(C.style,mxConstants.STYLE_CURVED,!1)&&("connector"==J||"filledEdge"==J||"wire"==J)};Graph.prototype.isAutoSizeState=function(C){return"1"==mxUtils.getValue(C.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(C){return null!=
-mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,J){C=null!=C?C:!0;J=null!=J?J:!0;var R=this.model;return R.filterDescendants(function(D){return C&&R.isVertex(D)||J&&R.isEdge(D)},R.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,J,R){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var D=JSON.parse(C),P;for(P in D)this.setCellStyles(P,D[P],J),"edgeStyle"==
-P&&"elbowEdgeStyle"==D[P]&&null!=R&&this.setCellStyles("elbow",R==mxConstants.DIRECTION_SOUTH||R==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",J)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var J={},R=0;R<C.length;R++){var D=this.view.getState(C[R]);null!=D&&this.mergeStyle(D.style,J,0==R)}return J};Graph.prototype.mergeStyle=function(C,J,R){if(null!=C){var D={},P;for(P in C){var c=C[P];null!=c&&(D[P]=!0,null==J[P]&&R?J[P]=c:J[P]!=c&&delete J[P])}for(P in J)D[P]||
-delete J[P]}};Graph.prototype.getStartEditingCell=function(C,J){J=this.getCellStyle(C);J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),J=this.getCellStyle(C),J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(J=0;J<this.model.getChildCount(C);J++){var R=
-this.model.getChildAt(C,J);if(this.isCellEditable(R)){C=R;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,J,R,D){null!=C&&(D||(R=null!=R?R:Graph.cellStyles,Graph.removeKeys(C,function(P){return 0>mxUtils.indexOf(R,P)})),this.updateCellStyles(C,J))};Graph.prototype.copyCellStyles=function(C,J,R,D,P,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||
-n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<J.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,J[x]),"strokeColor"!=J[x]||null!=R[x]&&"none"!=R[x])if(0<=mxUtils.indexOf(Graph.cellStyles,J[x])||"shape"==J[x])if("shape"!=J[x]&&(m||C)&&(null==R[x]?delete D[J[x]]:D[J[x]]=R[x]),n||C)null==R[x]?delete P[J[x]]:P[J[x]]=R[x]};Graph.prototype.includeDescendants=function(C){for(var J=[],R=0;R<C.length;R++)J=J.concat(this.model.getDescendants(C[R]));return J};Graph.prototype.pasteCellStyles=function(C,
-J,R,D,P){J=null!=J?J:this.currentVertexStyle;R=null!=R?R:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=m?m.split(";"):[],H=0;H<F.length;H++){var M=F[H],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
-1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ha=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ha,K))for(var ca=0;ca<ha.length;ca++){var aa=mxUtils.indexOf(x,ha[ca]);0<=aa&&x.splice(aa,1)}}}}var oa=this.model.isEdge(g);n=oa?R:J;for(H=0;H<x.length;H++){K=x[H];var da=n[K];null!=da&&("edgeStyle"!=K||P)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,da),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==da&&null==n.curved&&
-(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,J){this.model.beginUpdate();try{for(var R=0;R<J.length;R++)if(this.model.isVertex(J[R])||this.model.isEdge(J[R])){var D=this.getCellStyle(J[R],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(D[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==
-D[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[J[R]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[J[R]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
-Graph.prototype.getCellAt=function(C,J,R,D,P,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,J=J/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,J,R,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==R&&(R=this.getCurrentRoot(),null==R&&(R=this.getModel().getRoot()));if(null!=R)for(var g=this.model.getChildCount(R)-1;0<=g;g--){var m=this.model.getChildAt(R,g),n=this.getScaledCellAt(C,J,m,D,P,
+mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,J){C=null!=C?C:!0;J=null!=J?J:!0;var S=this.model;return S.filterDescendants(function(D){return C&&S.isVertex(D)||J&&S.isEdge(D)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,J,S){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var D=JSON.parse(C),P;for(P in D)this.setCellStyles(P,D[P],J),"edgeStyle"==
+P&&"elbowEdgeStyle"==D[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",J)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var J={},S=0;S<C.length;S++){var D=this.view.getState(C[S]);null!=D&&this.mergeStyle(D.style,J,0==S)}return J};Graph.prototype.mergeStyle=function(C,J,S){if(null!=C){var D={},P;for(P in C){var c=C[P];null!=c&&(D[P]=!0,null==J[P]&&S?J[P]=c:J[P]!=c&&delete J[P])}for(P in J)D[P]||
+delete J[P]}};Graph.prototype.getStartEditingCell=function(C,J){J=this.getCellStyle(C);J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),J=this.getCellStyle(C),J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(J=0;J<this.model.getChildCount(C);J++){var S=
+this.model.getChildAt(C,J);if(this.isCellEditable(S)){C=S;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,J,S,D){null!=C&&(D||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(C,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(C,J))};Graph.prototype.copyCellStyles=function(C,J,S,D,P,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||
+n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<J.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,J[x]),"strokeColor"!=J[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,J[x])||"shape"==J[x])if("shape"!=J[x]&&(m||C)&&(null==S[x]?delete D[J[x]]:D[J[x]]=S[x]),n||C)null==S[x]?delete P[J[x]]:P[J[x]]=S[x]};Graph.prototype.includeDescendants=function(C){for(var J=[],S=0;S<C.length;S++)J=J.concat(this.model.getDescendants(C[S]));return J};Graph.prototype.pasteCellStyles=function(C,
+J,S,D,P){J=null!=J?J:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=m?m.split(";"):[],H=0;H<F.length;H++){var M=F[H],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
+1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ha=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ha,K))for(var ca=0;ca<ha.length;ca++){var aa=mxUtils.indexOf(x,ha[ca]);0<=aa&&x.splice(aa,1)}}}}var oa=this.model.isEdge(g);n=oa?S:J;for(H=0;H<x.length;H++){K=x[H];var da=n[K];null!=da&&("edgeStyle"!=K||P)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,da),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==da&&null==n.curved&&
+(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,J){this.model.beginUpdate();try{for(var S=0;S<J.length;S++)if(this.model.isVertex(J[S])||this.model.isEdge(J[S])){var D=this.getCellStyle(J[S],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(D[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==
+D[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[J[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[J[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
+Graph.prototype.getCellAt=function(C,J,S,D,P,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,J=J/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,J,S,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(C,J,m,D,P,
c);if(null!=n)return n;if(this.isCellVisible(m)&&(P&&this.model.isEdge(m)||D&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,C,J))&&this.intersects(n,C,J)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(C){return!this.isSwimlane(C.cell)&&0<this.model.getChildCount(C.cell)&&!this.isCellCollapsed(C.cell)&&"1"==mxUtils.getValue(C.style,"recursiveResize","1")&&null==mxUtils.getValue(C.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(C){for(var J=
-this.getCellGeometry(C);null!=J&&J.relative;)C=this.getModel().getParent(C),J=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var J=new mxDictionary,R=[],D=0;D<C.length;D++){var P=this.getCompositeParent(C[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
-null==P||J.get(P)||(J.put(P,!0),R.push(P))}return R};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var J=this.getCellGeometry(C);null!=J&&J.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var J=this.model.getParent(C);if(!this.model.isVertex(J))break;C=J}return C};Graph.prototype.filterSelectionCells=function(C){var J=
-this.getSelectionCells();if(null!=C){for(var R=[],D=0;D<J.length;D++)C(J[D])||R.push(J[D]);J=R}return J};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var J=this.currentScale,R=this.currentTranslate;C=new mxRectangle((C.x+2*R.x)*J-R.x,(C.y+2*R.y)*J-R.y,C.width*J,C.height*J)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);
-return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var J=this.graph.currentTranslate,R=this.graph.currentScale;C=new mxRectangle((C.x+J.x)*R,(C.y+J.y)*R,C.width*R,C.height*R)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){this.graph.useCssTransforms&&(this.graph.currentScale=
-this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var J=[],R=
-0;R<C.length;R++)this.isTableRow(C[R])||this.isTableCell(C[R])||J.push(C[R]);return J};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var J=[],R=0;R<C.length;R++)this.isTable(C[R])||this.isTableRow(C[R])||this.isTableCell(C[R])||J.push(C[R]);return J};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var J=C.getAttribute("transform");C.setAttribute("transformOrigin",
-"0 0");var R=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+R+","+R+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");J!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){var C=this.graph.useCssTransforms,J=this.scale,R=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=J,this.translate=R)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,J,R){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
+this.getCellGeometry(C);null!=J&&J.relative;)C=this.getModel().getParent(C),J=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var J=new mxDictionary,S=[],D=0;D<C.length;D++){var P=this.getCompositeParent(C[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
+null==P||J.get(P)||(J.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var J=this.getCellGeometry(C);null!=J&&J.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var J=this.model.getParent(C);if(!this.model.isVertex(J))break;C=J}return C};Graph.prototype.filterSelectionCells=function(C){var J=
+this.getSelectionCells();if(null!=C){for(var S=[],D=0;D<J.length;D++)C(J[D])||S.push(J[D]);J=S}return J};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var J=this.currentScale,S=this.currentTranslate;C=new mxRectangle((C.x+2*S.x)*J-S.x,(C.y+2*S.y)*J-S.y,C.width*J,C.height*J)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);
+return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var J=this.graph.currentTranslate,S=this.graph.currentScale;C=new mxRectangle((C.x+J.x)*S,(C.y+J.y)*S,C.width*S,C.height*S)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){this.graph.useCssTransforms&&(this.graph.currentScale=
+this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var J=[],S=
+0;S<C.length;S++)this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var J=[],S=0;S<C.length;S++)this.isTable(C[S])||this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var J=C.getAttribute("transform");C.setAttribute("transformOrigin",
+"0 0");var S=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");J!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){var C=this.graph.useCssTransforms,J=this.scale,S=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=J,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
P,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,f,l){var u=f.getAttribute("href");u!=Graph.sanitizeLink(u)&&Graph.sanitizeNode(f);if(null!=u&&!this.isCustomLink(u)&&(mxEvent.isLeftMouseButton(l)&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(u)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(u),b);mxEvent.consume(l)}};
Graph.prototype.openLink=function(b,f,l){var u=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)u=window.open(b,null!=f?f:"_blank",l?null:"noopener,noreferrer"),null==u||l||(u.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return u};
@@ -2404,7 +2405,7 @@ Graph.prototype.createLayouts=function(b){for(var f=[],l=0;l<b.length;l++)if(0<=
Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var C=0;C<q.length;C++)y[q[C].nodeName]=q[C].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};
Graph.prototype.getNodesForCells=function(b){for(var f=[],l=0;l<b.length;l++){var u=this.view.getState(b[l]);if(null!=u){for(var y=this.cellRenderer.getShapesForState(u),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=u.control&&null!=u.control.node&&f.push(u.control.node)}}return f};
Graph.prototype.createWipeAnimations=function(b,f){for(var l=[],u=0;u<b.length;u++){var y=this.view.getState(b[u]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?l.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&l.push(this.createVertexWipeAnimation(y,f)))}return l};
-Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,J){if(null!=b.shape){var R=[l[0]];J=C/J;f||(J=1-J);for(var D=y*J,P=1;P<q;P++)if(D<=u[P-1]){R.push(new mxPoint(l[P-1].x+(l[P].x-l[P-1].x)*D/u[P-1],l[P-1].y+(l[P].y-l[P-1].y)*D/u[P-1]));break}else D-=u[P-1],R.push(l[P]);b.shape.points=R;b.shape.redraw();0==C&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,J){if(null!=b.shape){var S=[l[0]];J=C/J;f||(J=1-J);for(var D=y*J,P=1;P<q;P++)if(D<=u[P-1]){S.push(new mxPoint(l[P-1].x+(l[P].x-l[P-1].x)*D/u[P-1],l[P-1].y+(l[P].y-l[P-1].y)*D/u[P-1]));break}else D-=u[P-1],S.push(l[P]);b.shape.points=S;b.shape.redraw();0==C&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=J)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,f){var l=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(u,y){null!=b.shape&&(y=u/y,f||(y=1-y),b.shape.bounds=new mxRectangle(l.x,l.y,l.width*y,l.height),b.shape.redraw(),0==u&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,C=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var J=0;J<b.length;J++)b[J].stop();null!=f&&f()}else for(J=0;J<b.length;J++)b[J].execute(q,l);q++});y=window.setInterval(C,u);C()};
@@ -2419,17 +2420,17 @@ Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);ret
Graph.prototype.getClickableLinkForCell=function(b){do{var f=this.getLinkForCell(b);if(null!=f)return f;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var f=null;"date"==b?f=(new Date).toLocaleDateString():"time"==b?f=(new Date).toLocaleTimeString():"timestamp"==b?f=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),f=this.formatDate(new Date,b));return f};
Graph.prototype.formatDate=function(b,f,l){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,C=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var J=l?"getUTC":"get",R=b[J+"Date"](),D=b[J+"Day"](),P=b[J+"Month"](),c=b[J+"FullYear"](),g=b[J+"Hours"](),m=b[J+"Minutes"](),n=b[J+"Seconds"]();J=b[J+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:R,dd:C(R),ddd:u.i18n.dayNames[D],dddd:u.i18n.dayNames[D+7],m:P+1,mm:C(P+1),mmm:u.i18n.monthNames[P],mmmm:u.i18n.monthNames[P+
-12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(J,3),L:C(99<J?Math.round(J/10):J),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<R%10?0:(10!=R%100-R%10)*R%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
+/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var J=l?"getUTC":"get",S=b[J+"Date"](),D=b[J+"Day"](),P=b[J+"Month"](),c=b[J+"FullYear"](),g=b[J+"Hours"](),m=b[J+"Minutes"](),n=b[J+"Seconds"]();J=b[J+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:C(S),ddd:u.i18n.dayNames[D],dddd:u.i18n.dayNames[D+7],m:P+1,mm:C(P+1),mmm:u.i18n.monthNames[P],mmmm:u.i18n.monthNames[P+
+12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(J,3),L:C(99<J?Math.round(J/10):J),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var l=1;l<b.length;l++)if(!this.model.isAncestor(f,b[l])){f=null;break}}return f};
-Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function J(){u.isVisible(C)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var R=this.convertValueToString(C)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
-"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[R]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,R);l.appendChild(D);
+Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function J(){u.isVisible(C)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var S=this.convertValueToString(C)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
+"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,S);l.appendChild(D);
mxEvent.addListener(D,"click",function(){u.setVisible(C,!u.isVisible(C));J();null!=b&&b(C)});J()})(u.getChildAt(u.root,q));return l};
-Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var J=q.substring(1,q.length-1),R={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==J)C=b.id;else if("width"===J.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
-null!=D&&(C=D.width,5<J.length&&(C=Editor.toUnit(C,R[J.substring(6)])))}else if("height"==J.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(C=D.height,6<J.length&&(C=Editor.toUnit(C,R[J.substring(7)])));else if("length"==J.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(C=Math.round(D.length/this.view.scale),6<J.length&&(C=Editor.toUnit(C,R[J.substring(7)])))}else if(0>J.indexOf("{"))for(R=b;null==C&&null!=
-R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=R.getAttribute(J+"_"+Graph.diagramLanguage)),null==C&&(C=R.hasAttribute(J)?null!=R.getAttribute(J)?R.getAttribute(J):"":null)),R=this.model.getParent(R);null==C&&(C=this.getGlobalVariable(J));null==C&&null!=l&&(C=l[J])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};
+Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var J=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==J)C=b.id;else if("width"===J.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
+null!=D&&(C=D.width,5<J.length&&(C=Editor.toUnit(C,S[J.substring(6)])))}else if("height"==J.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(C=D.height,6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])));else if("length"==J.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(C=Math.round(D.length/this.view.scale),6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])))}else if(0>J.indexOf("{"))for(S=b;null==C&&null!=
+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=S.getAttribute(J+"_"+Graph.diagramLanguage)),null==C&&(C=S.hasAttribute(J)?null!=S.getAttribute(J)?S.getAttribute(J):"":null)),S=this.model.getParent(S);null==C&&(C=this.getGlobalVariable(J));null==C&&null!=l&&(C=l[J])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};
Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],l=0;l<b.length;l++){var u=this.model.getCell(b[l].id);null!=u&&f.push(u)}this.setSelectionCells(f)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),J=y.getIndex(q);q=Math.max(u,J);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,J);u<=q;u++){J=this.model.getChildAt(y,u);for(var R=f;R<=b;R++)C.push(this.model.getChildAt(J,R))}0<C.length&&(1<C.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),J=y.getIndex(q);q=Math.max(u,J);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,J);u<=q;u++){J=this.model.getChildAt(y,u);for(var S=f;S<=b;S++)C.push(this.model.getChildAt(J,S))}0<C.length&&(1<C.length||1<this.getSelectionCount()||
!this.isCellSelected(C[0]))&&(this.setSelectionCells(C),l=!0)}}return l};
Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var l=0;l<b.length;l++){var u=b[l],y=this.getCellGeometry(u);if(null!=y){y=y.clone();if(this.getModel().isVertex(u))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(u)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(u,
y)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var f=this.model.getChildCount(b);0<=f;f--)this.model.remove(this.model.getChildAt(b,f))}finally{this.model.endUpdate()}};
@@ -2437,13 +2438,13 @@ Graph.prototype.updateShapes=function(b,f,l){this.model.beginUpdate();try{var u=
this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var C=this.model.getStyle(f[q]);if(null!=C){var J=C.split(";");0<J.length&&0>J[0].indexOf("=")&&(J=J.slice(1));this.model.setStyle(f[q],J.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};
Graph.prototype.selectCellsForConnectVertex=function(b,f,l){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=l&&(mxEvent.isTouchEvent(f)?l.update(l.getState(this.view.getState(b[1]))):l.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};
Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var l=f;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=b.parent;)l=this.model.getParent(l);null!=l&&null!=l.parent&&l.parent==b.parent&&(f=l.parent.getIndex(l),this.model.add(l.parent,b,f))};
-Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,J){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var R=this.isCloneConnectSource(b),D=R?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=l):f==
+Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,J){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),D=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=l):f==
mxConstants.DIRECTION_SOUTH?(P.x+=D.geometry.width/2,P.y+=D.geometry.height+l):(P.x=f==mxConstants.DIRECTION_WEST?P.x-l:P.x+(D.geometry.width+l),P.y+=D.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;D=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(D=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(D+P.x*l,g+P.y*l)).grow(40*l);q=null!=q?
this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var H=
-!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;H&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&R){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=K?K:b);Z=R?b:this.getCompositeParent(Z);L=null!=K?K:this.duplicateCells([Z],
-!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ha.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ha.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ha.width/2:P.x+ha.width/2),ha.x=P.x-ha.width/2,ha.y=P.y-ha.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):H&&!R&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&
-mxEvent.isShiftDown(u)&&H||null==n&&R?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&R&&f==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(P,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=J)J(M);else return M});if(null==C||null!=L||!H||null==n&&R)return y(L);C(D+P.x*l,g+P.y*l,y)};
+!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;H&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=K?K:b);Z=S?b:this.getCompositeParent(Z);L=null!=K?K:this.duplicateCells([Z],
+!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ha.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ha.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ha.width/2:P.x+ha.width/2),ha.x=P.x-ha.width/2,ha.y=P.y-ha.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):H&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&
+mxEvent.isShiftDown(u)&&H||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(P,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=J)J(M);else return M});if(null==C||null!=L||!H||null==n&&S)return y(L);C(D+P.x*l,g+P.y*l,y)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};
Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),
null==l&&(l=f.getAttribute("label")||"");return l||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
@@ -2455,8 +2456,8 @@ Graph.prototype.getDefaultColor=function(b,f,l){f="default"+f.charAt(0).toUpperC
Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
Graph.prototype.updateAlternateBounds=function(b,f,l){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var u=this.layoutManager.getLayout(this.model.getParent(b));null!=u&&u.constructor==mxStackLayout&&(u.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};
Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var l=!0,u=0;u<b.length&&l;u++)l=l&&this.model.isEdge(b[u]);u=null;if(1==b.length&&l){var y=this.getCellGeometry(b[0]);null!=y&&(u=y.getTerminalPoint(!0))}u=null!=u?u:this.getBoundingBoxFromGeometry(b,l);null!=u&&(l=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,l-u.x,f-u.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),J=this.getCellGeometry(l[q]);if(null!=C&&null!=J){var R=0,D=0;if(J.alternateBounds)R=J.width-J.alternateBounds.width,D=J.height-J.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
-R=Math.round(J.width-C.width/P);D=Math.round(J.height-C.height/P)}if(0!=D||0!=R){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,R,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,R,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};
+Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),J=this.getCellGeometry(l[q]);if(null!=C&&null!=J){var S=0,D=0;if(J.alternateBounds)S=J.width-J.alternateBounds.width,D=J.height-J.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
+S=Math.round(J.width-C.width/P);D=Math.round(J.height-C.height/P)}if(0!=D||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,S,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};
Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),C=this.getCellGeometry(y[f]);null!=q&&null!=C&&(C=C.clone(),C.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],C))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),C=this.view.getState(b);null!=C&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,C.width/this.view.scale-q.width):q.height+=u+Math.min(0,C.height/this.view.scale-q.height),this.model.setGeometry(b,
q));b=this.model.getParent(b);f=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var f=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=f.container:"1"==f.container};Graph.prototype.isCellConnectable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=f.connectable?"0"!=f.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
@@ -2497,10 +2498,10 @@ HoverIcons.prototype.click=function(b,f,l){var u=l.getEvent(),y=l.getGraphX(),q=
HoverIcons.prototype.execute=function(b,f,l){l=l.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,f,this.graph.defaultEdgeLength,l,this.graph.isCloneEvent(l),this.graph.isCloneEvent(l)),l,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var l=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&
-(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(J,R,D){if(null!=l){var P=new mxRectangle(R,D,J.clientWidth,J.clientHeight);mxUtils.intersects(P,l)&&(J==this.arrowUp?D-=P.y+P.height-l.y:J==this.arrowRight?R+=l.x+l.width-P.x:J==this.arrowDown?D+=l.y+l.height-P.y:J==this.arrowLeft&&(R-=P.x+P.width-l.x))}J.style.left=R+"px";J.style.top=D+"px";mxUtils.setOpacity(J,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(J,S,D){if(null!=l){var P=new mxRectangle(S,D,J.clientWidth,J.clientHeight);mxUtils.intersects(P,l)&&(J==this.arrowUp?D-=P.y+P.height-l.y:J==this.arrowRight?S+=l.x+l.width-P.x:J==this.arrowDown?D+=l.y+l.height-P.y:J==this.arrowLeft&&(S-=P.x+P.width-l.x))}J.style.left=S+"px";J.style.top=D+"px";mxUtils.setOpacity(J,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));f(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));f(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));f(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){f=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(J,R){var D=this.graph.model.isVertex(J)&&this.graph.getCellGeometry(J);null==J||this.graph.model.isAncestor(J,
-this.currentState.cell)||this.graph.isSwimlane(J)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?R.style.visibility="visible":R.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(J,S){var D=this.graph.model.isVertex(J)&&this.graph.getCellGeometry(J);null==J||this.graph.model.isAncestor(J,
+this.currentState.cell)||this.graph.isSwimlane(J)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(f){null!=f.parentNode&&(f=new mxRectangle(f.offsetLeft,f.offsetTop,f.offsetWidth,f.offsetHeight),null==b?b=f:b.add(f))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var f=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(b=f)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
@@ -2510,26 +2511,26 @@ b||null==this.bbox||null==f||null==l||!mxUtils.contains(this.bbox,f,l))&&(null!=
HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};
Graph.prototype.removeTextStyleForCell=function(b,f){var l=this.getCurrentCellStyle(b),u=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(l,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(l,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);u=!0}f&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var C=this.cloneCell(f),J=this.getCellGeometry(C);null!=J&&(J.x+=q*u,J.y+=q*y);b.insert(C)}return b};
-Graph.prototype.createTable=function(b,f,l,u,y,q,C,J,R){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q:30;J=null!=J?J:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";R=null!=R?R:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,J),this.createVertex(null,null,"",0,0,l,u,R),f,l,0),b,0,u)};
+Graph.prototype.createTable=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q:30;J=null!=J?J:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,J),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};
Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),C=0;C<q.length;C++)null!=f[y][C]&&(q[C].value=f[y][C]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,J,R){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";J=null!=J?J:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-R=null!=R?R:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
-q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,J),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,R),f,l,0),b-1,0,u)):y};
-Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),J=this.getCellStyle(u[y],!0),R=null,D=[],P=0;P<C.length;P++){var c=this.getCellGeometry(C[P]),g={cell:C[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=R?R.point.x:b.x+q.x),c.height+(null!=l&&null!=
-l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[P]&&1<l[P].rowspan?(g.rowspan=l[P].rowspan-1,g.colspan=l[P].colspan,g.actual=l[P].actual):null!=R&&1<R.colspan?(g.rowspan=R.rowspan,g.colspan=R.colspan-1,g.actual=R.actual):(R=this.getCurrentCellStyle(C[P],!0),null!=R&&(g.rowspan=parseInt(R.rowspan||1),g.colspan=parseInt(R.colspan||1)));R=1==mxUtils.getValue(J,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,C.length,
-u.length,b.x+(R?q.x:0),b.y+(R?q.y:0));D.push(g);R=g}l=D}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,J,R,D){f&&q.row<J-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(R,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";J=null!=J?J:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
+q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,J),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};
+Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),J=this.getCellStyle(u[y],!0),S=null,D=[],P=0;P<C.length;P++){var c=this.getCellGeometry(C[P]),g={cell:C[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=
+l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[P]&&1<l[P].rowspan?(g.rowspan=l[P].rowspan-1,g.colspan=l[P].colspan,g.actual=l[P].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(C[P],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(J,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,C.length,
+u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));D.push(g);S=g}l=D}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,J,S,D){f&&q.row<J-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var J=mxUtils.indexOf(C,b);if(J<C.length-1){var R=C[J+1],D=this.getCellGeometry(R);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,u.setGeometry(R,D))}}var P=this.getCellGeometry(q);null!=P&&(l||(l=b==C[C.length-1]),l&&(P=P.clone(),P.height+=f,u.setGeometry(q,P)))}}finally{u.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var J=b==C.length-1;u.beginUpdate();try{for(var R=u.getChildCells(q,!0),D=0;D<R.length;D++){y=R[D];C=u.getChildCells(y,!0);var P=C[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(P,c));b<C.length-1&&(P=C[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
+Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var J=mxUtils.indexOf(C,b);if(J<C.length-1){var S=C[J+1],D=this.getCellGeometry(S);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,u.setGeometry(S,D))}}var P=this.getCellGeometry(q);null!=P&&(l||(l=b==C[C.length-1]),l&&(P=P.clone(),P.height+=f,u.setGeometry(q,P)))}}finally{u.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var J=b==C.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),D=0;D<S.length;D++){y=S[D];C=u.getChildCells(y,!0);var P=C[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(P,c));b<C.length-1&&(P=C[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
c.x+=f,l||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),u.setGeometry(P,c)))}if(J||l){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,u.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{u.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,f){for(var l=0,u=0;u<b.length;u++)if(!this.isVertexIgnored(b[u])){var y=this.graph.getCellGeometry(b[u]);null!=y&&(l+=f?y.width:y.height)}return l};
TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var C=this.graph.getCellGeometry(l[q]);null!=C&&(u+=(null!=C.alternateBounds?C.alternateBounds.width:C.width)*f/b,y.push(Math.round(u)))}return y};
-TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,J=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var R=0;R<q.length;R++){var D=this.graph.getCellGeometry(q[R]);null!=D&&(D=D.clone(),D.y=b.y,D.height=l-b.y-b.height,null!=f?(D.x=f[R],D.width=f[R+1]-D.x,R==q.length-1&&R<f.length-2&&(D.width=u-D.x-b.x-b.width)):(D.x=C,C+=D.width,R==q.length-1?D.width=u-b.x-b.width-J:J+=D.width),D.alternateBounds=new mxRectangle(0,
-0,D.width,D.height),y.setGeometry(q[R],D))}return J};
-TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),J=0;C.beginUpdate();try{for(var R=l.height-f.y-f.height,D=l.width-f.x-f.width,P=C.getChildCells(b,!0),c=0;c<P.length;c++)C.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<R&&0<D&&0<
-P.length&&0<g){if(y){var m=this.graph.getCellGeometry(P[P.length-1]);null!=m&&(m=m.clone(),m.height=R-g+m.height,C.setGeometry(P[P.length-1],m))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)m=this.graph.getCellGeometry(P[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=D,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*R,m.height=Math.round(F)-m.y,C.setGeometry(P[c],m)),J=Math.max(J,this.layoutRow(P[c],n,m.height,D,x));u&&R<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,
+TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,J=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var D=this.graph.getCellGeometry(q[S]);null!=D&&(D=D.clone(),D.y=b.y,D.height=l-b.y-b.height,null!=f?(D.x=f[S],D.width=f[S+1]-D.x,S==q.length-1&&S<f.length-2&&(D.width=u-D.x-b.x-b.width)):(D.x=C,C+=D.width,S==q.length-1?D.width=u-b.x-b.width-J:J+=D.width),D.alternateBounds=new mxRectangle(0,
+0,D.width,D.height),y.setGeometry(q[S],D))}return J};
+TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),J=0;C.beginUpdate();try{for(var S=l.height-f.y-f.height,D=l.width-f.x-f.width,P=C.getChildCells(b,!0),c=0;c<P.length;c++)C.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<S&&0<D&&0<
+P.length&&0<g){if(y){var m=this.graph.getCellGeometry(P[P.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,C.setGeometry(P[P.length-1],m))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)m=this.graph.getCellGeometry(P[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=D,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,C.setGeometry(P[c],m)),J=Math.max(J,this.layoutRow(P[c],n,m.height,D,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,
l));q&&D<J+Graph.minTableColumnWidth&&(l=l.clone(),l.width=J+f.width+f.x+Graph.minTableColumnWidth,C.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){C.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(c=0;c<P.length;c++)C.setVisible(P[c],
!1)}finally{C.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var m=this.getState(c);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&!m.invalid&&this.updateLineJumps(m)&&this.graph.cellRenderer.redraw(m,!1,this.isRendering());m=f.apply(this,
@@ -2543,8 +2544,8 @@ L.y,M.x,M.y,da.x,da.y)>F)){Z=ba.x-L.x;oa=ba.y-L.y;ba={distSq:Z*Z+oa*oa,x:ba.x,y:
this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)C.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,L=null,K=[],Z=null;c.begin();for(var ha=0;ha<this.state.routedPoints.length;ha++){var ca=
this.state.routedPoints[ha],aa=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ha?aa=g[0]:ha==this.state.routedPoints.length-1&&(aa=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var da=this.state.routedPoints[ha+1];ca=da.x/this.scale-aa.x;da=da.y/this.scale-aa.y;ca=ca*ca+da*da;null==Z&&(Z=new mxPoint(aa.x-M.x,aa.y-M.y),L=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<L?(Z.x=Z.x*x/L,Z.y=Z.y*x/L):Z=null);ca>x*x&&0<L&&(ca=M.x-aa.x,da=M.y-aa.y,ca=ca*ca+da*da,ca>x*x&&(oa=new mxPoint(aa.x-Z.x,aa.y-Z.y),ca=new mxPoint(aa.x+
Z.x,aa.y+Z.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,H),K=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,H=!1,"sharp"==F?(c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.lineTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+Z.y*K,oa.y-Z.x*K),c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.moveTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x+Z.y*K,ca.y-Z.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-Z.y*K,oa.y+Z.x*K,ca.x-Z.y*K,ca.y+Z.x*K,ca.x,ca.y)):(c.moveTo(ca.x,ca.y),H=!0),K=[ca],
-oa=!0))}else Z=null;oa||(K.push(aa),M=aa)}this.addPoints(c,K,m,n,!1,null,H);c.stroke()}};var J=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):J.apply(this,arguments)};var R=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
-"1"!=c.style.snapToPoint)R.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=H){var L=Math.cos(-H),K=Math.sin(-H);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+oa=!0))}else Z=null;oa||(K.push(aa),M=aa)}this.addPoints(c,K,m,n,!1,null,H);c.stroke()}};var J=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):J.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
+"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=H){var L=Math.cos(-H),K=Math.sin(-H);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
0);x=this.getPerimeterPoint(g,x,0==H&&F,L);0!=H&&(L=Math.cos(H),K=Math.sin(H),x=mxUtils.getRotatedPoint(x,L,K,M));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,m,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,m,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=m=null;if(null!=c)for(var F=0;F<c.length;F++){var H=this.graph.getConnectionPoint(g,c[F]);if(null!=H){var M=(H.x-x.x)*(H.x-x.x)+(H.y-x.y)*(H.y-x.y);if(null==n||M<n)m=H,n=M}}null!=m&&(x=m)}return x};
var D=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,m){var n=D.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=m.state&&(n=m.state.view.graph.replacePlaceholders(m.state.cell,n));return n};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,
8))try{var m=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(m));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};
@@ -2561,153 +2562,153 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(B){return!mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(B){return l.apply(this,arguments)||this.graph.isTableRow(B)||this.graph.isTableCell(B)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
function(B){return u.apply(this,arguments)||this.graph.isEdgeIgnored(B)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(B){return this.graph.isCloneEvent(B)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var B=new mxEllipse(null,this.highlightColor,this.highlightColor,0);B.opacity=mxConstants.HIGHLIGHT_OPACITY;return B};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var Q in this.graph.currentEdgeStyle)B.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var S=this.previous.style.newEdgeStyle;if(null!=S)try{var X=JSON.parse(S);for(Q in X)B.style[Q]=X[Q]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};
-var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),Q=B.getCell;B.getCell=mxUtils.bind(this,function(S){var X=Q.apply(this,arguments);this.error=null;return X});
-return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),S=0;S<Q.length;S++)null!=
-this.currentEdgeStyle[Q[S]]&&(B+=Q[S]+"="+this.currentEdgeStyle[Q[S]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var Q in this.graph.currentEdgeStyle)B.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var X=JSON.parse(R);for(Q in X)B.style[Q]=X[Q]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};
+var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),Q=B.getCell;B.getCell=mxUtils.bind(this,function(R){var X=Q.apply(this,arguments);this.error=null;return X});
+return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<Q.length;R++)null!=
+this.currentEdgeStyle[Q[R]]&&(B+=Q[R]+"="+this.currentEdgeStyle[Q[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(B+="elbow="+this.currentEdgeStyle.elbow+";");return B=null!=this.currentEdgeStyle.html?B+("html="+this.currentEdgeStyle.html+";"):B+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var B=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,Q){Q=null!=Q?Q:{};for(var S=0;S<B.length;S++){var X=B[S];Q[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ja=0;ja<ia;ja++)this.createCellLookup([this.model.getChildAt(X,ja)],Q)}return Q};Graph.prototype.createCellMapping=function(B,Q,S){S=null!=S?S:{};for(var X in B){var ia=Q[X];null==S[ia]&&(S[ia]=B[X].getId()||"")}return S};Graph.prototype.importGraphModel=function(B,
-Q,S,X){Q=null!=Q?Q:0;S=null!=S?S:0;var ia=new mxCodec(B.ownerDocument),ja=new mxGraphModel;ia.decode(B,ja);B=[];ia={};var pa={},xa=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=this.createCellLookup([ja.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<xa.length;ja++)ua=this.model.getChildren(this.moveCells([xa[ja]],Q,S,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=
-ja.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,Q,S,!1,this.getDefaultParent()),pa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),X)){this.isGridEnabled()&&(Q=this.snap(Q),S=this.snap(S));var Ka=this.getBoundingBoxFromGeometry(B,!0);null!=Ka&&this.moveCells(B,Q-Ka.x,S-Ka.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var Q={},S=this.cloneCells(B,null,Q),X=
-new mxDictionary,ia=0;ia<B.length;ia++)X.put(B[ia],!0);var ja=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<S.length;ia++){pa.add(xa,S[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(S[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==X.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
-this.createCellLookup(B)),S);return ja.encode(pa)};Graph.prototype.isSwimlane=function(B,Q){var S=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(S=this.getCurrentCellStyle(B,Q)[mxConstants.STYLE_SHAPE]);return S==mxConstants.SHAPE_SWIMLANE||"table"==S||"tableRow"==S};var J=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&J.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):
-!0:!1};var R=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&R.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var Q=this.model.getParent(B);if(null!=Q){var S=this.getCurrentCellStyle(Q);if(null!=S.expand)return"0"!=S.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(B,Q,S,X,ia,ja,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ja,pa,null,!0,!1));S=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
-Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}S=P.apply(this,[B,Q,S,X,ia,ja,pa,xa]);this.model.setValue(S,"");var Ta=this.getChildCells(S,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(S,!1);
-if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[S]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[S]))}}finally{this.model.endUpdate()}return S};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,Q,S){if(Q||S)c.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ja=[],pa=
+B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,Q){Q=null!=Q?Q:{};for(var R=0;R<B.length;R++){var X=B[R];Q[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ja=0;ja<ia;ja++)this.createCellLookup([this.model.getChildAt(X,ja)],Q)}return Q};Graph.prototype.createCellMapping=function(B,Q,R){R=null!=R?R:{};for(var X in B){var ia=Q[X];null==R[ia]&&(R[ia]=B[X].getId()||"")}return R};Graph.prototype.importGraphModel=function(B,
+Q,R,X){Q=null!=Q?Q:0;R=null!=R?R:0;var ia=new mxCodec(B.ownerDocument),ja=new mxGraphModel;ia.decode(B,ja);B=[];ia={};var pa={},xa=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=this.createCellLookup([ja.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<xa.length;ja++)ua=this.model.getChildren(this.moveCells([xa[ja]],Q,R,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=
+ja.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,Q,R,!1,this.getDefaultParent()),pa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),X)){this.isGridEnabled()&&(Q=this.snap(Q),R=this.snap(R));var Ka=this.getBoundingBoxFromGeometry(B,!0);null!=Ka&&this.moveCells(B,Q-Ka.x,R-Ka.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var Q={},R=this.cloneCells(B,null,Q),X=
+new mxDictionary,ia=0;ia<B.length;ia++)X.put(B[ia],!0);var ja=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==X.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
+this.createCellLookup(B)),R);return ja.encode(pa)};Graph.prototype.isSwimlane=function(B,Q){var R=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(R=this.getCurrentCellStyle(B,Q)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var J=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&J.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):
+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&S.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var Q=this.model.getParent(B);if(null!=Q){var R=this.getCurrentCellStyle(Q);if(null!=R.expand)return"0"!=R.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
+Graph.prototype.splitEdge=function(B,Q,R,X,ia,ja,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ja,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
+Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}R=P.apply(this,[B,Q,R,X,ia,ja,pa,xa]);this.model.setValue(R,"");var Ta=this.getChildCells(R,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);
+if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,Q,R){if(Q||R)c.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ja=[],pa=
mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ja.push(xa),xa==X)ia=ja.length-1;else if(B&&null==X&&0<ja.length||null!=ia&&B&&ja.length>ia||!B&&0<ia)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ja.length&&(ia=null!=ia?mxUtils.mod(ia+(B?1:-1),ja.length):0,this.setSelectionCell(ja[ia]))}};Graph.prototype.swapShapes=function(B,Q){if(this.model.isVertex(B)&&this.model.isVertex(Q)&&
-2==this.getMovableCells([B,Q]).length){var S=this.getCellGeometry(B),X=this.getCellGeometry(Q);if(null!=S&&null!=X){var ia=S.clone(),ja=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-S.width/2,ia.y=X.getCenterY()-S.height/2,ja.x=S.getCenterX()-X.width/2,ja.y=S.getCenterY()-X.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(Q,ja)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,Q,S,X,ia,ja,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=
+2==this.getMovableCells([B,Q]).length){var R=this.getCellGeometry(B),X=this.getCellGeometry(Q);if(null!=R&&null!=X){var ia=R.clone(),ja=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-R.width/2,ia.y=X.getCenterY()-R.height/2,ja.x=R.getCenterX()-X.width/2,ja.y=R.getCenterY()-X.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(Q,ja)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,Q,R,X,ia,ja,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=
[],ra=0;ra<B.length;ra++)this.isTable(B[ra])?xa=xa.concat(this.model.getChildCells(B[ra],!0).reverse()):xa.push(B[ra]);B=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<B.length;ra++)if(null!=ia&&this.isTableRow(B[ra])){var ua=this.model.getParent(B[ra]),Ka=this.getCellGeometry(B[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ka&&this.isTable(ua)&&this.isTable(ia)&&(X||ua!=ia)){if(!X){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ka.height,this.model.setGeometry(ua,
Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ka.height,this.model.setGeometry(ia,Va));var Oa=this.model.getChildCells(ia,!0);if(0<Oa.length){B[ra]=X?this.cloneCell(B[ra]):B[ra];var Ta=this.model.getChildCells(B[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Ta.length;if(0<Pa)for(var Ra=0;Ra<Pa;Ra++){var fb=this.cloneCell(Ta[Ta.length-1]);null!=fb&&(fb.value="",this.model.add(B[ra],fb))}else if(0>Pa)for(Ra=0;Ra>Pa;Ra--)this.model.remove(Ta[Ta.length+Ra-1]);Ta=this.model.getChildCells(B[ra],
!0);for(Ra=0;Ra<Za.length;Ra++){var eb=this.getCellGeometry(Za[Ra]),bb=this.getCellGeometry(Ta[Ra]);null!=eb&&null!=bb&&(bb=bb.clone(),bb.width=eb.width,this.model.setGeometry(Ta[Ra],bb))}}}}var db=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!X&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);X&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(B)),db)}finally{this.model.endUpdate()}return db};var m=Graph.prototype.removeCells;
-Graph.prototype.removeCells=function(B,Q){var S=[];this.model.beginUpdate();try{for(var X=0;X<B.length;X++)if(this.isTableCell(B[X])){var ia=this.model.getParent(B[X]),ja=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(S,ja)&&S.push(ja):this.labelChanged(B[X],"")}else{if(this.isTableRow(B[X])&&(ja=this.model.getParent(B[X]),0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(S,ja))){for(var pa=this.model.getChildCells(ja,
-!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&S.push(ja)}S.push(B[X])}S=m.apply(this,[S,Q])}finally{this.model.endUpdate()}return S};Graph.prototype.updateCustomLinks=function(B,Q,S){S=null!=S?S:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&S.updateCustomLinksForCell(B,Q[X],S)};Graph.prototype.updateCustomLinksForCell=function(B,Q){this.doUpdateCustomLinksForCell(B,Q);for(var S=this.model.getChildCount(Q),X=0;X<S;X++)this.updateCustomLinksForCell(B,this.model.getChildAt(Q,
-X))};Graph.prototype.doUpdateCustomLinksForCell=function(B,Q){};Graph.prototype.getAllConnectionConstraints=function(B,Q){if(null!=B){Q=mxUtils.getValue(B.style,"points",null);if(null!=Q){B=[];try{var S=JSON.parse(Q);for(Q=0;Q<S.length;Q++){var X=S[Q];B.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ja){}return B}if(null!=B.shape&&null!=B.shape.bounds){X=B.shape.direction;Q=B.shape.bounds;var ia=B.shape.scale;S=Q.width/
-ia;Q=Q.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=S,S=Q,Q=X;Q=B.shape.getConstraints(B.style,S,Q);if(null!=Q)return Q;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var Q=this.getCurrentCellStyle(B);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
-mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[B])}};Graph.prototype.isValidRoot=function(B){for(var Q=this.model.getChildCount(B),S=0,X=0;X<Q;X++){var ia=this.model.getChildAt(B,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||S++)}return 0<S||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,Q,S){for(var X=this.getCurrentCellStyle(B),ia=!0,ja=!0,pa=0;pa<Q.length&&ja;pa++)ia=ia&&this.isTable(Q[pa]),
-ja=ja&&this.isTableRow(Q[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,Q,S)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ja||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var Q=
-mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=B&&null!=this.layoutManager){var S=this.model.getParent(B);null!=S&&(S=this.layoutManager.getLayout(S),null!=S&&S.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(B,Q,S){S=null!=S?S:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,S&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
-function(B,Q){var S=this.getModel(),X=[];S.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ja=B[ia];if(S.isEdge(ja)){var pa=S.getTerminal(ja,!0),xa=S.getTerminal(ja,!1);S.setTerminal(ja,xa,!0);S.setTerminal(ja,pa,!1);var ra=S.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);S.setGeometry(ja,ra);var Va=this.view.getState(ja),Oa=this.view.getState(pa),Ta=
+Graph.prototype.removeCells=function(B,Q){var R=[];this.model.beginUpdate();try{for(var X=0;X<B.length;X++)if(this.isTableCell(B[X])){var ia=this.model.getParent(B[X]),ja=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja)&&R.push(ja):this.labelChanged(B[X],"")}else{if(this.isTableRow(B[X])&&(ja=this.model.getParent(B[X]),0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja))){for(var pa=this.model.getChildCells(ja,
+!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&R.push(ja)}R.push(B[X])}R=m.apply(this,[R,Q])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(B,Q,R){R=null!=R?R:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&R.updateCustomLinksForCell(B,Q[X],R)};Graph.prototype.updateCustomLinksForCell=function(B,Q){this.doUpdateCustomLinksForCell(B,Q);for(var R=this.model.getChildCount(Q),X=0;X<R;X++)this.updateCustomLinksForCell(B,this.model.getChildAt(Q,
+X))};Graph.prototype.doUpdateCustomLinksForCell=function(B,Q){};Graph.prototype.getAllConnectionConstraints=function(B,Q){if(null!=B){Q=mxUtils.getValue(B.style,"points",null);if(null!=Q){B=[];try{var R=JSON.parse(Q);for(Q=0;Q<R.length;Q++){var X=R[Q];B.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ja){}return B}if(null!=B.shape&&null!=B.shape.bounds){X=B.shape.direction;Q=B.shape.bounds;var ia=B.shape.scale;R=Q.width/
+ia;Q=Q.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=R,R=Q,Q=X;Q=B.shape.getConstraints(B.style,R,Q);if(null!=Q)return Q;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var Q=this.getCurrentCellStyle(B);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
+mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[B])}};Graph.prototype.isValidRoot=function(B){for(var Q=this.model.getChildCount(B),R=0,X=0;X<Q;X++){var ia=this.model.getChildAt(B,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,Q,R){for(var X=this.getCurrentCellStyle(B),ia=!0,ja=!0,pa=0;pa<Q.length&&ja;pa++)ia=ia&&this.isTable(Q[pa]),
+ja=ja&&this.isTableRow(Q[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,Q,R)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ja||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var Q=
+mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=B&&null!=this.layoutManager){var R=this.model.getParent(B);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(B,Q,R){R=null!=R?R:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,R&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
+function(B,Q){var R=this.getModel(),X=[];R.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ja=B[ia];if(R.isEdge(ja)){var pa=R.getTerminal(ja,!0),xa=R.getTerminal(ja,!1);R.setTerminal(ja,xa,!0);R.setTerminal(ja,pa,!1);var ra=R.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);R.setGeometry(ja,ra);var Va=this.view.getState(ja),Oa=this.view.getState(pa),Ta=
this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ja,pa,!0,Pa);this.setConnectionConstraint(ja,xa,!1,Za);var Ra=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-Ra,[ja])}X.push(ja)}}else if(S.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;S.setGeometry(ja,ra)}var eb=this.view.getState(ja);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
-mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ja])}X.push(ja)}}}finally{S.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof
-mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var Q=B.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var S=this.view.getState(Q);null!=S&&null!=S.shape&&(this.view.invalidate(Q),S.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};
-Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var Q=0;Q<B.length;Q++){var S=this.view.getState(B[Q]);null!=S&&null!=S.shape&&null!=S.shape.stencil&&this.stencilHasPlaceholders(S.shape.stencil)?this.removeStateForCell(B[Q]):this.isReplacePlaceholders(B[Q])&&this.view.invalidate(B[Q],!1,!1)}};Graph.prototype.replaceElement=function(B,Q){Q=B.ownerDocument.createElement(null!=Q?Q:"span");for(var S=Array.prototype.slice.call(B.attributes);attr=
-S.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=B.innerHTML;B.parentNode.replaceChild(Q,B)};Graph.prototype.processElements=function(B,Q){if(null!=B){B=B.getElementsByTagName("*");for(var S=0;S<B.length;S++)null!=B[S]&&Q(B[S])}};Graph.prototype.updateLabelElements=function(B,Q,S){B=null!=B?B:this.getSelectionCells();for(var X=document.createElement("div"),ia=0;ia<B.length;ia++){var ja=this.getCurrentCellStyle(B[ia]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(B[ia]),
-null!=ja&&0<ja.length)){X.innerHTML=Graph.sanitizeHtml(ja);for(var pa=X.getElementsByTagName(null!=S?S:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ja&&this.cellLabelChanged(B[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,Q,S){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var X=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||
+Ra,[ja])}X.push(ja)}}else if(R.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;R.setGeometry(ja,ra)}var eb=this.view.getState(ja);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ja])}X.push(ja)}}}finally{R.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof
+mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var Q=B.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var R=this.view.getState(Q);null!=R&&null!=R.shape&&(this.view.invalidate(Q),R.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};
+Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var Q=0;Q<B.length;Q++){var R=this.view.getState(B[Q]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(B[Q]):this.isReplacePlaceholders(B[Q])&&this.view.invalidate(B[Q],!1,!1)}};Graph.prototype.replaceElement=function(B,Q){Q=B.ownerDocument.createElement(null!=Q?Q:"span");for(var R=Array.prototype.slice.call(B.attributes);attr=
+R.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=B.innerHTML;B.parentNode.replaceChild(Q,B)};Graph.prototype.processElements=function(B,Q){if(null!=B){B=B.getElementsByTagName("*");for(var R=0;R<B.length;R++)null!=B[R]&&Q(B[R])}};Graph.prototype.updateLabelElements=function(B,Q,R){B=null!=B?B:this.getSelectionCells();for(var X=document.createElement("div"),ia=0;ia<B.length;ia++){var ja=this.getCurrentCellStyle(B[ia]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(B[ia]),
+null!=ja&&0<ja.length)){X.innerHTML=Graph.sanitizeHtml(ja);for(var pa=X.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ja&&this.cellLabelChanged(B[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,Q,R){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var X=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||
null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(X)){this.setAttributeForCell(ia,X,Q);break}ia=this.model.getParent(ia)}var ja=B.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,Q):ja.setAttribute("label",Q);Q=ja}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(B){if(null!=B){for(var Q=new mxDictionary,
-S=0;S<B.length;S++)Q.put(B[S],!0);var X=[];for(S=0;S<B.length;S++){var ia=this.model.getParent(B[S]);null==ia||Q.get(ia)||(Q.put(ia,!0),X.push(ia))}for(S=0;S<X.length;S++)if(ia=this.view.getState(X[S]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ja=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&ja;pa++)Q.get(this.model.getChildAt(ia.cell,pa))||(ja=!1);ja&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var Q=[],S=0;S<B.length;S++)this.isCellDeletable(B[S])&&this.isTransparentState(this.view.getState(B[S]))&&Q.push(B[S]);B=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,Q){this.setAttributeForCell(B,"link",Q)};Graph.prototype.setTooltipForCell=function(B,Q){var S="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(S="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,S,Q)};Graph.prototype.getAttributeForCell=function(B,Q,S){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(Q):null;return null!=B?B:S};Graph.prototype.setAttributeForCell=function(B,Q,S){if(null!=B.value&&"object"==typeof B.value)var X=B.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",B.value||"");null!=S?X.setAttribute(Q,S):X.removeAttribute(Q);
-this.model.setValue(B,X)};Graph.prototype.isTargetShape=function(B,Q,S){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(S=0;S<Q.length;S++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[S]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,Q,S,X){if(mxEvent.isAltDown(Q))return null;for(var ia=0;ia<B.length;ia++){var ja=this.model.getParent(B[ia]);if(this.model.isEdge(ja)&&
+R=0;R<B.length;R++)Q.put(B[R],!0);var X=[];for(R=0;R<B.length;R++){var ia=this.model.getParent(B[R]);null==ia||Q.get(ia)||(Q.put(ia,!0),X.push(ia))}for(R=0;R<X.length;R++)if(ia=this.view.getState(X[R]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ja=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&ja;pa++)Q.get(this.model.getChildAt(ia.cell,pa))||(ja=!1);ja&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var Q=[],R=0;R<B.length;R++)this.isCellDeletable(B[R])&&this.isTransparentState(this.view.getState(B[R]))&&Q.push(B[R]);B=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,Q){this.setAttributeForCell(B,"link",Q)};Graph.prototype.setTooltipForCell=function(B,Q){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,R,Q)};Graph.prototype.getAttributeForCell=function(B,Q,R){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(Q):null;return null!=B?B:R};Graph.prototype.setAttributeForCell=function(B,Q,R){if(null!=B.value&&"object"==typeof B.value)var X=B.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",B.value||"");null!=R?X.setAttribute(Q,R):X.removeAttribute(Q);
+this.model.setValue(B,X)};Graph.prototype.isTargetShape=function(B,Q,R){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(R=0;R<Q.length;R++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,Q,R,X){if(mxEvent.isAltDown(Q))return null;for(var ia=0;ia<B.length;ia++){var ja=this.model.getParent(B[ia]);if(this.model.isEdge(ja)&&
0>mxUtils.indexOf(B,ja))return null}ja=x.apply(this,arguments);var pa=!0;for(ia=0;ia<B.length&&pa;ia++)pa=pa&&this.isTableRow(B[ia]);pa&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||(ja=null));return ja};Graph.prototype.click=function(B){mxGraph.prototype.click.call(this,B);this.firstClickState=B.getState();this.firstClickSource=B.getSource()};Graph.prototype.dblClick=function(B,Q){this.isEnabled()&&(Q=this.insertTextForEvent(B,
-Q),mxGraph.prototype.dblClick.call(this,B,Q))};Graph.prototype.insertTextForEvent=function(B,Q){var S=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ia=mxEvent.getSource(B);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,S.x,S.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(B)))||
-(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(S.x,S.y))),Q=this.addText(S.x,S.y,X))}return Q};Graph.prototype.getInsertPoint=function(){var B=this.getGridSize(),Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,S=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
-ia=this.getPageSize();Q=Math.max(Q,X.x*ia.width);S=Math.max(S,X.y*ia.height)}return new mxPoint(this.snap(Q+B),this.snap(S+B))};Graph.prototype.getFreeInsertPoint=function(){var B=this.view,Q=this.getGraphBounds(),S=this.getInsertPoint(),X=this.snap(Math.round(Math.max(S.x,Q.x/B.scale-B.translate.x+(0==Q.width?2*this.gridSize:0))));B=this.snap(Math.round(Math.max(S.y,(Q.y+Q.height)/B.scale-B.translate.y+2*this.gridSize)));return new mxPoint(X,B)};Graph.prototype.getCenterInsertPoint=function(B){B=
+Q),mxGraph.prototype.dblClick.call(this,B,Q))};Graph.prototype.insertTextForEvent=function(B,Q){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ia=mxEvent.getSource(B);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(B)))||
+(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(R.x,R.y))),Q=this.addText(R.x,R.y,X))}return Q};Graph.prototype.getInsertPoint=function(B){B=this.getGridSize();var Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
+ia=this.getPageSize();Q=Math.max(Q,X.x*ia.width);R=Math.max(R,X.y*ia.height)}return new mxPoint(this.snap(Q+B),this.snap(R+B))};Graph.prototype.getFreeInsertPoint=function(B){var Q=this.view,R=this.getGraphBounds(),X=this.getInsertPoint(B);B=this.snap(Math.round(Math.max(X.x,R.x/Q.scale-Q.translate.x+(0==R.width?2*this.gridSize:0))));Q=this.snap(Math.round(Math.max(X.y,(R.y+R.height)/Q.scale-Q.translate.y+2*this.gridSize)));return new mxPoint(B,Q)};Graph.prototype.getCenterInsertPoint=function(B){B=
null!=B?B:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-B.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round(this.container.clientHeight/
-2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,Q){B=null!=B?B:"";null!=Q&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+Q+";");return B};Graph.prototype.addText=function(B,Q,S){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=S&&this.model.isEdge(S.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(S,B,Q);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(S,X.geometry);var ja=this.view.scale;X.geometry.offset=new mxPoint(Math.round((B-ia.x)/ja),Math.round((Q-ia.y)/ja))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
-40,X.geometry.height=20,X.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=S?S.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ia.y-(null!=S?S.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=S?S.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(B,Q,S){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
+2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,Q){B=null!=B?B:"";null!=Q&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+Q+";");return B};Graph.prototype.addText=function(B,Q,R){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(R,B,Q);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,X.geometry);var ja=this.view.scale;X.geometry.offset=new mxPoint(Math.round((B-ia.x)/ja),Math.round((Q-ia.y)/ja))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
+40,X.geometry.height=20,X.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=R?R.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ia.y-(null!=R?R.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(B,Q,R){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ka=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ka&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ka),null!=Q&&mxEvent.addGestureListeners(ra[ua],null,null,Q))}});this.model.addListener(mxEvent.CHANGE,X);X();var ia=this.container.style.cursor,ja=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=B&&""!=B&&B!=mxConstants.NONE?new mxCellHighlight(pa,B,4):null,startX:0,
startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ua=ra.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ra=pa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ka,Va,Oa){return null==pa.getLinkForCell(Ka.cell)}),ua=null==ua||pa.model.isAncestor(ra,ua.cell)?pa.view.getState(ra):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ua){this.startX=
ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ja||ua>ja)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;
null!=ra?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ra,ua){var Ka=ua.getSource();for(ra=ua.getEvent();null!=Ka&&"a"!=Ka.nodeName.toLowerCase();)Ka=Ka.parentNode;null==Ka&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<
ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ka=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ka||null==Q||Q(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:
-mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=S&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&Math.abs(this.startX-ua.getGraphX())<ja&&Math.abs(this.startY-ua.getGraphY())<ja&&S(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
+mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&Math.abs(this.startX-ua.getGraphX())<ja&&Math.abs(this.startY-ua.getGraphY())<ja&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(B,Q){B=null!=B?B:this.getSelectionCells();
-Q=null!=Q?Q:!0;for(var S=0;S<B.length;S++)this.isTableCell(B[S])&&(B[S]=this.model.getParent(B[S]));B=this.model.getTopmostCells(B);var X=this.getModel(),ia=this.gridSize,ja=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(S=0;S<B.length;S++){var ua=X.getParent(B[S]);if(null!=ua){var Ka=this.moveCells([ra[S]],ia,ia,!1)[0];ja.push(Ka);if(Q)X.add(ua,ra[S]);else{var Va=ua.getIndex(B[S]);X.add(ua,ra[S],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[S]),
-Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ja.push(ra[S])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ja};Graph.prototype.insertImage=function(B,Q,S){if(null!=B&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ja=0;ja<X.length;ja++)ia.push(X[ja]);document.execCommand("insertimage",
-!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ja=B.length-1;0<=ja;ja--)if(0==ja||B[ja]!=ia[ja-1]){B[ja].setAttribute("width",Q);B[ja].setAttribute("height",S);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),S=[],X=0;X<Q.length;X++)S.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(B));
-Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==S.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=S[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(S=Q[0].parentNode;null!=Q[0].firstChild;)S.insertBefore(Q[0].firstChild,Q[0]);S.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),S=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&
-!this.isTableRow(B)&&(Q||"0"!=mxUtils.getValue(S,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==S[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,Q,S){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ia=null,ja=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ja=null!=ja?Math.min(ja,ua):ua;S&&(pa+=B?ra.width:ra.height);
-X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});S&&(pa-=B?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ja=ja/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ia-ja-pa)/(X.length-1),Va=ja+(S?B?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
-Oa&&(Ta=Ta.clone(),B?Ta.x=Math.round(Va-(S?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(S?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));S&&(Va+=B?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(S,X,ia){X.setAttribute("data-cell-id",S.id);if(ia)if(mxUtils.isNode(S.value))for(ia=
-0;ia<S.value.attributes.length;ia++){var ja=S.value.attributes[ia];X.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof S.value)for(ja in S.value)X.setAttribute("data-cell-"+ja,S.value[ja]);else null!=S.value&&X.setAttribute("data-cell-value",S.value);return X};var Q=B.visitStatesRecursive;B.visitStatesRecursive=function(S,X,ia){if(null!=S){var ja=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(S.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
-Editor.addSvgMetadata);ja.appendChild(X.root);Q.apply(this,arguments);X.root=ja}};B.getLinkForCellState=mxUtils.bind(this,function(S,X){return this.getLinkForCell(S.cell)});B.getTitleForCellState=mxUtils.bind(this,function(S,X){return Editor.convertHtmlToText(this.convertValueToTooltip(S.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var Q=null;null!=B&&0<B.length&&(B=JSON.parse(B),Q=new mxImage(B.src,B.width,B.height));return Q};Graph.prototype.getBackgroundImageObject=function(B){return B};
-Graph.prototype.getSvg=function(B,Q,S,X,ia,ja,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ia=0;ia<Ta.length;ia++)Ra.put(Ta[ia],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;S=null!=S?S:0;ja=null!=ja?ja:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ja&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
-this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*S)+(ua&&0==S?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*S)+(ua&&0==S?5:0),gb=mxUtils.getLightDarkColor(B),qb=
-Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=B){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(S/Q-eb.x/mb),Math.floor(S/Q-eb.y/mb));ob.idPrefix=
+Q=null!=Q?Q:!0;for(var R=0;R<B.length;R++)this.isTableCell(B[R])&&(B[R]=this.model.getParent(B[R]));B=this.model.getTopmostCells(B);var X=this.getModel(),ia=this.gridSize,ja=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(R=0;R<B.length;R++){var ua=X.getParent(B[R]);if(null!=ua){var Ka=this.moveCells([ra[R]],ia,ia,!1)[0];ja.push(Ka);if(Q)X.add(ua,ra[R]);else{var Va=ua.getIndex(B[R]);X.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),
+Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ja.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ja};Graph.prototype.insertImage=function(B,Q,R){if(null!=B&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ja=0;ja<X.length;ja++)ia.push(X[ja]);document.execCommand("insertimage",
+!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ja=B.length-1;0<=ja;ja--)if(0==ja||B[ja]!=ia[ja-1]){B[ja].setAttribute("width",Q);B[ja].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),R=[],X=0;X<Q.length;X++)R.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(B));
+Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==R.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=R[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(R=Q[0].parentNode;null!=Q[0].firstChild;)R.insertBefore(Q[0].firstChild,Q[0]);R.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&
+!this.isTableRow(B)&&(Q||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,Q,R){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ia=null,ja=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ja=null!=ja?Math.min(ja,ua):ua;R&&(pa+=B?ra.width:ra.height);
+X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=B?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ja=ja/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ia-ja-pa)/(X.length-1),Va=ja+(R?B?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
+Oa&&(Ta=Ta.clone(),B?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));R&&(Va+=B?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(R,X,ia){X.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=
+0;ia<R.value.attributes.length;ia++){var ja=R.value.attributes[ia];X.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof R.value)for(ja in R.value)X.setAttribute("data-cell-"+ja,R.value[ja]);else null!=R.value&&X.setAttribute("data-cell-value",R.value);return X};var Q=B.visitStatesRecursive;B.visitStatesRecursive=function(R,X,ia){if(null!=R){var ja=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
+Editor.addSvgMetadata);ja.appendChild(X.root);Q.apply(this,arguments);X.root=ja}};B.getLinkForCellState=mxUtils.bind(this,function(R,X){return this.getLinkForCell(R.cell)});B.getTitleForCellState=mxUtils.bind(this,function(R,X){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var Q=null;null!=B&&0<B.length&&(B=JSON.parse(B),Q=new mxImage(B.src,B.width,B.height));return Q};Graph.prototype.getBackgroundImageObject=function(B){return B};
+Graph.prototype.getSvg=function(B,Q,R,X,ia,ja,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ia=0;ia<Ta.length;ia++)Ra.put(Ta[ia],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;R=null!=R?R:0;ja=null!=ja?ja:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ja&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
+this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*R)+(ua&&0==R?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*R)+(ua&&0==R?5:0),gb=mxUtils.getLightDarkColor(B),qb=
+Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=B){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(R/Q-eb.x/mb),Math.floor(R/Q-eb.y/mb));ob.idPrefix=
"drawio-svg-"+Editor.guid();var rb=document.createElement("div"),vb=ob.getAlternateText;ob.getAlternateText=function(jb,Bb,tb,xb,zb,sb,Db,d,p,A,t,z,E){if(null!=sb&&0<this.state.fontSize)try{mxUtils.isNode(sb)?sb=sb.innerText:(rb.innerHTML=sb,sb=mxUtils.extractTextWithWhitespace(rb.childNodes));for(var G=Math.ceil(2*xb/this.state.fontSize),ea=[],O=0,ta=0;(0==G||O<G)&&ta<sb.length;){var ma=sb.charCodeAt(ta);if(10==ma||13==ma){if(0<O)break}else ea.push(sb.charAt(ta)),255>ma&&O++;ta++}ea.length<sb.length&&
1<sb.length-ea.length&&(sb=mxUtils.trim(ea.join(""))+"...");return sb}catch(ab){return vb.apply(this,arguments)}else return vb.apply(this,arguments)};if(null!=bb&&null!=bb.width&&null!=bb.height){B=mb/Q;var Ab=new mxRectangle((bb.x+db.x)*B,(bb.y+db.y)*B,bb.width*B,bb.height*B);mxUtils.intersects(eb,Ab)&&ob.image(bb.x+db.x,bb.y+db.y,bb.width,bb.height,bb.src,!0)}ob.scale(X);ob.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var Cb=xa.getLinkForCellState;xa.getLinkForCellState=function(jb,
Bb){var tb=jb.view.graph.getAbsoluteUrl(Cb.apply(this,arguments));return null==tb||jb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(jb,Bb){return jb.view.graph.getLinkTargetForCell(jb.cell)};var Eb=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"+Editor.guid();var jb=null!=ub.createElementNS?ub.createElementNS(mxConstants.NS_SVG,"style"):ub.createElement("style");jb.innerHTML=this.createFlowAnimationCss(yb);ub.getElementsByTagName("defs")[0].appendChild(jb)}return yb});
xa.drawCellState=function(jb,Bb){for(var tb=jb.view.graph,xb=null!=Ra?Ra.get(jb.cell):tb.isCellSelected(jb.cell),zb=tb.model.getParent(jb.cell);!(ja&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):tb.isCellSelected(zb),zb=tb.model.getParent(zb);if(null!=jb.shape)try{var sb=jb.shape.isFlowAnimationEnabled,Db=jb.shape.addFlowAnimationToShape;jb.shape.isFlowAnimationEnabled=function(){return fb&&tb.model.isEdge(jb.cell)&&"1"==mxUtils.getValue(jb.style,"flowAnimation","0")};jb.shape.addFlowAnimationToShape=
function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),jb.style,Q,wb())};if(ja&&null==Ra||xb)tb.view.redrawEnumerationState(jb),Eb.apply(this,arguments),this.doDrawShape(jb.secondLabel,Bb)}finally{jb.shape.isFlowAnimationEnabled=sb,jb.shape.addFlowAnimationToShape=Db}};var kb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(kb),ob);this.addForeignObjectWarning(ob,qb);Pa?this.disableSvgLinks(qb):this.updateSvgLinks(qb,ra,!0);return qb}finally{this.enableFlowAnimation=
-fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var S=B.createElement("switch"),X=B.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
-(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);S.appendChild(X);ia.appendChild(B);S.appendChild(ia);Q.appendChild(S)}};
-Graph.prototype.disableSvgLinks=function(B,Q){B=B.getElementsByTagName("a");for(var S=0;S<B.length;S++){var X=B[S].getAttribute("href");null==X&&(X=B[S].getAttribute("xlink:href"));null!=X&&(B[S].style.pointerEvents="none",B[S].setAttribute("href",""));Q&&Q(B[S])}};Graph.prototype.updateSvgLinks=function(B,Q,S){B=B.getElementsByTagName("a");for(var X=0;X<B.length;X++)if(null==B[X].getAttribute("target")){var ia=B[X].getAttribute("href");null==ia&&(ia=B[X].getAttribute("xlink:href"));null!=ia&&(null!=
-Q&&/^https?:\/\//.test(ia)?B[X].setAttribute("target",Q):S&&this.isCustomLink(ia)&&B[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(B=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,Q,S){for(;null!=B&&B.nodeName!=Q;){if(B==S)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,Q,S){for(;null!=B&&!(0<=mxUtils.indexOf(Q,B.nodeName));){if(B==S)return null;
-B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var S=document.createRange();S.selectNode(B);Q.removeAllRanges();Q.addRange(S)}}else(Q=document.selection)&&"Control"!=Q.type&&(B=Q.createRange(),B.collapse(!0),S=Q.createRange(),S.setEndPoint("StartToStart",B),S.select())};Graph.prototype.flipEdgePoints=function(B,Q,S){var X=this.getCellGeometry(B);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=
-0;ia<X.points.length;ia++)Q?X.points[ia].x=S+(S-X.points[ia].x):X.points[ia].y=S+(S-X.points[ia].y);ia=function(ja){null!=ja&&(Q?ja.x=S+(S-ja.x):ja.y=S+(S-ja.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(B,X)}};Graph.prototype.flipChildren=function(B,Q,S){this.model.beginUpdate();try{for(var X=this.model.getChildCount(B),ia=0;ia<X;ia++){var ja=this.model.getChildAt(B,ia);if(this.model.isEdge(ja))this.flipEdgePoints(ja,Q,S);else{var pa=this.getCellGeometry(ja);null!=
-pa&&(pa=pa.clone(),Q?pa.x=S+(S-pa.x-pa.width):pa.y=S+(S-pa.y-pa.height),this.model.setGeometry(ja,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,Q){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var S=[],X=0;X<B.length;X++)if(this.model.isEdge(B[X])){var ia=this.view.getState(B[X]);null!=ia&&this.flipEdgePoints(B[X],Q,(Q?ia.getCenterX():ia.getCenterY())/this.view.scale-(Q?ia.origin.x:ia.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ja=
-this.getCellGeometry(B[X]);null!=ja&&this.flipChildren(B[X],Q,Q?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);S.push(B[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,S)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,Q){var S=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var X=0;X<B.length;X++){var ia=this.model.getParent(B[X]);if(this.isTable(ia)){var ja=this.getCellGeometry(B[X]),pa=this.getCellGeometry(ia);null!=ja&&null!=pa&&
-(pa=pa.clone(),pa.height-=ja.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(B):null;this.removeCells(B,Q)}finally{this.model.endUpdate()}if(null!=xa)for(S=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&S.push(xa[X])}return S};Graph.prototype.insertTableColumn=function(B,Q){var S=this.getModel();S.beginUpdate();try{var X=B,ia=0;if(this.isTableCell(B)){var ja=S.getParent(B);X=S.getParent(ja);
-ia=mxUtils.indexOf(S.getChildCells(ja,!0),B)}else this.isTableRow(B)?X=S.getParent(B):B=S.getChildCells(X,!0)[0],Q||(ia=S.getChildCells(B,!0).length-1);var pa=S.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=S.getChildCells(pa[B],!0)[ia],ua=S.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
-Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ka.height=Va.height)}S.add(pa[B],ua,ia+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,S.setGeometry(X,Oa))}finally{S.endUpdate()}};Graph.prototype.deleteLane=function(B){var Q=this.getModel();Q.beginUpdate();try{var S=null;S="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:Q.getParent(B);var X=Q.getChildCells(S,!0);0==
-X.length?Q.remove(S):(S==B&&(B=X[X.length-1]),Q.remove(B))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(B,Q){var S=this.getModel();S.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){X=B;var ia=S.getChildCells(X,!0);B=ia[Q?0:ia.length-1]}else X=S.getParent(B);var ja=X.getIndex(B);B=S.cloneCell(B,!1);B.value=null;S.add(X,B,ja+(Q?0:1))}finally{S.endUpdate()}};Graph.prototype.insertTableRow=function(B,Q){var S=this.getModel();S.beginUpdate();try{var X=
-B,ia=B;if(this.isTableCell(B))ia=S.getParent(B),X=S.getParent(ia);else if(this.isTableRow(B))X=S.getParent(B);else{var ja=S.getChildCells(X,!0);ia=ja[Q?0:ja.length-1]}var pa=S.getChildCells(ia,!0),xa=X.getIndex(ia);ia=S.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ja=0;ja<pa.length;ja++){B=S.cloneCell(pa[ja],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&
-(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}S.add(X,ia,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,S.setGeometry(X,Ka))}}finally{S.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var Q=this.getModel();Q.beginUpdate();try{var S=B,X=B;this.isTableCell(B)&&(X=Q.getParent(B));this.isTableRow(X)&&(S=Q.getParent(X));var ia=Q.getChildCells(S,!0);if(0==ia.length)Q.remove(S);
-else{this.isTableRow(X)||(X=ia[0]);var ja=Q.getChildCells(X,!0);if(1>=ja.length)Q.remove(S);else{var pa=ja.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ja,B));for(X=B=0;X<ia.length;X++){var xa=Q.getChildCells(ia[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(S);null!=ua&&(ua=ua.clone(),ua.width-=B,Q.setGeometry(S,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var Q=this.getModel();Q.beginUpdate();
-try{var S=B,X=B;this.isTableCell(B)&&(B=X=Q.getParent(B));this.isTableRow(B)&&(S=Q.getParent(X));var ia=Q.getChildCells(S,!0);if(1>=ia.length)Q.remove(S);else{this.isTableRow(X)||(X=ia[ia.length-1]);Q.remove(X);B=0;var ja=this.getCellGeometry(X);null!=ja&&(B=ja.height);var pa=this.getCellGeometry(S);null!=pa&&(pa=pa.clone(),pa.height-=B,Q.setGeometry(S,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(B,Q){for(var S=B.tBodies[0],X=S.rows[0].cells,ia=B=0;ia<X.length;ia++){var ja=X[ia].getAttribute("colspan");
-B+=null!=ja?parseInt(ja):1}Q=S.insertRow(Q);for(ia=0;ia<B;ia++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(B,Q){B.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(B,Q){var S=B.tHead;if(null!=S)for(var X=0;X<S.rows.length;X++){var ia=document.createElement("th");S.rows[X].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(S=0;S<B.rows.length;S++)X=B.rows[S].insertCell(Q),mxUtils.br(X);return B.rows[0].cells[0<=Q?Q:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
-function(B,Q){if(0<=Q){B=B.tBodies[0].rows;for(var S=0;S<B.length;S++)B[S].cells.length>Q&&B[S].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var S=document.createElement("div");S.innerHTML=B;B=document.createDocumentFragment();for(var X;X=S.firstChild;)lastNode=B.appendChild(X);Q.insertNode(B)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(B)};
-Graph.prototype.createLinkForHint=function(B,Q,S){function X(ja,pa){ja.length>pa&&(ja=ja.substring(0,Math.round(pa/2))+"..."+ja.substring(ja.length-Math.round(pa/4)));return ja}B=null!=B?B:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",X(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&
-ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(Q,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(B,S);mxEvent.consume(ja)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,pa){this.popupMenuHandler.hideMenu()});var B=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=
-B.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var pa=this.getCellAt(ja.graphX,ja.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(pa),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var Q=!1,S=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ja,
-pa,xa){ja==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),S=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
-!X&&!xa&&(S&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
+fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var R=B.createElement("switch"),X=B.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
+(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);R.appendChild(X);ia.appendChild(B);R.appendChild(ia);Q.appendChild(R)}};
+Graph.prototype.disableSvgLinks=function(B,Q){B=B.getElementsByTagName("a");for(var R=0;R<B.length;R++){var X=B[R].getAttribute("href");null==X&&(X=B[R].getAttribute("xlink:href"));null!=X&&(B[R].style.pointerEvents="none",B[R].setAttribute("href",""));Q&&Q(B[R])}};Graph.prototype.updateSvgLinks=function(B,Q,R){B=B.getElementsByTagName("a");for(var X=0;X<B.length;X++)if(null==B[X].getAttribute("target")){var ia=B[X].getAttribute("href");null==ia&&(ia=B[X].getAttribute("xlink:href"));null!=ia&&(null!=
+Q&&/^https?:\/\//.test(ia)?B[X].setAttribute("target",Q):R&&this.isCustomLink(ia)&&B[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(B=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,Q,R){for(;null!=B&&B.nodeName!=Q;){if(B==R)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,Q,R){for(;null!=B&&!(0<=mxUtils.indexOf(Q,B.nodeName));){if(B==R)return null;
+B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var R=document.createRange();R.selectNode(B);Q.removeAllRanges();Q.addRange(R)}}else(Q=document.selection)&&"Control"!=Q.type&&(B=Q.createRange(),B.collapse(!0),R=Q.createRange(),R.setEndPoint("StartToStart",B),R.select())};Graph.prototype.flipEdgePoints=function(B,Q,R){var X=this.getCellGeometry(B);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=
+0;ia<X.points.length;ia++)Q?X.points[ia].x=R+(R-X.points[ia].x):X.points[ia].y=R+(R-X.points[ia].y);ia=function(ja){null!=ja&&(Q?ja.x=R+(R-ja.x):ja.y=R+(R-ja.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(B,X)}};Graph.prototype.flipChildren=function(B,Q,R){this.model.beginUpdate();try{for(var X=this.model.getChildCount(B),ia=0;ia<X;ia++){var ja=this.model.getChildAt(B,ia);if(this.model.isEdge(ja))this.flipEdgePoints(ja,Q,R);else{var pa=this.getCellGeometry(ja);null!=
+pa&&(pa=pa.clone(),Q?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ja,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,Q){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var R=[],X=0;X<B.length;X++)if(this.model.isEdge(B[X])){var ia=this.view.getState(B[X]);null!=ia&&this.flipEdgePoints(B[X],Q,(Q?ia.getCenterX():ia.getCenterY())/this.view.scale-(Q?ia.origin.x:ia.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ja=
+this.getCellGeometry(B[X]);null!=ja&&this.flipChildren(B[X],Q,Q?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);R.push(B[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,Q){var R=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var X=0;X<B.length;X++){var ia=this.model.getParent(B[X]);if(this.isTable(ia)){var ja=this.getCellGeometry(B[X]),pa=this.getCellGeometry(ia);null!=ja&&null!=pa&&
+(pa=pa.clone(),pa.height-=ja.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(B):null;this.removeCells(B,Q)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&R.push(xa[X])}return R};Graph.prototype.insertTableColumn=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=B,ia=0;if(this.isTableCell(B)){var ja=R.getParent(B);X=R.getParent(ja);
+ia=mxUtils.indexOf(R.getChildCells(ja,!0),B)}else this.isTableRow(B)?X=R.getParent(B):B=R.getChildCells(X,!0)[0],Q||(ia=R.getChildCells(B,!0).length-1);var pa=R.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=R.getChildCells(pa[B],!0)[ia],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
+Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ka.height=Va.height)}R.add(pa[B],ua,ia+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(X,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:Q.getParent(B);var X=Q.getChildCells(R,!0);0==
+X.length?Q.remove(R):(R==B&&(B=X[X.length-1]),Q.remove(B))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){X=B;var ia=R.getChildCells(X,!0);B=ia[Q?0:ia.length-1]}else X=R.getParent(B);var ja=X.getIndex(B);B=R.cloneCell(B,!1);B.value=null;R.add(X,B,ja+(Q?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=
+B,ia=B;if(this.isTableCell(B))ia=R.getParent(B),X=R.getParent(ia);else if(this.isTableRow(B))X=R.getParent(B);else{var ja=R.getChildCells(X,!0);ia=ja[Q?0:ja.length-1]}var pa=R.getChildCells(ia,!0),xa=X.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ja=0;ja<pa.length;ja++){B=R.cloneCell(pa[ja],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&
+(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}R.add(X,ia,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,R.setGeometry(X,Ka))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=B,X=B;this.isTableCell(B)&&(X=Q.getParent(B));this.isTableRow(X)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(0==ia.length)Q.remove(R);
+else{this.isTableRow(X)||(X=ia[0]);var ja=Q.getChildCells(X,!0);if(1>=ja.length)Q.remove(R);else{var pa=ja.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ja,B));for(X=B=0;X<ia.length;X++){var xa=Q.getChildCells(ia[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=B,Q.setGeometry(R,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var Q=this.getModel();Q.beginUpdate();
+try{var R=B,X=B;this.isTableCell(B)&&(B=X=Q.getParent(B));this.isTableRow(B)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(1>=ia.length)Q.remove(R);else{this.isTableRow(X)||(X=ia[ia.length-1]);Q.remove(X);B=0;var ja=this.getCellGeometry(X);null!=ja&&(B=ja.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=B,Q.setGeometry(R,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(B,Q){for(var R=B.tBodies[0],X=R.rows[0].cells,ia=B=0;ia<X.length;ia++){var ja=X[ia].getAttribute("colspan");
+B+=null!=ja?parseInt(ja):1}Q=R.insertRow(Q);for(ia=0;ia<B;ia++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(B,Q){B.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(B,Q){var R=B.tHead;if(null!=R)for(var X=0;X<R.rows.length;X++){var ia=document.createElement("th");R.rows[X].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(R=0;R<B.rows.length;R++)X=B.rows[R].insertCell(Q),mxUtils.br(X);return B.rows[0].cells[0<=Q?Q:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
+function(B,Q){if(0<=Q){B=B.tBodies[0].rows;for(var R=0;R<B.length;R++)B[R].cells.length>Q&&B[R].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var R=document.createElement("div");R.innerHTML=B;B=document.createDocumentFragment();for(var X;X=R.firstChild;)lastNode=B.appendChild(X);Q.insertNode(B)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(B)};
+Graph.prototype.createLinkForHint=function(B,Q,R){function X(ja,pa){ja.length>pa&&(ja=ja.substring(0,Math.round(pa/2))+"..."+ja.substring(ja.length-Math.round(pa/4)));return ja}B=null!=B?B:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",X(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&
+ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(Q,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(B,R);mxEvent.consume(ja)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,pa){this.popupMenuHandler.hideMenu()});var B=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=
+B.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var pa=this.getCellAt(ja.graphX,ja.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(pa),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var Q=!1,R=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ja,
+pa,xa){ja==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
+!X&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
mxCellEditor.prototype.isContentEditing=function(){var B=this.graph.view.getState(this.editingCell);return null!=B&&1==B.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var B="";window.getSelection?B=window.getSelection():document.getSelection?B=document.getSelection():document.selection&&(B=document.selection.createRange().text);return""!=
-B};mxCellEditor.prototype.insertTab=function(B){var Q=this.textarea.ownerDocument.defaultView.getSelection(),S=Q.getRangeAt(0);B=Graph.createTabNode(B);S.insertNode(B);S.setStartAfter(B);S.setEndAfter(B);Q.removeAllRanges();Q.addRange(S)};mxCellEditor.prototype.alignText=function(B,Q){var S=this.graph.getView().getState(this.editingCell);if(null!=S){S=mxUtils.getValue(S.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=S&&"vertical-"==S.substring(0,9),ia=null!=
+B};mxCellEditor.prototype.insertTab=function(B){var Q=this.textarea.ownerDocument.defaultView.getSelection(),R=Q.getRangeAt(0);B=Graph.createTabNode(B);R.insertNode(B);R.setStartAfter(B);R.setEndAfter(B);Q.removeAllRanges();Q.addRange(R)};mxCellEditor.prototype.alignText=function(B,Q){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=R&&"vertical-"==R.substring(0,9),ia=null!=
Q&&mxEvent.isShiftDown(Q);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ja=!0;this.graph.processElements(this.textarea,function(pa){ia||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ja=!1});(ja||X)&&this.graph.cellEditor.setAlign(B)}X||document.execCommand("justify"+B.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var B=window.getSelection();if(B.getRangeAt&&B.rangeCount){for(var Q=
-[],S=0,X=B.rangeCount;S<X;++S)Q.push(B.getRangeAt(S));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,S=B.length;Q<S;++Q)sel.addRange(B[Q])}else document.selection&&B.select&&B.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
+[],R=0,X=B.rangeCount;R<X;++R)Q.push(B.getRangeAt(R));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,R=B.length;Q<R;++Q)sel.addRange(B[Q])}else document.selection&&B.select&&B.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
function(B){null!=B.text&&(B.text.replaceLinefeeds="0"!=mxUtils.getValue(B.style,"nl2Br","1"));F.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(B,Q){this.isKeepFocusEvent(B)||!mxEvent.isAltDown(B.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(B){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(B,Q){B=this.graph.getStartEditingCell(B,Q);M.apply(this,arguments);var S=this.graph.view.getState(B);this.textarea.className=null!=S&&1==S.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);
-if(null!=B){var Q=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),S=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+mxCellEditor.prototype.startEditing=function(B,Q){B=this.graph.getStartEditingCell(B,Q);M.apply(this,arguments);var R=this.graph.view.getState(B);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);
+if(null!=B){var Q=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
Q=mxUtils.getValue(B.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
pa.push("underline");(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=
Q;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText=
"");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=S;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,Q){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var S=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*S;this.bounds.height=60*S;var X=null!=B.text?B.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,
-mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/S)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/S)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/S)+(this.textarea.offsetHeight-
-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*S);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/S)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*S);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+S+","+
-S+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,Q){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var S=this.graph.getEditingValue(B.cell,Q);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(S=S.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(S,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
+this.switchSelectionState=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,Q){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var R=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var X=null!=B.text?B.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,
+mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-
+this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+
+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,Q){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(B.cell,Q);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
mxCellEditor.prototype.setEditingValue=function(B,Q){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(B.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(B){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,
Graph.backupStyleAttribute);var Q=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(B.style,"nl2Br","1")?(Q=Q.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<Q.length&&("<br/>"==Q.substring(Q.length-5)||"<br>"==Q.substring(Q.length-4))&&(Q=Q.substring(0,Q.lastIndexOf("<br"))+"<div><br/></div>")):Q=Q.replace(/\r\n/g,"").replace(/\n/g,"");return Q};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(B){this.codeViewMode&&this.toggleViewMode();K.apply(this,
arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(B,Q){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==Q&&this.graph.isCellDeletable(B.cell)&&0==this.graph.model.getChildCount(B.cell)&&this.graph.isTransparentState(B)&&this.graph.removeCells([B.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getBorderColor=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getMinimumSize=function(B){var Q=this.graph.getView().scale;return new mxRectangle(0,0,null==B.text?30:B.text.size*Q+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(B,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,S=this.graph.view.scale;B=this.roundLength((this.bounds.x+
-this.currentDx)/S-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/S-Q.y);S=this.graph.view.unit;this.hint.innerHTML=f(B,S)+", "+f(Q,S);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
-var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,Q){ha.apply(this,arguments);var S=this.graph.getCellStyle(B);if(null==S.childLayout){var X=this.graph.model.getParent(B),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(S=this.graph.getCellStyle(X),"stackLayout"==S.childLayout)){var ja=parseFloat(mxUtils.getValue(S,"stackBorder",mxStackLayout.prototype.border));S="1"==mxUtils.getValue(S,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
-ia=ia.clone();S?ia.height=Q.height+pa.y+pa.height+2*ja:ia.width=Q.width+pa.x+pa.width+2*ja;this.graph.model.setGeometry(X,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){S.get(xa)||(S.put(xa,!0),ia.push(xa))}for(var Q=ca.apply(this,arguments),S=new mxDictionary,X=this.graph.model,ia=[],ja=0;ja<Q.length;ja++){var pa=Q[ja];this.graph.isTableCell(pa)?B(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
+mxGraphHandler.prototype.isValidDropTarget=function(B,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,R=this.graph.view.scale;B=this.roundLength((this.bounds.x+
+this.currentDx)/R-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/R-Q.y);R=this.graph.view.unit;this.hint.innerHTML=f(B,R)+", "+f(Q,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
+var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,Q){ha.apply(this,arguments);var R=this.graph.getCellStyle(B);if(null==R.childLayout){var X=this.graph.model.getParent(B),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(R=this.graph.getCellStyle(X),"stackLayout"==R.childLayout)){var ja=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
+ia=ia.clone();R?ia.height=Q.height+pa.y+pa.height+2*ja:ia.width=Q.width+pa.x+pa.width+2*ja;this.graph.model.setGeometry(X,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var Q=ca.apply(this,arguments),R=new mxDictionary,X=this.graph.model,ia=[],ja=0;ja<Q.length;ja++){var pa=Q[ja];this.graph.isTableCell(pa)?B(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
B(X.getParent(pa));B(pa)}return ia};var aa=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(B){return aa.apply(this,arguments)&&!mxEvent.isControlDown(B.getEvent())&&!mxEvent.isShiftDown(B.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&
!this.graph.isSwimlane(this.state.cell)};var da=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(B){var Q=da.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};var ka=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(B){var Q=ka.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
function(){var B=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+B.x/2,this.bounds.y+this.rotationHandleVSpacing-B.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(B,Q){return this.graph.isRecursiveVertexResize(B)&&!mxEvent.isAltDown(Q.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(B,Q){return mxEvent.isControlDown(Q.getEvent())||mxEvent.isMetaDown(Q.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;
mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(B){return B.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var B=0;this.graph.isTableRow(this.state.cell)?B=1:this.graph.isTableCell(this.state.cell)&&
(B=2);return B};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var I=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==I&&(I=mxCellRenderer.defaultShapes.tableLine);var B=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var Q=function(Za,
-Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ja,(ua+bb.y+Ra)*ja))}return fb},S=this,X=this.graph,ia=X.model,ja=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==B&&(B=[]);var Ka=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ia.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
+Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ja,(ua+bb.y+Ra)*ja))}return fb},R=this,X=this.graph,ia=X.model,ja=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==B&&(B=[]);var Ka=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ia.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
!0,!1);for(ia=0;ia<Ka.length;ia++)mxUtils.bind(this,function(Za){var Pa=Ka[Za],Ra=null;if(X.isCellMovable(Pa.cell)){Ra=Za<Ka.length-1?Ka[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra.cell):null;var fb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Ta[Za]?new I(Ta[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Pa,"row-resize",null,Ra);Ra.tableHandle=!0;var eb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,
Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Ta[Za],0,eb),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+eb*ja;this.shape.bounds.x=pa.x+(Za==Ka.length-1?0:db.x*ja);this.shape.bounds.width=pa.width-(Za==Ka.length-1?0:db.width+db.x+ja)}this.shape.redraw()}};var bb=
-!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!S.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}B.push(Ra)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,
+!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!R.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}B.push(Ra)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,
function(Za){var Pa=X.view.getState(Va[Za]),Ra=X.getCellGeometry(Va[Za]),fb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Pa&&(Pa=new mxCellState(X.view,Va[Za],X.getCellStyle(Va[Za])),Pa.x=pa.x+Ra.x*ja,Pa.y=pa.y+Ra.y*ja,Pa.width=fb.width*ja,Pa.height=fb.height*ja,Pa.updateCachedBounds());Ra=Za<Va.length-1?Va[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra):null;var eb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Oa[Za]?new I(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,
mxConstants.NONE,1,!0);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Ra);Pa.tableHandle=!0;var bb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Oa[Za],bb,0),this.shape.updateBoundsFromLine();else{var mb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(fb.width+bb)*ja;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ja);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!S.blockDelayedSelection){var lb=
+this.state.x+(fb.width+bb)*ja;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ja);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!R.blockDelayedSelection){var lb=
X.getCellAt(mb.getGraphX(),mb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(lb,mb)}bb=0};Pa.positionChanged=function(){};Pa.reset=function(){bb=0};B.push(Pa)})(ia)}}return null!=B?B.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){T.apply(this,arguments);if(null!=this.moveHandles)for(var Q=0;Q<this.moveHandles.length;Q++)null!=this.moveHandles[Q]&&(this.moveHandles[Q].node.style.visibility=B?"":"hidden");if(null!=this.cornerHandles)for(Q=
0;Q<this.cornerHandles.length;Q++)this.cornerHandles[Q].node.style.visibility=B?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var B=this.isMoveHandlesVisible();B&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():B||null==this.moveHandles||this.destroyMoveHandles();if(B&&null==this.moveHandles){for(B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,Q=B.model,S=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&Q.isVertex(ia.cell)&&B.isCellMovable(ia.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ia;ja.dialect=this.graph.dialect!=
+this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,Q=B.model,R=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&Q.isVertex(ia.cell)&&B.isCellMovable(ia.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ia;ja.dialect=this.graph.dialect!=
mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ja.init(this.graph.getView().getOverlayPane());ja.node.style.cursor="move";mxEvent.addGestureListeners(ja.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),
-this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));S.push(ja)}else S.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return S};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
+this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));R.push(ja)}else R.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
this.moveHandles){for(var B=0;B<this.moveHandles.length;B++)null!=this.moveHandles[B]&&this.moveHandles[B].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var B=0;B<this.cornerHandles.length;B++)null!=this.cornerHandles[B]&&null!=this.cornerHandles[B].node&&null!=this.cornerHandles[B].node.parentNode&&this.cornerHandles[B].node.parentNode.removeChild(this.cornerHandles[B].node);this.cornerHandles=null}};var W=mxVertexHandler.prototype.refresh;
mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var B=0;4>B;B++){var Q=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",
-mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),Q=this.tolerance,S=this.state.style.shape;
-null==mxCellRenderer.defaultShapes[S]&&mxStencilRegistry.getStencil(S);S=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!S&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ja=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ja)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/
-2||Math.abs(this.state.x+this.state.width-ja)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){S=!0;break}}S&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),B.x=this.sizers[0].bounds.width+Q,B.y=this.sizers[0].bounds.height+Q):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),Q=this.tolerance,R=this.state.style.shape;
+null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ja=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ja)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/
+2||Math.abs(this.state.x+this.state.width-ja)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),B.x=this.sizers[0].bounds.width+Q,B.y=this.sizers[0].bounds.height+Q):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{B=this.state.view.scale;var Q=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/B),Q)+" x "+f(this.roundLength(this.bounds.height/B),Q)}B=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==B&&(B=this.bounds);this.hint.style.left=B.x+Math.round((B.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
B.y+B.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var B=this.graph.getLinkForCell(this.state.cell),Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var fa=mxEdgeHandler.prototype.mouseMove;
mxEdgeHandler.prototype.mouseMove=function(B,Q){fa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(B,Q){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
-function(B,Q,S){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ja=this.roundLength(Q.x/ia-X.x);X=this.roundLength(Q.y/ia-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ja,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=S&&(S.view.updateEdgeBounds(S),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(S.length/ia):f(S.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=
-this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(S=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*S.x)+"%, "+Math.round(100*S.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
+function(B,Q,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ja=this.roundLength(Q.x/ia-X.x);X=this.roundLength(Q.y/ia-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ja,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=
+this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
"none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');
mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');
HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+
@@ -2719,41 +2720,41 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=
function(B){return!mxEvent.isShiftDown(B.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(B){return!mxEvent.isShiftDown(B.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(B){return mxEvent.isMouseEvent(B.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(Q)||mxEvent.isPopupTrigger(Q)&&(null==B.getState()||mxEvent.isControlDown(Q)||mxEvent.isShiftDown(Q))}}else mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return mxEvent.isLeftMouseButton(Q)&&(this.useLeftButtonForPanning&&null==B.getState()||mxEvent.isControlDown(Q)&&!mxEvent.isShiftDown(Q))||this.usePopupTrigger&&mxEvent.isPopupTrigger(Q)};
-mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var S=
-null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ja=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,B=(this.currentX-X)/this.graph.view.scale,ja=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(B=this.graph.snap(B),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(S){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
-try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(S=0;S<pa.length;S++)if(this.graph.isCellMovable(pa[S])){var xa=this.graph.view.getState(pa[S]),ra=this.graph.getCellGeometry(pa[S]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ja),this.graph.model.setGeometry(pa[S],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(B,
-Q){if(!Q.isConsumed()&&null!=this.first){var S=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);S.x-=B.x;S.y-=B.y;B=Q.getX()+S.x;S=Q.getY()+S.y;var X=this.first.x-B,ia=this.first.y-S,ja=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ja||Math.abs(ia)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,S),this.isSpaceEvent(Q)?(B=this.x+this.width,S=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
-(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=B-this.width),this.y<this.first.y&&(this.y=S-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
+mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var R=
+null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ja=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,B=(this.currentX-X)/this.graph.view.scale,ja=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(B=this.graph.snap(B),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(R){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
+try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ja),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(B,
+Q){if(!Q.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);R.x-=B.x;R.y-=B.y;B=Q.getX()+R.x;R=Q.getY()+R.y;var X=this.first.x-B,ia=this.first.y-R,ja=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ja||Math.abs(ia)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,R),this.isSpaceEvent(Q)?(B=this.x+this.width,R=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
+(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=B-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):
(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),Q.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
-function(B,Q,S,X){wa.apply(this,arguments);S!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=S};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,Q,S){Q=null!=B&&0==B;var X=this.state.getVisibleTerminalState(Q);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,X,Q):null;S=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),B):null)?S?this.endFixedHandleImage:this.fixedHandleImage:
-null!=B&&null!=X?S?this.endTerminalHandleImage:this.terminalHandleImage:S?this.endHandleImage:this.handleImage;if(null!=S)return S=new mxImageShape(new mxRectangle(0,0,S.width,S.height),S.src),S.preserveImageAspect=!1,S;S=mxConstants.HANDLE_SIZE;this.preferHtml&&--S;return new mxRectangleShape(new mxRectangle(0,0,S,S),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,Q,S,X){X=Q==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var Q=this.graph.getModel(),S=Q.getParent(B[0]),X=this.graph.getCellGeometry(B[0]);if(Q.isEdge(S)&&null!=X&&X.relative&&(Q=this.graph.view.getState(B[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
-arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),Q=[],S=0;S<B.length;S++)"1"!=mxUtils.getValue(B[S].style,"part","0")&&Q.push(B[S]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var Q=this.graph.getModel(),S=Q.getParent(B.cell),X=this.graph.getCellGeometry(B.cell);return Q.isEdge(S)&&null!=X&&X.relative&&2>B.width&&2>B.height&&null!=
-B.text&&null!=B.text.boundingBox?(Q=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,Q){var S=this.graph.getModel(),X=S.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!S.isEdge(X)||null==ia||!ia.relative||null==this.state||
+function(B,Q,R,X){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,Q,R){Q=null!=B&&0==B;var X=this.state.getVisibleTerminalState(Q);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,X,Q):null;R=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),B):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
+null!=B&&null!=X?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,Q,R,X){X=Q==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var Q=this.graph.getModel(),R=Q.getParent(B[0]),X=this.graph.getCellGeometry(B[0]);if(Q.isEdge(R)&&null!=X&&X.relative&&(Q=this.graph.view.getState(B[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),Q=[],R=0;R<B.length;R++)"1"!=mxUtils.getValue(B[R].style,"part","0")&&Q.push(B[R]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var Q=this.graph.getModel(),R=Q.getParent(B.cell),X=this.graph.getCellGeometry(B.cell);return Q.isEdge(R)&&null!=X&&X.relative&&2>B.width&&2>B.height&&null!=
+B.text&&null!=B.text.boundingBox?(Q=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,Q){var R=this.graph.getModel(),X=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!R.isEdge(X)||null==ia||!ia.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var B=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),Q=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&B==mxConstants.NONE&&Q==mxConstants.NONE?(B=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
B,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(B,Q){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
function(B,Q){Da.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(B,Q){try{if(null==B&&(null==Q||0==Q.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=B||null!=Q&&0<Q.length){var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("editLink"));S.setAttribute("width","14");S.setAttribute("height","14");S.style.paddingLeft="8px";S.style.marginLeft="auto";S.style.marginBottom="-1px";S.style.cursor="pointer";var X=S.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+this.linkHint=null);else if(null!=B||null!=Q&&0<Q.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var X=R.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=B){var ia=document.createElement("div");
-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=S.cloneNode(!0);ia.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,
-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ia=0;ia<Q.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=S.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=R.cloneNode(!0);ia.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,
+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ia=0;ia<Q.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=R.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Za=Ta.getElementsByTagName("a")[ra];if(null!=Za){if(null==Oa||""==Oa){for(Oa=Za.cloneNode(!0).firstChild;null!=Oa;)Za.parentNode.insertBefore(Oa.cloneNode(!0),Za),Oa=Oa.nextSibling;Za.parentNode.removeChild(Za)}else Za.setAttribute("href",Oa);this.graph.labelChanged(this.state.cell,Ta.innerHTML)}});mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){this.graph.showLinkDialog(xa.getAttribute("href")||
"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ka=X.cloneNode(!0);ua.appendChild(Ka);mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(Q[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var B=va.apply(this,
arguments);B.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return B};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var Q=this.cornerHandles,S=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+B;Q[0].bounds.y=
-this.state.y-S+B;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*B;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*B;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),S=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=S?mxUtils.getBoundingBox(this.state,
-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==S&&(S=this.state),S=S.y+S.height,null!=Q&&(S=Math.max(S,Q.y+Q.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(S+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
+this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var Q=this.cornerHandles,R=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+B;Q[0].bounds.y=
+this.state.y-R+B;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*B;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*B;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=R?mxUtils.getBoundingBox(this.state,
+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=Q&&(R=Math.max(R,Q.y+Q.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Qa=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Qa.apply(this),null!=this.state&&null!=this.linkHint)){var B=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(B=new mxRectangle(B.x,B.y,B.width,B.height),B.add(this.state.text.bounds));this.linkHint.style.left=B.x+B.width/2+"px";this.linkHint.style.top=Math.round(B.y+B.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function J(){mxCylinder.call(this)}function R(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
+function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function J(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function Z(){mxActor.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(d,p){this.canvas=d;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,aa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,aa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,aa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,aa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,aa.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,aa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function da(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function V(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function I(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxEllipse.call(this)}
function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function Q(){mxActor.call(this)}function S(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
function ja(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function fb(){mxConnector.call(this)}function eb(d,p,A,t,z,E,G,ea,O,ta){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=E*(2*G+O);z*=G+O;E*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-E-G,2*G,2*G);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,
this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var E=0;E<p.length;E++){var G=p[E];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=
@@ -2766,8 +2767,8 @@ d.lineTo(E,E),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFill
u);var bb=Math.tan(mxUtils.toRadians(30)),db=(.5-bb)/2;mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=A&&A();null!=t&&t()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,t,z){d.setFillColor(this.stroke);var E=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(t-E),A+.5*(z-E),E,E);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};mxCellRenderer.registerShape("waypoint",
q);mxUtils.extend(C,mxActor);C.prototype.size=20;C.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/bb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*db);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-db)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(J,mxCylinder);J.prototype.size=20;J.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(t,z/(.5+bb));E?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-db)*p),d.lineTo(p,.25*p),d.moveTo(.5*
-p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",J);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
-p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),d.close())};R.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",R);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
+p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",J);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
+p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
0;D.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-E,0);d.lineTo(t,E);d.lineTo(t,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),
d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.close(),d.fill()),d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.end(),d.stroke())};mxCellRenderer.registerShape("note",D);mxUtils.extend(P,D);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
15;c.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;E=Math.min(t*Math.tan(E),.5*z);d.translate(p,A);d.begin();d.moveTo(.5*t,0);d.lineTo(t,E);d.lineTo(t,z-E);d.lineTo(.5*t,z);d.lineTo(0,z-E);d.lineTo(0,E);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,E);d.lineTo(.5*t,2*E);d.lineTo(t,E);d.moveTo(.5*t,2*E);d.lineTo(.5*t,z);d.stroke()};mxCellRenderer.registerShape("isoCube2",
@@ -2853,8 +2854,8 @@ Sa);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototyp
"arrowSize",this.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(0,E)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Qa);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var E=z*Math.max(0,Math.min(1,
parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(p,E),new mxPoint(p,z)],this.isRounded,
G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();
-d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(S,mxActor);S.prototype.size=20;S.prototype.isRoundable=
-function(){return!0};S.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",S);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
+d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=
+function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
function(){return!0};X.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,
z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",
ja);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,
@@ -2964,7 +2965,7 @@ Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[kb(d,["size"],fu
p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[kb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:vb(g.prototype.size),cylinder3:vb(m.prototype.size),offPageConnector:function(d){return[kb(d,
["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,
t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ba.prototype.size,!0,null,!0,ba.prototype.fixedSize),hexagon:Cb(V.prototype.size,
-!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ha.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,u.prototype.size,!1),card:Ab(.5,H.prototype.size,!0),loopLimit:Ab(.5,S.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
+!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ha.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,u.prototype.size,!1),card:Ab(.5,H.prototype.size,!0),loopLimit:Ab(.5,R.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=jb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=jb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=
this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=jb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var tb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);tb=mxUtils.getRotatedPoint(tb,Math.cos(zb),Math.sin(zb));var sb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(sb),Math.sin(sb));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var E=
d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,ea=G[0];G=G[G.length-1];null!=t&&(t=E.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=tb.x,ta=tb.y,ma=xb.x,ab=xb.y,ib="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ja){Fa-=cb.x;var Ha=La-cb.y;La=(ab*Fa-ma*Ha)/(O*ab-ta*ma);Fa=(ta*Fa-O*Ha)/(ta*ma-O*ab);ib?(Ja&&(cb=new mxPoint(cb.x+
@@ -2992,7 +2993,7 @@ null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.pu
Za.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),
-!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};S.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};R.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,
.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,
.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
@@ -3057,7 +3058,7 @@ P.ignoreImage=!0,q.model.execute(P))}),mxResources.get("pageScale")+" (%)");this
u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});J=this.addAction("collapseExpand",function(){var D=new ChangePageSetup(u);D.ignoreColor=!0;D.ignoreImage=!0;D.foldingEnabled=!q.foldingEnabled;q.model.execute(D)});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.foldingEnabled});J.isEnabled=C;J=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));
J.setToggleAction(!0);J.setSelectedCallback(function(){return q.pageVisible});J=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;u.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionArrowsEnabled});J=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());u.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});J=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});J.isEnabled=C;J=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});
-J.setToggleAction(!0);J.setSelectedCallback(function(){return u.editor.autosave});J.isEnabled=C;J.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var R=!1;J=new Action("about",function(){R||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){R=!1}),R=!0)});J.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",J);J=
+J.setToggleAction(!0);J.setSelectedCallback(function(){return u.editor.autosave});J.isEnabled=C;J.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var S=!1;J=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});J.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",J);J=
mxUtils.bind(this,function(D,P,c,g){return this.addAction(D,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,m);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(m,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(m,
function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(m,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<m.length;n++)0==q.model.getChildCount(m[n])&&q.autoSizeCell(m[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});J("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");J("italic",mxConstants.FONT_ITALIC,
function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");J("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){u.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){u.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){u.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
@@ -3093,25 +3094,25 @@ DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f
function(C){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,C))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};
DrawioFile.prototype.updateFile=function(b,f,l,u,y){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
u,y):this.reloadFile(b,f))}catch(C){null!=f&&f(C)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),J=[this.ui.diffPages(null!=u?u:C,q)],R=this.ignorePatches(J);if(R)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",R),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(C,
+DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),J=[this.ui.diffPages(null!=u?u:C,q)],S=this.ignorePatches(J);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(C,
this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(C),J[0]),c=this.ui.getHashValueForPages(P,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",C,"pages",q,"patched",P,"patches",J,"changes",D,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,J,null,null,"mergeFile",
c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var m=this.sync.patchRealtime(J,DrawioFile.LAST_WRITE_WINS?D:null,null,y);null==m||mxUtils.isEmptyObject(m)||J.push(m)}this.patch(J,DrawioFile.LAST_WRITE_WINS?D:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(F);try{var n=this.getCurrentUser(),x=null!=n?
n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(H){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=l&&l(F)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var u=0;u<b.length;u++){var y=f.encode(new mxGraphModel(b[u].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[u].getId());b[u].viewState&&this.ui.editor.graph.saveViewState(b[u].viewState,y,!0);l.appendChild(y)}return mxUtils.getPrettyXml(l)};
DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,J){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var R=this.getCurrentUser(),D=null!=R?R.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>
+DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,J){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),D=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>
g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(m){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(m.getShadowPages()),F="unknown",H="unknown",M="unknown";try{var L=null!=m.initialData&&0<m.initialData.length?mxUtils.parseXml(m.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(F=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(M=L.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+
n+" in "+y,null,this.getMode()+"."+P,"user_"+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=C?"-current_"+C:"")+(null!=J?"-rev_"+this.ui.hashValue(J):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+H)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:y,label:"user_"+
D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(m){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),J=null!=C?this.ui.hashValue(C.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");C="xml";0<P&&(C=D.substring(P));var c=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+J+R+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),J=null!=C?this.ui.hashValue(C.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");C="xml";0<P&&(C=D.substring(P));var c=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+J+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,u)}catch(g){}};
DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),C=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(J){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",J);null!=J?(this.ui.replaceFileData(J.getData(),
-[l]),this.ui.restoreViewState(C,q,y),this.setDescriptor(J.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var R=this.ui.getCurrentFile();null!=R&&(R.stats=this.stats,R.patch([l]),R.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(J){null!=f&&f(J)}};
+[l]),this.ui.restoreViewState(C,q,y),this.setDescriptor(J.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([l]),S.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(J){null!=f&&f(J)}};
DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};
-DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,J=this.ui.editor.graph;J.container.style.visibility="hidden";var R=this.changeListenerEnabled;this.changeListenerEnabled=l;var D=J.foldingEnabled,P=J.mathEnabled,c=J.cellRenderer.redraw;J.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};J.model.beginUpdate();
+DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,J=this.ui.editor.graph;J.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var D=J.foldingEnabled,P=J.mathEnabled,c=J.cellRenderer.redraw;J.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};J.model.beginUpdate();
try{if(l){for(var g=this.ui.pages.slice(),m=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,m)&&this.ui.selectPage(m,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);J.checkDefaultParent()}finally{J.container.style.visibility="";J.model.endUpdate();J.cellRenderer.redraw=c;this.changeListenerEnabled=R;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=J.mathEnabled?(this.ui.editor.updateGraphComponents(),J.refresh()):(D!=J.foldingEnabled?
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);J.checkDefaultParent()}finally{J.container.style.visibility="";J.model.endUpdate();J.cellRenderer.redraw=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=J.mathEnabled?(this.ui.editor.updateGraphComponents(),J.refresh()):(D!=J.foldingEnabled?
J.view.revalidate():J.view.validate(),J.sizeDidChange());null!=this.sync&&this.isRealtime()&&!u&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",l)}return b};
DrawioFile.prototype.save=function(b,f,l,u,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",u,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=l)l(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
@@ -3162,7 +3163,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(l){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",l);b(f,l)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,C){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,C)}catch(D){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=u&&u(D);try{var J=this.getCurrentUser(),R=null!=J?J.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),R,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=u&&u(D)}};
+this.inConflictState=!0;this.descriptorChanged();null!=u&&u(D);try{var J=this.getCurrentUser(),S=null!=J?J.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=u&&u(D)}};
DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var C=this.isAutosaveRevision();
C&&(this.lastAutosaveRevision=(new Date).getTime());this.save(C,mxUtils.bind(this,function(J){this.autosaveCompleted();null!=l&&l(J)}),mxUtils.bind(this,function(J){null!=u&&u(J)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(J){null!=u&&u(J)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
@@ -3171,10 +3172,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,l){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,l,u,y,q,C){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=C};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,l,u,y){this.saveAs(this.title,f,l,u,y)};LocalFile.prototype.saveAs=function(b,f,l,u,y){this.saveFile(b,!1,f,l,null,u,y)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var J=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var R=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),P=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(R);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(J?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var H=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(R,H,D,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,J?"image/png":"text/xml",J);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(J?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});J?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),u,this.ui.getCurrentFile()!=this?R:null,f.scale,f.border)):P(R)};
+LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var J=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),P=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(J?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var H=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,H,D,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,J?"image/png":"text/xml",J);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(J?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});J?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),u,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):P(S)};
LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
@@ -3338,13 +3339,13 @@ if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),I=0;I<v.
k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),I.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,I){var N=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=
function(k,v,I,N,T,W,U,Y,fa,na,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{W=null!=W?W:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{sa.style.setProperty("-webkit-font-smoothing","antialiased");sa.style.setProperty("-moz-osx-font-smoothing",
"grayscale");var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Qa.drawImage(Ca,0,0);k(Na,sa)},0):(Qa.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),Sa=parseInt(sa.getAttribute("width")),Ua=parseInt(sa.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=W?Math.min(1,Math.min(3*v/(4*Ua),v/Sa)):v/Sa);Y=this.getMaxCanvasScale(Sa,Ua,Y);Sa=Math.ceil(Y*Sa);Ua=Math.ceil(Y*Ua);Na.setAttribute("width",Sa);Na.setAttribute("height",
-Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=qa.view,B=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;Q="data:image/svg+xml;base64,"+Q;var S=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ia=Ea.translate.x*B,ja=Ea.translate.y*B,pa=ia+(X.x-ia)/B-ya,xa=ja+(X.y-
-ja)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(S-mxUtils.mod((ia-pa)*Y,S)),Ka=-Math.round(S-mxUtils.mod((ja-xa)*Y,S));ua<Sa;ua+=S)for(var Va=Ka;Va<Ua;Va+=S)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
+Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=qa.view,B=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;Q="data:image/svg+xml;base64,"+Q;var R=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ia=Ea.translate.x*B,ja=Ea.translate.y*B,pa=ia+(X.x-ia)/B-ya,xa=ja+(X.y-
+ja)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*Y,R)),Ka=-Math.round(R-mxUtils.mod((ja-xa)*Y,R));ua<Sa;ua+=R)for(var Va=Ka;Va<Ua;Va+=R)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),I,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,C=0;8>C;C++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,I,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^
v.charCodeAt(I+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,I=0;I<k.length;I++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(I))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,I,N,T){function W(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=W(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+
1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(W(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(k,4),"IHDR"!=W(k,4))null!=T&&T();else{W(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==W(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==I?(I=Math.round(N/.0254),I=Y(I)+Y(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,I,0,I.length);T+=Y(I.length)+
-v+I+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);W(k,na);W(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var J=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var R=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){R.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var I=null;null!=k.editor.graph.getModel().getParent(v)?I=v.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
+v+I+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);W(k,na);W(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var J=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var I=null;null!=k.editor.graph.getModel().getParent(v)?I=v.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,I=v.editor.graph;
if(I.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(W){v.editor.setAutosave(W);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(W){this.listener=function(){W(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==
typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(W){v.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(I.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};
@@ -3373,23 +3374,23 @@ font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764"
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
-function(k,v,I,N){function T(Qa,za,Ea,B,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,I,qa);else{ya.getModel().beginUpdate();try{Q=[];var S=[];if(null!=Ea.index){for(var X=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==Qa;)X.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<X.length?null!=B?X.splice(B,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,
-ya.getSelectionCells()),Q.push(Ea.countProperty),S.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);S.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ja=Ea.dependentPropsDefVal[Qa],pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ja);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);S.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,
-za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",S,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function B(S){if(null==S||S==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";
-else if("default"==S)Q.style.background="";else{var X=mxUtils.getLightDarkColor(S);mxUtils.isLightDarkColor(S)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+" 50.3%)":Q.style.background=S}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(S){this.editorUi.pickColor(za,
-function(X){T(Qa,X,Ea);B(X)});mxEvent.consume(S)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,B,Q,S,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:B,countProperty:Q,parentRow:S,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ja=S,pa=0;null!=ja.nextSibling;)if(ja.nextSibling.getAttribute("data-pName")==
-Qa)ja=ja.nextSibling,pa++;else break;var xa={type:Ea,parentRow:S,index:pa,isDeletable:!0,defVal:B,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,B,xa);ja.parentNode.insertBefore(pa,ja.nextSibling);mxEvent.consume(ia)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,B,Q,S,X){if(0<Q){var ia=Array(Q);za=null!=za?za.split(","):[];for(var ja=0;ja<Q;ja++)ia[ja]=null!=za[ja]?za[ja]:null!=B?B:"";wa.push({name:Qa,values:ia,type:Ea,defVal:B,parentRow:S,
-flipBkg:X,size:Q})}return document.createElement("div")}function na(Qa,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Qa,B.checked?"1":"0",Ea,null,B)});return B}function la(Qa,za,Ea,B,Q){var S=Ea.dispName,X=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(Q?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Qa);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",
-Ea.index),S=(null!=S?S:"")+"["+Ea.index+"]",B=!0);var ja=document.createElement("td");ja.className="gePropRowCell";S=mxResources.get(S,null,S);mxUtils.write(ja,S);ja.setAttribute("title",S);B&&(ja.style.textAlign="right");ia.appendChild(ja);ja=document.createElement("td");ja.className="gePropRowCell";ja.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,
-document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ja.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==X)ja.appendChild(na(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ja.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ja.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(S=pa[Q],S.val==za){mxUtils.write(xa,mxResources.get(S.dispName,null,S.dispName));break}mxEvent.addListener(ja,
+function(k,v,I,N){function T(Qa,za,Ea,B,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,I,qa);else{ya.getModel().beginUpdate();try{Q=[];var R=[];if(null!=Ea.index){for(var X=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==Qa;)X.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<X.length?null!=B?X.splice(B,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,
+ya.getSelectionCells()),Q.push(Ea.countProperty),R.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);R.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ja=Ea.dependentPropsDefVal[Qa],pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ja);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,
+za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function B(R){if(null==R||R==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";
+else if("default"==R)Q.style.background="";else{var X=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+" 50.3%)":Q.style.background=R}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,
+function(X){T(Qa,X,Ea);B(X)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,B,Q,R,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:B,countProperty:Q,parentRow:R,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ja=R,pa=0;null!=ja.nextSibling;)if(ja.nextSibling.getAttribute("data-pName")==
+Qa)ja=ja.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:B,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,B,xa);ja.parentNode.insertBefore(pa,ja.nextSibling);mxEvent.consume(ia)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,B,Q,R,X){if(0<Q){var ia=Array(Q);za=null!=za?za.split(","):[];for(var ja=0;ja<Q;ja++)ia[ja]=null!=za[ja]?za[ja]:null!=B?B:"";wa.push({name:Qa,values:ia,type:Ea,defVal:B,parentRow:R,
+flipBkg:X,size:Q})}return document.createElement("div")}function na(Qa,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Qa,B.checked?"1":"0",Ea,null,B)});return B}function la(Qa,za,Ea,B,Q){var R=Ea.dispName,X=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(Q?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Qa);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",
+Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",B=!0);var ja=document.createElement("td");ja.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ja,R);ja.setAttribute("title",R);B&&(ja.style.textAlign="right");ia.appendChild(ja);ja=document.createElement("td");ja.className="gePropRowCell";ja.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,
+document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ja.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==X)ja.appendChild(na(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ja.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ja.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(R=pa[Q],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ja,
"click",mxUtils.bind(qa,function(ua){var Ka=mxEvent.getSource(ua);if(!(Ka!=ja&&Ka!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Oa=null;W(ja,Va);for(ua=0;ua<pa.length;ua++){Ka=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Ta,mxResources.get(Ka.dispName,null,Ka.dispName));Va.appendChild(Ta);null==Ka.val&&(Ta.value="null",Oa=Ta)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,
"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Qa,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",function(){xa.innerHTML="";for(var Za=0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==X)ja.appendChild(Y(Qa,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,Q));else if("staticArr"==X)ja.appendChild(fa(Qa,za,Ea.subType,Ea.subDefVal,
-Ea.size,ia,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ia.firstChild.innerHTML="",ia.firstChild.setAttribute("colspan","2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),S=document.createElement("div"),mxUtils.write(S,mxResources.get(Qa)+":"),S.style.display="inline-flex",S.style.alignItems="center",S.style.width="100%",S.appendChild(Q),
-ia.firstChild.appendChild(S)):(Q.style.width="96px",ja.appendChild(Q));else{ja.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ja.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=
+Ea.size,ia,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ia.firstChild.innerHTML="",ia.firstChild.setAttribute("colspan","2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get(Qa)+":"),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(Q),
+ia.firstChild.appendChild(R)):(Q.style.width="96px",ja.appendChild(Q));else{ja.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ja.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=
Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var Za=null;try{Za="numbers"==X?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==X?parseInt(Ta):Ta)+"")}catch(Pa){}T(Qa,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);if(!(Va!=ja&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");W(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=X&&"float"!=X||Ea.allowAuto||(Oa.type="number",Oa.step="int"==X?"1":"any",null!=
Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Ta){13==Ta.keyCode&&Ka()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ka()})}}))}Ea.isDeletable&&(Q=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Qa,"",Ea,Ea.index);mxEvent.consume(ua)})),Q.style.height="16px",Q.style.width="25px",Q.style.float="right",Q.className="geColorBtn",ja.appendChild(Q));ia.appendChild(ja);return ia}var qa=this,ya=this.editorUi.editor.graph,
wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft="16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Qa=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage=
-"url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],Q=B.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(B)}catch(S){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className=
+"url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],Q=B.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(B)}catch(R){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className=
"gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==I.vertices.length&&0==I.edges.length?Aa=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Aa=I.edges[0].id);null==Aa||N||(Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1)),null!=I.style&&null!=I.style.shape&&Ia.appendChild(la("shape",mxUtils.htmlEntities(I.style.shape),{dispName:"shape",type:"readOnly"},
!0,!1)));for(var Ca in v)if(N=v[Ca],("function"!=typeof N.isVisible||N.isVisible(I,this))&&!N.primary){var Da=null!=N.getValue?N.getValue(I,this):null!=I.style[Ca]?mxUtils.htmlEntities(I.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(I,this):N.defVal;if("separator"==N.type)sa=!sa;else{if("staticArr"==N.type)N.size=parseInt(I.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Sa=[];for(Aa=0;Aa<va.length;Aa++)if(null!=v[va[Aa]]){var Ua=
I.style[va[Aa]];Sa.push(v[va[Aa]].subDefVal);Na.push(null!=Ua?Ua.split(","):[])}N.dependentPropsDefVal=Sa;N.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,N,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();
@@ -3410,7 +3411,7 @@ Graph.rewriteGoogleFontUrl(v))):(null==I&&(I='@font-face {\nfont-family: "'+k+'"
5)&&(W=PROXY_URL+"?url="+encodeURIComponent(v)),W={name:k,url:v,elt:Graph.createFontElement(k,W)},N[T]=W,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=I&&("link"==W.elt.nodeName.toLowerCase()?(W.elt.onload=I,W.elt.onerror=I):I()),null!=v&&v.appendChild(W.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=
k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var I=k[v].getAttribute("data-font-src");if(null!=I){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,I)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(v))}catch(N){}}}return k};Graph.prototype.defaultThemeName="default-style2";
Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=
-[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):I.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);
+[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var I=this.getInsertPoint;this.getInsertPoint=function(T){return null==v||T?I.apply(this,arguments):this.getPointForEvent(v)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);
if(null!=W&&"rack"==W.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=W.marginLeft||0;U.marginRight=W.marginRight||0;U.marginTop=W.marginTop||0;U.marginBottom=W.marginBottom||0;U.allowGaps=W.allowGaps||0;U.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};
var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,I,N,T,W,U,Y,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};
Graph.prototype.createTagsDialog=function(k,v,I,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function W(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ma=document.createElement("tbody");
@@ -3469,7 +3470,7 @@ mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.x
mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=
function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ka=mxMarker.createMarker;mxMarker.createMarker=function(k,v,I,N,T,W,U,Y,fa,na){if(null!=I&&null==mxMarker.markers[I]){var la=this.getPackageForType(I);null!=la&&mxStencilRegistry.getStencil(la)}return ka.apply(this,arguments)};var ba=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,I,N,T,W){"1"==mxUtils.getValue(v.style,"lineShape",
null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ba.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,I,N){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function W(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=
-sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);S.value=Math.max(1,Math.min(1600,parseInt(S.value)))+"%";k.lastPrintZoom=S.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ja.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=B.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(S.value)/100;
+sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ja.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=B.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(R.value)/100;
Ka.grid=X.checked;Ka.shadows=ia.checked;Ka.transparent=ja.checked;Ka.includeCopy=pa.checked;Ka.sheetsAcross=parseInt(Ea.value);Ka.sheetsDown=parseInt(B.value);Ka.pagesFrom=parseInt(wa.value);Ka.pagesTo=parseInt(Ia.value);Ka.allPages=qa.checked;Ka.selection=Ba.checked;Ka.pageView=Ga.checked;Ka.crop=Ma.checked;Ka.fit=sa.checked;return null!=I?I(!ua,Ka):k.print(!ua,Ka)}var U=k.editor.graph,Y=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";
fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);
mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=
@@ -3483,7 +3484,7 @@ var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElemen
k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Sa.appendChild(v);mxUtils.write(Ua,mxResources.get("fitToBy"));var B=Ea.cloneNode(!0);B.setAttribute("value",k.lastPrintSheetsDown||"1");Qa.appendChild(B);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(B,"click",function(ua){sa.checked=
!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Sa);Da.appendChild(Ua);Da.appendChild(Qa);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";
U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(Q);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");
-U.appendChild(v);var S=document.createElement("input");S.style.width="60px";S.style.marginLeft="4px";S.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(S);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,
+U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,
"click",function(ua){X.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,
"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ia.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=I&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="10px";ja.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ja),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),
U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ja.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),
@@ -3492,29 +3493,29 @@ mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));
(Y.classList.add("geDarkMode"),Y.style.colorScheme="dark"):(Y.classList.remove("geDarkMode"),Y.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ra=function(ua,Ka){ua=Ka.getProperty("dialog");Y.parentNode==ua.container&&(k.editor.removeListener(ra),k.removeListener(xa))};k.editor.addListener("hideDialog",ra)}this.container=Y};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.8";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
-"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||"1"==urlParams.dev;EditorUi.isElectronApp=
-null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
-EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',
-numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,g,m,n,x,F,H){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&
-0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(m)+(null!=n?":colno:"+encodeURIComponent(n):"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(M){}try{H||null==window.console||console.error(F,
-c,g,m,n,x)}catch(M){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(m){}};EditorUi.sendReport=function(c,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,
-g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?(mxLog.show(),mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(m){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};
-EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],m=0;m<c.length;m++)g.push(c[m]);for(m=0;m<g.length;m++)EditorUi.replaceSvgImage(g[m])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var m=EditorUi.getSvgSubtree(g);if(null!=m&&"svg"==m.nodeName){var n=m.getAttribute("width"),x=m.getAttribute("height");m.setAttribute("x",c.getAttribute("x"));m.setAttribute("y",
-c.getAttribute("y"));m.setAttribute("width",c.getAttribute("width"));m.setAttribute("height",c.getAttribute("height"));m.style.fontFamily="initial";0<n&&0<x&&null==m.getAttribute("viewBox")&&m.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(m.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(m);c.hasAttribute("transform")&&F.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(H){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);
-c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var m="svg-image-"+Editor.guid();c.setAttribute("id",m);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);for(var H="",M=0;M<x.sheet.cssRules.length;M++){var L=x.sheet.cssRules[M];if(null!=L.selectorText){for(var K=L.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]=
-"#"+m+" "+K[Z];L.selectorText=K.join(",")}H+=L.cssText+"\n"}g[F].textContent=H}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(m=0;m<g.length;m++)g[m].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;
-EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=
-1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme=
-"auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,m){return this.editor.graph.openLink(c,g,m)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=
-function(c,g,m){localStorage.setItem(c,g);null!=m&&m()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=
-function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||
-!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,H=x.spin,M=null,L=null,K=mxUtils.bind(this,
-function(ca){null!=ca&&ca()}),Z=this;x.spin=function(ca,aa,oa,da){da=null!=da?da:F;var ka=!1;if(!this.active){var ba=Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},da));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=Z.diagramContainer,c=ca.scrollLeft+ca.clientWidth/2,g=ca.scrollTop+
-ca.clientHeight/2);H.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=aa&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",aa),ca==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-1)&&
-(aa+="..."),ka.innerText=aa,ca.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(da=Math.max(0,da-(Date.now()-ba)),V=mxUtils.bind(this,function(k){this.spin(ca,aa,oa,da);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,aa,oa,da);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return V});ka=!0}return ka};var ha=x.stop;x.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),M=null),
-null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||
+"1"==urlParams.dev;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
+"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,
+barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,g,m,n,x,F,H){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&
+0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(m)+(null!=n?":colno:"+
+encodeURIComponent(n):"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(M){}try{H||null==window.console||console.error(F,c,g,m,n,x)}catch(M){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(m){}};EditorUi.sendReport=
+function(c,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?
+(mxLog.show(),mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(m){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],m=0;m<c.length;m++)g.push(c[m]);for(m=0;m<g.length;m++)EditorUi.replaceSvgImage(g[m])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var m=
+EditorUi.getSvgSubtree(g);if(null!=m&&"svg"==m.nodeName){var n=m.getAttribute("width"),x=m.getAttribute("height");m.setAttribute("x",c.getAttribute("x"));m.setAttribute("y",c.getAttribute("y"));m.setAttribute("width",c.getAttribute("width"));m.setAttribute("height",c.getAttribute("height"));m.style.fontFamily="initial";0<n&&0<x&&null==m.getAttribute("viewBox")&&m.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(m.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(m);c.hasAttribute("transform")&&
+F.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(H){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var m="svg-image-"+Editor.guid();c.setAttribute("id",m);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);
+for(var H="",M=0;M<x.sheet.cssRules.length;M++){var L=x.sheet.cssRules[M];if(null!=L.selectorText){for(var K=L.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]="#"+m+" "+K[Z];L.selectorText=K.join(",")}H+=L.cssText+"\n"}g[F].textContent=H}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(m=0;m<g.length;m++)g[m].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,m){return this.editor.graph.openLink(c,g,m)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
+function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,g,m){localStorage.setItem(c,g);null!=m&&m()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
+EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||
+!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,H=x.spin,M=null,L=null,
+K=mxUtils.bind(this,function(ca){null!=ca&&ca()}),Z=this;x.spin=function(ca,aa,oa,da){da=null!=da?da:F;var ka=!1;if(!this.active){var ba=Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},da));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=Z.diagramContainer,c=ca.scrollLeft+ca.clientWidth/
+2,g=ca.scrollTop+ca.clientHeight/2);H.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=aa&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",aa),ca==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-
+1)&&(aa+="..."),ka.innerText=aa,ca.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(da=Math.max(0,da-(Date.now()-ba)),V=mxUtils.bind(this,function(k){this.spin(ca,aa,oa,da);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,aa,oa,da);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return V});ka=!0}return ka};var ha=x.stop;x.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),
+M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&
17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var m=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&
null!=x.pages&&0<x.pages.length){var H=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<H&&x.movePage(H,H-1)};if(38==F.keyCode)return function(){0<H&&x.movePage(H,0)};if(39==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,H+1)};if(40==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,x.pages.length-1)}}else if(mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)){if(37==F.keyCode)return function(){0<H&&x.selectNextPage(!1)};
@@ -3843,7 +3844,7 @@ function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWin
H)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var J=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var g=this.formatWindow;null!=g?g.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):J.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));
var m=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=m-this.hsplitPosition}),x=c?g:0,F=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
"transition","transform "+F+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*F)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};
-var R=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():R.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(H,M){var L=this.menus.get(H);H=this.createMenuElement(M,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",M);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
+var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(H,M){var L=this.menus.get(H);H=this.createMenuElement(M,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",M);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var m=g("newLibrary","");m.style.left="0px";m.style.right="50%";var n=document.createElement("span");m.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var F=document.createElement("span");x.appendChild(F);this.dependsOnLanguage(mxUtils.bind(this,
function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));m.setAttribute("title",mxResources.get("newLibrary"));F.innerHTML="";mxUtils.write(F,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
@@ -3980,7 +3981,7 @@ m[sa].replace(/\r$/,"");for(sa++;sa<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m
Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ha=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ba=va:"parent"==Da&&0<va.length&&"-"!=va?V=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?I=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?W=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):
"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ba==Na[va]&&(c=va),V==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]+"%");if(null!=Ba)for(var Sa=0;Sa<Ba.length;Sa++)null==
M[Ba[Sa].to]&&(M[Ba[Sa].to]={});ba=[];for(va=sa+1;va<m.length;va++){var Ua=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Ua){var Qa=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Qa+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ua.length&&ba.push(Ua)}L.model.beginUpdate();try{for(va=0;va<ba.length;va++){Ua=ba[va];var za=null,Ea=null!=c?k+Ua[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=mxUtils.indexOf(n,za));var B=new mxCell(Ia,new mxGeometry(ya,
-qa,0,0),Z||"whiteSpace=wrap;html=1;");B.collapsed=N;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)L.setAttributeForCell(B,Da[Q],Ua[Q]),null==za||m||L.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=aa&&null!=da){var S=da[B.getAttribute(aa)];null!=S&&(L.labelChanged(B,S),null==za||m||L.cellLabelChanged(za,S))}if(null!=ca&&null!=ha){var X=ha[B.getAttribute(ca)];null!=X&&(B.style=X)}L.setAttributeForCell(B,"placeholders","1");B.style=L.replacePlaceholders(B,B.style,
+qa,0,0),Z||"whiteSpace=wrap;html=1;");B.collapsed=N;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)L.setAttributeForCell(B,Da[Q],Ua[Q]),null==za||m||L.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=aa&&null!=da){var R=da[B.getAttribute(aa)];null!=R&&(L.labelChanged(B,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ha){var X=ha[B.getAttribute(ca)];null!=X&&(B.style=X)}L.setAttributeForCell(B,"placeholders","1");B.style=L.replacePlaceholders(B,B.style,
K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[B])):(L.model.setStyle(za,B.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=B;if(!m)for(Sa=0;Sa<Ba.length;Sa++)M[Ba[Sa].to][za.getAttribute(Ba[Sa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);V=null!=Ca?L.model.getCell(k+Ua[Ca]):null;if(za.vertex){Qa=
null!=V?0:ya;sa=null!=V?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Qa+parseFloat(za.getAttribute(T)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=sa+parseFloat(za.getAttribute(W)));var ja="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ja&&"auto"!=ja?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ja?ia.width+na:parseFloat(v);var pa="@"==I.charAt(0)?za.getAttribute(I.substring(1)):null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=
I?parseFloat(pa):"auto"==I||"auto"==pa?ia.height+na:"width"==I?za.geometry.width:parseFloat(I);qa+=za.geometry.height+Y}m?(null==H[Ea]&&(H[Ea]=[]),H[Ea].push(za)):(n.push(za),null!=V?(V.style=L.replacePlaceholders(V,ka,K),L.addCell(za,V),x.push(V)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ja="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==I.charAt(0)?x[va].getAttribute(I.substring(1)):null,"auto"!=v&&"auto"!=ja||"auto"!=I&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=
@@ -4035,12 +4036,12 @@ return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n
"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,f,l,u,y,q){function C(){for(var da=M.getElementsByTagName("div"),ka=0,ba=0;ba<da.length;ba++)"none"!=da[ba].style.display&&da[ba].parentNode==M&&ka++;L.style.display=0==ka?"block":"none"}function J(da,ka,ba,V){function k(){ka.removeChild(N);ka.removeChild(T);I.style.display="block";v.style.display="block"}x={div:ka,comment:da,saveCallback:ba,deleteOnCancel:V};var v=ka.querySelector(".geCommentTxt"),I=ka.querySelector(".geCommentActionsList"),N=document.createElement("textarea");
N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=da.content;ka.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var W=mxUtils.button(mxResources.get("cancel"),function(){V?(ka.parentNode.removeChild(ka),C()):k();x=null});W.className="geCommentEditBtn";T.appendChild(W);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";da.content=N.value;mxUtils.write(v,da.content);k();ba(da);x=null});mxEvent.addListener(N,"keydown",
-mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);I.style.display="none";v.style.display="none";N.focus()}function R(da,ka){ka.innerText="";da=new Date(da.modifiedDate);var ba=b.timeSince(da);null==ba&&(ba=mxResources.get("lessThanAMinute"));
+mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);I.style.display="none";v.style.display="none";N.focus()}function S(da,ka){ka.innerText="";da=new Date(da.modifiedDate);var ba=b.timeSince(da);null==ba&&(ba=mxResources.get("lessThanAMinute"));
mxUtils.write(ka,mxResources.get("timeAgo",[ba],"{1} ago"));ka.setAttribute("title",da.toLocaleDateString()+" "+da.toLocaleTimeString())}function D(da){var ka=document.createElement("img");ka.className="geCommentBusyImg";ka.src=IMAGE_PATH+"/spin.gif";da.appendChild(ka);da.busyImg=ka}function P(da){da.style.border="1px solid red";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function c(da){da.style.border="";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function g(da,ka,ba,V,k){function v(na,
la,qa){var ya=document.createElement("li");ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,da);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function I(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(da);return{pdiv:qa,
replies:la}}function N(na,la,qa,ya,wa){function Ia(){D(Ma);da.addReply(Ga,function(sa){Ga.id=sa;da.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();P(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){J(Ga,Ma,function(sa){Ia()},!0)}var Ba=I().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=da.id;null==da.replies&&(da.replies=[]);var Ma=g(Ga,da.replies,Ba,V+1);la?Aa():Ia()}if(k||!da.isResolved){L.style.display="none";var T=
document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",da.id);T.style.marginLeft=20*V+5+"px";da.isResolved&&(F.style.opacity="0.7");var W=document.createElement("div");W.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=da.user&&null!=da.user.pictureUrl?da.user.pictureUrl:Editor.userImage;W.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";W.appendChild(U);var Y=document.createElement("div");
-Y.className="geCommentUsername";mxUtils.write(Y,null!=da.user?da.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",da.id);R(da,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,da.content||"");T.appendChild(W);da.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
+Y.className="geCommentUsername";mxUtils.write(Y,null!=da.user?da.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",da.id);S(da,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,da.content||"");T.appendChild(W);da.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
fa.className="geCommentActionsList";W.appendChild(fa);m||da.isLocked||0!=V&&!n||v(mxResources.get("reply"),function(){N("",!0)},da.isResolved);U=b.getCurrentUser();null==U||null==da.user||U.id!=da.user.id||m||da.isLocked||(v(mxResources.get("edit"),function(){function na(){J(da,T,function(){D(T);da.editComment(da.content,function(){c(T)},function(la){P(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},da.isResolved),v(mxResources.get("delete"),
function(){b.confirm(mxResources.get("areYouSure"),function(){D(T);da.deleteComment(function(na){if(!0===na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=I(da).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<ka.length;na++)if(ka[na]==da){ka.splice(na,1);break}L.style.display=0==
M.getElementsByTagName("div").length?"block":"none"}},function(na){P(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},da.isResolved));m||da.isLocked||0!=V||v(da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";da.isResolved=!da.isResolved;mxUtils.write(qa,da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=da.isResolved?"none":"",wa=I(da).replies,Ia=
@@ -4052,11 +4053,11 @@ ba<da.replies.length;ba++)W=da.replies[ba],W.isResolved=da.isResolved,g(W,da.rep
mxEvent.consume(da)}),K.appendChild(Z));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className="geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(da){q();da.preventDefault();mxEvent.consume(da)}),K.appendChild(H));F.appendChild(K);var aa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var da=x.div.querySelector(".geCommentEditTxtArea"),
ka=x.div.querySelector(".geCommentEditBtns");x.comment.content=da.value;da.parentNode.removeChild(da);ka.parentNode.removeChild(ka)}catch(ba){b.handleError(ba)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ba){function V(k){if(null!=k){k.sort(function(I,N){return new Date(I.modifiedDate)-new Date(N.modifiedDate)});
for(var v=0;v<k.length;v++)V(k[v].replies)}}ba.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";aa=ba;for(ba=0;ba<aa.length;ba++)V(aa[ba].replies),g(aa[ba],aa,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),J(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ba){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ba&&ba.message?": "+ba.message:
-""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function da(v){var I=ba[v.id];if(null!=I)for(R(v,I),I=0;null!=v.replies&&I<v.replies.length;I++)da(v.replies[I])}if(this.window.isVisible()){for(var ka=M.querySelectorAll(".geCommentDate"),ba={},V=0;V<ka.length;V++){var k=ka[V];ba[k.getAttribute("data-commentId")]=k}for(V=0;V<aa.length;V++)da(aa[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
-new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,C,J,R,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
+""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function da(v){var I=ba[v.id];if(null!=I)for(S(v,I),I=0;null!=v.replies&&I<v.replies.length;I++)da(v.replies[I])}if(this.window.isVisible()){for(var ka=M.querySelectorAll(".geCommentDate"),ba={},V=0;V<ka.length;V++){var k=ka[V];ba[k.getAttribute("data-commentId")]=k}for(V=0;V<aa.length;V++)da(aa[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
+new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,C,J,S,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=P+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=D&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",D),g.appendChild(f),c.appendChild(g));D=document.createElement("div");D.style.textAlign="center";D.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||
mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=J&&(q.innerHTML=J+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&D.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});D.appendChild(n);null!=C?(n.innerHTML=C+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom=
-"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);R?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):
+"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);S?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):
D.style.marginTop="12px";this.init=function(){n.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,l){this.ui=b;this.page=f;this.previous=this.name=l}
RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,f,l){this.ui=b;this.oldIndex=f;this.newIndex=l}
@@ -4077,7 +4078,7 @@ function(){var C=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&
this.editor.addListener("pageSelected",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
EditorUi.prototype.scrollToPage=function(b,f){var l=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),u=null!=b?b:this.currentPage;null!=l&&null!=this.tabScroller&&this.tabScroller.children.length>l&&null!=this.tabScroller.children[l]&&(u!=this.lastScrollPage||f)&&(this.tabScroller.children[l].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[l].className="geTab gePageTab geActivePage",this.lastScrollPage=u)};
EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var u=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(u.setViewState(f),this.editor.updateGraphComponents(),u.view.revalidate(),u.sizeDidChange()),u.container.scrollLeft=u.view.translate.x*u.view.scale+f.scrollLeft,u.container.scrollTop=u.view.translate.y*u.view.scale+f.scrollTop,u.restoreSelection(l))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),J=b.getAttribute("extFonts");if(J)try{J=J.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}})}catch(R){console.log("ExtFonts format error: "+R.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),J=b.getAttribute("extFonts");if(J)try{J=J.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:C,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,u,y),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:J||[]}};
Graph.prototype.saveViewState=function(b,f,l,u,y){l||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
@@ -4101,7 +4102,7 @@ EditorUi.prototype.insertPage=function(b,f,l){this.editor.graph.isEnabled()&&(th
EditorUi.prototype.createPage=function(b,f,l){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,l);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};
EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var u=this.currentPage;u==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,u=this.pages[l]):1>=this.pages.length&&(u=this.insertPage(),f.model.execute(new RenamePage(this,u,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,u))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};
EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},C=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var J=new mxGraphModel;J.prefix=Editor.guid()+"-";J.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,C),[l.root]);l.viewState=b==this.currentPage?u.getViewState():b.viewState;this.initDiagramNode(l);
-l.viewState.scale=1;delete l.viewState.scrollLeft;delete l.viewState.scrollTop;delete l.viewState.currentRoot;delete l.viewState.defaultParent;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(R){this.handleError(R)}return l};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
+l.viewState.scale=1;delete l.viewState.scrollLeft;delete l.viewState.scrollTop;delete l.viewState.currentRoot;delete l.viewState.defaultParent;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return l};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
EditorUi.prototype.clonePages=function(b){for(var f=[],l=[],u=0;u<b.length;u++)try{l.push(this.clonePage(b[u]))}catch(y){f.push(mxResources.get("pageWithNumber",[u+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<l.length&&(b.fallbackFileData=this.getXmlForPages(l))}catch(y){}throw b;}return l};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
@@ -4118,15 +4119,15 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(n
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var l=mxEvent.getClientX(b),u=mxEvent.getClientY(b);f.popup(l,
u,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var l=this.createTab(),u=b.getName()||mxResources.get("untitled"),y=b.getId();l.setAttribute("title",u+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,u);l.appendChild(f);this.addTabListeners(b,l);return l};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(R){this.renamePage(b);mxEvent.consume(R)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(R){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),J=mxUtils.bind(this,
-function(R){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(R)||mxEvent.getSource(R)==u)||mxEvent.isPopupTrigger(R))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(R)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(R),c=mxEvent.getClientY(R);D.popup(P,c,null,R);
-this.setCurrentMenu(D,f)}mxEvent.consume(R)});mxEvent.addGestureListeners(u,C,null,J);mxEvent.addGestureListeners(f,C,null,J)};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),J=mxUtils.bind(this,
+function(S){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==u)||mxEvent.isPopupTrigger(S))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(S),c=mxEvent.getClientY(S);D.popup(P,c,null,S);
+this.setCurrentMenu(D,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,C,null,J);mxEvent.addGestureListeners(f,C,null,J)};
EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,u){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),u));this.editor.graph.isEnabled()&&(l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,J){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var R=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(u,q[D]);q=R;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=
-[];this.traverse(y,!0,mxUtils.bind(this,function(J,R){var D=null!=R&&this.isTreeEdge(R);D&&q.push(R);J==y||null!=R&&!D||q.push(J);return(null==R||D)&&(J==y||!this.model.isCollapsed(J))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,J,R){return this.model.filterCells(this.getEdges(u,y,q,C,J,R),mxUtils.bind(this,
+[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,J){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(u,q[D]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=
+[];this.traverse(y,!0,mxUtils.bind(this,function(J,S){var D=null!=S&&this.isTreeEdge(S);D&&q.push(S);J==y||null!=S&&!D||q.push(J);return(null==S||D)&&(J==y||!this.model.isCollapsed(J))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,J,S){return this.model.filterCells(this.getEdges(u,y,q,C,J,S),mxUtils.bind(this,
function(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function u(V){return x.isVertex(V)&&q(V)}function y(V){var k=!1;null!=V&&(k="1"==
n.getCurrentCellStyle(V).treeMoving);return k}function q(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),k="tree"==(null!=k?k.style:n.getCellStyle(V)).containerType);return k}function C(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),n.view.getState(V),k=null!=(null!=k?k.style:n.getCellStyle(V)).childLayout);return k}function J(V){V=n.view.getState(V);if(null!=V){var k=n.getIncomingTreeEdges(V.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=
-k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function R(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=n.cloneCells([I[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(I[0],
+k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=n.cloneCells([I[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(I[0],
!0),!0);var T=J(V),W=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?V.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?V.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=W.x,N[1].geometry.y-=W.y);var U=n.view.getState(V),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?V.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=
(k?V.geometry.height+10:-N[1].geometry.height-10)*Y;var na=n.getOutgoingTreeEdges(n.model.getTerminal(I[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=W=I=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==J(ya)){var wa=n.view.getState(ya);ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(I=10+Math.max(I,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/
Y),W=10+Math.max(W,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?W=0:I=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==J(ya)&&(wa=n.view.getState(ya),ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*I,(k?1:-1)*W)}}}return n.addCells(N,
@@ -4147,30 +4148,30 @@ Y.push(V[fa]);V=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var
null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=V&&U.length==V.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(u(V[fa])&&(la=n.getIncomingTreeEdges(V[fa]),0<la.length))if(!I)u(Y)&&0>mxUtils.indexOf(V,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==
n.getIncomingTreeEdges(U[fa]).length){na=Y;if(null==na||na==n.model.getParent(V[fa]))na=n.model.getTerminal(la[0],!0);I=this.cloneCell(la[0]);this.addEdge(I,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(V,k,v,I){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(V))for(var W=0;W<T.length;W++)if(N.isEdge(T[W])&&null==N.getTerminal(T[W],!0)){N.setTerminal(T[W],V,!0);var U=
n.getCellGeometry(T[W]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var Z={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ha={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(V){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(V)&&mxEvent.isShiftDown(V)?
-Z[V.keyCode]:mxEvent.isAltDown(V)?ha[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=R(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
+Z[V.keyCode]:mxEvent.isAltDown(V)?ha[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=S(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
mxEvent.consume(V)):38==V.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(V)):39==V.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(V)):40==V.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(V)))}}catch(I){m.handleError(I)}mxEvent.isConsumed(V)||ca.apply(this,arguments)};var aa=n.connectVertex;n.connectVertex=function(V,k,v,I,N,T,W){var U=n.getIncomingTreeEdges(V);if(u(V)){var Y=J(V),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||
-k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==na?D(V):R(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!u(V)||C(V)||n.traverse(V,!0,function(v,I){var N=null!=I&&n.isTreeEdge(I);N&&0>mxUtils.indexOf(k,I)&&k.push(I);(null==I||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==I||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,
+k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==na?D(V):S(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!u(V)||C(V)||n.traverse(V,!0,function(v,I){var N=null!=I&&n.isTreeEdge(I);N&&0>mxUtils.indexOf(k,I)&&k.push(I);(null==I||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==I||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,
arguments);(y(this.state.cell)||u(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(V){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(V);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(V)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var da=mxVertexHandler.prototype.redrawHandles;
mxVertexHandler.prototype.redrawHandles=function(){da.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(V){ka.apply(this,arguments);null!=
this.moveHandle&&(this.moveHandle.style.display=V?"":"none")};var ba=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(V,k){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var u=l.apply(this,arguments),y=this.graph,q=this;return u.concat([this.addEntry("tree container",
-function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var R=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);R.insertEdge(D,!1);C.insert(D);C.insert(J);C.insert(R);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,
-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var R=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);R.insertEdge(D,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);C.insert(D);C.insert(J);C.insert(S);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,
+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),D.style);c.geometry.relative=!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),D.style);m.geometry.relative=!0;m.edge=!0;J.insertEdge(m,!0);g.insertEdge(m,!1);var n=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;J.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(D);C.insert(c);C.insert(m);C.insert(x);C.insert(J);C.insert(R);C.insert(P);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;J.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(D);C.insert(c);C.insert(m);C.insert(x);C.insert(J);C.insert(S);C.insert(P);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
C.vertex=!0;return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var C=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var C=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree orgchart organization division",function(){var C=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(J,"treeRoot","1");J.vertex=!0;var R=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);R.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);C.insert(D);C.insert(c);C.insert(J);C.insert(R);C.insert(P);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(J,"treeRoot","1");J.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);C.insert(D);C.insert(c);C.insert(J);C.insert(S);C.insert(P);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],
C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree division",function(){var C=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
J.geometry.setTerminalPoint(new mxPoint(0,0),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree sub sections",function(){var C=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);var R=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),J.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;R.insertEdge(D,!1);return q.createVertexTemplateFromCells([J,D,C,R],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),J.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;S.insertEdge(D,!1);return q.createVertexTemplateFromCells([J,D,C,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.formatWindow?(D.formatWindow=new WrapperWindow(D,"",Math.max(10,D.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";D.createFormat(g).init()}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.formatWindow.window.setTitle(mxResources.get("format"))})),D.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){D.formatWindow.window.fit()})),D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):D.formatWindow.window.setVisible(null!=P?P:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeftWidth="1px",D.formatElt.style.borderLeftStyle="solid",D.formatElt.style.right="0px"),P=D.diagramContainer.parentNode,
null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),P.style.right="0px"):(P.parentNode.appendChild(D.formatElt),P.style.right=D.formatElt.style.width)}function f(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.sidebarWindow?(D.sidebarWindow=new WrapperWindow(D,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(g){D.createShapesPanel(g)}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
@@ -4183,11 +4184,11 @@ function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?
arguments);if(D){var P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=P&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=P&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};EditorUi.prototype.installFormatToolbar=function(D){var P=
this.editor.graph,c=document.createElement("div");c.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";P.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<P.getSelectionCount()?(D.appendChild(c),c.innerHTML="Selected: "+P.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var J=!1;EditorUi.prototype.initFormatWindow=
function(){if(!J&&null!=this.formatWindow){J=!0;var D=this.formatWindow.window.toggleMinimized,P=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(P=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+P-140+"px"):(this.div.style.width=P+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-P+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(I,N,T){var W=n.menus.get(I);N=H.addMenu(mxResources.get(I),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(I));n.menus.menuCreated(W,N,"geButton");null!=T&&
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(I,N,T){var W=n.menus.get(I);N=H.addMenu(mxResources.get(I),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(I));n.menus.menuCreated(W,N,"geButton");null!=T&&
(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function P(I,N,T,W,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,I);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=W&&fa.setAttribute("title",W);null!=U&&(I=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",
"disabled")},U.addListener("stateChanged",I),x.addListener("enabledChanged",I),I());return fa}function c(I,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<I.length;T++)null!=I[T]&&N.appendChild(I[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var I=1E3>l,N=D("diagram",null,I?Editor.menuImage:null);c([N,P(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),
n.actions.get("image"),I?Editor.shapesImage:null),P(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),I?Editor.formatImage:null)]);N=D("insert",!0,I?ha:null);c([N,P(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),I?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");V.setAttribute("title",mxResources.get("undo")+
-" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ba.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([V,k]),520<=l&&c([v,640<=l?P("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?P("",da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",da,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}R.apply(this,arguments);var m=
+" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ba.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([V,k]),520<=l&&c([v,640<=l?P("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?P("",da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",da,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=
mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var H=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var I=n.getCurrentFile();if(null!=I&&null!=I.getTitle()){var N=
I.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",I.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),Z=n.updateTabContainer;
@@ -4195,7 +4196,7 @@ n.updateTabContainer=function(){Z.apply(this,arguments);n.tabContainer.appendChi
var oa=n.actions.get("zoomIn"),da=n.actions.get("zoomOut");m=n.actions.get("resetView");var ka=n.actions.get("undo"),ba=n.actions.get("redo"),V=P("",ka.funct,null,"",ka,Editor.undoImage),k=P("",ba.funct,null,"",ba,Editor.redoImage),v=P("",function(I){mxEvent.isAltDown(I)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(I)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,
null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&
n.actions.layersWindow.window.fit();null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Был обнаружен черновик \'{1}\'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,l){this.init(b,f,l)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;GraphViewer.prototype.darkMode=null;
GraphViewer.prototype.init=function(b,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=
@@ -4204,13 +4205,13 @@ this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(
null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var u=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=f&&(this.xmlDocument=f.ownerDocument,this.xmlNode=f,this.xml=mxUtils.getXml(f),null!=b)){var y=
mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var J=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?J.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(J.style.padding="8px");J.style.forcedColorAdjust="none";J.style.boxSizing="border-box";J.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var x=
this.view.graphBounds,F=this.view.translate;J.setAttribute("viewBox",x.x+F.x-this.panDx+" "+(x.y+F.y-this.panDy)+" "+(x.width+1)+" "+(x.height+1));this.container.style.backgroundColor=J.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",x))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(x){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var R=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=R&&R!=f)try{this.xml=mxUtils.getXml(R),this.xmlNode=R,this.xmlDocument=R.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return u.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
-this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(R=0;R<D.length;R++)if(this.pageId==D[R].getAttribute("id")){this.currentPage=R;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[u.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(u.currentPage+1):"pagenumber"==x?u.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
-mxUtils.mod(x,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(x){x=this.getIndexById(x);var F=0<=x;F&&this.selectPage(x);return F};R=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var g=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(x){if(null!=x&&
+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=f)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return u.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
+this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(S=0;S<D.length;S++)if(this.pageId==D[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[u.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(u.currentPage+1):"pagenumber"==x?u.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
+mxUtils.mod(x,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(x){x=this.getIndexById(x);var F=0<=x;F&&this.selectPage(x);return F};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var g=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(x){if(null!=x&&
Graph.isPageLink(x.src)){var F=x.src,H=F.indexOf(",");0<H&&(H=u.getIndexById(F.substring(H+1)),0<=H&&(x=u.getImageForGraphModel(Editor.parseDiagramNode(u.diagrams[H])),x.originalSrc=F))}g.apply(this,arguments)};var m=this.graph.getGraphBounds;this.graph.getGraphBounds=function(x){var F=m.apply(this,arguments);x=this.backgroundImage;if(null!=x){var H=this.view.translate,M=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((H.x+x.x)*M,(H.y+x.y)*M,x.width*M,x.height*M))}return F};this.addListener("xmlNodeChanged",
-R);R();urlParams.page=u.currentPage;R=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,R=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
+S);S();urlParams.page=u.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
(this.graph.panningHandler.isForcePanningEvent=function(x){return!mxEvent.isPopupTrigger(x.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||
-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=R&&this.setLayersVisible(R);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var H=x.indexOf(",");u.selectPageById(x.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=
+this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var H=x.indexOf(",");u.selectPageById(x.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=
this.getGraphBounds();this.handleCustomLink(x,F);M.equals(this.getGraphBounds())||u.crop()}}catch(L){alert(L.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof l){var q=
this.getObservableParent(b),C=new l(mxUtils.bind(this,function(J){0<b.offsetWidth&&(C.disconnect(),y())}));C.observe(q,{attributes:!0})}else y()}};
GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var f=b.background,l=mxUtils.bind(this,function(u){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,u&&b.view.validateBackground())});this.addListener("graphChanged",
@@ -4223,23 +4224,23 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var f=!0;if(!this.autoOrigin){var l=[],u=this.graph.getModel();u.beginUpdate();try{for(var y=0;y<u.getChildCount(u.root);y++){var q=u.getChildAt(u.root,y);f=f&&u.isVisible(q);l.push(u.isVisible(q));u.setVisible(q,null!=b?b[y]:!0)}}finally{u.endUpdate()}}return f?null:l};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var f=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),f=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};f&&this.setLayersVisible(f)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),l=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var u=mxUtils.bind(this,function(){if(!l){l=!0;var J=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?J.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){J=b.getBoundingClientRect();var R=mxUtils.getScrollOrigin(document.body);
-R="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-R.x,top:-R.y};J={left:J.left-R.left,top:J.top-R.top,bottom:J.bottom-R.top,right:J.right-R.left};this.toolbar.style.left=J.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=J.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=J.top+1+"px"):this.toolbar.style.top=J.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());l=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(J){var R=b.offsetWidth;R==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=J?J:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},y=R,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),l=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var u=mxUtils.bind(this,function(){if(!l){l=!0;var J=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?J.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){J=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};J={left:J.left-S.left,top:J.top-S.top,bottom:J.bottom-S.top,right:J.right-S.left};this.toolbar.style.left=J.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=J.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=J.top+1+"px"):this.toolbar.style.top=J.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());l=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(J){var S=b.offsetWidth;S==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=J?J:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},y=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",u),this.graph.addListener("size",u)):new ResizeSensor(this.graph.container,u));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,f.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;u=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",u):new ResizeSensor(this.graph.container,u))}else 9>=document.documentMode||this.graph.addListener("size",
-u);var C=mxUtils.bind(this,function(J){var R=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==J&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(J=null,null!=D&&f.height+2*this.graph.border>D-2&&(J=(D-2*this.graph.border-2)/f.height),this.fitGraph(J)):this.widthIsEmpty||
-null!=J||0!=this.graphConfig.resize||""==b.style.height?(J=null!=J?J:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+J.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+J.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=R});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(J){f=this.graph.getGraphBounds();y=null;C(J)}};
+u);var C=mxUtils.bind(this,function(J){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==J&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(J=null,null!=D&&f.height+2*this.graph.border>D-2&&(J=(D-2*this.graph.border-2)/f.height),this.fitGraph(J)):this.widthIsEmpty||
+null!=J||0!=this.graphConfig.resize||""==b.style.height?(J=null!=J?J:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+J.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+J.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(J){f=this.graph.getGraphBounds();y=null;C(J)}};
GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),l=b.border,u=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/u+l):l,null!=f.y?Math.floor(b.view.translate.y-f.y/u+l):l)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};
-GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var J=0;J<u.length;J++){var R=b.getCell(u[J]);null!=R&&(f=!0,q[R.id]=!0)}else for(J=0;J<l.length;J++)R=b.getChildAt(b.root,parseInt(l[J])),null!=R&&(f=!0,q[R.id]=!0);for(J=0;f&&
-J<C;J++)R=b.getChildAt(b.root,J),b.setVisible(R,q[R.id]||!1)}else for(J=0;J<C;J++)b.setVisible(b.getChildAt(b.root,J),f.isVisible(f.getChildAt(f.root,J)))}finally{b.endUpdate()}q=!0}return q};
+GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var J=0;J<u.length;J++){var S=b.getCell(u[J]);null!=S&&(f=!0,q[S.id]=!0)}else for(J=0;J<l.length;J++)S=b.getChildAt(b.root,parseInt(l[J])),null!=S&&(f=!0,q[S.id]=!0);for(J=0;f&&
+J<C;J++)S=b.getChildAt(b.root,J),b.setVisible(S,q[S.id]||!1)}else for(J=0;J<C;J++)b.setVisible(b.getChildAt(b.root,J),f.isVisible(f.getChildAt(f.root,J)))}finally{b.endUpdate()}q=!0}return q};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.display="flex";f.style.alignItems="center";f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=
this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var l=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",l);this.toolbar=f;l();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");
mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),aa||200)}),C=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=
"flex";mxUtils.setOpacity(f,aa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(C(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(aa){C(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(aa){C(100);mxEvent.consume(aa)}));mxEvent.addListener(f,"mouseleave",
-mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||C(30)}));var J=this.graph,R=J.getTolerance();J.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=J.container.scrollLeft;this.scrollTop=J.container.scrollTop},mouseMove:function(aa,oa){},mouseUp:function(aa,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-J.container.scrollLeft)<R&&Math.abs(this.scrollTop-J.container.scrollTop)<
-R&&Math.abs(this.startX-oa.getGraphX())<R&&Math.abs(this.startY-oa.getGraphY())<R&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(aa,oa,da,ka){aa=this.createToolbarButton(aa,oa,da,ka);f.appendChild(aa);D++;return aa}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var H=l[F];if("pages"==H){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
+mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||C(30)}));var J=this.graph,S=J.getTolerance();J.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=J.container.scrollLeft;this.scrollTop=J.container.scrollTop},mouseMove:function(aa,oa){},mouseUp:function(aa,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-J.container.scrollLeft)<S&&Math.abs(this.scrollTop-J.container.scrollTop)<
+S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(aa,oa,da,ka){aa=this.createToolbarButton(aa,oa,da,ka);f.appendChild(aa);D++;return aa}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var H=l[F];if("pages"==H){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==H){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(aa){if(null!=g)g.parentNode.removeChild(g),
@@ -4265,8 +4266,8 @@ this.graphConfig.highlight&&(l.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("src",Editor.closeBlackImage);l.style.position="fixed";l.style.top="32px";l.style.right="32px";l.style.cursor="pointer";
l.className="geAdaptiveAsset";var u=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",u);q.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(m){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};
-EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),J=this.initialOverflow,R=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),
-document.body.removeChild(l),document.body.style.overflow=J,GraphViewer.resizeSensorEnabled=!0,R.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;D.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),J=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),
+document.body.removeChild(l),document.body.style.overflow=J,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;D.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(n){return c.getImageUrl(n)};return m};this.graphConfig.move&&(D.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(D,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,
l.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(l)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(D,this.graph),q.lightboxFit(),q.chromelessResize()}catch(m){q.handleError(m,
null,function(){q.destroy()})}}),0);return q};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};
@@ -4286,7 +4287,7 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,l){if(null!=GraphViewe
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function C(m,n){if(!m.resizedAttached)m.resizedAttached=
new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],H=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var Z,ha,ca,aa;n=function(){if((ca=m.offsetWidth)!=Z||(aa=m.offsetHeight)!=ha)L=!0,Z=ca,ha=aa;M()};var oa=
-function(da,ka,ba){da.attachEvent?da.attachEvent("on"+ka,ba):da.addEventListener(ka,ba)};oa(x,"scroll",n);oa(H,"scroll",n)}var J=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var R=null,D=!1;(new ResizeObserver(function(){D||(null!=R&&window.clearTimeout(R),R=window.setTimeout(function(){D=!0;J();R=null;D=!1},200))})).observe(l)}else{var P=Object.prototype.toString.call(l),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
+function(da,ka,ba){da.attachEvent?da.attachEvent("on"+ka,ba):da.addEventListener(ka,ba)};oa(x,"scroll",n);oa(H,"scroll",n)}var J=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,D=!1;(new ResizeObserver(function(){D||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){D=!0;J();S=null;D=!1},200))})).observe(l)}else{var P=Object.prototype.toString.call(l),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
P||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){P=0;for(var g=l.length;P<g;P++)C(l[P],J)}else C(l,J);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index a04b2b905..bbc7cab4f 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -2,8 +2,9 @@ window.PROXY_URL=window.PROXY_URL||"https://viewer.diagrams.net/proxy";window.ST
window.mxImageBasePath=window.mxImageBasePath||"https://viewer.diagrams.net/mxgraph/images";window.mxBasePath=window.mxBasePath||"https://viewer.diagrams.net/mxgraph/";window.mxLoadStylesheets=window.mxLoadStylesheets||!1;
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...M,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Ie=!1,Me=!0,ke=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,M),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...I]),yt=w({},[...M,...k]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Ie&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!Me&&S(/\/>/i,m)){At(a,e);continue}ke&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),s||(s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const u=w(Array.prototype.forEach),m=w(Array.prototype.lastIndexOf),p=w(Array.prototype.pop),f=w(Array.prototype.push),d=w(Array.prototype.splice),h=w(String.prototype.toLowerCase),g=w(String.prototype.toString),T=w(String.prototype.match),y=w(String.prototype.replace),E=w(String.prototype.indexOf),A=w(String.prototype.trim),_=w(Object.prototype.hasOwnProperty),b=w(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function R(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function D(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function C(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=D(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=C(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=o(e)}return function(){return null}}const O=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),x=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:W});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.3.0",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:w,Element:D,NodeFilter:B,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Y,trustedTypes:j}=n,q=D.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:be}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const we=R({},[...O,...x,...L,...I,...U]);let Re=null;const De=R({},[...z,...P,...F,...H]);let Ce=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Oe=null;const xe=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,ke=!0,Ie=!1,Me=!0,Ue=!1,ze=!0,Pe=!1,Fe=!1,He=!1,Be=!1,Ge=!1,We=!1,Ye=!0,je=!1,Xe=!0,qe=!1,$e={},Ke=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=R({},["audio","video","img","source","image","track"]);let Qe=null;const et=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let rt=ot,it=!1,at=null;const lt=R({},[tt,nt,ot],g);let ct=R({},["mi","mo","mn","ms","mtext"]),st=R({},["annotation-xml"]);const ut=R({},["title","style","font","a","script"]);let mt=null;const pt=["application/xhtml+xml","text/html"];let ft=null,dt=null;const ht=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),mt=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===mt?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ft):we,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ft):De,at=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):lt,Qe=_(e,"ADD_URI_SAFE_ATTR")?R(C(et),e.ADD_URI_SAFE_ATTR,ft):et,Ze=_(e,"ADD_DATA_URI_TAGS")?R(C(Je),e.ADD_DATA_URI_TAGS,ft):Je,Ke=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ft):Ve,ve=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ft):C({}),Oe=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ft):C({}),$e=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ge=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Xe=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,rt=e.NAMESPACE||ot,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(ke=!1),Ge&&(Be=!0),$e&&(Ne=R({},U),Re=[],!0===$e.html&&(R(Ne,O),R(Re,z)),!0===$e.svg&&(R(Ne,x),R(Re,P),R(Re,H)),!0===$e.svgFilters&&(R(Ne,L),R(Re,P),R(Re,H)),!0===$e.mathMl&&(R(Ne,I),R(Re,F),R(Re,H))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?xe.tagCheck=e.ADD_TAGS:(Ne===we&&(Ne=C(Ne)),R(Ne,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?xe.attributeCheck=e.ADD_ATTR:(Re===De&&(Re=C(Re)),R(Re,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&R(Qe,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.FORBID_CONTENTS,ft)),Xe&&(Ne["#text"]=!0),Pe&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),dt=e}},yt=R({},[...x,...L,...k]),Et=R({},[...I,...M]),At=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},_t=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Ge)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(rt===ot)try{t=(new Y).parseFromString(o,mt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(rt,"template",null);try{t.documentElement.innerHTML=it?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===ot?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},wt=function(e){return"function"==typeof w&&e instanceof w};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,dt)}))}const Dt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return At(e),!0;const n=ft(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),ze&&e.hasChildNodes()&&!wt(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return At(e),!0;if(e.nodeType===ee)return At(e),!0;if(ze&&e.nodeType===te&&b(/<[/\w]/g,e.data))return At(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(n))&&(!Ne[n]||ve[n])){if(!ve[n]&&vt(n)){if(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Xe&&!Ke[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return At(e),!0}return e instanceof D&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===ot?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===ot?"math"===n:t.namespaceURI===nt?"math"===n&&st[o]:Boolean(Et[n]):e.namespaceURI===ot?!(t.namespaceURI===nt&&!st[o])&&!(t.namespaceURI===tt&&!ct[o])&&!Et[n]&&(ut[n]||!yt[n]):!("application/xhtml+xml"!==mt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(At(e),!0)},Ct=function(e,t,n){if(Ye&&("id"===t||"name"===t)&&(n in r||n in ht))return!1;if(ke&&!Oe[t]&&b(ye,t));else if(Le&&b(Ee,t));else if(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e));else if(!Re[t]||Oe[t]){if(!(vt(e)&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&b(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Qe[t]);else if(b(Se,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ze[e]){if(Ie&&!b(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&T(e,be)},Ot=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ft(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!je||"id"!==s&&"name"!==s||(_t(a,e),f="user-content-"+f),ze&&b(/((--!?|])>)|<\/(style|title|textarea)/i,f)){_t(a,e);continue}if("attributename"===s&&T(f,"href")){_t(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(a,e);continue}if(!Me&&b(/\/>/i,f)){_t(a,e);continue}Ue&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=ft(e.nodeName);if(Ct(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Nt(e)?At(e):p(o.removed)}catch(t){_t(a,e)}}else _t(a,e)}Rt(de.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),Dt(n),Ot(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!wt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Fe||Tt(t),o.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=ft(e.nodeName);if(!Ne[t]||ve[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=bt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Be&&!Ue&&!Pe&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=bt(e),!n)return Be?null:We?ce:""}n&&He&&At(n.firstChild);const c=St(qe?e:n);for(;i=c.nextNode();)Dt(i),Ot(i),i.content instanceof s&&xt(i.content);if(qe)return e;if(Be){if(Ge)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ue&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},o.clearConfig=function(){dt=null,Fe=!1},o.isValidAttribute=function(e,t,n){dt||Tt({});const o=ft(e),r=ft(t);return Ct(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+//# sourceMappingURL=purify.min.js.map
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,i=30,r=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);var _=new Array(60);e(_);var f=new Array(512);e(f);var u=new Array(256);e(u);var c=new Array(29);e(c);var w,m,b,g=new Array(i);function p(t,e,a,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(g);var k=function(t){return t<256?f[t]:f[256+(t>>>7)]},y=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},z=function(t,e,a){x(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,i,s=new Array(16),o=0;for(n=1;n<=r;n++)o=o+a[n-1]<<1,s[n]=o;for(i=0;i<=e;i++){var l=t[2*i+1];0!==l&&(t[2*i]=A(s[l]++,l))}},R=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Z=function(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var i=2*e,r=2*a;return t[i]<t[r]||t[i]===t[r]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],i=a<<1;i<=t.heap_len&&(i<t.heap_len&&S(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!S(e,n,t.heap[i],t.depth));)t.heap[a]=t.heap[i],a=i,i<<=1;t.heap[a]=n},D=function(t,e,n){var i,r,l,h,d=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+d++],i+=(255&t.pending_buf[t.sym_buf+d++])<<8,r=t.pending_buf[t.sym_buf+d++],0===i?z(t,r,e):(l=u[r],z(t,l+a+1,e),0!==(h=s[l])&&(r-=c[l],x(t,r,h)),i--,l=k(i),z(t,l,n),0!==(h=o[l])&&(i-=g[l],x(t,i,h)))}while(d<t.sym_next);z(t,256,e)},T=function(t,e){var a,n,i,s=e.dyn_tree,o=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.elems,d=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==s[2*a]?(t.heap[++t.heap_len]=d=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=d<2?++d:0)]=1,t.depth[i]=0,t.opt_len--,l&&(t.static_len-=o[2*i+1]);for(e.max_code=d,a=t.heap_len>>1;a>=1;a--)U(t,s,a);i=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*i]=s[2*a]+s[2*n],t.depth[i]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=i,t.heap[1]=i++,U(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,i,s,o,l,h=e.dyn_tree,d=e.max_code,_=e.stat_desc.static_tree,f=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,w=e.stat_desc.max_length,m=0;for(s=0;s<=r;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=h[2*h[2*(n=t.heap[a])+1]+1]+1)>w&&(s=w,m++),h[2*n+1]=s,n>d||(t.bl_count[s]++,o=0,n>=c&&(o=u[n-c]),l=h[2*n],t.opt_len+=l*(s+o),f&&(t.static_len+=l*(_[2*n+1]+o)));if(0!==m){do{for(s=w-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[w]--,m-=2}while(m>0);for(s=w;0!==s;s--)for(n=t.bl_count[s];0!==n;)(i=t.heap[--a])>d||(h[2*i+1]!==s&&(t.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(t,e),E(s,d,t.bl_count)},O=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)i=s,s=e[2*(n+1)+1],++o<l&&i===s||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==r&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4))},I=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),n=0;n<=a;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(o<h)do{z(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==r&&(z(t,i,t.bl_tree),o--),z(t,16,t.bl_tree),x(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),x(t,o-3,3)):(z(t,18,t.bl_tree),x(t,o-11,7));o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4)}},F=!1,L=function(t,e,a,n){x(t,0+(n?1:0),3),Z(t),y(t,a),y(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a},N=function(t,e,n,i){var r,s,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),T(t,t.l_desc),T(t,t.d_desc),o=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=n+5,n+4<=r&&-1!==e?L(t,e,n,i):4===t.strategy||s===r?(x(t,2+(i?1:0),3),D(t,d,_)):(x(t,4+(i?1:0),3),function(t,e,a,n){var i;for(x(t,e-257,5),x(t,a-1,5),x(t,n-4,4),i=0;i<n;i++)x(t,t.bl_tree[2*h[i]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),D(t,t.dyn_ltree,t.dyn_dtree)),R(t),i&&Z(t)},B={_tr_init:function(t){F||(!function(){var t,e,a,h,v,k=new Array(16);for(a=0,h=0;h<28;h++)for(c[h]=a,t=0;t<1<<s[h];t++)u[a++]=h;for(u[a-1]=h,v=0,h=0;h<16;h++)for(g[h]=v,t=0;t<1<<o[h];t++)f[v++]=h;for(v>>=7;h<i;h++)for(g[h]=v<<7,t=0;t<1<<o[h]-7;t++)f[256+v++]=h;for(e=0;e<=r;e++)k[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,k[8]++;for(;t<=255;)d[2*t+1]=9,t++,k[9]++;for(;t<=279;)d[2*t+1]=7,t++,k[7]++;for(;t<=287;)d[2*t+1]=8,t++,k[8]++;for(E(d,287,k),t=0;t<i;t++)_[2*t+1]=5,_[2*t]=A(t,5);w=new p(d,s,257,n,r),m=new p(_,o,0,i,r),b=new p(new Array(0),l,0,19,7)}(),F=!0),t.l_desc=new v(t.dyn_ltree,w),t.d_desc=new v(t.dyn_dtree,m),t.bl_desc=new v(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,R(t)},_tr_stored_block:L,_tr_flush_block:N,_tr_tally:function(t,e,n){return t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(u[n]+a+1)]++,t.dyn_dtree[2*k(e)]++),t.sym_next===t.sym_end},_tr_align:function(t){x(t,2,3),z(t,256,d),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var i=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{r=r+(i=i+e[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0},M=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),H=function(t,e,a,n){var i=M,r=n+a;t^=-1;for(var s=n;s<r;s++)t=t>>>8^i[255&(t^e[s])];return-1^t},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,Y=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,it=K.Z_BUF_ERROR,rt=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,ot=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,ht=K.Z_FIXED,dt=K.Z_DEFAULT_STRATEGY,_t=K.Z_UNKNOWN,ft=K.Z_DEFLATED,ut=258,ct=262,wt=42,mt=113,bt=666,gt=function(t,e){return t.msg=j[e],e},pt=function(t){return 2*t-(t>4?9:0)},vt=function(t){for(var e=t.length;--e>=0;)t[e]=0},kt=function(t){var e,a,n,i=t.w_size;n=e=t.hash_size;do{a=t.head[--n],t.head[n]=a>=i?a-i:0}while(--e);n=e=i;do{a=t.prev[--n],t.prev[n]=a>=i?a-i:0}while(--e)},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},xt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},At=function(t,e){t.pending_buf[t.pending++]=e},Et=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Rt=function(t,e,a,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),a),1===t.state.wrap?t.adler=C(t.adler,e,i,a):2===t.state.wrap&&(t.adler=H(t.adler,e,i,a)),t.next_in+=i,t.total_in+=i,i)},Zt=function(t,e){var a,n,i=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ut,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<f);if(n=ut-(f-r),r=f-ut,n>s){if(t.match_start=e,s=n,n>=o)break;u=h[r+s-1],c=h[r+s]}}}while((e=_[e&d])>l&&0!=--i);return s<=t.lookahead?s:t.lookahead},St=function(t){var e,a,n,i=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=i+(i-ct)&&(t.window.set(t.window.subarray(i,i+i-a),0),t.match_start-=i,t.strstart-=i,t.block_start-=i,t.insert>t.strstart&&(t.insert=t.strstart),kt(t),a+=i),0===t.strm.avail_in)break;if(e=Rt(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=e,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=yt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){var a,n,i,r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,o=t.strm.avail_in;do{if(a=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,a>(n=t.strstart-t.block_start)+t.strm.avail_in&&(a=n+t.strm.avail_in),a>i&&(a=i),a<r&&(0===a&&e!==V||e===q||a!==n+t.strm.avail_in))break;s=e===V&&a===n+t.strm.avail_in?1:0,Y(t,0,0,s),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),n&&(n>a&&(n=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,a-=n),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===s);return(o-=t.strm.avail_in)&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==q&&e!==V&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Rt(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,r=(i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i)>t.w_size?t.w_size:i,((n=t.strstart-t.block_start)>=r||(n||e===V)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(a=n>i?i:n,s=e===V&&0===t.strm.avail_in&&a===n?1:0,Y(t,t.block_start,a,s),t.block_start+=a,xt(t.strm)),s?3:1)},Dt=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2},Tt=function(t,e){for(var a,n,i;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,e,a,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=i}var It=[new Ot(0,0,0,0,Ut),new Ot(4,4,8,4,Dt),new Ot(4,5,16,8,Dt),new Ot(4,6,32,32,Dt),new Ot(4,4,16,16,Tt),new Ot(8,16,32,32,Tt),new Ot(8,16,128,128,Tt),new Ot(8,32,128,256,Tt),new Ot(32,128,258,1024,Tt),new Ot(32,258,258,4096,Tt)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Lt=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==wt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==bt?1:0},Nt=function(t){if(Lt(t))return gt(t,at);t.total_in=t.total_out=0,t.data_type=_t;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?wt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,P(e),tt},Bt=function(t){var e,a=Nt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,vt(e.head),e.max_lazy_match=It[e.level].max_lazy,e.good_match=It[e.level].good_length,e.nice_match=It[e.level].nice_length,e.max_chain_length=It[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ct=function(t,e,a,n,i,r){if(!t)return at;var s=1;if(e===rt&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||a!==ft||n<8||n>15||e<0||e>9||r<0||r>ht||8===n&&1!==s)return gt(t,at);8===n&&(n=9);var o=new Ft;return t.state=o,o.strm=t,o.status=wt,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=r,o.method=a,Bt(t)},Mt={deflateInit:function(t,e){return Ct(t,e,ft,15,8,dt)},deflateInit2:Ct,deflateReset:Bt,deflateResetKeep:Nt,deflateSetHeader:function(t,e){return Lt(t)||2!==t.state.wrap?at:(t.state.gzhead=e,tt)},deflate:function(t,e){if(Lt(t)||e>$||e<0)return t?gt(t,at):at;var a=t.state;if(!t.output||0!==t.avail_in&&!t.input||a.status===bt&&e!==V)return gt(t,0===t.avail_out?it:at);var n=a.last_flush;if(a.last_flush=e,0!==a.pending){if(xt(t),0===t.avail_out)return a.last_flush=-1,tt}else if(0===t.avail_in&&pt(e)<=pt(n)&&e!==V)return gt(t,it);if(a.status===bt&&0!==t.avail_in)return gt(t,it);if(a.status===wt&&0===a.wrap&&(a.status=mt),a.status===wt){var i=ft+(a.w_bits-8<<4)<<8;if(i|=(a.strategy>=ot||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(i|=32),Et(a,i+=31-i%31),0!==a.strstart&&(Et(a,t.adler>>>16),Et(a,65535&t.adler)),t.adler=1,a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(57===a.status)if(t.adler=0,At(a,31),At(a,139),At(a,8),a.gzhead)At(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),At(a,255&a.gzhead.time),At(a,a.gzhead.time>>8&255),At(a,a.gzhead.time>>16&255),At(a,a.gzhead.time>>24&255),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(At(a,255&a.gzhead.extra.length),At(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=H(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(At(a,0),At(a,0),At(a,0),At(a,0),At(a,0),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,3),a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;if(69===a.status){if(a.gzhead.extra){for(var r=a.pending,s=(65535&a.gzhead.extra.length)-a.gzindex;a.pending+s>a.pending_buf_size;){var o=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+o),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex+=o,xt(t),0!==a.pending)return a.last_flush=-1,tt;r=0,s-=o}var l=new Uint8Array(a.gzhead.extra);a.pending_buf.set(l.subarray(a.gzindex,a.gzindex+s),a.pending),a.pending+=s,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){var h,d=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),xt(t),0!==a.pending)return a.last_flush=-1,tt;d=0}h=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,At(a,h)}while(0!==h);a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){var _,f=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f)),xt(t),0!==a.pending)return a.last_flush=-1,tt;f=0}_=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,At(a,_)}while(0!==_);a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(xt(t),0!==a.pending))return a.last_flush=-1,tt;At(a,255&t.adler),At(a,t.adler>>8&255),t.adler=0}if(a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(0!==t.avail_in||0!==a.lookahead||e!==q&&a.status!==bt){var u=0===a.level?Ut(a,e):a.strategy===ot?function(t,e){for(var a;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):a.strategy===lt?function(t,e){for(var a,n,i,r,s=t.window;;){if(t.lookahead<=ut){if(St(t),t.lookahead<=ut&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){r=t.strstart+ut;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<r);t.match_length=ut-(r-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):It[a.level].func(a,e);if(3!==u&&4!==u||(a.status=bt),1===u||3===u)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===u&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(vt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et)},deflateEnd:function(t){if(Lt(t))return at;var e=t.state.status;return t.state=null,e===mt?gt(t,nt):tt},deflateSetDictionary:function(t,e){var a=e.length;if(Lt(t))return at;var n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==wt||n.lookahead)return at;if(1===i&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var r=new Uint8Array(n.w_size);r.set(e.subarray(a-n.w_size,a),0),e=r,a=n.w_size}var s=t.avail_in,o=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,St(n);n.lookahead>=3;){var h=n.strstart,d=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[h+3-1]),n.prev[h&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=h,h++}while(--d);n.strstart=h,n.lookahead=2,St(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=l,t.avail_in=s,n.wrap=i,tt},deflateInfo:"pako deflate (from Nodeca project)"};function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}var jt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Kt=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!==Ht(a))throw new TypeError(a+"must be non-object");for(var n in a)jt(a,n)&&(t[n]=a[n])}}return t},Pt=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var i=new Uint8Array(e),r=0,s=0,o=t.length;r<o;r++){var l=t[r];i.set(l,s),s+=l.length}return i},Yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Yt=!1}for(var Gt=new Uint8Array(256),Xt=0;Xt<256;Xt++)Gt[Xt]=Xt>=252?6:Xt>=248?5:Xt>=240?4:Xt>=224?3:Xt>=192?2:1;Gt[254]=Gt[254]=1;var Wt=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,i,r,s=t.length,o=0;for(i=0;i<s;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),r=0,i=0;r<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),a<128?e[r++]=a:a<2048?(e[r++]=192|a>>>6,e[r++]=128|63&a):a<65536?(e[r++]=224|a>>>12,e[r++]=128|a>>>6&63,e[r++]=128|63&a):(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63,e[r++]=128|a>>>6&63,e[r++]=128|63&a);return e},qt=function(t,e){var a,n,i=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));var r=new Array(2*i);for(n=0,a=0;a<i;){var s=t[a++];if(s<128)r[n++]=s;else{var o=Gt[s];if(o>4)r[n++]=65533,a+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&a<i;)s=s<<6|63&t[a++],o--;o>1?r[n++]=65533:s<65536?r[n++]=s:(s-=65536,r[n++]=55296|s>>10&1023,r[n++]=56320|1023&s)}}}return function(t,e){if(e<65534&&t.subarray&&Yt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}(r,n)},Jt=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Gt[t[a]]>e?a:e};var Qt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Vt=Object.prototype.toString,$t=K.Z_NO_FLUSH,te=K.Z_SYNC_FLUSH,ee=K.Z_FULL_FLUSH,ae=K.Z_FINISH,ne=K.Z_OK,ie=K.Z_STREAM_END,re=K.Z_DEFAULT_COMPRESSION,se=K.Z_DEFAULT_STRATEGY,oe=K.Z_DEFLATED;function le(t){this.options=Kt({level:re,method:oe,chunkSize:16384,windowBits:15,memLevel:8,strategy:se},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ne)throw new Error(j[a]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Wt(e.dictionary):"[object ArrayBuffer]"===Vt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=Mt.deflateSetDictionary(this.strm,n))!==ne)throw new Error(j[a]);this._dict_set=!0}}function he(t,e){var a=new le(e);if(a.push(t,!0),a.err)throw a.msg||j[a.err];return a.result}le.prototype.push=function(t,e){var a,n,i=this.strm,r=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ae:$t,"string"==typeof t?i.input=Wt(t):"[object ArrayBuffer]"===Vt.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(r),i.next_out=0,i.avail_out=r),(n===te||n===ee)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((a=Mt.deflate(i,n))===ie)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),a=Mt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ne;if(0!==i.avail_out){if(n>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},le.prototype.onData=function(t){this.chunks.push(t)},le.prototype.onEnd=function(t){t===ne&&(this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var de={Deflate:le,deflate:he,deflateRaw:function(t,e){return(e=e||{}).raw=!0,he(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,he(t,e)},constants:K},_e=16209,fe=function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=t.state;a=t.next_in,z=t.input,n=a+(t.avail_in-5),i=t.next_out,A=t.output,r=i-(e-t.avail_out),s=i+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,u=E.bits,c=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=c[f&m];e:for(;;){if(f>>>=p=g>>>24,u-=p,0===(p=g>>>16&255))A[i++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=c[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=_e;break t}v=65535&g,(p&=15)&&(u<p&&(f+=z[a++]<<u,u+=8),v+=f&(1<<p)-1,f>>>=p,u-=p),u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=w[f&b];a:for(;;){if(f>>>=p=g>>>24,u-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=_e;break t}if(k=65535&g,u<(p&=15)&&(f+=z[a++]<<u,(u+=8)<p&&(f+=z[a++]<<u,u+=8)),(k+=f&(1<<p)-1)>o){t.msg="invalid distance too far back",E.mode=_e;break t}if(f>>>=p,u-=p,k>(p=i-r)){if((p=k-p)>h&&E.sane){t.msg="invalid distance too far back",E.mode=_e;break t}if(y=0,x=_,0===d){if(y+=l-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}else if(d<p){if(y+=l+d-p,(p-=d)<v){v-=p;do{A[i++]=_[y++]}while(--p);if(y=0,d<v){v-=p=d;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}}else if(y+=d-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}for(;v>2;)A[i++]=x[y++],A[i++]=x[y++],A[i++]=x[y++],v-=3;v&&(A[i++]=x[y++],v>1&&(A[i++]=x[y++]))}else{y=i-k;do{A[i++]=A[y++],A[i++]=A[y++],A[i++]=A[y++],v-=3}while(v>2);v&&(A[i++]=A[y++],v>1&&(A[i++]=A[y++]))}break}}break}}while(a<n&&i<s);a-=v=u>>3,f&=(1<<(u-=v<<3))-1,t.next_in=a,t.next_out=i,t.avail_in=a<n?n-a+5:5-(a-n),t.avail_out=i<s?s-i+257:257-(i-s),E.hold=f,E.bits=u},ue=15,ce=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),we=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),me=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),be=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),ge=function(t,e,a,n,i,r,s,o){var l,h,d,_,f,u,c,w,m,b=o.bits,g=0,p=0,v=0,k=0,y=0,x=0,z=0,A=0,E=0,R=0,Z=null,S=new Uint16Array(16),U=new Uint16Array(16),D=null;for(g=0;g<=ue;g++)S[g]=0;for(p=0;p<n;p++)S[e[a+p]]++;for(y=b,k=ue;k>=1&&0===S[k];k--);if(y>k&&(y=k),0===k)return i[r++]=20971520,i[r++]=20971520,o.bits=1,0;for(v=1;v<k&&0===S[v];v++);for(y<v&&(y=v),A=1,g=1;g<=ue;g++)if(A<<=1,(A-=S[g])<0)return-1;if(A>0&&(0===t||1!==k))return-1;for(U[1]=0,g=1;g<ue;g++)U[g+1]=U[g]+S[g];for(p=0;p<n;p++)0!==e[a+p]&&(s[U[e[a+p]]++]=p);if(0===t?(Z=D=s,u=20):1===t?(Z=ce,D=we,u=257):(Z=me,D=be,u=0),R=0,p=0,g=v,f=r,x=y,z=0,d=-1,_=(E=1<<y)-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){c=g-z,s[p]+1<u?(w=0,m=s[p]):s[p]>=u?(w=D[s[p]-u],m=Z[s[p]-u]):(w=96,m=0),l=1<<g-z,v=h=1<<x;do{i[f+(R>>z)+(h-=l)]=c<<24|w<<16|m|0}while(0!==h);for(l=1<<g-1;R&l;)l>>=1;if(0!==l?(R&=l-1,R+=l):R=0,p++,0==--S[g]){if(g===k)break;g=e[a+s[p]]}if(g>y&&(R&_)!==d){for(0===z&&(z=y),f+=v,A=1<<(x=g-z);x+z<k&&!((A-=S[x+z])<=0);)x++,A<<=1;if(E+=1<<x,1===t&&E>852||2===t&&E>592)return 1;i[d=R&_]=y<<24|x<<16|f-r|0}}return 0!==R&&(i[f+R]=g-z<<24|64<<16|0),o.bits=y,0},pe=K.Z_FINISH,ve=K.Z_BLOCK,ke=K.Z_TREES,ye=K.Z_OK,xe=K.Z_STREAM_END,ze=K.Z_NEED_DICT,Ae=K.Z_STREAM_ERROR,Ee=K.Z_DATA_ERROR,Re=K.Z_MEM_ERROR,Ze=K.Z_BUF_ERROR,Se=K.Z_DEFLATED,Ue=16180,De=16190,Te=16191,Oe=16192,Ie=16194,Fe=16199,Le=16200,Ne=16206,Be=16209,Ce=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function Me(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var He,je,Ke=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode<Ue||e.mode>16211?1:0},Pe=function(t){if(Ke(t))return Ae;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ue,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ye},Ye=function(t){if(Ke(t))return Ae;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Pe(t)},Ge=function(t,e){var a;if(Ke(t))return Ae;var n=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Ae:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=a,n.wbits=e,Ye(t))},Xe=function(t,e){if(!t)return Ae;var a=new Me;t.state=a,a.strm=t,a.window=null,a.mode=Ue;var n=Ge(t,e);return n!==ye&&(t.state=null),n},We=!0,qe=function(t){if(We){He=new Int32Array(512),je=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ge(1,t.lens,0,288,He,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ge(2,t.lens,0,32,je,0,t.work,{bits:5}),We=!1}t.lencode=He,t.lenbits=9,t.distcode=je,t.distbits=5},Je=function(t,e,a,n){var i,r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),n>=r.wsize?(r.window.set(e.subarray(a-r.wsize,a),0),r.wnext=0,r.whave=r.wsize):((i=r.wsize-r.wnext)>n&&(i=n),r.window.set(e.subarray(a-n,a-n+i),r.wnext),(n-=i)?(r.window.set(e.subarray(a-n,a),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},Qe={inflateReset:Ye,inflateReset2:Ge,inflateResetKeep:Pe,inflateInit:function(t){return Xe(t,15)},inflateInit2:Xe,inflate:function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=0,R=new Uint8Array(4),Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ke(t)||!t.output||!t.input&&0!==t.avail_in)return Ae;(a=t.state).mode===Te&&(a.mode=Oe),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=ye;t:for(;;)switch(a.mode){case Ue:if(0===a.wrap){a.mode=Oe;break}for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=Be;break}if((15&h)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=Be;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:Te,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=Be;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,a.check=H(a.check,R,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&((u=a.length)>o&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(n.subarray(r,r+u),y)),512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=Be;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=Te;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}t.adler=a.check=Ce(h),h=0,d=0,a.mode=De;case De:if(0===a.havedict)return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,ze;t.adler=a.check=1,a.mode=Te;case Te:if(e===ve||e===ke)break t;case Oe:if(a.last){h>>>=7&d,d-=7&d,a.mode=Ne;break}for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}switch(a.last=1&h,d-=1,3&(h>>>=1)){case 0:a.mode=16193;break;case 1:if(qe(a),a.mode=Fe,e===ke){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=Be}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Be;break}if(a.length=65535&h,h=0,d=0,a.mode=Ie,e===ke)break t;case Ie:a.mode=16195;case 16195:if(u=a.length){if(u>o&&(u=o),u>l&&(u=l),0===u)break t;i.set(n.subarray(r,r+u),s),o-=u,r+=u,l-=u,s+=u,a.length-=u;break}a.mode=Te;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Be;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=ge(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=Be;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(A=m+2;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=Be;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===g){for(A=m+3;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=3+(7&(h>>>=m)),h>>>=3,d-=3}else{for(A=m+7;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=11+(127&(h>>>=m)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Be;break}for(;u--;)a.lens[a.have++]=y}}if(a.mode===Be)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Be;break}if(a.lenbits=9,z={bits:a.lenbits},x=ge(1,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=Be;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=ge(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=Be;break}if(a.mode=Fe,e===ke)break t;case Fe:a.mode=Le;case Le:if(o>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,fe(t,f),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,a.mode===Te&&(a.back=-1);break}for(a.back=0;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,v=b,k=g;b=(E=a.lencode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=Te;break}if(64&b){t.msg="invalid literal/length code",a.mode=Be;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;b=(E=a.distcode[h&(1<<a.distbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(0==(240&b)){for(p=m,v=b,k=g;b=(E=a.distcode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=Be;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Be;break}a.mode=16204;case 16204:if(0===l)break t;if(u=f-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Be;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),w=a.window}else w=i,c=s-a.offset,u=a.length;u>l&&(u=l),l-=u,a.length-=u;do{i[s++]=w[c++]}while(--u);0===a.length&&(a.mode=Le);break;case 16205:if(0===l)break t;i[s++]=a.length,l--,a.mode=Le;break;case Ne:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=n[r++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,s-f):C(a.check,i,f,s-f)),f=l,4&a.wrap&&(a.flags?h:Ce(h))!==a.check){t.msg="incorrect data check",a.mode=Be;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=Be;break}h=0,d=0}a.mode=16208;case 16208:x=xe;break t;case Be:x=Ee;break t;case 16210:return Re;default:return Ae}return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<Be&&(a.mode<Ne||e!==pe))&&Je(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,t.next_out-f):C(a.check,i,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(a.mode===Te?128:0)+(a.mode===Fe||a.mode===Ie?256:0),(0===_&&0===f||e===pe)&&x===ye&&(x=Ze),x},inflateEnd:function(t){if(Ke(t))return Ae;var e=t.state;return e.window&&(e.window=null),t.state=null,ye},inflateGetHeader:function(t,e){if(Ke(t))return Ae;var a=t.state;return 0==(2&a.wrap)?Ae:(a.head=e,e.done=!1,ye)},inflateSetDictionary:function(t,e){var a,n=e.length;return Ke(t)||0!==(a=t.state).wrap&&a.mode!==De?Ae:a.mode===De&&C(1,e,n,0)!==a.check?Ee:Je(t,e,n,n)?(a.mode=16210,Re):(a.havedict=1,ye)},inflateInfo:"pako inflate (from Nodeca project)"};var Ve=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},$e=Object.prototype.toString,ta=K.Z_NO_FLUSH,ea=K.Z_FINISH,aa=K.Z_OK,na=K.Z_STREAM_END,ia=K.Z_NEED_DICT,ra=K.Z_STREAM_ERROR,sa=K.Z_DATA_ERROR,oa=K.Z_MEM_ERROR;function la(t){this.options=Kt({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Qe.inflateInit2(this.strm,e.windowBits);if(a!==aa)throw new Error(j[a]);if(this.header=new Ve,Qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Wt(e.dictionary):"[object ArrayBuffer]"===$e.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Qe.inflateSetDictionary(this.strm,e.dictionary))!==aa))throw new Error(j[a])}function ha(t,e){var a=new la(e);if(a.push(t),a.err)throw a.msg||j[a.err];return a.result}la.prototype.push=function(t,e){var a,n,i,r=this.strm,s=this.options.chunkSize,o=this.options.dictionary;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ea:ta,"[object ArrayBuffer]"===$e.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(a=Qe.inflate(r,n))===ia&&o&&((a=Qe.inflateSetDictionary(r,o))===aa?a=Qe.inflate(r,n):a===sa&&(a=ia));r.avail_in>0&&a===na&&r.state.wrap>0&&0!==t[r.next_in];)Qe.inflateReset(r),a=Qe.inflate(r,n);switch(a){case ra:case sa:case ia:case oa:return this.onEnd(a),this.ended=!0,!1}if(i=r.avail_out,r.next_out&&(0===r.avail_out||a===na))if("string"===this.options.to){var l=Jt(r.output,r.next_out),h=r.next_out-l,d=qt(r.output,l);r.next_out=h,r.avail_out=s-h,h&&r.output.set(r.output.subarray(l,l+h),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==aa||0!==i){if(a===na)return a=Qe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},la.prototype.onData=function(t){this.chunks.push(t)},la.prototype.onEnd=function(t){t===aa&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var da={Inflate:la,inflate:ha,inflateRaw:function(t,e){return(e=e||{}).raw=!0,ha(t,e)},ungzip:ha,constants:K},_a=de.Deflate,fa=de.deflate,ua=de.deflateRaw,ca=de.gzip,wa=da.Inflate,ma=da.inflate,ba=da.inflateRaw,ga=da.ungzip,pa=K,va={Deflate:_a,deflate:fa,deflateRaw:ua,gzip:ca,Inflate:wa,inflate:ma,inflateRaw:ba,ungzip:ga,constants:pa};t.Deflate=_a,t.Inflate=wa,t.constants=pa,t.default=va,t.deflate=fa,t.deflateRaw=ua,t.gzip=ca,t.inflate=ma,t.inflateRaw=ba,t.ungzip=ga,Object.defineProperty(t,"__esModule",{value:!0})}));
var rough=function(){"use strict";function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&"number"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;e<t.length-1;e++){const s=t[e],n=t[e+1];if(s[1]!==n[1]){const t=Math.min(s[1],n[1]);h.push({ymin:t,ymax:Math.max(s[1],n[1]),x:t===s[1]?s[0]:n[0],islope:(n[0]-s[0])/(n[1]-s[1])})}}if(h.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;e<h.length&&!(h[e].ymin>i);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t<r.length;t+=2){const e=t+1;if(e>=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:"fillSketch",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t<c;t++){const a=p+l+t*n,r=u-h+2*Math.random()*h,i=a-h+2*Math.random()*h,c=this.helper.ellipse(r,i,o,o,e);s.push(...c.ops)}}return{type:"fillSketch",ops:s}}}class c{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){const s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,n=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach((t=>{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t<r;t++){const a=t*(s+n),h=a+s,r=[c[0]+a*Math.cos(u)+i*Math.cos(u),c[1]+a*Math.sin(u)+i*Math.sin(u)],l=[c[0]+h*Math.cos(u)+i*Math.cos(u),c[1]+h*Math.sin(u)+i*Math.sin(u)];o.push(...this.helper.doubleLineOps(r[0],r[1],l[0],l[1],e))}})),o}}class l{constructor(t){this.helper=t}fillPolygons(t,e){const s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,o=e.zigzagOffset<0?s:e.zigzagOffset,a=n(t,e=Object.assign({},e,{hachureGap:s+o}));return{type:"fillSketch",ops:this.zigzagLines(a,o,e)}}zigzagLines(t,e,s){const n=[];return t.forEach((t=>{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;t<h;t++){const o=2*t*e,a=2*(t+1)*e,h=Math.sqrt(2*Math.pow(e,2)),i=[r[0]+o*Math.cos(c),r[1]+o*Math.sin(c)],l=[r[0]+a*Math.cos(c),r[1]+a*Math.sin(c)],u=[i[0]+h*Math.cos(c+Math.PI/4),i[1]+h*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(i[0],i[1],u[0],u[1],s),...this.helper.doubleLineOps(u[0],u[1],l[0],l[1],s))}})),n}}const u={};class p{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f=0,d=1,g=2,M={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function k(t,e){return t.type===e}function b(t){const e=[],s=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:f,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:d,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:g,text:""},e}(t);let n="BOD",o=0,a=s[o];for(;!k(a,g);){let h=0;const r=[];if("BOD"===n){if("M"!==a.text&&"m"!==a.text)return b("M0,0"+t);o++,h=M[a.text],n=a.text}else k(a,d)?h=M[n]:(o++,h=M[a.text],n=a.text);if(!(o+h<s.length))throw new Error("Path data ended short");for(let t=o;t<o+h;t++){const e=s[t];if(!k(e,d))throw new Error("Param not a number: "+n+","+e.text);r[r.length]=+e.text}if("number"!=typeof M[n])throw new Error("Bad segment: "+n);{const t={key:n,data:r};e.push(t),o+=h,a=s[o],"M"===n&&(n="L"),"m"===n&&(n="l")}}return e}function y(t){let e=0,s=0,n=0,o=0;const a=[];for(const{key:h,data:r}of t)switch(h){case"M":a.push({key:"M",data:[...r]}),[e,s]=r,[n,o]=r;break;case"m":e+=r[0],s+=r[1],a.push({key:"M",data:[e,s]}),n=e,o=s;break;case"L":a.push({key:"L",data:[...r]}),[e,s]=r;break;case"l":e+=r[0],s+=r[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...r]}),e=r[4],s=r[5];break;case"c":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...r]}),e=r[2],s=r[3];break;case"q":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...r]}),e=r[5],s=r[6];break;case"a":e+=r[5],s+=r[6],a.push({key:"A",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case"H":a.push({key:"H",data:[...r]}),e=r[0];break;case"h":e+=r[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...r]}),s=r[0];break;case"v":s+=r[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...r]}),e=r[2],s=r[3];break;case"s":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...r]}),e=r[0],s=r[1];break;case"t":e+=r[0],s+=r[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s="",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case"M":e.push({key:"M",data:[...l]}),[n,o]=l,[a,h]=l;break;case"C":e.push({key:"C",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case"L":e.push({key:"L",data:[...l]}),[n,o]=l;break;case"H":n=l[0],e.push({key:"L",data:[n,o]});break;case"V":o=l[0],e.push({key:"L",data:[n,o]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:"C",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case"T":{const[t,a]=l;let h=0,c=0;"Q"===s||"T"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:"C",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case"Q":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:"C",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case"A":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:"C",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:"C",data:t})})),n=i,o=c}break}case"Z":e.push({key:"Z",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),t<g&&(f=Math.PI-f),s<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),i&&f>d&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e<p.length;e+=3){const s=w(p[e][0],p[e][1],l),n=w(p[e+1][0],p[e+1][1],l),o=w(p[e+2][0],p[e+2][1],l);t.push([s[0],s[1],n[0],n[1],o[0],o[1]])}return t}}const P={randOffset:function(t,e){return G(t,e)},randOffsetWithRange:function(t,e,s){return E(t,e,s)},ellipse:function(t,e,s,n,o){const a=T(s,n,o);return D(t,e,o,a).opset},doubleLineOps:function(t,e,s,n,o){return $(t,e,s,n,o,!0)}};function v(t,e,s,n,o){return{type:"path",ops:$(t,e,s,n,o)}}function S(t,e,s){const n=(t||[]).length;if(n>2){const o=[];for(let e=0;e<n-1;e++)o.push(...$(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&o.push(...$(t[n-1][0],t[n-1][1],t[0][0],t[0][1],s)),{type:"path",ops:o}}return 2===n?v(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function O(t,e,s,n,o){return function(t,e){return S(t,!0,e)}([[t,e],[t+s,e],[t+s,e+n],[t,e+n]],o)}function L(t,e){if(t.length){const s="number"==typeof t[0][0]?[t]:t,n=j(s[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:j(s[0],1.5*(1+.22*e.roughness),z(e));for(let t=1;t<s.length;t++){const a=s[t];if(a.length){const t=j(a,1*(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:j(a,1.5*(1+.22*e.roughness),z(e));for(const e of t)"move"!==e.op&&n.push(e);for(const t of s)"move"!==t.op&&o.push(t)}}return{type:"path",ops:n.concat(o)}}return{type:"path",ops:[]}}function T(t,e,s){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/o;let h=Math.abs(t/2),r=Math.abs(e/2);const i=1-s.curveFitting;return h+=G(h*i,s),r+=G(r*i,s),{increment:a,rx:h,ry:r}}function D(t,e,s,n){const[o,a]=F(n.increment,t,e,n.rx,n.ry,1,n.increment*E(.1,E(.4,1,s),s),s);let h=q(o,null,s);if(!s.disableMultiStroke&&0!==s.roughness){const[o]=F(n.increment,t,e,n.rx,n.ry,1.5,0,s),a=q(o,null,s);h=h.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function A(t,e,s,n,o,a,h,r,i){const c=t,l=e;let u=Math.abs(s/2),p=Math.abs(n/2);u+=G(.01*u,i),p+=G(.01*p,i);let f=o,d=a;for(;f<0;)f+=2*Math.PI,d+=2*Math.PI;d-f>2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:"path",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case"M":a=[h[0],h[1]],o=[h[0],h[1]];break;case"L":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case"C":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case"Z":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:"move",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a<o;a++)s.push({op:"lineTo",data:[n[a][0]+G(t,e),n[a][1]+G(t,e)]})}}return{type:"fillPath",ops:s}}function C(t,e){return function(t,e){let s=t.fillStyle||"hachure";if(!u[s])switch(s){case"zigzag":u[s]||(u[s]=new h(e));break;case"cross-hatch":u[s]||(u[s]=new r(e));break;case"dots":u[s]||(u[s]=new i(e));break;case"dashed":u[s]||(u[s]=new c(e));break;case"zigzag-line":u[s]||(u[s]=new l(e));break;default:s="hachure",u[s]||(u[s]=new o(e))}return u[s]}(e,P).fillPolygons(t,e)}function z(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function W(t){return t.randomizer||(t.randomizer=new p(t.seed||0)),t.randomizer.next()}function E(t,e,s,n=1){return s.roughness*n*(W(s)*(e-t)+t)}function G(t,e,s=1){return E(-t,t,e,s)}function $(t,e,s,n,o,a=!1){const h=a?o.disableMultiStrokeFill:o.disableMultiStroke,r=R(t,e,s,n,o,!0,!1);if(h)return r;const i=R(t,e,s,n,o,!0,!0);return r.concat(i)}function R(t,e,s,n,o,a,h){const r=Math.pow(t-s,2)+Math.pow(e-n,2),i=Math.sqrt(r);let c=1;c=i<200?1:i>500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:"move",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:"move",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:"bcurveTo",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o<t.length;o++)n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]),o===t.length-1&&n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]);return q(n,null,s)}function q(t,e,s){const n=t.length,o=[];if(n>3){const a=[],h=1-s.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;e++){const s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(h*t[e+1][0]-h*t[e-1][0])/6,s[1]+(h*t[e+1][1]-h*t[e-1][1])/6],a[2]=[t[e+1][0]+(h*t[e][0]-h*t[e+2][0])/6,t[e+1][1]+(h*t[e][1]-h*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=s.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+G(t,s),e[1]+G(t,s)]})}}else 3===n?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return o}function F(t,e,s,n,o,a,h,r){const i=[],c=[];if(0===r.roughness){t/=4,c.push([e+n*Math.cos(-t),s+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+n*Math.cos(a),s+o*Math.sin(a)];i.push(t),c.push(t)}c.push([e+n*Math.cos(0),s+o*Math.sin(0)]),c.push([e+n*Math.cos(t),s+o*Math.sin(t)])}else{const l=G(.5,r)-Math.PI/2;c.push([G(a,r)+e+.9*n*Math.cos(l-t),G(a,r)+s+.9*o*Math.sin(l-t)]);const u=2*Math.PI+l-.01;for(let h=l;h<u;h+=t){const t=[G(a,r)+e+n*Math.cos(h),G(a,r)+s+o*Math.sin(h)];i.push(t),c.push(t)}c.push([G(a,r)+e+n*Math.cos(l+2*Math.PI+.5*h),G(a,r)+s+o*Math.sin(l+2*Math.PI+.5*h)]),c.push([G(a,r)+e+.98*n*Math.cos(l+h),G(a,r)+s+.98*o*Math.sin(l+h)]),c.push([G(a,r)+e+.9*n*Math.cos(l+.5*h),G(a,r)+s+.9*o*Math.sin(l+.5*h)])}return[c,i]}function V(t,e,s,n,o,a,h,r,i){const c=a+G(.1,i),l=[];l.push([G(r,i)+e+.9*n*Math.cos(c-t),G(r,i)+s+.9*o*Math.sin(c-t)]);for(let a=c;a<=h;a+=t)l.push([G(r,i)+e+n*Math.cos(a),G(r,i)+s+o*Math.sin(a)]);return l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),q(l,null,i)}function Z(t,e,s,n,o,a,h,r){const i=[],c=[r.maxRandomnessOffset||1,(r.maxRandomnessOffset||1)+.3];let l=[0,0];const u=r.disableMultiStroke?1:2,p=r.preserveVertices;for(let f=0;f<u;f++)0===f?i.push({op:"move",data:[h[0],h[1]]}):i.push({op:"move",data:[h[0]+(p?0:G(c[0],r)),h[1]+(p?0:G(c[0],r))]}),l=p?[o,a]:[o+G(c[f],r),a+G(c[f],r)],i.push({op:"bcurveTo",data:[t+G(c[f],r),e+G(c[f],r),s+G(c[f],r),n+G(c[f],r),l[0],l[1]]});return i}function Q(t){return[...t]}function H(t,e=0){const s=t.length;if(s<3)throw new Error("A curve must have at least three points.");const n=[];if(3===s)n.push(Q(t[0]),Q(t[1]),Q(t[2]),Q(t[2]));else{const s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);const o=[],a=1-e;n.push(Q(s[0]));for(let t=1;t+2<s.length;t++){const e=s[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],o[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],o[3]=[s[t+1][0],s[t+1][1]],n.push(o[1],o[2],o[3])}}return n}function N(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function B(t,e,s){const n=N(e,s);if(0===n)return N(t,e);let o=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/n;return o=Math.max(0,Math.min(1,o)),N(t,J(e,s,o))}function J(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function K(t,e,s,n){const o=n||[];if(function(t,e){const s=t[e+0],n=t[e+1],o=t[e+2],a=t[e+3];let h=3*n[0]-2*s[0]-a[0];h*=h;let r=3*n[1]-2*s[1]-a[1];r*=r;let i=3*o[0]-2*a[0]-s[0];i*=i;let c=3*o[1]-2*a[1]-s[1];return c*=c,h<i&&(h=i),r<c&&(r=c),h+r}(t,e)<s){const s=t[e+0];if(o.length){(a=o[o.length-1],h=s,Math.sqrt(N(a,h)))>1&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;n<s-1;++n){const e=B(t[n],h,r);e>i&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s<o;s++){K(t,3*s,e,n)}return s&&s>0?X(n,0,n.length,s):n}const tt="none";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d("line",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];"solid"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d("rectangle",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if("solid"===a.fillStyle){const s=D(t,e,a,r).opset;s.type="fillPath",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d("ellipse",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape="circle",o}linearPath(t,e){const s=this._o(e);return this._d("linearPath",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if("solid"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type="fillPath",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d("arc",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if("solid"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d("curve",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&("solid"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d("polygon",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d("path",n,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=s.fill&&"transparent"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case"M":c(),h=[e[0],e[1]],a.push(h);break;case"L":i(),a.push([e[0],e[1]]);break;case"C":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case"Z":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if("solid"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d("path",n,s)}opsToPath(t,e){let s="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case"fillPath":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case"fillSketch":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===s.stroke?"transparent":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=s.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,o,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||"",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n="nonzero"){t.beginPath();for(const n of e.ops){const e="number"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt="http://www.w3.org/2000/svg";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case"path":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke",s.stroke),e.setAttribute("stroke-width",s.strokeWidth+""),e.setAttribute("fill","none"),s.strokeLineDash&&e.setAttribute("stroke-dasharray",s.strokeLineDash.join(" ").trim()),s.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${s.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",s.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,"path");return o.setAttribute("d",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute("stroke",s.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),s.fillLineDash&&o.setAttribute("stroke-dasharray",s.fillLineDash.join(" ").trim()),s.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}return{canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()}}();
@@ -29,7 +30,7 @@ b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();"1"==urlPa
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -1987,78 +1988,78 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFi
Editor.prototype.createUndoManager=function(){var b=this.graph,f=new mxUndoManager;this.undoListener=function(u,y){f.undoableEditHappened(y.getProperty("edit"))};var l=mxUtils.bind(this,function(u,y){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,l);b.getView().addListener(mxEvent.UNDO,l);l=function(u,y){u=y.getProperty("edit").changes;u=b.getSelectionCellsForChanges(u);y=!1;if(0<u.length){for(var q=[],C=0;C<u.length;C++)null!=b.view.getState(u[C])&&(q.push(u[C]),
y||(b.scrollCellToVisible(u[C]),y=!0));b.setSelectionCells(q)}};f.addListener(mxEvent.UNDO,l);f.addListener(mxEvent.REDO,l);return f};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,f,l,u,y,q,C,J,R,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(R?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
+function Dialog(b,f,l,u,y,q,C,J,S,D,P){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));y&&document.body.appendChild(this.bg);y=b.createDiv(S?"geTransDialog":"geDialog");y.style.width=l+60+"px";y.style.height=u+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(y.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",y.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");y.appendChild(f);document.body.appendChild(y);if(q&&(f=document.createElement("div"),
f.className="geButton",f.setAttribute("title",mxResources.get("close")),f.style.backgroundImage="url("+Editor.crossImage+")",f.style.position="absolute",f.style.top="0px",f.style.right="0px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),y.appendChild(f),!P)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(g){c=!0}),null,mxUtils.bind(this,function(g){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=C;this.container=y;null!=D&&this.addResizeHandler(D);
b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";
Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";
Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,f){return new mxPoint(b,f)};
-Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(D){l=mxEvent.getClientX(D);u=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,J,R);mxEvent.consume(D)}),
-J=mxUtils.bind(this,function(D){if(null!=l&&null!=u){var P=mxEvent.getClientX(D)-l,c=mxEvent.getClientY(D)-u;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),R=mxUtils.bind(this,function(D){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,J,R),mxEvent.consume(D))});mxEvent.addGestureListeners(f,C,J,R);this.container.appendChild(f)};
+Dialog.prototype.addResizeHandler=function(b){var f=document.createElement("img");f.setAttribute("src",mxWindow.prototype.resizeImage);f.style.cursor="nwse-resize";f.style.position="absolute";f.style.bottom="0px";f.style.right="0px";f.style.zIndex="2";var l=null,u=null,y=null,q=null,C=mxUtils.bind(this,function(D){l=mxEvent.getClientX(D);u=mxEvent.getClientY(D);y=parseInt(this.container.style.width);q=parseInt(this.container.style.height);mxEvent.addGestureListeners(document,null,J,S);mxEvent.consume(D)}),
+J=mxUtils.bind(this,function(D){if(null!=l&&null!=u){var P=mxEvent.getClientX(D)-l,c=mxEvent.getClientY(D)-u;this.container.style.width=Math.max(b.width,y+2*P)+"px";this.container.style.height=Math.max(b.height,q+2*c)+"px";mxEvent.consume(D)}}),S=mxUtils.bind(this,function(D){null!=l&&null!=u&&(u=l=null,mxEvent.removeGestureListeners(document,null,J,S),mxEvent.consume(D))});mxEvent.addGestureListeners(f,C,J,S);this.container.appendChild(f)};
Dialog.prototype.close=function(b,f){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,f))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,f,l,u,y,q,C,J,R,D,P){R=null!=R?R:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
+var ErrorDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=f){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,f);g.setAttribute("title",f);c.appendChild(g)}f=
document.createElement("div");f.style.lineHeight="1.2em";f.style.padding="6px";"string"===typeof l&&(l=l.replace(/\n/g,"<br/>"));f.innerHTML=Graph.sanitizeHtml(l);c.appendChild(f);l=document.createElement("div");l.style.marginTop="12px";l.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),f.className="geBtn",l.appendChild(f),l.style.textAlign="center");null!=D&&(D=mxUtils.button(D,function(){null!=P&&P()}),D.className="geBtn",l.appendChild(D));
-var m=mxUtils.button(u,function(){R&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){R&&b.hideDialog();null!=J&&J()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};
+var m=mxUtils.button(u,function(){S&&b.hideDialog();null!=y&&y()});m.className="geBtn";l.appendChild(m);null!=C&&(u=mxUtils.button(C,function(){S&&b.hideDialog();null!=J&&J()}),u.className="geBtn gePrimaryBtn",l.appendChild(u));this.init=function(){m.focus()};c.appendChild(l);this.container=c},PrintDialog=function(b,f,l,u){this.create(b,f,l,u)};
PrintDialog.prototype.create=function(b){function f(m){var n=C.checked||D.checked,x=parseInt(c.value)/100;isNaN(x)&&(x=1,c.value="100%");mxClient.IS_SF&&(x*=.75);var F=l.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/l.pageScale;if(n){var M=C.checked?1:parseInt(P.value);isNaN(M)||(H=mxUtils.getScaleForPageCount(M,l,F))}var L=M=0;F=mxRectangle.fromRectangle(F);F.width=Math.ceil(F.width*x);F.height=Math.ceil(F.height*x);H*=x;!n&&l.pageVisible?(x=l.getPageLayout(),M-=x.x*F.width,L-=x.y*F.height):
-n=!0;n=PrintDialog.createPrintPreview(l,H,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";J.appendChild(C);var R=document.createElement("span");mxUtils.write(R," "+mxResources.get("fitPage"));
-J.appendChild(R);mxEvent.addListener(R,"click",function(m){C.checked=!C.checked;D.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){D.checked=!C.checked});q.appendChild(J);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(D);R=document.createElement("span");mxUtils.write(R," "+mxResources.get("posterPrint")+":");J.appendChild(R);mxEvent.addListener(R,
+n=!0;n=PrintDialog.createPrintPreview(l,H,F,0,M,L,n);n.open();m&&PrintDialog.printPreview(n)}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var C=document.createElement("input");C.setAttribute("type","checkbox");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";J.appendChild(C);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
+J.appendChild(S);mxEvent.addListener(S,"click",function(m){C.checked=!C.checked;D.checked=!C.checked;mxEvent.consume(m)});mxEvent.addListener(C,"change",function(){D.checked=!C.checked});q.appendChild(J);y.appendChild(q);q=q.cloneNode(!1);var D=document.createElement("input");D.setAttribute("type","checkbox");J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(D);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");J.appendChild(S);mxEvent.addListener(S,
"click",function(m){D.checked=!D.checked;C.checked=!D.checked;mxEvent.consume(m)});q.appendChild(J);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";J=document.createElement("td");J.style.fontSize="10pt";J.appendChild(P);mxUtils.write(J," "+mxResources.get("pages")+" (max)");q.appendChild(J);y.appendChild(q);mxEvent.addListener(D,"change",
function(){D.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");C.checked=!D.checked});q=q.cloneNode(!1);J=document.createElement("td");mxUtils.write(J,mxResources.get("pageScale")+":");q.appendChild(J);J=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";J.appendChild(c);q.appendChild(J);y.appendChild(q);q=document.createElement("tr");J=document.createElement("td");J.colSpan=2;
-J.style.paddingTop="20px";J.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});R.className="geBtn";b.editor.cancelFirst&&J.appendChild(R);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";J.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";J.appendChild(g);b.editor.cancelFirst||
-J.appendChild(R);q.appendChild(J);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
-PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var J=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&J.apply(this,arguments)};var R=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(R.apply(this,arguments))};return f};
+J.style.paddingTop="20px";J.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&J.appendChild(S);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)});g.className="geBtn";J.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});g.className="geBtn gePrimaryBtn";J.appendChild(g);b.editor.cancelFirst||
+J.appendChild(S);q.appendChild(J);y.appendChild(q);u.appendChild(y);this.container=u};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(f){}};
+PrintDialog.createPrintPreview=function(b,f,l,u,y,q,C){f=new mxPrintPreview(b,f,l,u,y,q);f.title=mxResources.get("preview");f.addPageCss=!mxClient.IS_SF;f.printBackgroundImage=!0;f.autoOrigin=C;C=b.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";f.backgroundColor=C;var J=f.isTextLabel;f.isTextLabel=function(D){return"geHint"==!D.className&&J.apply(this,arguments)};var S=f.getLinkForCellState;f.getLinkForCellState=function(D){return b.getAbsoluteUrl(S.apply(this,arguments))};return f};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(b){function f(){var x=c;null!=x&&null!=x.originalSrc&&(x=b.createImageForPageLink(x.originalSrc,null));null!=x&&null!=x.src?(P.style.backgroundImage="url("+x.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=g&&g!=mxConstants.NONE&&(P.style.backgroundColor=g,P.style.display="inline-block")}var l=b.editor.graph,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var y=document.createElement("tbody");
var q=document.createElement("tr");var C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";mxUtils.write(C,mxResources.get("paperSize")+":");q.appendChild(C);C=document.createElement("td");C.style.verticalAlign="top";C.style.fontSize="10pt";var J=PageSetupDialog.addPageFormatPanel(C,"pagesetupdialog",l.pageFormat);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("gridSize")+":");q.appendChild(C);
-C=document.createElement("td");C.style.whiteSpace="nowrap";var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","0");R.style.width="40px";R.style.marginLeft="6px";R.value=l.getGridSize();C.appendChild(R);mxEvent.addListener(R,"change",function(){var x=parseInt(R.value);R.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");
+C=document.createElement("td");C.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=l.getGridSize();C.appendChild(S);mxEvent.addListener(S,"change",function(){var x=parseInt(S.value);S.value=Math.max(1,isNaN(x)?l.getGridSize():x)});q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");mxUtils.write(C,mxResources.get("background")+":");
q.appendChild(C);C=document.createElement("td");var D=document.createElement("button");D.className="geBtn";D.style.margin="0px";mxUtils.write(D,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";
P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var c=l.backgroundImage,g=l.background,m=l.shadowVisible,n=function(x){b.showBackgroundImageDialog(function(F,H,M,L){H||(null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src}),c=F,m=L);g=M;f()},c,g,!0);mxEvent.consume(x)};mxEvent.addListener(D,"click",n);mxEvent.addListener(P,"click",n);f();C.appendChild(P);C.appendChild(D);q.appendChild(C);y.appendChild(q);q=document.createElement("tr");C=document.createElement("td");
-C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&C.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(R.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,J.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&
+C.colSpan=2;C.style.paddingTop="16px";C.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&C.appendChild(D);n=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(S.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,g,c,J.get());x.ignoreColor=l.background==g;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=c?c.src:null);null!=m&&
(x.shadowVisible=m);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage&&x.shadowVisible==l.shadowVisible||l.model.execute(x)});n.className="geBtn gePrimaryBtn";C.appendChild(n);b.editor.cancelFirst||C.appendChild(D);q.appendChild(C);y.appendChild(q);u.appendChild(y);this.container=u};
PageSetupDialog.addPageFormatPanel=function(b,f,l,u){f="format-"+f;var y=document.createElement("input");y.setAttribute("name",f);y.setAttribute("type","radio");y.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",f);q.setAttribute("type","radio");q.setAttribute("value","landscape");var C=document.createElement("select");C.style.position="relative";C.style.marginBottom="4px";C.style.borderRadius="4px";C.style.borderWidth="1px";C.style.borderStyle="solid";
-C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.marginLeft="4px";J.style.width="210px";J.style.height="24px";y.style.marginRight="6px";J.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));J.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";J.appendChild(q);var R=document.createElement("span");R.style.width="100px";mxUtils.write(R,
-mxResources.get("landscape"));J.appendChild(R);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
+C.style.boxSizing="border-box";C.style.padding="2px";C.style.width="210px";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.marginLeft="4px";J.style.width="210px";J.style.height="24px";y.style.marginRight="6px";J.appendChild(y);f=document.createElement("span");f.style.maxWidth="100px";mxUtils.write(f,mxResources.get("portrait"));J.appendChild(f);q.style.marginLeft="10px";q.style.marginRight="6px";J.appendChild(q);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
+mxResources.get("landscape"));J.appendChild(S);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.marginLeft="4px";D.style.fontSize="12px";D.style.width="210px";D.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";D.appendChild(P);mxUtils.write(D," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
"right";D.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.maxWidth="78px";g.style.width="78px";for(var m=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],n=0;n<m.length;n++){var x=document.createElement("option");x.setAttribute("value",m[n].unit);mxUtils.write(x,m[n].label);g.appendChild(x)}g.value=Editor.pageSizeUnit;D.appendChild(g);
J.style.display="none";D.style.display="none";var F={},H=PageSetupDialog.getFormats();for(n=0;n<H.length;n++)m=H[n],F[m.key]=m,x=document.createElement("option"),x.setAttribute("value",m.key),mxUtils.write(x,m.title),C.appendChild(x);var M=function(){C.value="custom";for(var K=0;K<H.length;K++){var Z=H[K];null!=Z.format&&("a4"==Z.key?826==l.width?(l=mxRectangle.fromRectangle(l),l.width=827):826==l.height&&(l=mxRectangle.fromRectangle(l),l.height=827):"a5"==Z.key&&(584==l.width?(l=mxRectangle.fromRectangle(l),
l.width=583):584==l.height&&(l=mxRectangle.fromRectangle(l),l.height=583)),l.width==Z.format.width&&l.height==Z.format.height?(C.value=Z.key,y.setAttribute("checked","checked"),y.defaultChecked=!0,y.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,detected=!0):l.width==Z.format.height&&l.height==Z.format.width&&(C.value=Z.key,y.removeAttribute("checked"),y.defaultChecked=!1,y.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,detected=q.checked=!0))}"custom"==
C.value?(P.value=Editor.toUnit(l.width,g.value),c.value=Editor.toUnit(l.height,g.value),y.setAttribute("checked","checked"),C.value="custom",J.style.display="none",D.style.display=""):(J.style.display="",D.style.display="none")};M();b.appendChild(C);mxUtils.br(b);b.appendChild(J);b.appendChild(D);var L=function(K,Z){K=F[C.value];null!=K.format?(P.value=Editor.toUnit(q.checked?K.format.height:K.format.width,g.value),c.value=Editor.toUnit(q.checked?K.format.width:K.format.height,g.value),D.style.display=
"none",J.style.display=""):(J.style.display="none",D.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(l.width,g.value);K=parseFloat(c.value);if(isNaN(K)||0>=K)c.value=Editor.toUnit(l.height,g.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),g.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),g.value)));Z||K.width==l.width&&K.height==l.height||(l=K,null!=u&&u(l))};mxEvent.addListener(f,"click",function(K){y.checked=!0;L(K);mxEvent.consume(K)});
-mxEvent.addListener(R,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",L);mxEvent.addListener(P,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
+mxEvent.addListener(S,"click",function(K){q.checked=!0;L(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",L);mxEvent.addListener(P,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(y,"change",L);mxEvent.addListener(C,"change",function(K){L(K,"custom"==C.value);mxEvent.consume(K)});mxEvent.addListener(g,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),g.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
Editor.pageSizeUnit),g.value);Editor.pageSizeUnit=g.value;L(K,!0);mxEvent.consume(K)});L(null,!0);return{set:function(K){l=K;M(null,null,!0)},get:function(){return l},widthInput:P,heightInput:c}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,f,l,u,y,q,C,J,R,D,P){R=null!=R?R:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
-n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))R&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+var FilenameDialog=function(b,f,l,u,y,q,C,J,S,D,P){S=null!=S?S:!0;var c=document.createElement("div"),g=document.createElement("div");g.style.width="100%";g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoColumns="auto 1fr";g.style.boxSizing="border-box";g.style.padding="3px";var m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.justifyContent="flex-end";m.style.minWidth="0";var n=document.createElement("div");n.style.display="inline-block";
+n.style.textOverflow="ellipsis";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.fontSize="10pt";n.style.padding="2px 0";n.setAttribute("title",y||mxResources.get("filename"));mxUtils.write(n,(y||mxResources.get("filename"))+":");m.appendChild(n);g.appendChild(m);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.flexGrow="1";var F=mxUtils.button(l,function(){if(null==q||q(x.value))S&&b.hideDialog(),u(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
y||null==C)if(null!=P?Editor.selectFilename(x):(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=g.parentNode;if(null!=H){var M=null;mxEvent.addListener(H,"dragleave",function(L){null!=M&&(M.style.backgroundColor="",M=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=x,M.style.backgroundColor=
"#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(L){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),F.click());L.stopPropagation();L.preventDefault()}))}}};m=document.createElement("div");m.style.display="inline-flex";m.style.alignItems="center";m.style.gap="4px";m.style.whiteSpace="nowrap";m.appendChild(x);g.appendChild(m);
null==y&&null!=C||null==P||null==b.editor.diagramFileTypes||(m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.textOverflow="ellipsis",m.style.justifyContent="flex-end",m.style.fontSize="10pt",mxUtils.write(m,mxResources.get("type")+":"),g.appendChild(m),m=document.createElement("div"),m.style.display="inline-flex",m.style.alignItems="center",m.style.whiteSpace="nowrap",g.appendChild(m),f=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),
f.style.width="100%",m.appendChild(f));null!=C&&g.appendChild(C);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=D&&D()});m.className="geBtn";null==J||b.isOffline()||row.appendChild(b.createHelpIcon(J));
b.editor.cancelFirst&&row.appendChild(m);mxEvent.addListener(x,"keypress",function(H){13==H.keyCode&&F.click()});row.appendChild(F);b.editor.cancelFirst||row.appendChild(m);g.appendChild(row);c.appendChild(g);this.container=c};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(b,f,l){var u=document.createElement("select");for(b=0;b<l.length;b++){var y=document.createElement("option");y.setAttribute("value",b);mxUtils.write(y,mxResources.get(l[b].description)+" (."+l[b].extension+")");u.appendChild(y)}mxEvent.addListener(u,"change",function(q){q=l[u.value].extension;var C=f.value.lastIndexOf(".drawio.");C=0<C?C:f.value.lastIndexOf(".");"drawio"!=q&&(q="drawio."+q);f.value=0<C?f.value.substring(0,C+1)+q:f.value+"."+q;"createEvent"in
-document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,J=0;J<l.length;J++){var R=l[J].extension,D=null;"drawio"!=R&&(D=R,R=".drawio."+R);if(q.substring(q.length-R.length-1)=="."+R||null!=D&&q.substring(q.length-D.length-1)=="."+D){C=J;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};
+document?(q=document.createEvent("HTMLEvents"),q.initEvent("change",!1,!0),f.dispatchEvent(q)):f.fireEvent("onchange")});b=function(q){q=f.value.toLowerCase();for(var C=0,J=0;J<l.length;J++){var S=l[J].extension,D=null;"drawio"!=S&&(D=S,S=".drawio."+S);if(q.substring(q.length-S.length-1)=="."+S||null!=D&&q.substring(q.length-D.length-1)=="."+D){C=J;break}}u.value=C};mxEvent.addListener(f,"change",b);mxEvent.addListener(f,"keyup",b);b();return u};
var WrapperWindow=function(b,f,l,u,y,q,C,J){J=null!=J?J:document.createElement("div");this.window=new mxWindow(f,J,l,u,y,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);C(J)};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var J=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var R=C.container.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(this.backgroundPageShape=this.createBackgroundPageShape(J),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(C.container),R.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,R),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){C.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var C=this.graph;if(null!=C.container&&!C.transparentBackground){if(C.pageVisible){var J=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=C.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(J),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(C.container),S.style.position="absolute",C.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(D){C.dblClick(D)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){null!=
C.tooltipHandler&&C.tooltipHandler.isHideOnHover()&&C.tooltipHandler.hide();C.isMouseDown&&!mxEvent.isConsumed(D)&&C.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(D))}),mxUtils.bind(this,function(D){C.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(D))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=J,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(C,J,R){var D=this.graph;C=null!=C?C:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
-10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=D.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;J=null!=J?J-this.translate.x*this.scale:0;R=null!=R?R-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,H=J%F;F=R%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
-this.scale-g+J,n)+H*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+R,n)+F*C)+"px"}C=D.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=m,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
+mxGraphView.prototype.validateBackgroundStyles=function(C,J,S){var D=this.graph;C=null!=C?C:1;var P=mxUtils.getLightDarkColor(null==D.background||D.background==mxConstants.NONE?D.defaultPageBackgroundColor:D.background).cssText,c=mxUtils.getLightDarkColor(D.defaultPageBorderColor).cssText,g=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",m="none",n="";"simple"==D.getAdaptiveColors()&&D.background!=mxConstants.NONE&&null!=D.background&&(P=D.background);if(D.isGridEnabled()||D.gridVisible){n=
+10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(g,C))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",n=D.gridSize*this.scale*this.gridSteps*C):m="url("+this.gridImage+")";var x=g=0;J=null!=J?J-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var F=D.gridSize*this.scale*this.gridSteps,H=J%F;F=S%F;null!=D.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),g=1+x.x,x=1+x.y);n=-Math.round(n-mxUtils.mod(this.translate.x*
+this.scale-g+J,n)+H*C)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scale-x+S,n)+F*C)+"px"}C=D.view.canvas;null!=C.ownerSVGElement&&(C=C.ownerSVGElement);g=!Editor.isDarkMode()&&D.enableDiagramBackground;null!=D.view.backgroundPageShape?(D.view.backgroundPageShape.node.style.backgroundPosition=n,D.view.backgroundPageShape.node.style.backgroundImage=m,D.view.backgroundPageShape.node.style.backgroundColor=P,D.view.backgroundPageShape.node.style.borderColor=c,D.view.backgroundPageShape.node.style.colorScheme=
"none"==D.getAdaptiveColors()?"light":"",C.style.backgroundImage="none",C.style.backgroundColor="",D.container.style.backgroundColor=g?D.diagramBackgroundColor:""):(C.style.backgroundPosition=n,C.style.backgroundImage=m,"1"==urlParams.transparent?D.container.style.background="transparent":!g||null!=D.background&&D.background!=mxConstants.NONE?C.style.backgroundColor=P:(C.style.backgroundColor=D.diagramBackgroundColor,D.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(C,
-J){for(var R=this.graph.gridSize*this.scale*(null!=J?J:1);R<this.minGridSize;)R*=2;J=this.gridSteps*R;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*R;D.push("M 0 "+c+" L "+J+" "+c+" M "+c+" 0 L "+c+" "+J)}C=mxUtils.getLightDarkColor(C);R="color-scheme: light dark;";mxClient.IS_SF&&(R="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+R+'" width="'+J+'" height="'+J+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
+J){for(var S=this.graph.gridSize*this.scale*(null!=J?J:1);S<this.minGridSize;)S*=2;J=this.gridSteps*S;for(var D=[],P=1;P<this.gridSteps;P++){var c=P*S;D.push("M 0 "+c+" L "+J+" "+c+" M "+c+" 0 L "+c+" "+J)}C=mxUtils.getLightDarkColor(C);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+J+'" height="'+J+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
J+'" height="'+J+'" patternUnits="userSpaceOnUse"><path d="'+D.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" opacity="0.2" stroke-width="1"/><path d="M '+J+" 0 L 0 0 0 "+J+'" fill="none" style="stroke:'+mxUtils.htmlEntities(C.cssText)+';" stroke="'+C.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var R=this.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+C,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+J,D))+"px";R.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(C,J,R){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,m=this.view.getBackgroundPageBounds();
-J=m.width;R=m.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(R/n.height)-1:0,F=C?Math.ceil(J/n.width)-1:0,H=m.x+J,M=m.y+R;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var D=this.gridSize*this.view.scale*this.view.gridSteps;D=-Math.round(D-mxUtils.mod(this.view.translate.x*this.view.scale+C,D))+"px "+-Math.round(D-mxUtils.mod(this.view.translate.y*this.view.scale+J,D))+"px";S.style.backgroundPosition=D}};mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.view.scale,P=this.view.translate,c=this.pageFormat,g=D*this.pageScale,m=this.view.getBackgroundPageBounds();
+J=m.width;S=m.height;var n=new mxRectangle(D*P.x,D*P.y,c.width*g,c.height*g),x=(C=C&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=C?Math.ceil(J/n.width)-1:0,H=m.x+J,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);C=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,Z=0;Z<=K;Z++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
Math.round(m.y+(Z+1)*n.height)),new mxPoint(Math.round(H),Math.round(m.y+(Z+1)*n.height))]:[new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(Z+1)*n.width),Math.round(M))];null!=L[Z]?(L[Z].points=ha,L[Z].redraw()):(ha=new mxPolyline(ha,this.pageBreakColor),ha.dialect=this.dialect,ha.isDashed=this.pageBreakDashed,ha.pointerEvents=!1,ha.init(this.view.backgroundPane),ha.redraw(),L[Z]=ha)}for(Z=K;Z<L.length;Z++)null!=L[Z]&&L[Z].destroy();L.splice(K,L.length-K)}});
-C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,J,R){for(var D=0;D<J.length;D++){if(this.graph.isTableCell(J[D])||this.graph.isTableRow(J[D]))return!1;if(this.graph.getModel().isVertex(J[D])){var P=this.graph.getCellGeometry(J[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(J,R){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),J=0<C.width?C.x/this.scale-this.translate.x:0,R=0<C.height?C.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
-P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,J)/c);var g=Math.floor(Math.min(0,R)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,J+C.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,R+C.height/this.scale)/D)-g)*D)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=J+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,J,R,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(C,J,R){var D=this.graph.model.getParent(C);if(J){var P=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(C)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(C))}else if(P=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(R.getEvent())||
-this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(R.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var J=this.graph.getModel(),R=J.getParent(C),D=this.graph.view.getState(R),P=this.graph.isCellSelected(C);null!=D&&(J.isVertex(R)||J.isEdge(R));){var c=this.graph.isCellSelected(R);P=P||c;if(c||!P&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=R;R=J.getParent(R)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var ba=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};y.useCssTransforms&&
+C(this.horizontalPageBreaks);C(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(C,J,S){for(var D=0;D<J.length;D++){if(this.graph.isTableCell(J[D])||this.graph.isTableRow(J[D]))return!1;if(this.graph.getModel().isVertex(J[D])){var P=this.graph.getCellGeometry(J[D]);if(null!=P&&P.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var C=l.apply(this,arguments);C.intersects=mxUtils.bind(this,function(J,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(C,arguments)});return C};mxGraphView.prototype.createBackgroundPageShape=function(C){return new mxRectangleShape(C,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var C=this.getGraphBounds(),J=0<C.width?C.x/this.scale-this.translate.x:0,S=0<C.height?C.y/this.scale-this.translate.y:0,D=this.graph.pageFormat,
+P=this.graph.pageScale,c=D.width*P;D=D.height*P;P=Math.floor(Math.min(0,J)/c);var g=Math.floor(Math.min(0,S)/D);return new mxRectangle(this.scale*(this.translate.x+P*c),this.scale*(this.translate.y+g*D),this.scale*(Math.ceil(Math.max(1,J+C.width/this.scale)/c)-P)*c,this.scale*(Math.ceil(Math.max(1,S+C.height/this.scale)/D)-g)*D)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(C,J){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=C+"px",this.view.backgroundPageShape.node.style.marginTop=J+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(C,J,S,D,P,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(C,J,S){var D=this.graph.model.getParent(C);if(J){var P=this.graph.model.isEdge(C)?null:this.graph.getCellGeometry(C);P=!this.graph.model.isEdge(D)&&!this.graph.isSiblingSelected(C)&&(null!=P&&P.relative||!this.graph.isContainer(D)||this.graph.isPart(C))}else if(P=q.apply(this,arguments),this.graph.isTableCell(C)||this.graph.isTableRow(C))P=D,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||
+this.graph.isCellSelected(C)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(C)&&this.graph.isCellSelected(D);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(C){C=C.getCell();for(var J=this.graph.getModel(),S=J.getParent(C),D=this.graph.view.getState(S),P=this.graph.isCellSelected(C);null!=D&&(J.isVertex(S)||J.isEdge(S));){var c=this.graph.isCellSelected(S);P=P||c;if(c||!P&&(this.graph.isTableCell(C)||this.graph.isTableRow(C)))C=S;S=J.getParent(S)}return C}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var ba=q.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var k=this.view.translate,v=this.view.scale;ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((k.x+V.x)*v,(k.y+V.y)*v,V.width*v,V.height*v))}return ba};y.useCssTransforms&&
(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(ba,V){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=
-function(){return!1};y.panningHandler.isForcePanningEvent=function(ba){for(var V=ba.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ba.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var J=!1,R=!1;this.setDefaultStyle=function(ba){try{y.getModel().isEdge(ba)?
-R=y.pasteEdgeStyle=!1:J=!1;var V=y.getCellStyle(ba,!1),k=[],v=[],I;for(I in V)k.push(V[I]),v.push(I);y.getModel().isEdge(ba)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[ba],"force",!0));y.getModel().isEdge(ba)?R=y.pasteEdgeStyle=!0:J=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);J=R=y.pasteEdgeStyle=
+function(){return!1};y.panningHandler.isForcePanningEvent=function(ba){for(var V=ba.getSource();null!=V&&V!=y.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ba.getEvent())};var C=y.panningHandler.start;y.panningHandler.start=function(){C.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var J=!1,S=!1;this.setDefaultStyle=function(ba){try{y.getModel().isEdge(ba)?
+S=y.pasteEdgeStyle=!1:J=!1;var V=y.getCellStyle(ba,!1),k=[],v=[],I;for(I in V)k.push(V[I]),v.push(I);y.getModel().isEdge(ba)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",v,"values",k,"cells",[ba],"force",!0));y.getModel().isEdge(ba)?S=y.pasteEdgeStyle=!0:J=!0}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);J=S=y.pasteEdgeStyle=
!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(ba,V){y.pasteCellStyles(y.includeDescendants(V.getProperty("cells")))});y.addListener("textInserted",function(ba,V){y.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var D=mxUtils.bind(this,function(ba){null==ba&&(ba=window.event);return y.isEditing()||null!=ba&&this.isSelectionAllowed(ba)});this.container!=document.body||this.editor.chromeless&&
!this.editor.editable||(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,null!=this.tabContainer&&(this.tabContainer.onselectstart=D),mxClient.IS_IOS&&(f=function(){var ba=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=
navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{ba=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(k){}}return ba}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
@@ -2074,13 +2075,13 @@ ba=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",V);mxEvent.addList
y.fireMouseEvent;y.fireMouseEvent=function(ba,V,k){try{ba==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(v){u.handleError(v)}};var aa=y.foldCells;y.foldCells=function(ba,V,k,v,I){try{aa.apply(this,arguments)}catch(N){u.handleError(N)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(ba,V,k){this.menus.createPopupMenu(ba,V,k)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(ba){y.popupMenuHandler.hideMenu()}));
this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(ba,V){var k=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(k.push(V.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(k[k.length-1]))},0));y.pasteCellStyles(k)});var oa=null,da=null;b=mxUtils.bind(this,function(){if(null!=this.toolbar){var ba=this.getSelectionState();y.isEnabled()&&
0<ba.edges.length?(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+this.getImageForEdgeStyle(ba.style)+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+this.getImageForEdgeShape(ba.style)+")")):(null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")"))}});y.selectionModel.addListener(mxEvent.CHANGE,
-b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(ba,V){ba=V.getProperty("force");(this.updateDefaultStyle||ba)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,J,R);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
+b);y.getModel().addListener(mxEvent.CHANGE,b);this.addListener("styleChanged",mxUtils.bind(this,function(ba,V){ba=V.getProperty("force");(this.updateDefaultStyle||ba)&&y.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,J,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),V=this.getSelectionState(),
null!=this.toolbar.edgeStyleMenu&&(oa=this.getImageForEdgeStyle(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeStyleMenu.style.backgroundImage="url("+oa+")")),null!=this.toolbar.edgeShapeMenu&&(da=this.getImageForEdgeShape(y.currentEdgeStyle),0==V.edges.length&&(this.toolbar.edgeShapeMenu.style.backgroundImage="url("+da+")")))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var ba=y.currentVertexStyle.fontFamily||"Helvetica",V=String(y.currentVertexStyle.fontSize||"12"),k=y.getView().getState(y.getSelectionCell());
null!=k&&(ba=k.style[mxConstants.STYLE_FONTFAMILY]||ba,V=k.style[mxConstants.STYLE_FONTSIZE]||V,10<ba.length&&(ba=ba.substring(0,8)+"..."));this.toolbar.setFontName(ba);this.toolbar.setFontSize(V)}),y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(ba,V){ba=V.getProperty("cells");V=V.getProperty("parent");null!=V&&y.getModel().isLayer(V)&&!y.isCellVisible(V)&&null!=ba&&0<ba.length&&y.getModel().setVisible(V,!0)});
Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var ba=y.getLayerForCells(y.getSelectionCells());null!=ba&&y.setDefaultParent(ba)}});this.gestureHandler=mxUtils.bind(this,function(ba){this.isHideCurrentMenuEvent(ba)&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ka=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ka&&window.clearTimeout(ka);ka=window.setTimeout(mxUtils.bind(this,
function(){ka=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,f,l){function u(J,R){var D=q;q+=R;return J.substring(D,q)}function y(J){J=u(J,4);return J.charCodeAt(3)+(J.charCodeAt(2)<<8)+(J.charCodeAt(1)<<16)+(J.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,f,l){function u(J,S){var D=q;q+=S;return J.substring(D,q)}function y(J){J=u(J,4);return J.charCodeAt(3)+(J.charCodeAt(2)<<8)+(J.charCodeAt(1)<<16)+(J.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var C=u(b,4);if(null!=f&&f(q-8,C,l))break;value=u(b,l);u(b,4);if("IEND"==C)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var u=b.getRubberband();null!=u&&u.cancel()}));mxEvent.addListener(b.container,
@@ -2088,34 +2089,34 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);l.updateActionStates()};b.showLinkDialog=mxUtils.bind(l,l.showLinkDialog);b.editLink=l.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,f=b.getSelectionCells(),l=this.initSelectionState(),u=!0,y=0;y<f.length;y++){var q=b.getCurrentCellStyle(f[y]);"0"!=mxUtils.getValue(q,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(l,f[y],f,u),u=!1)}this.updateSelectionStateForTableCells(l);if(Editor.enableCustomProperties){l.customProperties={};b=l.vertices;f=l.edges;for(y=0;y<b.length;y++)this.findCommonProperties(b[y],l.customProperties,0==y,l);
for(y=0;y<f.length;y++)this.findCommonProperties(f[y],l.customProperties,0==b.length&&0==y,l)}return l};
-EditorUi.prototype.findCommonProperties=function(b,f,l,u){u=mxUtils.bind(this,function(R){if(null!=R)if(l)for(var D=0;D<R.length;D++)f[R[D].name]=R[D];else for(var P in f)if(null!=P){var c=!1;for(D=0;D<R.length;D++)if(R[D].name==P&&R[D].type==f[P].type){c=!0;break}c||delete f[P]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
-q.shape.stencil&&null!=q.shape.stencil.desc){var C=q.shape.stencil,J=mxUtils.bind(this,function(R){R=C.desc.getElementsByTagName(R);for(var D=[],P=0;P<R.length;P++){var c=R[P].getAttribute("color");if(!mxUtils.isValidColor(c)){var g=R[P].getAttribute("name");g=null!=g?g:Editor.getLabelForStylename(c);var m=R[P].getAttribute("default");m=null!=m?m:C.getDefaultColorValue(R[P],y);D.push({name:c,type:"color",primary:"false"!=R[P].getAttribute("primary"),defVal:m,defaultColor:m,undefinedColor:m,dispName:g})}}return D});
-Array.prototype.push.apply(q.shape.customProperties,J("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,J("strokecolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}u(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{u(JSON.parse(b))}catch(R){}};
+EditorUi.prototype.findCommonProperties=function(b,f,l,u){u=mxUtils.bind(this,function(D){if(null!=D)if(l)for(var P=0;P<D.length;P++)f[D[P].name]=D[P];else for(var c in f)if(null!=c){var g=!1;for(P=0;P<D.length;P++)if(D[P].name==c&&D[P].type==f[c].type){g=!0;break}g||delete f[c]}});var y=this.editor.graph,q=y.view.getState(b);if(null!=q&&null!=q.shape){if(!q.shape.commonCustomPropAdded){q.shape.commonCustomPropAdded=!0;q.shape.customProperties=q.shape.customProperties||[];if(null!=q.shape&&null!=
+q.shape.stencil&&null!=q.shape.stencil.desc){var C=q.shape.stencil,J=[],S=mxUtils.bind(this,function(D){D=C.desc.getElementsByTagName(D);for(var P=[],c=0;c<D.length;c++){var g=D[c].getAttribute("color");if(!mxUtils.isValidColor(g)&&!J[g]){J[g]=!0;var m=D[c].getAttribute("name");m=null!=m?m:Editor.getLabelForStylename(g);var n=D[c].getAttribute("default");n=null!=n?n:C.getDefaultColorValue(D[c],y);P.push({name:g,type:"color",primary:"false"!=D[c].getAttribute("primary"),defVal:n,defaultColor:n,undefinedColor:n,
+dispName:m})}}return P});Array.prototype.push.apply(q.shape.customProperties,S("fillcolor"));Array.prototype.push.apply(q.shape.customProperties,S("strokecolor"));Array.prototype.push.apply(q.shape.customProperties,S("fontcolor"))}q.cell.vertex?Array.prototype.push.apply(q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(q.shape.customProperties,Editor.commonEdgeProperties)}u(q.shape.customProperties)}b=b.getAttribute("customProperties");if(null!=b)try{u(JSON.parse(b))}catch(D){}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),J=null,R=1,D=1,P=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=J&&R!=J||(J=R,R=0,D++,u=l.getParent(c),c=C+D<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+D),q):null);var m=this.editor.graph.view.getState(g);
-if(g==l.getChildAt(u,q+R)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))R++;else break}P==D*R-1&&(b.mergeCell=f[0],b.colspan=R,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var f=mxUtils.sortCells(b.cells),l=this.editor.graph.model,u=l.getParent(f[0]),y=l.getParent(u);if(null!=u&&null!=y){for(var q=u.getIndex(f[0]),C=y.getIndex(u),J=null,S=1,D=1,P=0,c=C<y.getChildCount()-1?l.getChildAt(l.getChildAt(y,C+1),q):null;P<f.length-1;){var g=f[++P];null==c||c!=g||null!=J&&S!=J||(J=S,S=0,D++,u=l.getParent(c),c=C+D<y.getChildCount()?l.getChildAt(l.getChildAt(y,C+D),q):null);var m=this.editor.graph.view.getState(g);
+if(g==l.getChildAt(u,q+S)&&null!=m&&1==mxUtils.getValue(m.style,"colspan",1)&&1==mxUtils.getValue(m.style,"rowspan",1))S++;else break}P==D*S-1&&(b.mergeCell=f[0],b.colspan=S,b.rowspan=D)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
EditorUi.prototype.createTimeout=function(b,f,l){var u=!0,y=null,q=mxUtils.bind(this,function(J){y.clear()&&(u=!1,J=null!=J?J:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,f,l)})},null!=l?l(J):this.handleError(J))}),C=window.setTimeout(q,null!=b?b:this.timeout);y={clear:function(){window.clearTimeout(C);return u},isAlive:function(){return u}};null!=f&&this.tryAndHandle(mxUtils.bind(this,function(){f(y)}),q);return y};
EditorUi.prototype.tryAndHandle=function(b,f){try{b()}catch(l){null!=f?f(l):this.handleError(l)}};
-EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var J=u.getCellStyle(b[C],!1);if(null!=J)for(var R=0;R<y.length;R++)try{var D=J[y[R]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);u.setCellStyles(y[R],P.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&
+EditorUi.prototype.removeUserDefinedDarkColors=function(b,f,l){var u=this.editor.graph;b=null!=b?b:u.getSelectionCells();var y=Graph.colorStyles,q=document.createElement("div");u.model.beginUpdate();try{for(var C=0;C<b.length;C++)if(u.model.isEdge(b[C])||u.model.isVertex(b[C])){var J=u.getCellStyle(b[C],!1);if(null!=J)for(var S=0;S<y.length;S++)try{var D=J[y[S]];if(mxUtils.isLightDarkColor(D)){var P=mxUtils.getLightDarkColor(D);u.setCellStyles(y[S],P.light,[b[C]])}}catch(g){}f&&u.isHtmlLabel(b[C])&&
"0"!=mxUtils.getValue(J,"html","0")&&(q.innerHTML=Graph.sanitizeHtml(u.getLabel(b[C])),Graph.addLightDarkColors(q,null,null,function(g,m,n){return mxUtils.isLightDarkColor(n)?(n=mxUtils.getLightDarkColor(n),g.style.setProperty(m,n.light),!0):!1})&&u.cellLabelChanged(b[C],q.innerHTML))}if(l&&mxUtils.isLightDarkColor(u.background)){P=mxUtils.getLightDarkColor(u.background);var c=new ChangePageSetup(this,P.light);c.ignoreImage=!0;u.model.execute(c)}}finally{u.model.endUpdate()}return b};
EditorUi.prototype.updateSelectionStateForCell=function(b,f,l,u){l=this.editor.graph;b.cells.push(f);if(l.getModel().isVertex(f)){b.connections=0<l.model.getEdgeCount(f);b.unlocked=b.unlocked&&!l.isCellLocked(f);b.resizable=b.resizable&&l.isCellResizable(f);b.rotatable=b.rotatable&&l.isCellRotatable(f);b.movable=b.movable&&l.isCellMovable(f)&&!l.isTableRow(f)&&!l.isTableCell(f);b.swimlane=b.swimlane||l.isSwimlane(f);b.table=b.table||l.isTable(f);b.cell=b.cell||l.isTableCell(f);b.row=b.row||l.isTableRow(f);
b.vertices.push(f);var y=l.getCellGeometry(f);if(null!=y&&(0<y.width?null==b.width?b.width=y.width:b.width!=y.width&&(b.width=""):b.containsLabel=!0,0<y.height?null==b.height?b.height=y.height:b.height!=y.height&&(b.height=""):b.containsLabel=!0,!y.relative||null!=y.offset)){var q=y.relative?y.offset.x:y.x;y=y.relative?y.offset.y:y.y;null==b.x?b.x=q:b.x!=q&&(b.x="");null==b.y?b.y=y:b.y!=y&&(b.y="")}}else l.getModel().isEdge(f)&&(b.edges.push(f),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);q=l.view.getState(f);null!=q&&(b.html=b.html&&l.isHtmlLabel(f),b.autoSize=b.autoSize||l.isAutoSizeState(q),b.glass=b.glass&&l.isGlassState(q),b.rounded=b.rounded&&l.isRoundedState(q),b.lineJumps=b.lineJumps&&l.isLineJumpState(q),b.image=b.image||l.isImageState(q),b.shadow=b.shadow&&l.isShadowState(q),b.fill=b.fill&&l.isFillState(q),b.gradient=b.fill&&l.isGradientState(q),b.stroke=b.stroke&&l.isStrokeState(q),f=mxUtils.getValue(q.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
"image"==f,l.mergeStyle(q.style,b.style,u))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(R,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(R,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(R)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(R),mxEvent.getClientY(R));mxEvent.consume(R);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(R,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(R.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(R.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
-x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var J=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(R,D){null!=J&&window.clearTimeout(J);J=window.setTimeout(mxUtils.bind(this,function(){var P=
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,f=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,D){"mouseDown"==D.getProperty("eventName")&&f.hideShapePicker()}));var l=mxUtils.bind(this,function(){f.hideShapePicker(!0)});b.addListener("wheel",l);b.addListener(mxEvent.ESCAPE,l);b.view.addListener(mxEvent.SCALE,l);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,l);b.getSelectionModel().addListener(mxEvent.CHANGE,l);var u=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return u.apply(this,arguments)||null!=f.shapePicker||null!=f.currentMenu};var y=b.dblClick;b.dblClick=function(S,D){if(this.isEnabled())if(null!=D||null==f.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+l);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){f.hideShapePicker();q.apply(this,arguments)};var C=this.hoverIcons.execute;this.hoverIcons.execute=function(S,D,P){var c=P.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?C.apply(this,arguments):this.graph.connectVertex(S.cell,D,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(g,m,n){var x=b.getCompositeParent(S.cell);g=b.getCellGeometry(x);for(P.consume();null!=x&&b.model.isVertex(x)&&null!=g&&g.relative;)cell=
+x,x=b.model.getParent(cell),g=b.getCellGeometry(x);window.setTimeout(mxUtils.bind(this,function(){f.showShapePicker(P.getGraphX(),P.getGraphY(),x,mxUtils.bind(this,function(F){n(F);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(F))}),D)}),30)}),mxUtils.bind(this,function(g){this.graph.selectCellsForConnectVertex(g,c,this)}))};var J=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J);J=window.setTimeout(mxUtils.bind(this,function(){var P=
D.getProperty("arrow"),c=D.getProperty("direction"),g=D.getProperty("event");P=P.getBoundingClientRect();var m=mxUtils.getOffset(b.container),n=b.container.scrollLeft+P.x-m.x;m=b.container.scrollTop+P.y-m.y;var x=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),F=f.showShapePicker(n,m,x,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(x,c,b.defaultEdgeLength,g,!0,!1,function(M,L,K){K(H);null!=f.hoverIcons&&f.hoverIcons.update(b.view.getState(H))},
-function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(R,D){null!=J&&window.clearTimeout(J)}))}};
+function(M){b.selectCellsForConnectVertex(M)},g,this.hoverIcons)}),c,!0);null!=F&&(this.centerShapePicker(F,P,n,m,c),mxUtils.setOpacity(F,30),mxEvent.addListener(F,"mouseenter",function(){mxUtils.setOpacity(F,100)}),mxEvent.addListener(F,"mouseleave",function(){f.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,D){null!=J&&window.clearTimeout(J)}))}};
EditorUi.prototype.centerShapePicker=function(b,f,l,u,y){if(y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST)b.style.width="40px";var q=b.getBoundingClientRect();y==mxConstants.DIRECTION_NORTH?(l-=q.width/2-10,u-=q.height+6):y==mxConstants.DIRECTION_SOUTH?(l-=q.width/2-10,u+=f.height+6):y==mxConstants.DIRECTION_WEST?(l-=q.width+6,u-=q.height/2-10):y==mxConstants.DIRECTION_EAST&&(l+=f.width+6,u-=q.height/2-10);b.style.left=l+"px";b.style.top=u+"px"};
-EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,J,R){var D=null;this.editor.graph.freehand.isDrawing()||(J=J||null==l,D=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,J),q,C,J,R),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=D));return D};
-EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,J,R,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;R=null!=R?R:function(x){x=x[0];var F=0,H=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,H=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-H))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");
+EditorUi.prototype.showShapePicker=function(b,f,l,u,y,q,C,J,S){var D=null;this.editor.graph.freehand.isDrawing()||(J=J||null==l,D=this.createShapePicker(b,f,l,u,y,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(l,q,J),q,C,J,S),null!=D&&(null==this.hoverIcons||q||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=u,this.shapePicker=D));return D};
+EditorUi.prototype.createShapePicker=function(b,f,l,u,y,q,C,J,S,D,P){P=null!=P?P:!0;var c=this.editor.graph,g=null;S=null!=S?S:function(x){x=x[0];var F=0,H=0,M=x.geometry;null!=M&&(c.model.isEdge(x)&&(x=M.getTerminalPoint(!1),M=new mxRectangle(0,0,x.x,x.y)),F=M.width/2,H=M.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-F),c.snap(Math.round(f/c.view.scale)-c.view.translate.y-H))};if(null!=C&&0<C.length){var m=this;c=this.editor.graph;g=document.createElement("div");
y=c.view.getState(l);var n=null==l||null!=y&&c.isTransparentState(y)?null:c.copyStyle(l);g.className="geShapePicker";g.setAttribute("title",mxResources.get("sidebarTooltip"));g.style.left=Math.round(b)+"px";g.style.top=Math.round(f)+"px";mxClient.IS_POINTER&&(g.style.touchAction="none");J||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");c.container.appendChild(g);y=mxUtils.bind(this,function(x){var F=document.createElement("a");g.appendChild(F);null!=n&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var H=x.geometry;c.model.isEdge(x)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([x],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=R([L]);c.model.isEdge(L)?
+this.sidebar.graph.pasteStyle(n,[x]):this.sidebar.graph.pasteCellStyles([x],c.currentVertexStyle,c.currentEdgeStyle);var H=x.geometry;c.model.isEdge(x)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([x],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(M){if(!mxEvent.isAltDown(M)||1!=c.getSelectionCount()){if(!mxEvent.isShiftDown(M)||null==l&&c.isSelectionEmpty()){var L=c.cloneCell(x);if(null!=u)u(L);else{var K=S([L]);c.model.isEdge(L)?
L.geometry.translate(K.x,K.y):(L.geometry.x=K.x,L.geometry.y=K.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);P&&c.startEditing(L);null!=m.hoverIcons&&m.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=l?[l]:c.getSelectionCells()),c.updateShapes(x,L);null!=q&&q(M);mxEvent.consume(M)}}),25,25,null,null,l),H.style.display="flex",H.style.alignItems=
"center",H.style.justifyContent="center",F.appendChild(H))});for(D=0;D<(J?Math.min(C.length,4):C.length);D++)y(C[D]);C=g.offsetTop+g.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<C&&(g.style.top=Math.max(c.container.scrollTop+22,f-C)+"px");C=g.offsetLeft+g.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<C&&(g.style.left=Math.max(c.container.scrollLeft+22,b-C)+"px")}return g};
-EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,J,R){return u.createVertex(null,null,R||"",0,0,C||120,J||60,q,!1)});f=mxUtils.bind(this,function(q,C,J){q=new mxCell(J||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=
+EditorUi.prototype.getCellsForShapePicker=function(b,f,l){var u=this.editor.graph,y=mxUtils.bind(this,function(q,C,J,S){return u.createVertex(null,null,S||"",0,0,C||120,J||60,q,!1)});f=mxUtils.bind(this,function(q,C,J){q=new mxCell(J||"",new mxGeometry(0,0,u.defaultEdgeLength+20,0),q);q.geometry.setTerminalPoint(new mxPoint(0,0),!0);q.geometry.setTerminalPoint(new mxPoint(q.geometry.width,null!=C?C:0),!1);q.geometry.points=null!=C?[new mxPoint(q.geometry.width/2,C)]:[];q.geometry.relative=!0;q.edge=
!0;return q});if(null!=b)try{b=u.cloneCell(b),u.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(q){b=null}null==b&&(b=y(u.appendFontSize(Editor.defaultTextStyle,u.vertexFontSize),60,30,"Text"));b=[b,y("whiteSpace=wrap;html=1;"),y("ellipse;whiteSpace=wrap;html=1;",80,80),y("rhombus;whiteSpace=wrap;html=1;",80,80),y("rounded=1;whiteSpace=wrap;html=1;"),y("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),y("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",
120,60),y("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),y("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),y("triangle;whiteSpace=wrap;html=1;",60,80),y("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),y("shape=tape;whiteSpace=wrap;html=1;",120,100),y("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),y("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",
80,60),y("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];l&&(b=b.concat([f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),f("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),f("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",
@@ -2132,8 +2133,8 @@ EditorUi.prototype.getImageForEdgeShape=function(b){var f=Format.connectionImage
EditorUi.prototype.getImageForEdgeStyle=function(b){var f=Format.orthogonalImage.src,l=mxUtils.getValue(b,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(b,mxConstants.STYLE_NOEDGESTYLE,null)&&(l=null);"orthogonalEdgeStyle"==l&&"1"==mxUtils.getValue(b,mxConstants.STYLE_CURVED,null)?f=Format.curvedImage.src:"straight"==l||"none"==l||null==l?f=Format.straightImage.src:"entityRelationEdgeStyle"==l?f=Format.entityImage.src:"elbowEdgeStyle"==l?f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,
null)?Format.verticalElbowImage.src:Format.horizontalElbowImage.src:"isometricEdgeStyle"==l&&(f="vertical"==mxUtils.getValue(b,mxConstants.STYLE_ELBOW,null)?Format.verticalIsometricImage.src:Format.horizontalIsometricImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,f=this.actions.get("paste"),l=this.actions.get("pasteHere");f.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));l.setEnabled(f.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var J={},R=q.createCellLookup(C),D=q.cloneCells(C,null,J),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
-0),g=0;g<D.length;g++){P.add(c,D[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(C[g])&&null==R[mxObjectIdentity.get(P.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(J,R),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=
+EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var C=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{C=C||q.getSelectionCells();C=q.getExportableCells(q.model.getTopmostCells(C));for(var J={},S=q.createCellLookup(C),D=q.cloneCells(C,null,J),P=new mxGraphModel,c=P.getChildAt(P.getRoot(),
+0),g=0;g<D.length;g++){P.add(c,D[g]);var m=q.view.getState(C[g]);if(null!=m){var n=q.getCellGeometry(D[g]);null!=n&&n.relative&&!P.isEdge(C[g])&&null==S[mxObjectIdentity.get(P.getParent(C[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(J,S),D);mxClipboard.insertCount=1;mxClipboard.setCells(D)}b.updatePasteActionStates();return C};var l=mxClipboard.paste;mxClipboard.paste=function(q){var C=
null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):C=l.apply(this,arguments);b.updatePasteActionStates();return C};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,C){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var U=this.graph.getPageLayout(),Y=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*Y.width),this.scale*(this.translate.y+U.y*Y.height),this.scale*U.width*Y.width,
@@ -2144,10 +2145,10 @@ Ia=mxRectangle.fromRectangle(la);Ia.x=Ia.x/wa-ya.x;Ia.y=Ia.y/wa-ya.y;Ia.width/=w
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var C=0;q=mxUtils.bind(this,function(U,Y,fa){C++;
var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var J=Graph.sanitizeLink(y.backBtn.url);null!=J&&q(mxUtils.bind(this,function(U){window.location.href=
-J;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var R=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
+J;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),D=document.createElement("div");D.style.fontFamily=Editor.defaultHtmlFont;D.style.display="inline-block";D.style.verticalAlign="top";D.style.fontWeight="bold";D.style.marginTop="8px";D.style.fontSize="14px";D.style.cursor="default";D.style.color=
mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(D);var P=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){D.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(D,U+1+" / "+this.pages.length);D.setAttribute("title",mxResources.get("currentPage")+
-": "+this.currentPage.getName());R.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});R.style.paddingLeft="0px";R.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",R.style.display=
-"",D.style.display="inline-block"):(P.style.display="none",R.style.display="none",D.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
+": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display=
+"",D.style.display="inline-block"):(P.style.display="none",S.style.display="none",D.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(D);Y.popup(fa.x,fa.y+D.offsetHeight,null,U);mxEvent.addListener(Y.div,
"mouseleave",mxUtils.bind(this,function(){Y.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(U)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,x=null,F=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),
600)}),U||200)}),H=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
@@ -2193,7 +2194,7 @@ l.width-f.clientWidth,l.x-10)),l.y>f.scrollTop+.9*f.clientHeight&&(f.scrollTop=M
EditorUi.prototype.setPageVisible=function(b){var f=this.editor.graph,l=mxUtils.hasScrollbars(f.container),u=0,y=0;l&&(u=f.view.translate.x*f.view.scale-f.container.scrollLeft,y=f.view.translate.y*f.view.scale-f.container.scrollTop);f.pageVisible=b;f.pageBreaksVisible=b;f.preferPageSize=b;f.view.validateBackground();if(l){var q=f.getSelectionCells();f.clearSelection();f.setSelectionCells(q)}f.sizeDidChange();l&&(f.container.scrollLeft=f.view.translate.x*f.view.scale-u,f.container.scrollTop=f.view.translate.y*
f.view.scale-y);f.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,f,l){f&&(b.window.setSize=function(y,q){if(!this.minimized){var C=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;y=Math.min(y,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());q=Math.min(q,C-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(y,q){var C=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,R=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-R));q=Math.max(0,Math.min(q,J-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(R,D)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,
+J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),D=parseInt(this.div.style.height);y=Math.max(0,Math.min(y,C-S));q=Math.max(0,Math.min(q,J-D));this.getX()==y&&this.getY()==q||mxWindow.prototype.setLocation.apply(this,arguments);f&&!this.minimized&&this.setSize(S,D)};var u=mxUtils.bind(this,function(){var y=b.window.getX(),q=b.window.getY();b.window.setLocation(y,q)});mxEvent.addListener(window,"resize",u);b.destroy=function(){mxEvent.removeListener(window,
"resize",u);b.window.destroy();null!=l&&l()}};function ChangeGridColor(b,f){this.ui=b;this.color=f}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};function ChangePageSetup(b,f,l,u,y){this.ui=b;this.previousColor=this.color=f;this.previousImage=this.image=l;this.previousFormat=this.format=u;this.previousPageScale=this.pageScale=y;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var f=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=f}if(!this.ignoreImage){this.image=this.previousImage;f=b.backgroundImage;var l=this.previousImage;null!=l&&Graph.isPageLink(l.src)&&(l=this.ui.createImageForPageLink(l.src,this.ui.currentPage));this.ui.setBackgroundImage(l);this.previousImage=f}null!=this.previousFormat&&(this.format=this.previousFormat,
f=b.pageFormat,this.previousFormat.width!=f.width||this.previousFormat.height!=f.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=f);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=b))};
@@ -2222,17 +2223,17 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(l,100);mxUtils.setPrefixedStyle(l.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","scaleX(0)");mxUtils.setOpacity(l,0);window.setTimeout(mxUtils.bind(this,function(){null!=l.parentNode&&l.parentNode.removeChild(l)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[f])};
EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var f=document.createElement("div");f.className="geStatusDiv";f.setAttribute("title",b);f.innerText=b;return f};
EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createDiv=function(b){var f=document.createElement("div");f.className=b;return f};
-EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,J+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);J!=P()&&(R=!0,D=null)}}function q(c){y(c);C=J=null}var C=null,J=null,R=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),
-mxEvent.getClientY(c));J=P();R=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!R&&this.hsplitClickEnabled){var g=null!=D?D-l:0;D=P();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
+EditorUi.prototype.addSplitHandler=function(b,f,l,u){function y(c){if(null!=C){var g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));u(Math.max(0,J+(f?g.x-C.x:C.y-g.y)-l));mxEvent.consume(c);J!=P()&&(S=!0,D=null)}}function q(c){y(c);C=J=null}var C=null,J=null,S=!0,D=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var c=parseInt(f?b.offsetLeft:b.offsetTop);f||(c+=l);return c});mxEvent.addGestureListeners(b,function(c){C=new mxPoint(mxEvent.getClientX(c),
+mxEvent.getClientY(c));J=P();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var g=null!=D?D-l:0;D=P();u(g);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
EditorUi.prototype.prompt=function(b,f,l){b=new FilenameDialog(this,f,mxResources.get("apply"),function(u){l(parseFloat(u))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,f,l,u,y){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=f){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var q=mxResources.get("ok");f=null!=f?f:mxResources.get("error");null!=b&&null!=b.message&&(y=mxUtils.htmlEntities(b.message));this.showError(f,y,q,l,null,null,null,null,null,null,null,null,u?l:null)}else null!=l&&l()};
-EditorUi.prototype.showError=function(b,f,l,u,y,q,C,J,R,D,P,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,J,R);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,J,R,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,J,R,D);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,f,l,u,y,q,C,J,S,D,P,c,g){b=new ErrorDialog(this,b,f,l||mxResources.get("ok"),u,y,q,C,c,J,S);f=Math.ceil(null!=f?f.length/50:1);this.showDialog(b.container,D||340,P||100+20*f,!0,!1,g);b.init()};EditorUi.prototype.showDialog=function(b,f,l,u,y,q,C,J,S,D){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,f,l,u,y,q,C,J,S,D);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,f,l){var u=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var y=this.dialogs.length-1;0<=y;y--)if(!this.dialogs[y].closing){u=this.dialogs[y];break}null==u||null!=l&&l!=this.dialog.container.firstChild||(u.closing=!0,0==u.close(b,f)?delete u.closing:(delete u.closing,b=mxUtils.lastIndexOf(this.dialogs,u),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
"dialog",u)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var f=b.getSelectionCells(),l=new mxDictionary,u=[],y=0;y<f.length;y++){var q=b.isTableCell(f[y])?b.model.getParent(f[y]):f[y];null==q||l.get(q)||(l.put(q,!0),u.push(q))}b.setSelectionCells(b.duplicateCells(u,!1))}catch(C){this.handleError(C)}};
-EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),J=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(R){q.cellEditor.restoreSelection(C);f(R)},function(){q.cellEditor.restoreSelection(C)},l,u,y);this.showDialog(b.container,230,J,!0,!1);b.init()};
+EditorUi.prototype.pickColor=function(b,f,l,u,y){var q=this.editor.graph,C=q.cellEditor.saveSelection(),J=(y?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){q.cellEditor.restoreSelection(C);f(S)},function(){q.cellEditor.restoreSelection(C)},l,u,y);this.showDialog(b.container,230,J,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,J=Math.min(C+1024,l),R=Array(J-C),D=0;C<J;++D,++C)R[D]=b[C].charCodeAt(0);y[q]=new Uint8Array(R)}return new Blob(y,{type:f})};
+EditorUi.prototype.base64ToBlob=function(b,f){f=f||"";b=atob(b);for(var l=b.length,u=Math.ceil(l/1024),y=Array(u),q=0;q<u;++q){for(var C=1024*q,J=Math.min(C+1024,l),S=Array(J-C),D=0;C<J;++D,++C)S[D]=b[C].charCodeAt(0);y[q]=new Uint8Array(S)}return new Blob(y,{type:f})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var f=null;try{var l=b.indexOf("&lt;mxGraphModel ");if(0<=l){var u=b.lastIndexOf("&lt;/mxGraphModel&gt;");u>l&&(f=b.substring(l,u+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(y){}return f};
EditorUi.prototype.extractGraphModelFromEvent=function(b){var f=null,l=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(l=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==l||0==l.length)&&(l=b.getData("text/plain")),null!=l&&(l=Graph.zapGremlins(mxUtils.trim(l)),b=this.extractGraphModelFromHtml(l),null!=b&&(l=b))));null!=l&&this.isCompatibleString(l)&&(f=l);return f};
EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(f){this.save(f)}),null,mxUtils.bind(this,function(f){if(null!=f&&0<f.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,340,96,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
@@ -2249,24 +2250,24 @@ EditorUi.prototype.createKeyHandler=function(b){function f(c,g,m){if(!u.isSelect
F))}}finally{u.getModel().endUpdate()}}else{F=u.model.getParent(x);var H=u.getView().scale;m=null;1==u.getSelectionCount()&&u.model.isVertex(x)&&null!=u.layoutManager&&!u.isCellLocked(x)&&(m=u.layoutManager.getLayout(F));if(null!=m&&m.constructor==mxStackLayout)g=F.getIndex(x),37==c||38==c?u.model.add(F,x,Math.max(0,g-1)):(39==c||40==c)&&u.model.add(F,x,Math.min(u.model.getChildCount(F),g+1));else{var M=u.graphHandler;null!=M&&(null==M.first&&M.start(x,0,0,u.getMovableCells(n)),null!=M.first&&(x=
n=0,37==c?n=-g:38==c?x=-g:39==c?n=g:40==c&&(x=g),M.currentDx+=n*H,M.currentDy+=x*H,M.checkPreview(),M.updatePreview()),null!=C&&window.clearTimeout(C),C=window.setTimeout(function(){if(null!=M.first){var L=M.roundLength(M.currentDx/H),K=M.roundLength(M.currentDy/H);M.moveCells(M.cells,L,K);M.reset()}},400))}}}}var l=this,u=this.editor.graph,y=new mxKeyHandler(u),q=y.isEventIgnored;y.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&q.apply(this,arguments)};y.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&
-(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,J={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},R=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
+(null==l.dialogs||0==l.dialogs.length)};y.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var C=null,J={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(u.isEnabled()){var g=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?g=l.actions.get(l.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
g=l.actions.get(l.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(g=l.actions.get(l.ctrlAltActions[c.keyCode]));if(null!=g)return g.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var m=document.getElementById("geOmniSearch");null!=m&&30<m.clientWidth&&m.focus()};if(null!=J[c.keyCode]&&!u.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(u.model.isVertex(u.getSelectionCell()))return function(){var m=
-u.connectVertex(u.getSelectionCell(),J[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return R.apply(this,
+u.connectVertex(u.getSelectionCell(),J[c.keyCode],u.defaultEdgeLength,c,!0);null!=m&&0<m.length&&(1==m.length&&u.model.isEdge(m[0])?u.setSelectionCell(u.model.getTerminal(m[0],!1)):u.setSelectionCell(m[m.length-1]),u.scrollCellToVisible(u.getSelectionCell()),null!=l.hoverIcons&&l.hoverIcons.update(u.view.getState(u.getSelectionCell())))}}else return this.isControlDown(c)?function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null,!0)}:function(){f(c.keyCode,mxEvent.isShiftDown(c)?u.gridSize:null)}}return S.apply(this,
arguments)};y.bindAction=mxUtils.bind(this,function(c,g,m,n){var x=this.actions.get(m);null!=x&&(m=function(){x.isEnabled()&&x.funct.apply(this,arguments)},g?n?y.bindControlShiftKey(c,m):y.bindControlKey(c,m):n?y.bindShiftKey(c,m):y.bindKey(c,m))});var D=this,P=y.escape;y.escape=function(c){P.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){u.exitGroup()});y.bindControlShiftKey(35,function(){u.enterGroup()});y.bindShiftKey(36,function(){u.home()});y.bindKey(35,function(){u.refresh()});
y.bindAction(80,!0,"print");y.bindAction(107,!0,"zoomIn");y.bindAction(109,!0,"zoomOut");y.bindAction(61,!0,"zoomIn");y.bindAction(187,!0,"zoomIn");y.bindAction(222,!0,"zoomIn");y.bindAction(173,!0,"zoomOut");y.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)y.bindAction(79,!0,"outline",!0),y.bindControlKey(36,function(){u.isEnabled()&&u.foldCells(!0)}),y.bindControlKey(35,function(){u.isEnabled()&&u.foldCells(!1)}),y.bindControlKey(13,function(){D.ctrlEnter()}),y.bindAction(8,
!1,"delete"),y.bindAction(8,!0,"deleteAll"),y.bindAction(8,!1,"deleteLabels",!0),y.bindAction(46,!1,"delete"),y.bindAction(46,!0,"deleteAll"),y.bindAction(46,!1,"deleteLabels",!0),y.bindAction(36,!1,"resetView"),y.bindAction(72,!0,"fitWindow",!0),y.bindAction(74,!0,"fitPage"),y.bindAction(74,!0,"fitTwoPages",!0),y.bindAction(48,!0,"customZoom"),y.bindAction(82,!0,"turn"),y.bindAction(82,!0,"clearDefaultStyle",!0),y.bindAction(83,!0,"save"),y.bindAction(83,!0,"saveAs",!0),y.bindAction(65,!0,"selectAll"),
y.bindAction(65,!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,
"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,
!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){u.isEnabled()&&u.startEditingAtCell()});return y};EditorUi.prototype.createMenuElement=function(b,f,l){var u=document.createElement("a");this.addMenuHandler(u,f,l);mxUtils.write(u,b);u.className="geItem";return u};
-EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(J){null!=l&&l(J);if(!mxEvent.isConsumed(J)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var R=new mxPopupMenu(f);R.smartSeparators=!0;R.showDisabled=!0;R.autoExpand=!0;R.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(R,arguments);this.resetCurrentMenu();y=null;R.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
-var D=mxUtils.getOffset(b);R.popup(D.x,D.y+b.offsetHeight,null,J);this.setCurrentMenu(R,b);y=R}u||mxEvent.consume(J)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(J){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var R=this.currentMenuElt;this.hideCurrentMenu();R.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(J)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(J){!this.menus.autoPopup&&
+EditorUi.prototype.addMenuHandler=function(b,f,l,u){if(null!=f){var y=null,q=!0,C=mxUtils.bind(this,function(J){null!=l&&l(J);if(!mxEvent.isConsumed(J)&&q&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var S=new mxPopupMenu(f);S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);this.resetCurrentMenu();y=null;S.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
+var D=mxUtils.getOffset(b);S.popup(D.x,D.y+b.offsetHeight,null,J);this.setCurrentMenu(S,b);y=S}u||mxEvent.consume(J)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(J){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var S=this.currentMenuElt;this.hideCurrentMenu();S.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&C(J)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(J){!this.menus.autoPopup&&
null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(J)&&this.hideCurrentMenu();q=null==this.currentMenu;"INPUT"!=mxEvent.getSource(J).nodeName?J.preventDefault():J.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(J){C(J);q=!0}));u&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(J){C(J);q=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(J){this.currentMenu==y&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,
function(J){this.hideCurrentMenu();13!=J.keyCode&&27!=J.keyCode&&(C(J),q=!0)})))}};
EditorUi.prototype.addShapePicker=function(b,f){var l=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(u){if(this.isShapePickerVisible())this.hideShapePicker();else{var y=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?f?(y.x-=this.diagramContainer.offsetLeft+30,y.y=b.offsetHeight-2):(y.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,y.y+=20):(y.x=0,y.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,
y.x)),this.diagramContainer.scrollTop+y.y,null,null,null,null,mxUtils.bind(this,function(q){return l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(q,!0))}),f,!1)}mxEvent.consume(u)}))};
EditorUi.prototype.createZoomInput=function(b){var f=document.createElement("input");f.className="geButton geZoomInput";f.style.backgroundImage="url("+Editor.thinExpandImage+")";f.setAttribute("type","text");f.setAttribute("value","100%");var l=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){f.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&f.setAttribute("readonly","true");var u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,
function(y){u=!1;mxClient.IS_TOUCH||mxEvent.getSource(y)!=f||document.activeElement==f||(f.focus(),mxClient.IS_GC||mxClient.IS_FF?f.select():document.execCommand("selectAll",!1,null),u=!0)}),mxUtils.bind(this,function(y){mxEvent.getSource(y)==f&&u&&mxEvent.consume(y)}),mxUtils.bind(this,function(y){u&&(mxEvent.consume(y),u=!1)}));this.addMenuHandler(f,l.funct);mxUtils.bind(this,function(y){mxEvent.addListener(y,"click",mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
-mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,J,R){f.value=Math.round(100*this.editor.graph.view.scale*(null!=R?R:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
+mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var q=mxUtils.bind(this,function(C,J,S){f.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==f&&this.editor.graph.container.focus()});mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(C){if(27==C.keyCode||13==C.keyCode||9==C.keyCode)27==C.keyCode||isNaN(parseInt(f.value))?q():this.editor.graph.zoomTo(parseInt(f.value)/100),
this.hideCurrentMenu(),mxEvent.consume(C)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",q);mxEvent.addListener(f,"blur",q);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(C,J){q(C,J,J.getProperty("factor"))}))})(f);return f};
EditorUi.prototype.createHelpIcon=function(b,f){f=document.createElement("img");f.setAttribute("src",Editor.helpImage);f.setAttribute("title",mxResources.get("help")+" ("+b+")");f.className="geHelpIcon";mxEvent.addGestureListeners(f,mxUtils.bind(this,function(l){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(l)}));return f};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(this.selectionStateListener),this.selectionStateListener=null);null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&
@@ -2275,27 +2276,27 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.g
null}var f=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<f.length;b++)null!=f[b]&&null!=f[b].parentNode&&f[b].parentNode.removeChild(f[b])};(function(){var b=[["nbsp","160"],["shy","173"]],f=mxUtils.parseXml;mxUtils.parseXml=function(u){for(var y=0;y<b.length;y++)u=u.replace(new RegExp("&"+b[y][0]+";","g"),"&#"+b[y][1]+";");return f(u)};var l=mxUtils.getSizeForString;mxUtils.getSizeForString=function(u,y,q,C){return l(Graph.sanitizeHtml(u),y,q,C)}})();
Date.prototype.toISOString||function(){function b(f){f=String(f);1===f.length&&(f="0"+f);return f}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,f=function(u){return"function"===typeof u||"[object Function]"===b.call(u)},l=Math.pow(2,53)-1;return function(u){var y=Object(u);if(null==u)throw new TypeError("Array.from requires an array-like object - not null or undefined");var q=1<arguments.length?arguments[1]:void 0,C;if("undefined"!==typeof q){if(!f(q))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(C=
-arguments[2])}var J=Number(y.length);J=isNaN(J)?0:0!==J&&isFinite(J)?(0<J?1:-1)*Math.floor(Math.abs(J)):J;J=Math.min(Math.max(J,0),l);for(var R=f(this)?Object(new this(J)):Array(J),D=0,P;D<J;)P=y[D],R[D]=q?"undefined"===typeof C?q(P,D):q.call(C,P,D):P,D+=1;R.length=J;return R}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
+arguments[2])}var J=Number(y.length);J=isNaN(J)?0:0!==J&&isFinite(J)?(0<J?1:-1)*Math.floor(Math.abs(J)):J;J=Math.min(Math.max(J,0),l);for(var S=f(this)?Object(new this(J)):Array(J),D=0,P;D<J;)P=y[D],S[D]=q?"undefined"===typeof C?q(P,D):q.call(C,P,D):P,D+=1;S.length=J;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(f){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";
mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
mxShape.prototype.getConstraints=function(b,f,l){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(f,l,u,y,q){return"default"==y&&null!=q?"fillcolor"==u.nodeName?q.shapeBackgroundColor:q.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(f,l,u){null==u&&(u=f);return b.apply(this,[f,l,u])}})();
-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,J,R){var D=b.apply(this,arguments);if(null!=l){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(f,l,u,y,q,C,J,S){var D=b.apply(this,arguments);if(null!=l){var P=D.getElementsByTagName("img");0<P.length&&(P[0].className="geButton")}return D}})();
Graph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);
-return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,J=null,R=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var I=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=I&&(c=this.isCellSelected(I.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(I.cell);
+return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var C=null,J=null,S=null,D=null,P=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var I=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=I&&(c=this.isCellSelected(I.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(I.cell);
if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),W=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=W+2;T.grow(W);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&!this.isCellSelected(I.cell)&&!(mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(I,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(I,k.getGraphX()+
N,k.getGraphY()-N))){var U=this.model.getParent(I.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){W*=v;var Y=2*W;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(I.x,I.y-W,I.width,Y))||this.model.getChildAt(U,0)!=I.cell&&mxUtils.intersects(T,new mxRectangle(I.x-W,I.y,Y,I.height))||mxUtils.intersects(T,new mxRectangle(I.x,I.y+I.height-W,I.width,Y))||mxUtils.intersects(T,new mxRectangle(I.x+I.width-W,I.y,Y,I.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,
k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(W=N.getHandleForEvent(k),null!=W&&(N.start(k.getGraphX(),k.getGraphY(),W),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=I&&(this.isTableCell(I.cell)||this.isTableRow(I.cell)||this.isTable(I.cell));)this.isSwimlane(I.cell)&&this.isCellMovable(I.cell)&&(N=this.getActualStartSize(I.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(I.x+(N.x-N.width-1)*v+(0==N.x?I.width:0),I.y,1,I.height))||(0<N.y||
0<N.height)&&mxUtils.intersects(T,new mxRectangle(I.x,I.y+(N.y-N.height-1)*v+(0==N.y?I.height:0),I.width,1)))&&(this.selectCellForEvent(I.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(I.cell),null!=N&&null!=N.customHandles&&(W=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),W),k.consume())),I=this.view.getState(this.model.getParent(I.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&
-this.isEnabled()){k=v.getProperty("event");var I=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==I||!this.model.isEdge(I.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(I.cell),R=I,J=k,null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(I.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
-this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var I in k)if(null!=k[I].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=C&&null!=R&&null!=J){if(I=R,null!=D||Math.abs(C.x-v.getGraphX())>N||Math.abs(C.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(I.cell));if(null!=T&&null!=
+this.isEnabled()){k=v.getProperty("event");var I=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==I||!this.model.isEdge(I.cell)||(C=new mxPoint(k.getGraphX(),k.getGraphY()),P=this.isCellSelected(I.cell),S=I,J=k,null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,k.getGraphX(),k.getGraphY())?D=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(I.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(D=v.getHandleForEvent(k))))}}));
+this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var I in k)if(null!=k[I].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=C&&null!=S&&null!=J){if(I=S,null!=D||Math.abs(C.x-v.getGraphX())>N||Math.abs(C.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(I.cell));if(null!=T&&null!=
T.bends&&0<T.bends.length){T.redrawHandles();var W=null!=D?D:T.getHandleForEvent(J),U=this.view.getEdgeStyle(I),Y=U==mxEdgeStyle.EntityRelation;N=I.absolutePoints;P||(W=D);W!=mxEvent.LABEL_HANDLE&&null!=N&&(W=D,null==W&&(k=new mxRectangle(C.x,C.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?W=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?W=T.bends.length-1:null!=N&&(null==U&&null==W||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?W=2:(W=mxUtils.findNearestSegment(I,C.x,C.y),W=null==U?mxEvent.VIRTUAL_HANDLE-W:W+1))),null==W&&(W=mxEvent.VIRTUAL_HANDLE));k=W==mxEvent.LABEL_HANDLE||0==W||W==T.bends.length-1;if(!Y&&(null!=I.visibleSourceState||null!=I.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),W),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
-this.isCellSelected(I.cell)||(this.selectionCellsHandler.handlers.put(I.cell,T),this.selectCellForEvent(I.cell,v.getEvent())):this.isCellSelected(I.cell)||T.destroy());P=!1;C=J=R=D=null}}else if(I=v.getState(),null!=I&&this.isCellEditable(I.cell)){k=this.model.getParent(I.cell);T=null;if(this.model.isEdge(I.cell)&&!this.isCellSelected(I.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(I.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
+this.isCellSelected(I.cell)||(this.selectionCellsHandler.handlers.put(I.cell,T),this.selectCellForEvent(I.cell,v.getEvent())):this.isCellSelected(I.cell)||T.destroy());P=!1;C=J=S=D=null}}else if(I=v.getState(),null!=I&&this.isCellEditable(I.cell)){k=this.model.getParent(I.cell);T=null;if(this.model.isEdge(I.cell)&&!this.isCellSelected(I.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(I.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==
k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=I.absolutePoints,null!=N)null!=I.text&&null!=I.text.boundingBox&&mxUtils.contains(I.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(I),U==mxEdgeStyle.EntityRelation||null==I.visibleSourceState&&null==I.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(I,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(I.cell)&&this.isCellMovable(I.cell)&&(v=this.model.getParent(I.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(I.x,
I.y-2,I.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRectangle(I.x,I.y+I.height-2,I.width,4)))T="row-resize";else if(mxUtils.intersects(k,new mxRectangle(I.x-2,I.y,4,I.height))&&this.model.getChildAt(v,0)!=I.cell||mxUtils.intersects(k,new mxRectangle(I.x+I.width-2,I.y,4,I.height)))T="col-resize";for(v=I;null==T&&null!=v&&(this.isTableCell(v.cell)||this.isTableRow(v.cell)||this.isTable(v.cell));)this.isSwimlane(v.cell)&&this.isCellMovable(v.cell)&&(N=this.getActualStartSize(v.cell),
-W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&I.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=C=J=R=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
+W=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*W+(0==N.x?v.width*W:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*W+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&I.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){D=C=J=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=
function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;
this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],I=this.graph.pageFormat,N=this.graph.pageScale,T=I.width*N;I=I.height*N;N=this.graph.view.translate;for(var W=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*W,(U.y*I+N.y)*W,T*W,I*W));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*W,((U.y+Y)*I+N.y)*W,T*W,I*W));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=
@@ -2324,13 +2325,13 @@ Graph.createSvgImage=function(b,f,l,u,y){l=unescape(encodeURIComponent(Graph.svg
Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};
Graph.createSvgNode=function(b,f,l,u,y){var q=mxUtils.createXmlDocument(),C=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"svg"):q.createElement("svg");null!=y&&C.setAttribute("style","background: "+y.light+"; background-color: "+y.cssText+";");null==q.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);C.setAttribute("version","1.1");C.setAttribute("width",
l+"px");C.setAttribute("height",u+"px");C.setAttribute("viewBox",b+" "+f+" "+l+" "+u);q.appendChild(C);return C};
-Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var J=document.createElement("img");J.onload=mxUtils.bind(this,function(){try{var D=C.getContext("2d");D.scale(q,q);D.drawImage(J,0,0);u(C.toDataURL())}catch(P){u(null)}});var R=mxUtils.createXmlDocument();R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"svg"):R.createElement("svg");b=(new mxSvgCanvas2D(R)).convertHtml(b);J.onerror=
+Graph.htmlToPng=function(b,f,l,u,y,q){y=null!=y?y:"";q=null!=q?q:Editor.htmlRasterScale;var C=document.createElement("canvas");C.width=f*q;C.height=l*q;var J=document.createElement("img");J.onload=mxUtils.bind(this,function(){try{var D=C.getContext("2d");D.scale(q,q);D.drawImage(J,0,0);u(C.toDataURL())}catch(P){u(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);J.onerror=
function(D){u(null)};J.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'">'+(""!=y?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+y+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,J=!1,R=0;R<q.length;R++)if(q[R]!=b&&null!=q[R].style){C=null;for(var D=0;D<q[R].style.length;D++){var P=q[R].style.item(D),c=q[R].style.getPropertyValue(P);J=y(q[R],P,c)||J}"FONT"==q[R].nodeName&&
-""==q[R].style.getPropertyValue("color")&&(c=q[R].getAttribute("color"),J=y(q[R],"color",c)||J);null!=f&&null!=C&&q[R].setAttribute(f,JSON.stringify(C))}return J};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var J=q[C];""==J?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=J;l=!0}}}catch(R){}return l};
+Graph.addLightDarkColors=function(b,f,l,u){function y(g,m,n){return null!=u?u(g,m,n):mxUtils.isValidColor(n)?(null==C&&null!=f&&(C={}),null!=C&&(C[m]=g.style.getPropertyValue(m)),n=mxUtils.getLightDarkColor(n,null,null,l),g.style.setProperty(m,n.cssText),!0):!1}for(var q=b.getElementsByTagName("*"),C=null,J=!1,S=0;S<q.length;S++)if(q[S]!=b&&null!=q[S].style){C=null;for(var D=0;D<q[S].style.length;D++){var P=q[S].style.item(D),c=q[S].style.getPropertyValue(P);J=y(q[S],P,c)||J}"FONT"==q[S].nodeName&&
+""==q[S].style.getPropertyValue("color")&&(c=q[S].getAttribute("color"),J=y(q[S],"color",c)||J);null!=f&&null!=C&&q[S].setAttribute(f,JSON.stringify(C))}return J};Graph.removeLightDarkColors=function(b,f){b=b.getElementsByTagName("*");for(var l=!1,u=0;u<b.length;u++)try{var y=b[u].getAttribute(f);if(null!=y){b[u].removeAttribute(f);var q=JSON.parse(y),C;for(C in q){var J=q[C];""==J?(b[u].style[C]=null,""==b[u].getAttribute("style")&&b[u].removeAttribute("style")):b[u].style[C]=J;l=!0}}}catch(S){}return l};
Graph.getGivenColor=function(b,f){var l=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var u=b.getAttribute(Graph.backupStyleAttribute);if(null!=u){var y=JSON.parse(u);null!=y&&null!=y[f]&&("color"==f&&"FONT"==b.nodeName&&""==y[f]&&null!=b.getAttribute("color")?l=b.getAttribute("color"):""!=y[f]&&(l=y[f]))}}catch(q){}null==l&&""!=b.style[f]&&(l=b.style[f])}return l};
-Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],J=0;J<q.length;J++)C.push({node:q[J],value:q[J].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(J=0;J<b.length;J++){if(J<C.length&&C[J].node==b[J]&&C[J].value!=b[J].style[y]&&""==b[J].style[y])try{if(q=b[J].getAttribute(Graph.backupStyleAttribute),null!=q){var R=JSON.parse(q);R[y]=
-"";b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}}catch(D){}if(l&&b[J].getAttribute("color")==u||b[J].style[y]==u){l&&b[J].getAttribute("color")==u&&b[J].removeAttribute("color");b[J].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[J].getAttribute(Graph.backupStyleAttribute),R=null!=q?JSON.parse(q):{},R[y]=f!=mxConstants.NONE?f:"",b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}catch(D){}if(l&&mxClient.IS_FF){f=b[J];l=f.firstChild;if(null!=
+Graph.setTextColor=function(b,f,l){for(var u=l?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,y=l?"color":"background-color",q=b.getElementsByTagName("*"),C=[],J=0;J<q.length;J++)C.push({node:q[J],value:q[J].style[y]});document.execCommand(l?"forecolor":"backcolor",!1,u);b=b.getElementsByTagName("*");for(J=0;J<b.length;J++){if(J<C.length&&C[J].node==b[J]&&C[J].value!=b[J].style[y]&&""==b[J].style[y])try{if(q=b[J].getAttribute(Graph.backupStyleAttribute),null!=q){var S=JSON.parse(q);S[y]=
+"";b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(D){}if(l&&b[J].getAttribute("color")==u||b[J].style[y]==u){l&&b[J].getAttribute("color")==u&&b[J].removeAttribute("color");b[J].style[y]=f!=mxConstants.NONE?mxUtils.getLightDarkColor(f).cssText:null;try{q=b[J].getAttribute(Graph.backupStyleAttribute),S=null!=q?JSON.parse(q):{},S[y]=f!=mxConstants.NONE?f:"",b[J].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(D){}if(l&&mxClient.IS_FF){f=b[J];l=f.firstChild;if(null!=
l&&"A"==l.nodeName&&null==l.nextSibling&&null!=l.firstChild){f.parentNode.insertBefore(l,f);for(u=l.firstChild;null!=u;)y=u.nextSibling,f.appendChild(u),u=y;l.appendChild(f)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=b.charCodeAt(l);return f};Graph.bytesToString=function(b){for(var f=Array(b.length),l=0;l<b.length;l++)f[l]=String.fromCharCode(b[l]);return f.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(f,l){return String.fromCharCode(parseInt(l,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,f){b=mxUtils.getXml(b);return Graph.compress(f?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(b){var f="";b=new Uint8Array(b);for(var l=b.byteLength,u=0;u<l;u++)f+=String.fromCharCode(b[u]);return f};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(f){return f.charCodeAt(0)})};
@@ -2344,9 +2345,9 @@ null==Z[L].getTerminal(!0)),F=0;F<Z[L].getChildCount();F++){var ha=Z[L].getChild
ca.referenceCell=x;ca.startIndex=Math.max(0,(g.startIndex||0)-pageSize);Z.splice(0,0,ca)}if(H.length>(g.startIndex||0)+pageSize){var aa=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");aa.referenceCell=x;aa.startIndex=(g.startIndex||0)+pageSize;Z.splice(0,0,aa)}for(var oa in c.getModel().cells){var da=c.getModel().getCell(oa);da!=c.rootCell&&
!c.getModel().isAncestor(c.rootCell,da)&&c.getModel().isVertex(da)&&c.removeCells([da])}c.addCells(Z);var ka=c.getModel().getGeometry(c.rootCell);null!=ka&&(ka=ka.clone(),ka.x=m-ka.width/2,ka.y=n-ka.height/3,c.getModel().setGeometry(c.rootCell,ka));g=[];for(oa in c.getModel().cells)da=c.getModel().getCell(oa),da!=c.rootCell&&c.getModel().isVertex(da)&&c.getModel().getParent(da)==c.getDefaultParent()&&(g.push(da),ka=c.getModel().getGeometry(da),null!=ka&&(ka.x=m-ka.width/2,ka.y=n-ka.height/2));var ba=
g.length,V=2*Math.PI/ba,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ba;m++)ka=c.getModel().getGeometry(g[m]),null!=ka&&(ka=ka.clone(),ka.x+=k*Math.sin(m*V),ka.y+=k*Math.cos(m*V),c.getModel().setGeometry(g[m],ka))}finally{c.getModel().endUpdate()}}}var J=document.createElement("div");J.style.position="absolute";J.style.display="block";J.style.overflow="auto";J.style.width="100%";J.style.height="100%";J.style.left="0px";J.style.top="0px";J.style.zIndex=
-2;J.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var R=document.createElement("img");R.setAttribute("src",Editor.closeBlackImage);R.style.position="absolute";R.style.cursor="pointer";R.style.right="10px";R.style.top="10px";J.appendChild(R);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
-mxUtils.write(D,mxResources.get("close"));J.appendChild(D);document.body.appendChild(J);var P=function(c){27==c.keyCode&&R.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
-u.scrollCellToVisible(y)};mxEvent.addListener(R,"click",m);mxEvent.addListener(D,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var H=
+2;J.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";J.appendChild(S);var D=document.createElement("div");D.style.position="absolute";D.style.cursor="pointer";D.style.right="38px";D.style.top="14px";D.style.textAlign="right";D.style.verticalAlign="top";
+mxUtils.write(D,mxResources.get("close"));J.appendChild(D);document.body.appendChild(J);var P=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",P);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",P);c.parentNode.removeChild(c);
+u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(D,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?C(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x-F.geometry.height/2;g.model.endUpdate();var H=
!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){H||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,H=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var Z=K.layout;K.layout=function(ha){K.spacing=Math.min(60,Math.max(30,60-5*ha.length));Z.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);H=!1}))});C(g,F)})(J)})(b,
f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};
Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==
@@ -2354,7 +2355,7 @@ l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.
Graph.sanitizeLink=function(b){if(null==b)return null;var f=document.createElement("a");f.setAttribute("href",b);Graph.sanitizeNode(f);return f.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,f){window.DOM_PURIFY_CONFIG.IN_PLACE=f;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),u=l.indexOf("<svg");if(0<=u){f.innerHTML=Graph.sanitizeHtml(l.substring(u));var y=f.getElementsByTagName("svg");if(0<y.length){document.body.appendChild(f);try{u=l=1;var q=y[0].getAttribute("width"),C=y[0].getAttribute("height");q=null!=q&&"%"!=q.charAt(q.length-
-1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var J=y[0].getAttribute("viewBox");if(null!=J&&!isNaN(q)&&!isNaN(C)){var R=J.split(" ");4<=J.length&&(l=parseFloat(R[2])/q,u=parseFloat(R[3])/C,new mxRectangle(parseFloat(R[0]),parseFloat(R[1]),parseFloat(R[2]),parseFloat(R[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(C=0;C<P.length;C++)q=Math.max(q,parseFloat(P[C].getAttribute("stroke-width")));D=new mxRectangle(D.x,
+1)?parseFloat(q):NaN;C=null!=C&&"%"!=C.charAt(C.length-1)?parseFloat(C):NaN;var J=y[0].getAttribute("viewBox");if(null!=J&&!isNaN(q)&&!isNaN(C)){var S=J.split(" ");4<=J.length&&(l=parseFloat(S[2])/q,u=parseFloat(S[3])/C,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var D=y[0].getBBox();if(0<D.width&&0<D.height){q=0;var P=y[0].querySelectorAll("[stroke-width]");for(C=0;C<P.length;C++)q=Math.max(q,parseFloat(P[C].getAttribute("stroke-width")));D=new mxRectangle(D.x,
D.y,D.width,D.height);D.grow(q/2);f.getElementsByTagName("svg")[0].setAttribute("viewBox",D.x+" "+D.y+" "+D.width+" "+D.height);f.getElementsByTagName("svg")[0].setAttribute("width",D.width/l);f.getElementsByTagName("svg")[0].setAttribute("height",D.height/u)}}catch(c){}finally{document.body.removeChild(f)}b=Editor.createSvgDataUri(mxUtils.getXml(y[0]))}}}catch(c){}return b};
Graph.createRemoveIcon=function(b,f){var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.clearImage);l.setAttribute("title",b);l.setAttribute("width","13");l.setAttribute("height","10");l.style.marginLeft="4px";l.style.marginBottom="-1px";l.style.cursor="pointer";mxEvent.addListener(l,"click",f);return l};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
Graph.rewritePageLinks=function(b,f){function l(y,q){var C=y.getAttribute(q);if(null!=C){Graph.isPageLink(C)&&(C="#"+C.substring(C.indexOf(":")+1));var J=q;f&&"xlink:href"==q&&(y.removeAttribute(q),J="href");y.setAttribute(J,C)}}b=b.getElementsByTagName("a");if(null!=b)for(var u=0;u<b.length;u++)l(b[u],"href"),l(b[u],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
@@ -2363,32 +2364,32 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBa
Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,J=mxUtils.bind(this,function(P){q=!0;C=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),R=mxUtils.bind(this,function(P){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(P))<y&&Math.abs(C.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
-c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,J,R,D);mxEvent.addListener(u.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(l,u){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=l.view.graph.tolerance,q=!0,C=null,J=mxUtils.bind(this,function(P){q=!0;C=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){q=q&&null!=C&&Math.abs(C.x-mxEvent.getClientX(P))<y&&Math.abs(C.y-mxEvent.getClientY(P))<y}),D=mxUtils.bind(this,function(P){if(q)for(var c=mxEvent.getSource(P);null!=
+c&&c!=u.node;){if("a"==c.nodeName.toLowerCase()){l.view.graph.labelLinkClicked(l,c,P);break}c=c.parentNode}});mxEvent.addGestureListeners(u.node,J,S,D);mxEvent.addListener(u.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var f=this.tooltipHandler.init;this.tooltipHandler.init=function(){f.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(l){var u=mxEvent.getSource(l);"A"==u.nodeName&&(u=u.getAttribute("href"),null!=
u&&this.graph.isCustomLink(u)&&(mxEvent.isTouchEvent(l)||!mxEvent.isPopupTrigger(l))&&this.graph.customLinkClicked(u)&&mxEvent.consume(l))}))}}this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!this.isSpecialColor(C.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(C.style,"lineShape",null)&&(this.model.isVertex(C.cell)||"arrow"==J||"pipe"==J||"wire"==J||"filledEdge"==J||"flexArrow"==J||"mxgraph.arrows2.wedgeArrow"==
-J)};Graph.prototype.isGradientState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=J&&"pipe"!=J};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,J){for(var R=J?"color":"background-color",D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,R);null==D&&null!=C&&C!=this.cellEditor.textarea.parentNode;)D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,R),C=C.parentNode;
+J)};Graph.prototype.isGradientState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return this.isFillState(C)&&"wire"!=J&&"pipe"!=J};Graph.prototype.isStrokeState=function(C){return!0};Graph.prototype.getTextColor=function(C,J){for(var S=J?"color":"background-color",D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S);null==D&&null!=C&&C!=this.cellEditor.textarea.parentNode;)D=C==this.cellEditor.textarea&&J?"default":Graph.getGivenColor(C,S),C=C.parentNode;
if("rgba(0, 0, 0, 0)"==D||"transparent"==D)D=mxConstants.NONE;return D};Graph.prototype.isSpecialColor=function(C){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],C)};Graph.prototype.isGlassState=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return"label"==C||"rectangle"==C||"internalStorage"==C||"ext"==C||"umlLifeline"==C||"swimlane"==C||"process"==C};Graph.prototype.isRoundedState=function(C){return null!=
C.shape?C.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(C){var J=mxUtils.getValue(C.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(C.style,mxConstants.STYLE_CURVED,!1)&&("connector"==J||"filledEdge"==J||"wire"==J)};Graph.prototype.isAutoSizeState=function(C){return"1"==mxUtils.getValue(C.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(C){return null!=
-mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,J){C=null!=C?C:!0;J=null!=J?J:!0;var R=this.model;return R.filterDescendants(function(D){return C&&R.isVertex(D)||J&&R.isEdge(D)},R.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,J,R){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var D=JSON.parse(C),P;for(P in D)this.setCellStyles(P,D[P],J),"edgeStyle"==
-P&&"elbowEdgeStyle"==D[P]&&null!=R&&this.setCellStyles("elbow",R==mxConstants.DIRECTION_SOUTH||R==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",J)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var J={},R=0;R<C.length;R++){var D=this.view.getState(C[R]);null!=D&&this.mergeStyle(D.style,J,0==R)}return J};Graph.prototype.mergeStyle=function(C,J,R){if(null!=C){var D={},P;for(P in C){var c=C[P];null!=c&&(D[P]=!0,null==J[P]&&R?J[P]=c:J[P]!=c&&delete J[P])}for(P in J)D[P]||
-delete J[P]}};Graph.prototype.getStartEditingCell=function(C,J){J=this.getCellStyle(C);J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),J=this.getCellStyle(C),J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(J=0;J<this.model.getChildCount(C);J++){var R=
-this.model.getChildAt(C,J);if(this.isCellEditable(R)){C=R;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,J,R,D){null!=C&&(D||(R=null!=R?R:Graph.cellStyles,Graph.removeKeys(C,function(P){return 0>mxUtils.indexOf(R,P)})),this.updateCellStyles(C,J))};Graph.prototype.copyCellStyles=function(C,J,R,D,P,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||
-n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<J.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,J[x]),"strokeColor"!=J[x]||null!=R[x]&&"none"!=R[x])if(0<=mxUtils.indexOf(Graph.cellStyles,J[x])||"shape"==J[x])if("shape"!=J[x]&&(m||C)&&(null==R[x]?delete D[J[x]]:D[J[x]]=R[x]),n||C)null==R[x]?delete P[J[x]]:P[J[x]]=R[x]};Graph.prototype.includeDescendants=function(C){for(var J=[],R=0;R<C.length;R++)J=J.concat(this.model.getDescendants(C[R]));return J};Graph.prototype.pasteCellStyles=function(C,
-J,R,D,P){J=null!=J?J:this.currentVertexStyle;R=null!=R?R:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=m?m.split(";"):[],H=0;H<F.length;H++){var M=F[H],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
-1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ha=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ha,K))for(var ca=0;ca<ha.length;ca++){var aa=mxUtils.indexOf(x,ha[ca]);0<=aa&&x.splice(aa,1)}}}}var oa=this.model.isEdge(g);n=oa?R:J;for(H=0;H<x.length;H++){K=x[H];var da=n[K];null!=da&&("edgeStyle"!=K||P)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,da),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==da&&null==n.curved&&
-(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,J){this.model.beginUpdate();try{for(var R=0;R<J.length;R++)if(this.model.isVertex(J[R])||this.model.isEdge(J[R])){var D=this.getCellStyle(J[R],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(D[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==
-D[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[J[R]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[J[R]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
-Graph.prototype.getCellAt=function(C,J,R,D,P,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,J=J/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,J,R,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==R&&(R=this.getCurrentRoot(),null==R&&(R=this.getModel().getRoot()));if(null!=R)for(var g=this.model.getChildCount(R)-1;0<=g;g--){var m=this.model.getChildAt(R,g),n=this.getScaledCellAt(C,J,m,D,P,
+mxUtils.getValue(C.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(C){return!0};Graph.prototype.getVerticesAndEdges=function(C,J){C=null!=C?C:!0;J=null!=J?J:!0;var S=this.model;return S.filterDescendants(function(D){return C&&S.isVertex(D)||J&&S.isEdge(D)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(C,J,S){C=this.getCellStyle(C).newEdgeStyle;if(null!=C){this.model.beginUpdate();try{var D=JSON.parse(C),P;for(P in D)this.setCellStyles(P,D[P],J),"edgeStyle"==
+P&&"elbowEdgeStyle"==D[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",J)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(C){for(var J={},S=0;S<C.length;S++){var D=this.view.getState(C[S]);null!=D&&this.mergeStyle(D.style,J,0==S)}return J};Graph.prototype.mergeStyle=function(C,J,S){if(null!=C){var D={},P;for(P in C){var c=C[P];null!=c&&(D[P]=!0,null==J[P]&&S?J[P]=c:J[P]!=c&&delete J[P])}for(P in J)D[P]||
+delete J[P]}};Graph.prototype.getStartEditingCell=function(C,J){J=this.getCellStyle(C);J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0));this.isTable(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C)&&(C=this.model.getChildAt(C,0),J=this.getCellStyle(C),J=parseInt(mxUtils.getValue(J,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(C)&&(!this.isSwimlane(C)||0==J)&&""==this.getLabel(C)&&0<this.model.getChildCount(C))for(J=0;J<this.model.getChildCount(C);J++){var S=
+this.model.getChildAt(C,J);if(this.isCellEditable(S)){C=S;break}}return C};Graph.prototype.copyStyle=function(C){return this.getCellStyle(C,!1)};Graph.prototype.pasteStyle=function(C,J,S,D){null!=C&&(D||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(C,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(C,J))};Graph.prototype.copyCellStyles=function(C,J,S,D,P,c,g){var m=!1,n=!1;if(0<C.length)for(var x=0;x<C.length&&(m=this.getModel().isVertex(C[x])||m,!(n=this.getModel().isEdge(C[x])||
+n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<J.length;x++)if(C=0<=mxUtils.indexOf(Graph.textStyles,J[x]),"strokeColor"!=J[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,J[x])||"shape"==J[x])if("shape"!=J[x]&&(m||C)&&(null==S[x]?delete D[J[x]]:D[J[x]]=S[x]),n||C)null==S[x]?delete P[J[x]]:P[J[x]]=S[x]};Graph.prototype.includeDescendants=function(C){for(var J=[],S=0;S<C.length;S++)J=J.concat(this.model.getDescendants(C[S]));return J};Graph.prototype.pasteCellStyles=function(C,
+J,S,D,P){J=null!=J?J:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<C.length;c++){var g=C[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!D)for(var F=null!=m?m.split(";"):[],H=0;H<F.length;H++){var M=F[H],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),Z=mxUtils.indexOf(x,K);0<=Z&&x.splice(Z,
+1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ha=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ha,K))for(var ca=0;ca<ha.length;ca++){var aa=mxUtils.indexOf(x,ha[ca]);0<=aa&&x.splice(aa,1)}}}}var oa=this.model.isEdge(g);n=oa?S:J;for(H=0;H<x.length;H++){K=x[H];var da=n[K];null!=da&&("edgeStyle"!=K||P)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,da),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==da&&null==n.curved&&
+(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return C};Graph.prototype.updateCellStyles=function(C,J){this.model.beginUpdate();try{for(var S=0;S<J.length;S++)if(this.model.isVertex(J[S])||this.model.isEdge(J[S])){var D=this.getCellStyle(J[S],!1),P=D[mxConstants.STYLE_PERIMETER],c=!1;for(m in C){var g=C[m];if(D[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==
+D[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[J[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[J[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};
+Graph.prototype.getCellAt=function(C,J,S,D,P,c){this.useCssTransforms&&(C=C/this.currentScale-this.currentTranslate.x,J=J/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(C,J,S,D,P,c){D=null!=D?D:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(C,J,m,D,P,
c);if(null!=n)return n;if(this.isCellVisible(m)&&(P&&this.model.isEdge(m)||D&&this.model.isVertex(m))&&(n=this.view.getState(m),null!=n&&(null==c||!c(n,C,J))&&this.intersects(n,C,J)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(C){return!this.isSwimlane(C.cell)&&0<this.model.getChildCount(C.cell)&&!this.isCellCollapsed(C.cell)&&"1"==mxUtils.getValue(C.style,"recursiveResize","1")&&null==mxUtils.getValue(C.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(C){for(var J=
-this.getCellGeometry(C);null!=J&&J.relative;)C=this.getModel().getParent(C),J=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var J=new mxDictionary,R=[],D=0;D<C.length;D++){var P=this.getCompositeParent(C[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
-null==P||J.get(P)||(J.put(P,!0),R.push(P))}return R};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var J=this.getCellGeometry(C);null!=J&&J.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var J=this.model.getParent(C);if(!this.model.isVertex(J))break;C=J}return C};Graph.prototype.filterSelectionCells=function(C){var J=
-this.getSelectionCells();if(null!=C){for(var R=[],D=0;D<J.length;D++)C(J[D])||R.push(J[D]);J=R}return J};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var J=this.currentScale,R=this.currentTranslate;C=new mxRectangle((C.x+2*R.x)*J-R.x,(C.y+2*R.y)*J-R.y,C.width*J,C.height*J)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);
-return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var J=this.graph.currentTranslate,R=this.graph.currentScale;C=new mxRectangle((C.x+J.x)*R,(C.y+J.y)*R,C.width*R,C.height*R)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){this.graph.useCssTransforms&&(this.graph.currentScale=
-this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var J=[],R=
-0;R<C.length;R++)this.isTableRow(C[R])||this.isTableCell(C[R])||J.push(C[R]);return J};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var J=[],R=0;R<C.length;R++)this.isTable(C[R])||this.isTableRow(C[R])||this.isTableCell(C[R])||J.push(C[R]);return J};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var J=C.getAttribute("transform");C.setAttribute("transformOrigin",
-"0 0");var R=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+R+","+R+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");J!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){var C=this.graph.useCssTransforms,J=this.scale,R=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=J,this.translate=R)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,J,R){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
+this.getCellGeometry(C);null!=J&&J.relative;)C=this.getModel().getParent(C),J=this.getCellGeometry(C);return C};Graph.prototype.isPart=function(C){return"1"==mxUtils.getValue(this.getCurrentCellStyle(C),"part","0")||this.isTableCell(C)||this.isTableRow(C)};Graph.prototype.getCompositeParents=function(C){for(var J=new mxDictionary,S=[],D=0;D<C.length;D++){var P=this.getCompositeParent(C[D]);this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));
+null==P||J.get(P)||(J.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(C){if(null!=C){var J=this.getCellGeometry(C);null!=J&&J.relative&&(C=this.model.getParent(C))}null!=C&&this.model.isEdge(C)&&(C=this.model.getParent(C));null!=C&&(C=this.getCompositeParent(C));return C};Graph.prototype.getCompositeParent=function(C){for(;this.isPart(C);){var J=this.model.getParent(C);if(!this.model.isVertex(J))break;C=J}return C};Graph.prototype.filterSelectionCells=function(C){var J=
+this.getSelectionCells();if(null!=C){for(var S=[],D=0;D<J.length;D++)C(J[D])||S.push(J[D]);J=S}return J};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(C){if(this.useCssTransforms){var J=this.currentScale,S=this.currentTranslate;C=new mxRectangle((C.x+2*S.x)*J-S.x,(C.y+2*S.y)*J-S.y,C.width*J,C.height*J)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(C){C=this.strokeWidth;this.graph.useCssTransforms&&(C/=this.graph.currentScale);
+return C};mxGraphView.prototype.getGraphBounds=function(){var C=this.graphBounds;if(this.graph.useCssTransforms){var J=this.graph.currentTranslate,S=this.graph.currentScale;C=new mxRectangle((C.x+J.x)*S,(C.y+J.y)*S,C.width*S,C.height*S)}return C};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var f=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(C){this.graph.useCssTransforms&&(this.graph.currentScale=
+this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);f.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var l=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(C){C=l.apply(this,arguments);for(var J=[],S=
+0;S<C.length;S++)this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};var u=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(C){C=u.apply(this,arguments);for(var J=[],S=0;S<C.length;S++)this.isTable(C[S])||this.isTableRow(C[S])||this.isTableCell(C[S])||J.push(C[S]);return J};Graph.prototype.updateCssTransform=function(){var C=this.view.getDrawPane();if(null!=C)if(C=C.parentNode,this.useCssTransforms){var J=C.getAttribute("transform");C.setAttribute("transformOrigin",
+"0 0");var S=Math.round(100*this.currentScale)/100;C.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");J!=C.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",C.getAttribute("transform"))}else C.removeAttribute("transformOrigin"),C.removeAttribute("transform")};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){var C=this.graph.useCssTransforms,J=this.scale,S=this.translate;C&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);y.apply(this,arguments);C&&(this.scale=J,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(C,J,S){var D=this.useCssTransforms,P=this.view.scale,c=this.view.translate;D&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);D&&(this.view.scale=
P,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,f,l){var u=f.getAttribute("href");u!=Graph.sanitizeLink(u)&&Graph.sanitizeNode(f);if(null!=u&&!this.isCustomLink(u)&&(mxEvent.isLeftMouseButton(l)&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(u)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(u),b);mxEvent.consume(l)}};
Graph.prototype.openLink=function(b,f,l){var u=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==f&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=f||window!=window.top||navigator.standalone)u=window.open(b,null!=f?f:"_blank",l?null:"noopener,noreferrer"),null==u||l||(u.opener=null);else{var y=b.split("#")[1];window.location.hash=="#"+y&&(window.location.hash="");window.location.hash=y}}catch(q){}return u};
@@ -2404,7 +2405,7 @@ Graph.prototype.createLayouts=function(b){for(var f=[],l=0;l<b.length;l++)if(0<=
Graph.prototype.getDataForCells=function(b,f){for(var l=[],u=0;u<b.length;u++){var y={};y.id=b[u].id;var q=null!=b[u].value?b[u].value.attributes:null;this.isReplacePlaceholders(b[u])&&f&&(y.value=this.getLabel(b[u]));if(null!=q)for(var C=0;C<q.length;C++)y[q[C].nodeName]=q[C].nodeValue;else y.label=this.convertValueToString(b[u]);l.push(y)}return l};
Graph.prototype.getNodesForCells=function(b){for(var f=[],l=0;l<b.length;l++){var u=this.view.getState(b[l]);if(null!=u){for(var y=this.cellRenderer.getShapesForState(u),q=0;q<y.length;q++)null!=y[q]&&null!=y[q].node&&f.push(y[q].node);null!=u.control&&null!=u.control.node&&f.push(u.control.node)}}return f};
Graph.prototype.createWipeAnimations=function(b,f){for(var l=[],u=0;u<b.length;u++){var y=this.view.getState(b[u]);null!=y&&null!=y.shape&&(this.model.isEdge(y.cell)&&null!=y.absolutePoints&&1<y.absolutePoints.length?l.push(this.createEdgeWipeAnimation(y,f)):this.model.isVertex(y.cell)&&null!=y.shape.bounds&&l.push(this.createVertexWipeAnimation(y,f)))}return l};
-Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,J){if(null!=b.shape){var R=[l[0]];J=C/J;f||(J=1-J);for(var D=y*J,P=1;P<q;P++)if(D<=u[P-1]){R.push(new mxPoint(l[P-1].x+(l[P].x-l[P-1].x)*D/u[P-1],l[P-1].y+(l[P].y-l[P-1].y)*D/u[P-1]));break}else D-=u[P-1],R.push(l[P]);b.shape.points=R;b.shape.redraw();0==C&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,f){var l=b.absolutePoints.slice(),u=b.segments,y=b.length,q=l.length;return{execute:mxUtils.bind(this,function(C,J){if(null!=b.shape){var S=[l[0]];J=C/J;f||(J=1-J);for(var D=y*J,P=1;P<q;P++)if(D<=u[P-1]){S.push(new mxPoint(l[P-1].x+(l[P].x-l[P-1].x)*D/u[P-1],l[P-1].y+(l[P].y-l[P-1].y)*D/u[P-1]));break}else D-=u[P-1],S.push(l[P]);b.shape.points=S;b.shape.redraw();0==C&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=J)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,f){var l=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(u,y){null!=b.shape&&(y=u/y,f||(y=1-y),b.shape.bounds=new mxRectangle(l.x,l.y,l.width*y,l.height),b.shape.redraw(),0==u&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=y))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=l,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),f?1:0))})}};Graph.prototype.executeAnimations=function(b,f,l,u){l=null!=l?l:30;u=null!=u?u:30;var y=null,q=0,C=mxUtils.bind(this,function(){if(q==l||this.stoppingCustomActions){window.clearInterval(y);for(var J=0;J<b.length;J++)b[J].stop();null!=f&&f()}else for(J=0;J<b.length;J++)b[J].execute(q,l);q++});y=window.setInterval(C,u);C()};
@@ -2419,17 +2420,17 @@ Graph.prototype.isLabelMovable=function(b){var f=this.getCurrentCellStyle(b);ret
Graph.prototype.getClickableLinkForCell=function(b){do{var f=this.getLinkForCell(b);if(null!=f)return f;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var f=null;"date"==b?f=(new Date).toLocaleDateString():"time"==b?f=(new Date).toLocaleTimeString():"timestamp"==b?f=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),f=this.formatDate(new Date,b));return f};
Graph.prototype.formatDate=function(b,f,l){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var u=this.dateFormatCache,y=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,q=/[^-+\dA-Z]/g,C=function(H,M){H=String(H);for(M=M||2;H.length<M;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var J=l?"getUTC":"get",R=b[J+"Date"](),D=b[J+"Day"](),P=b[J+"Month"](),c=b[J+"FullYear"](),g=b[J+"Hours"](),m=b[J+"Minutes"](),n=b[J+"Seconds"]();J=b[J+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:R,dd:C(R),ddd:u.i18n.dayNames[D],dddd:u.i18n.dayNames[D+7],m:P+1,mm:C(P+1),mmm:u.i18n.monthNames[P],mmmm:u.i18n.monthNames[P+
-12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(J,3),L:C(99<J?Math.round(J/10):J),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<R%10?0:(10!=R%100-R%10)*R%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
+/\d/.test(b)||(f=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");f=String(u.masks[f]||f||u.masks["default"]);"UTC:"==f.slice(0,4)&&(f=f.slice(4),l=!0);var J=l?"getUTC":"get",S=b[J+"Date"](),D=b[J+"Day"](),P=b[J+"Month"](),c=b[J+"FullYear"](),g=b[J+"Hours"](),m=b[J+"Minutes"](),n=b[J+"Seconds"]();J=b[J+"Milliseconds"]();var x=l?0:b.getTimezoneOffset(),F={d:S,dd:C(S),ddd:u.i18n.dayNames[D],dddd:u.i18n.dayNames[D+7],m:P+1,mm:C(P+1),mmm:u.i18n.monthNames[P],mmmm:u.i18n.monthNames[P+
+12],yy:String(c).slice(2),yyyy:c,h:g%12||12,hh:C(g%12||12),H:g,HH:C(g),M:m,MM:C(m),s:n,ss:C(n),l:C(J,3),L:C(99<J?Math.round(J/10):J),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:l?"UTC":(String(b).match(y)||[""]).pop().replace(q,""),o:(0<x?"-":"+")+C(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return f.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in F?F[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var f=null;if(0<b.length){f=this.getLayerForCell(b[0]);for(var l=1;l<b.length;l++)if(!this.model.isAncestor(f,b[l])){f=null;break}}return f};
-Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function J(){u.isVisible(C)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var R=this.convertValueToString(C)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
-"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[R]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,R);l.appendChild(D);
+Graph.prototype.createLayersDialog=function(b,f){var l=document.createElement("div");l.style.position="absolute";for(var u=this.getModel(),y=u.getChildCount(u.root),q=0;q<y;q++)mxUtils.bind(this,function(C){function J(){u.isVisible(C)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(D,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(D,25))}var S=this.convertValueToString(C)||mxResources.get("background")||"Background",D=document.createElement("div");D.style.overflow=
+"hidden";D.style.textOverflow="ellipsis";D.style.padding="2px";D.style.whiteSpace="nowrap";D.style.cursor="pointer";D.setAttribute("title",mxResources.get(u.isVisible(C)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";f&&(P.style.filter="invert(100%)",P.style.top="-2px");D.appendChild(P);mxUtils.write(D,S);l.appendChild(D);
mxEvent.addListener(D,"click",function(){u.setVisible(C,!u.isVisible(C));J();null!=b&&b(C)});J()})(u.getChildAt(u.root,q));return l};
-Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var J=q.substring(1,q.length-1),R={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==J)C=b.id;else if("width"===J.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
-null!=D&&(C=D.width,5<J.length&&(C=Editor.toUnit(C,R[J.substring(6)])))}else if("height"==J.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(C=D.height,6<J.length&&(C=Editor.toUnit(C,R[J.substring(7)])));else if("length"==J.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(C=Math.round(D.length/this.view.scale),6<J.length&&(C=Editor.toUnit(C,R[J.substring(7)])))}else if(0>J.indexOf("{"))for(R=b;null==C&&null!=
-R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=R.getAttribute(J+"_"+Graph.diagramLanguage)),null==C&&(C=R.hasAttribute(J)?null!=R.getAttribute(J)?R.getAttribute(J):"":null)),R=this.model.getParent(R);null==C&&(C=this.getGlobalVariable(J));null==C&&null!=l&&(C=l[J])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};
+Graph.prototype.replacePlaceholders=function(b,f,l,u){u=[];if(null!=f){for(var y=0;match=this.placeholderPattern.exec(f);){var q=match[0];if(2<q.length&&"%label%"!=q&&"%tooltip%"!=q){var C=null;if(match.index>y&&"%"==f.charAt(match.index-1))C=q.substring(1);else{var J=q.substring(1,q.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==J)C=b.id;else if("width"===J.substring(0,5)&&this.model.isVertex(b)){var D=this.getCellGeometry(b);
+null!=D&&(C=D.width,5<J.length&&(C=Editor.toUnit(C,S[J.substring(6)])))}else if("height"==J.substring(0,6)&&this.model.isVertex(b))D=this.getCellGeometry(b),null!=D&&(C=D.height,6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])));else if("length"==J.substring(0,6)){for(D=b;null!=D&&!this.model.isEdge(D);)D=this.model.getParent(D);D=this.view.getState(D);null!=D&&(C=Math.round(D.length/this.view.scale),6<J.length&&(C=Editor.toUnit(C,S[J.substring(7)])))}else if(0>J.indexOf("{"))for(S=b;null==C&&null!=
+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(C=S.getAttribute(J+"_"+Graph.diagramLanguage)),null==C&&(C=S.hasAttribute(J)?null!=S.getAttribute(J)?S.getAttribute(J):"":null)),S=this.model.getParent(S);null==C&&(C=this.getGlobalVariable(J));null==C&&null!=l&&(C=l[J])}u.push(f.substring(y,match.index)+(null!=C?C:q));y=match.index+q.length}}u.push(f.substring(y))}return u.join("")};
Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var f=[],l=0;l<b.length;l++){var u=this.model.getCell(b[l].id);null!=u&&f.push(u)}this.setSelectionCells(f)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,f){mxEvent.isShiftDown(f)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),J=y.getIndex(q);q=Math.max(u,J);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,J);u<=q;u++){J=this.model.getChildAt(y,u);for(var R=f;R<=b;R++)C.push(this.model.getChildAt(J,R))}0<C.length&&(1<C.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,f){var l=!1;if(this.isTableCell(b)&&this.isTableCell(f)){var u=this.model.getParent(b),y=this.model.getParent(u),q=this.model.getParent(f);if(y==this.model.getParent(q)){b=u.getIndex(b);u=y.getIndex(u);var C=q.getIndex(f),J=y.getIndex(q);q=Math.max(u,J);f=Math.min(b,C);b=Math.max(b,C);C=[];for(u=Math.min(u,J);u<=q;u++){J=this.model.getChildAt(y,u);for(var S=f;S<=b;S++)C.push(this.model.getChildAt(J,S))}0<C.length&&(1<C.length||1<this.getSelectionCount()||
!this.isCellSelected(C[0]))&&(this.setSelectionCells(C),l=!0)}}return l};
Graph.prototype.snapCellsToGrid=function(b,f){this.getModel().beginUpdate();try{for(var l=0;l<b.length;l++){var u=b[l],y=this.getCellGeometry(u);if(null!=y){y=y.clone();if(this.getModel().isVertex(u))y.x=Math.round(y.x/f)*f,y.y=Math.round(y.y/f)*f,y.width=Math.round(y.width/f)*f,y.height=Math.round(y.height/f)*f;else if(this.getModel().isEdge(u)&&null!=y.points)for(var q=0;q<y.points.length;q++)y.points[q].x=Math.round(y.points[q].x/f)*f,y.points[q].y=Math.round(y.points[q].y/f)*f;this.getModel().setGeometry(u,
y)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var f=this.model.getChildCount(b);0<=f;f--)this.model.remove(this.model.getChildAt(b,f))}finally{this.model.endUpdate()}};
@@ -2437,13 +2438,13 @@ Graph.prototype.updateShapes=function(b,f,l){this.model.beginUpdate();try{var u=
this.model.isEdge(b)&&this.model.isEdge(f[q]))if(l){var C=this.model.getStyle(f[q]);if(null!=C){var J=C.split(";");0<J.length&&0>J[0].indexOf("=")&&(J=J.slice(1));this.model.setStyle(f[q],J.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[f[q]]);this.setCellStyles("points",null,[f[q]]);this.pasteStyle(y,[f[q]],null,!0)}else y=this.copyStyle(f[q]),this.model.setStyle(f[q],u),this.pasteStyle(y,[f[q]]);"1"==mxUtils.getValue(this.getCellStyle(f[q],!1),"composite","0")&&this.removeChildCells(f[q])}}finally{this.model.endUpdate()}};
Graph.prototype.selectCellsForConnectVertex=function(b,f,l){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=l&&(mxEvent.isTouchEvent(f)?l.update(l.getState(this.view.getState(b[1]))):l.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=f&&f.constructor==mxStackLayout};
Graph.prototype.insertEdgeBeforeCell=function(b,f){for(var l=f;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=b.parent;)l=this.model.getParent(l);null!=l&&null!=l.parent&&l.parent==b.parent&&(f=l.parent.getIndex(l),this.model.add(l.parent,b,f))};
-Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,J){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var R=this.isCloneConnectSource(b),D=R?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=l):f==
+Graph.prototype.connectVertex=function(b,f,l,u,y,q,C,J){q=q?q:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),D=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(D.geometry.x,D.geometry.y);f==mxConstants.DIRECTION_NORTH?(P.x+=D.geometry.width/2,P.y-=l):f==
mxConstants.DIRECTION_SOUTH?(P.x+=D.geometry.width/2,P.y+=D.geometry.height+l):(P.x=f==mxConstants.DIRECTION_WEST?P.x-l:P.x+(D.geometry.width+l),P.y+=D.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;D=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(D=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(D+P.x*l,g+P.y*l)).grow(40*l);q=null!=q?
this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var H=
-!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;H&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&R){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=K?K:b);Z=R?b:this.getCompositeParent(Z);L=null!=K?K:this.duplicateCells([Z],
-!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ha.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ha.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ha.width/2:P.x+ha.width/2),ha.x=P.x-ha.width/2,ha.y=P.y-ha.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):H&&!R&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&
-mxEvent.isShiftDown(u)&&H||null==n&&R?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&R&&f==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(P,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=J)J(M);else return M});if(null==C||null!=L||!H||null==n&&R)return y(L);C(D+P.x*l,g+P.y*l,y)};
+!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;H&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==C||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=K?K:b);Z=S?b:this.getCompositeParent(Z);L=null!=K?K:this.duplicateCells([Z],
+!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?P.y-=ha.height/2:f==mxConstants.DIRECTION_SOUTH?P.y+=ha.height/2:P.x=f==mxConstants.DIRECTION_WEST?P.x-ha.width/2:P.x+ha.width/2),ha.x=P.x-ha.width/2,ha.y=P.y-ha.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):H&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&
+mxEvent.isShiftDown(u)&&H||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(P,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=J)J(M);else return M});if(null==C||null!=L||!H||null==n&&S)return y(L);C(D+P.x*l,g+P.y*l,y)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};
Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),
null==l&&(l=f.getAttribute("label")||"");return l||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
@@ -2455,8 +2456,8 @@ Graph.prototype.getDefaultColor=function(b,f,l){f="default"+f.charAt(0).toUpperC
Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
Graph.prototype.updateAlternateBounds=function(b,f,l){if(null!=b&&null!=f&&null!=this.layoutManager&&null!=f.alternateBounds){var u=this.layoutManager.getLayout(this.model.getParent(b));null!=u&&u.constructor==mxStackLayout&&(u.horizontal?f.alternateBounds.height=0:f.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};
Graph.prototype.moveCellsTo=function(b,f){if(null!=b&&null!=f){for(var l=!0,u=0;u<b.length&&l;u++)l=l&&this.model.isEdge(b[u]);u=null;if(1==b.length&&l){var y=this.getCellGeometry(b[0]);null!=y&&(u=y.getTerminalPoint(!0))}u=null!=u?u:this.getBoundingBoxFromGeometry(b,l);null!=u&&(l=Math.round(this.snap(f.x)),f=Math.round(this.snap(f.y)),this.cellsMoved(b,l-u.x,f-u.y))}};Graph.prototype.isMoveCellsEvent=function(b,f){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(f.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),J=this.getCellGeometry(l[q]);if(null!=C&&null!=J){var R=0,D=0;if(J.alternateBounds)R=J.width-J.alternateBounds.width,D=J.height-J.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
-R=Math.round(J.width-C.width/P);D=Math.round(J.height-C.height/P)}if(0!=D||0!=R){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,R,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,R,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};
+Graph.prototype.foldCells=function(b,f,l,u,y){f=null!=f?f:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));if(null!=l){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<l.length;q++){var C=this.view.getState(l[q]),J=this.getCellGeometry(l[q]);if(null!=C&&null!=J){var S=0,D=0;if(J.alternateBounds)S=J.width-J.alternateBounds.width,D=J.height-J.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;
+S=Math.round(J.width-C.width/P);D=Math.round(J.height-C.height/P)}if(0!=D||0!=S){var c=this.model.getParent(l[q]),g=this.layoutManager.getLayout(c);null==g?null!=y&&this.isMoveCellsEvent(y,C)&&this.moveSiblings(C,c,S,D):null!=y&&mxEvent.isAltDown(y)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(c,g,S,D)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(l)}};
Graph.prototype.moveSiblings=function(b,f,l,u){this.model.beginUpdate();try{var y=this.getCellsBeyond(b.x,b.y,f,!0,!0);for(f=0;f<y.length;f++)if(y[f]!=b.cell){var q=this.view.getState(y[f]),C=this.getCellGeometry(y[f]);null!=q&&null!=C&&(C=C.clone(),C.translate(Math.round(l*Math.max(0,Math.min(1,(q.x-b.x)/b.width))),Math.round(u*Math.max(0,Math.min(1,(q.y-b.y)/b.height)))),this.model.setGeometry(y[f],C))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,f,l,u){if(null!=this.layoutManager&&null!=f&&f.constructor==mxStackLayout&&!f.resizeLast){this.model.beginUpdate();try{for(var y=f.horizontal;null!=b&&null!=f&&f.constructor==mxStackLayout&&f.horizontal==y&&!f.resizeLast;){var q=this.getCellGeometry(b),C=this.view.getState(b);null!=C&&null!=q&&(q=q.clone(),f.horizontal?q.width+=l+Math.min(0,C.width/this.view.scale-q.width):q.height+=u+Math.min(0,C.height/this.view.scale-q.height),this.model.setGeometry(b,
q));b=this.model.getParent(b);f=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var f=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=f.container:"1"==f.container};Graph.prototype.isCellConnectable=function(b){var f=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=f.connectable?"0"!=f.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
@@ -2497,10 +2498,10 @@ HoverIcons.prototype.click=function(b,f,l){var u=l.getEvent(),y=l.getGraphX(),q=
HoverIcons.prototype.execute=function(b,f,l){l=l.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,f,this.graph.defaultEdgeLength,l,this.graph.isCloneEvent(l),this.graph.isCloneEvent(l)),l,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var f=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(f=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var l=null;null!=f&&(b.x-=f.horizontalOffset/2,b.y-=f.verticalOffset/2,b.width+=f.horizontalOffset,b.height+=f.verticalOffset,null!=f.rotationShape&&null!=f.rotationShape.node&&"hidden"!=f.rotationShape.node.style.visibility&&"none"!=f.rotationShape.node.style.display&&null!=f.rotationShape.boundingBox&&
-(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(J,R,D){if(null!=l){var P=new mxRectangle(R,D,J.clientWidth,J.clientHeight);mxUtils.intersects(P,l)&&(J==this.arrowUp?D-=P.y+P.height-l.y:J==this.arrowRight?R+=l.x+l.width-P.x:J==this.arrowDown?D+=l.y+l.height-P.y:J==this.arrowLeft&&(R-=P.x+P.width-l.x))}J.style.left=R+"px";J.style.top=D+"px";mxUtils.setOpacity(J,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(l=f.rotationShape.boundingBox));f=mxUtils.bind(this,function(J,S,D){if(null!=l){var P=new mxRectangle(S,D,J.clientWidth,J.clientHeight);mxUtils.intersects(P,l)&&(J==this.arrowUp?D-=P.y+P.height-l.y:J==this.arrowRight?S+=l.x+l.width-P.x:J==this.arrowDown?D+=l.y+l.height-P.y:J==this.arrowLeft&&(S-=P.x+P.width-l.x))}J.style.left=S+"px";J.style.top=D+"px";mxUtils.setOpacity(J,this.inactiveOpacity)});f(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));f(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));f(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));f(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){f=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(J,R){var D=this.graph.model.isVertex(J)&&this.graph.getCellGeometry(J);null==J||this.graph.model.isAncestor(J,
-this.currentState.cell)||this.graph.isSwimlane(J)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?R.style.visibility="visible":R.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var u=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),y=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=f&&f==u&&u==y&&y==b&&(b=y=u=f=null);var q=this.graph.getCellGeometry(this.currentState.cell),C=mxUtils.bind(this,function(J,S){var D=this.graph.model.isVertex(J)&&this.graph.getCellGeometry(J);null==J||this.graph.model.isAncestor(J,
+this.currentState.cell)||this.graph.isSwimlane(J)||!(null==D||null==q||D.height<3*q.height&&D.width<3*q.width)?S.style.visibility="visible":S.style.visibility="hidden"});C(f,this.arrowRight);C(u,this.arrowLeft);C(y,this.arrowUp);C(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(f){null!=f.parentNode&&(f=new mxRectangle(f.offsetLeft,f.offsetTop,f.offsetWidth,f.offsetHeight),null==b?b=f:b.add(f))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var f=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(b=f)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
@@ -2510,26 +2511,26 @@ b||null==this.bbox||null==f||null==l||!mxUtils.contains(this.bbox,f,l))&&(null!=
HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};
Graph.prototype.removeTextStyleForCell=function(b,f){var l=this.getCurrentCellStyle(b),u=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(l,"html","0")){var y=this.convertValueToString(b);"0"!=mxUtils.getValue(l,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));y=Editor.convertHtmlToText(y);this.cellLabelChanged(b,y);u=!0}f&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return u};Graph.prototype.createParent=function(b,f,l,u,y){b=this.cloneCell(b);for(var q=0;q<l;q++){var C=this.cloneCell(f),J=this.getCellGeometry(C);null!=J&&(J.x+=q*u,J.y+=q*y);b.insert(C)}return b};
-Graph.prototype.createTable=function(b,f,l,u,y,q,C,J,R){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q:30;J=null!=J?J:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";R=null!=R?R:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,J),this.createVertex(null,null,"",0,0,l,u,R),f,l,0),b,0,u)};
+Graph.prototype.createTable=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:60;u=null!=u?u:40;q=null!=q?q:30;J=null!=J?J:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=y?y:"",0,0,f*l,b*u+(null!=y?q:0),null!=C?C:"shape=table;startSize="+(null!=y?q:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,f*l,u,J),this.createVertex(null,null,"",0,0,l,u,S),f,l,0),b,0,u)};
Graph.prototype.setTableValues=function(b,f,l){for(var u=this.model.getChildCells(b,!0),y=0;y<u.length;y++)if(null!=l&&(u[y].value=l[y]),null!=f)for(var q=this.model.getChildCells(u[y],!0),C=0;C<q.length;C++)null!=f[y][C]&&(q[C].value=f[y][C]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,J,R){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";J=null!=J?J:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-R=null!=R?R:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
-q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,J),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,R),f,l,0),b-1,0,u)):y};
-Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),J=this.getCellStyle(u[y],!0),R=null,D=[],P=0;P<C.length;P++){var c=this.getCellGeometry(C[P]),g={cell:C[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=R?R.point.x:b.x+q.x),c.height+(null!=l&&null!=
-l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[P]&&1<l[P].rowspan?(g.rowspan=l[P].rowspan-1,g.colspan=l[P].colspan,g.actual=l[P].actual):null!=R&&1<R.colspan?(g.rowspan=R.rowspan,g.colspan=R.colspan-1,g.actual=R.actual):(R=this.getCurrentCellStyle(C[P],!0),null!=R&&(g.rowspan=parseInt(R.rowspan||1),g.colspan=parseInt(R.colspan||1)));R=1==mxUtils.getValue(J,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,C.length,
-u.length,b.x+(R?q.x:0),b.y+(R?q.y:0));D.push(g);R=g}l=D}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,J,R,D){f&&q.row<J-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(R,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,f,l,u,y,q,C,J,S){l=null!=l?l:120;u=null!=u?u:120;C=null!=C?C:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";J=null!=J?J:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";y=this.createVertex(null,null,null!=y?y:"",0,0,f*l,b*u,null!=q?q:"shape=table;childLayout=tableLayout;"+(null==y?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");q=mxUtils.getValue(this.getCellStyle(y),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);y.geometry.width+=q;y.geometry.height+=
+q;C=this.createVertex(null,null,"",0,q,f*l+q,u,C);y.insert(this.createParent(C,this.createVertex(null,null,"",q,0,l,u,J),f,l,0));return 1<b?(C.geometry.y=u+q,this.createParent(y,this.createParent(C,this.createVertex(null,null,"",q,0,l,u,S),f,l,0),b-1,0,u)):y};
+Graph.prototype.visitTableCells=function(b,f){var l=null,u=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<u.length;y++){for(var q=this.getActualStartSize(u[y],!0),C=this.model.getChildCells(u[y],!0),J=this.getCellStyle(u[y],!0),S=null,D=[],P=0;P<C.length;P++){var c=this.getCellGeometry(C[P]),g={cell:C[P],rospan:1,colspan:1,row:y,col:P,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;g.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+q.x),c.height+(null!=l&&null!=
+l[0]?l[0].point.y:b.y+q.y));g.actual=g;null!=l&&null!=l[P]&&1<l[P].rowspan?(g.rowspan=l[P].rowspan-1,g.colspan=l[P].colspan,g.actual=l[P].actual):null!=S&&1<S.colspan?(g.rowspan=S.rowspan,g.colspan=S.colspan-1,g.actual=S.actual):(S=this.getCurrentCellStyle(C[P],!0),null!=S&&(g.rowspan=parseInt(S.rowspan||1),g.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(J,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;f(g,C.length,
+u.length,b.x+(S?q.x:0),b.y+(S?q.y:0));D.push(g);S=g}l=D}};Graph.prototype.getTableLines=function(b,f,l){var u=[],y=[];(f||l)&&this.visitTableCells(b,mxUtils.bind(this,function(q,C,J,S,D){f&&q.row<J-1&&(null==u[q.row]&&(u[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&u[q.row].push(null),u[q.row].push(q.point));l&&q.col<C-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,D)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return u.concat(y)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var J=mxUtils.indexOf(C,b);if(J<C.length-1){var R=C[J+1],D=this.getCellGeometry(R);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,u.setGeometry(R,D))}}var P=this.getCellGeometry(q);null!=P&&(l||(l=b==C[C.length-1]),l&&(P=P.clone(),P.height+=f,u.setGeometry(q,P)))}}finally{u.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var J=b==C.length-1;u.beginUpdate();try{for(var R=u.getChildCells(q,!0),D=0;D<R.length;D++){y=R[D];C=u.getChildCells(y,!0);var P=C[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(P,c));b<C.length-1&&(P=C[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
+Graph.prototype.setTableRowHeight=function(b,f,l){l=null!=l?l:!0;var u=this.getModel();u.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=f;u.setGeometry(b,y);var q=u.getParent(b),C=u.getChildCells(q,!0);if(!l){var J=mxUtils.indexOf(C,b);if(J<C.length-1){var S=C[J+1],D=this.getCellGeometry(S);null!=D&&(D=D.clone(),D.y+=f,D.height-=f,u.setGeometry(S,D))}}var P=this.getCellGeometry(q);null!=P&&(l||(l=b==C[C.length-1]),l&&(P=P.clone(),P.height+=f,u.setGeometry(q,P)))}}finally{u.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,f,l){l=null!=l?l:!1;var u=this.getModel(),y=u.getParent(b),q=u.getParent(y),C=u.getChildCells(y,!0);b=mxUtils.indexOf(C,b);var J=b==C.length-1;u.beginUpdate();try{for(var S=u.getChildCells(q,!0),D=0;D<S.length;D++){y=S[D];C=u.getChildCells(y,!0);var P=C[b],c=this.getCellGeometry(P);null!=c&&(c=c.clone(),c.width+=f,null!=c.alternateBounds&&(c.alternateBounds.width+=f),u.setGeometry(P,c));b<C.length-1&&(P=C[b+1],c=this.getCellGeometry(P),null!=c&&(c=c.clone(),
c.x+=f,l||(c.width-=f,null!=c.alternateBounds&&(c.alternateBounds.width-=f)),u.setGeometry(P,c)))}if(J||l){var g=this.getCellGeometry(q);null!=g&&(g=g.clone(),g.width+=f,u.setGeometry(q,g))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{u.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,f){for(var l=0,u=0;u<b.length;u++)if(!this.isVertexIgnored(b[u])){var y=this.graph.getCellGeometry(b[u]);null!=y&&(l+=f?y.width:y.height)}return l};
TableLayout.prototype.getRowLayout=function(b,f){var l=this.graph.model.getChildCells(b,!0),u=this.graph.getActualStartSize(b,!0);b=this.getSize(l,!0);f=f-u.x-u.width;var y=[];u=u.x;for(var q=0;q<l.length;q++){var C=this.graph.getCellGeometry(l[q]);null!=C&&(u+=(null!=C.alternateBounds?C.alternateBounds.width:C.width)*f/b,y.push(Math.round(u)))}return y};
-TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,J=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var R=0;R<q.length;R++){var D=this.graph.getCellGeometry(q[R]);null!=D&&(D=D.clone(),D.y=b.y,D.height=l-b.y-b.height,null!=f?(D.x=f[R],D.width=f[R+1]-D.x,R==q.length-1&&R<f.length-2&&(D.width=u-D.x-b.x-b.width)):(D.x=C,C+=D.width,R==q.length-1?D.width=u-b.x-b.width-J:J+=D.width),D.alternateBounds=new mxRectangle(0,
-0,D.width,D.height),y.setGeometry(q[R],D))}return J};
-TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),J=0;C.beginUpdate();try{for(var R=l.height-f.y-f.height,D=l.width-f.x-f.width,P=C.getChildCells(b,!0),c=0;c<P.length;c++)C.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<R&&0<D&&0<
-P.length&&0<g){if(y){var m=this.graph.getCellGeometry(P[P.length-1]);null!=m&&(m=m.clone(),m.height=R-g+m.height,C.setGeometry(P[P.length-1],m))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)m=this.graph.getCellGeometry(P[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=D,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*R,m.height=Math.round(F)-m.y,C.setGeometry(P[c],m)),J=Math.max(J,this.layoutRow(P[c],n,m.height,D,x));u&&R<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,
+TableLayout.prototype.layoutRow=function(b,f,l,u){var y=this.graph.getModel(),q=y.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var C=b.x,J=0;null!=f&&(f=f.slice(),f.splice(0,0,b.x));for(var S=0;S<q.length;S++){var D=this.graph.getCellGeometry(q[S]);null!=D&&(D=D.clone(),D.y=b.y,D.height=l-b.y-b.height,null!=f?(D.x=f[S],D.width=f[S+1]-D.x,S==q.length-1&&S<f.length-2&&(D.width=u-D.x-b.x-b.width)):(D.x=C,C+=D.width,S==q.length-1?D.width=u-b.x-b.width-J:J+=D.width),D.alternateBounds=new mxRectangle(0,
+0,D.width,D.height),y.setGeometry(q[S],D))}return J};
+TableLayout.prototype.execute=function(b){if(null!=b){var f=this.graph.getActualStartSize(b,!0),l=this.graph.getCellGeometry(b),u=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(u,"resizeLastRow","0"),q="1"==mxUtils.getValue(u,"resizeLast","0");u="1"==mxUtils.getValue(u,"fixedRows","0");var C=this.graph.getModel(),J=0;C.beginUpdate();try{for(var S=l.height-f.y-f.height,D=l.width-f.x-f.width,P=C.getChildCells(b,!0),c=0;c<P.length;c++)C.setVisible(P[c],!0);var g=this.getSize(P,!1);if(0<S&&0<D&&0<
+P.length&&0<g){if(y){var m=this.graph.getCellGeometry(P[P.length-1]);null!=m&&(m=m.clone(),m.height=S-g+m.height,C.setGeometry(P[P.length-1],m))}var n=q?null:this.getRowLayout(P[0],D),x=[],F=f.y;for(c=0;c<P.length;c++)m=this.graph.getCellGeometry(P[c]),null!=m&&(m=m.clone(),m.x=f.x,m.width=D,m.y=Math.round(F),F=y||u?F+m.height:F+m.height/g*S,m.height=Math.round(F)-m.y,C.setGeometry(P[c],m)),J=Math.max(J,this.layoutRow(P[c],n,m.height,D,x));u&&S<g&&(l=l.clone(),l.height=F+f.height,C.setGeometry(b,
l));q&&D<J+Graph.minTableColumnWidth&&(l=l.clone(),l.width=J+f.width+f.x+Graph.minTableColumnWidth,C.setGeometry(b,l));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){C.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=M.width}H.actual.col==H.col&&(M=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=M.height)}}))}else for(c=0;c<P.length;c++)C.setVisible(P[c],
!1)}finally{C.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var f=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,g){g=null!=g?g:!0;var m=this.getState(c);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.style[mxConstants.STYLE_CURVED]&&!m.invalid&&this.updateLineJumps(m)&&this.graph.cellRenderer.redraw(m,!1,this.isRendering());m=f.apply(this,
@@ -2543,8 +2544,8 @@ L.y,M.x,M.y,da.x,da.y)>F)){Z=ba.x-L.x;oa=ba.y-L.y;ba={distSq:Z*Z+oa*oa,x:ba.x,y:
this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)C.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,M=null,L=null,K=[],Z=null;c.begin();for(var ha=0;ha<this.state.routedPoints.length;ha++){var ca=
this.state.routedPoints[ha],aa=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ha?aa=g[0]:ha==this.state.routedPoints.length-1&&(aa=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var da=this.state.routedPoints[ha+1];ca=da.x/this.scale-aa.x;da=da.y/this.scale-aa.y;ca=ca*ca+da*da;null==Z&&(Z=new mxPoint(aa.x-M.x,aa.y-M.y),L=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<L?(Z.x=Z.x*x/L,Z.y=Z.y*x/L):Z=null);ca>x*x&&0<L&&(ca=M.x-aa.x,da=M.y-aa.y,ca=ca*ca+da*da,ca>x*x&&(oa=new mxPoint(aa.x-Z.x,aa.y-Z.y),ca=new mxPoint(aa.x+
Z.x,aa.y+Z.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,H),K=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,H=!1,"sharp"==F?(c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.lineTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+Z.y*K,oa.y-Z.x*K),c.lineTo(oa.x-Z.y*K,oa.y+Z.x*K),c.moveTo(ca.x-Z.y*K,ca.y+Z.x*K),c.lineTo(ca.x+Z.y*K,ca.y-Z.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-Z.y*K,oa.y+Z.x*K,ca.x-Z.y*K,ca.y+Z.x*K,ca.x,ca.y)):(c.moveTo(ca.x,ca.y),H=!0),K=[ca],
-oa=!0))}else Z=null;oa||(K.push(aa),M=aa)}this.addPoints(c,K,m,n,!1,null,H);c.stroke()}};var J=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):J.apply(this,arguments)};var R=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
-"1"!=c.style.snapToPoint)R.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=H){var L=Math.cos(-H),K=Math.sin(-H);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+oa=!0))}else Z=null;oa||(K.push(aa),M=aa)}this.addPoints(c,K,m,n,!1,null,H);c.stroke()}};var J=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):J.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&
+"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=H){var L=Math.cos(-H),K=Math.sin(-H);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
0);x=this.getPerimeterPoint(g,x,0==H&&F,L);0!=H&&(L=Math.cos(H),K=Math.sin(H),x=mxUtils.getRotatedPoint(x,L,K,M));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,m,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,m,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=m=null;if(null!=c)for(var F=0;F<c.length;F++){var H=this.graph.getConnectionPoint(g,c[F]);if(null!=H){var M=(H.x-x.x)*(H.x-x.x)+(H.y-x.y)*(H.y-x.y);if(null==n||M<n)m=H,n=M}}null!=m&&(x=m)}return x};
var D=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,m){var n=D.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=m.state&&(n=m.state.view.graph.replacePlaceholders(m.state.cell,n));return n};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,
8))try{var m=g.substring(8,g.length-1),n=mxUtils.parseXml(Graph.decompress(m));return new mxShape(new mxStencil(n.documentElement))}catch(x){null!=window.console&&console.log("Error in shape: "+x)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};
@@ -2561,153 +2562,153 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(B){return!mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(B){return l.apply(this,arguments)||this.graph.isTableRow(B)||this.graph.isTableCell(B)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
function(B){return u.apply(this,arguments)||this.graph.isEdgeIgnored(B)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(B){return this.graph.isCloneEvent(B)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var B=new mxEllipse(null,this.highlightColor,this.highlightColor,0);B.opacity=mxConstants.HIGHLIGHT_OPACITY;return B};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var Q in this.graph.currentEdgeStyle)B.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var S=this.previous.style.newEdgeStyle;if(null!=S)try{var X=JSON.parse(S);for(Q in X)B.style[Q]=X[Q]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};
-var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),Q=B.getCell;B.getCell=mxUtils.bind(this,function(S){var X=Q.apply(this,arguments);this.error=null;return X});
-return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),S=0;S<Q.length;S++)null!=
-this.currentEdgeStyle[Q[S]]&&(B+=Q[S]+"="+this.currentEdgeStyle[Q[S]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(B){B=this.graph.createCurrentEdgeStyle();B=this.graph.createEdge(null,null,null,null,null,B);B=new mxCellState(this.graph.view,B,this.graph.getCellStyle(B));for(var Q in this.graph.currentEdgeStyle)B.style[Q]=this.graph.currentEdgeStyle[Q];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var X=JSON.parse(R);for(Q in X)B.style[Q]=X[Q]}catch(ia){}}B.style=this.graph.postProcessCellStyle(B.cell,B.style);return B};
+var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var B=q.apply(this,arguments);B.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return B};mxConnectionHandler.prototype.updatePreview=function(B){};var C=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=C.apply(this,arguments),Q=B.getCell;B.getCell=mxUtils.bind(this,function(R){var X=Q.apply(this,arguments);this.error=null;return X});
+return B};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var B="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",Q="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<Q.length;R++)null!=
+this.currentEdgeStyle[Q[R]]&&(B+=Q[R]+"="+this.currentEdgeStyle[Q[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?B+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(B+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?B+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(B+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(B+="elbow="+this.currentEdgeStyle.elbow+";");return B=null!=this.currentEdgeStyle.html?B+("html="+this.currentEdgeStyle.html+";"):B+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var B=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,Q){Q=null!=Q?Q:{};for(var S=0;S<B.length;S++){var X=B[S];Q[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ja=0;ja<ia;ja++)this.createCellLookup([this.model.getChildAt(X,ja)],Q)}return Q};Graph.prototype.createCellMapping=function(B,Q,S){S=null!=S?S:{};for(var X in B){var ia=Q[X];null==S[ia]&&(S[ia]=B[X].getId()||"")}return S};Graph.prototype.importGraphModel=function(B,
-Q,S,X){Q=null!=Q?Q:0;S=null!=S?S:0;var ia=new mxCodec(B.ownerDocument),ja=new mxGraphModel;ia.decode(B,ja);B=[];ia={};var pa={},xa=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=this.createCellLookup([ja.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<xa.length;ja++)ua=this.model.getChildren(this.moveCells([xa[ja]],Q,S,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=
-ja.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,Q,S,!1,this.getDefaultParent()),pa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),X)){this.isGridEnabled()&&(Q=this.snap(Q),S=this.snap(S));var Ka=this.getBoundingBoxFromGeometry(B,!0);null!=Ka&&this.moveCells(B,Q-Ka.x,S-Ka.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var Q={},S=this.cloneCells(B,null,Q),X=
-new mxDictionary,ia=0;ia<B.length;ia++)X.put(B[ia],!0);var ja=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<S.length;ia++){pa.add(xa,S[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(S[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==X.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
-this.createCellLookup(B)),S);return ja.encode(pa)};Graph.prototype.isSwimlane=function(B,Q){var S=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(S=this.getCurrentCellStyle(B,Q)[mxConstants.STYLE_SHAPE]);return S==mxConstants.SHAPE_SWIMLANE||"table"==S||"tableRow"==S};var J=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&J.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):
-!0:!1};var R=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&R.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var Q=this.model.getParent(B);if(null!=Q){var S=this.getCurrentCellStyle(Q);if(null!=S.expand)return"0"!=S.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(B,Q,S,X,ia,ja,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ja,pa,null,!0,!1));S=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
-Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}S=P.apply(this,[B,Q,S,X,ia,ja,pa,xa]);this.model.setValue(S,"");var Ta=this.getChildCells(S,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(S,!1);
-if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[S]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[S]))}}finally{this.model.endUpdate()}return S};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,Q,S){if(Q||S)c.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ja=[],pa=
+B&&(new mxCodec(B.ownerDocument)).decode(B,this.getStylesheet())};Graph.prototype.createCellLookup=function(B,Q){Q=null!=Q?Q:{};for(var R=0;R<B.length;R++){var X=B[R];Q[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ja=0;ja<ia;ja++)this.createCellLookup([this.model.getChildAt(X,ja)],Q)}return Q};Graph.prototype.createCellMapping=function(B,Q,R){R=null!=R?R:{};for(var X in B){var ia=Q[X];null==R[ia]&&(R[ia]=B[X].getId()||"")}return R};Graph.prototype.importGraphModel=function(B,
+Q,R,X){Q=null!=Q?Q:0;R=null!=R?R:0;var ia=new mxCodec(B.ownerDocument),ja=new mxGraphModel;ia.decode(B,ja);B=[];ia={};var pa={},xa=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ra=this.createCellLookup([ja.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<xa.length;ja++)ua=this.model.getChildren(this.moveCells([xa[ja]],Q,R,!1,this.model.getRoot())[0]),null!=ua&&(B=B.concat(ua));else{var ua=
+ja.getChildren(xa[0]);null!=ua&&(B=this.moveCells(ua,Q,R,!1,this.getDefaultParent()),pa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=B&&(this.createCellMapping(ia,ra,pa),this.updateCustomLinks(pa,B),X)){this.isGridEnabled()&&(Q=this.snap(Q),R=this.snap(R));var Ka=this.getBoundingBoxFromGeometry(B,!0);null!=Ka&&this.moveCells(B,Q-Ka.x,R-Ka.y)}}finally{this.model.endUpdate()}}return B};Graph.prototype.encodeCells=function(B){for(var Q={},R=this.cloneCells(B,null,Q),X=
+new mxDictionary,ia=0;ia<B.length;ia++)X.put(B[ia],!0);var ja=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ra=this.view.getState(B[ia]);if(null!=ra){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(B[ia])&&null==X.get(this.model.getParent(B[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ra.x/ra.view.scale-ra.view.translate.x,ua.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(Q,
+this.createCellLookup(B)),R);return ja.encode(pa)};Graph.prototype.isSwimlane=function(B,Q){var R=null;null==B||this.model.isEdge(B)||this.model.getParent(B)==this.model.getRoot()||(R=this.getCurrentCellStyle(B,Q)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var J=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(B){return null!=B&&J.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellEditable(this.model.getParent(B)):
+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(B){return null!=B&&S.apply(this,arguments)?this.isTableCell(B)||this.isTableRow(B)?this.isCellMovable(this.model.getParent(B)):!0:!1};var D=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(B){var Q=this.model.getParent(B);if(null!=Q){var R=this.getCurrentCellStyle(Q);if(null!=R.expand)return"0"!=R.expand}return D.apply(this,arguments)&&(null==Q||!this.isTable(Q))};var P=Graph.prototype.splitEdge;
+Graph.prototype.splitEdge=function(B,Q,R,X,ia,ja,pa,xa){null==xa&&(xa=this.model.getParent(B),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ja,pa,null,!0,!1));R=null;this.model.beginUpdate();try{var ra=this.getCellGeometry(B);if(null!=ra&&null!=ra.points&&0<ra.points.length&&1==Q.length&&this.model.isVertex(Q[0])){var ua=this.getCellGeometry(Q[0]);if(null!=ua&&!ua.relative){var Ka=new mxRectangle(ua.x+X,ua.y+ia,ua.width,ua.height),Va=ra.points;ua=[];for(var Oa=0;Oa<Va.length;Oa++)Ka.intersectsPoint(Va[Oa].x,
+Va[Oa].y)||ua.push(Va[Oa]);ua.length<Va.length&&(ra=ra.clone(),ra.points=ua,this.model.setGeometry(B,ra))}}R=P.apply(this,[B,Q,R,X,ia,ja,pa,xa]);this.model.setValue(R,"");var Ta=this.getChildCells(R,!0);for(Oa=0;Oa<Ta.length;Oa++)ra=this.getCellGeometry(Ta[Oa]),null!=ra&&ra.relative&&0<ra.x&&this.model.remove(Ta[Oa]);var Za=this.getChildCells(B,!0);for(Oa=0;Oa<Za.length;Oa++)ra=this.getCellGeometry(Za[Oa]),null!=ra&&ra.relative&&0>=ra.x&&this.model.remove(Za[Oa]);var Pa=this.model.getTerminal(R,!1);
+if(null!=Pa){var Ra=this.getCurrentCellStyle(Pa);null!=Ra&&"1"==Ra.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[B]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(B,Q,R){if(Q||R)c.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ja=[],pa=
mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ja.push(xa),xa==X)ia=ja.length-1;else if(B&&null==X&&0<ja.length||null!=ia&&B&&ja.length>ia||!B&&0<ia)return;for(var ra=0;ra<this.model.getChildCount(xa);ra++)pa(this.model.getChildAt(xa,ra))});pa(this.model.root);0<ja.length&&(ia=null!=ia?mxUtils.mod(ia+(B?1:-1),ja.length):0,this.setSelectionCell(ja[ia]))}};Graph.prototype.swapShapes=function(B,Q){if(this.model.isVertex(B)&&this.model.isVertex(Q)&&
-2==this.getMovableCells([B,Q]).length){var S=this.getCellGeometry(B),X=this.getCellGeometry(Q);if(null!=S&&null!=X){var ia=S.clone(),ja=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-S.width/2,ia.y=X.getCenterY()-S.height/2,ja.x=S.getCenterX()-X.width/2,ja.y=S.getCenterY()-X.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(Q,ja)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,Q,S,X,ia,ja,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=
+2==this.getMovableCells([B,Q]).length){var R=this.getCellGeometry(B),X=this.getCellGeometry(Q);if(null!=R&&null!=X){var ia=R.clone(),ja=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-R.width/2,ia.y=X.getCenterY()-R.height/2,ja.x=R.getCenterX()-X.width/2,ja.y=R.getCenterY()-X.height/2,this.model.setGeometry(B,ia),this.model.setGeometry(Q,ja)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(B,Q,R,X,ia,ja,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=
[],ra=0;ra<B.length;ra++)this.isTable(B[ra])?xa=xa.concat(this.model.getChildCells(B[ra],!0).reverse()):xa.push(B[ra]);B=xa}this.model.beginUpdate();try{xa=[];for(ra=0;ra<B.length;ra++)if(null!=ia&&this.isTableRow(B[ra])){var ua=this.model.getParent(B[ra]),Ka=this.getCellGeometry(B[ra]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ka&&this.isTable(ua)&&this.isTable(ia)&&(X||ua!=ia)){if(!X){var Va=this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ka.height,this.model.setGeometry(ua,
Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ka.height,this.model.setGeometry(ia,Va));var Oa=this.model.getChildCells(ia,!0);if(0<Oa.length){B[ra]=X?this.cloneCell(B[ra]):B[ra];var Ta=this.model.getChildCells(B[ra],!0),Za=this.model.getChildCells(Oa[0],!0),Pa=Za.length-Ta.length;if(0<Pa)for(var Ra=0;Ra<Pa;Ra++){var fb=this.cloneCell(Ta[Ta.length-1]);null!=fb&&(fb.value="",this.model.add(B[ra],fb))}else if(0>Pa)for(Ra=0;Ra>Pa;Ra--)this.model.remove(Ta[Ta.length+Ra-1]);Ta=this.model.getChildCells(B[ra],
!0);for(Ra=0;Ra<Za.length;Ra++){var eb=this.getCellGeometry(Za[Ra]),bb=this.getCellGeometry(Ta[Ra]);null!=eb&&null!=bb&&(bb=bb.clone(),bb.width=eb.width,this.model.setGeometry(Ta[Ra],bb))}}}}var db=g.apply(this,arguments);for(ra=0;ra<xa.length;ra++)!X&&this.model.contains(xa[ra])&&0==this.model.getChildCount(xa[ra])&&this.model.remove(xa[ra]);X&&this.updateCustomLinks(this.createCellMapping(pa,this.createCellLookup(B)),db)}finally{this.model.endUpdate()}return db};var m=Graph.prototype.removeCells;
-Graph.prototype.removeCells=function(B,Q){var S=[];this.model.beginUpdate();try{for(var X=0;X<B.length;X++)if(this.isTableCell(B[X])){var ia=this.model.getParent(B[X]),ja=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(S,ja)&&S.push(ja):this.labelChanged(B[X],"")}else{if(this.isTableRow(B[X])&&(ja=this.model.getParent(B[X]),0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(S,ja))){for(var pa=this.model.getChildCells(ja,
-!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&S.push(ja)}S.push(B[X])}S=m.apply(this,[S,Q])}finally{this.model.endUpdate()}return S};Graph.prototype.updateCustomLinks=function(B,Q,S){S=null!=S?S:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&S.updateCustomLinksForCell(B,Q[X],S)};Graph.prototype.updateCustomLinksForCell=function(B,Q){this.doUpdateCustomLinksForCell(B,Q);for(var S=this.model.getChildCount(Q),X=0;X<S;X++)this.updateCustomLinksForCell(B,this.model.getChildAt(Q,
-X))};Graph.prototype.doUpdateCustomLinksForCell=function(B,Q){};Graph.prototype.getAllConnectionConstraints=function(B,Q){if(null!=B){Q=mxUtils.getValue(B.style,"points",null);if(null!=Q){B=[];try{var S=JSON.parse(Q);for(Q=0;Q<S.length;Q++){var X=S[Q];B.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ja){}return B}if(null!=B.shape&&null!=B.shape.bounds){X=B.shape.direction;Q=B.shape.bounds;var ia=B.shape.scale;S=Q.width/
-ia;Q=Q.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=S,S=Q,Q=X;Q=B.shape.getConstraints(B.style,S,Q);if(null!=Q)return Q;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var Q=this.getCurrentCellStyle(B);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
-mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[B])}};Graph.prototype.isValidRoot=function(B){for(var Q=this.model.getChildCount(B),S=0,X=0;X<Q;X++){var ia=this.model.getChildAt(B,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||S++)}return 0<S||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,Q,S){for(var X=this.getCurrentCellStyle(B),ia=!0,ja=!0,pa=0;pa<Q.length&&ja;pa++)ia=ia&&this.isTable(Q[pa]),
-ja=ja&&this.isTableRow(Q[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,Q,S)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ja||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var Q=
-mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=B&&null!=this.layoutManager){var S=this.model.getParent(B);null!=S&&(S=this.layoutManager.getLayout(S),null!=S&&S.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(B,Q,S){S=null!=S?S:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,S&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
-function(B,Q){var S=this.getModel(),X=[];S.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ja=B[ia];if(S.isEdge(ja)){var pa=S.getTerminal(ja,!0),xa=S.getTerminal(ja,!1);S.setTerminal(ja,xa,!0);S.setTerminal(ja,pa,!1);var ra=S.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);S.setGeometry(ja,ra);var Va=this.view.getState(ja),Oa=this.view.getState(pa),Ta=
+Graph.prototype.removeCells=function(B,Q){var R=[];this.model.beginUpdate();try{for(var X=0;X<B.length;X++)if(this.isTableCell(B[X])){var ia=this.model.getParent(B[X]),ja=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja)&&R.push(ja):this.labelChanged(B[X],"")}else{if(this.isTableRow(B[X])&&(ja=this.model.getParent(B[X]),0>mxUtils.indexOf(B,ja)&&0>mxUtils.indexOf(R,ja))){for(var pa=this.model.getChildCells(ja,
+!0),xa=0,ra=0;ra<pa.length;ra++)0<=mxUtils.indexOf(B,pa[ra])&&xa++;xa==pa.length&&R.push(ja)}R.push(B[X])}R=m.apply(this,[R,Q])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(B,Q,R){R=null!=R?R:new Graph;for(var X=0;X<Q.length;X++)null!=Q[X]&&R.updateCustomLinksForCell(B,Q[X],R)};Graph.prototype.updateCustomLinksForCell=function(B,Q){this.doUpdateCustomLinksForCell(B,Q);for(var R=this.model.getChildCount(Q),X=0;X<R;X++)this.updateCustomLinksForCell(B,this.model.getChildAt(Q,
+X))};Graph.prototype.doUpdateCustomLinksForCell=function(B,Q){};Graph.prototype.getAllConnectionConstraints=function(B,Q){if(null!=B){Q=mxUtils.getValue(B.style,"points",null);if(null!=Q){B=[];try{var R=JSON.parse(Q);for(Q=0;Q<R.length;Q++){var X=R[Q];B.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ja){}return B}if(null!=B.shape&&null!=B.shape.bounds){X=B.shape.direction;Q=B.shape.bounds;var ia=B.shape.scale;R=Q.width/
+ia;Q=Q.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=R,R=Q,Q=X;Q=B.shape.getConstraints(B.style,R,Q);if(null!=Q)return Q;if(null!=B.shape.stencil&&null!=B.shape.stencil.constraints)return B.shape.stencil.constraints;if(null!=B.shape.constraints)return B.shape.constraints}}return null};Graph.prototype.flipEdge=function(B){if(null!=B){var Q=this.getCurrentCellStyle(B);Q=mxUtils.getValue(Q,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?
+mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,Q,[B])}};Graph.prototype.isValidRoot=function(B){for(var Q=this.model.getChildCount(B),R=0,X=0;X<Q;X++){var ia=this.model.getChildAt(B,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(B)};Graph.prototype.isValidDropTarget=function(B,Q,R){for(var X=this.getCurrentCellStyle(B),ia=!0,ja=!0,pa=0;pa<Q.length&&ja;pa++)ia=ia&&this.isTable(Q[pa]),
+ja=ja&&this.isTableRow(Q[pa]);return!this.isCellLocked(B)&&(this.isTargetShape(B,Q,R)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(B))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(B))&&!this.isTableRow(B)&&(!this.isTable(B)||ja||ia))};Graph.prototype.createGroupCell=function(){var B=mxGraph.prototype.createGroupCell.apply(this,arguments);B.setStyle("group");return B};Graph.prototype.isExtendParentsOnAdd=function(B){var Q=
+mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(Q&&null!=B&&null!=this.layoutManager){var R=this.model.getParent(B);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(Q=!1))}return Q};Graph.prototype.getPreferredSizeForCell=function(B,Q,R){R=null!=R?R:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=10,X.height+=4,R&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=
+function(B,Q){var R=this.getModel(),X=[];R.beginUpdate();try{for(var ia=0;ia<B.length;ia++){var ja=B[ia];if(R.isEdge(ja)){var pa=R.getTerminal(ja,!0),xa=R.getTerminal(ja,!1);R.setTerminal(ja,xa,!0);R.setTerminal(ja,pa,!1);var ra=R.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ua=ra.getTerminalPoint(!0),Ka=ra.getTerminalPoint(!1);ra.setTerminalPoint(ua,!1);ra.setTerminalPoint(Ka,!0);R.setGeometry(ja,ra);var Va=this.view.getState(ja),Oa=this.view.getState(pa),Ta=
this.view.getState(xa);if(null!=Va){var Za=null!=Oa?this.getConnectionConstraint(Va,Oa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ja,pa,!0,Pa);this.setConnectionConstraint(ja,xa,!1,Za);var Ra=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-Ra,[ja])}X.push(ja)}}else if(S.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;S.setGeometry(ja,ra)}var eb=this.view.getState(ja);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
-mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ja])}X.push(ja)}}}finally{S.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof
-mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var Q=B.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var S=this.view.getState(Q);null!=S&&null!=S.shape&&(this.view.invalidate(Q),S.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};
-Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var Q=0;Q<B.length;Q++){var S=this.view.getState(B[Q]);null!=S&&null!=S.shape&&null!=S.shape.stencil&&this.stencilHasPlaceholders(S.shape.stencil)?this.removeStateForCell(B[Q]):this.isReplacePlaceholders(B[Q])&&this.view.invalidate(B[Q],!1,!1)}};Graph.prototype.replaceElement=function(B,Q){Q=B.ownerDocument.createElement(null!=Q?Q:"span");for(var S=Array.prototype.slice.call(B.attributes);attr=
-S.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=B.innerHTML;B.parentNode.replaceChild(Q,B)};Graph.prototype.processElements=function(B,Q){if(null!=B){B=B.getElementsByTagName("*");for(var S=0;S<B.length;S++)null!=B[S]&&Q(B[S])}};Graph.prototype.updateLabelElements=function(B,Q,S){B=null!=B?B:this.getSelectionCells();for(var X=document.createElement("div"),ia=0;ia<B.length;ia++){var ja=this.getCurrentCellStyle(B[ia]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(B[ia]),
-null!=ja&&0<ja.length)){X.innerHTML=Graph.sanitizeHtml(ja);for(var pa=X.getElementsByTagName(null!=S?S:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ja&&this.cellLabelChanged(B[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,Q,S){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var X=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||
+Ra,[ja])}X.push(ja)}}else if(R.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;R.setGeometry(ja,ra)}var eb=this.view.getState(ja);if(null!=eb){var bb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(eb.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,db)+(Q?-1:1),bb.length)],[ja])}X.push(ja)}}}finally{R.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(B){if(null!=B&&null!=B.fgNode)for(B=B.fgNode.firstChild;null!=B;){if("text"==B.nodeName&&"1"==B.getAttribute("placeholders"))return!0;B=B.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(B){if(B instanceof
+mxGeometryChange&&(this.isTableCell(B.cell)||this.isTableRow(B.cell))&&(null==B.previous&&null!=B.geometry||null!=B.previous&&!B.previous.equals(B.geometry))){var Q=B.cell;this.isTableCell(Q)&&(Q=this.model.getParent(Q));this.isTableRow(Q)&&(Q=this.model.getParent(Q));var R=this.view.getState(Q);null!=R&&null!=R.shape&&(this.view.invalidate(Q),R.shape.bounds=null)}n.apply(this,arguments);B instanceof mxValueChange&&null!=B.cell&&null!=B.cell.value&&"object"==typeof B.cell.value&&this.invalidateDescendantsWithPlaceholders(B.cell)};
+Graph.prototype.invalidateDescendantsWithPlaceholders=function(B){B=this.model.getDescendants(B);if(0<B.length)for(var Q=0;Q<B.length;Q++){var R=this.view.getState(B[Q]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(B[Q]):this.isReplacePlaceholders(B[Q])&&this.view.invalidate(B[Q],!1,!1)}};Graph.prototype.replaceElement=function(B,Q){Q=B.ownerDocument.createElement(null!=Q?Q:"span");for(var R=Array.prototype.slice.call(B.attributes);attr=
+R.pop();)Q.setAttribute(attr.nodeName,attr.nodeValue);Q.innerHTML=B.innerHTML;B.parentNode.replaceChild(Q,B)};Graph.prototype.processElements=function(B,Q){if(null!=B){B=B.getElementsByTagName("*");for(var R=0;R<B.length;R++)null!=B[R]&&Q(B[R])}};Graph.prototype.updateLabelElements=function(B,Q,R){B=null!=B?B:this.getSelectionCells();for(var X=document.createElement("div"),ia=0;ia<B.length;ia++){var ja=this.getCurrentCellStyle(B[ia]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(B[ia]),
+null!=ja&&0<ja.length)){X.innerHTML=Graph.sanitizeHtml(ja);for(var pa=X.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)Q(pa[xa]);X.innerHTML!=ja&&this.cellLabelChanged(B[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(B,Q,R){Q=Graph.zapGremlins(Q);this.model.beginUpdate();try{if(null!=B.value&&"object"==typeof B.value){if(this.isReplacePlaceholders(B)&&null!=B.getAttribute("placeholder"))for(var X=B.getAttribute("placeholder"),ia=B;null!=ia;){if(ia==this.model.getRoot()||
null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(X)){this.setAttributeForCell(ia,X,Q);break}ia=this.model.getParent(ia)}var ja=B.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,Q):ja.setAttribute("label",Q);Q=ja}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(B){if(null!=B){for(var Q=new mxDictionary,
-S=0;S<B.length;S++)Q.put(B[S],!0);var X=[];for(S=0;S<B.length;S++){var ia=this.model.getParent(B[S]);null==ia||Q.get(ia)||(Q.put(ia,!0),X.push(ia))}for(S=0;S<X.length;S++)if(ia=this.view.getState(X[S]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ja=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&ja;pa++)Q.get(this.model.getChildAt(ia.cell,pa))||(ja=!1);ja&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var Q=[],S=0;S<B.length;S++)this.isCellDeletable(B[S])&&this.isTransparentState(this.view.getState(B[S]))&&Q.push(B[S]);B=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,Q){this.setAttributeForCell(B,"link",Q)};Graph.prototype.setTooltipForCell=function(B,Q){var S="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(S="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,S,Q)};Graph.prototype.getAttributeForCell=function(B,Q,S){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(Q):null;return null!=B?B:S};Graph.prototype.setAttributeForCell=function(B,Q,S){if(null!=B.value&&"object"==typeof B.value)var X=B.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",B.value||"");null!=S?X.setAttribute(Q,S):X.removeAttribute(Q);
-this.model.setValue(B,X)};Graph.prototype.isTargetShape=function(B,Q,S){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(S=0;S<Q.length;S++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[S]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,Q,S,X){if(mxEvent.isAltDown(Q))return null;for(var ia=0;ia<B.length;ia++){var ja=this.model.getParent(B[ia]);if(this.model.isEdge(ja)&&
+R=0;R<B.length;R++)Q.put(B[R],!0);var X=[];for(R=0;R<B.length;R++){var ia=this.model.getParent(B[R]);null==ia||Q.get(ia)||(Q.put(ia,!0),X.push(ia))}for(R=0;R<X.length;R++)if(ia=this.view.getState(X[R]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ja=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&ja;pa++)Q.get(this.model.getChildAt(ia.cell,pa))||(ja=!1);ja&&B.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(B){for(var Q=[],R=0;R<B.length;R++)this.isCellDeletable(B[R])&&this.isTransparentState(this.view.getState(B[R]))&&Q.push(B[R]);B=Q;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(B,Q){this.setAttributeForCell(B,"link",Q)};Graph.prototype.setTooltipForCell=function(B,Q){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(B.value)&&B.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(B,R,Q)};Graph.prototype.getAttributeForCell=function(B,Q,R){B=null!=B.value&&"object"===typeof B.value?B.value.getAttribute(Q):null;return null!=B?B:R};Graph.prototype.setAttributeForCell=function(B,Q,R){if(null!=B.value&&"object"==typeof B.value)var X=B.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",B.value||"");null!=R?X.setAttribute(Q,R):X.removeAttribute(Q);
+this.model.setValue(B,X)};Graph.prototype.isTargetShape=function(B,Q,R){B=mxUtils.getValue(this.getCurrentCellStyle(B),mxConstants.STYLE_SHAPE,"");for(R=0;R<Q.length;R++){var X=mxUtils.getValue(this.getCurrentCellStyle(Q[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,B))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(B,Q,R,X){if(mxEvent.isAltDown(Q))return null;for(var ia=0;ia<B.length;ia++){var ja=this.model.getParent(B[ia]);if(this.model.isEdge(ja)&&
0>mxUtils.indexOf(B,ja))return null}ja=x.apply(this,arguments);var pa=!0;for(ia=0;ia<B.length&&pa;ia++)pa=pa&&this.isTableRow(B[ia]);pa&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||(ja=null));return ja};Graph.prototype.click=function(B){mxGraph.prototype.click.call(this,B);this.firstClickState=B.getState();this.firstClickSource=B.getSource()};Graph.prototype.dblClick=function(B,Q){this.isEnabled()&&(Q=this.insertTextForEvent(B,
-Q),mxGraph.prototype.dblClick.call(this,B,Q))};Graph.prototype.insertTextForEvent=function(B,Q){var S=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ia=mxEvent.getSource(B);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,S.x,S.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(B)))||
-(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(S.x,S.y))),Q=this.addText(S.x,S.y,X))}return Q};Graph.prototype.getInsertPoint=function(){var B=this.getGridSize(),Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,S=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
-ia=this.getPageSize();Q=Math.max(Q,X.x*ia.width);S=Math.max(S,X.y*ia.height)}return new mxPoint(this.snap(Q+B),this.snap(S+B))};Graph.prototype.getFreeInsertPoint=function(){var B=this.view,Q=this.getGraphBounds(),S=this.getInsertPoint(),X=this.snap(Math.round(Math.max(S.x,Q.x/B.scale-B.translate.x+(0==Q.width?2*this.gridSize:0))));B=this.snap(Math.round(Math.max(S.y,(Q.y+Q.height)/B.scale-B.translate.y+2*this.gridSize)));return new mxPoint(X,B)};Graph.prototype.getCenterInsertPoint=function(B){B=
+Q),mxGraph.prototype.dblClick.call(this,B,Q))};Graph.prototype.insertTextForEvent=function(B,Q){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(B),mxEvent.getClientY(B));if(null!=B&&!this.model.isVertex(Q)){var X=this.model.isEdge(Q)?this.view.getState(Q):null,ia=mxEvent.getSource(B);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(B)))||
+(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(R.x,R.y))),Q=this.addText(R.x,R.y,X))}return Q};Graph.prototype.getInsertPoint=function(B){B=this.getGridSize();var Q=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),
+ia=this.getPageSize();Q=Math.max(Q,X.x*ia.width);R=Math.max(R,X.y*ia.height)}return new mxPoint(this.snap(Q+B),this.snap(R+B))};Graph.prototype.getFreeInsertPoint=function(B){var Q=this.view,R=this.getGraphBounds(),X=this.getInsertPoint(B);B=this.snap(Math.round(Math.max(X.x,R.x/Q.scale-Q.translate.x+(0==R.width?2*this.gridSize:0))));Q=this.snap(Math.round(Math.max(X.y,(R.y+R.height)/Q.scale-Q.translate.y+2*this.gridSize)));return new mxPoint(B,Q)};Graph.prototype.getCenterInsertPoint=function(B){B=
null!=B?B:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-B.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-B.width/2)),this.snap(Math.round(this.container.clientHeight/
-2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,Q){B=null!=B?B:"";null!=Q&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+Q+";");return B};Graph.prototype.addText=function(B,Q,S){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=S&&this.model.isEdge(S.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(S,B,Q);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(S,X.geometry);var ja=this.view.scale;X.geometry.offset=new mxPoint(Math.round((B-ia.x)/ja),Math.round((Q-ia.y)/ja))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
-40,X.geometry.height=20,X.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=S?S.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ia.y-(null!=S?S.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=S?S.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(B,Q,S){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
+2/this.view.scale-this.view.translate.y-B.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(B,Q){B=null!=B?B:"";null!=Q&&(0<B.length&&";"!=B.charAt(B.length-1)&&(B+=";"),B+="fontSize="+Q+";");return B};Graph.prototype.addText=function(B,Q,R){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){X.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(R,B,Q);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,X.geometry);var ja=this.view.scale;X.geometry.offset=new mxPoint(Math.round((B-ia.x)/ja),Math.round((Q-ia.y)/ja))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),X.geometry.width=
+40,X.geometry.height=20,X.geometry.x=Math.round(B/this.view.scale)-ia.x-(null!=R?R.origin.x:0),X.geometry.y=Math.round(Q/this.view.scale)-ia.y-(null!=R?R.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(B,Q,R){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
if(null!=ra)for(var ua=0;ua<ra.length;ua++){var Ka=this.getAbsoluteUrl(ra[ua].getAttribute("href"));null!=Ka&&(ra[ua].setAttribute("rel",this.linkRelation),ra[ua].setAttribute("href",Ka),null!=Q&&mxEvent.addGestureListeners(ra[ua],null,null,Q))}});this.model.addListener(mxEvent.CHANGE,X);X();var ia=this.container.style.cursor,ja=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=B&&""!=B&&B!=mxConstants.NONE?new mxCellHighlight(pa,B,4):null,startX:0,
startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ua=ra.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ra=pa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ka,Va,Oa){return null==pa.getLinkForCell(Ka.cell)}),ua=null==ua||pa.model.isAncestor(ra,ua.cell)?pa.view.getState(ra):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ua){this.startX=
ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ra,ua){if(pa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ra>ja||ua>ja)&&this.clear());else{for(ra=ua.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;
null!=ra?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ra,ua){var Ka=ua.getSource();for(ra=ua.getEvent();null!=Ka&&"a"!=Ka.nodeName.toLowerCase();)Ka=Ka.parentNode;null==Ka&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<
ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ka=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ka||null==Q||Q(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:
-mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=S&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&Math.abs(this.startX-ua.getGraphX())<ja&&Math.abs(this.startY-ua.getGraphY())<ja&&S(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
+mxEvent.isMiddleMouseButton(ra)?"_blank":Ka?pa.linkTarget:"_top",pa.openLink(this.currentLink,ra),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-pa.container.scrollTop)<ja&&Math.abs(this.startX-ua.getGraphX())<ja&&Math.abs(this.startY-ua.getGraphY())<ja&&R(ua.getEvent()));this.clear()},activate:function(ra){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=pa.getLinkTargetForCell(ra.cell),
pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ra){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ra){xa.clear()})};Graph.prototype.duplicateCells=function(B,Q){B=null!=B?B:this.getSelectionCells();
-Q=null!=Q?Q:!0;for(var S=0;S<B.length;S++)this.isTableCell(B[S])&&(B[S]=this.model.getParent(B[S]));B=this.model.getTopmostCells(B);var X=this.getModel(),ia=this.gridSize,ja=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(S=0;S<B.length;S++){var ua=X.getParent(B[S]);if(null!=ua){var Ka=this.moveCells([ra[S]],ia,ia,!1)[0];ja.push(Ka);if(Q)X.add(ua,ra[S]);else{var Va=ua.getIndex(B[S]);X.add(ua,ra[S],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[S]),
-Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ja.push(ra[S])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ja};Graph.prototype.insertImage=function(B,Q,S){if(null!=B&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ja=0;ja<X.length;ja++)ia.push(X[ja]);document.execCommand("insertimage",
-!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ja=B.length-1;0<=ja;ja--)if(0==ja||B[ja]!=ia[ja-1]){B[ja].setAttribute("width",Q);B[ja].setAttribute("height",S);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),S=[],X=0;X<Q.length;X++)S.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(B));
-Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==S.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=S[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(S=Q[0].parentNode;null!=Q[0].firstChild;)S.insertBefore(Q[0].firstChild,Q[0]);S.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),S=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&
-!this.isTableRow(B)&&(Q||"0"!=mxUtils.getValue(S,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==S[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,Q,S){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ia=null,ja=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ja=null!=ja?Math.min(ja,ua):ua;S&&(pa+=B?ra.width:ra.height);
-X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});S&&(pa-=B?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ja=ja/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ia-ja-pa)/(X.length-1),Va=ja+(S?B?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
-Oa&&(Ta=Ta.clone(),B?Ta.x=Math.round(Va-(S?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(S?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));S&&(Va+=B?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(S,X,ia){X.setAttribute("data-cell-id",S.id);if(ia)if(mxUtils.isNode(S.value))for(ia=
-0;ia<S.value.attributes.length;ia++){var ja=S.value.attributes[ia];X.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof S.value)for(ja in S.value)X.setAttribute("data-cell-"+ja,S.value[ja]);else null!=S.value&&X.setAttribute("data-cell-value",S.value);return X};var Q=B.visitStatesRecursive;B.visitStatesRecursive=function(S,X,ia){if(null!=S){var ja=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(S.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
-Editor.addSvgMetadata);ja.appendChild(X.root);Q.apply(this,arguments);X.root=ja}};B.getLinkForCellState=mxUtils.bind(this,function(S,X){return this.getLinkForCell(S.cell)});B.getTitleForCellState=mxUtils.bind(this,function(S,X){return Editor.convertHtmlToText(this.convertValueToTooltip(S.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var Q=null;null!=B&&0<B.length&&(B=JSON.parse(B),Q=new mxImage(B.src,B.width,B.height));return Q};Graph.prototype.getBackgroundImageObject=function(B){return B};
-Graph.prototype.getSvg=function(B,Q,S,X,ia,ja,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ia=0;ia<Ta.length;ia++)Ra.put(Ta[ia],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;S=null!=S?S:0;ja=null!=ja?ja:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ja&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
-this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*S)+(ua&&0==S?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*S)+(ua&&0==S?5:0),gb=mxUtils.getLightDarkColor(B),qb=
-Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=B){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(S/Q-eb.x/mb),Math.floor(S/Q-eb.y/mb));ob.idPrefix=
+Q=null!=Q?Q:!0;for(var R=0;R<B.length;R++)this.isTableCell(B[R])&&(B[R]=this.model.getParent(B[R]));B=this.model.getTopmostCells(B);var X=this.getModel(),ia=this.gridSize,ja=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(B),ra=this.cloneCells(B,!1,pa,!0);for(R=0;R<B.length;R++){var ua=X.getParent(B[R]);if(null!=ua){var Ka=this.moveCells([ra[R]],ia,ia,!1)[0];ja.push(Ka);if(Q)X.add(ua,ra[R]);else{var Va=ua.getIndex(B[R]);X.add(ua,ra[R],Va+1)}if(this.isTable(ua)){var Oa=this.getCellGeometry(ra[R]),
+Ta=this.getCellGeometry(ua);null!=Oa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Oa.height,X.setGeometry(ua,Ta))}}else ja.push(ra[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return ja};Graph.prototype.insertImage=function(B,Q,R){if(null!=B&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=[],ja=0;ja<X.length;ja++)ia.push(X[ja]);document.execCommand("insertimage",
+!1,B);B=this.cellEditor.textarea.getElementsByTagName("img");if(B.length==ia.length+1)for(ja=B.length-1;0<=ja;ja--)if(0==ja||B[ja]!=ia[ja-1]){B[ja].setAttribute("width",Q);B[ja].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(B){if(null!=this.cellEditor.textarea)if(0==B.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var Q=this.cellEditor.textarea.getElementsByTagName("a"),R=[],X=0;X<Q.length;X++)R.push(Q[X]);document.execCommand("createlink",!1,mxUtils.trim(B));
+Q=this.cellEditor.textarea.getElementsByTagName("a");if(Q.length==R.length+1)for(X=Q.length-1;0<=X;X--)if(Q[X]!=R[X-1]){for(Q=Q[X].getElementsByTagName("a");0<Q.length;){for(R=Q[0].parentNode;null!=Q[0].firstChild;)R.insertBefore(Q[0].firstChild,Q[0]);R.removeChild(Q[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(B))};Graph.prototype.isCellResizable=function(B){var Q=mxGraph.prototype.isCellResizable.apply(this,arguments),R=this.getCurrentCellStyle(B);return!this.isTableCell(B)&&
+!this.isTableRow(B)&&(Q||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(B,Q,R){null==Q&&(Q=this.getSelectionCells());if(null!=Q&&1<Q.length){for(var X=[],ia=null,ja=null,pa=0,xa=0;xa<Q.length;xa++)if(this.getModel().isVertex(Q[xa])){var ra=this.view.getState(Q[xa]);if(null!=ra){var ua=B?ra.getCenterX():ra.getCenterY();ia=null!=ia?Math.max(ia,ua):ua;ja=null!=ja?Math.min(ja,ua):ua;R&&(pa+=B?ra.width:ra.height);
+X.push(ra)}}if(2<X.length){X.sort(function(Za,Pa){return B?Za.x-Pa.x:Za.y-Pa.y});R&&(pa-=B?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ra=this.view.translate;ua=this.view.scale;ja=ja/ua-(B?ra.x:ra.y);ia=ia/ua-(B?ra.x:ra.y);this.getModel().beginUpdate();try{var Ka=(ia-ja-pa)/(X.length-1),Va=ja+(R?B?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Oa=this.view.getState(this.model.getParent(X[xa].cell)),Ta=this.getCellGeometry(X[xa].cell);Va+=Ka;null!=Ta&&null!=
+Oa&&(Ta=Ta.clone(),B?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Oa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Oa.origin.y,this.getModel().setGeometry(X[xa].cell,Ta));R&&(Va+=B?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return Q};Graph.prototype.isCloneEvent=function(B){return mxClient.IS_MAC&&mxEvent.isMetaDown(B)||mxEvent.isControlDown(B)};Graph.prototype.createSvgImageExport=function(B){B=new mxImageExport;B.addCellData=function(R,X,ia){X.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=
+0;ia<R.value.attributes.length;ia++){var ja=R.value.attributes[ia];X.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof R.value)for(ja in R.value)X.setAttribute("data-cell-"+ja,R.value[ja]);else null!=R.value&&X.setAttribute("data-cell-value",R.value);return X};var Q=B.visitStatesRecursive;B.visitStatesRecursive=function(R,X,ia){if(null!=R){var ja=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),
+Editor.addSvgMetadata);ja.appendChild(X.root);Q.apply(this,arguments);X.root=ja}};B.getLinkForCellState=mxUtils.bind(this,function(R,X){return this.getLinkForCell(R.cell)});B.getTitleForCellState=mxUtils.bind(this,function(R,X){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return B};Graph.prototype.parseBackgroundImage=function(B){var Q=null;null!=B&&0<B.length&&(B=JSON.parse(B),Q=new mxImage(B.src,B.width,B.height));return Q};Graph.prototype.getBackgroundImageObject=function(B){return B};
+Graph.prototype.getSvg=function(B,Q,R,X,ia,ja,pa,xa,ra,ua,Ka,Va,Oa,Ta,Za,Pa){var Ra=null;if(null!=Ta)for(Ra=new mxDictionary,ia=0;ia<Ta.length;ia++)Ra.put(Ta[ia],!0);Ta=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{Q=null!=Q?Q:1;R=null!=R?R:0;ja=null!=ja?ja:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var eb="page"==Oa?this.view.getBackgroundPageBounds():ja&&null==Ra||X||"diagram"==Oa?this.getGraphBounds():
+this.getBoundingBox(this.getSelectionCells()),bb=this.backgroundImage,db=this.view.translate,mb=this.view.scale;"diagram"==Oa&&null!=bb&&null!=bb.width&&null!=bb.height&&(eb=mxRectangle.fromRectangle(eb),eb.add(new mxRectangle((db.x+bb.x)*mb,(db.y+bb.y)*mb,bb.width*mb,bb.height*mb)));if(null==eb)throw Error(mxResources.get("drawingEmpty"));X=Q/mb;var lb=Math.max(1,Math.ceil(eb.width*X)+2*R)+(ua&&0==R?5:0),pb=Math.max(1,Math.ceil(eb.height*X)+2*R)+(ua&&0==R?5:0),gb=mxUtils.getLightDarkColor(B),qb=
+Graph.createSvgNode(0,0,lb,pb,gb),ub=qb.ownerDocument;if(null!=B){var hb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"rect");hb.setAttribute("fill",gb.light);hb.style.fill=gb.cssText;hb.setAttribute("width","100%");hb.setAttribute("height","100%");hb.setAttribute("x","0");hb.setAttribute("y","0");qb.appendChild(hb)}var nb=mxUtils.createElementNs(ub,mxConstants.NS_SVG,"g");qb.appendChild(nb);var ob=this.createSvgCanvas(nb);ob.translate(Math.floor(R/Q-eb.x/mb),Math.floor(R/Q-eb.y/mb));ob.idPrefix=
"drawio-svg-"+Editor.guid();var rb=document.createElement("div"),vb=ob.getAlternateText;ob.getAlternateText=function(jb,Bb,tb,xb,zb,sb,Db,d,p,A,t,z,E){if(null!=sb&&0<this.state.fontSize)try{mxUtils.isNode(sb)?sb=sb.innerText:(rb.innerHTML=sb,sb=mxUtils.extractTextWithWhitespace(rb.childNodes));for(var G=Math.ceil(2*xb/this.state.fontSize),ea=[],O=0,ta=0;(0==G||O<G)&&ta<sb.length;){var ma=sb.charCodeAt(ta);if(10==ma||13==ma){if(0<O)break}else ea.push(sb.charAt(ta)),255>ma&&O++;ta++}ea.length<sb.length&&
1<sb.length-ea.length&&(sb=mxUtils.trim(ea.join(""))+"...");return sb}catch(ab){return vb.apply(this,arguments)}else return vb.apply(this,arguments)};if(null!=bb&&null!=bb.width&&null!=bb.height){B=mb/Q;var Ab=new mxRectangle((bb.x+db.x)*B,(bb.y+db.y)*B,bb.width*B,bb.height*B);mxUtils.intersects(eb,Ab)&&ob.image(bb.x+db.x,bb.y+db.y,bb.width,bb.height,bb.src,!0)}ob.scale(X);ob.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var Cb=xa.getLinkForCellState;xa.getLinkForCellState=function(jb,
Bb){var tb=jb.view.graph.getAbsoluteUrl(Cb.apply(this,arguments));return null==tb||jb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(jb,Bb){return jb.view.graph.getLinkTargetForCell(jb.cell)};var Eb=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"+Editor.guid();var jb=null!=ub.createElementNS?ub.createElementNS(mxConstants.NS_SVG,"style"):ub.createElement("style");jb.innerHTML=this.createFlowAnimationCss(yb);ub.getElementsByTagName("defs")[0].appendChild(jb)}return yb});
xa.drawCellState=function(jb,Bb){for(var tb=jb.view.graph,xb=null!=Ra?Ra.get(jb.cell):tb.isCellSelected(jb.cell),zb=tb.model.getParent(jb.cell);!(ja&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):tb.isCellSelected(zb),zb=tb.model.getParent(zb);if(null!=jb.shape)try{var sb=jb.shape.isFlowAnimationEnabled,Db=jb.shape.addFlowAnimationToShape;jb.shape.isFlowAnimationEnabled=function(){return fb&&tb.model.isEdge(jb.cell)&&"1"==mxUtils.getValue(jb.style,"flowAnimation","0")};jb.shape.addFlowAnimationToShape=
function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),jb.style,Q,wb())};if(ja&&null==Ra||xb)tb.view.redrawEnumerationState(jb),Eb.apply(this,arguments),this.doDrawShape(jb.secondLabel,Bb)}finally{jb.shape.isFlowAnimationEnabled=sb,jb.shape.addFlowAnimationToShape=Db}};var kb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(kb),ob);this.addForeignObjectWarning(ob,qb);Pa?this.disableSvgLinks(qb):this.updateSvgLinks(qb,ra,!0);return qb}finally{this.enableFlowAnimation=
-fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var S=B.createElement("switch"),X=B.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
-(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);S.appendChild(X);ia.appendChild(B);S.appendChild(ia);Q.appendChild(S)}};
-Graph.prototype.disableSvgLinks=function(B,Q){B=B.getElementsByTagName("a");for(var S=0;S<B.length;S++){var X=B[S].getAttribute("href");null==X&&(X=B[S].getAttribute("xlink:href"));null!=X&&(B[S].style.pointerEvents="none",B[S].setAttribute("href",""));Q&&Q(B[S])}};Graph.prototype.updateSvgLinks=function(B,Q,S){B=B.getElementsByTagName("a");for(var X=0;X<B.length;X++)if(null==B[X].getAttribute("target")){var ia=B[X].getAttribute("href");null==ia&&(ia=B[X].getAttribute("xlink:href"));null!=ia&&(null!=
-Q&&/^https?:\/\//.test(ia)?B[X].setAttribute("target",Q):S&&this.isCustomLink(ia)&&B[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(B=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,Q,S){for(;null!=B&&B.nodeName!=Q;){if(B==S)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,Q,S){for(;null!=B&&!(0<=mxUtils.indexOf(Q,B.nodeName));){if(B==S)return null;
-B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var S=document.createRange();S.selectNode(B);Q.removeAllRanges();Q.addRange(S)}}else(Q=document.selection)&&"Control"!=Q.type&&(B=Q.createRange(),B.collapse(!0),S=Q.createRange(),S.setEndPoint("StartToStart",B),S.select())};Graph.prototype.flipEdgePoints=function(B,Q,S){var X=this.getCellGeometry(B);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=
-0;ia<X.points.length;ia++)Q?X.points[ia].x=S+(S-X.points[ia].x):X.points[ia].y=S+(S-X.points[ia].y);ia=function(ja){null!=ja&&(Q?ja.x=S+(S-ja.x):ja.y=S+(S-ja.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(B,X)}};Graph.prototype.flipChildren=function(B,Q,S){this.model.beginUpdate();try{for(var X=this.model.getChildCount(B),ia=0;ia<X;ia++){var ja=this.model.getChildAt(B,ia);if(this.model.isEdge(ja))this.flipEdgePoints(ja,Q,S);else{var pa=this.getCellGeometry(ja);null!=
-pa&&(pa=pa.clone(),Q?pa.x=S+(S-pa.x-pa.width):pa.y=S+(S-pa.y-pa.height),this.model.setGeometry(ja,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,Q){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var S=[],X=0;X<B.length;X++)if(this.model.isEdge(B[X])){var ia=this.view.getState(B[X]);null!=ia&&this.flipEdgePoints(B[X],Q,(Q?ia.getCenterX():ia.getCenterY())/this.view.scale-(Q?ia.origin.x:ia.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ja=
-this.getCellGeometry(B[X]);null!=ja&&this.flipChildren(B[X],Q,Q?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);S.push(B[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,S)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,Q){var S=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var X=0;X<B.length;X++){var ia=this.model.getParent(B[X]);if(this.isTable(ia)){var ja=this.getCellGeometry(B[X]),pa=this.getCellGeometry(ia);null!=ja&&null!=pa&&
-(pa=pa.clone(),pa.height-=ja.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(B):null;this.removeCells(B,Q)}finally{this.model.endUpdate()}if(null!=xa)for(S=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&S.push(xa[X])}return S};Graph.prototype.insertTableColumn=function(B,Q){var S=this.getModel();S.beginUpdate();try{var X=B,ia=0;if(this.isTableCell(B)){var ja=S.getParent(B);X=S.getParent(ja);
-ia=mxUtils.indexOf(S.getChildCells(ja,!0),B)}else this.isTableRow(B)?X=S.getParent(B):B=S.getChildCells(X,!0)[0],Q||(ia=S.getChildCells(B,!0).length-1);var pa=S.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=S.getChildCells(pa[B],!0)[ia],ua=S.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
-Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ka.height=Va.height)}S.add(pa[B],ua,ia+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,S.setGeometry(X,Oa))}finally{S.endUpdate()}};Graph.prototype.deleteLane=function(B){var Q=this.getModel();Q.beginUpdate();try{var S=null;S="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:Q.getParent(B);var X=Q.getChildCells(S,!0);0==
-X.length?Q.remove(S):(S==B&&(B=X[X.length-1]),Q.remove(B))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(B,Q){var S=this.getModel();S.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){X=B;var ia=S.getChildCells(X,!0);B=ia[Q?0:ia.length-1]}else X=S.getParent(B);var ja=X.getIndex(B);B=S.cloneCell(B,!1);B.value=null;S.add(X,B,ja+(Q?0:1))}finally{S.endUpdate()}};Graph.prototype.insertTableRow=function(B,Q){var S=this.getModel();S.beginUpdate();try{var X=
-B,ia=B;if(this.isTableCell(B))ia=S.getParent(B),X=S.getParent(ia);else if(this.isTableRow(B))X=S.getParent(B);else{var ja=S.getChildCells(X,!0);ia=ja[Q?0:ja.length-1]}var pa=S.getChildCells(ia,!0),xa=X.getIndex(ia);ia=S.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ja=0;ja<pa.length;ja++){B=S.cloneCell(pa[ja],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&
-(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}S.add(X,ia,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,S.setGeometry(X,Ka))}}finally{S.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var Q=this.getModel();Q.beginUpdate();try{var S=B,X=B;this.isTableCell(B)&&(X=Q.getParent(B));this.isTableRow(X)&&(S=Q.getParent(X));var ia=Q.getChildCells(S,!0);if(0==ia.length)Q.remove(S);
-else{this.isTableRow(X)||(X=ia[0]);var ja=Q.getChildCells(X,!0);if(1>=ja.length)Q.remove(S);else{var pa=ja.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ja,B));for(X=B=0;X<ia.length;X++){var xa=Q.getChildCells(ia[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(S);null!=ua&&(ua=ua.clone(),ua.width-=B,Q.setGeometry(S,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var Q=this.getModel();Q.beginUpdate();
-try{var S=B,X=B;this.isTableCell(B)&&(B=X=Q.getParent(B));this.isTableRow(B)&&(S=Q.getParent(X));var ia=Q.getChildCells(S,!0);if(1>=ia.length)Q.remove(S);else{this.isTableRow(X)||(X=ia[ia.length-1]);Q.remove(X);B=0;var ja=this.getCellGeometry(X);null!=ja&&(B=ja.height);var pa=this.getCellGeometry(S);null!=pa&&(pa=pa.clone(),pa.height-=B,Q.setGeometry(S,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(B,Q){for(var S=B.tBodies[0],X=S.rows[0].cells,ia=B=0;ia<X.length;ia++){var ja=X[ia].getAttribute("colspan");
-B+=null!=ja?parseInt(ja):1}Q=S.insertRow(Q);for(ia=0;ia<B;ia++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(B,Q){B.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(B,Q){var S=B.tHead;if(null!=S)for(var X=0;X<S.rows.length;X++){var ia=document.createElement("th");S.rows[X].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(S=0;S<B.rows.length;S++)X=B.rows[S].insertCell(Q),mxUtils.br(X);return B.rows[0].cells[0<=Q?Q:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
-function(B,Q){if(0<=Q){B=B.tBodies[0].rows;for(var S=0;S<B.length;S++)B[S].cells.length>Q&&B[S].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var S=document.createElement("div");S.innerHTML=B;B=document.createDocumentFragment();for(var X;X=S.firstChild;)lastNode=B.appendChild(X);Q.insertNode(B)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(B)};
-Graph.prototype.createLinkForHint=function(B,Q,S){function X(ja,pa){ja.length>pa&&(ja=ja.substring(0,Math.round(pa/2))+"..."+ja.substring(ja.length-Math.round(pa/4)));return ja}B=null!=B?B:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",X(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&
-ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(Q,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(B,S);mxEvent.consume(ja)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,pa){this.popupMenuHandler.hideMenu()});var B=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=
-B.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var pa=this.getCellAt(ja.graphX,ja.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(pa),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var Q=!1,S=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ja,
-pa,xa){ja==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),S=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
-!X&&!xa&&(S&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
+fb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(B,Q){if("0"!=urlParams["svg-warning"]&&0<Q.getElementsByTagName("foreignObject").length){var R=B.createElement("switch"),X=B.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=B.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||Q.ownerDocument!=document&&null==document.documentMode?
+(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));B=B.createElement("text");B.setAttribute("text-anchor","middle");B.setAttribute("font-size","10px");B.setAttribute("x","50%");B.setAttribute("y","100%");mxUtils.write(B,Graph.foreignObjectWarningText);R.appendChild(X);ia.appendChild(B);R.appendChild(ia);Q.appendChild(R)}};
+Graph.prototype.disableSvgLinks=function(B,Q){B=B.getElementsByTagName("a");for(var R=0;R<B.length;R++){var X=B[R].getAttribute("href");null==X&&(X=B[R].getAttribute("xlink:href"));null!=X&&(B[R].style.pointerEvents="none",B[R].setAttribute("href",""));Q&&Q(B[R])}};Graph.prototype.updateSvgLinks=function(B,Q,R){B=B.getElementsByTagName("a");for(var X=0;X<B.length;X++)if(null==B[X].getAttribute("target")){var ia=B[X].getAttribute("href");null==ia&&(ia=B[X].getAttribute("xlink:href"));null!=ia&&(null!=
+Q&&/^https?:\/\//.test(ia)?B[X].setAttribute("target",Q):R&&this.isCustomLink(ia)&&B[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(B){B=new mxSvgCanvas2D(B);B.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;B.adaptiveColors=this.getAdaptiveColors();B.pointerEvents=!0;return B};Graph.prototype.getSelectedElement=function(){var B=null;if(window.getSelection){var Q=window.getSelection();Q.getRangeAt&&Q.rangeCount&&(B=Q.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(B=document.selection.createRange().parentElement());return B};Graph.prototype.getSelectedEditingElement=function(){var B=null;if(null!=this.cellEditor.textarea)for(B=this.getSelectedElement();null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.parentNode;return B};Graph.prototype.getParentByName=function(B,Q,R){for(;null!=B&&B.nodeName!=Q;){if(B==R)return null;B=B.parentNode}return B};Graph.prototype.getParentByNames=function(B,Q,R){for(;null!=B&&!(0<=mxUtils.indexOf(Q,B.nodeName));){if(B==R)return null;
+B=B.parentNode}return B};Graph.prototype.selectNode=function(B){var Q=null;if(window.getSelection){if(Q=window.getSelection(),Q.getRangeAt&&Q.rangeCount){var R=document.createRange();R.selectNode(B);Q.removeAllRanges();Q.addRange(R)}}else(Q=document.selection)&&"Control"!=Q.type&&(B=Q.createRange(),B.collapse(!0),R=Q.createRange(),R.setEndPoint("StartToStart",B),R.select())};Graph.prototype.flipEdgePoints=function(B,Q,R){var X=this.getCellGeometry(B);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=
+0;ia<X.points.length;ia++)Q?X.points[ia].x=R+(R-X.points[ia].x):X.points[ia].y=R+(R-X.points[ia].y);ia=function(ja){null!=ja&&(Q?ja.x=R+(R-ja.x):ja.y=R+(R-ja.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(B,X)}};Graph.prototype.flipChildren=function(B,Q,R){this.model.beginUpdate();try{for(var X=this.model.getChildCount(B),ia=0;ia<X;ia++){var ja=this.model.getChildAt(B,ia);if(this.model.isEdge(ja))this.flipEdgePoints(ja,Q,R);else{var pa=this.getCellGeometry(ja);null!=
+pa&&(pa=pa.clone(),Q?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ja,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(B,Q){this.model.beginUpdate();try{B=this.model.getTopmostCells(B);for(var R=[],X=0;X<B.length;X++)if(this.model.isEdge(B[X])){var ia=this.view.getState(B[X]);null!=ia&&this.flipEdgePoints(B[X],Q,(Q?ia.getCenterX():ia.getCenterY())/this.view.scale-(Q?ia.origin.x:ia.origin.y)-(Q?this.view.translate.x:this.view.translate.y))}else{var ja=
+this.getCellGeometry(B[X]);null!=ja&&this.flipChildren(B[X],Q,Q?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);R.push(B[X])}this.toggleCellStyles(Q?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(B,Q){var R=null;if(null!=B&&0<B.length){this.model.beginUpdate();try{for(var X=0;X<B.length;X++){var ia=this.model.getParent(B[X]);if(this.isTable(ia)){var ja=this.getCellGeometry(B[X]),pa=this.getCellGeometry(ia);null!=ja&&null!=pa&&
+(pa=pa.clone(),pa.height-=ja.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(B):null;this.removeCells(B,Q)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&R.push(xa[X])}return R};Graph.prototype.insertTableColumn=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=B,ia=0;if(this.isTableCell(B)){var ja=R.getParent(B);X=R.getParent(ja);
+ia=mxUtils.indexOf(R.getChildCells(ja,!0),B)}else this.isTableRow(B)?X=R.getParent(B):B=R.getChildCells(X,!0)[0],Q||(ia=R.getChildCells(B,!0).length-1);var pa=R.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(B=0;B<pa.length;B++){var ra=R.getChildCells(pa[B],!0)[ia],ua=R.cloneCell(ra,!1);null==ua&&(ua=this.createVertex());var Ka=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ka){null!=Ka.alternateBounds&&(Ka.width=
+Ka.alternateBounds.width,Ka.height=Ka.alternateBounds.height,Ka.alternateBounds=null);xa=Ka.width;var Va=this.getCellGeometry(pa[B]);null!=Va&&(Ka.height=Va.height)}R.add(pa[B],ua,ia+(Q?0:1))}var Oa=this.getCellGeometry(X);null!=Oa&&(Oa=Oa.clone(),Oa.width+=xa,R.setGeometry(X,Oa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(B).childLayout?B:Q.getParent(B);var X=Q.getChildCells(R,!0);0==
+X.length?Q.remove(R):(R==B&&(B=X[X.length-1]),Q.remove(B))}finally{Q.endUpdate()}};Graph.prototype.insertLane=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(B).childLayout){X=B;var ia=R.getChildCells(X,!0);B=ia[Q?0:ia.length-1]}else X=R.getParent(B);var ja=X.getIndex(B);B=R.cloneCell(B,!1);B.value=null;R.add(X,B,ja+(Q?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(B,Q){var R=this.getModel();R.beginUpdate();try{var X=
+B,ia=B;if(this.isTableCell(B))ia=R.getParent(B),X=R.getParent(ia);else if(this.isTableRow(B))X=R.getParent(B);else{var ja=R.getChildCells(X,!0);ia=ja[Q?0:ja.length-1]}var pa=R.getChildCells(ia,!0),xa=X.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ra=this.getCellGeometry(ia);if(null!=ra){for(ja=0;ja<pa.length;ja++){B=R.cloneCell(pa[ja],!1);B.value=null;B.style=mxUtils.setStyle(mxUtils.setStyle(B.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(B);null!=ua&&(null!=ua.alternateBounds&&
+(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ra.height);ia.insert(B)}R.add(X,ia,xa+(Q?0:1));var Ka=this.getCellGeometry(X);null!=Ka&&(Ka=Ka.clone(),Ka.height+=ra.height,R.setGeometry(X,Ka))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(B){var Q=this.getModel();Q.beginUpdate();try{var R=B,X=B;this.isTableCell(B)&&(X=Q.getParent(B));this.isTableRow(X)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(0==ia.length)Q.remove(R);
+else{this.isTableRow(X)||(X=ia[0]);var ja=Q.getChildCells(X,!0);if(1>=ja.length)Q.remove(R);else{var pa=ja.length-1;this.isTableCell(B)&&(pa=mxUtils.indexOf(ja,B));for(X=B=0;X<ia.length;X++){var xa=Q.getChildCells(ia[X],!0)[pa];Q.remove(xa);var ra=this.getCellGeometry(xa);null!=ra&&(B=Math.max(B,ra.width))}var ua=this.getCellGeometry(R);null!=ua&&(ua=ua.clone(),ua.width-=B,Q.setGeometry(R,ua))}}}finally{Q.endUpdate()}};Graph.prototype.deleteTableRow=function(B){var Q=this.getModel();Q.beginUpdate();
+try{var R=B,X=B;this.isTableCell(B)&&(B=X=Q.getParent(B));this.isTableRow(B)&&(R=Q.getParent(X));var ia=Q.getChildCells(R,!0);if(1>=ia.length)Q.remove(R);else{this.isTableRow(X)||(X=ia[ia.length-1]);Q.remove(X);B=0;var ja=this.getCellGeometry(X);null!=ja&&(B=ja.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=B,Q.setGeometry(R,pa))}}finally{Q.endUpdate()}};Graph.prototype.insertRow=function(B,Q){for(var R=B.tBodies[0],X=R.rows[0].cells,ia=B=0;ia<X.length;ia++){var ja=X[ia].getAttribute("colspan");
+B+=null!=ja?parseInt(ja):1}Q=R.insertRow(Q);for(ia=0;ia<B;ia++)mxUtils.br(Q.insertCell(-1));return Q.cells[0]};Graph.prototype.deleteRow=function(B,Q){B.tBodies[0].deleteRow(Q)};Graph.prototype.insertColumn=function(B,Q){var R=B.tHead;if(null!=R)for(var X=0;X<R.rows.length;X++){var ia=document.createElement("th");R.rows[X].appendChild(ia);mxUtils.br(ia)}B=B.tBodies[0];for(R=0;R<B.rows.length;R++)X=B.rows[R].insertCell(Q),mxUtils.br(X);return B.rows[0].cells[0<=Q?Q:B.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
+function(B,Q){if(0<=Q){B=B.tBodies[0].rows;for(var R=0;R<B.length;R++)B[R].cells.length>Q&&B[R].deleteCell(Q)}};Graph.prototype.pasteHtmlAtCaret=function(B){if(window.getSelection){var Q=window.getSelection();if(Q.getRangeAt&&Q.rangeCount){Q=Q.getRangeAt(0);Q.deleteContents();var R=document.createElement("div");R.innerHTML=B;B=document.createDocumentFragment();for(var X;X=R.firstChild;)lastNode=B.appendChild(X);Q.insertNode(B)}}else(Q=document.selection)&&"Control"!=Q.type&&Q.createRange().pasteHTML(B)};
+Graph.prototype.createLinkForHint=function(B,Q,R){function X(ja,pa){ja.length>pa&&(ja=ja.substring(0,Math.round(pa/2))+"..."+ja.substring(ja.length-Math.round(pa/4)));return ja}B=null!=B?B:"javascript:void(0);";if(null==Q||0==Q.length)Q=this.isCustomLink(B)?this.getLinkTitle(B):B;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(B));ia.setAttribute("title",X(this.isCustomLink(B)?this.getLinkTitle(B):B,80));null!=this.linkTarget&&
+ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(Q,40));this.isCustomLink(B)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(B,R);mxEvent.consume(ja)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,pa){this.popupMenuHandler.hideMenu()});var B=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=
+B.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var pa=this.getCellAt(ja.graphX,ja.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(pa),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var Q=!1,R=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ja,
+pa,xa){ja==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),Q=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||
+!X&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||Q&&this.isCellSelected(pa.getCell())));xa=!Q||xa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()&&this.isTouchPopupMenuEnabled()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ra,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,pa,xa])}})};Graph.prototype.isTouchPopupMenuEnabled=function(){return!0};
mxCellEditor.prototype.isContentEditing=function(){var B=this.graph.view.getState(this.editingCell);return null!=B&&1==B.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var B="";window.getSelection?B=window.getSelection():document.getSelection?B=document.getSelection():document.selection&&(B=document.selection.createRange().text);return""!=
-B};mxCellEditor.prototype.insertTab=function(B){var Q=this.textarea.ownerDocument.defaultView.getSelection(),S=Q.getRangeAt(0);B=Graph.createTabNode(B);S.insertNode(B);S.setStartAfter(B);S.setEndAfter(B);Q.removeAllRanges();Q.addRange(S)};mxCellEditor.prototype.alignText=function(B,Q){var S=this.graph.getView().getState(this.editingCell);if(null!=S){S=mxUtils.getValue(S.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=S&&"vertical-"==S.substring(0,9),ia=null!=
+B};mxCellEditor.prototype.insertTab=function(B){var Q=this.textarea.ownerDocument.defaultView.getSelection(),R=Q.getRangeAt(0);B=Graph.createTabNode(B);R.insertNode(B);R.setStartAfter(B);R.setEndAfter(B);Q.removeAllRanges();Q.addRange(R)};mxCellEditor.prototype.alignText=function(B,Q){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=R&&"vertical-"==R.substring(0,9),ia=null!=
Q&&mxEvent.isShiftDown(Q);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ja=!0;this.graph.processElements(this.textarea,function(pa){ia||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ja=!1});(ja||X)&&this.graph.cellEditor.setAlign(B)}X||document.execCommand("justify"+B.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var B=window.getSelection();if(B.getRangeAt&&B.rangeCount){for(var Q=
-[],S=0,X=B.rangeCount;S<X;++S)Q.push(B.getRangeAt(S));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,S=B.length;Q<S;++Q)sel.addRange(B[Q])}else document.selection&&B.select&&B.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
+[],R=0,X=B.rangeCount;R<X;++R)Q.push(B.getRangeAt(R));return Q}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(B){try{if(B)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var Q=0,R=B.length;Q<R;++Q)sel.addRange(B[Q])}else document.selection&&B.select&&B.select()}catch(X){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
function(B){null!=B.text&&(B.text.replaceLinefeeds="0"!=mxUtils.getValue(B.style,"nl2Br","1"));F.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(B,Q){this.isKeepFocusEvent(B)||!mxEvent.isAltDown(B.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(B){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(B,Q){B=this.graph.getStartEditingCell(B,Q);M.apply(this,arguments);var S=this.graph.view.getState(B);this.textarea.className=null!=S&&1==S.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);
-if(null!=B){var Q=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),S=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+mxCellEditor.prototype.startEditing=function(B,Q){B=this.graph.getStartEditingCell(B,Q);M.apply(this,arguments);var R=this.graph.view.getState(B);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(B)};mxCellEditor.prototype.toggleViewMode=function(){var B=this.graph.view.getState(this.editingCell);
+if(null!=B){var Q=null!=B&&"0"!=mxUtils.getValue(B.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(B.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
Q=mxUtils.getValue(B.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
pa.push("underline");(mxUtils.getValue(B.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=
Q;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText=
"");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(Q?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
-this.switchSelectionState=S;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,Q){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var S=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*S;this.bounds.height=60*S;var X=null!=B.text?B.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,
-mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/S)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/S)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/S)+(this.textarea.offsetHeight-
-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*S);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/S)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*S);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+S+","+
-S+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,Q){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var S=this.graph.getEditingValue(B.cell,Q);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(S=S.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(S,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
+this.switchSelectionState=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(B,Q){if(null!=this.textarea)if(B=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=B){var R=B.view.scale;this.bounds=mxRectangle.fromRectangle(B);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var X=null!=B.text?B.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(B.style,mxConstants.STYLE_ALIGN,
+mxConstants.ALIGN_CENTER),mxUtils.getValue(B.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-
+this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+
+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(B,Q){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var R=this.graph.getEditingValue(B.cell,Q);"1"==mxUtils.getValue(B.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;
mxCellEditor.prototype.setEditingValue=function(B,Q){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(B.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(B){if("0"==mxUtils.getValue(B.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,
Graph.backupStyleAttribute);var Q=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(B.style,"nl2Br","1")?(Q=Q.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<Q.length&&("<br/>"==Q.substring(Q.length-5)||"<br>"==Q.substring(Q.length-4))&&(Q=Q.substring(0,Q.lastIndexOf("<br"))+"<div><br/></div>")):Q=Q.replace(/\r\n/g,"").replace(/\n/g,"");return Q};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(B){this.codeViewMode&&this.toggleViewMode();K.apply(this,
arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(B,Q){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==Q&&this.graph.isCellDeletable(B.cell)&&0==this.graph.model.getChildCount(B.cell)&&this.graph.isTransparentState(B)&&this.graph.removeCells([B.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getBorderColor=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);B==mxConstants.NONE&&(B=null);return B};mxCellEditor.prototype.getMinimumSize=function(B){var Q=this.graph.getView().scale;return new mxRectangle(0,0,null==B.text?30:B.text.size*Q+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(B,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,S=this.graph.view.scale;B=this.roundLength((this.bounds.x+
-this.currentDx)/S-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/S-Q.y);S=this.graph.view.unit;this.hint.innerHTML=f(B,S)+", "+f(Q,S);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
-var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,Q){ha.apply(this,arguments);var S=this.graph.getCellStyle(B);if(null==S.childLayout){var X=this.graph.model.getParent(B),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(S=this.graph.getCellStyle(X),"stackLayout"==S.childLayout)){var ja=parseFloat(mxUtils.getValue(S,"stackBorder",mxStackLayout.prototype.border));S="1"==mxUtils.getValue(S,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
-ia=ia.clone();S?ia.height=Q.height+pa.y+pa.height+2*ja:ia.width=Q.width+pa.x+pa.width+2*ja;this.graph.model.setGeometry(X,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){S.get(xa)||(S.put(xa,!0),ia.push(xa))}for(var Q=ca.apply(this,arguments),S=new mxDictionary,X=this.graph.model,ia=[],ja=0;ja<Q.length;ja++){var pa=Q[ja];this.graph.isTableCell(pa)?B(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
+mxGraphHandler.prototype.isValidDropTarget=function(B,Q){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(Q.getEvent)};mxGraphView.prototype.formatUnitText=function(B){return B?f(B,this.unit):B};mxGraphHandler.prototype.updateHint=function(B){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var Q=this.graph.view.translate,R=this.graph.view.scale;B=this.roundLength((this.bounds.x+
+this.currentDx)/R-Q.x);Q=this.roundLength((this.bounds.y+this.currentDy)/R-Q.y);R=this.graph.view.unit;this.hint.innerHTML=f(B,R)+", "+f(Q,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};
+var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(B,Q){ha.apply(this,arguments);var R=this.graph.getCellStyle(B);if(null==R.childLayout){var X=this.graph.model.getParent(B),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(R=this.graph.getCellStyle(X),"stackLayout"==R.childLayout)){var ja=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);
+ia=ia.clone();R?ia.height=Q.height+pa.y+pa.height+2*ja:ia.width=Q.width+pa.x+pa.width+2*ja;this.graph.model.setGeometry(X,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function B(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var Q=ca.apply(this,arguments),R=new mxDictionary,X=this.graph.model,ia=[],ja=0;ja<Q.length;ja++){var pa=Q[ja];this.graph.isTableCell(pa)?B(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&
B(X.getParent(pa));B(pa)}return ia};var aa=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(B){return aa.apply(this,arguments)&&!mxEvent.isControlDown(B.getEvent())&&!mxEvent.isShiftDown(B.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&
!this.graph.isSwimlane(this.state.cell)};var da=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(B){var Q=da.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};var ka=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(B){var Q=ka.apply(this,arguments);Q.stroke="#C0C0C0";Q.strokewidth=1;return Q};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
function(){var B=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+B.x/2,this.bounds.y+this.rotationHandleVSpacing-B.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(B,Q){return this.graph.isRecursiveVertexResize(B)&&!mxEvent.isAltDown(Q.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(B,Q){return mxEvent.isControlDown(Q.getEvent())||mxEvent.isMetaDown(Q.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;
mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(B){return B.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var B=0;this.graph.isTableRow(this.state.cell)?B=1:this.graph.isTableCell(this.state.cell)&&
(B=2);return B};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var I=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==I&&(I=mxCellRenderer.defaultShapes.tableLine);var B=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var Q=function(Za,
-Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ja,(ua+bb.y+Ra)*ja))}return fb},S=this,X=this.graph,ia=X.model,ja=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==B&&(B=[]);var Ka=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ia.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
+Pa,Ra){for(var fb=[],eb=0;eb<Za.length;eb++){var bb=Za[eb];fb.push(null==bb?null:new mxPoint((ra+bb.x+Pa)*ja,(ua+bb.y+Ra)*ja))}return fb},R=this,X=this.graph,ia=X.model,ja=X.view.scale,pa=this.state,xa=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,ua=this.state.origin.y+X.view.translate.y;null==B&&(B=[]);var Ka=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ka.length){var Va=ia.getChildCells(Ka[0].cell,!0),Oa=X.getTableLines(this.state.cell,!1,!0),Ta=X.getTableLines(this.state.cell,
!0,!1);for(ia=0;ia<Ka.length;ia++)mxUtils.bind(this,function(Za){var Pa=Ka[Za],Ra=null;if(X.isCellMovable(Pa.cell)){Ra=Za<Ka.length-1?Ka[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra.cell):null;var fb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Ta[Za]?new I(Ta[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Pa,"row-resize",null,Ra);Ra.tableHandle=!0;var eb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,
Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Ta[Za],0,eb),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+eb*ja;this.shape.bounds.x=pa.x+(Za==Ka.length-1?0:db.x*ja);this.shape.bounds.width=pa.width-(Za==Ka.length-1?0:db.width+db.x+ja)}this.shape.redraw()}};var bb=
-!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!S.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}B.push(Ra)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,
+!1;Ra.setPosition=function(db,mb,lb){eb=Math.max(Graph.minTableRowHeight-db.height,mb.y-db.y-db.height);bb=mxEvent.isShiftDown(lb.getEvent());null!=fb&&bb&&(eb=Math.min(eb,fb.height-Graph.minTableRowHeight))};Ra.execute=function(db){if(0!=eb)X.setTableRowHeight(this.state.cell,eb,!bb);else if(!R.blockDelayedSelection){var mb=X.getCellAt(db.getGraphX(),db.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(mb,db)}eb=0};Ra.reset=function(){eb=0}}B.push(Ra)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,
function(Za){var Pa=X.view.getState(Va[Za]),Ra=X.getCellGeometry(Va[Za]),fb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Pa&&(Pa=new mxCellState(X.view,Va[Za],X.getCellStyle(Va[Za])),Pa.x=pa.x+Ra.x*ja,Pa.y=pa.y+Ra.y*ja,Pa.width=fb.width*ja,Pa.height=fb.height*ja,Pa.updateCachedBounds());Ra=Za<Va.length-1?Va[Za+1]:null;Ra=null!=Ra?X.getCellGeometry(Ra):null;var eb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Oa[Za]?new I(Oa[Za],mxConstants.NONE,1):new mxLine(new mxRectangle,
mxConstants.NONE,1,!0);Ra.isDashed=xa.isDashed;Ra.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Ra);Pa.tableHandle=!0;var bb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==I)this.shape.line=Q(Oa[Za],bb,0),this.shape.updateBoundsFromLine();else{var mb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(fb.width+bb)*ja;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ja);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!S.blockDelayedSelection){var lb=
+this.state.x+(fb.width+bb)*ja;this.shape.bounds.y=pa.y+(Za==Va.length-1?0:mb.y*ja);this.shape.bounds.height=pa.height-(Za==Va.length-1?0:(mb.height+mb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(mb,lb,pb){bb=Math.max(Graph.minTableColumnWidth-fb.width,lb.x-mb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==eb||db||(bb=Math.min(bb,eb.width-Graph.minTableColumnWidth))};Pa.execute=function(mb){if(0!=bb)X.setTableColumnWidth(this.state.cell,bb,db);else if(!R.blockDelayedSelection){var lb=
X.getCellAt(mb.getGraphX(),mb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(lb,mb)}bb=0};Pa.positionChanged=function(){};Pa.reset=function(){bb=0};B.push(Pa)})(ia)}}return null!=B?B.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){T.apply(this,arguments);if(null!=this.moveHandles)for(var Q=0;Q<this.moveHandles.length;Q++)null!=this.moveHandles[Q]&&(this.moveHandles[Q].node.style.visibility=B?"":"hidden");if(null!=this.cornerHandles)for(Q=
0;Q<this.cornerHandles.length;Q++)this.cornerHandles[Q].node.style.visibility=B?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var B=this.isMoveHandlesVisible();B&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():B||null==this.moveHandles||this.destroyMoveHandles();if(B&&null==this.moveHandles){for(B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,Q=B.model,S=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&Q.isVertex(ia.cell)&&B.isCellMovable(ia.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ia;ja.dialect=this.graph.dialect!=
+this.moveHandles[B]&&this.moveHandles[B].parentNode.removeChild(this.moveHandles[B]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var B=this.graph,Q=B.model,R=[],X=0;X<Q.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&Q.isVertex(ia.cell)&&B.isCellMovable(ia.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ia;ja.dialect=this.graph.dialect!=
mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ja.init(this.graph.getView().getOverlayPane());ja.node.style.cursor="move";mxEvent.addGestureListeners(ja.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),
-this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));S.push(ja)}else S.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return S};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
+this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));R.push(ja)}else R.push(null)})(this.graph.view.getState(Q.getChildAt(this.state.cell,X)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=
this.moveHandles){for(var B=0;B<this.moveHandles.length;B++)null!=this.moveHandles[B]&&this.moveHandles[B].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var B=0;B<this.cornerHandles.length;B++)null!=this.cornerHandles[B]&&null!=this.cornerHandles[B].node&&null!=this.cornerHandles[B].node.parentNode&&this.cornerHandles[B].node.parentNode.removeChild(this.cornerHandles[B].node);this.cornerHandles=null}};var W=mxVertexHandler.prototype.refresh;
mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var B=0;4>B;B++){var Q=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",
-mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),Q=this.tolerance,S=this.state.style.shape;
-null==mxCellRenderer.defaultShapes[S]&&mxStencilRegistry.getStencil(S);S=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!S&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ja=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ja)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/
-2||Math.abs(this.state.x+this.state.width-ja)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){S=!0;break}}S&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),B.x=this.sizers[0].bounds.width+Q,B.y=this.sizers[0].bounds.height+Q):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+mxConstants.HANDLE_STROKECOLOR);Q.dialect=mxConstants.DIALECT_SVG;Q.init(this.graph.view.getOverlayPane());this.cornerHandles.push(Q)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();B=this.graph.getLinkForCell(this.state.cell);Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var B=new mxPoint(0,0),Q=this.tolerance,R=this.state.style.shape;
+null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ja=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ja)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/
+2||Math.abs(this.state.x+this.state.width-ja)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(Q/=2,this.graph.isTable(this.state.cell)&&(Q+=7),B.x=this.sizers[0].bounds.width+Q,B.y=this.sizers[0].bounds.height+Q):B=U.apply(this,arguments);return B};mxVertexHandler.prototype.updateHint=function(B){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{B=this.state.view.scale;var Q=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/B),Q)+" x "+f(this.roundLength(this.bounds.height/B),Q)}B=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==B&&(B=this.bounds);this.hint.style.left=B.x+Math.round((B.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
B.y+B.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var B=this.graph.getLinkForCell(this.state.cell),Q=this.graph.getLinksForState(this.state);this.updateLinkHint(B,Q)};var fa=mxEdgeHandler.prototype.mouseMove;
mxEdgeHandler.prototype.mouseMove=function(B,Q){fa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(B,Q){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
-function(B,Q,S){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ja=this.roundLength(Q.x/ia-X.x);X=this.roundLength(Q.y/ia-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ja,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=S&&(S.view.updateEdgeBounds(S),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(S.length/ia):f(S.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=
-this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(S=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*S.x)+"%, "+Math.round(100*S.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
+function(B,Q,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ja=this.roundLength(Q.x/ia-X.x);X=this.roundLength(Q.y/ia-X.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ja,pa)+", "+f(X,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=
+this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(B.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(B.getGraphY(),Q.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
"none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');
mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');
HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+
@@ -2719,41 +2720,41 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=
function(B){return!mxEvent.isShiftDown(B.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(B){return!mxEvent.isShiftDown(B.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(B){return mxEvent.isMouseEvent(B.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(Q)||mxEvent.isPopupTrigger(Q)&&(null==B.getState()||mxEvent.isControlDown(Q)||mxEvent.isShiftDown(Q))}}else mxPanningHandler.prototype.isPanningTrigger=function(B){var Q=B.getEvent();return mxEvent.isLeftMouseButton(Q)&&(this.useLeftButtonForPanning&&null==B.getState()||mxEvent.isControlDown(Q)&&!mxEvent.isShiftDown(Q))||this.usePopupTrigger&&mxEvent.isPopupTrigger(Q)};
-mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var S=
-null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ja=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,B=(this.currentX-X)/this.graph.view.scale,ja=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(B=this.graph.snap(B),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(S){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
-try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(S=0;S<pa.length;S++)if(this.graph.isCellMovable(pa[S])){var xa=this.graph.view.getState(pa[S]),ra=this.graph.getCellGeometry(pa[S]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ja),this.graph.model.setGeometry(pa[S],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(B,
-Q){if(!Q.isConsumed()&&null!=this.first){var S=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);S.x-=B.x;S.y-=B.y;B=Q.getX()+S.x;S=Q.getY()+S.y;var X=this.first.x-B,ia=this.first.y-S,ja=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ja||Math.abs(ia)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,S),this.isSpaceEvent(Q)?(B=this.x+this.width,S=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
-(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=B-this.width),this.y<this.first.y&&(this.y=S-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
+mxRubberband.prototype.isSpaceEvent=function(B){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(B.getEvent())||mxEvent.isMetaDown(B.getEvent()))&&mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(B,Q){if(this.cancelled)this.cancelled=!1,Q.consume();else{var R=
+null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ja=B=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,B=(this.currentX-X)/this.graph.view.scale,ja=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||(B=this.graph.snap(B),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(B)<this.graph.tolerance&&(B=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(R){if(this.isSpaceEvent(Q)){this.graph.model.beginUpdate();
+try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ra=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ra&&(ra=ra.clone(),ra.translate(B,ja),this.graph.model.setGeometry(pa[R],ra))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,Q.getEvent());Q.consume()}}};mxRubberband.prototype.mouseMove=function(B,
+Q){if(!Q.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);B=mxUtils.getOffset(this.graph.container);R.x-=B.x;R.y-=B.y;B=Q.getX()+R.x;R=Q.getY()+R.y;var X=this.first.x-B,ia=this.first.y-R,ja=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ja||Math.abs(ia)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(B,R),this.isSpaceEvent(Q)?(B=this.x+this.width,R=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(Q.getEvent())||
+(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=B-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):
(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),Q.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
-function(B,Q,S,X){wa.apply(this,arguments);S!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=S};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,Q,S){Q=null!=B&&0==B;var X=this.state.getVisibleTerminalState(Q);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,X,Q):null;S=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),B):null)?S?this.endFixedHandleImage:this.fixedHandleImage:
-null!=B&&null!=X?S?this.endTerminalHandleImage:this.terminalHandleImage:S?this.endHandleImage:this.handleImage;if(null!=S)return S=new mxImageShape(new mxRectangle(0,0,S.width,S.height),S.src),S.preserveImageAspect=!1,S;S=mxConstants.HANDLE_SIZE;this.preferHtml&&--S;return new mxRectangleShape(new mxRectangle(0,0,S,S),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,Q,S,X){X=Q==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var Q=this.graph.getModel(),S=Q.getParent(B[0]),X=this.graph.getCellGeometry(B[0]);if(Q.isEdge(S)&&null!=X&&X.relative&&(Q=this.graph.view.getState(B[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
-arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),Q=[],S=0;S<B.length;S++)"1"!=mxUtils.getValue(B[S].style,"part","0")&&Q.push(B[S]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var Q=this.graph.getModel(),S=Q.getParent(B.cell),X=this.graph.getCellGeometry(B.cell);return Q.isEdge(S)&&null!=X&&X.relative&&2>B.width&&2>B.height&&null!=
-B.text&&null!=B.text.boundingBox?(Q=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,Q){var S=this.graph.getModel(),X=S.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!S.isEdge(X)||null==ia||!ia.relative||null==this.state||
+function(B,Q,R,X){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(new Date).getTime(),ya=0):ya=(new Date).getTime()-qa;this.currentTerminalState=R};var Ia=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(B){return mxEvent.isShiftDown(B.getEvent())&&mxEvent.isAltDown(B.getEvent())?!1:null!=this.currentTerminalState&&B.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ia.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(B,Q,R){Q=null!=B&&0==B;var X=this.state.getVisibleTerminalState(Q);B=null!=B&&null!=this.state.absolutePoints&&(0==B||B>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==B)?this.graph.getConnectionConstraint(this.state,X,Q):null;R=null!=(null!=B?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(Q),B):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
+null!=B&&null!=X?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(B,Q,R,X){X=Q==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:Q==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(B){if(null!=B&&1==B.length){var Q=this.graph.getModel(),R=Q.getParent(B[0]),X=this.graph.getCellGeometry(B[0]);if(Q.isEdge(R)&&null!=X&&X.relative&&(Q=this.graph.view.getState(B[0]),null!=Q&&2>Q.width&&2>Q.height&&null!=Q.text&&null!=Q.text.boundingBox))return mxRectangle.fromRectangle(Q.text.boundingBox)}return Ba.apply(this,
+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var B=Ga.apply(this,arguments),Q=[],R=0;R<B.length;R++)"1"!=mxUtils.getValue(B[R].style,"part","0")&&Q.push(B[R]);return Q};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(B){var Q=this.graph.getModel(),R=Q.getParent(B.cell),X=this.graph.getCellGeometry(B.cell);return Q.isEdge(R)&&null!=X&&X.relative&&2>B.width&&2>B.height&&null!=
+B.text&&null!=B.text.boundingBox?(Q=B.text.unrotatedBoundingBox||B.text.boundingBox,new mxRectangle(Math.round(Q.x),Math.round(Q.y),Math.round(Q.width),Math.round(Q.height))):Ma.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(B,Q){var R=this.graph.getModel(),X=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(Q)==mxEvent.ROTATION_HANDLE||!R.isEdge(X)||null==ia||!ia.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var B=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),Q=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&B==mxConstants.NONE&&Q==mxConstants.NONE?(B=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
B,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(B,Q){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
function(B,Q){Da.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(B,Q){try{if(null==B&&(null==Q||0==Q.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=B||null!=Q&&0<Q.length){var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("editLink"));S.setAttribute("width","14");S.setAttribute("height","14");S.style.paddingLeft="8px";S.style.marginLeft="auto";S.style.marginBottom="-1px";S.style.cursor="pointer";var X=S.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+this.linkHint=null);else if(null!=B||null!=Q&&0<Q.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var X=R.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=B){var ia=document.createElement("div");
-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=S.cloneNode(!0);ia.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,
-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ia=0;ia<Q.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=S.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(B,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=R.cloneNode(!0);ia.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,
+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=Q)for(ia=0;ia<Q.length;ia++)mxUtils.bind(this,function(xa,ra){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=B||0<ra?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ka=R.cloneNode(!0);ua.appendChild(Ka);var Va=mxUtils.bind(this,function(Oa){var Ta=
document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Za=Ta.getElementsByTagName("a")[ra];if(null!=Za){if(null==Oa||""==Oa){for(Oa=Za.cloneNode(!0).firstChild;null!=Oa;)Za.parentNode.insertBefore(Oa.cloneNode(!0),Za),Oa=Oa.nextSibling;Za.parentNode.removeChild(Za)}else Za.setAttribute("href",Oa);this.graph.labelChanged(this.state.cell,Ta.innerHTML)}});mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){this.graph.showLinkDialog(xa.getAttribute("href")||
"",mxResources.get("ok"),Va);mxEvent.consume(Oa)}));Ka=X.cloneNode(!0);ua.appendChild(Ka);mxEvent.addListener(Ka,"click",mxUtils.bind(this,function(Oa){Va();mxEvent.consume(Oa)}));this.linkHint.appendChild(ua)})(Q[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var B=va.apply(this,
arguments);B.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return B};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var B=0;B<this.moveHandles.length;B++)null!=
-this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var Q=this.cornerHandles,S=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+B;Q[0].bounds.y=
-this.state.y-S+B;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*B;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*B;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),S=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=S?mxUtils.getBoundingBox(this.state,
-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==S&&(S=this.state),S=S.y+S.height,null!=Q&&(S=Math.max(S,Q.y+Q.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(S+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
+this.moveHandles[B]&&(this.moveHandles[B].bounds.x=Math.round(this.moveHandles[B].rowState.x+this.moveHandles[B].rowState.width-this.moveHandles[B].bounds.width/2),this.moveHandles[B].bounds.y=Math.round(this.moveHandles[B].rowState.y+(this.moveHandles[B].rowState.height-this.moveHandles[B].bounds.height)/2),this.moveHandles[B].redraw());if(null!=this.cornerHandles){B=this.getSelectionBorderInset();var Q=this.cornerHandles,R=Q[0].bounds.height/2;Q[0].bounds.x=this.state.x-Q[0].bounds.width/2+B;Q[0].bounds.y=
+this.state.y-R+B;Q[0].redraw();Q[1].bounds.x=Q[0].bounds.x+this.state.width-2*B;Q[1].bounds.y=Q[0].bounds.y;Q[1].redraw();Q[2].bounds.x=Q[0].bounds.x;Q[2].bounds.y=this.state.y+this.state.height-2*B;Q[2].redraw();Q[3].bounds.x=Q[1].bounds.x;Q[3].bounds.y=Q[2].bounds.y;Q[3].redraw();for(B=0;B<this.cornerHandles.length;B++)this.cornerHandles[B].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(B=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),Q=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(Q,this.state.style[mxConstants.STYLE_ROTATION]||"0",B),B=null!=R?mxUtils.getBoundingBox(this.state,
+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,Q=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=Q&&(R=Math.max(R,Q.y+Q.height)),this.linkHint.style.left=B.x+B.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ua=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ua.apply(this,arguments);
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Qa=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Qa.apply(this),null!=this.state&&null!=this.linkHint)){var B=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(B=new mxRectangle(B.x,B.y,B.width,B.height),B.add(this.state.text.bounds));this.linkHint.style.left=B.x+B.width/2+"px";this.linkHint.style.top=Math.round(B.y+B.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function J(){mxCylinder.call(this)}function R(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
+function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function C(){mxActor.call(this)}function J(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function c(){mxShape.call(this)}
function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function H(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function Z(){mxActor.call(this)}function ha(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(d,p){this.canvas=d;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,aa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,aa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,aa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,aa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,aa.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,aa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function da(){mxRectangleShape.call(this)}function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function V(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function I(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxEllipse.call(this)}
function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ia(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function Q(){mxActor.call(this)}function S(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Qa(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function B(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
function ja(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function fb(){mxConnector.call(this)}function eb(d,p,A,t,z,E,G,ea,O,ta){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=E*(2*G+O);z*=G+O;E*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-E-G,2*G,2*G);ta?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,
this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var E=0;E<p.length;E++){var G=p[E];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=
@@ -2766,8 +2767,8 @@ d.lineTo(E,E),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFill
u);var bb=Math.tan(mxUtils.toRadians(30)),db=(.5-bb)/2;mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(y,mxConnector);y.prototype.paintEdgeShape=function(d,p){var A=this.createMarker(d,p,!0),t=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=A&&A();null!=t&&t()};mxCellRenderer.registerShape("wire",y);mxUtils.extend(q,mxCylinder);q.prototype.size=6;q.prototype.paintVertexShape=function(d,p,A,t,z){d.setFillColor(this.stroke);var E=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(t-E),A+.5*(z-E),E,E);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};mxCellRenderer.registerShape("waypoint",
q);mxUtils.extend(C,mxActor);C.prototype.size=20;C.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t,z/bb);d.translate((t-p)/2,(z-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*db);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-db)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",C);mxUtils.extend(J,mxCylinder);J.prototype.size=20;J.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(t,z/(.5+bb));E?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-db)*p),d.lineTo(p,.25*p),d.moveTo(.5*
-p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",J);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
-p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),d.close())};R.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",R);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
+p,(.5-db)*p),d.lineTo(.5*p,(1-db)*p)):(d.translate((t-p)/2,(z-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*db),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-db)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",J);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,A,t,z,E){p=Math.min(z/2,Math.round(z/8)+this.strokewidth-1);if(E&&null!=this.fill||!E&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
+p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,t,2*p,t,p),E||(d.stroke(),d.begin()),d.translate(0,-p);E||(d.moveTo(0,p),d.curveTo(0,-p/3,t,-p/3,t,p),d.lineTo(t,z-p),d.curveTo(t,z+p/3,0,z+p/3,0,z-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(D,mxCylinder);D.prototype.size=30;D.prototype.darkOpacity=
0;D.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(0,Math.min(t,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),G=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,A);d.begin();d.moveTo(0,0);d.lineTo(t-E,0);d.lineTo(t,E);d.lineTo(t,z);d.lineTo(0,z);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=G&&(d.setFillAlpha(Math.abs(G)),d.setFillColor(0>G?"#FFFFFF":"#000000"),
d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.close(),d.fill()),d.begin(),d.moveTo(t-E,0),d.lineTo(t-E,E),d.lineTo(t,E),d.end(),d.stroke())};mxCellRenderer.registerShape("note",D);mxUtils.extend(P,D);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
15;c.prototype.paintVertexShape=function(d,p,A,t,z){var E=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;E=Math.min(t*Math.tan(E),.5*z);d.translate(p,A);d.begin();d.moveTo(.5*t,0);d.lineTo(t,E);d.lineTo(t,z-E);d.lineTo(.5*t,z);d.lineTo(0,z-E);d.lineTo(0,E);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,E);d.lineTo(.5*t,2*E);d.lineTo(t,E);d.moveTo(.5*t,2*E);d.lineTo(.5*t,z);d.stroke()};mxCellRenderer.registerShape("isoCube2",
@@ -2853,8 +2854,8 @@ Sa);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototyp
"arrowSize",this.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(0,E)],this.isRounded,G,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Qa);mxUtils.extend(za,mxActor);za.prototype.isRoundable=function(){return!0};za.prototype.redrawPath=function(d,p,A,t,z){var E=z*Math.max(0,Math.min(1,
parseFloat(mxUtils.getValue(this.style,"arrowWidth",Qa.prototype.arrowWidth))));p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Qa.prototype.arrowSize))));A=(z-E)/2;E=A+E;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z/2),new mxPoint(p,0),new mxPoint(p,A),new mxPoint(t-p,A),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(t-p,E),new mxPoint(p,E),new mxPoint(p,z)],this.isRounded,
G,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",za);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();
-d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(S,mxActor);S.prototype.size=20;S.prototype.isRoundable=
-function(){return!0};S.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",S);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
+d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(B,mxActor);B.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",B);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=
+function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=
function(){return!0};X.prototype.redrawPath=function(d,p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,
z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",
ja);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,
@@ -2964,7 +2965,7 @@ Math.min(p.height,A.y-p.y)))},!1)]},document:function(d){return[kb(d,["size"],fu
p.y+A*p.height/2)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[kb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:vb(g.prototype.size),cylinder3:vb(m.prototype.size),offPageConnector:function(d){return[kb(d,
["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,
t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ba.prototype.size,!0,null,!0,ba.prototype.fixedSize),hexagon:Cb(V.prototype.size,
-!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ha.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,u.prototype.size,!1),card:Ab(.5,H.prototype.size,!0),loopLimit:Ab(.5,S.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
+!0,.5,!0,V.prototype.fixedSize),curlyBracket:Cb(ha.prototype.size,!1),display:Cb(Za.prototype.size,!1),cube:Ab(1,u.prototype.size,!1),card:Ab(.5,H.prototype.size,!0),loopLimit:Ab(.5,R.prototype.size,!0),trapezoid:Eb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Eb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=kb;Graph.handleFactory=jb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);
if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=jb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=jb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=
this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=jb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var tb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);tb=mxUtils.getRotatedPoint(tb,Math.cos(zb),Math.sin(zb));var sb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(sb),Math.sin(sb));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var E=
d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,ea=G[0];G=G[G.length-1];null!=t&&(t=E.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=tb.x,ta=tb.y,ma=xb.x,ab=xb.y,ib="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ja){Fa-=cb.x;var Ha=La-cb.y;La=(ab*Fa-ma*Ha)/(O*ab-ta*ma);Fa=(ta*Fa-O*Ha)/(ta*ma-O*ab);ib?(Ja&&(cb=new mxPoint(cb.x+
@@ -2992,7 +2993,7 @@ null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.pu
Za.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ia.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ia.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ia.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,p),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),
-!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};S.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-.5*d,3.5*d))];A>5*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));A>8*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));A>15*d&&t.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return t};R.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,
.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,
.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
@@ -3057,7 +3058,7 @@ P.ignoreImage=!0,q.model.execute(P))}),mxResources.get("pageScale")+" (%)");this
u.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.tooltipHandler.isEnabled()});J=this.addAction("collapseExpand",function(){var D=new ChangePageSetup(u);D.ignoreColor=!0;D.ignoreImage=!0;D.foldingEnabled=!q.foldingEnabled;q.model.execute(D)});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.foldingEnabled});J.isEnabled=C;J=this.addAction("pageView",mxUtils.bind(this,function(){u.setPageVisible(!q.pageVisible)}));
J.setToggleAction(!0);J.setSelectedCallback(function(){return q.pageVisible});J=this.addAction("connectionArrows",function(){q.connectionArrowsEnabled=!q.connectionArrowsEnabled;u.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,Editor.altKey+"+"+Editor.shiftKey+"+A");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionArrowsEnabled});J=this.addAction("connectionPoints",function(){q.setConnectable(!q.connectionHandler.isEnabled());u.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,Editor.altKey+"+"+Editor.shiftKey+"+O");J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isEnabled()});J=this.addAction("copyConnect",function(){q.connectionHandler.setCreateTarget(!q.connectionHandler.isCreateTarget());u.fireEvent(new mxEventObject("copyConnectChanged"))});J.setToggleAction(!0);J.setSelectedCallback(function(){return q.connectionHandler.isCreateTarget()});J.isEnabled=C;J=this.addAction("autosave",function(){u.editor.setAutosave(!u.editor.autosave)});
-J.setToggleAction(!0);J.setSelectedCallback(function(){return u.editor.autosave});J.isEnabled=C;J.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var R=!1;J=new Action("about",function(){R||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){R=!1}),R=!0)});J.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",J);J=
+J.setToggleAction(!0);J.setSelectedCallback(function(){return u.editor.autosave});J.isEnabled=C;J.visible=!1;this.addAction("help",function(){var D="";mxResources.isLanguageSupported(mxClient.language)&&(D="_"+mxClient.language);q.openLink(RESOURCES_PATH+"/help"+D+".html")});var S=!1;J=new Action("about",function(){S||(u.showDialog((new AboutDialog(u)).container,320,280,!0,!0,function(){S=!1}),S=!0)});J.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",J);J=
mxUtils.bind(this,function(D,P,c,g){return this.addAction(D,function(){if(null!=c&&q.cellEditor.isContentEditing())c();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var m=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,m);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?q.updateLabelElements(m,function(x){x.style.fontWeight=null;"B"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(m,
function(x){x.style.fontStyle=null;"I"==x.nodeName&&q.replaceElement(x)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(m,function(x){x.style.textDecoration=null;"U"==x.nodeName&&q.replaceElement(x)});for(var n=0;n<m.length;n++)0==q.model.getChildCount(m[n])&&q.autoSizeCell(m[n],!1)}finally{q.getModel().endUpdate()}}},null,null,g)});J("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");J("italic",mxConstants.FONT_ITALIC,
function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");J("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){u.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",q.shapeForegroundColor)});this.addAction("strokeColor...",function(){u.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",q.shapeForegroundColor)});this.addAction("fillColor...",function(){u.menus.pickColor(mxConstants.STYLE_FILLCOLOR,
@@ -3093,25 +3094,25 @@ DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f
function(C){l&&(window.clearTimeout(u),this.sync.cleanup(b,f,C))}),y,q):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(u),null!=b&&b())}),y,q)}};
DrawioFile.prototype.updateFile=function(b,f,l,u,y){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",y,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,
u,y):this.reloadFile(b,f))}catch(C){null!=f&&f(C)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),J=[this.ui.diffPages(null!=u?u:C,q)],R=this.ignorePatches(J);if(R)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",R),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(C,
+DrawioFile.prototype.mergeFile=function(b,f,l,u,y){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var C=this.getShadowPages(),J=[this.ui.diffPages(null!=u?u:C,q)],S=this.ignorePatches(J);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var D=this.isModified()?this.ui.diffPages(C,
this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(C),J[0]),c=this.ui.getHashValueForPages(P,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",C,"pages",q,"patched",P,"patches",J,"changes",D,"checksum",c,"current",g,"valid",c==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=c&&c!=g)this.checksumError(l,J,null,null,"mergeFile",
c,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var m=this.sync.patchRealtime(J,DrawioFile.LAST_WRITE_WINS?D:null,null,y);null==m||mxUtils.isEmptyObject(m)||J.push(m)}this.patch(J,DrawioFile.LAST_WRITE_WINS?D:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(F);try{var n=this.getCurrentUser(),x=null!=n?
n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}catch(H){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(F){null!=l&&l(F)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var u=0;u<b.length;u++){var y=f.encode(new mxGraphModel(b[u].root));"1"!=urlParams.dev&&(y=this.ui.anonymizeNode(y,!0));y.setAttribute("id",b[u].getId());b[u].viewState&&this.ui.editor.graph.saveViewState(b[u].viewState,y,!0);l.appendChild(y)}return mxUtils.getPrettyXml(l)};
DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,J){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var R=this.getCurrentUser(),D=null!=R?R.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>
+DrawioFile.prototype.checksumError=function(b,f,l,u,y,q,C,J){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),D=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,g=null;if(null!=f&&1E3>c){b=[];for(l=0;l<f.length;l++)b.push(this.ui.anonymizePatch(f[l]));g=JSON.stringify(b);g=null!=g&&1E3>
g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(m){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(m.getShadowPages()),F="unknown",H="unknown",M="unknown";try{var L=null!=m.initialData&&0<m.initialData.length?mxUtils.parseXml(m.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(F=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(M=L.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+
n+" in "+y,null,this.getMode()+"."+P,"user_"+D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=C?"-current_"+C:"")+(null!=J?"-rev_"+this.ui.hashValue(J):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(m.getCurrentRevisionId())+("-latestVersion_"+F)+("-latestAgent_"+H)+("-latestType_"+M));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:y,label:"user_"+
D+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(m){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),J=null!=C?this.ui.hashValue(C.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");C="xml";0<P&&(C=D.substring(P));var c=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+J+R+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+DrawioFile.prototype.sendErrorReport=function(b,f,l,u){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),J=null!=C?this.ui.hashValue(C.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",D=this.getTitle(),P=D.lastIndexOf(".");C="xml";0<P&&(C=D.substring(P));var c=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+J+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+y+"\n\nData:\n"+q,u)}catch(g){}};
DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),u=this.ui.editor.graph,y=u.getSelectionCells(),q=u.getViewState(),C=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(J){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[q],"latestFile",J);null!=J?(this.ui.replaceFileData(J.getData(),
-[l]),this.ui.restoreViewState(C,q,y),this.setDescriptor(J.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var R=this.ui.getCurrentFile();null!=R&&(R.stats=this.stats,R.patch([l]),R.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(J){null!=f&&f(J)}};
+[l]),this.ui.restoreViewState(C,q,y),this.setDescriptor(J.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([l]),S.fileChanged());this.ui.restoreViewState(C,q,y);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(J){null!=f&&f(J)}};
DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};
-DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,J=this.ui.editor.graph;J.container.style.visibility="hidden";var R=this.changeListenerEnabled;this.changeListenerEnabled=l;var D=J.foldingEnabled,P=J.mathEnabled,c=J.cellRenderer.redraw;J.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};J.model.beginUpdate();
+DrawioFile.prototype.patch=function(b,f,l,u){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),C=y.indexOfNextAdd,J=this.ui.editor.graph;J.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=l;var D=J.foldingEnabled,P=J.mathEnabled,c=J.cellRenderer.redraw;J.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};J.model.beginUpdate();
try{if(l){for(var g=this.ui.pages.slice(),m=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var F=mxUtils.indexOf(this.ui.pages,n[x]);0>F?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(F,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,m)&&this.ui.selectPage(m,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);J.checkDefaultParent()}finally{J.container.style.visibility="";J.model.endUpdate();J.cellRenderer.redraw=c;this.changeListenerEnabled=R;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=J.mathEnabled?(this.ui.editor.updateGraphComponents(),J.refresh()):(D!=J.foldingEnabled?
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);J.checkDefaultParent()}finally{J.container.style.visibility="";J.model.endUpdate();J.cellRenderer.redraw=c;this.changeListenerEnabled=S;l||(y.history=q,y.indexOfNextAdd=C,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=J.mathEnabled?(this.ui.editor.updateGraphComponents(),J.refresh()):(D!=J.foldingEnabled?
J.view.revalidate():J.view.validate(),J.sizeDidChange());null!=this.sync&&this.isRealtime()&&!u&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",l)}return b};
DrawioFile.prototype.save=function(b,f,l,u,y,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",u,"overwrite",y,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!y&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=l)l(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
@@ -3162,7 +3163,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(l){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",l);b(f,l)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,f,l,u,y,q,C){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(q,f,l,u,y,C)}catch(D){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=u&&u(D);try{var J=this.getCurrentUser(),R=null!=J?J.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),R,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=u&&u(D)}};
+this.inConflictState=!0;this.descriptorChanged();null!=u&&u(D);try{var J=this.getCurrentUser(),S=null!=J?J.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,D)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(D){this.descriptorChanged(),null!=u&&u(D)}};
DrawioFile.prototype.autosave=function(b,f,l,u){null==this.lastAutosave&&(this.lastAutosave=Date.now());var y=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var C=this.isAutosaveRevision();
C&&(this.lastAutosaveRevision=(new Date).getTime());this.save(C,mxUtils.bind(this,function(J){this.autosaveCompleted();null!=l&&l(J)}),mxUtils.bind(this,function(J){null!=u&&u(J)}))}else this.isModified()||this.ui.clearStatus(),null!=l&&l(null)}catch(J){null!=u&&u(J)}}),y);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",y,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
@@ -3171,10 +3172,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,l){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,l,u,y,q,C){DrawioFile.call(this,b,f);this.title=l;this.mode=u?null:App.MODE_DEVICE;this.fileHandle=y;this.desc=q;this.editable=C};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,l,u,y){this.saveAs(this.title,f,l,u,y)};LocalFile.prototype.saveAs=function(b,f,l,u,y){this.saveFile(b,!1,f,l,null,u,y)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var J=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var R=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),P=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(R);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(J?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var H=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(R,H,D,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,J?"image/png":"text/xml",J);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(J?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});J?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),u,this.ui.getCurrentFile()!=this?R:null,f.scale,f.border)):P(R)};
+LocalFile.prototype.saveFile=function(b,f,l,u,y,q,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var J=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),P=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=u&&u({error:n})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);C||this.desc.lastModified==x.lastModified?n.write(J?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){try{var H=this.desc;this.savingFile=!1;this.desc=F;this.fileSaved(S,H,D,g);this.removeDraft()}catch(M){g(M)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,J?"image/png":"text/xml",J);else if(c.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(J?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});J?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){P(c)}),u,this.ui.getCurrentFile()!=this?S:null,f.scale,f.border)):P(S)};
LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
@@ -3338,13 +3339,13 @@ if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),I=0;I<v.
k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),I.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,I){var N=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=
function(k,v,I,N,T,W,U,Y,fa,na,la,qa,ya,wa,Ia,Aa,Ba,Ga){try{W=null!=W?W:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(sa){try{sa.style.setProperty("-webkit-font-smoothing","antialiased");sa.style.setProperty("-moz-osx-font-smoothing",
"grayscale");var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Qa.drawImage(Ca,0,0);k(Na,sa)},0):(Qa.drawImage(Ca,0,0),k(Na,sa))},Na=document.createElement("canvas"),Sa=parseInt(sa.getAttribute("width")),Ua=parseInt(sa.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=W?Math.min(1,Math.min(3*v/(4*Ua),v/Sa)):v/Sa);Y=this.getMaxCanvasScale(Sa,Ua,Y);Sa=Math.ceil(Y*Sa);Ua=Math.ceil(Y*Ua);Na.setAttribute("width",Sa);Na.setAttribute("height",
-Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=qa.view,B=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;Q="data:image/svg+xml;base64,"+Q;var S=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ia=Ea.translate.x*B,ja=Ea.translate.y*B,pa=ia+(X.x-ia)/B-ya,xa=ja+(X.y-
-ja)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(S-mxUtils.mod((ia-pa)*Y,S)),Ka=-Math.round(S-mxUtils.mod((ja-xa)*Y,S));ua<Sa;ua+=S)for(var Va=Ka;Va<Ua;Va+=S)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
+Ua);var Qa=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Qa.beginPath();Qa.rect(0,0,Sa,Ua);Qa.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?za.dark:za.light;Qa.fill()}1!=Y&&Qa.scale(Y,Y);if(Ia){var Ea=qa.view,B=Ea.scale;Ea.scale=1;var Q=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=B;Q="data:image/svg+xml;base64,"+Q;var R=qa.gridSize*Ea.gridSteps*Y,X=qa.getGraphBounds(),ia=Ea.translate.x*B,ja=Ea.translate.y*B,pa=ia+(X.x-ia)/B-ya,xa=ja+(X.y-
+ja)/B-ya,ra=new Image;ra.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*Y,R)),Ka=-Math.round(R-mxUtils.mod((ja-xa)*Y,R));ua<Sa;ua+=R)for(var Va=Ka;Va<Ua;Va+=R)Qa.drawImage(ra,ua/Y,Va/Y);va()}catch(Oa){null!=T&&T(Oa)}};ra.onerror=function(ua){null!=T&&T(ua)};ra.src=Q}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
this.addFontCss(sa,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(sa,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),I,la)}catch(sa){null!=T&&T(sa)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,C=0;8>C;C++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,I,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^
v.charCodeAt(I+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,I=0;I<k.length;I++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(I))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,I,N,T){function W(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=W(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+
1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(W(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(k,4),"IHDR"!=W(k,4))null!=T&&T();else{W(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==W(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==I?(I=Math.round(N/.0254),I=Y(I)+Y(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,I,0,I.length);T+=Y(I.length)+
-v+I+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);W(k,na);W(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var J=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var R=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){R.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var I=null;null!=k.editor.graph.getModel().getParent(v)?I=v.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
+v+I+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);W(k,na);W(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var J=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var I=null;null!=k.editor.graph.getModel().getParent(v)?I=v.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,I=v.editor.graph;
if(I.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(W){v.editor.setAutosave(W);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(W){this.listener=function(){W(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==
typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(W){v.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(I.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(T);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&T.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};
@@ -3373,23 +3374,23 @@ font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764"
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
-function(k,v,I,N){function T(Qa,za,Ea,B,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,I,qa);else{ya.getModel().beginUpdate();try{Q=[];var S=[];if(null!=Ea.index){for(var X=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==Qa;)X.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<X.length?null!=B?X.splice(B,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,
-ya.getSelectionCells()),Q.push(Ea.countProperty),S.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);S.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ja=Ea.dependentPropsDefVal[Qa],pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ja);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);S.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,
-za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",S,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function B(S){if(null==S||S==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";
-else if("default"==S)Q.style.background="";else{var X=mxUtils.getLightDarkColor(S);mxUtils.isLightDarkColor(S)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+" 50.3%)":Q.style.background=S}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(S){this.editorUi.pickColor(za,
-function(X){T(Qa,X,Ea);B(X)});mxEvent.consume(S)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,B,Q,S,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:B,countProperty:Q,parentRow:S,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ja=S,pa=0;null!=ja.nextSibling;)if(ja.nextSibling.getAttribute("data-pName")==
-Qa)ja=ja.nextSibling,pa++;else break;var xa={type:Ea,parentRow:S,index:pa,isDeletable:!0,defVal:B,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,B,xa);ja.parentNode.insertBefore(pa,ja.nextSibling);mxEvent.consume(ia)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,B,Q,S,X){if(0<Q){var ia=Array(Q);za=null!=za?za.split(","):[];for(var ja=0;ja<Q;ja++)ia[ja]=null!=za[ja]?za[ja]:null!=B?B:"";wa.push({name:Qa,values:ia,type:Ea,defVal:B,parentRow:S,
-flipBkg:X,size:Q})}return document.createElement("div")}function na(Qa,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Qa,B.checked?"1":"0",Ea,null,B)});return B}function la(Qa,za,Ea,B,Q){var S=Ea.dispName,X=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(Q?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Qa);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",
-Ea.index),S=(null!=S?S:"")+"["+Ea.index+"]",B=!0);var ja=document.createElement("td");ja.className="gePropRowCell";S=mxResources.get(S,null,S);mxUtils.write(ja,S);ja.setAttribute("title",S);B&&(ja.style.textAlign="right");ia.appendChild(ja);ja=document.createElement("td");ja.className="gePropRowCell";ja.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,
-document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ja.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==X)ja.appendChild(na(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ja.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ja.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(S=pa[Q],S.val==za){mxUtils.write(xa,mxResources.get(S.dispName,null,S.dispName));break}mxEvent.addListener(ja,
+function(k,v,I,N){function T(Qa,za,Ea,B,Q){if(null!=Ea.valueChanged)Ea.valueChanged(za,Q,I,qa);else{ya.getModel().beginUpdate();try{Q=[];var R=[];if(null!=Ea.index){for(var X=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==Qa;)X.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<X.length?null!=B?X.splice(B,1):X[Ea.index]=za:X.push(za);null!=Ea.size&&X.length>Ea.size&&(X=X.slice(0,Ea.size));za=X.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,X.length,
+ya.getSelectionCells()),Q.push(Ea.countProperty),R.push(X.length))}ya.setCellStyles(Qa,za,ya.getSelectionCells());Q.push(Qa);R.push(za);if(null!=Ea.dependentProps)for(Qa=0;Qa<Ea.dependentProps.length;Qa++){var ja=Ea.dependentPropsDefVal[Qa],pa=Ea.dependentPropsVals[Qa];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ja);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Qa],pa,ya.getSelectionCells());Q.push(Ea.dependentProps[Qa]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,
+za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",Q,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function W(Qa,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Qa,za,Ea){function B(R){if(null==R||R==mxConstants.NONE)Q.style.background="url('"+Dialog.prototype.noColorImage+"')";
+else if("default"==R)Q.style.background="";else{var X=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&X.light!=X.dark?Q.style.background="linear-gradient(to right bottom, "+X.cssText+" 50%, "+mxUtils.invertLightDarkColor(X).cssText+" 50.3%)":Q.style.background=R}}var Q=document.createElement("div");Q.style.width="32px";Q.style.height="8px";Q.style.margin="2px";Q.style.borderStyle="solid";Q.style.borderWidth="1px";B(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,
+function(X){T(Qa,X,Ea);B(X)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(Q);return btn}function Y(Qa,za,Ea,B,Q,R,X){null!=za&&(za=za.split(","),wa.push({name:Qa,values:za,type:Ea,defVal:B,countProperty:Q,parentRow:R,isDeletable:!0,flipBkg:X}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ja=R,pa=0;null!=ja.nextSibling;)if(ja.nextSibling.getAttribute("data-pName")==
+Qa)ja=ja.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:B,countProperty:Q};pa=la(Qa,"",xa,0==pa%2,X);T(Qa,B,xa);ja.parentNode.insertBefore(pa,ja.nextSibling);mxEvent.consume(ia)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Qa,za,Ea,B,Q,R,X){if(0<Q){var ia=Array(Q);za=null!=za?za.split(","):[];for(var ja=0;ja<Q;ja++)ia[ja]=null!=za[ja]?za[ja]:null!=B?B:"";wa.push({name:Qa,values:ia,type:Ea,defVal:B,parentRow:R,
+flipBkg:X,size:Q})}return document.createElement("div")}function na(Qa,za,Ea){var B=document.createElement("input");B.type="checkbox";B.checked="1"==za;mxEvent.addListener(B,"change",function(){T(Qa,B.checked?"1":"0",Ea,null,B)});return B}function la(Qa,za,Ea,B,Q){var R=Ea.dispName,X=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(Q?"Dark":"")+(B?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Qa);ia.setAttribute("data-pValue",za);B=!1;null!=Ea.index&&(ia.setAttribute("data-index",
+Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",B=!0);var ja=document.createElement("td");ja.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ja,R);ja.setAttribute("title",R);B&&(ja.style.textAlign="right");ia.appendChild(ja);ja=document.createElement("td");ja.className="gePropRowCell";ja.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,
+document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==X)ja.appendChild(U(Qa,za,Ea));else if("bool"==X||"boolean"==X)ja.appendChild(na(Qa,za,Ea));else if("enum"==X){var pa=Ea.enumList;ja.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ja.appendChild(xa);for(Q=0;Q<pa.length;Q++)if(R=pa[Q],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ja,
"click",mxUtils.bind(qa,function(ua){var Ka=mxEvent.getSource(ua);if(!(Ka!=ja&&Ka!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Oa=null;W(ja,Va);for(ua=0;ua<pa.length;ua++){Ka=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Ta,mxResources.get(Ka.dispName,null,Ka.dispName));Va.appendChild(Ta);null==Ka.val&&(Ta.value="null",Oa=Ta)}Va.value=null==za&&null!=Oa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,
"change",function(){var Za=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Oa||"null"==Za.value)Za=null;T(Qa,Za,Ea)});Va.focus();mxEvent.addListener(Va,"blur",function(){xa.innerHTML="";for(var Za=0;Za<pa.length;Za++){var Pa=pa[Za];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==X)ja.appendChild(Y(Qa,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,Q));else if("staticArr"==X)ja.appendChild(fa(Qa,za,Ea.subType,Ea.subDefVal,
-Ea.size,ia,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ia.firstChild.innerHTML="",ia.firstChild.setAttribute("colspan","2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),S=document.createElement("div"),mxUtils.write(S,mxResources.get(Qa)+":"),S.style.display="inline-flex",S.style.alignItems="center",S.style.width="100%",S.appendChild(Q),
-ia.firstChild.appendChild(S)):(Q.style.width="96px",ja.appendChild(Q));else{ja.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ja.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=
+Ea.size,ia,Q));else if("readOnly"==X)Q=document.createElement("input"),Q.setAttribute("readonly",""),Q.value=za,Q.style.borderWidth="0px","id"==Qa||"shape"==Qa?(ia.firstChild.innerHTML="",ia.firstChild.setAttribute("colspan","2"),Q.style.flexGrow="1",Q.style.marginLeft="4px",Q.style.textAlign="id"==Qa?"center":"left",Q.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get(Qa)+":"),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(Q),
+ia.firstChild.appendChild(R)):(Q.style.width="96px",ja.appendChild(Q));else{ja.innerHTML="";var ra=document.createElement("div");ra.className="gePropValue";ja.appendChild(ra);ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ja,"click",mxUtils.bind(qa,function(ua){function Ka(){var Ta=Oa.value;Ta=0==Ta.length&&"string"!=X&&"numbers"!=X?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",X="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=
Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var Za=null;try{Za="numbers"==X?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==X?parseInt(Ta):Ta)+"")}catch(Pa){}T(Qa,Za,Ea,null,Oa)}var Va=mxEvent.getSource(ua);if(!(Va!=ja&&Va!=ra||mxEvent.isConsumed(ua))){ra.innerHTML="";var Oa=document.createElement("input");W(ra,Oa);Oa.value=decodeURIComponent(za);Oa.className="gePropEditor";"int"!=X&&"float"!=X||Ea.allowAuto||(Oa.type="number",Oa.step="int"==X?"1":"any",null!=
Ea.min&&(Oa.min=parseFloat(Ea.min)),null!=Ea.max&&(Oa.max=parseFloat(Ea.max)));ra.appendChild(Oa);mxEvent.addListener(Oa,"keypress",function(Ta){13==Ta.keyCode&&Ka()});Oa.focus();mxEvent.addListener(Oa,"blur",function(){Ka()})}}))}Ea.isDeletable&&(Q=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Qa,"",Ea,Ea.index);mxEvent.consume(ua)})),Q.style.height="16px",Q.style.width="25px",Q.style.float="right",Q.className="geColorBtn",ja.appendChild(Q));ia.appendChild(ja);return ia}var qa=this,ya=this.editorUi.editor.graph,
wa=[],Ia=document.createElement("table");Ia.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft="16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Qa=Ia.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage=
-"url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],Q=B.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(B)}catch(S){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className=
+"url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var B=k.childNodes[Ea],Q=B.nodeName.toUpperCase();"INPUT"!=Q&&"SELECT"!=Q||k.removeChild(B)}catch(R){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Qa.length;Ea++)Qa[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className=
"gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ia.appendChild(Aa);var sa=Ma=!1;Aa=null;1==I.vertices.length&&0==I.edges.length?Aa=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Aa=I.edges[0].id);null==Aa||N||(Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1)),null!=I.style&&null!=I.style.shape&&Ia.appendChild(la("shape",mxUtils.htmlEntities(I.style.shape),{dispName:"shape",type:"readOnly"},
!0,!1)));for(var Ca in v)if(N=v[Ca],("function"!=typeof N.isVisible||N.isVisible(I,this))&&!N.primary){var Da=null!=N.getValue?N.getValue(I,this):null!=I.style[Ca]?mxUtils.htmlEntities(I.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(I,this):N.defVal;if("separator"==N.type)sa=!sa;else{if("staticArr"==N.type)N.size=parseInt(I.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Sa=[];for(Aa=0;Aa<va.length;Aa++)if(null!=v[va[Aa]]){var Ua=
I.style[va[Aa]];Sa.push(v[va[Aa]].subDefVal);Na.push(null!=Ua?Ua.split(","):[])}N.dependentPropsDefVal=Sa;N.dependentPropsVals=Na}Ia.appendChild(la(Ca,Da,N,Ma,sa));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ia);Ga();
@@ -3410,7 +3411,7 @@ Graph.rewriteGoogleFontUrl(v))):(null==I&&(I='@font-face {\nfont-family: "'+k+'"
5)&&(W=PROXY_URL+"?url="+encodeURIComponent(v)),W={name:k,url:v,elt:Graph.createFontElement(k,W)},N[T]=W,v=N==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=I&&("link"==W.elt.nodeName.toLowerCase()?(W.elt.onload=I,W.elt.onerror=I):I()),null!=v&&v.appendChild(W.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=
k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var I=k[v].getAttribute("data-font-src");if(null!=I){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,I)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(v))}catch(N){}}}return k};Graph.prototype.defaultThemeName="default-style2";
Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=
-[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):I.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);
+[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var I=this.getInsertPoint;this.getInsertPoint=function(T){return null==v||T?I.apply(this,arguments):this.getPointForEvent(v)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var W=this.graph.getCellStyle(T);
if(null!=W&&"rack"==W.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=W.marginLeft||0;U.marginRight=W.marginRight||0;U.marginTop=W.marginTop||0;U.marginBottom=W.marginBottom||0;U.allowGaps=W.allowGaps||0;U.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};
var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,I,N,T,W,U,Y,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};
Graph.prototype.createTagsDialog=function(k,v,I,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function W(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ma=document.createElement("tbody");
@@ -3469,7 +3470,7 @@ mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.x
mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=
function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ka=mxMarker.createMarker;mxMarker.createMarker=function(k,v,I,N,T,W,U,Y,fa,na){if(null!=I&&null==mxMarker.markers[I]){var la=this.getPackageForType(I);null!=la&&mxStencilRegistry.getStencil(la)}return ka.apply(this,arguments)};var ba=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,I,N,T,W){"1"==mxUtils.getValue(v.style,"lineShape",
null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ba.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,I,N){function T(){Ia.value=Math.max(1,Math.min(la,Math.max(parseInt(Ia.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ia.value),parseInt(wa.value))))}function W(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=
-sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);S.value=Math.max(1,Math.min(1600,parseInt(S.value)))+"%";k.lastPrintZoom=S.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ja.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=B.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(S.value)/100;
+sa.checked;ya.checked&&wa.value<Ia.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ia.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=X.checked;k.lastPrintTransparent=ja.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=B.value;var Ka={};Ka.border=parseInt(Q.value);Ka.scale=parseInt(R.value)/100;
Ka.grid=X.checked;Ka.shadows=ia.checked;Ka.transparent=ja.checked;Ka.includeCopy=pa.checked;Ka.sheetsAcross=parseInt(Ea.value);Ka.sheetsDown=parseInt(B.value);Ka.pagesFrom=parseInt(wa.value);Ka.pagesTo=parseInt(Ia.value);Ka.allPages=qa.checked;Ka.selection=Ba.checked;Ka.pageView=Ga.checked;Ka.crop=Ma.checked;Ka.fit=sa.checked;return null!=I?I(!ua,Ka):k.print(!ua,Ka)}var U=k.editor.graph,Y=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";
fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);
mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ia=
@@ -3483,7 +3484,7 @@ var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElemen
k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Sa.appendChild(v);mxUtils.write(Ua,mxResources.get("fitToBy"));var B=Ea.cloneNode(!0);B.setAttribute("value",k.lastPrintSheetsDown||"1");Qa.appendChild(B);mxEvent.addListener(Ea,"click",function(ua){sa.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(B,"click",function(ua){sa.checked=
!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?sa.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Sa);Da.appendChild(Ua);Da.appendChild(Qa);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";
U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(Q);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");
-U.appendChild(v);var S=document.createElement("input");S.style.width="60px";S.style.marginLeft="4px";S.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(S);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,
+U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var X=document.createElement("input");X.setAttribute("type","checkbox");X.style.marginTop="12px";X.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(X);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,
"click",function(ua){X.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,
"click",function(ua){"IMG"!=mxEvent.getSource(ua).nodeName&&(ia.checked=!0,mxEvent.consume(ua))});Editor.enableShadowOption?null!=I&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="10px";ja.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ja),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),
U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ja.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),
@@ -3492,29 +3493,29 @@ mxEvent.addListener(v,"click",function(ua){pa.checked=!0;mxEvent.consume(ua)}));
(Y.classList.add("geDarkMode"),Y.style.colorScheme="dark"):(Y.classList.remove("geDarkMode"),Y.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ra=function(ua,Ka){ua=Ka.getProperty("dialog");Y.parentNode==ua.container&&(k.editor.removeListener(ra),k.removeListener(xa))};k.editor.addListener("hideDialog",ra)}this.container=Y};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.8";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
-"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||"1"==urlParams.dev;EditorUi.isElectronApp=
-null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
-EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',
-numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,g,m,n,x,F,H){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&
-0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(m)+(null!=n?":colno:"+encodeURIComponent(n):"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(M){}try{H||null==window.console||console.error(F,
-c,g,m,n,x)}catch(M){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(m){}};EditorUi.sendReport=function(c,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,
-g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?(mxLog.show(),mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(m){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};
-EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],m=0;m<c.length;m++)g.push(c[m]);for(m=0;m<g.length;m++)EditorUi.replaceSvgImage(g[m])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var m=EditorUi.getSvgSubtree(g);if(null!=m&&"svg"==m.nodeName){var n=m.getAttribute("width"),x=m.getAttribute("height");m.setAttribute("x",c.getAttribute("x"));m.setAttribute("y",
-c.getAttribute("y"));m.setAttribute("width",c.getAttribute("width"));m.setAttribute("height",c.getAttribute("height"));m.style.fontFamily="initial";0<n&&0<x&&null==m.getAttribute("viewBox")&&m.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(m.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(m);c.hasAttribute("transform")&&F.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(H){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);
-c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var m="svg-image-"+Editor.guid();c.setAttribute("id",m);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);for(var H="",M=0;M<x.sheet.cssRules.length;M++){var L=x.sheet.cssRules[M];if(null!=L.selectorText){for(var K=L.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]=
-"#"+m+" "+K[Z];L.selectorText=K.join(",")}H+=L.cssText+"\n"}g[F].textContent=H}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(m=0;m<g.length;m++)g[m].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;
-EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=
-1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme=
-"auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,m){return this.editor.graph.openLink(c,g,m)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=
-function(c,g,m){localStorage.setItem(c,g);null!=m&&m()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=
-function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||
-!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,H=x.spin,M=null,L=null,K=mxUtils.bind(this,
-function(ca){null!=ca&&ca()}),Z=this;x.spin=function(ca,aa,oa,da){da=null!=da?da:F;var ka=!1;if(!this.active){var ba=Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},da));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=Z.diagramContainer,c=ca.scrollLeft+ca.clientWidth/2,g=ca.scrollTop+
-ca.clientHeight/2);H.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=aa&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",aa),ca==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-1)&&
-(aa+="..."),ka.innerText=aa,ca.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(da=Math.max(0,da-(Date.now()-ba)),V=mxUtils.bind(this,function(k){this.spin(ca,aa,oa,da);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,aa,oa,da);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return V});ka=!0}return ka};var ha=x.stop;x.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),M=null),
-null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.2.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.cdn\.prod\.atlassian-dev\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&
+"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging||
+"1"==urlParams.dev;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes=
+"flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{useWidth:1E3,useMaxWidth:!0,titleTopMargin:25,
+barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,g,m,n,x,F,H){if(null!=c){x=null!=x?x:Error(c);x.stack=null!=x.stack?x.stack:"";F=null!=F?F:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&
+0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>x.stack.indexOf("extension:")&&0>x.stack.indexOf("<anonymous>:")&&0>x.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+F+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(m)+(null!=n?":colno:"+
+encodeURIComponent(n):"")+(""!=x.stack?"&stack="+encodeURIComponent(x.stack):""))}catch(M){}try{H||null==window.console||console.error(F,c,g,m,n,x)}catch(M){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(m){}};EditorUi.sendReport=
+function(c,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,c.length>g&&(c=c.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],g=0;g<arguments.length;g++)c.push(arguments[g]);mxClient.IS_IOS?
+(mxLog.show(),mxLog.debug(c.join(" "))):console.log.apply(console,c)}}catch(m){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var g=[],m=0;m<c.length;m++)g.push(c[m]);for(m=0;m<g.length;m++)EditorUi.replaceSvgImage(g[m])};EditorUi.replaceSvgImage=function(c){try{var g=null;g=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var m=
+EditorUi.getSvgSubtree(g);if(null!=m&&"svg"==m.nodeName){var n=m.getAttribute("width"),x=m.getAttribute("height");m.setAttribute("x",c.getAttribute("x"));m.setAttribute("y",c.getAttribute("y"));m.setAttribute("width",c.getAttribute("width"));m.setAttribute("height",c.getAttribute("height"));m.style.fontFamily="initial";0<n&&0<x&&null==m.getAttribute("viewBox")&&m.setAttribute("viewBox","0 0 "+n+" "+x);var F=mxUtils.createElementNs(m.ownerDocument,mxConstants.NS_SVG,"g");F.appendChild(m);c.hasAttribute("transform")&&
+F.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(F,c)}}catch(H){}};EditorUi.getSvgSubtree=function(c){var g=Graph.getSvgFromDataUri(c);c=null;if(null!=g){c=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=c.getElementsByTagName("style");if(0<g.length){var m="svg-image-"+Editor.guid();c.setAttribute("id",m);for(var n=document.implementation.createHTMLDocument(""),x=document.createElement("style"),F=0;F<g.length;F++){x.textContent=g[F].textContent;n.body.appendChild(x);
+for(var H="",M=0;M<x.sheet.cssRules.length;M++){var L=x.sheet.cssRules[M];if(null!=L.selectorText){for(var K=L.selectorText.split(","),Z=0;Z<K.length;Z++)K[Z]="#"+m+" "+K[Z];L.selectorText=K.join(",")}H+=L.cssText+"\n"}g[F].textContent=H}}null!=c.style&&"light dark"==c.style.getPropertyValue("color-scheme")&&c.style.removeProperty("color-scheme");g=c.getElementsByTagName("*");for(m=0;m<g.length;m++)g[m].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,g,m){return this.editor.graph.openLink(c,g,m)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=
+function(c,g){g(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,g,m){localStorage.setItem(c,g);null!=m&&m()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};
+EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||
+!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,H=x.spin,M=null,L=null,
+K=mxUtils.bind(this,function(ca){null!=ca&&ca()}),Z=this;x.spin=function(ca,aa,oa,da){da=null!=da?da:F;var ka=!1;if(!this.active){var ba=Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},da));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=Z.diagramContainer,c=ca.scrollLeft+ca.clientWidth/
+2,g=ca.scrollTop+ca.clientHeight/2);H.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=aa&&(ka=document.createElement("div"),ka.className="geSpinnerStatus",ka.setAttribute("title",aa),ca==document.body?(ka.style.left=Math.max(0,c)+"px",ka.style.top=Math.max(0,g+66)+"px"):(ka.style.left="50%",ka.style.top="50%",ka.style.marginTop="70px"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-
+1)&&(aa+="..."),ka.innerText=aa,ca.appendChild(ka),x.status=ka);this.pause=mxUtils.bind(this,function(){var V=K;this.active&&(da=Math.max(0,da-(Date.now()-ba)),V=mxUtils.bind(this,function(k){this.spin(ca,aa,oa,da);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,aa,oa,da);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return V});ka=!0}return ka};var ha=x.stop;x.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),
+M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};
EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&
17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var m=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&
null!=x.pages&&0<x.pages.length){var H=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<H&&x.movePage(H,H-1)};if(38==F.keyCode)return function(){0<H&&x.movePage(H,0)};if(39==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,H+1)};if(40==F.keyCode)return function(){H<x.pages.length-1&&x.movePage(H,x.pages.length-1)}}else if(mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)){if(37==F.keyCode)return function(){0<H&&x.selectNextPage(!1)};
@@ -3843,7 +3844,7 @@ function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWin
H)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var J=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var g=this.formatWindow;null!=g?g.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):J.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=Math.min(this.diagramContainer.clientWidth,this.defaultSidebarWidth));
var m=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=x;this.refresh();this.diagramContainer.scrollLeft-=m-this.hsplitPosition}),x=c?g:0,F=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(0)":"translateX(-100%)");0!=x&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==x?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
"transition","transform "+F+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==x&&n()}),1E3*F)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};
-var R=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():R.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(H,M){var L=this.menus.get(H);H=this.createMenuElement(M,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",M);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
+var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var g=mxUtils.bind(this,function(H,M){var L=this.menus.get(H);H=this.createMenuElement(M,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",M);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),c.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var m=g("newLibrary","");m.style.left="0px";m.style.right="50%";var n=document.createElement("span");m.appendChild(n);var x=g("openLibraryFrom","");x.style.borderLeftWidth="1px";x.style.left="50%";x.style.right="0px";var F=document.createElement("span");x.appendChild(F);this.dependsOnLanguage(mxUtils.bind(this,
function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));m.setAttribute("title",mxResources.get("newLibrary"));F.innerHTML="";mxUtils.write(F,mxResources.get("openLibraryFrom"));x.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
@@ -3980,7 +3981,7 @@ m[sa].replace(/\r$/,"");for(sa++;sa<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m
Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ha=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ba=va:"parent"==Da&&0<va.length&&"-"!=va?V=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?I=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?W=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):
"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[sa].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ba==Na[va]&&(c=va),V==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ia&&(Ia="%"+Da[0]+"%");if(null!=Ba)for(var Sa=0;Sa<Ba.length;Sa++)null==
M[Ba[Sa].to]&&(M[Ba[Sa].to]={});ba=[];for(va=sa+1;va<m.length;va++){var Ua=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Ua){var Qa=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Qa+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ua.length&&ba.push(Ua)}L.model.beginUpdate();try{for(va=0;va<ba.length;va++){Ua=ba[va];var za=null,Ea=null!=c?k+Ua[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=mxUtils.indexOf(n,za));var B=new mxCell(Ia,new mxGeometry(ya,
-qa,0,0),Z||"whiteSpace=wrap;html=1;");B.collapsed=N;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)L.setAttributeForCell(B,Da[Q],Ua[Q]),null==za||m||L.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=aa&&null!=da){var S=da[B.getAttribute(aa)];null!=S&&(L.labelChanged(B,S),null==za||m||L.cellLabelChanged(za,S))}if(null!=ca&&null!=ha){var X=ha[B.getAttribute(ca)];null!=X&&(B.style=X)}L.setAttributeForCell(B,"placeholders","1");B.style=L.replacePlaceholders(B,B.style,
+qa,0,0),Z||"whiteSpace=wrap;html=1;");B.collapsed=N;B.vertex=!0;B.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var Q=0;Q<Ua.length;Q++)L.setAttributeForCell(B,Da[Q],Ua[Q]),null==za||m||L.setAttributeForCell(za,Da[Q],Ua[Q]);if(null!=aa&&null!=da){var R=da[B.getAttribute(aa)];null!=R&&(L.labelChanged(B,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ha){var X=ha[B.getAttribute(ca)];null!=X&&(B.style=X)}L.setAttributeForCell(B,"placeholders","1");B.style=L.replacePlaceholders(B,B.style,
K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[B])):(L.model.setStyle(za,B.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=B;if(!m)for(Sa=0;Sa<Ba.length;Sa++)M[Ba[Sa].to][za.getAttribute(Ba[Sa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);V=null!=Ca?L.model.getCell(k+Ua[Ca]):null;if(za.vertex){Qa=
null!=V?0:ya;sa=null!=V?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Qa+parseFloat(za.getAttribute(T)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=sa+parseFloat(za.getAttribute(W)));var ja="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ja&&"auto"!=ja?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ja?ia.width+na:parseFloat(v);var pa="@"==I.charAt(0)?za.getAttribute(I.substring(1)):null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=
I?parseFloat(pa):"auto"==I||"auto"==pa?ia.height+na:"width"==I?za.geometry.width:parseFloat(I);qa+=za.geometry.height+Y}m?(null==H[Ea]&&(H[Ea]=[]),H[Ea].push(za)):(n.push(za),null!=V?(V.style=L.replacePlaceholders(V,ka,K),L.addCell(za,V),x.push(V)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ja="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==I.charAt(0)?x[va].getAttribute(I.substring(1)):null,"auto"!=v&&"auto"!=ja||"auto"!=I&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=
@@ -4035,12 +4036,12 @@ return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n
"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,f,l,u,y,q){function C(){for(var da=M.getElementsByTagName("div"),ka=0,ba=0;ba<da.length;ba++)"none"!=da[ba].style.display&&da[ba].parentNode==M&&ka++;L.style.display=0==ka?"block":"none"}function J(da,ka,ba,V){function k(){ka.removeChild(N);ka.removeChild(T);I.style.display="block";v.style.display="block"}x={div:ka,comment:da,saveCallback:ba,deleteOnCancel:V};var v=ka.querySelector(".geCommentTxt"),I=ka.querySelector(".geCommentActionsList"),N=document.createElement("textarea");
N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=da.content;ka.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var W=mxUtils.button(mxResources.get("cancel"),function(){V?(ka.parentNode.removeChild(ka),C()):k();x=null});W.className="geCommentEditBtn";T.appendChild(W);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";da.content=N.value;mxUtils.write(v,da.content);k();ba(da);x=null});mxEvent.addListener(N,"keydown",
-mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);I.style.display="none";v.style.display="none";N.focus()}function R(da,ka){ka.innerText="";da=new Date(da.modifiedDate);var ba=b.timeSince(da);null==ba&&(ba=mxResources.get("lessThanAMinute"));
+mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(W.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ka.insertBefore(T,v);I.style.display="none";v.style.display="none";N.focus()}function S(da,ka){ka.innerText="";da=new Date(da.modifiedDate);var ba=b.timeSince(da);null==ba&&(ba=mxResources.get("lessThanAMinute"));
mxUtils.write(ka,mxResources.get("timeAgo",[ba],"{1} ago"));ka.setAttribute("title",da.toLocaleDateString()+" "+da.toLocaleTimeString())}function D(da){var ka=document.createElement("img");ka.className="geCommentBusyImg";ka.src=IMAGE_PATH+"/spin.gif";da.appendChild(ka);da.busyImg=ka}function P(da){da.style.border="1px solid red";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function c(da){da.style.border="";da.busyImg.parentNode==da&&da.removeChild(da.busyImg)}function g(da,ka,ba,V,k){function v(na,
la,qa){var ya=document.createElement("li");ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ia){la(Ia,da);Ia.preventDefault();mxEvent.consume(Ia)});fa.appendChild(ya);qa&&(ya.style.display="none")}function I(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(da);return{pdiv:qa,
replies:la}}function N(na,la,qa,ya,wa){function Ia(){D(Ma);da.addReply(Ga,function(sa){Ga.id=sa;da.replies.push(Ga);c(Ma);qa&&qa()},function(sa){Aa();P(Ma);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){J(Ga,Ma,function(sa){Ia()},!0)}var Ba=I().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=da.id;null==da.replies&&(da.replies=[]);var Ma=g(Ga,da.replies,Ba,V+1);la?Aa():Ia()}if(k||!da.isResolved){L.style.display="none";var T=
document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",da.id);T.style.marginLeft=20*V+5+"px";da.isResolved&&(F.style.opacity="0.7");var W=document.createElement("div");W.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=da.user&&null!=da.user.pictureUrl?da.user.pictureUrl:Editor.userImage;W.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";W.appendChild(U);var Y=document.createElement("div");
-Y.className="geCommentUsername";mxUtils.write(Y,null!=da.user?da.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",da.id);R(da,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,da.content||"");T.appendChild(W);da.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
+Y.className="geCommentUsername";mxUtils.write(Y,null!=da.user?da.user.displayName:mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",da.id);S(da,Y);U.appendChild(Y);T.appendChild(W);W=document.createElement("div");W.className="geCommentTxt";mxUtils.write(W,da.content||"");T.appendChild(W);da.isLocked&&(T.style.opacity="0.5");W=document.createElement("div");W.className="geCommentActions";var fa=document.createElement("ul");
fa.className="geCommentActionsList";W.appendChild(fa);m||da.isLocked||0!=V&&!n||v(mxResources.get("reply"),function(){N("",!0)},da.isResolved);U=b.getCurrentUser();null==U||null==da.user||U.id!=da.user.id||m||da.isLocked||(v(mxResources.get("edit"),function(){function na(){J(da,T,function(){D(T);da.editComment(da.content,function(){c(T)},function(la){P(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},da.isResolved),v(mxResources.get("delete"),
function(){b.confirm(mxResources.get("areYouSure"),function(){D(T);da.deleteComment(function(na){if(!0===na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=I(da).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<ka.length;na++)if(ka[na]==da){ka.splice(na,1);break}L.style.display=0==
M.getElementsByTagName("div").length?"block":"none"}},function(na){P(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},da.isResolved));m||da.isLocked||0!=V||v(da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";da.isResolved=!da.isResolved;mxUtils.write(qa,da.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=da.isResolved?"none":"",wa=I(da).replies,Ia=
@@ -4052,11 +4053,11 @@ ba<da.replies.length;ba++)W=da.replies[ba],W.isResolved=da.isResolved,g(W,da.rep
mxEvent.consume(da)}),K.appendChild(Z));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className="geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(da){q();da.preventDefault();mxEvent.consume(da)}),K.appendChild(H));F.appendChild(K);var aa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var da=x.div.querySelector(".geCommentEditTxtArea"),
ka=x.div.querySelector(".geCommentEditBtns");x.comment.content=da.value;da.parentNode.removeChild(da);ka.parentNode.removeChild(ka)}catch(ba){b.handleError(ba)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ba){function V(k){if(null!=k){k.sort(function(I,N){return new Date(I.modifiedDate)-new Date(N.modifiedDate)});
for(var v=0;v<k.length;v++)V(k[v].replies)}}ba.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";aa=ba;for(ba=0;ba<aa.length;ba++)V(aa[ba].replies),g(aa[ba],aa,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),J(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ba){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ba&&ba.message?": "+ba.message:
-""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function da(v){var I=ba[v.id];if(null!=I)for(R(v,I),I=0;null!=v.replies&&I<v.replies.length;I++)da(v.replies[I])}if(this.window.isVisible()){for(var ka=M.querySelectorAll(".geCommentDate"),ba={},V=0;V<ka.length;V++){var k=ka[V];ba[k.getAttribute("data-commentId")]=k}for(V=0;V<aa.length;V++)da(aa[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
-new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,C,J,R,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
+""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function da(v){var I=ba[v.id];if(null!=I)for(S(v,I),I=0;null!=v.replies&&I<v.replies.length;I++)da(v.replies[I])}if(this.window.isVisible()){for(var ka=M.querySelectorAll(".geCommentDate"),ba={},V=0;V<ka.length;V++){var k=ka[V];ba[k.getAttribute("data-commentId")]=k}for(V=0;V<aa.length;V++)da(aa[V])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
+new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,C,J,S,D,P){var c=document.createElement("div");c.style.textAlign="center";P=null!=P?P:44;var g=
document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=P+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=D&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",D),g.appendChild(f),c.appendChild(g));D=document.createElement("div");D.style.textAlign="center";D.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||
mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=J&&(q.innerHTML=J+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&D.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});D.appendChild(n);null!=C?(n.innerHTML=C+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom=
-"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);R?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):
+"8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||D.appendChild(q);c.appendChild(D);S?(D.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(m),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),g.appendChild(y),c.appendChild(g),mxEvent.addListener(y,"click",function(x){m.checked=!m.checked;mxEvent.consume(x)})):
D.style.marginTop="12px";this.init=function(){n.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,l){this.ui=b;this.page=f;this.previous=this.name=l}
RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,f,l){this.ui=b;this.oldIndex=f;this.newIndex=l}
@@ -4077,7 +4078,7 @@ function(){var C=l.apply(this,arguments);null!=y.currentPage&&u!=y.currentPage&&
this.editor.addListener("pageSelected",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(C,J){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
EditorUi.prototype.scrollToPage=function(b,f){var l=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),u=null!=b?b:this.currentPage;null!=l&&null!=this.tabScroller&&this.tabScroller.children.length>l&&null!=this.tabScroller.children[l]&&(u!=this.lastScrollPage||f)&&(this.tabScroller.children[l].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[l].className="geTab gePageTab geActivePage",this.lastScrollPage=u)};
EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var u=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(u.setViewState(f),this.editor.updateGraphComponents(),u.view.revalidate(),u.sizeDidChange()),u.container.scrollLeft=u.view.translate.x*u.view.scale+f.scrollLeft,u.container.scrollTop=u.view.translate.y*u.view.scale+f.scrollTop,u.restoreSelection(l))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),J=b.getAttribute("extFonts");if(J)try{J=J.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}})}catch(R){console.log("ExtFonts format error: "+R.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),u=parseFloat(b.getAttribute("pageWidth")),y=parseFloat(b.getAttribute("pageHeight")),q=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),J=b.getAttribute("extFonts");if(J)try{J=J.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=q&&0<q.length?q:null,backgroundImage:C,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(u)||isNaN(y)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,u,y),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:J||[]}};
Graph.prototype.saveViewState=function(b,f,l,u,y){l||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),
@@ -4101,7 +4102,7 @@ EditorUi.prototype.insertPage=function(b,f,l){this.editor.graph.isEnabled()&&(th
EditorUi.prototype.createPage=function(b,f,l){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,l);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};
EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var u=this.currentPage;u==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,u=this.pages[l]):1>=this.pages.length&&(u=this.insertPage(),f.model.execute(new RenamePage(this,u,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,u))}finally{f.model.endUpdate()}}}catch(y){this.handleError(y)}return b};
EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var u=this.editor.graph;if(u.isEnabled()){u.isEditing()&&u.stopEditing();var y=b.node.cloneNode(!1);y.removeAttribute("id");var q={},C=u.createCellLookup([u.model.root]);l=new DiagramPage(y);l.root=u.cloneCell(u.model.root,null,q);var J=new mxGraphModel;J.prefix=Editor.guid()+"-";J.setRoot(l.root);u.updateCustomLinks(u.createCellMapping(q,C),[l.root]);l.viewState=b==this.currentPage?u.getViewState():b.viewState;this.initDiagramNode(l);
-l.viewState.scale=1;delete l.viewState.scrollLeft;delete l.viewState.scrollTop;delete l.viewState.currentRoot;delete l.viewState.defaultParent;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(R){this.handleError(R)}return l};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
+l.viewState.scale=1;delete l.viewState.scrollLeft;delete l.viewState.scrollTop;delete l.viewState.currentRoot;delete l.viewState.defaultParent;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return l};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
EditorUi.prototype.clonePages=function(b){for(var f=[],l=[],u=0;u<b.length;u++)try{l.push(this.clonePage(b[u]))}catch(y){f.push(mxResources.get("pageWithNumber",[u+1])+": "+y.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<l.length&&(b.fallbackFileData=this.getXmlForPages(l))}catch(y){}throw b;}return l};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
@@ -4118,15 +4119,15 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(n
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(y,q){this.menus.get("pages").funct(y,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var l=mxEvent.getClientX(b),u=mxEvent.getClientY(b);f.popup(l,
u,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var l=this.createTab(),u=b.getName()||mxResources.get("untitled"),y=b.getId();l.setAttribute("title",u+(null!=y?" ("+y+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,u);l.appendChild(f);this.addTabListeners(b,l);return l};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(R){this.renamePage(b);mxEvent.consume(R)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(R){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),J=mxUtils.bind(this,
-function(R){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(R)||mxEvent.getSource(R)==u)||mxEvent.isPopupTrigger(R))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(R)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(R),c=mxEvent.getClientY(R);D.popup(P,c,null,R);
-this.setCurrentMenu(D,f)}mxEvent.consume(R)});mxEvent.addGestureListeners(u,C,null,J);mxEvent.addGestureListeners(f,C,null,J)};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var u=document.createElement("div");u.style.backgroundImage="url("+Editor.thinExpandImage+")";u.className="geButton";f.appendChild(u);var y=!1,q=!1,C=mxUtils.bind(this,function(S){y=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||q||this.selectPage(b)}),J=mxUtils.bind(this,
+function(S){if(!l.isMouseDown&&(q&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==u)||mxEvent.isPopupTrigger(S))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!y)){var D=new mxPopupMenu(this.createPageMenu(b));D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var P=mxEvent.getClientX(S),c=mxEvent.getClientY(S);D.popup(P,c,null,S);
+this.setCurrentMenu(D,f)}mxEvent.consume(S)});mxEvent.addGestureListeners(u,C,null,J);mxEvent.addGestureListeners(f,C,null,J)};
EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,u){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),u));this.editor.graph.isEnabled()&&(l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
-[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,J){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var R=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(u,q[D]);q=R;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=
-[];this.traverse(y,!0,mxUtils.bind(this,function(J,R){var D=null!=R&&this.isTreeEdge(R);D&&q.push(R);J==y||null!=R&&!D||q.push(J);return(null==R||D)&&(J==y||!this.model.isCollapsed(J))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,J,R){return this.model.filterCells(this.getEdges(u,y,q,C,J,R),mxUtils.bind(this,
+[b.getName()]))}),u),l.addSeparator(u),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,u,mxResources.get("move")),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),u),l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),u))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(u,y,q,C,J){y=null!=y?y:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),u));this.stopEditing();this.model.beginUpdate();try{for(var S=q.slice(),D=0;D<q.length;D++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[D]),"treeFolding","0")&&this.foldTreeCell(u,q[D]);q=S;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(u,y){this.model.beginUpdate();try{var q=
+[];this.traverse(y,!0,mxUtils.bind(this,function(J,S){var D=null!=S&&this.isTreeEdge(S);D&&q.push(S);J==y||null!=S&&!D||q.push(J);return(null==S||D)&&(J==y||!this.model.isCollapsed(J))}));this.model.setCollapsed(y,u);for(var C=0;C<q.length;C++)this.model.setVisible(q[C],!u)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(u){return!this.isEdgeIgnored(u)};Graph.prototype.getTreeEdges=function(u,y,q,C,J,S){return this.model.filterCells(this.getEdges(u,y,q,C,J,S),mxUtils.bind(this,
function(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function u(V){return x.isVertex(V)&&q(V)}function y(V){var k=!1;null!=V&&(k="1"==
n.getCurrentCellStyle(V).treeMoving);return k}function q(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),k="tree"==(null!=k?k.style:n.getCellStyle(V)).containerType);return k}function C(V){var k=!1;null!=V&&(V=x.getParent(V),k=n.view.getState(V),n.view.getState(V),k=null!=(null!=k?k.style:n.getCellStyle(V)).childLayout);return k}function J(V){V=n.view.getState(V);if(null!=V){var k=n.getIncomingTreeEdges(V.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=
-k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function R(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=n.cloneCells([I[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(I[0],
+k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==V.y&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==V.y+V.height&&Math.abs(k.x-V.getCenterX())<V.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>V.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(V,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(V),I=n.getIncomingTreeEdges(V),N=n.cloneCells([I[0],V]);n.model.setTerminal(N[0],n.model.getTerminal(I[0],
!0),!0);var T=J(V),W=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?V.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?V.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=W.x,N[1].geometry.y-=W.y);var U=n.view.getState(V),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?V.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=
(k?V.geometry.height+10:-N[1].geometry.height-10)*Y;var na=n.getOutgoingTreeEdges(n.model.getTerminal(I[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=W=I=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==J(ya)){var wa=n.view.getState(ya);ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(I=10+Math.max(I,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/
Y),W=10+Math.max(W,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?W=0:I=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==J(ya)&&(wa=n.view.getState(ya),ya!=V&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ia=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ia.push(Ba);(null==Ba||Ga)&&Ia.push(Aa);return null==Ba||Ga});n.moveCells(Ia,(k?1:-1)*I,(k?1:-1)*W)}}}return n.addCells(N,
@@ -4147,30 +4148,30 @@ Y.push(V[fa]);V=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var
null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=V&&U.length==V.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(u(V[fa])&&(la=n.getIncomingTreeEdges(V[fa]),0<la.length))if(!I)u(Y)&&0>mxUtils.indexOf(V,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==
n.getIncomingTreeEdges(U[fa]).length){na=Y;if(null==na||na==n.model.getParent(V[fa]))na=n.model.getTerminal(la[0],!0);I=this.cloneCell(la[0]);this.addEdge(I,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(V,k,v,I){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(V))for(var W=0;W<T.length;W++)if(N.isEdge(T[W])&&null==N.getTerminal(T[W],!0)){N.setTerminal(T[W],V,!0);var U=
n.getCellGeometry(T[W]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var Z={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ha={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(V){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(V)&&mxEvent.isShiftDown(V)?
-Z[V.keyCode]:mxEvent.isAltDown(V)?ha[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=R(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
+Z[V.keyCode]:mxEvent.isAltDown(V)?ha[V.keyCode]:null;null!=v?(v.funct(V),mxEvent.consume(V)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==V.which?v=mxEvent.isShiftDown(V)?D(k):P(k):13==V.which&&(v=S(k,!mxEvent.isShiftDown(V)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(V)):37==V.keyCode?(g(k,mxConstants.DIRECTION_WEST),
mxEvent.consume(V)):38==V.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(V)):39==V.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(V)):40==V.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(V)))}}catch(I){m.handleError(I)}mxEvent.isConsumed(V)||ca.apply(this,arguments)};var aa=n.connectVertex;n.connectVertex=function(V,k,v,I,N,T,W){var U=n.getIncomingTreeEdges(V);if(u(V)){var Y=J(V),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||
-k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==na?D(V):R(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!u(V)||C(V)||n.traverse(V,!0,function(v,I){var N=null!=I&&n.isTreeEdge(I);N&&0>mxUtils.indexOf(k,I)&&k.push(I);(null==I||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==I||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,
+k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?P(V,k):fa==na?D(V):S(V,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};n.getSubtree=function(V){var k=[V];!y(V)&&!u(V)||C(V)||n.traverse(V,!0,function(v,I){var N=null!=I&&n.isTreeEdge(I);N&&0>mxUtils.indexOf(k,I)&&k.push(I);(null==I||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==I||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,
arguments);(y(this.state.cell)||u(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(V){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(V);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(V)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var da=mxVertexHandler.prototype.redrawHandles;
mxVertexHandler.prototype.redrawHandles=function(){da.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(V){ka.apply(this,arguments);null!=
this.moveHandle&&(this.moveHandle.style.display=V?"":"none")};var ba=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(V,k){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var u=l.apply(this,arguments),y=this.graph,q=this;return u.concat([this.addEntry("tree container",
-function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var R=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);R.insertEdge(D,!1);C.insert(D);C.insert(J);C.insert(R);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,
-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var R=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);R.insertEdge(D,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);C.insert(D);C.insert(J);C.insert(S);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,
+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var J=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),D.style);c.geometry.relative=!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),D.style);m.geometry.relative=!0;m.edge=!0;J.insertEdge(m,!0);g.insertEdge(m,!1);var n=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;J.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(D);C.insert(c);C.insert(m);C.insert(x);C.insert(J);C.insert(R);C.insert(P);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),D.style);x.geometry.relative=!0;x.edge=!0;J.insertEdge(x,!0);n.insertEdge(x,!1);C.insert(D);C.insert(c);C.insert(m);C.insert(x);C.insert(J);C.insert(S);C.insert(P);C.insert(g);C.insert(n);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
C.vertex=!0;return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var C=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var C=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
J.geometry.setTerminalPoint(new mxPoint(-40,40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree orgchart organization division",function(){var C=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(J,"treeRoot","1");J.vertex=!0;var R=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);R.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);C.insert(D);C.insert(c);C.insert(J);C.insert(R);C.insert(P);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(J,"treeRoot","1");J.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+D.geometry.relative=!0;D.edge=!0;J.insertEdge(D,!0);S.insertEdge(D,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;J.insertEdge(c,!0);P.insertEdge(c,!1);C.insert(D);C.insert(c);C.insert(J);C.insert(S);C.insert(P);return q.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return q.createVertexTemplateFromCells([C],
C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree division",function(){var C=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
J.geometry.setTerminalPoint(new mxPoint(0,0),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);return q.createVertexTemplateFromCells([C,J],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree sub sections",function(){var C=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");C.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);var R=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");R.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),J.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;R.insertEdge(D,!1);return q.createVertexTemplateFromCells([J,D,C,R],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),J.style);D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;S.insertEdge(D,!1);return q.createVertexTemplateFromCells([J,D,C,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.formatWindow?(D.formatWindow=new WrapperWindow(D,"",Math.max(10,D.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";D.createFormat(g).init()}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.formatWindow.window.setTitle(mxResources.get("format"))})),D.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){D.formatWindow.window.fit()})),D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):D.formatWindow.window.setVisible(null!=P?P:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeftWidth="1px",D.formatElt.style.borderLeftStyle="solid",D.formatElt.style.right="0px"),P=D.diagramContainer.parentNode,
null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),P.style.right="0px"):(P.parentNode.appendChild(D.formatElt),P.style.right=D.formatElt.style.width)}function f(D,P){if(EditorUi.windowed){var c=D.editor.graph;c.popupMenuHandler.hideMenu();null==D.sidebarWindow?(D.sidebarWindow=new WrapperWindow(D,"",10,56,Math.min(c.container.clientWidth-10,218)-6,Math.min(c.container.clientHeight-40,650)-6,function(g){D.createShapesPanel(g)}),D.dependsOnLanguage(mxUtils.bind(this,function(){D.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
@@ -4183,11 +4184,11 @@ function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?
arguments);if(D){var P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=P&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=P&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};EditorUi.prototype.installFormatToolbar=function(D){var P=
this.editor.graph,c=document.createElement("div");c.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";P.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<P.getSelectionCount()?(D.appendChild(c),c.innerHTML="Selected: "+P.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var J=!1;EditorUi.prototype.initFormatWindow=
function(){if(!J&&null!=this.formatWindow){J=!0;var D=this.formatWindow.window.toggleMinimized,P=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(P=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+P-140+"px"):(this.div.style.width=P+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-P+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(I,N,T){var W=n.menus.get(I);N=H.addMenu(mxResources.get(I),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(I));n.menus.menuCreated(W,N,"geButton");null!=T&&
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(I,N,T){var W=n.menus.get(I);N=H.addMenu(mxResources.get(I),mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(I));n.menus.menuCreated(W,N,"geButton");null!=T&&
(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function P(I,N,T,W,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,I);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=W&&fa.setAttribute("title",W);null!=U&&(I=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",
"disabled")},U.addListener("stateChanged",I),x.addListener("enabledChanged",I),I());return fa}function c(I,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<I.length;T++)null!=I[T]&&N.appendChild(I[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var I=1E3>l,N=D("diagram",null,I?Editor.menuImage:null);c([N,P(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),
n.actions.get("image"),I?Editor.shapesImage:null),P(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),I?Editor.formatImage:null)]);N=D("insert",!0,I?ha:null);c([N,P(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),I?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");V.setAttribute("title",mxResources.get("undo")+
-" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ba.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([V,k]),520<=l&&c([v,640<=l?P("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?P("",da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",da,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}R.apply(this,arguments);var m=
+" ("+ka.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ba.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([V,k]),520<=l&&c([v,640<=l?P("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?P("",da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",da,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=
mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var H=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var I=n.getCurrentFile();if(null!=I&&null!=I.getTitle()){var N=
I.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",I.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),Z=n.updateTabContainer;
@@ -4195,7 +4196,7 @@ n.updateTabContainer=function(){Z.apply(this,arguments);n.tabContainer.appendChi
var oa=n.actions.get("zoomIn"),da=n.actions.get("zoomOut");m=n.actions.get("resetView");var ka=n.actions.get("undo"),ba=n.actions.get("redo"),V=P("",ka.funct,null,"",ka,Editor.undoImage),k=P("",ba.funct,null,"",ba,Editor.redoImage),v=P("",function(I){mxEvent.isAltDown(I)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(I)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,
null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&
n.actions.layersWindow.window.fit();null!=n.menus.chatWindow&&n.menus.chatWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on Connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Был обнаружен черновик \'{1}\'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfindInDiagram=Find in Diagram\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to Right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste Here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to Left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate Shape Only by 90°\ntype=Type\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\nconfACacheMapping=Cache page IDs mapping\nconfARemImpPages=Remember imported pages\ndelCachedData=Delete Cached Data\nk15tPagesError=Error retrieving Scroll pages. Is Scroll Versions installed?\ndrawioUninstalled=draw.io has been uninstalled, the editor will now close\nconfAttachmentArchived=Diagram belongs to an archived page and cannot be loaded. Restore the page (ID: {1}) to load it.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,l){this.init(b,f,l)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;GraphViewer.prototype.darkMode=null;
GraphViewer.prototype.init=function(b,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=
@@ -4204,13 +4205,13 @@ this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(
null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var u=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=f&&(this.xmlDocument=f.ownerDocument,this.xmlNode=f,this.xml=mxUtils.getXml(f),null!=b)){var y=
mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var J=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?J.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(J.style.padding="8px");J.style.forcedColorAdjust="none";J.style.boxSizing="border-box";J.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var x=
this.view.graphBounds,F=this.view.translate;J.setAttribute("viewBox",x.x+F.x-this.panDx+" "+(x.y+F.y-this.panDy)+" "+(x.width+1)+" "+(x.height+1));this.container.style.backgroundColor=J.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",x))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(x){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var R=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=R&&R!=f)try{this.xml=mxUtils.getXml(R),this.xmlNode=R,this.xmlDocument=R.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return u.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
-this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(R=0;R<D.length;R++)if(this.pageId==D[R].getAttribute("id")){this.currentPage=R;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[u.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(u.currentPage+1):"pagenumber"==x?u.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
-mxUtils.mod(x,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(x){x=this.getIndexById(x);var F=0<=x;F&&this.selectPage(x);return F};R=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var g=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(x){if(null!=x&&
+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=f)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(x){}this.graph.getImageFromBundles=function(x){return u.getImageUrl(x)};this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var D=
+this.xmlNode.getElementsByTagName("diagram");if(0<D.length){if(null!=this.pageId)for(S=0;S<D.length;S++)if(this.pageId==D[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(x){var F=D[u.currentPage];return"page"==x?F.getAttribute("name")||"Page-"+(u.currentPage+1):"pagenumber"==x?u.currentPage+1:"pagecount"==x?D.length:P.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(x){this.handlingResize||(this.currentPage=
+mxUtils.mod(x,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(x){x=this.getIndexById(x);var F=0<=x;F&&this.selectPage(x);return F};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var g=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(x){if(null!=x&&
Graph.isPageLink(x.src)){var F=x.src,H=F.indexOf(",");0<H&&(H=u.getIndexById(F.substring(H+1)),0<=H&&(x=u.getImageForGraphModel(Editor.parseDiagramNode(u.diagrams[H])),x.originalSrc=F))}g.apply(this,arguments)};var m=this.graph.getGraphBounds;this.graph.getGraphBounds=function(x){var F=m.apply(this,arguments);x=this.backgroundImage;if(null!=x){var H=this.view.translate,M=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((H.x+x.x)*M,(H.y+x.y)*M,x.width*M,x.height*M))}return F};this.addListener("xmlNodeChanged",
-R);R();urlParams.page=u.currentPage;R=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,R=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
+S);S();urlParams.page=u.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
(this.graph.panningHandler.isForcePanningEvent=function(x){return!mxEvent.isPopupTrigger(x.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||
-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=R&&this.setLayersVisible(R);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var H=x.indexOf(",");u.selectPageById(x.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=
+this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(x,F){try{if(Graph.isPageLink(x)){var H=x.indexOf(",");u.selectPageById(x.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var M=
this.getGraphBounds();this.handleCustomLink(x,F);M.equals(this.getGraphBounds())||u.crop()}}catch(L){alert(L.message)}return!0};var n=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof l){var q=
this.getObservableParent(b),C=new l(mxUtils.bind(this,function(J){0<b.offsetWidth&&(C.disconnect(),y())}));C.observe(q,{attributes:!0})}else y()}};
GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var f=b.background,l=mxUtils.bind(this,function(u){"none"==b.getAdaptiveColors()&&null==f&&(this.isDarkMode()?b.background="#ffffff":b.background=null,u&&b.view.validateBackground())});this.addListener("graphChanged",
@@ -4223,23 +4224,23 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var f=!0;if(!this.autoOrigin){var l=[],u=this.graph.getModel();u.beginUpdate();try{for(var y=0;y<u.getChildCount(u.root);y++){var q=u.getChildAt(u.root,y);f=f&&u.isVisible(q);l.push(u.isVisible(q));u.setVisible(q,null!=b?b[y]:!0)}}finally{u.endUpdate()}}return f?null:l};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var f=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),f=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};f&&this.setLayersVisible(f)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),l=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var u=mxUtils.bind(this,function(){if(!l){l=!0;var J=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?J.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){J=b.getBoundingClientRect();var R=mxUtils.getScrollOrigin(document.body);
-R="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-R.x,top:-R.y};J={left:J.left-R.left,top:J.top-R.top,bottom:J.bottom-R.top,right:J.right-R.left};this.toolbar.style.left=J.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=J.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=J.top+1+"px"):this.toolbar.style.top=J.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());l=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(J){var R=b.offsetWidth;R==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=J?J:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},y=R,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,f=this.graph.getGraphBounds(),l=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var u=mxUtils.bind(this,function(){if(!l){l=!0;var J=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?J.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){J=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};J={left:J.left-S.left,top:J.top-S.top,bottom:J.bottom-S.top,right:J.right-S.left};this.toolbar.style.left=J.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=J.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=J.top+1+"px"):this.toolbar.style.top=J.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());l=!1}}),y=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(J){var S=b.offsetWidth;S==y||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=J?J:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},y=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",u),this.graph.addListener("size",u)):new ResizeSensor(this.graph.container,u));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,f.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,f.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var q=y=null;u=mxUtils.bind(this,function(){window.clearTimeout(q);this.handlingResize||(q=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",u):new ResizeSensor(this.graph.container,u))}else 9>=document.documentMode||this.graph.addListener("size",
-u);var C=mxUtils.bind(this,function(J){var R=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==J&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(J=null,null!=D&&f.height+2*this.graph.border>D-2&&(J=(D-2*this.graph.border-2)/f.height),this.fitGraph(J)):this.widthIsEmpty||
-null!=J||0!=this.graphConfig.resize||""==b.style.height?(J=null!=J?J:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+J.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+J.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=R});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(J){f=this.graph.getGraphBounds();y=null;C(J)}};
+u);var C=mxUtils.bind(this,function(J){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var D=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==J&&this.allowZoomOut&&(this.allowZoomIn||f.width+2*this.graph.border>b.offsetWidth||f.height+2*this.graph.border>D)?(J=null,null!=D&&f.height+2*this.graph.border>D-2&&(J=(D-2*this.graph.border-2)/f.height),this.fitGraph(J)):this.widthIsEmpty||
+null!=J||0!=this.graphConfig.resize||""==b.style.height?(J=null!=J?J:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-f.x/this.graph.view.scale)+J.x,Math.floor(this.graph.border-f.y/this.graph.view.scale)+J.y),y=b.offsetWidth):this.graph.center((!this.widthIsEmpty||f.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(C,0):C();this.positionGraph=function(J){f=this.graph.getGraphBounds();y=null;C(J)}};
GraphViewer.prototype.crop=function(){var b=this.graph,f=b.getGraphBounds(),l=b.border,u=b.view.scale;b.view.setTranslate(null!=f.x?Math.floor(b.view.translate.x-f.x/u+l):l,null!=f.y?Math.floor(b.view.translate.y-f.y/u+l):l)};GraphViewer.prototype.updateContainerWidth=function(b,f){b.style.width=f+"px"};GraphViewer.prototype.updateContainerHeight=function(b,f){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=f+"px"};
-GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var J=0;J<u.length;J++){var R=b.getCell(u[J]);null!=R&&(f=!0,q[R.id]=!0)}else for(J=0;J<l.length;J++)R=b.getChildAt(b.root,parseInt(l[J])),null!=R&&(f=!0,q[R.id]=!0);for(J=0;f&&
-J<C;J++)R=b.getChildAt(b.root,J),b.setVisible(R,q[R.id]||!1)}else for(J=0;J<C;J++)b.setVisible(b.getChildAt(b.root,J),f.isVisible(f.getChildAt(f.root,J)))}finally{b.endUpdate()}q=!0}return q};
+GraphViewer.prototype.showLayers=function(b,f){var l=this.graphConfig.layers;l=null!=l&&0<l.length?l.split(" "):[];var u=this.graphConfig.layerIds,y=null!=u&&0<u.length,q=!1;if(0<l.length||y||null!=f){f=null!=f?f.getModel():null;b=b.getModel();b.beginUpdate();try{var C=b.getChildCount(b.root);if(null==f){f=!1;q={};if(y)for(var J=0;J<u.length;J++){var S=b.getCell(u[J]);null!=S&&(f=!0,q[S.id]=!0)}else for(J=0;J<l.length;J++)S=b.getChildAt(b.root,parseInt(l[J])),null!=S&&(f=!0,q[S.id]=!0);for(J=0;f&&
+J<C;J++)S=b.getChildAt(b.root,J),b.setVisible(S,q[S.id]||!1)}else for(J=0;J<C;J++)b.setVisible(b.getChildAt(b.root,J),f.isVisible(f.getChildAt(f.root,J)))}finally{b.endUpdate()}q=!0}return q};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.display="flex";f.style.alignItems="center";f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=
this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";f.style.height=this.toolbarHeight+"px";var l=mxUtils.bind(this,function(){this.isDarkMode()?(f.classList.add("geDarkMode"),f.style.colorScheme="dark"):(f.classList.remove("geDarkMode"),f.style.colorScheme="light")});this.addListener("darkModeChanged",l);this.toolbar=f;l();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");
mxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),aa||200)}),C=mxUtils.bind(this,function(aa){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display=
"flex";mxUtils.setOpacity(f,aa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(C(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(aa){C(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(aa){C(100);mxEvent.consume(aa)}));mxEvent.addListener(f,"mouseleave",
-mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||C(30)}));var J=this.graph,R=J.getTolerance();J.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=J.container.scrollLeft;this.scrollTop=J.container.scrollTop},mouseMove:function(aa,oa){},mouseUp:function(aa,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-J.container.scrollLeft)<R&&Math.abs(this.scrollTop-J.container.scrollTop)<
-R&&Math.abs(this.startX-oa.getGraphX())<R&&Math.abs(this.startY-oa.getGraphY())<R&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(aa,oa,da,ka){aa=this.createToolbarButton(aa,oa,da,ka);f.appendChild(aa);D++;return aa}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var H=l[F];if("pages"==H){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
+mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||C(30)}));var J=this.graph,S=J.getTolerance();J.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=J.container.scrollLeft;this.scrollTop=J.container.scrollTop},mouseMove:function(aa,oa){},mouseUp:function(aa,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-J.container.scrollLeft)<S&&Math.abs(this.scrollTop-J.container.scrollTop)<
+S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():C(30))}})}l=this.toolbarItems;for(var D=0,P=mxUtils.bind(this,function(aa,oa,da,ka){aa=this.createToolbarButton(aa,oa,da,ka);f.appendChild(aa);D++;return aa}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var H=l[F];if("pages"==H){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";
x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==H){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(aa){if(null!=g)g.parentNode.removeChild(g),
@@ -4265,8 +4266,8 @@ this.graphConfig.highlight&&(l.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(b){var f=document.createElement("div");f.style.position="fixed";f.style.top="0";f.style.left="0";f.style.bottom="0";f.style.right="0";f.style.zIndex=this.lightboxZIndex;f.style.backgroundColor="#000000";mxUtils.setOpacity(f,70);document.body.appendChild(f);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("src",Editor.closeBlackImage);l.style.position="fixed";l.style.top="32px";l.style.right="32px";l.style.cursor="pointer";
l.className="geAdaptiveAsset";var u=mxUtils.bind(this,function(){q.setDarkMode(this.isDarkMode())});mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",u);q.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var y=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));y.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(y))}catch(m){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};
-EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),J=this.initialOverflow,R=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),
-document.body.removeChild(l),document.body.style.overflow=J,GraphViewer.resizeSensorEnabled=!0,R.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;D.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var q=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",u);q.editor.editBlankUrl=this.editBlankUrl;q.refresh=function(){};var C=mxUtils.bind(this,function(m){27==m.keyCode&&q.destroy()}),J=this.initialOverflow,S=q.destroy;q.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",C),document.body.removeChild(f),
+document.body.removeChild(l),document.body.style.overflow=J,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var D=q.editor.graph,P=D.container;P.style.overflow="hidden";P.style.inset="0";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",C)):(f.style.display="none",l.style.display="none");var c=this;D.getImageFromBundles=function(m){return c.getImageUrl(m)};var g=q.createTemporaryGraph;q.createTemporaryGraph=
function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(n){return c.getImageUrl(n)};return m};this.graphConfig.move&&(D.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(D,q);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(f,"click",function(){q.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,
l.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(l)),q.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),q.chromelessToolbar.style.bottom="60px",q.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(q.chromelessToolbar),q.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(D,this.graph),q.lightboxFit(),q.chromelessResize()}catch(m){q.handleError(m,
null,function(){q.destroy()})}}),0);return q};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};
@@ -4286,6 +4287,6 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,l){if(null!=GraphViewe
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function C(m,n){if(!m.resizedAttached)m.resizedAttached=
new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],H=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var Z,ha,ca,aa;n=function(){if((ca=m.offsetWidth)!=Z||(aa=m.offsetHeight)!=ha)L=!0,Z=ca,ha=aa;M()};var oa=
-function(da,ka,ba){da.attachEvent?da.attachEvent("on"+ka,ba):da.addEventListener(ka,ba)};oa(x,"scroll",n);oa(H,"scroll",n)}var J=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var R=null,D=!1;(new ResizeObserver(function(){D||(null!=R&&window.clearTimeout(R),R=window.setTimeout(function(){D=!0;J();R=null;D=!1},200))})).observe(l)}else{var P=Object.prototype.toString.call(l),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
+function(da,ka,ba){da.attachEvent?da.attachEvent("on"+ka,ba):da.addEventListener(ka,ba)};oa(x,"scroll",n);oa(H,"scroll",n)}var J=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,D=!1;(new ResizeObserver(function(){D||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){D=!0;J();S=null;D=!1},200))})).observe(l)}else{var P=Object.prototype.toString.call(l),c="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===
P||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){P=0;for(var g=l.length;P<g;P++)C(l[P],J)}else C(l,J);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();
(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index aa093b30d..4031cc5c3 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"28.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"28.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txt
index 9cc7a8a27..a340032f3 100644
--- a/src/main/webapp/resources/dia.txt
+++ b/src/main/webapp/resources/dia.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt
index 1b12b634e..f84201e35 100644
--- a/src/main/webapp/resources/dia_am.txt
+++ b/src/main/webapp/resources/dia_am.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt
index b08524a34..b9d5b3f7f 100644
--- a/src/main/webapp/resources/dia_bn.txt
+++ b/src/main/webapp/resources/dia_bn.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt
index d4974221f..663624201 100644
--- a/src/main/webapp/resources/dia_eo.txt
+++ b/src/main/webapp/resources/dia_eo.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Ĉu vi sciis...
direction=Direction
discard=Forĵeti
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index f026541d6..861bbe9ed 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -40,7 +40,7 @@ allChangesSavedInDrive=Toutes les modifications ont été enregistrées dans Dri
allowPopups=Autoriser les pop-ups pour ne pas voir cette boite de dialogue.
allowRelativeUrl=Autoriser une URL relative
alreadyConnected=Nœuds déjà connectés
-appearance=apparence
+appearance=Apparence
apply=Appliquer
archiMate21=ArchiMate 2.1
arrange=Organiser
diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt
index f176d9161..6ffb24390 100644
--- a/src/main/webapp/resources/dia_gu.txt
+++ b/src/main/webapp/resources/dia_gu.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt
index 53dfdba08..00fef2a0d 100644
--- a/src/main/webapp/resources/dia_hi.txt
+++ b/src/main/webapp/resources/dia_hi.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt
index 93f80dc64..31e1c6d95 100644
--- a/src/main/webapp/resources/dia_hr.txt
+++ b/src/main/webapp/resources/dia_hr.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt
index 01db1c168..cdf1fec72 100644
--- a/src/main/webapp/resources/dia_kn.txt
+++ b/src/main/webapp/resources/dia_kn.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt
index 78b0f6a47..1d9cc3c12 100644
--- a/src/main/webapp/resources/dia_ml.txt
+++ b/src/main/webapp/resources/dia_ml.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt
index 597a9cd4e..476ce2a72 100644
--- a/src/main/webapp/resources/dia_mr.txt
+++ b/src/main/webapp/resources/dia_mr.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_my.txt b/src/main/webapp/resources/dia_my.txt
index 4d3e91b52..4c36468c7 100644
--- a/src/main/webapp/resources/dia_my.txt
+++ b/src/main/webapp/resources/dia_my.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt
index 3ac21abe4..01c559424 100644
--- a/src/main/webapp/resources/dia_ru.txt
+++ b/src/main/webapp/resources/dia_ru.txt
@@ -34,7 +34,7 @@ angle=Угол
animations=Анимации
arc=Дуга
areYouSure=Вы уверены?
-ensureDataSaved=Пожалуйста, перед закрытием убедитесь, что ваши данные сохранены.
+ensureDataSaved=Перед закрытием убедитесь пожалуйста, что ваши данные сохранены.
allChangesSaved=Все изменения сохранены
allChangesSavedInDrive=Все изменения сохранены на диске
allowPopups=Разрешите всплывающие окна, чтобы убрать этот диалог.
@@ -67,7 +67,7 @@ backgroundColor=Цвет фона
backgroundImage=Фоновое изображение
basic=Базовые
beta=бета
-blankDrawing=Новый документ
+blankDrawing=Пустой документ
blankDiagram=Пустая диаграмма
block=Блок
blockquote=Цитата
@@ -77,7 +77,7 @@ bootstrap=Bootstrap
border=Граница
borderColor=Цвет границы
borderWidth=Толщина границы
-bottom=Снизу
+bottom=Внизу
bottomAlign=По нижнему краю
bottomLeft=Внизу слева
bottomRight=Внизу справа
@@ -109,11 +109,11 @@ compare=Сравнить
compressed=Сжато
commitMessage=Сообщение при коммите
configLinkWarn=Эта ссылка настраивает draw.io. Нажмите «ОК» только, если вы доверяете тому, кто её вам дал!
-configLinkConfirm=Нажмите ОК, чтобы настроить и перезапустить draw.io.
+configLinkConfirm=Нажмите «ОК», чтобы настроить и перезапустить draw.io.
container=Контейнер
csv=CSV
dark=Тёмная
-diagramLanguage=Язык Диаграммы
+diagramLanguage=Язык диаграммы
diagramType=Тип диаграммы
diagramXmlDesc=XML файл
diagramHtmlDesc=HTML файл
@@ -121,13 +121,13 @@ diagramPngDesc=Редактируемое растровое изображен
diagramSvgDesc=Редактируемое векторное изображение
didYouMeanToExportToPdf=Вы хотите экспортировать в PDF?
disabled=Отключено
-draftFound=Был обнаружен черновик '{1}'. Загрузите его в редактор или откажитесь, чтобы продолжить.
+draftFound=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
draftRevisionMismatch=Существует другая версия этой диаграммы на общем черновике этой страницы. Отредактируйте диаграмму проекта, для работы с последней версией.
selectDraft=Выберите черновик, чтобы продолжить редактирование:
dragAndDropNotSupported=Перетаскивание изображений не поддерживается. Хотите импортировать изображение?
dropboxCharsNotAllowed=Следующие символы не допускаются: \ / : ? * " |
check=Проверить
-checksum=Проверочная сумма
+checksum=Контрольная сумма
circle=Круговая структура
cisco=Cisco
classic=Классический
@@ -161,7 +161,7 @@ copiedToClipboard=Скопировано в буфер обмена
copy=Копировать
copyConnect=Копировать при соединении
copyCreated=Копия файла была создана.
-copyData=Скопировать информацию
+copyData=Копировать информацию
copyOf=Копия {1}
copyOfDrawing=Копия документа
copySize=Копировать размер
@@ -197,23 +197,23 @@ diagramLocked=Диаграмма была заблокирована для пр
diagramLockedBySince=Диаграмма заблокирована {1} {2} назад
diagramName=Название диаграммы
diagramIsPublic=Диаграмма является публичной
-diagramIsNotPublic=Диаграмма не является публичной
+diagramIsNotPublic=Диаграмма является не публичной
diamond=Алмаз
diamondThin=Алмаз (тонкий)
didYouKnow=Знаете ли вы…
direction=Направление
-discard=Отказаться
-discardChangesAndReconnect=Отказаться от изменений и подключиться заново
+discard=Сбросить
+discardChangesAndReconnect=Сбросить изменения и подключиться заново
googleDriveMissingClickHere=Нет Google Drive? Нажмите сюда!
-discardChanges=Отказаться от изменений
+discardChanges=Сбросить изменения
disconnected=Отсоединено
distribute=Распределить
done=Готово
doNotShowAgain=Не показывать снова
dotted=Точки
-doubleClickOrientation=Дважды нажмите, чтобы изменить ориентацию
-doubleClickTooltip=Дважды нажмите, чтобы вставить текст
-doubleClickChangeProperty=Дважды нажмите, чтобы изменить название свойства
+doubleClickOrientation=Нажмите дважды, чтобы изменить ориентацию
+doubleClickTooltip=Нажмите дважды, чтобы вставить текст
+doubleClickChangeProperty=Нажмите дважды, чтобы изменить название свойства
download=Загрузить
downloadDesktop=Загрузить Desktop
downloadAs=Загрузить как
@@ -221,13 +221,13 @@ clickHereToSave=Нажмите здесь, чтобы сохранить.
dpi=DPI
draftDiscarded=Черновик удалён
draftSaved=Черновик сохранён
-dragElementsHere=Перетащите элементы из диаграммы сюда
+dragElementsHere=Перетащите сюда элементы из диаграммы
dragImagesHere=Перетащите сюда изображения или вставьте на них ссылки
dragUrlsHere=Перетащите сюда ссылки
draw.io=draw.io
drawing=Рисунок{1}
-drawingEmpty=Документ пуст
-drawingTooLarge=Документ слишком большой
+drawingEmpty=Рисунок пуст
+drawingTooLarge=Рисунок слишком большой
drawioForWork=Draw.io для GSuite
dropbox=Dropbox
duplicate=Дублировать
@@ -252,12 +252,12 @@ googleImages=Изображения Google
imageSearch=Поиск изображений
eip=EIP
embed=Встроить
-embedFonts=Вставить шрифты
-embedImages=Встроить изображения
+embedFonts=Встроенные шрифты
+embedImages=Встроенные изображения
mainEmbedNotice=Вставьте это на страницу
electrical=Электрические схемы
ellipse=Эллипс
-embedNotice=Вставьте один раз в конец страницы
+embedNotice=Вставьте это один раз в конец страницы
enterGroup=Введите группу
enterName=Введите название
enterPropertyName=Введите название свойства
@@ -277,7 +277,7 @@ errorSavingFileForbidden=Ошибка сохранения файла. Не хв
errorSavingFileNameConflict=Невозможно сохранить диаграмму. Страница уже содержит файл с названием '{1}'.
errorSavingFileNotFound=Ошибка при сохранении файла. Файл не найден.
errorSavingFileReadOnlyMode=Невозможно сохранить диаграмму пока вы находитесь в режиме «только для чтения».
-errorSavingFileSessionTimeout=Ваша сессия истекла. Для сохранения, пожалуйста, <a target='_blank' href='{1}'>{2}</a> и вернитесь на эту вкладку.
+errorSavingFileSessionTimeout=Ваша сессия истекла. Для сохранения, пожалуйста, <a target='_blank' href='{1}'>{2}</a> и вернитесь на эту вкладку, чтобы попробовать сохранить снова.
errorSendingFeedback=Ошибка при отправке сообщения для обратной связи.
errorUpdatingPreview=Ошибка при обновлении предварительного просмотра.
exit=Выйти
@@ -315,7 +315,7 @@ fileOpenLocation=Как вы хотите открыть эти файл(ы)?
filetypeHtml=Расширение «.html» — сохранить файл в формате HTML с перенаправлением на адрес в «облачном» хранилище
filetypePng=Расширение «.png» — сохранить файл в формате PNG, внедрив в него встроенные данные
filetypeSvg=Расширение «.svg» — сохранить файл в формате SVG, внедрив в него встроенные данные
-fileWillBeSavedInAppFolder={1} будет сохранён в папке программы.
+fileWillBeSavedInAppFolder={1} будет сохранён в папке приложения.
fill=Заливка
fillColor=Цвет заливки
filterCards=Фильтровать карточки
@@ -394,19 +394,19 @@ hateApp=Терпеть не могу draw.io
heading=Заголовок
height=Высота
help=Помощь
-helpTranslate=Помогите нам перевести draw.io
+helpTranslate=Помогите перевести draw.io
hide=Скрыть
hideIt=Скрыть {1}
hidden=Скрытый
highContrast=Высокая контрастность
-home=На верхний уровень
+home=Домой
horizontal=Горизонтально
horizontalFlow=Горизонтальный поток
horizontalTree=Горизонтальное дерево
-howTranslate=Насколько хорошо приложение переведено на ваш язык?
+howTranslate=Насколько хорошо приложение переведено на русский язык?
html=HTML
htmlText=HTML текст
-id=Идентификатор
+id=Идентификатор (ID)
iframe=IFrame
ignore=Игнорировать
image=Изображение
diff --git a/src/main/webapp/resources/dia_si.txt b/src/main/webapp/resources/dia_si.txt
index d9d4b9ff0..ab454f661 100644
--- a/src/main/webapp/resources/dia_si.txt
+++ b/src/main/webapp/resources/dia_si.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt
index b96a7cebb..f0f154267 100644
--- a/src/main/webapp/resources/dia_sk.txt
+++ b/src/main/webapp/resources/dia_sk.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt
index 15a01ebcb..3ca79fdb6 100644
--- a/src/main/webapp/resources/dia_sl.txt
+++ b/src/main/webapp/resources/dia_sl.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt
index d9aada76e..42cd0c4a7 100644
--- a/src/main/webapp/resources/dia_sw.txt
+++ b/src/main/webapp/resources/dia_sw.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt
index cd6257613..572266a82 100644
--- a/src/main/webapp/resources/dia_te.txt
+++ b/src/main/webapp/resources/dia_te.txt
@@ -203,7 +203,7 @@ diamondThin=Diamond (thin)
didYouKnow=Did you know...
direction=Direction
discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
+discardChangesAndReconnect=Был обнаружен черновик '{1}'. Загрузите черновик в редактор или сбросьте его, чтобы продолжить.
googleDriveMissingClickHere=Google Drive missing? Click here!
discardChanges=Discard Changes
disconnected=Disconnected
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index edeb69f1e..c074e1925 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){let e,r={};const i=(i,a)=>(i=new URL(i+".js",a).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(r[s])return;let d={};const o=e=>i(e,s),f={module:{uri:s},exports:d,require:o};r[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-acfd85e3"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"6b9d70c36282a7f5e4d48aa49d91dff3"},{url:"js/main.js",revision:"a8d40469d3d72ab4b11059362f3dd825"},{url:"js/app.min.js",revision:"bbe3310988fb52651e82408c0f13e469"},{url:"js/extensions.min.js",revision:"4048fce76be2d4c488be2133f933b71f"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"fa406ebb7ea7cbbc9407d0e6a7a7040e"},{url:"js/shapes-14-6-5.min.js",revision:"9d0ff8993440b0411b0b1243910f33ad"},{url:"js/math-print.js",revision:"2906865fa4f7824eab9b648a6888db80"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"f5d691ee31e392b7944eeea6112bf241"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"e863f5e6833892f22492211663e3efe9"},{url:"js/viewer-static.min.js",revision:"d421793961f30d3e55f251cee0358afe"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"85011efa68d638da560871ee2ab3a6fe"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"3dc56c6566abaa7af151a8359e5bb556"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"8f4741834f5ea4698a6737bf35c6bf90"},{url:"connect/jira/fullscreen-viewer.js",revision:"a6be96b8ddc5a25196925713cf34d571"},{url:"plugins/connectJira.js",revision:"db54dba28f9f2510a00411a410c837a0"},{url:"plugins/cConf-comments.js",revision:"e4a4b5a0fb22393693d3b62968c50644"},{url:"plugins/cConf-1-4-8.js",revision:"9b5e217aed7dd67a665ea42311b4b0c3"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"08072cc4a086eb5c94e6f46a25e51a19"},{url:"connect/new_common/cac.js",revision:"443fb416a407b8a183d0c8f4ecf68808"},{url:"connect/gdrive_common/gac.js",revision:"ac3a28fa16c3e6a36af854fcfc018a81"},{url:"connect/onedrive_common/ac.js",revision:"37c626698573f4419ab9f7ecd7b4bb01"},{url:"connect/confluence/viewer-init.js",revision:"17d1e02ebb74569f2daa7cf18fed0b02"},{url:"connect/confluence/viewer.js",revision:"f25b33ded1392fbb5fcf11b7001f90cd"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"489bc44e46d6481277c3f2a5d81a2db6"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"87e040c6d8cd60105ec027eae13ddf37"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"440f8688c39ed76ab9926945af2202b6"},{url:"resources/dia_am.txt",revision:"f9b3525dcc45b5ee489e0f1d7d112763"},{url:"resources/dia_ar.txt",revision:"56e2a17d0bc9a5aabfbd81bde6a366d9"},{url:"resources/dia_bg.txt",revision:"cc06a434b1e2bb224b06a1139adf5209"},{url:"resources/dia_bn.txt",revision:"61562e35653c29fc70acfa9668bfd372"},{url:"resources/dia_bs.txt",revision:"3b716d105871dd9cf25b5f73a80215cc"},{url:"resources/dia_ca.txt",revision:"2cc2a991b6ae133db0c09af5fc52b9f4"},{url:"resources/dia_cs.txt",revision:"b155b354ace03ee78529ca081faccc98"},{url:"resources/dia_da.txt",revision:"2df28b4f0846caa39d9aea907d7b57c7"},{url:"resources/dia_de.txt",revision:"1904b0776af3be5b82159b826c3325cc"},{url:"resources/dia_el.txt",revision:"e4d12f6e9bc7e65a1a213949319937ea"},{url:"resources/dia_eo.txt",revision:"173f9d07075551a8f990b1ba26e2cb2b"},{url:"resources/dia_es.txt",revision:"81b54555792af4cfcab1231dd3b40d84"},{url:"resources/dia_et.txt",revision:"a60e315625676a7eb50a7cd83d049dda"},{url:"resources/dia_eu.txt",revision:"65befcd5722ec968390c6ed14549d98b"},{url:"resources/dia_fa.txt",revision:"3d2410c140948bc70f519e118a7cdaec"},{url:"resources/dia_fi.txt",revision:"e07efa83a635d381825a69d6f1331801"},{url:"resources/dia_fil.txt",revision:"e858695961fcd5a0f2f2f6d4a0397e02"},{url:"resources/dia_fr.txt",revision:"f77aa3fd93b2d5e95c4daffcf5fa027c"},{url:"resources/dia_gl.txt",revision:"afbd61ed70166fa7293d7dd241065ea6"},{url:"resources/dia_gu.txt",revision:"ad5fe7ee880e011d80f056134866c622"},{url:"resources/dia_he.txt",revision:"dac7b75a977dabe6f74d4b52491d31be"},{url:"resources/dia_hi.txt",revision:"70a06dd69fbe72716ab1bd6679402fc9"},{url:"resources/dia_hr.txt",revision:"f35ae3b8f01bd4a9c57fe85dabc0f19b"},{url:"resources/dia_hu.txt",revision:"f0c9b46856ce2151593e1a8335647e39"},{url:"resources/dia_id.txt",revision:"45c2a0d1e0c6926a5f3f5f0b1dab5e90"},{url:"resources/dia_it.txt",revision:"2e857aebd83e2378407aba045583417d"},{url:"resources/dia_ja.txt",revision:"2e5082f34188f2c9e974d2a4ba690172"},{url:"resources/dia_kn.txt",revision:"08ee7cebc4ddfb3f0cfc72b8c6674f49"},{url:"resources/dia_ko.txt",revision:"82242262baa7ccc0104b13ecd4f571b8"},{url:"resources/dia_lt.txt",revision:"7c87793413f4f497505db44b076c733e"},{url:"resources/dia_lv.txt",revision:"3c8c5cd5a63c8bacce0a02994481bd65"},{url:"resources/dia_ml.txt",revision:"0414986322ef2832b74c5c2216ef65ad"},{url:"resources/dia_mr.txt",revision:"0e3e8a339fbdc8886b573b8c42ac4789"},{url:"resources/dia_ms.txt",revision:"79efb5bbd6783cda403d86715a99fb1f"},{url:"resources/dia_my.txt",revision:"882a04658d3221d8f21d37cfe1e2429c"},{url:"resources/dia_nl.txt",revision:"96737d875cd68a992aa6c088ad326456"},{url:"resources/dia_no.txt",revision:"bd8851d66ed0d0ddd6a1a2737872fe6c"},{url:"resources/dia_pl.txt",revision:"337fcc17dc1ecfd33da52fa20ccb510d"},{url:"resources/dia_pt-br.txt",revision:"b46225c7aba6f036fa7cd07f2f1bd36a"},{url:"resources/dia_pt.txt",revision:"b7955cf38fcb6685c17a18f0871aad10"},{url:"resources/dia_ro.txt",revision:"e99af9602aa6564d1b3a1c2000877a68"},{url:"resources/dia_ru.txt",revision:"73d47a875bcea13440635f3dba620e7c"},{url:"resources/dia_si.txt",revision:"7f958a75236311116d44188fc3fa4b7e"},{url:"resources/dia_sk.txt",revision:"54dd575121b90fe9139418890eed3dfc"},{url:"resources/dia_sl.txt",revision:"3af78b913d0f060da8e83e3232a04570"},{url:"resources/dia_sr.txt",revision:"e689adb77e19f9c69e4d43f4718469b4"},{url:"resources/dia_sv.txt",revision:"3a4b84baaaafc800b7866ffb4ecaaec6"},{url:"resources/dia_sw.txt",revision:"b8c4529f57f6fcdfd8dfe9b9f0588f13"},{url:"resources/dia_ta.txt",revision:"7ec22334bd9e4b348388bf78f70bdf10"},{url:"resources/dia_te.txt",revision:"557ca189db9dd1f42493942267ef5530"},{url:"resources/dia_th.txt",revision:"18703430dbccc50af3e374c93dadefe8"},{url:"resources/dia_tr.txt",revision:"aa82b3302c7c4875f8b2810de2f04db9"},{url:"resources/dia_uk.txt",revision:"b0c32b3ac364827dbf531c42c7210201"},{url:"resources/dia_vi.txt",revision:"c9862c2e37a1891b91f0ff23662c8969"},{url:"resources/dia_zh-tw.txt",revision:"dd3df77fe1a64808fdabe86d4064a84f"},{url:"resources/dia_zh.txt",revision:"57228ad690560909ff5218a60115bc0b"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){let e,r={};const i=(i,a)=>(i=new URL(i+".js",a).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(r[s])return;let d={};const o=e=>i(e,s),f={module:{uri:s},exports:d,require:o};r[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-acfd85e3"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"6b9d70c36282a7f5e4d48aa49d91dff3"},{url:"js/main.js",revision:"a8d40469d3d72ab4b11059362f3dd825"},{url:"js/app.min.js",revision:"fa2da832d4428944d1459c139f1a7113"},{url:"js/extensions.min.js",revision:"4048fce76be2d4c488be2133f933b71f"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"fa406ebb7ea7cbbc9407d0e6a7a7040e"},{url:"js/shapes-14-6-5.min.js",revision:"9d0ff8993440b0411b0b1243910f33ad"},{url:"js/math-print.js",revision:"2906865fa4f7824eab9b648a6888db80"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"ed4a663eb787c135a04e5f6c97bdaa47"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"e863f5e6833892f22492211663e3efe9"},{url:"js/viewer-static.min.js",revision:"a96a14e99be1e2c09a8e13d627de6326"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"85011efa68d638da560871ee2ab3a6fe"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"3dc56c6566abaa7af151a8359e5bb556"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"8f4741834f5ea4698a6737bf35c6bf90"},{url:"connect/jira/fullscreen-viewer.js",revision:"a6be96b8ddc5a25196925713cf34d571"},{url:"plugins/connectJira.js",revision:"db54dba28f9f2510a00411a410c837a0"},{url:"plugins/cConf-comments.js",revision:"e4a4b5a0fb22393693d3b62968c50644"},{url:"plugins/cConf-1-4-8.js",revision:"9b5e217aed7dd67a665ea42311b4b0c3"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"08072cc4a086eb5c94e6f46a25e51a19"},{url:"connect/new_common/cac.js",revision:"443fb416a407b8a183d0c8f4ecf68808"},{url:"connect/gdrive_common/gac.js",revision:"ac3a28fa16c3e6a36af854fcfc018a81"},{url:"connect/onedrive_common/ac.js",revision:"37c626698573f4419ab9f7ecd7b4bb01"},{url:"connect/confluence/viewer-init.js",revision:"17d1e02ebb74569f2daa7cf18fed0b02"},{url:"connect/confluence/viewer.js",revision:"f25b33ded1392fbb5fcf11b7001f90cd"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"489bc44e46d6481277c3f2a5d81a2db6"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"87e040c6d8cd60105ec027eae13ddf37"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"a4729b9a37dec1735a5b08b5c91771af"},{url:"resources/dia_am.txt",revision:"259a948c27b27a286a0bf2d76e3b9d8d"},{url:"resources/dia_ar.txt",revision:"56e2a17d0bc9a5aabfbd81bde6a366d9"},{url:"resources/dia_bg.txt",revision:"cc06a434b1e2bb224b06a1139adf5209"},{url:"resources/dia_bn.txt",revision:"16167545c0bb7f87221f69fc77c34b6c"},{url:"resources/dia_bs.txt",revision:"3b716d105871dd9cf25b5f73a80215cc"},{url:"resources/dia_ca.txt",revision:"2cc2a991b6ae133db0c09af5fc52b9f4"},{url:"resources/dia_cs.txt",revision:"b155b354ace03ee78529ca081faccc98"},{url:"resources/dia_da.txt",revision:"2df28b4f0846caa39d9aea907d7b57c7"},{url:"resources/dia_de.txt",revision:"1904b0776af3be5b82159b826c3325cc"},{url:"resources/dia_el.txt",revision:"e4d12f6e9bc7e65a1a213949319937ea"},{url:"resources/dia_eo.txt",revision:"5f049d8603b0d8d983d1f77eadffcd82"},{url:"resources/dia_es.txt",revision:"81b54555792af4cfcab1231dd3b40d84"},{url:"resources/dia_et.txt",revision:"a60e315625676a7eb50a7cd83d049dda"},{url:"resources/dia_eu.txt",revision:"65befcd5722ec968390c6ed14549d98b"},{url:"resources/dia_fa.txt",revision:"3d2410c140948bc70f519e118a7cdaec"},{url:"resources/dia_fi.txt",revision:"e07efa83a635d381825a69d6f1331801"},{url:"resources/dia_fil.txt",revision:"e858695961fcd5a0f2f2f6d4a0397e02"},{url:"resources/dia_fr.txt",revision:"c358afd2c60b5abf4a0b670d19c452ef"},{url:"resources/dia_gl.txt",revision:"afbd61ed70166fa7293d7dd241065ea6"},{url:"resources/dia_gu.txt",revision:"0b7f0d63665fe0253e160aa4d75ef12c"},{url:"resources/dia_he.txt",revision:"dac7b75a977dabe6f74d4b52491d31be"},{url:"resources/dia_hi.txt",revision:"c7b7d695d7f18c29cf1e206df6225cfe"},{url:"resources/dia_hr.txt",revision:"db109e88eab935c112b800faaebc2af2"},{url:"resources/dia_hu.txt",revision:"f0c9b46856ce2151593e1a8335647e39"},{url:"resources/dia_id.txt",revision:"45c2a0d1e0c6926a5f3f5f0b1dab5e90"},{url:"resources/dia_it.txt",revision:"2e857aebd83e2378407aba045583417d"},{url:"resources/dia_ja.txt",revision:"2e5082f34188f2c9e974d2a4ba690172"},{url:"resources/dia_kn.txt",revision:"7d80dd8c5f97b3ca7a93918a5f7effa8"},{url:"resources/dia_ko.txt",revision:"82242262baa7ccc0104b13ecd4f571b8"},{url:"resources/dia_lt.txt",revision:"7c87793413f4f497505db44b076c733e"},{url:"resources/dia_lv.txt",revision:"3c8c5cd5a63c8bacce0a02994481bd65"},{url:"resources/dia_ml.txt",revision:"ab9bd05d5a46f3a015c7cc78e9f9ce06"},{url:"resources/dia_mr.txt",revision:"2b9f8a936f6405fb75fcb32ae45cf532"},{url:"resources/dia_ms.txt",revision:"79efb5bbd6783cda403d86715a99fb1f"},{url:"resources/dia_my.txt",revision:"0b83f270c50b612b0fc331c0e185ca18"},{url:"resources/dia_nl.txt",revision:"96737d875cd68a992aa6c088ad326456"},{url:"resources/dia_no.txt",revision:"bd8851d66ed0d0ddd6a1a2737872fe6c"},{url:"resources/dia_pl.txt",revision:"337fcc17dc1ecfd33da52fa20ccb510d"},{url:"resources/dia_pt-br.txt",revision:"b46225c7aba6f036fa7cd07f2f1bd36a"},{url:"resources/dia_pt.txt",revision:"b7955cf38fcb6685c17a18f0871aad10"},{url:"resources/dia_ro.txt",revision:"e99af9602aa6564d1b3a1c2000877a68"},{url:"resources/dia_ru.txt",revision:"b4be2b8590170d6b2d090515bbd8a9ce"},{url:"resources/dia_si.txt",revision:"a89e725f42df43032ae7d3d21fed5309"},{url:"resources/dia_sk.txt",revision:"cf1f190adc8c3ba422e2e0034ab544ae"},{url:"resources/dia_sl.txt",revision:"e855e026a5eed3c6f66a5625fb007250"},{url:"resources/dia_sr.txt",revision:"e689adb77e19f9c69e4d43f4718469b4"},{url:"resources/dia_sv.txt",revision:"3a4b84baaaafc800b7866ffb4ecaaec6"},{url:"resources/dia_sw.txt",revision:"824f2a2aecc773e6ecbb26b713307c87"},{url:"resources/dia_ta.txt",revision:"7ec22334bd9e4b348388bf78f70bdf10"},{url:"resources/dia_te.txt",revision:"c098647bf0c52373e6098f6f3dd5a6e1"},{url:"resources/dia_th.txt",revision:"18703430dbccc50af3e374c93dadefe8"},{url:"resources/dia_tr.txt",revision:"aa82b3302c7c4875f8b2810de2f04db9"},{url:"resources/dia_uk.txt",revision:"b0c32b3ac364827dbf531c42c7210201"},{url:"resources/dia_vi.txt",revision:"c9862c2e37a1891b91f0ff23662c8969"},{url:"resources/dia_zh-tw.txt",revision:"dd3df77fe1a64808fdabe86d4064a84f"},{url:"resources/dia_zh.txt",revision:"57228ad690560909ff5218a60115bc0b"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index 072c32178..1a46eeb61 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/w3/8z182_j14fbd1p8pn7nc032h0000gn/T/7f5180ad7fdc7c8755140a2e36e3830b/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/davidbenson/.nvm/versions/node/v22.14.0/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"6b9d70c36282a7f5e4d48aa49d91dff3\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"a8d40469d3d72ab4b11059362f3dd825\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"bbe3310988fb52651e82408c0f13e469\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"4048fce76be2d4c488be2133f933b71f\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"fa406ebb7ea7cbbc9407d0e6a7a7040e\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"9d0ff8993440b0411b0b1243910f33ad\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"2906865fa4f7824eab9b648a6888db80\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"f5d691ee31e392b7944eeea6112bf241\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"e863f5e6833892f22492211663e3efe9\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"d421793961f30d3e55f251cee0358afe\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"85011efa68d638da560871ee2ab3a6fe\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"3dc56c6566abaa7af151a8359e5bb556\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"8f4741834f5ea4698a6737bf35c6bf90\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"a6be96b8ddc5a25196925713cf34d571\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"db54dba28f9f2510a00411a410c837a0\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"e4a4b5a0fb22393693d3b62968c50644\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"9b5e217aed7dd67a665ea42311b4b0c3\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"08072cc4a086eb5c94e6f46a25e51a19\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"443fb416a407b8a183d0c8f4ecf68808\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"ac3a28fa16c3e6a36af854fcfc018a81\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"37c626698573f4419ab9f7ecd7b4bb01\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"17d1e02ebb74569f2daa7cf18fed0b02\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"f25b33ded1392fbb5fcf11b7001f90cd\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"489bc44e46d6481277c3f2a5d81a2db6\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"87e040c6d8cd60105ec027eae13ddf37\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"440f8688c39ed76ab9926945af2202b6\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"f9b3525dcc45b5ee489e0f1d7d112763\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"56e2a17d0bc9a5aabfbd81bde6a366d9\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cc06a434b1e2bb224b06a1139adf5209\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"61562e35653c29fc70acfa9668bfd372\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"3b716d105871dd9cf25b5f73a80215cc\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"2cc2a991b6ae133db0c09af5fc52b9f4\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"b155b354ace03ee78529ca081faccc98\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2df28b4f0846caa39d9aea907d7b57c7\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"1904b0776af3be5b82159b826c3325cc\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"e4d12f6e9bc7e65a1a213949319937ea\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"173f9d07075551a8f990b1ba26e2cb2b\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"81b54555792af4cfcab1231dd3b40d84\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"a60e315625676a7eb50a7cd83d049dda\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"65befcd5722ec968390c6ed14549d98b\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3d2410c140948bc70f519e118a7cdaec\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"e07efa83a635d381825a69d6f1331801\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"e858695961fcd5a0f2f2f6d4a0397e02\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"f77aa3fd93b2d5e95c4daffcf5fa027c\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"afbd61ed70166fa7293d7dd241065ea6\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ad5fe7ee880e011d80f056134866c622\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"dac7b75a977dabe6f74d4b52491d31be\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"70a06dd69fbe72716ab1bd6679402fc9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"f35ae3b8f01bd4a9c57fe85dabc0f19b\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0c9b46856ce2151593e1a8335647e39\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"45c2a0d1e0c6926a5f3f5f0b1dab5e90\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"2e857aebd83e2378407aba045583417d\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"2e5082f34188f2c9e974d2a4ba690172\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"08ee7cebc4ddfb3f0cfc72b8c6674f49\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"82242262baa7ccc0104b13ecd4f571b8\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"7c87793413f4f497505db44b076c733e\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"3c8c5cd5a63c8bacce0a02994481bd65\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"0414986322ef2832b74c5c2216ef65ad\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"0e3e8a339fbdc8886b573b8c42ac4789\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"79efb5bbd6783cda403d86715a99fb1f\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"882a04658d3221d8f21d37cfe1e2429c\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"96737d875cd68a992aa6c088ad326456\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"bd8851d66ed0d0ddd6a1a2737872fe6c\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"337fcc17dc1ecfd33da52fa20ccb510d\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"b46225c7aba6f036fa7cd07f2f1bd36a\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"b7955cf38fcb6685c17a18f0871aad10\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e99af9602aa6564d1b3a1c2000877a68\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"73d47a875bcea13440635f3dba620e7c\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"7f958a75236311116d44188fc3fa4b7e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"54dd575121b90fe9139418890eed3dfc\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3af78b913d0f060da8e83e3232a04570\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"e689adb77e19f9c69e4d43f4718469b4\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3a4b84baaaafc800b7866ffb4ecaaec6\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"b8c4529f57f6fcdfd8dfe9b9f0588f13\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"7ec22334bd9e4b348388bf78f70bdf10\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"557ca189db9dd1f42493942267ef5530\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"18703430dbccc50af3e374c93dadefe8\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"aa82b3302c7c4875f8b2810de2f04db9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"b0c32b3ac364827dbf531c42c7210201\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c9862c2e37a1891b91f0ff23662c8969\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"dd3df77fe1a64808fdabe86d4064a84f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"57228ad690560909ff5218a60115bc0b\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/w3/8z182_j14fbd1p8pn7nc032h0000gn/T/b065dc0acd4545e2bdc6d43c0faf74a5/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/davidbenson/.nvm/versions/node/v22.14.0/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"6b9d70c36282a7f5e4d48aa49d91dff3\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"a8d40469d3d72ab4b11059362f3dd825\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"fa2da832d4428944d1459c139f1a7113\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"4048fce76be2d4c488be2133f933b71f\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"fa406ebb7ea7cbbc9407d0e6a7a7040e\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"9d0ff8993440b0411b0b1243910f33ad\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"2906865fa4f7824eab9b648a6888db80\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"ed4a663eb787c135a04e5f6c97bdaa47\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"e863f5e6833892f22492211663e3efe9\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"a96a14e99be1e2c09a8e13d627de6326\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"85011efa68d638da560871ee2ab3a6fe\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"3dc56c6566abaa7af151a8359e5bb556\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"8f4741834f5ea4698a6737bf35c6bf90\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"a6be96b8ddc5a25196925713cf34d571\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"db54dba28f9f2510a00411a410c837a0\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"e4a4b5a0fb22393693d3b62968c50644\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"9b5e217aed7dd67a665ea42311b4b0c3\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"08072cc4a086eb5c94e6f46a25e51a19\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"443fb416a407b8a183d0c8f4ecf68808\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"ac3a28fa16c3e6a36af854fcfc018a81\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"37c626698573f4419ab9f7ecd7b4bb01\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"17d1e02ebb74569f2daa7cf18fed0b02\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"f25b33ded1392fbb5fcf11b7001f90cd\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"489bc44e46d6481277c3f2a5d81a2db6\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"87e040c6d8cd60105ec027eae13ddf37\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"a4729b9a37dec1735a5b08b5c91771af\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"259a948c27b27a286a0bf2d76e3b9d8d\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"56e2a17d0bc9a5aabfbd81bde6a366d9\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cc06a434b1e2bb224b06a1139adf5209\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"16167545c0bb7f87221f69fc77c34b6c\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"3b716d105871dd9cf25b5f73a80215cc\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"2cc2a991b6ae133db0c09af5fc52b9f4\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"b155b354ace03ee78529ca081faccc98\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"2df28b4f0846caa39d9aea907d7b57c7\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"1904b0776af3be5b82159b826c3325cc\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"e4d12f6e9bc7e65a1a213949319937ea\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"5f049d8603b0d8d983d1f77eadffcd82\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"81b54555792af4cfcab1231dd3b40d84\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"a60e315625676a7eb50a7cd83d049dda\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"65befcd5722ec968390c6ed14549d98b\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3d2410c140948bc70f519e118a7cdaec\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"e07efa83a635d381825a69d6f1331801\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"e858695961fcd5a0f2f2f6d4a0397e02\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"c358afd2c60b5abf4a0b670d19c452ef\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"afbd61ed70166fa7293d7dd241065ea6\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"0b7f0d63665fe0253e160aa4d75ef12c\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"dac7b75a977dabe6f74d4b52491d31be\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"c7b7d695d7f18c29cf1e206df6225cfe\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"db109e88eab935c112b800faaebc2af2\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0c9b46856ce2151593e1a8335647e39\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"45c2a0d1e0c6926a5f3f5f0b1dab5e90\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"2e857aebd83e2378407aba045583417d\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"2e5082f34188f2c9e974d2a4ba690172\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7d80dd8c5f97b3ca7a93918a5f7effa8\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"82242262baa7ccc0104b13ecd4f571b8\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"7c87793413f4f497505db44b076c733e\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"3c8c5cd5a63c8bacce0a02994481bd65\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"ab9bd05d5a46f3a015c7cc78e9f9ce06\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"2b9f8a936f6405fb75fcb32ae45cf532\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"79efb5bbd6783cda403d86715a99fb1f\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"0b83f270c50b612b0fc331c0e185ca18\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"96737d875cd68a992aa6c088ad326456\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"bd8851d66ed0d0ddd6a1a2737872fe6c\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"337fcc17dc1ecfd33da52fa20ccb510d\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"b46225c7aba6f036fa7cd07f2f1bd36a\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"b7955cf38fcb6685c17a18f0871aad10\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e99af9602aa6564d1b3a1c2000877a68\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"b4be2b8590170d6b2d090515bbd8a9ce\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"a89e725f42df43032ae7d3d21fed5309\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"cf1f190adc8c3ba422e2e0034ab544ae\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"e855e026a5eed3c6f66a5625fb007250\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"e689adb77e19f9c69e4d43f4718469b4\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3a4b84baaaafc800b7866ffb4ecaaec6\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"824f2a2aecc773e6ecbb26b713307c87\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"7ec22334bd9e4b348388bf78f70bdf10\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"c098647bf0c52373e6098f6f3dd5a6e1\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"18703430dbccc50af3e374c93dadefe8\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"aa82b3302c7c4875f8b2810de2f04db9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"b0c32b3ac364827dbf531c42c7210201\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c9862c2e37a1891b91f0ff23662c8969\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"dd3df77fe1a64808fdabe86d4064a84f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"57228ad690560909ff5218a60115bc0b\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file
diff --git a/src/main/webapp/styles/grapheditor.css b/src/main/webapp/styles/grapheditor.css
index 8cb647dc5..b417d870e 100644
--- a/src/main/webapp/styles/grapheditor.css
+++ b/src/main/webapp/styles/grapheditor.css
@@ -313,6 +313,11 @@ div[id*="dgeMermaidOutput-"] {
position: relative;
}
+.geFreehandMode,
+.geFreehandMode * {
+ cursor: crosshair !important;
+}
+
.geDarkMode .geButton,
.geDarkMode .geHelpIcon:not(.geTitle *),
.geDarkMode .mxPopupMenuItem>div:not(:has(img)),