diff --git a/ChangeLog b/ChangeLog index c43afe00..e4646a23 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 441dbd34..126280f3 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 201552b6..bacdf7cc 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 017eb98f..9fdcf84f 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',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>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k1?n-1:0),r=1;r2&&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/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=""+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e=''+e+"");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="\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;r1?t-1:0),o=1;o1?n-1:0),r=1;r2&&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/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&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(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=""+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e=''+e+"");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="\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&&2navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS|| @@ -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,"
"));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=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'};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&&0this.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&&0Y?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;Ua.indexOf(" ")&&8A.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;Xw.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=0A.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;Xw.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=0ca&&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)||1500this.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)||1500p||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&&0mxUtils.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;ymxUtils.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;kmxUtils.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;ymxUtils.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'+(""!=g?'":"")+'
'+a+"
")}; -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;ppageSize){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;NpageSize){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;NW.geometry.x?-.8:.5(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;AmxUtils.indexOf(p,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,p,k,u,w,y){var A=!1,E=!1;if(0mxUtils.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(0mxUtils.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;py?"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:(0y?"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:(0F||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;VY.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;TD*D&&0D*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;FY.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;TE*E&&0E*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=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("."),0mxUtils.indexOf(q,Q))return null}Q=D.apply(this,arguments);var Z=!0;for(K=0;KmxUtils.indexOf(q,Q))return null}Q=E.apply(this,arguments);var Z=!0;for(K=0;KE;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',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;uA&&0A&&0Math.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"));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"],N=0;N");for(var J=0;J
");M.push("")}M.push("");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"],N=0;N");for(var J=0;J
");M.push("")}M.push("");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");1d?("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);6D&&(D=0);1F&&(F=0);1d?("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;Md?("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);6E&&(E=0);1F&&(F=0);1d?("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;PaMAX_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=0MAX_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=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=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*gO.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&&0O.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&&0T.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(){0document.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",0g?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 -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&&0d){b=[];for(g=0;g +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&&0z?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(z,x)}for(x=0;xmxUtils.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;xA?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(A,x)}for(x=0;xmxUtils.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.lastAutosavethis.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.lengthg&&(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;dg&&(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 '+mxResources.get("googleDriveMissingClickHere")+"",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"),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||9f.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"+mxUtils.htmlEntities(mxResources.get("preview"))+''+(""),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}), -u.className="geBtn",q.appendChild(u));if(!E||7500f.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||7500f.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 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 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");2<=m.length&&(A=N(m[0]),J=N(m[m.length-1]),m=new mxCell(2");2<=m.length&&(z=N(m[0]),J=N(m[m.length-1]),m=new mxCell(2 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml": "plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var 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(0PlantUML is deprecated',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";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=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=""+Graph.compress('')+"";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=oa.scrollHeight&&(C(),mxEvent.consume(Oa))}));if(0(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";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;yamxUtils.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)+ -"  –  "+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))}40PlantUML is deprecated',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";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=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=""+Graph.compress('')+"";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=Ba.scrollHeight&&(C(),mxEvent.consume(Ra))}));if(0(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";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;zamxUtils.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)+ +"  –  "+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))}40v.selectedIndex&&(v.selectedIndex=D))},!0,!0,!0,!0)}function l(){var m=b.getRecent("Folders"),t=0;if(null!=m&&0f.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&&0f.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'],{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([''],{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(){0b.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;Tb.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;qO?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(/
/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]*>)/ig,"$1").replace(/\n/g,"
")};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&&1O?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(/
/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]*>)/ig,"$1").replace(/\n/g,"
")};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=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("");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("");0>K&& (K=J.indexOf(""));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=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=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;HmxUtils.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;GmxUtils.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;qmxUtils.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;nmxUtils.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.xN+v&&(Q.width=N+v-Q.x, -Q.x=Math.min(Q.x,N+v));Q.yJ+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;SmxUtils.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;nmxUtils.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.xN+v&&(Q.width=N+v-Q.x, +Q.x=Math.min(Q.x,N+v));Q.yJ+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;Hb.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;Gb.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));0I?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(0I?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=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=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
'+mxUtils.htmlEntities(f)+"
";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()&&0J?0:100K?0:100D?(K=D*t.width,D=0):1J?(m=J*t.height,J=0):1J?0:100K?0:100D?(K=D*t.width,D=0):1J?(m=J*t.height,J=0):1J?1:100J?1:100
')))}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;LX&&(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;OX&&(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",L));if(null!=D){t=D;D=[];for(M=0;ML){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));if(null!=D){t=D;D=[];for(M=0;ML){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&&0X.getStatus()|| -299>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>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(0M.indexOf("mxPageSelector")&&0M.indexOf("mxPageSelector")&&0p;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>>8;return m};Editor.crc32=function(m){for(var t=-1,D=0;D>>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));Dap;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>>8;return m};Editor.crc32=function(m){for(var t=-1,D=0;D>>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&&0na.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;oaja)Ba=Ba.slice(0,ja);else for(var Ka=Ba.length;Kana.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;nama.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;vaja)Ea=Ea.slice(0,ja);else for(var Oa=Ea.length;Oama.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=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=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=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(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&&0mxUtils.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&&0mxUtils.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;hamxUtils.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&&0mxUtils.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'+mxUtils.htmlEntities(m)+""};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(){0mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(fa,ea[aa])&&fa.push(ea[aa])}null!=fa&&this.setHiddenTags(fa);this.refresh()}0mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(fa,ea[aa])&&fa.push(ea[aa])}null!=fa&&this.setHiddenTags(fa);this.refresh()}0m.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;Dt?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;tmxUtils.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)){for(var W=X=0;Wt?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;tmxUtils.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)){for(var W=X=0;WmxUtils.indexOf(L,T)&&(M=0mxUtils.indexOf(L,U)&&(M=0?-=[];'./,\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(":")&&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?-=[];'./,\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(":")&&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=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("<mxfile ");if(0<=l){var n=d.lastIndexOf("</mxfile>");n>l&&(k=d.substring(l,n+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/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'); +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=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("<mxfile ");if(0<=l){var n=d.lastIndexOf("</mxfile>");n>l&&(k=d.substring(l,n+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/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'); 0<=k&&(d=d.slice(0,k)+''+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\n':">")+"\n\n"+(null==x?null!=l?""+mxUtils.htmlEntities(l)+"\n":"":"draw.io\n")+(null!=x?'\n":"")+"\n':">")+'\n
\n
'+n+"
\n
\n"+ (null==x?'