Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson <david@jgraph.com>2016-10-05 19:17:29 +0300
committerDavid Benson <david@jgraph.com>2016-10-05 19:17:29 +0300
commitb5c835d8f038835a9ca701dbe81e6f871e2e15a2 (patch)
treefe40eb7528e25ef2f20b597235e3f006f190895d
parent2979ce6babcec9feca1d2eca4066f6cb64af612d (diff)
5.7.1.0 releasev5.7.1.0
Former-commit-id: caa055b898c02890cec04021b3fdc9d8ab56c1c2
-rw-r--r--ChangeLog5
-rw-r--r--VERSION2
-rw-r--r--src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java8
-rw-r--r--war/WEB-INF/appengine-web.xml2
-rw-r--r--war/cache.manifest2
-rw-r--r--war/index.html9
-rw-r--r--war/js/app.min.js346
-rw-r--r--war/js/atlas-viewer.min.js203
-rw-r--r--war/js/atlas.min.js482
-rw-r--r--war/js/diagramly/App.js17
-rw-r--r--war/js/diagramly/EditorUi.js90
-rw-r--r--war/js/diagramly/ElectronApp.js160
-rw-r--r--war/js/diagramly/GraphViewer.js9
-rw-r--r--war/js/diagramly/Menus.js19
-rw-r--r--war/js/embed-static.min.js8
-rw-r--r--war/js/mxgraph/EditorUi.js4
-rw-r--r--war/js/mxgraph/Graph.js37
-rw-r--r--war/js/mxgraph/Menus.js10
-rw-r--r--war/js/reader.min.js8
-rw-r--r--war/js/viewer.min.js199
-rw-r--r--war/plugins/tags.js96
-rw-r--r--war/resources/dia.txt2
-rw-r--r--war/resources/dia_am.txt2
-rw-r--r--war/resources/dia_ar.txt2
-rw-r--r--war/resources/dia_bg.txt2
-rw-r--r--war/resources/dia_bn.txt2
-rw-r--r--war/resources/dia_bs.txt2
-rw-r--r--war/resources/dia_ca.txt2
-rw-r--r--war/resources/dia_cs.txt2
-rw-r--r--war/resources/dia_da.txt2
-rw-r--r--war/resources/dia_de.txt2
-rw-r--r--war/resources/dia_el.txt2
-rw-r--r--war/resources/dia_es.txt2
-rw-r--r--war/resources/dia_et.txt2
-rw-r--r--war/resources/dia_fa.txt2
-rw-r--r--war/resources/dia_fi.txt2
-rw-r--r--war/resources/dia_fil.txt2
-rw-r--r--war/resources/dia_fr.txt2
-rw-r--r--war/resources/dia_gu.txt2
-rw-r--r--war/resources/dia_he.txt2
-rw-r--r--war/resources/dia_hi.txt2
-rw-r--r--war/resources/dia_hr.txt2
-rw-r--r--war/resources/dia_hu.txt2
-rw-r--r--war/resources/dia_i18n.txt2
-rw-r--r--war/resources/dia_id.txt2
-rw-r--r--war/resources/dia_it.txt2
-rw-r--r--war/resources/dia_ja.txt2
-rw-r--r--war/resources/dia_kn.txt2
-rw-r--r--war/resources/dia_ko.txt2
-rw-r--r--war/resources/dia_lt.txt2
-rw-r--r--war/resources/dia_lv.txt2
-rw-r--r--war/resources/dia_ml.txt2
-rw-r--r--war/resources/dia_mr.txt2
-rw-r--r--war/resources/dia_ms.txt2
-rw-r--r--war/resources/dia_nl.txt2
-rw-r--r--war/resources/dia_no.txt2
-rw-r--r--war/resources/dia_pl.txt2
-rw-r--r--war/resources/dia_pt-br.txt2
-rw-r--r--war/resources/dia_pt.txt2
-rw-r--r--war/resources/dia_ro.txt2
-rw-r--r--war/resources/dia_ru.txt2
-rw-r--r--war/resources/dia_sk.txt2
-rw-r--r--war/resources/dia_sl.txt2
-rw-r--r--war/resources/dia_sr.txt2
-rw-r--r--war/resources/dia_sv.txt2
-rw-r--r--war/resources/dia_sw.txt2
-rw-r--r--war/resources/dia_ta.txt2
-rw-r--r--war/resources/dia_te.txt2
-rw-r--r--war/resources/dia_th.txt2
-rw-r--r--war/resources/dia_tr.txt2
-rw-r--r--war/resources/dia_uk.txt2
-rw-r--r--war/resources/dia_vi.txt2
-rw-r--r--war/resources/dia_zh-tw.txt2
-rw-r--r--war/resources/dia_zh.txt2
74 files changed, 1103 insertions, 719 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b2e98d3..4996fae1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+05-OCT-2016: 5.7.1.0
+
+- Adds support for pages in embed mode
+- Embed save uses mxFile rather than GraphModel in pages mode
+
04-OCT-2016: 5.7.0.9
- Adds experimental tags plugin
diff --git a/VERSION b/VERSION
index c039befa..fd5aa015 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.7.0.9 \ No newline at end of file
+5.7.1.0 \ No newline at end of file
diff --git a/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java b/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
index 2e0af51d..1fa545f4 100644
--- a/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
+++ b/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
@@ -367,8 +367,6 @@ public class GliffyDiagramConverter {
Object header = gliffyObject.children.get(0);// first child is the header of the swimlane
Object headerText = header.children.get(0);
- gliffyObject.children.remove(header);
-
GliffyShape shape = header.graphic.getShape();
style.append("strokeWidth=" + shape.strokeWidth).append(";");
style.append("shadow=" + (shape.dropShadow ? 1 : 0)).append(";");
@@ -378,7 +376,7 @@ public class GliffyDiagramConverter {
text = headerText.getText();
- for (int i = 0; i < gliffyObject.children.size(); i++) // rest of the children are lanes
+ for (int i = 1; i < gliffyObject.children.size(); i++) // rest of the children are lanes
{
Object gLane = gliffyObject.children.get(i);
gLane.parent = gliffyObject;
@@ -458,8 +456,8 @@ public class GliffyDiagramConverter {
uo.setAttribute("link", link);
drawioDiagram.getModel().setValue(cell, uo);
- if(text != null && !text.equals(""))
- uo.setAttribute("label", text);
+ if(textObject != null)
+ uo.setAttribute("label", textObject.getText());
}
cell.setStyle(style.toString());
diff --git a/war/WEB-INF/appengine-web.xml b/war/WEB-INF/appengine-web.xml
index 5a85963d..678b2cd4 100644
--- a/war/WEB-INF/appengine-web.xml
+++ b/war/WEB-INF/appengine-web.xml
@@ -2,7 +2,7 @@
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>drawdotio</application>
<!-- IMPORTANT! DO NOT CHANGE THIS VALUE IN SOURCE CONTROL! -->
- <version>test</version>
+ <version>5-7-1-0</version>
<!-- Configure java.util.logging -->
<system-properties>
diff --git a/war/cache.manifest b/war/cache.manifest
index 78951cc0..6727b06d 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 10/04/2016 03:37 PM
+# 10/05/2016 04:57 PM
/app.html
/index.html?offline=1
diff --git a/war/index.html b/war/index.html
index 8e54083b..736f793a 100644
--- a/war/index.html
+++ b/war/index.html
@@ -397,10 +397,13 @@
App.main();
// Logs footer1 clicks
-document.getElementById("geFooterLink1").onclick = function()
+if (document != null)
{
- var img = new Image();
- img.src = 'https://log.draw.io/log?msg=geFooterLink1: location=' + encodeURIComponent(window.location) + '&v=' + encodeURIComponent(EditorUi.VERSION);
+ document.getElementById("geFooterLink1").onclick = function()
+ {
+ var img = new Image();
+ img.src = 'https://log.draw.io/log?msg=geFooterLink1: location=' + encodeURIComponent(window.location) + '&v=' + encodeURIComponent(EditorUi.VERSION);
+ }
}
/**
diff --git a/war/js/app.min.js b/war/js/app.min.js
index ee39f3b1..9185d0cf 100644
--- a/war/js/app.min.js
+++ b/war/js/app.min.js
@@ -79,10 +79,10 @@ frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h
li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};u.ELEMENT_DOM_INTERFACES=u.Q;u.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};u.ueffects=u.P;u.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
-u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);b=function(b){function e(b,a){var d;if(Q.hasOwnProperty(a))d=Q[a];else{var c=a.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=a.match(V))?String.fromCharCode(parseInt(c[1],
-16)):K&&J.test(a)?(K.innerHTML="\x26"+a+";",c=K.textContent,Q[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(Z,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(Y,"\x26lt;").replace(aa,"\x26gt;").replace(X,"\x26#34;")}function l(b){return b.replace(U,"\x26amp;$1").replace(Y,"\x26lt;").replace(aa,"\x26gt;")}function m(b){var a={z:b.z||b.cdata,A:b.A||b.comment,B:b.B||b.endDoc,t:b.t||b.endTag,e:b.e||b.pcdata,F:b.F||b.rcdata,H:b.H||b.startDoc,w:b.w||b.startTag};return function(b,
+u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);b=function(b){function e(b,a){var d;if(Q.hasOwnProperty(a))d=Q[a];else{var c=a.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=a.match(U))?String.fromCharCode(parseInt(c[1],
+16)):K&&J.test(a)?(K.innerHTML="\x26"+a+";",c=K.textContent,Q[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(Z,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(Y,"\x26lt;").replace(aa,"\x26gt;").replace(X,"\x26#34;")}function l(b){return b.replace(V,"\x26amp;$1").replace(Y,"\x26lt;").replace(aa,"\x26gt;")}function m(b){var a={z:b.z||b.cdata,A:b.A||b.comment,B:b.B||b.endDoc,t:b.t||b.endTag,e:b.e||b.pcdata,F:b.F||b.rcdata,H:b.H||b.startDoc,w:b.w||b.startTag};return function(b,
e){var c,g=/(<\/|<\!--|<[!?]|[&<>])/g;c=b+"";if(ga)c=c.split(g);else{for(var k=[],l=0,n;(n=g.exec(c))!==f;)k.push(c.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(c.substring(l));c=k}t(a,c,0,{r:d,C:d},e)}}function u(b,a,d,e,c){return function(){t(b,a,d,e,c)}}function t(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,n,m=d.length;e<m;){var z=d[e++],x=d[e];switch(z){case "\x26":ea.test(x)?(a.e&&a.e("\x26"+x,g,$,u(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,$,u(a,d,e,f,g));break;case "\x3c/":if(k=
-/^([-\w:]+)[^\'\"]*/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,$,u(a,d,e,f,g));else{var y=d,r=e,s=a,E=g,D=$,A=f,I=p(y,r);I?(s.t&&s.t(I.name,E,D,u(s,y,r,A,E)),e=I.next):e=y.length}else a.e&&a.e("\x26lt;/",g,$,u(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,$,u(a,d,e,f,g));var V=b.f[n];V&ca&&(e=q(d,{name:n,next:e,c:V},a,g,$,f))}else{var y=d,r=a,s=g,E=
+/^([-\w:]+)[^\'\"]*/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,$,u(a,d,e,f,g));else{var y=d,r=e,s=a,E=g,D=$,A=f,U=p(y,r);U?(s.t&&s.t(U.name,E,D,u(s,y,r,A,E)),e=U.next):e=y.length}else a.e&&a.e("\x26lt;/",g,$,u(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(x))if(k[0].length===x.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,$,u(a,d,e,f,g));var I=b.f[n];I&ca&&(e=q(d,{name:n,next:e,c:I},a,g,$,f))}else{var y=d,r=a,s=g,E=
$,D=f,R=p(y,e);R?(r.w&&r.w(R.name,R.R,s,E,u(r,y,R.next,D,s)),e=R.c&ca?q(y,R,r,s,E,D):R.next):e=y.length}else a.e&&a.e("\x26lt;",g,$,u(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<m&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<m){if(a.A){var J=d.slice(e,l).join("");a.A(J.substr(0,J.length-2),g,$,u(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,$,u(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(x)){if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
g,$,u(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,$,u(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,$,u(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,$,u(a,d,e,f,g));break;case "":break;default:a.e&&a.e(z,g,$,u(a,d,e,f,g))}}a.B&&a.B(g)}catch(H){if(H!==$)throw H;}}function q(a,d,e,c,f,g){var k=a.length;fa.hasOwnProperty(d.name)||(fa[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=fa[d.name],m=d.next,t=d.next+1;t<k&&!("\x3c/"===
a[t-1]&&n.test(a[t]));t++);t<k&&(t-=1);k=a.slice(m,t).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,u(e,a,t,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,u(e,a,t,g,c));else throw Error("bug");return t}function p(a,e){var f=/^([-\w:]+)/.exec(a[e]),k={};k.name=f[1].toLowerCase();k.c=b.f[k.name];for(var l=a[e].substr(f[0].length),n=e+1,m=a.length;n<m&&"\x3e"!==a[n];n++)l+=a[n];if(!(m<=n)){for(var u=[];""!==l;)if(f=R.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],t=d,l=[l,a[n++]];n<m;n++){if(t){if("\x3e"===
@@ -92,8 +92,8 @@ n.push("\x3c/",t,"\x3e")}else l=!(m&b.c.EMPTY)}}},endTag:function(a,e){if(l)l=d;
endDoc:function(b){for(;g.length;g.length--)b.push("\x3c/",g[g.length-1].v,"\x3e")}})}function s(b,a,d,e,c){if(!c)return f;try{var g=n.parse(""+b);if(g&&(!g.K()||ia.test(g.W()))){var k=c(g,a,d,e);return k?k.toString():f}}catch(l){}return f}function L(b,a,d,e,c){d||b(a+" removed",{S:"removed",tagName:a});if(e!==c){var f="changed";e&&!c?f="removed":!e&&c&&(f="added");b(a+"."+d+" "+f,{S:f,tagName:a,la:d,oldValue:e,newValue:c})}}function N(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];a="*::"+
d;if(b.hasOwnProperty(a))return b[a]}function T(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var n=e[l],m=e[l+1],u=m,t=f,q;if((q=d+"::"+n,b.m.hasOwnProperty(q))||(q="*::"+n,b.m.hasOwnProperty(q)))t=b.m[q];if(t!==f)switch(t){case b.d.NONE:break;case b.d.SCRIPT:m=f;k&&L(k,d,n,u,m);break;case b.d.STYLE:if("undefined"===typeof C){m=f;k&&L(k,d,n,u,m);break}var p=[];C(m,{declaration:function(a,d){var e=a.toLowerCase();O(e,d,c?function(a){return s(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&p.push(e+
": "+d.join(" "))}});m=0<p.length?p.join(" ; "):f;k&&L(k,d,n,u,m);break;case b.d.ID:case b.d.IDREF:case b.d.IDREFS:case b.d.GLOBAL_NAME:case b.d.LOCAL_NAME:case b.d.CLASSES:m=g?g(m):m;k&&L(k,d,n,u,m);break;case b.d.URI:m=s(m,N(b.J,d,n),N(b.I,d,n),{TYPE:"MARKUP",XML_ATTR:n,XML_TAG:d},c);k&&L(k,d,n,u,m);break;case b.d.URI_FRAGMENT:m&&"#"===m.charAt(0)?(m=m.substring(1),m=g?g(m):m,m!==f&&m!==a&&(m="#"+m)):m=f;k&&L(k,d,n,u,m);break;default:m=f,k&&L(k,d,n,u,m)}else m=f,k&&L(k,d,n,u,m);e[l+1]=m}return e}
-function W(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:T(f,g,d,e,c)}}}function P(b,a){var d=[];r(a)(b,d);return d.join("")}var C,O;"undefined"!==typeof window&&(C=window.parseCssDeclarations,O=window.sanitizeCssProperty);var Q={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,V=/^#x([0-9A-Fa-f]+)$/,J=/^[A-Za-z][A-za-z0-9]+$/,K="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
-f,S=/\0/g,Z=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ea=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,da=/&/g,U=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Y=/[<]/g,aa=/>/g,X=/\"/g,R=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,$={},fa={},ia=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=r;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=W;ba.wa=ba.normalizeRCData=l;ba.xa=
+function W(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:T(f,g,d,e,c)}}}function P(b,a){var d=[];r(a)(b,d);return d.join("")}var C,O;"undefined"!==typeof window&&(C=window.parseCssDeclarations,O=window.sanitizeCssProperty);var Q={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,U=/^#x([0-9A-Fa-f]+)$/,J=/^[A-Za-z][A-za-z0-9]+$/,K="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+f,S=/\0/g,Z=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ea=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,da=/&/g,V=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Y=/[<]/g,aa=/>/g,X=/\"/g,R=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,$={},fa={},ia=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=r;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=W;ba.wa=ba.normalizeRCData=l;ba.xa=
ba.sanitize=function(b,a,d,e){return P(b,W(a,d,e))};ba.ya=ba.sanitizeAttribs=T;ba.za=ba.sanitizeWithPolicy=P;ba.Ba=ba.unescapeEntities=g;return ba}(u);g=b.sanitize;"undefined"!==typeof window&&(window.html=b,window.html_sanitize=g)})();!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function c(f,d,b){function e(k,n){if(!d[k]){if(!f[k]){var m="function"==typeof require&&require;if(!n&&m)return m(k,!0);if(g)return g(k,!0);m=Error("Cannot find module '"+k+"'");throw m.code="MODULE_NOT_FOUND",m;}m=d[k]={exports:{}};
f[k][0].call(m.exports,function(b){var d=f[k][1][b];return e(d?d:b)},m,m.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<b.length;k++)e(b[k]);return e}({1:[function(c,f,d){function b(d){if(!(this instanceof b))return new b(d);d=this.options=k.assign({level:s,method:t,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},d||{});d.raw&&0<d.windowBits?d.windowBits=-d.windowBits:d.gzip&&0<d.windowBits&&16>d.windowBits&&(d.windowBits+=16);this.err=0;this.msg=
"";this.ended=!1;this.chunks=[];this.strm=new m;this.strm.avail_out=0;var e=g.deflateInit2(this.strm,d.level,d.method,d.windowBits,d.memLevel,d.strategy);if(e!==r)throw Error(n[e]);if(d.header&&g.deflateSetHeader(this.strm,d.header),d.dictionary){var c;if(c="string"==typeof d.dictionary?l.string2buf(d.dictionary):"[object ArrayBuffer]"===p.call(d.dictionary)?new Uint8Array(d.dictionary):d.dictionary,e=g.deflateSetDictionary(this.strm,c),e!==r)throw Error(n[e]);this._dict_set=!0}}function e(d,e){var c=
@@ -116,27 +116,27 @@ for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=fu
0))}function k(b,d){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function n(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function m(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-Z?b.strstart-(b.w_size-Z):0,m=b.window,t=b.w_mask,u=b.prev,q=b.strstart+S,p=m[g+k-1],v=m[g+k];b.prev_length>=b.good_match&&
(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,m[e+k]===v&&m[e+k-1]===p&&m[e]===m[g]&&m[++e]===m[g+1]){g+=2;e++;do;while(m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&g<q);if(c=S-(q-g),g=q-S,c>k){if(b.match_start=d,k=c,c>=l)break;p=m[g+k-1];v=m[g+k]}}while((d=u[d&t])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-Z)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),
-b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}}while(b.lookahead<Z&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<Z){if(p(b),b.lookahead<Z&&d===G)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<
+b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}}while(b.lookahead<Z&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<Z){if(p(b),b.lookahead<Z&&d===G)return V;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-Z&&(b.match_length=m(b,e)),b.match_length>=K)if(c=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
-b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else c=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?aa:X):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?U:Y}function s(b,d){for(var e,c,f;;){if(b.lookahead<Z){if(p(b),
-b.lookahead<Z&&d===G)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-Z&&(b.match_length=m(b,e),5>=b.match_length&&(b.strategy===N||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=
-K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return U}else if(b.match_available){if(c=D._tr_tally(b,0,
-b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return U}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?aa:X):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?U:Y}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function t(){this.strm=null;this.status=
+b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else c=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return V}return b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?aa:X):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?V:Y}function s(b,d){for(var e,c,f;;){if(b.lookahead<Z){if(p(b),
+b.lookahead<Z&&d===G)return V;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-Z&&(b.match_length=m(b,e),5>=b.match_length&&(b.strategy===N||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=
+K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return V}else if(b.match_available){if(c=D._tr_tally(b,0,
+b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return V}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?aa:X):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?V:Y}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function t(){this.strm=null;this.status=
0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=P;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=
-this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(2*V);this.dyn_dtree=new x.Buf16(2*(2*Q+1));this.bl_tree=new x.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(J+1);this.heap=new x.Buf16(2*O+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*O+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(2*U);this.dyn_dtree=new x.Buf16(2*(2*Q+1));this.bl_tree=new x.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(J+1);this.heap=new x.Buf16(2*O+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*O+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
this.lit_bufsize=this.l_buf=0}function u(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:da,d.adler=2===e.wrap?0:1,e.last_flush=G,D._tr_init(e),I):b(d,H)}function v(b){var d=u(b);d===I&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return H;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>C||c!==P||8>f||15<f||0>e||9<e||0>k||k>T)return b(d,H);8===f&&(f=9);var n=new t;return d.state=n,n.strm=d,n.wrap=l,n.gzhead=null,n.w_bits=f,n.w_size=1<<n.w_bits,n.w_mask=n.w_size-1,n.hash_bits=g+7,n.hash_size=1<<n.hash_bits,n.hash_mask=n.hash_size-1,n.hash_shift=~~((n.hash_bits+K-1)/K),n.window=new x.Buf8(2*
-n.w_size),n.head=new x.Buf16(n.hash_size),n.prev=new x.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new x.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=e,n.strategy=k,n.method=c,v(d)}var y,x=c("../utils/common"),D=c("./trees"),A=c("./adler32"),B=c("./crc32"),E=c("./messages"),G=0,F=4,I=0,H=-2,L=-1,N=1,T=4,W=2,P=8,C=9,O=286,Q=30,M=19,V=2*O+1,J=15,K=3,S=258,Z=S+K+1,ea=42,da=113,U=1,Y=2,aa=3,X=4;y=[new q(0,0,0,0,function(b,d){var e=
-65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return U;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-Z&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?aa:X):(b.strstart>b.block_start&&k(b,!1),U)}),new q(4,4,8,
+n.w_size),n.head=new x.Buf16(n.hash_size),n.prev=new x.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new x.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=e,n.strategy=k,n.method=c,v(d)}var y,x=c("../utils/common"),D=c("./trees"),A=c("./adler32"),B=c("./crc32"),E=c("./messages"),G=0,F=4,I=0,H=-2,L=-1,N=1,T=4,W=2,P=8,C=9,O=286,Q=30,M=19,U=2*O+1,J=15,K=3,S=258,Z=S+K+1,ea=42,da=113,V=1,Y=2,aa=3,X=4;y=[new q(0,0,0,0,function(b,d){var e=
+65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return V;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-Z&&(k(b,!1),0===b.strm.avail_out))return V}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?aa:X):(b.strstart>b.block_start&&k(b,!1),V)}),new q(4,4,8,
4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,P,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?H:(b.state.gzhead=d,I):H};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5<c||0>c)return d?b(d,H):H;if(m=d.state,!d.output||!d.input&&0!==d.avail_in||
666===m.status&&c!==F)return b(d,0===d.avail_out?-5:H);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(d.adler=0,l(m,31),l(m,139),l(m,8),m.gzhead?(l(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),l(m,255&m.gzhead.time),l(m,m.gzhead.time>>8&255),l(m,m.gzhead.time>>16&255),l(m,m.gzhead.time>>24&255),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(l(m,255&m.gzhead.extra.length),
l(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(d.adler=B(d.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(l(m,0),l(m,0),l(m,0),l(m,0),l(m,0),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,3),m.status=da)):(t=P+(m.w_bits-8<<4)<<8,u=-1,u=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,t|=u<<6,0!==m.strstart&&(t|=32),m.status=da,n(m,t+(31-t%31)),0!==m.strstart&&(n(m,d.adler>>>16),n(m,65535&d.adler)),d.adler=1);if(69===m.status)if(m.gzhead.extra){for(t=m.pending;m.gzindex<
(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending!==m.pending_buf_size));)l(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>
t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;l(m,u)}while(0!==u);m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));0===u&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),
g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;l(m,u)}while(0!==u);m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));0===u&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(d),m.pending+2<=m.pending_buf_size&&(l(m,255&d.adler),l(m,d.adler>>8&255),d.adler=0,m.status=da)):m.status=da),0!==m.pending){if(g(d),0===d.avail_out)return m.last_flush=
--1,I}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==F)return b(d,-5);if(666===m.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==m.lookahead||c!==G&&666!==m.status){var q;if(2===m.strategy)a:{for(var v;;){if(0===m.lookahead&&(p(m),0===m.lookahead)){if(c===G){q=U;break a}break}if(m.match_length=0,v=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,v&&(k(m,!1),0===m.strm.avail_out)){q=U;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:X):m.last_lit&&
-(k(m,!1),0===m.strm.avail_out)?U:Y)}else if(3===m.strategy)a:{var z,x;for(v=m.window;;){if(m.lookahead<=S){if(p(m),m.lookahead<=S&&c===G){q=U;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=K&&0<m.strstart&&(x=m.strstart-1,z=v[x],z===v[++x]&&z===v[++x]&&z===v[++x])){f=m.strstart+S;do;while(z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&x<f);m.match_length=S-(f-x);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
-K?(q=D._tr_tally(m,1,m.match_length-K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(k(m,!1),0===m.strm.avail_out)){q=U;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:X):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?U:Y)}else q=y[m.level].func(m,c);if(q!==aa&&q!==X||(m.status=666),q===U||q===aa)return 0===d.avail_out&&(m.last_flush=-1),I;if(q===Y&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,
+-1,I}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==F)return b(d,-5);if(666===m.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==m.lookahead||c!==G&&666!==m.status){var q;if(2===m.strategy)a:{for(var v;;){if(0===m.lookahead&&(p(m),0===m.lookahead)){if(c===G){q=V;break a}break}if(m.match_length=0,v=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,v&&(k(m,!1),0===m.strm.avail_out)){q=V;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:X):m.last_lit&&
+(k(m,!1),0===m.strm.avail_out)?V:Y)}else if(3===m.strategy)a:{var z,x;for(v=m.window;;){if(m.lookahead<=S){if(p(m),m.lookahead<=S&&c===G){q=V;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=K&&0<m.strstart&&(x=m.strstart-1,z=v[x],z===v[++x]&&z===v[++x]&&z===v[++x])){f=m.strstart+S;do;while(z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&z===v[++x]&&x<f);m.match_length=S-(f-x);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
+K?(q=D._tr_tally(m,1,m.match_length-K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(k(m,!1),0===m.strm.avail_out)){q=V;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:X):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?V:Y)}else q=y[m.level].func(m,c);if(q!==aa&&q!==X||(m.status=666),q===V||q===aa)return 0===d.avail_out&&(m.last_flush=-1),I;if(q===Y&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,
0,0,!1),3===c&&(e(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(d),0===d.avail_out))return m.last_flush=-1,I}return c!==F?I:0>=m.wrap?1:(2===m.wrap?(l(m,255&d.adler),l(m,d.adler>>8&255),l(m,d.adler>>16&255),l(m,d.adler>>24&255),l(m,255&d.total_in),l(m,d.total_in>>8&255),l(m,d.total_in>>16&255),l(m,d.total_in>>24&255)):(n(m,d.adler>>>16),n(m,65535&d.adler)),g(d),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?I:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,
e!==ea&&69!==e&&73!==e&&91!==e&&103!==e&&e!==da&&666!==e?b(d,H):(d.state=null,e===da?b(d,-3):I)):H};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,n,m;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==ea||c.lookahead))return H;1===k&&(b.adler=A(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=f;b.next_in=
0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+K-1])&c.hash_mask,c.prev[f&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=f,f++;while(--g);c.strstart=f;c.lookahead=K-1;p(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=K-1,c.match_available=0,b.next_in=n,b.input=m,b.avail_in=l,c.wrap=k,I};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
@@ -147,39 +147,39 @@ if(B=0,t<G){E=t;G-=E;do L[n++]=u[B++];while(--E);B=n-F;I=L}}}else if(B+=t-E,E<G)
{}],11:[function(c,f,d){function b(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(D),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state,
0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<d)?y:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):y}function n(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==z&&(b.state=null),c):y}function m(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new s.Buf8(b.wsize)),c>=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e-
-c,f,b.wnext),c-=f,c?(s.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,s=c("../utils/common"),q=c("./adler32"),t=c("./crc32"),u=c("./inffast"),v=c("./inftrees"),z=0,y=-2,x=1,D=852,A=592,B=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(d,e){var c,f,g,k,l,n,D,A,C,O,Q,M,V,J,K,S,Z,ea,da,U,Y,aa,X=0,R=new s.Buf8(4),ga=[16,
+c,f,b.wnext),c-=f,c?(s.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,s=c("../utils/common"),q=c("./adler32"),t=c("./crc32"),u=c("./inffast"),v=c("./inftrees"),z=0,y=-2,x=1,D=852,A=592,B=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(d,e){var c,f,g,k,l,n,D,A,C,O,Q,M,U,J,K,S,Z,ea,da,V,Y,aa,X=0,R=new s.Buf8(4),ga=[16,
17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&0!==d.avail_in)return y;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;C=c.bits;O=n;Q=D;Y=z;a:for(;;)switch(c.mode){case x:if(0===c.wrap){c.mode=13;break}for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(2&c.wrap&&35615===A){c.check=0;R[0]=255&A;R[1]=A>>>8&255;c.check=t(c.check,R,2,0);C=A=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
-!(1&c.wrap)||(((255&A)<<8)+(A>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&A)){d.msg="unknown compression method";c.mode=30;break}if(A>>>=4,C-=4,U=(15&A)+8,0===c.wbits)c.wbits=U;else if(U>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<U;d.adler=c.check=1;c.mode=512&A?10:12;C=A=0;break;case 2:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(c.flags=A,8!==(255&c.flags)){d.msg="unknown compression method";c.mode=30;break}if(57344&c.flags){d.msg="unknown header flags set";
+!(1&c.wrap)||(((255&A)<<8)+(A>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&A)){d.msg="unknown compression method";c.mode=30;break}if(A>>>=4,C-=4,V=(15&A)+8,0===c.wbits)c.wbits=V;else if(V>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<V;d.adler=c.check=1;c.mode=512&A?10:12;C=A=0;break;case 2:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(c.flags=A,8!==(255&c.flags)){d.msg="unknown compression method";c.mode=30;break}if(57344&c.flags){d.msg="unknown header flags set";
c.mode=30;break}c.head&&(c.head.text=A>>8&1);512&c.flags&&(R[0]=255&A,R[1]=A>>>8&255,c.check=t(c.check,R,2,0));C=A=0;c.mode=3;case 3:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.head&&(c.head.time=A);512&c.flags&&(R[0]=255&A,R[1]=A>>>8&255,R[2]=A>>>16&255,R[3]=A>>>24&255,c.check=t(c.check,R,4,0));C=A=0;c.mode=4;case 4:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.head&&(c.head.xflags=255&A,c.head.os=A>>8);512&c.flags&&(R[0]=255&A,R[1]=A>>>8&255,c.check=t(c.check,R,2,0));C=A=0;c.mode=
-5;case 5:if(1024&c.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.length=A;c.head&&(c.head.extra_len=A);512&c.flags&&(R[0]=255&A,R[1]=A>>>8&255,c.check=t(c.check,R,2,0));C=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>n&&(M=n),M&&(c.head&&(U=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,M,U)),512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
-7;case 7:if(2048&c.flags){if(0===n)break a;M=0;do U=f[k+M++],c.head&&U&&65536>c.length&&(c.head.name+=String.fromCharCode(U));while(U&&M<n);if(512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,U)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===n)break a;M=0;do U=f[k+M++],c.head&&U&&65536>c.length&&(c.head.comment+=String.fromCharCode(U));while(U&&M<n);if(512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,U)break a}else c.head&&(c.head.comment=null);c.mode=
+5;case 5:if(1024&c.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.length=A;c.head&&(c.head.extra_len=A);512&c.flags&&(R[0]=255&A,R[1]=A>>>8&255,c.check=t(c.check,R,2,0));C=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>n&&(M=n),M&&(c.head&&(V=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,M,V)),512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
+7;case 7:if(2048&c.flags){if(0===n)break a;M=0;do V=f[k+M++],c.head&&V&&65536>c.length&&(c.head.name+=String.fromCharCode(V));while(V&&M<n);if(512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,V)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===n)break a;M=0;do V=f[k+M++],c.head&&V&&65536>c.length&&(c.head.comment+=String.fromCharCode(V));while(V&&M<n);if(512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,V)break a}else c.head&&(c.head.comment=null);c.mode=
9;case 9:if(512&c.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}C=A=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.adler=c.check=b(A);C=A=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=n,c.hold=A,c.bits=C,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){A>>>=
7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}switch(c.last=1&A,A>>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:J=c;if(B){S=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(S=0;144>S;)J.lens[S++]=8;for(;256>S;)J.lens[S++]=9;for(;280>S;)J.lens[S++]=7;for(;288>S;)J.lens[S++]=8;v(1,J.lens,0,288,p,0,J.work,{bits:9});for(S=0;32>S;)J.lens[S++]=5;v(2,J.lens,0,32,r,0,J.work,{bits:5});B=!1}J.lencode=p;J.lenbits=9;J.distcode=r;J.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break;
case 2:c.mode=17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;C-=2;break;case 14:A>>>=7&C;for(C-=7&C;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if((65535&A)!==(A>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,C=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>n&&(M=n),M>D&&(M=D),0===M)break a;s.arraySet(g,f,k,M,l);n-=M;k+=M;D-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>C;){if(0===n)break a;n--;A+=f[k++]<<
C;C+=8}if(c.nlen=(31&A)+257,A>>>=5,C-=5,c.ndist=(31&A)+1,A>>>=5,C-=5,c.ncode=(15&A)+4,A>>>=4,C-=4,286<c.nlen||30<c.ndist){d.msg="too many length or distance symbols";c.mode=30;break}c.have=0;c.mode=18;case 18:for(;c.have<c.ncode;){for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.lens[ga[c.have++]]=7&A;A>>>=3;C-=3}for(;19>c.have;)c.lens[ga[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,aa={bits:c.lenbits},Y=v(0,c.lens,0,19,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid code lengths set";
-c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<c.nlen+c.ndist;){for(;X=c.lencode[A&(1<<c.lenbits)-1],K=X>>>24,S=65535&X,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(16>S)A>>>=K,C-=K,c.lens[c.have++]=S;else{if(16===S){for(J=K+2;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A>>>=K,C-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}U=c.lens[c.have-1];M=3+(3&A);A>>>=2;C-=2}else if(17===S){for(J=K+3;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;U=0;M=3+(7&A);
-A>>>=3;C-=3}else{for(J=K+7;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;U=0;M=11+(127&A);A>>>=7;C-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=U}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Y=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
+c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<c.nlen+c.ndist;){for(;X=c.lencode[A&(1<<c.lenbits)-1],K=X>>>24,S=65535&X,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(16>S)A>>>=K,C-=K,c.lens[c.have++]=S;else{if(16===S){for(J=K+2;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A>>>=K,C-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}V=c.lens[c.have-1];M=3+(3&A);A>>>=2;C-=2}else if(17===S){for(J=K+3;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;V=0;M=3+(7&A);
+A>>>=3;C-=3}else{for(J=K+7;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=K;C-=K;V=0;M=11+(127&A);A>>>=7;C-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=V}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Y=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
c.distdyn,aa={bits:c.distbits},Y=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,Y){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=n&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=n;c.hold=A;c.bits=C;u(d,Q);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;C=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;X=c.lencode[A&(1<<c.lenbits)-1],K=X>>>24,J=X>>>16&255,S=65535&X,!(K<=
C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(J&&0===(240&J)){Z=K;ea=J;for(da=S;X=c.lencode[da+((A&(1<<Z+ea)-1)>>Z)],K=X>>>24,J=X>>>16&255,S=65535&X,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,c.length=S,0===J){c.mode=26;break}if(32&J){c.back=-1;c.mode=12;break}if(64&J){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&J;c.mode=22;case 22:if(c.extra){for(J=c.extra;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.length+=A&(1<<c.extra)-
1;A>>>=c.extra;C-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;X=c.distcode[A&(1<<c.distbits)-1],K=X>>>24,J=X>>>16&255,S=65535&X,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(0===(240&J)){Z=K;ea=J;for(da=S;X=c.distcode[da+((A&(1<<Z+ea)-1)>>Z)],K=X>>>24,J=X>>>16&255,S=65535&X,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,64&J){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&J;c.mode=24;case 24:if(c.extra){for(J=
-c.extra;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(M=Q-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,V=c.wsize-M):V=c.wnext-M;M>c.length&&(M=c.length);J=c.window}else J=g,V=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=J[V++];while(--M);
+c.extra;C<J;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(M=Q-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,U=c.wsize-M):U=c.wnext-M;M>c.length&&(M=c.length);J=c.window}else J=g,U=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=J[U++];while(--M);
0===c.length&&(c.mode=21);break;case 26:if(0===D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>C;){if(0===n)break a;n--;A|=f[k++]<<C;C+=8}if(Q-=D,d.total_out+=Q,c.total+=Q,Q&&(d.adler=c.check=c.flags?t(c.check,g,Q,l-Q):q(c.check,g,Q,l-Q)),Q=D,(c.flags?A:b(A))!==c.check){d.msg="incorrect data check";c.mode=30;break}C=A=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
30;break}C=A=0}c.mode=29;case 29:Y=1;break a;case 30:Y=-3;break a;case 31:return-4;default:return y}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=n,c.hold=A,c.bits=C,(c.wsize||Q!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,Q-d.avail_out)?(c.mode=31,-4):(O-=d.avail_in,Q-=d.avail_out,d.total_in+=O,d.total_out+=Q,c.total+=Q,c.wrap&&Q&&(d.adler=c.check=c.flags?t(c.check,g,Q,d.next_out-Q):q(c.check,g,Q,d.next_out-Q)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:
0)+(20===c.mode||15===c.mode?256:0),(0===O&&0===Q||4===e)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:m(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):
y};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,
-16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,u){var v,z,y,x,D,A,B,E;x=u.bits;for(var G=0,F=0,I=0,H=0,L=0,N=0,T=0,W=v=0,P=0,C=null,O=0,Q=new b.Buf16(16),N=new b.Buf16(16),M=null,V=0,G=0;15>=G;G++)Q[G]=0;for(F=0;F<r;F++)Q[c[f+F]]++;L=x;for(H=15;1<=H&&0===Q[H];H--);if(L>H&&(L=H),0===H)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(I=1;I<H&&0===Q[I];I++);L<I&&(L=I);for(G=v=1;15>=G;G++)if(v<<=1,v-=Q[G],0>v)return-1;if(0<
-v&&(0===d||1!==H))return-1;N[1]=0;for(G=1;15>G;G++)N[G+1]=N[G]+Q[G];for(F=0;F<r;F++)0!==c[f+F]&&(t[N[c[f+F]]++]=F);if(0===d?(C=M=t,D=19):1===d?(C=e,O-=257,M=g,V-=257,D=256):(C=k,M=l,D=-1),P=0,F=0,G=I,x=q,N=L,T=0,y=-1,W=1<<L,r=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var J=0;;){J++;A=G-T;t[F]<D?(B=0,E=t[F]):t[F]>D?(B=M[V+t[F]],E=C[O+t[F]]):(B=96,E=0);v=1<<G-T;I=z=1<<N;do z-=v,s[x+(P>>T)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<<G-1;P&v;)v>>=1;if(0!==v?(P&=v-1,P+=v):P=0,F++,0===--Q[G]){if(G===H)break;
+16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,u){var v,z,y,x,D,A,B,E;x=u.bits;for(var G=0,F=0,I=0,H=0,L=0,N=0,T=0,W=v=0,P=0,C=null,O=0,Q=new b.Buf16(16),N=new b.Buf16(16),M=null,U=0,G=0;15>=G;G++)Q[G]=0;for(F=0;F<r;F++)Q[c[f+F]]++;L=x;for(H=15;1<=H&&0===Q[H];H--);if(L>H&&(L=H),0===H)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(I=1;I<H&&0===Q[I];I++);L<I&&(L=I);for(G=v=1;15>=G;G++)if(v<<=1,v-=Q[G],0>v)return-1;if(0<
+v&&(0===d||1!==H))return-1;N[1]=0;for(G=1;15>G;G++)N[G+1]=N[G]+Q[G];for(F=0;F<r;F++)0!==c[f+F]&&(t[N[c[f+F]]++]=F);if(0===d?(C=M=t,D=19):1===d?(C=e,O-=257,M=g,U-=257,D=256):(C=k,M=l,D=-1),P=0,F=0,G=I,x=q,N=L,T=0,y=-1,W=1<<L,r=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var J=0;;){J++;A=G-T;t[F]<D?(B=0,E=t[F]):t[F]>D?(B=M[U+t[F]],E=C[O+t[F]]):(B=96,E=0);v=1<<G-T;I=z=1<<N;do z-=v,s[x+(P>>T)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<<G-1;P&v;)v>>=1;if(0!==v?(P&=v-1,P+=v):P=0,F++,0===--Q[G]){if(G===H)break;
G=c[f+t[F]]}if(G>L&&(P&r)!==y){0===T&&(T=L);x+=I;N=G-T;for(v=1<<N;N+T<H&&(v-=Q[N+T],!(0>=v));)N++,v<<=1;if(W+=1<<N,1===d&&852<W||2===d&&592<W)return 1;y=P&r;s[y]=L<<24|N<<16|x-q|0}}return 0!==P&&(s[x+P]=G-T<<24|4194304),u.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=
b.length;0<=--d;)b[d]=0}function e(b,d,e,c,f){this.static_tree=b;this.extra_bits=d;this.extra_base=e;this.elems=c;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,e){b.bi_valid>W-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>W-b.bi_valid,b.bi_valid+=e-W):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function n(b,d,e){l(b,e[2*
d],e[2*d+1])}function m(b,d){var e=0;do e|=1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(T+1),g=0;for(c=1;c<=T;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function r(b){var d;for(d=0;d<I;d++)b.dyn_ltree[2*d]=0;for(d=0;d<H;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*P]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);
-b.bi_buf=0;b.bi_valid=0}function q(b,d,e,c){var f=2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function t(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function u(b,d,e){var c,f,g,k,m=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===c?n(b,f,d):(g=da[f],n(b,g+F+1,d),k=M[g],0!==k&&(f-=U[g],l(b,f,
-k)),c--,g=256>c?ea[c]:ea[256+(c>>>7)],n(b,g,e),k=V[g],0!==k&&(c-=Y[g],l(b,c,k)));while(m<b.last_lit)}n(b,P,d)}function v(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,n=-1;b.heap_len=0;b.heap_max=N;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=n=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>n?++n:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=n;for(e=b.heap_len>>1;1<=e;e--)t(b,g,e);f=l;
+b.bi_buf=0;b.bi_valid=0}function q(b,d,e,c){var f=2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function t(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function u(b,d,e){var c,f,g,k,m=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===c?n(b,f,d):(g=da[f],n(b,g+F+1,d),k=M[g],0!==k&&(f-=V[g],l(b,f,
+k)),c--,g=256>c?ea[c]:ea[256+(c>>>7)],n(b,g,e),k=U[g],0!==k&&(c-=Y[g],l(b,c,k)));while(m<b.last_lit)}n(b,P,d)}function v(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,n=-1;b.heap_len=0;b.heap_max=N;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=n=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>n?++n:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=n;for(e=b.heap_len>>1;1<=e;e--)t(b,g,e);f=l;
do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,u,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,v=d.stat_desc.has_stree,z=d.stat_desc.extra_bits,x=d.stat_desc.extra_base,y=d.stat_desc.max_length,r=0;for(c=0;c<=T;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
1]=0;for(e=b.heap_max+1;e<N;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>y&&(c=y,r++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=x&&(m=z[f-x]),u=k[2*f],b.opt_len+=u*(c+m),v&&(b.static_len+=u*(q[2*f+1]+m)));if(0!==r){do{for(c=y-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[y]--;r-=2}while(0<r);for(c=y;0!==c;c--)for(f=b.bl_count[c];0!==f;)m=b.heap[--e],m>l||(k[2*m+1]!==c&&(b.opt_len+=(c-k[2*m+1])*k[2*m],k[2*m+1]=c),f--)}p(g,n,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,n=7,
m=4;0===k&&(n=138,m=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<n&&f===k||(l<m?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*C]++):10>=l?b.bl_tree[2*O]++:b.bl_tree[2*Q]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,d,e){var c,f,g=-1,k=d[1],m=0,t=7,u=4;0===k&&(t=138,u=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m<t&&f===k)){if(m<u){do n(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(n(b,f,b.bl_tree),m--),n(b,C,b.bl_tree),l(b,m-3,2)):10>=m?
(n(b,O,b.bl_tree),l(b,m-3,3)):(n(b,Q,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(t=138,u=3):f===k?(t=6,u=3):(t=7,u=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;d<F;d++)if(0!==b.dyn_ltree[2*d])return E;return B}function D(b,d,e,c){l(b,(G<<1)+(c?1:0),3);s(b);k(b,e);k(b,~e);A.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var A=c("../utils/common"),B=0,E=1,
-G=0,F=256,I=F+1+29,H=30,L=19,N=2*I+1,T=15,W=16,P=256,C=16,O=17,Q=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],V=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=Array(2*(I+2));b(S);var Z=Array(2*H);b(Z);var ea=Array(512);b(ea);var da=Array(256);b(da);var U=Array(29);b(U);var Y=Array(H);b(Y);var aa,X,R,ga=!1;d._tr_init=function(b){if(!ga){var d,c,f,k=Array(T+1);for(f=
-c=0;28>f;f++){U[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){Y[f]=c;for(d=0;d<1<<V[f];d++)ea[c++]=f}for(c>>=7;f<H;f++){Y[f]=c<<7;for(d=0;d<1<<V[f]-7;d++)ea[256+c++]=f}for(d=0;d<=T;d++)k[d]=0;for(d=0;143>=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,I+1,k);for(d=0;d<H;d++)Z[2*d+1]=5,Z[2*d]=m(d,5);aa=new e(S,M,F+1,I,T);X=new e(Z,V,0,H,T);R=new e([],J,0,L,7);ga=!0}b.l_desc=new g(b.dyn_ltree,
+G=0,F=256,I=F+1+29,H=30,L=19,N=2*I+1,T=15,W=16,P=256,C=16,O=17,Q=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],U=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=Array(2*(I+2));b(S);var Z=Array(2*H);b(Z);var ea=Array(512);b(ea);var da=Array(256);b(da);var V=Array(29);b(V);var Y=Array(H);b(Y);var aa,X,R,ga=!1;d._tr_init=function(b){if(!ga){var d,c,f,k=Array(T+1);for(f=
+c=0;28>f;f++){V[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){Y[f]=c;for(d=0;d<1<<U[f];d++)ea[c++]=f}for(c>>=7;f<H;f++){Y[f]=c<<7;for(d=0;d<1<<U[f]-7;d++)ea[256+c++]=f}for(d=0;d<=T;d++)k[d]=0;for(d=0;143>=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,I+1,k);for(d=0;d<H;d++)Z[2*d+1]=5,Z[2*d]=m(d,5);aa=new e(S,M,F+1,I,T);X=new e(Z,U,0,H,T);R=new e([],J,0,L,7);ga=!0}b.l_desc=new g(b.dyn_ltree,
aa);b.d_desc=new g(b.dyn_dtree,X);b.bl_desc=new g(b.bl_tree,R);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=x(b));v(b,b.l_desc);v(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*K[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e,
c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),u(b,S,Z);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,d-1);y(b,b.dyn_dtree,e-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);c&&s(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,
d--,b.dyn_ltree[2*(da[e]+F+1)]++,b.dyn_dtree[2*(256>d?ea[d]:ea[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,P,S);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=
@@ -2031,26 +2031,26 @@ c,this.toolbarContainer.onmousedown=c,this.diagramContainer.onselectstart=c,this
9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c;d.init(this.diagramContainer);d.cellRenderer.initializeLabel=function(b,a){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(a.node,"click",function(b){for(var d=mxEvent.getSource(b);null!=d&&d!=a.node;){if("A"==d.nodeName){null==d.getAttribute("target")&&null!=d.getAttribute("href")&&(window.open(d.getAttribute("href")),mxEvent.consume(b));break}d=
d.parentNode}})};this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var a=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-a.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-a.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var b=!1,e=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
function(a,d){return b||e.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(b=!0,this.hoverIcons.reset(),d.container.style.cursor="move",!d.isEditing()&&mxEvent.getSource(a)==d.container&&mxEvent.consume(a)):!mxEvent.isConsumed(a)&&27==a.keyCode&&this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";b=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||b||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(b){return k.apply(this,arguments)||13==b.keyCode&&mxEvent.isControlDown(b)};
-var l=!1,n=null,m=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,a=[];null!=b;){var e=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),a.push(b));b=e}b=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;c<p.length;c++)this.toolbar.container.appendChild(p[c]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=m}l=d.cellEditor.isContentEditing();
-n=b;m=e;p=a}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var b=!1,a=function(){b||(b=!0,window.setTimeout(function(){for(var a=d.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a&&(a=mxUtils.getCurrentStyle(a),null!=a&&null!=s.toolbar)){var e=a.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));s.toolbar.setFontName(e);
-s.toolbar.setFontSize(parseInt(a.fontSize))}b=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",a);mxEvent.addListener(d.cellEditor.textarea,"touchend",a);mxEvent.addListener(d.cellEditor.textarea,"mouseup",a);mxEvent.addListener(d.cellEditor.textarea,"keyup",a);a()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(b,a){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&
-d.container.focus();var u=d.fireMouseEvent;d.fireMouseEvent=function(b,a,d){b==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,a,d){this.menus.createPopupMenu(b,a,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),
-z="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(b){var a=d.view.getState(b);if(null!=a){b=b.clone();b.style="";b=d.getCellStyle(b);var e=[],c=[],f;for(f in a.style)b[f]!=a.style[f]&&(e.push(a.style[f]),c.push(f));f=d.getModel().getStyle(a.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],n=l.indexOf("\x3d");0<=n&&(f=l.substring(0,n),l=l.substring(n+1),null!=b[f]&&"none"==l&&(e.push(l),c.push(f)))}d.getModel().isEdge(a.cell)?d.currentEdgeStyle=
-{}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",[a.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)v.push(D[a][c]);for(a=0;a<z.length;a++)v.push(z[a]);var A=function(b,a){d.getModel().beginUpdate();try{if(a)for(var e=d.getModel().isEdge(k),c=e?d.currentEdgeStyle:d.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],f=0;f<e.length;f++){var g=c[e[f]];null!=g&&d.setCellStyles(e[f],g,b)}else for(g=0;g<b.length;g++){for(var k=b[g],l=d.getModel().getStyle(k),n=null!=
-l?l.split(";"):[],m=v.slice(),f=0;f<n.length;f++){var t=n[f],u=t.indexOf("\x3d");if(0<=u){var q=t.substring(0,u),p=mxUtils.indexOf(m,q);0<=p&&m.splice(p,1);for(var x=0;x<D.length;x++){var y=D[x];if(0<=mxUtils.indexOf(y,q))for(var r=0;r<y.length;r++){var s=mxUtils.indexOf(m,y[r]);0<=s&&m.splice(s,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var q=m[f],A=c[q];if(null!=A&&("shape"!=q||e))(!e||0>mxUtils.indexOf(z,q))&&d.setCellStyles(q,A,[k])}}}finally{d.getModel().endUpdate()}};
-d.addListener("cellsInserted",function(b,a){A(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){A(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,a){var d=[a.getProperty("cell")];a.getProperty("terminalInserted")&&d.push(a.getProperty("terminal"));A(d)});this.addListener("styleChanged",mxUtils.bind(this,function(b,a){var e=a.getProperty("cells"),c=!1,f=!1;if(0<e.length)for(var g=0;g<e.length&&!(c=d.getModel().isVertex(e[g])||c,(f=d.getModel().isEdge(e[g])||
-f)&&c);g++);else f=c=!0;for(var e=a.getProperty("keys"),k=a.getProperty("values"),g=0;g<e.length;g++){var l=0<=mxUtils.indexOf(y,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(z,e[g]))f||0<=mxUtils.indexOf(x,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(v,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(v,e[g])){if(c||l)null==k[g]?delete d.currentVertexStyle[e[g]]:
-d.currentVertexStyle[e[g]]=k[g];if(f||l||0<=mxUtils.indexOf(x,e[g]))null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
-"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
-this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var b=d.currentVertexStyle.fontFamily||
-"Helvetica",a=String(d.currentVertexStyle.fontSize||"12"),e=d.getView().getState(d.getSelectionCell());null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,a=e.style[mxConstants.STYLE_FONTSIZE]||a,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(a)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(b,a){var e=a.getProperty("cells"),c=a.getProperty("parent");d.getModel().isLayer(c)&&
-!d.isCellVisible(c)&&(null!=e&&0<e.length)&&d.getModel().setVisible(c,!0)});this.gestureHandler=mxUtils.bind(this,function(b){null!=this.currentMenu&&mxEvent.getSource(b)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
-mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,
-function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;
-EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
+var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||b||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(b){return k.apply(this,arguments)||13==b.keyCode&&(mxEvent.isControlDown(b)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(b))};var l=!1,n=null,m=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,a=[];null!=b;){var e=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),a.push(b));b=e}b=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;c<p.length;c++)this.toolbar.container.appendChild(p[c]);this.toolbar.fontMenu=
+n;this.toolbar.sizeMenu=m}l=d.cellEditor.isContentEditing();n=b;m=e;p=a}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var b=!1,a=function(){b||(b=!0,window.setTimeout(function(){for(var a=d.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a&&(a=mxUtils.getCurrentStyle(a),null!=a&&null!=s.toolbar)){var e=a.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-
+1)&&(e=e.substring(0,e.length-1));s.toolbar.setFontName(e);s.toolbar.setFontSize(parseInt(a.fontSize))}b=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",a);mxEvent.addListener(d.cellEditor.textarea,"touchend",a);mxEvent.addListener(d.cellEditor.textarea,"mouseup",a);mxEvent.addListener(d.cellEditor.textarea,"keyup",a);a()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(b,a){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor=
+"default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var u=d.fireMouseEvent;d.fireMouseEvent=function(b,a,d){b==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,a,d){this.menus.createPopupMenu(b,a,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(b){var a=d.view.getState(b);if(null!=a){b=b.clone();b.style="";b=d.getCellStyle(b);var e=[],c=[],f;for(f in a.style)b[f]!=a.style[f]&&(e.push(a.style[f]),c.push(f));f=d.getModel().getStyle(a.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],n=l.indexOf("\x3d");
+0<=n&&(f=l.substring(0,n),l=l.substring(n+1),null!=b[f]&&"none"==l&&(e.push(l),c.push(f)))}d.getModel().isEdge(a.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",[a.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
+D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)v.push(D[a][c]);for(a=0;a<z.length;a++)v.push(z[a]);var A=function(b,a){d.getModel().beginUpdate();try{if(a)for(var e=d.getModel().isEdge(k),c=e?d.currentEdgeStyle:d.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],f=0;f<e.length;f++){var g=c[e[f]];null!=g&&d.setCellStyles(e[f],
+g,b)}else for(g=0;g<b.length;g++){for(var k=b[g],l=d.getModel().getStyle(k),n=null!=l?l.split(";"):[],m=v.slice(),f=0;f<n.length;f++){var t=n[f],u=t.indexOf("\x3d");if(0<=u){var q=t.substring(0,u),p=mxUtils.indexOf(m,q);0<=p&&m.splice(p,1);for(var x=0;x<D.length;x++){var y=D[x];if(0<=mxUtils.indexOf(y,q))for(var r=0;r<y.length;r++){var s=mxUtils.indexOf(m,y[r]);0<=s&&m.splice(s,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var q=m[f],A=c[q];if(null!=
+A&&("shape"!=q||e))(!e||0>mxUtils.indexOf(z,q))&&d.setCellStyles(q,A,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){A(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){A(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,a){var d=[a.getProperty("cell")];a.getProperty("terminalInserted")&&d.push(a.getProperty("terminal"));A(d)});this.addListener("styleChanged",mxUtils.bind(this,function(b,a){var e=a.getProperty("cells"),
+c=!1,f=!1;if(0<e.length)for(var g=0;g<e.length&&!(c=d.getModel().isVertex(e[g])||c,(f=d.getModel().isEdge(e[g])||f)&&c);g++);else f=c=!0;for(var e=a.getProperty("keys"),k=a.getProperty("values"),g=0;g<e.length;g++){var l=0<=mxUtils.indexOf(y,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(z,e[g]))f||0<=mxUtils.indexOf(x,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(v,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:
+d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(v,e[g])){if(c||l)null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g];if(f||l||0<=mxUtils.indexOf(x,e[g]))null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
+"orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
+d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
+(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var b=d.currentVertexStyle.fontFamily||"Helvetica",a=String(d.currentVertexStyle.fontSize||"12"),e=d.getView().getState(d.getSelectionCell());null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,a=e.style[mxConstants.STYLE_FONTSIZE]||a,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(a)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(b,
+a){var e=a.getProperty("cells"),c=a.getProperty("parent");d.getModel().isLayer(c)&&!d.isCellVisible(c)&&(null!=e&&0<e.length)&&d.getModel().setVisible(c,!0)});this.gestureHandler=mxUtils.bind(this,function(b){null!=this.currentMenu&&mxEvent.getSource(b)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,
+"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,
+function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
+EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(d){9==d.which&&a.isEnabled()&&!mxEvent.isAltDown(d)&&(a.isEditing()?a.stopEditing(!1):a.selectCell(!mxEvent.isShiftDown(d)),mxEvent.consume(d))}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(d){if(this.isImmediateEditingEvent(d)&&!a.isEditing()&&(!a.isSelectionEmpty()&&0!==d.which&&!mxEvent.isAltDown(d)&&!mxEvent.isControlDown(d)&&!mxEvent.isMetaDown(d))&&
(a.escape(),a.startEditing(),mxClient.IS_FF)){var b=a.cellEditor;b.textarea.innerHTML=String.fromCharCode(d.which);d=document.createRange();d.selectNodeContents(b.textarea);d.collapse(!1);b=window.getSelection();b.removeAllRanges();b.addRange(d)}}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var c=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){c.apply(this,arguments);f.updateActionStates()};a.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
@@ -2141,7 +2141,7 @@ EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroun
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};
EditorUi.prototype.createKeyHandler=function(a){function c(b,a,e){g.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(a=null!=a?a:1,e){d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),f=0;f<c.length;f++)if(d.getModel().isVertex(c[f])&&d.isCellResizable(c[f])){var g=d.getCellGeometry(c[f]);null!=g&&(g=g.clone(),37==b?g.width=Math.max(0,g.width-a):38==b?g.height=Math.max(0,g.height-a):39==b?g.width+=a:40==b&&(g.height+=a),d.getModel().setGeometry(c[f],g))}}finally{d.getModel().endUpdate()}}else c=
d.getSelectionCell(),f=d.model.getParent(c),g=null,1==d.getSelectionCount()&&d.model.isVertex(c)&&(null!=d.layoutManager&&!d.isCellLocked(c))&&(g=d.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(c),37==b||38==b?d.model.add(f,c,Math.max(0,g-1)):(39==b||40==b)&&d.model.add(f,c,Math.min(d.model.getChildCount(f),g+1))):(f=c=0,37==b?c=-a:38==b?f=-a:39==b?c=a:40==b&&(f=a),d.moveCells(d.getMovableCells(d.getSelectionCells()),c,f))});null!=k&&window.clearTimeout(k);k=window.setTimeout(function(){if(0<
-g.length){d.getModel().beginUpdate();try{for(var b=0;b<g.length;b++)g[b]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,b=new mxKeyHandler(d),e=b.isEventIgnored;b.isEventIgnored=function(b){return(!this.isControlDown(b)||mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode&&85!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+g.length){d.getModel().beginUpdate();try{for(var b=0;b<g.length;b++)g[b]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,b=new mxKeyHandler(d),e=b.isEventIgnored;b.isEventIgnored=function(b){return(!this.isControlDown(b)||mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
!mxClient.IS_SF)&&e.apply(this,arguments)};b.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()};b.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var g=[],k=null,l={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},n=b.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(d.isEnabled()){if(9==b.keyCode&&mxEvent.isAltDown(b))return mxEvent.isShiftDown(b)?
function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=l[b.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(d.model.isVertex(d.getSelectionCell()))return function(){var a=d.connectVertex(d.getSelectionCell(),l[b.keyCode],d.defaultEdgeLength,b,!0);null!=a&&0<a.length&&(1==a.length&&d.model.isEdge(a[0])?d.setSelectionCell(d.model.getTerminal(a[0],!1)):d.setSelectionCell(a[a.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(b)?
function(){c(b.keyCode,mxEvent.isShiftDown(b)?d.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?d.gridSize:null)}}return n.apply(this,arguments)};b.bindAction=mxUtils.bind(this,function(a,d,e,c){var f=this.actions.get(e);null!=f&&(e=function(){f.isEnabled()&&f.funct()},d?c?b.bindControlShiftKey(a,e):b.bindControlKey(a,e):c?b.bindShiftKey(a,e):b.bindKey(a,e))});var m=b.escape;b.escape=function(b){m.apply(this,arguments)};b.enter=function(){};b.bindControlShiftKey(36,function(){d.exitGroup()});
@@ -2385,7 +2385,7 @@ match.index)+(null!=e?e:b));d=match.index+b.length}}f.push(c.substring(d));retur
Graph.prototype.connectVertex=function(a,c,f,d,b){var e=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(e.x+=a.geometry.width/2,e.y-=f):c==mxConstants.DIRECTION_SOUTH?(e.x+=a.geometry.width/2,e.y+=a.geometry.height+f):(e.x=c==mxConstants.DIRECTION_WEST?e.x-f:e.x+(a.geometry.width+f),e.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));
var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(f.cell)&&(l=f.x,k=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(e.x+=a.parent.geometry.x,e.y+=a.parent.geometry.y);f=mxEvent.isControlDown(d)&&!b?null:this.getCellAt(l+e.x*g,k+e.y*g);this.model.isAncestor(f,a)&&(f=null);for(g=f;null!=g;){if(this.isCellLocked(g)){f=null;break}g=this.model.getParent(g)}null!=f&&(g=this.view.getState(a),l=this.view.getState(f),null!=g&&null!=l&&mxUtils.intersects(g,l)&&(f=null));
if(b=!mxEvent.isShiftDown(d)||b)c==mxConstants.DIRECTION_NORTH?e.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?e.y+=a.geometry.height/2:e.x=c==mxConstants.DIRECTION_WEST?e.x-a.geometry.width/2:e.x+a.geometry.width/2;null!=f&&!this.isCellConnectable(f)&&(g=this.getModel().getParent(f),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(f=g));if(f==a||this.model.isEdge(f)||!this.isCellConnectable(f))f=null;g=[];this.model.beginUpdate();try{l=f;if(null==l&&b){for(var k=a,n=this.getCellGeometry(a);null!=
-n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);var m=this.view.getState(k),p=null!=m?m.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];n=this.getCellGeometry(l);n.x=e.x-n.width/2;n.y=e.y-n.height/2}n=null;null!=this.layoutManager&&(n=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&b||null==f&&null!=n&&n.constructor==mxStackLayout?
+n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);var m=this.view.getState(k),p=null!=m?m.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];n=this.getCellGeometry(l);null!=n&&(n.x=e.x-n.width/2,n.y=e.y-n.height/2)}n=null;null!=this.layoutManager&&(n=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&b||null==f&&null!=n&&n.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==s.parent&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==f&&null!=l&&(null!=n&&null!=a.parent&&n.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
q));null!=s&&g.push(s);null==f&&null!=l&&g.push(l);null==l&&null!=s&&s.geometry.setTerminalPoint(e,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(c)?null!=f.getAttribute(c)?f.getAttribute(c):"":null),f=this.model.getParent(f);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
@@ -2495,8 +2495,8 @@ a?a:d.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,a){if(0<=
"Control"!=a.type&&a.createRange().pasteHTML(b)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(b,a){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(a){a=b.apply(this,arguments);if(mxEvent.isTouchEvent(a.getEvent())&&null==a.getState()){var d=this.getCellAt(a.graphX,a.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,
a.graphX,a.graphY)||(a.state=this.view.getState(d),null!=a.state&&null!=a.state.shape&&(this.container.style.cursor=a.state.shape.node.style.cursor))}null==a.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return a};var a=!1,d=!1,c=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(b,f,g){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),a=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(b,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(e.getEvent())&&(d&&null==e.getCell()&&this.isSelectionEmpty()||a&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);
-return null!=b&&1==b.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var b=[],a=0,d=sel.rangeCount;a<d;++a)b.push(sel.getRangeAt(a));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var a=0,d=b.length;a<
-d;++a)sel.addRange(b[a])}else document.selection&&b.select&&b.select()};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,a){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+return null!=b&&1==b.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var b=[],a=0,d=sel.rangeCount;a<d;++a)b.push(sel.getRangeAt(a));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var a=0,
+d=b.length;a<d;++a)sel.addRange(b[a])}else document.selection&&b.select&&b.select()}catch(c){}};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,a){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,a){g.apply(this,arguments);var d=this.graph.view.getState(b);this.textarea.className=null!=d&&1==d.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var d=this.graph.getModel().getParent(b),
c=this.graph.getCellGeometry(b);this.graph.getModel().isEdge(d)&&null!=c&&c.relative||this.graph.getModel().isEdge(b)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function a(b,d){d.originalNode=
b;b=b.firstChild;for(var c=d.firstChild;null!=b&&null!=c;)a(b,c),b=b.nextSibling,c=c.nextSibling;return d}function d(b,a){if(null!=b)if(a.originalNode!=b)c(b);else{b=b.firstChild;for(a=a.firstChild;null!=b;){var e=b.nextSibling;null==a?c(b):(d(b,a),a=a.nextSibling);b=e}}}function c(b){for(var a=b.firstChild;null!=a;){var d=a.nextSibling;c(a);a=d}(1!=b.nodeType||"BR"!==b.nodeName&&null==b.firstChild)&&(3!=b.nodeType||0==mxUtils.trim(mxUtils.getTextContent(b)).length)?b.parentNode.removeChild(b):(3==
@@ -2562,7 +2562,7 @@ this.changeHandler=null)}}();
b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=a;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function x(){mxCylinder.call(this)}function D(){mxShape.call(this)}function A(){mxShape.call(this)}function B(){mxEllipse.call(this)}function E(){mxShape.call(this)}
function G(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function H(){mxShape.call(this)}function L(){mxShape.call(this)}function N(){mxCylinder.call(this)}function T(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function P(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function O(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
-function V(){mxActor.call(this)}function J(){mxActor.call(this)}function K(){mxActor.call(this)}function S(){mxActor.call(this)}function Z(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}function R(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
+function U(){mxActor.call(this)}function J(){mxActor.call(this)}function K(){mxActor.call(this)}function S(){mxActor.call(this)}function Z(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function V(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}function R(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function ka(){mxActor.call(this)}function va(b,a,d,c,e,f,g,k,l,n){g+=l;var m=c.clone();c.x-=e*(2*g+l);c.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){b.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);n?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(b,a,d,c,e,f){a=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(b.moveTo(a,e),b.lineTo(a,a),
b.lineTo(0,0),b.moveTo(a,a),b.lineTo(c,a)):(b.moveTo(0,0),b.lineTo(c-a,0),b.lineTo(c,a),b.lineTo(c,e),b.lineTo(a,e),b.lineTo(0,e-a),b.lineTo(0,0),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var sa=Math.tan(mxUtils.toRadians(30)),na=(0.5-sa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c,e/sa);b.translate((c-a)/2,(e-a)/2+a/4);b.moveTo(0,0.25*a);b.lineTo(0.5*a,a*na);b.lineTo(a,0.25*a);b.lineTo(0.5*a,(0.5-na)*a);b.lineTo(0,
0.25*a);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(b,a,d,c,e,f){a=Math.min(c,e/(0.5+sa));f?(b.moveTo(0,0.25*a),b.lineTo(0.5*a,(0.5-na)*a),b.lineTo(a,0.25*a),b.moveTo(0.5*a,(0.5-na)*a),b.lineTo(0.5*a,(1-na)*a)):(b.translate((c-a)/2,(e-a)/2),b.moveTo(0,0.25*a),b.lineTo(0.5*a,a*na),b.lineTo(a,0.25*a),b.lineTo(a,0.75*a),b.lineTo(0.5*a,(1-na)*a),b.lineTo(0,0.75*a),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.isoCube=
@@ -2611,14 +2611,14 @@ T;mxUtils.extend(W,T);W.prototype.outerStroke=!1;mxCellRenderer.prototype.defaul
mxActor);O.prototype.size=30;O.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,a),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=O;mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy=20;Q.prototype.isHtmlAllowed=function(){return!1};
Q.prototype.paintForeground=function(b,a,d,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,e*g));g=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+c,d+f);b.end();b.stroke();
b.begin();b.moveTo(a+g,d);b.lineTo(a+g,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=Q;mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(a,d),new mxPoint(a,e),new mxPoint(0,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.corner=M;mxUtils.extend(V,mxActor);V.prototype.dx=20;V.prototype.dy=20;V.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));Math.abs(c-a);Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint((c+a)/2,d),new mxPoint((c+a)/2,e),new mxPoint((c-a)/2,e),new mxPoint((c-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=V;mxUtils.extend(J,mxActor);J.prototype.arrowWidth=
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(a,d),new mxPoint(a,e),new mxPoint(0,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.corner=M;mxUtils.extend(U,mxActor);U.prototype.dx=20;U.prototype.dy=20;U.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));Math.abs(c-a);Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint((c+a)/2,d),new mxPoint((c+a)/2,e),new mxPoint((c-a)/2,e),new mxPoint((c-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=U;mxUtils.extend(J,mxActor);J.prototype.arrowWidth=
0.3;J.prototype.arrowSize=0.2;J.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,
f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=J;mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",J.prototype.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",J.prototype.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,
[new mxPoint(0,e/2),new mxPoint(a,0),new mxPoint(a,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,f),new mxPoint(a,f),new mxPoint(a,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=K;mxUtils.extend(S,mxActor);S.prototype.size=0.1;S.prototype.redrawPath=function(b,a,d,c,e){a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(a,0);b.lineTo(c,0);b.quadTo(c-2*a,e/2,c,e);b.lineTo(a,
e);b.quadTo(a-2*a,e/2,a,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=S;mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.or=Z;mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.xor=ea;mxUtils.extend(da,
-mxActor);da.prototype.size=20;da.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(c-a,0),new mxPoint(c,0.8*a),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,0.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=da;mxUtils.extend(U,mxActor);U.prototype.size=0.375;
-U.prototype.redrawPath=function(b,a,d,c,e){a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-a),new mxPoint(c/2,e),new mxPoint(0,e-a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=U;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
+mxActor);da.prototype.size=20;da.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(c-a,0),new mxPoint(c,0.8*a),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,0.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=da;mxUtils.extend(V,mxActor);V.prototype.size=0.375;
+V.prototype.redrawPath=function(b,a,d,c,e){a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-a),new mxPoint(c/2,e),new mxPoint(0,e-a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=V;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
arguments);b.begin();b.moveTo(a+c/2,d+e);b.lineTo(a+c,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=Y;mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+e/2);b.lineTo(a+c,d+e/2);b.end();b.stroke();b.begin();b.moveTo(a+c/2,d);b.lineTo(a+c/2,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=aa;mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=
function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a+0.145*c,d+0.145*e);b.lineTo(a+0.855*c,d+0.855*e);b.end();b.stroke();b.begin();b.moveTo(a+0.855*c,d+0.145*e);b.lineTo(a+0.145*c,d+0.855*e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=X;mxUtils.extend(R,mxRhombus);R.prototype.paintVertexShape=function(b,a,d,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+
e/2);b.lineTo(a+c,d+e/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=R;mxUtils.extend(ga,mxEllipse);ga.prototype.paintVertexShape=function(b,a,d,c,e){b.begin();b.moveTo(a,d);b.lineTo(a+c,d);b.lineTo(a+c/2,d+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(a,d+e);b.lineTo(a+c,d+e);b.lineTo(a+c/2,d+e/2);b.close();b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ga;mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(b,a,d,c,e){var f=d+e-5;
@@ -2654,10 +2654,10 @@ b.getCenterX()-a.x)/d))))})]},note:function(a){return[ha(a,["size"],function(a){
"size",O.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*a/4)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(a.y-b.y)/3)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},dataStorage:function(b){return[ha(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(b.x+(1-a)*b.width,b.getCenterY())},function(b,a){this.state.style.size=Math.max(0,
Math.min(1,(b.x+b.width-a.x)/b.width))})]},internalStorage:function(b){var a=[ha(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",Q.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})];mxUtils.getValue(b.style,
mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},corner:function(b){return[ha(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},tee:function(b){return[ha(b,
-["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(b.x+(b.width+a)/2,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,a.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},singleArrow:xa(1),doubleArrow:xa(0.5),folder:function(b){return[ha(b,["tabWidth",
+["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",U.prototype.dy)));return new mxPoint(b.x+(b.width+a)/2,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,a.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},singleArrow:xa(1),doubleArrow:xa(0.5),folder:function(b){return[ha(b,["tabWidth",
"tabHeight"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(a=b.width-a);return new mxPoint(b.x+a,b.y+d)},function(b,a){var d=Math.max(0,Math.min(b.width,a.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==
mxConstants.ALIGN_RIGHT&&(d=b.width-d);this.state.style.tabWidth=Math.round(d);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},document:function(b){return[ha(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-a)*b.height)},function(b,a){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-a.y)/b.height))})]},tape:function(b){return[ha(b,["size"],
-function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(b.getCenterX(),b.y+a*b.height/2)},function(b,a){this.state.style.size=Math.max(0,Math.min(1,2*((a.y-b.y)/b.height)))})]},offPageConnector:function(b){return[ha(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",U.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-a)*b.height)},function(b,a){this.state.style.size=
+function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(b.getCenterX(),b.y+a*b.height/2)},function(b,a){this.state.style.size=Math.max(0,Math.min(1,2*((a.y-b.y)/b.height)))})]},offPageConnector:function(b){return[ha(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-a)*b.height)},function(b,a){this.state.style.size=
Math.max(0,Math.min(1,(b.y+b.height-a.y)/b.height))})]},step:pa(u.prototype.size,!0),hexagon:pa(v.prototype.size,!0,0.5),curlyBracket:pa(r.prototype.size,!1),display:pa(ka.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(0.5,k.prototype.size,!0),loopLimit:ta(0.5,da.prototype.size,!0),trapezoid:ja(0.5),parallelogram:ja(1)};Graph.createHandle=ha;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var b=
ua[this.state.style.shape];if(null!=b)return b(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var b=ua[this.state.style.shape];if(null!=b)return b(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var qa=new mxPoint(1,0),ra=new mxPoint(1,0),ja=mxUtils.toRadians(-30),la=Math.cos(ja),ja=Math.sin(ja),qa=mxUtils.getRotatedPoint(qa,la,ja),ja=mxUtils.toRadians(-150),la=Math.cos(ja),ja=Math.sin(ja),
ra=mxUtils.getRotatedPoint(ra,la,ja);mxEdgeStyle.IsometricConnector=function(b,a,d,c,e){var f=b.view;c=null!=c&&0<c.length?c[0]:null;var g=b.absolutePoints,k=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(b,c));null==k&&null!=a&&(k=new mxPoint(a.getCenterX(),a.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=qa.x,n=qa.y,m=ra.x,t=ra.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=k){var q=k;b=function(b,a,d){b-=q.x;var c=
@@ -2666,7 +2666,7 @@ new mxElbowEdgeHandler(b);d.snapToTerminals=!1;return d}return Da.apply(this,arg
0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0.5,
0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;b.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;
-O.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.15,0.05),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.85,0.05),
+O.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.15,0.05),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.85,0.05),
!1),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.3),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.7),!0),new mxConnectionConstraint(new mxPoint(0.15,0.95),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.85,0.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
0.1),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.75,0.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.25,
@@ -2679,7 +2679,7 @@ new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new
0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(0.875,0.75),!1),new mxConnectionConstraint(new mxPoint(0.375,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0.25),!1),new mxConnectionConstraint(new mxPoint(0.4,0.1),!1),new mxConnectionConstraint(new mxPoint(0.16,
0.55),!1),new mxConnectionConstraint(new mxPoint(0.07,0.4),!1),new mxConnectionConstraint(new mxPoint(0.31,0.8),!1),new mxConnectionConstraint(new mxPoint(0.13,0.77),!1),new mxConnectionConstraint(new mxPoint(0.8,0.8),!1),new mxConnectionConstraint(new mxPoint(0.55,0.95),!1),new mxConnectionConstraint(new mxPoint(0.875,0.5),!1),new mxConnectionConstraint(new mxPoint(0.96,0.7),!1),new mxConnectionConstraint(new mxPoint(0.625,0.2),!1),new mxConnectionConstraint(new mxPoint(0.88,0.25),!1)];m.prototype.constraints=
mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,
-0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;V.prototype.constraints=null;M.prototype.constraints=null;J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
+0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;U.prototype.constraints=null;M.prototype.constraints=null;J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];F.prototype.constraints=null;Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
0.25),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.175,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(b){d.escape();var a=d.getDeletableCells(d.getSelectionCells());if(null!=a&&0<a.length){var c=d.model.getParents(a);d.removeCells(a,b);if(null!=c){b=[];for(a=0;a<c.length;a++)(d.model.isVertex(c[a])||d.model.isEdge(c[a]))&&b.push(c[a]);d.setSelectionCells(b)}}}var c=this.editorUi,f=c.editor,d=f.graph,b=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(c.getUrl())});this.addAction("open...",
@@ -2770,8 +2770,8 @@ Menus.prototype.createPopupMenu=function(a,c,f){var d=this.editorUi.editor.graph
"-"],null,f);if(d.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null)){var e=d.selectionCellsHandler.getHandler(c),g=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var g=e.getHandleForEvent(d.updateMouseEvent(new mxMouseEvent(f))),k=this.editorUi.actions.get("removeWaypoint");k.handler=e;k.index=g;g=0<g&&g<e.bends.length-1}this.addMenuItems(a,["-",g?"removeWaypoint":
"addWaypoint"],null,f);e=d.getModel().getGeometry(c);null!=e&&null!=e.points&&0<e.points.length&&this.addMenuItems(a,["clearWaypoints"],null,f)}1<d.getSelectionCount()?(a.addSeparator(),this.addMenuItems(a,["group"],null,f)):1==d.getSelectionCount()&&!d.getModel().isEdge(c)&&(!d.isSwimlane(c)&&0<d.getModel().getChildCount(c))&&(a.addSeparator(),this.addMenuItems(a,["ungroup"],null,f));1==d.getSelectionCount()&&(a.addSeparator(),this.addMenuItems(a,["editData","editLink"],null,f),d.getModel().isVertex(c)&&
null!=mxUtils.getValue(b.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",null,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"..."))}}else this.addMenuItems(a,["-","selectVertices","selectEdges","-","selectAll"],null,f)};
-Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)(function(b){var a=c.addMenu(mxResources.get(f[d]),b.funct);null!=a&&b.addListener("stateChanged",function(){(a.enabled=b.enabled)?(a.className="geItem",8==document.documentMode&&(a.style.color="")):(a.className="geItem mxDisabled",8==document.documentMode&&(a.style.color="#c3c3c3"))})})(this.get(f[d]));return c};function Menubar(a,c){this.editorUi=a;this.container=c}
-Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Menubar.prototype.addMenu=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geItem";mxUtils.write(f,a);this.addMenuHandler(f,c);this.container.appendChild(f);return f};
+Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)mxUtils.bind(this,function(b){var a=c.addMenu(mxResources.get(f[d]),mxUtils.bind(this,function(){b.funct.apply(this,arguments)}));null!=a&&b.addListener("stateChanged",function(){(a.enabled=b.enabled)?(a.className="geItem",8==document.documentMode&&(a.style.color="")):(a.className="geItem mxDisabled",8==document.documentMode&&(a.style.color="#c3c3c3"))})})(this.get(f[d]));return c};
+function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Menubar.prototype.addMenu=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geItem";mxUtils.write(f,a);this.addMenuHandler(f,c);this.container.appendChild(f);return f};
Menubar.prototype.addMenuHandler=function(a,c){if(null!=c){var f=!0,d=mxUtils.bind(this,function(b){if(f&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(c);d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();d.destroy()});var g=mxUtils.getOffset(a);d.popup(g.x,g.y+a.offsetHeight,null,
b);this.editorUi.setCurrentMenu(d,a)}mxEvent.consume(b)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(b){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),d(b))}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(){f=this.currentElt!=a}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){d(b);f=!0}))}};Menubar.prototype.destroy=function(){};
function Menu(a,c){mxEventSource.call(this);this.funct=a;this.enabled=null!=c?c:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,c){this.funct(a,c)};EditorUi.prototype.createMenus=function(){return new Menus(this)};Format=function(a,c){this.editorUi=a;this.container=c};
@@ -2870,12 +2870,12 @@ mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[
mxResources.get(L[t]));N.appendChild(W)}I.appendChild(N);d.isEditing()||(a.appendChild(p),mxEvent.addListener(F,"change",function(b){d.getModel().beginUpdate();try{var a=H[F.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
a.appendChild(I),mxEvent.addListener(N,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,T[N.value],d.getSelectionCells());mxEvent.consume(b)}));var P=document.createElement("input");P.style.textAlign="right";P.style.marginTop="4px";mxClient.IS_QUIRKS||(P.style.position="absolute",P.style.right="32px");P.style.width="46px";P.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(P);var C=null,p=this.installInputHandler(P,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){C=b;document.execCommand("fontSize",!1,"4");b=d.cellEditor.textarea.getElementsByTagName("font");for(var a=0;a<b.length;a++)if("4"==b[a].getAttribute("size")){b[a].removeAttribute("size");b[a].style.fontSize=C+"px";window.setTimeout(function(){P.value=C+" pt";C=null},0);break}},!0),p=this.createStepper(P,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=P.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
-k.style.cssFloat="right";var O=null,Q="#ffffff",M=null,V="#000000",J=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Q},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){O=b},destroy:function(){O=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");J.style.fontWeight="bold";var K=this.createCellColorOption(mxResources.get("borderColor"),
-mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");K.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return V},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){J.style.display=null==b||b==mxConstants.NONE?"none":"";K.style.display=
+k.style.cssFloat="right";var O=null,Q="#ffffff",M=null,U="#000000",J=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Q},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){O=b},destroy:function(){O=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");J.style.fontWeight="bold";var K=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");K.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){J.style.display=null==b||b==mxConstants.NONE?"none":"";K.style.display=
J.style.display},function(b){null==b||b==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(J);d.cellEditor.isContentEditing()||g.appendChild(K);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",
null,null,!0);k.style.fontWeight="bold";!b.containsLabel&&!b.autoSize&&0==b.edges.length&&g.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,f.actions.get("formattedText"));k.style.fontWeight="bold";g.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight="bold";mxUtils.write(p,
-mxResources.get("spacing"));k.appendChild(p);var S,Z,ea,da,U,Y=this.addUnitInput(k,"pt",91,44,function(){S.apply(this,arguments)}),aa=this.addUnitInput(k,"pt",20,44,function(){Z.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var X=this.addUnitInput(k,"pt",162,44,function(){ea.apply(this,arguments)}),R=this.addUnitInput(k,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(k,
-"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(d.cellEditor.isContentEditing()){var ca=null,$=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(b){var a=""==b.value?120:parseInt(b.value),a=Math.max(120,isNaN(a)?120:a);null!=ca&&(d.cellEditor.restoreSelection(ca),ca=null);for(var c=d.getSelectedElement();null!=
+mxResources.get("spacing"));k.appendChild(p);var S,Z,ea,da,V,Y=this.addUnitInput(k,"pt",91,44,function(){S.apply(this,arguments)}),aa=this.addUnitInput(k,"pt",20,44,function(){Z.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var X=this.addUnitInput(k,"pt",162,44,function(){ea.apply(this,arguments)}),R=this.addUnitInput(k,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(k,
+"pt",20,44,function(){V.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(d.cellEditor.isContentEditing()){var ca=null,$=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(b){var a=""==b.value?120:parseInt(b.value),a=Math.max(120,isNaN(a)?120:a);null!=ca&&(d.cellEditor.restoreSelection(ca),ca=null);for(var c=d.getSelectedElement();null!=
c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;null!=c&&c==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("FONT"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="\x3cfont\x3e"+d.cellEditor.textarea.innerHTML+"\x3c/font\x3e"),c=d.cellEditor.textarea.firstChild);null!=c&&c!=d.cellEditor.textarea&&(c.style.lineHeight=a+"%");b.value=a+" %"},function(b){$=b;mxEvent.addListener(b,"mousedown",function(){ca=d.cellEditor.saveSelection()});mxEvent.addListener(b,
"touchstart",function(){ca=d.cellEditor.saveSelection()});b.value="120 %"}));g=e.cloneNode(!1);g.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],g,!0);p=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},g),this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(b){this.editorUi.menus.addInsertTableItem(b)}))];
this.styleButtons(k);this.styleButtons(p);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(g);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=E?E.cellIndex:0))}catch(b){alert(b)}},k),
@@ -2890,12 +2890,12 @@ mxConstants.FONT_ITALIC);c(n[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT
c(r,a==mxConstants.ALIGN_LEFT);c(s,a==mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(v,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);F.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(b.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(e||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING,2)),aa.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),Y.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(b.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),ga.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=R)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),R.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=X)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),X.value=isNaN(a)?"":a+" pt"});Z=this.installInputHandler(aa,mxConstants.STYLE_SPACING,2,-999,999," pt");S=this.installInputHandler(Y,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");U=this.installInputHandler(ga,
+mxConstants.STYLE_SPACING_RIGHT,0)),ga.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=R)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),R.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=X)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),X.value=isNaN(a)?"":a+" pt"});Z=this.installInputHandler(aa,mxConstants.STYLE_SPACING,2,-999,999," pt");S=this.installInputHandler(Y,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");V=this.installInputHandler(ga,
mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");da=this.installInputHandler(R,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ea=this.installInputHandler(X,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(P,fa);this.addKeyHandler(aa,fa);this.addKeyHandler(Y,fa);this.addKeyHandler(ga,fa);this.addKeyHandler(R,fa);this.addKeyHandler(X,fa);d.getModel().addListener(mxEvent.CHANGE,fa);this.listeners.push({destroy:function(){d.getModel().removeListener(fa)}});fa();if(d.cellEditor.isContentEditing()){var ia=
!1,e=function(){ia||(ia=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b){var a=mxUtils.getCurrentStyle(b);if(null!=a){c(n[0],"bold"==a.fontWeight||null!=d.getParentByName(b,"B",d.cellEditor.textarea));c(n[1],"italic"==a.fontStyle||null!=d.getParentByName(b,"I",d.cellEditor.textarea));c(n[2],null!=d.getParentByName(b,"U",d.cellEditor.textarea));c(r,"left"==a.textAlign);c(s,"center"==a.textAlign);c(q,"right"==
a.textAlign);c(D,"justify"==a.textAlign);c(x,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(y,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));B=d.getParentByName(b,"TABLE",d.cellEditor.textarea);G=null==B?null:d.getParentByName(b,"TR",B);E=null==B?null:d.getParentByName(b,"TD",B);A.style.display=null!=B?"":"none";if(document.activeElement!=P){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=C?(b.removeAttribute("size"),b.style.fontSize=C+"px",C=null):P.value=parseFloat(a.fontSize)+
" pt";var b=b.style.lineHeight||a.lineHeight,e=parseFloat(b);"px"==b.substring(b.length-2)&&(e/=parseFloat(a.fontSize));"%"!=b.substring(b.length-1)&&(e*=100);$.value=e+" %"}b=a.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,c){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});e=a.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,c){return"#"+("0"+
-Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=M&&(V="#"==b.charAt(0)?b:"#000000",M(V,!0));null!=O&&(Q="#"==e.charAt(0)?e:null,O(Q,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}ia=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=M&&(U="#"==b.charAt(0)?b:"#000000",M(U,!0));null!=O&&(Q="#"==e.charAt(0)?e:null,O(Q,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}ia=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();(!a.containsImage||"image"==a.style.shape)&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41);a.style.paddingTop="8px";a.style.paddingBottom="8px";this.container.appendChild(a);this.container.appendChild(this.addEffects(this.createPanel()));a=this.addEditOps(this.createPanel());
null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -3930,7 +3930,7 @@ I.vertex=!0;var H=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");N.vertex=!0;var T=new mxCell("Documents",new mxGeometry(440,583,70,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#EFAC43;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");T.vertex=!0;var W=new mxCell("",new mxGeometry(420,603,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");
W.vertex=!0;var P=new mxCell("Media",new mxGeometry(440,603,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");P.vertex=!0;var C=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");C.vertex=!0;var O=new mxCell("Text",new mxGeometry(440,623,30,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#999999;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
O.vertex=!0;var Q=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");Q.vertex=!0;var M=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fillColor\x3d#ffffff;align\x3dcenter;rSize\x3d5;strokeColor\x3d#dddddd;fontSize\x3d16;whiteSpace\x3dwrap;");
-M.vertex=!0;var V=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");V.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,t,u,v,z,y,x,D,A,B,E,G,F,I,H,L,N,T,W,P,C,O,Q,M,V],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
+M.vertex=!0;var U=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");U.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,t,u,v,z,y,x,D,A,B,E,G,F,I,H,L,N,T,W,P,C,O,Q,M,U],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
0,800,50),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.horLines;strokeColor\x3d#dddddd;fillColor\x3d#fdfdfd;");c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;strokeColor\x3d#dddddd;fillColor\x3dnone;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d10;fontStyle\x3d1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark as OK",new mxGeometry(0,
0.5,90,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(150,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark as Violation",new mxGeometry(0,0.5,120,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(250,
-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,0.5,100,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-110,-15);d.vertex=!0;c.insert(d);d=new mxCell("Phone",new mxGeometry(40,70,100,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");
@@ -5835,10 +5835,10 @@ new mxCell("",new mxGeometry(0,0,500,30),c+"misc.rrect;rSize\x3d0;strokeColor\x3
b.vertex=!0;a.insert(b);b=new mxCell("Text 3",new mxGeometry(310,5,115,20),c+"misc.rrect;rSize\x3d5;strokeColor\x3dnone;fontSize\x3d15;fontColor\x3d#999999;fillColor\x3d#ddeeff;align\x3dleft;spacingLeft\x3d5;");b.vertex=!0;a.insert(b);b=new mxCell("",new mxGeometry(495,15,0,0),c+"misc.anchor;");b.vertex=!0;a.insert(b);var d=new mxCell("",new mxGeometry(-20,-10,20,20),"shape\x3dellipse;fillColor\x3dnone;strokeColor\x3d#008cff;resizable\x3d0;html\x3d1;");d.vertex=!0;b.insert(d);b=new mxCell("",new mxGeometry(465,
15,0,0),c+"misc.anchor;");b.vertex=!0;a.insert(b);d=new mxCell("",new mxGeometry(-20,5,20,10),"shape\x3dline;strokeColor\x3d#008cff;resizable\x3d0;");d.vertex=!0;b.insert(d);return e.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Status Bar")}),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#00dd00;fillColor3\x3d#004400;strokeColor\x3d#006600;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+
"misc.pin;fillColor2\x3d#dd0000;fillColor3\x3d#440000;strokeColor\x3d#660000;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ccccff;fillColor3\x3d#0000ff;strokeColor\x3d#000066;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ffff00;fillColor3\x3d#888800;strokeColor\x3d#999900;",10,
-25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ffa500;fillColor3\x3d#885000;strokeColor\x3d#997000;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" "))];this.addPalette("mockupMisc","Mockup Misc",!1,mxUtils.bind(this,function(a){for(var b=0;b<k.length;b++)a.appendChild(k[b](a))}))};Sidebar.prototype.addMockupNavigationPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+
-"\x3dbottom;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_VERTICAL_ALIGN+"\x3dtop;strokeWidth\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",c=mxConstants.STYLE_STROKEWIDTH+"\x3d1;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",f=mxConstants.STYLE_STROKECOLOR+"\x3d#999999;",d=this,b=[this.addEntry("mockup navigation status bar",function(){var b=new mxCell("Layer 1",new mxGeometry(0,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
-b.vertex=!0;var a=new mxCell("\x3e",new mxGeometry(60,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");a.vertex=!0;var f=new mxCell("Layer 2",new mxGeometry(80,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");f.vertex=!0;var l=new mxCell("\x3e",new mxGeometry(140,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");l.vertex=!0;var n=new mxCell("Layer 3",new mxGeometry(160,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
-n.vertex=!0;var m=new mxCell("\x3e",new mxGeometry(220,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");m.vertex=!0;var p=new mxCell("Layer 4",new mxGeometry(240,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#008cff;fontStyle\x3d1;");p.vertex=!0;return d.createVertexTemplateFromCells([b,a,f,l,n,m,p],300,30,"Status Bar")}),this.createVertexTemplateEntry(c+"navigation.stepBar;strokeColor\x3d#c4c4c4;textColor\x3d#666666;textColor2\x3d#008cff;mainText\x3d,,+,;textSize\x3d17;fillColor\x3d#666666;overflow\x3dfill;fontSize\x3d17;fontColor\x3d#666666;",
+25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ffa500;fillColor3\x3d#885000;strokeColor\x3d#997000;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" "))];this.addPalette("mockupMisc","Mockup Misc",!1,mxUtils.bind(this,function(b){for(var a=0;a<k.length;a++)b.appendChild(k[a](b))}))};Sidebar.prototype.addMockupNavigationPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+
+"\x3dbottom;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_VERTICAL_ALIGN+"\x3dtop;strokeWidth\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",c=mxConstants.STYLE_STROKEWIDTH+"\x3d1;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",f=mxConstants.STYLE_STROKECOLOR+"\x3d#999999;",d=this,b=[this.addEntry("mockup navigation status bar",function(){var a=new mxCell("Layer 1",new mxGeometry(0,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
+a.vertex=!0;var b=new mxCell("\x3e",new mxGeometry(60,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");b.vertex=!0;var f=new mxCell("Layer 2",new mxGeometry(80,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");f.vertex=!0;var l=new mxCell("\x3e",new mxGeometry(140,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");l.vertex=!0;var n=new mxCell("Layer 3",new mxGeometry(160,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
+n.vertex=!0;var m=new mxCell("\x3e",new mxGeometry(220,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");m.vertex=!0;var p=new mxCell("Layer 4",new mxGeometry(240,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#008cff;fontStyle\x3d1;");p.vertex=!0;return d.createVertexTemplateFromCells([a,b,f,l,n,m,p],300,30,"Status Bar")}),this.createVertexTemplateEntry(c+"navigation.stepBar;strokeColor\x3d#c4c4c4;textColor\x3d#666666;textColor2\x3d#008cff;mainText\x3d,,+,;textSize\x3d17;fillColor\x3d#666666;overflow\x3dfill;fontSize\x3d17;fontColor\x3d#666666;",
300,50,'\x3ctable border\x3d"0" cellpadding\x3d"0" cellspacing\x3d"0" width\x3d"100%" height\x3d"100%" style\x3d"font-size:1em;"\x3e\x3ctr height\x3d"0%"\x3e\x3ctd width\x3d"25%"\x3eLayer 1\x3c/td\x3e\x3ctd width\x3d"25%"\x3eLayer 2\x3c/td\x3e\x3ctd width\x3d"25%" style\x3d"color:#008cff;"\x3eLayer 3\x3c/td\x3e\x3ctd width\x3d"25%"\x3eLayer 4\x3c/td\x3e\x3c/tr\x3e\x3ctr height\x3d"100%"\x3e\x3ctd/\x3e\x3c/tr\x3e\x3c/table\x3e',"Step Bar",null,null,this.getTagsForStencil("mxgraph.mockup.navigation",
"stepBar","mockup navigation ").join(" ")),this.createVertexTemplateEntry(a+"navigation.coverFlow;strokeColor\x3d#999999;fillColor\x3d#ffffff;",400,200,"","Cover Flow",null,null,this.getTagsForStencil("mxgraph.mockup.navigation","coverFlow","mockup navigation ").join(" ")),this.createVertexTemplateEntry(a+"navigation.scrollBar;fillColor\x3d#ffffff;"+f+"barPos\x3d20;fillColor2\x3d#99ddff;strokeColor2\x3dnone;",200,20,"","Horizontal Scroll Bar",null,null,this.getTagsForStencil("mxgraph.mockup.navigation",
"scrollBar","mockup navigation ").join(" ")),this.createVertexTemplateEntry(a+"navigation.scrollBar;fillColor\x3d#ffffff;"+f+"barPos\x3d20;fillColor2\x3d#99ddff;strokeColor2\x3dnone;direction\x3dnorth;",20,200,"","Vertical Scroll Bar",null,null,this.getTagsForStencil("mxgraph.mockup.navigation","scrollBar","mockup navigation ").join(" ")),this.createVertexTemplateEntry(c+"navigation.pagination;linkText\x3d;fontSize\x3d17;fontColor\x3d#0000ff;fontStyle\x3d4;",350,30,"\x3c\x3c Prev 1 2 3 4 5 6 7 8 9 10 Next \x3e\x3e",
@@ -7194,11 +7194,11 @@ function(b){a.spinner.stop();a.replaceFileData(u);a.hideDialog()},function(b){a.
d=document.createElement("div");d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var L=null;if(null==r||null==a.drive&&r.constructor==DriveFile||null==a.dropbox&&r.constructor==DropboxFile)e.style.display="none",H.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));
else if(null!=c&&0<c.length){e.style.cursor="move";var N=document.createElement("table");N.style.border="1px solid lightGray";N.style.borderCollapse="collapse";N.style.borderSpacing="0px";N.style.width="100%";var T=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var P=c.length-1;0<=P;P--){var C=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");f.style.borderBottom=
"1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var m=document.createElement("td");m.style.padding="6px";m.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(m,mxResources.get("current")):d.toDateString()===W?mxUtils.write(m,d.toLocaleTimeString()):mxUtils.write(m,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(m);f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?
-" "+b.lastModifyingUserName:""));var C=function(b){p.stop();var c=mxUtils.parseXml(b),m=a.editor.extractGraphModel(c.documentElement,!0);if(null!=m){E.style.display="none";E.innerHTML="";t=c;u=b;l=parseSelectFunction=null;n=0;var q=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center();return a},s=function(b){null!=b&&(b=q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));
+" "+b.lastModifyingUserName:""));var H=function(b){p.stop();var c=mxUtils.parseXml(b),m=a.editor.extractGraphModel(c.documentElement,!0);if(null!=m){E.style.display="none";E.innerHTML="";t=c;u=b;l=parseSelectFunction=null;n=0;var q=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center();return a},s=function(b){null!=b&&(b=q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));
return b};if("mxfile"==m.nodeName){c=m.getElementsByTagName("diagram");l=[];for(b=0;b<c.length;b++)l.push(c[b]);n=Math.min(k,l.length-1);0<l.length&&s(l[n]);if(1<l.length){E.removeAttribute("disabled");E.style.display="";for(b=0;b<l.length;b++)c=document.createElement("option"),mxUtils.write(c,l[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==n&&c.setAttribute("selected","selected"),E.appendChild(c)}G=function(){n=k=parseInt(E.value);s(l[k])}}else q(m);
D.innerHTML="";mxUtils.write(D,d.toLocaleDateString()+" "+d.toLocaleTimeString());D.setAttribute("title",f.getAttribute("title"));v.removeAttribute("disabled");z.removeAttribute("disabled");y.removeAttribute("disabled");x.removeAttribute("disabled");if(null==r||!r.isRestricted())a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),A.removeAttribute("disabled"),I.removeAttribute("disabled"),F.removeAttribute("disabled");mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(y,60);
mxUtils.setOpacity(x,60)}else E.style.display="none",E.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))};mxEvent.addListener(f,"click",function(a){q!=b&&(p.stop(),null!=s&&(s.style.backgroundColor=""),q=b,s=f,s.style.backgroundColor="#ebf2f9",u=t=null,D.removeAttribute("title"),D.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),v.setAttribute("disabled",
-"disabled"),z.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(x,20),p.spin(e),b.getXml(function(a){q==b&&C(a)},function(a){p.stop();E.style.display="none";E.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),
+"disabled"),z.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(x,20),p.spin(e),b.getXml(function(a){q==b&&H(a)},function(a){p.stop();E.style.display="none";E.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),
mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){I.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(f)}return f}(c[P]);null!=C&&P==c.length-1&&(L=C)}N.appendChild(T);b.appendChild(N)}else e.style.display="none",H.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=L&&L.click()};b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});
b.className="geBtn";H.appendChild(E);H.appendChild(v);H.appendChild(z);H.appendChild(x);H.appendChild(y);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(A),d.appendChild(F),d.appendChild(B),d.appendChild(I)):(d.appendChild(A),d.appendChild(F),d.appendChild(B),d.appendChild(I),d.appendChild(b));f.appendChild(d);f.appendChild(H);f.appendChild(D);this.container=f},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=[],c=0;c<a.length;c++){var d=B.view.getState(a[c]);if(null!=d){for(var e=
B.cellRenderer.getShapesForState(d),f=0;f<e.length;f++)null!=e[f]&&null!=e[f].node&&b.push(e[f].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b}function g(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="0";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),a[b].style.opacity="1"},0)}}function k(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,
@@ -7237,13 +7237,13 @@ mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().b
f.setCellStyles(mxConstants.STYLE_ROTATION,Number(q.value),[c[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&t.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(d),e.appendChild(t)):(e.appendChild(t),e.appendChild(d));b.appendChild(e);this.container=b},LibraryDialog=function(a,c,f,d,b,e){function g(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=
s;)a=a.parentNode;var b=null;if(null!=a)for(var c=s.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function k(b,c,d,e,f,l,n,p,y){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=n||null==t[b]){s.style.backgroundImage="";q.style.display="none";var r=f,A=l;if(f>a.maxImageSize||l>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=C;l*=C}r>A?(A=Math.round(A*u/r),r=u):(r=Math.round(r*v/A),A=v);var O=document.createElement("div");
O.setAttribute("draggable","true");O.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";O.style.position="relative";O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=b){var Q=document.createElement("img");Q.setAttribute("src",D.convert(b));Q.style.width=r+"px";Q.style.height=A+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((v-A)/2)+"px";Q.style.paddingLeft=Math.floor((u-r)/2)+"px";O.appendChild(Q)}else if(null!=n){var M=a.stringToCells(a.editor.graph.decompress(n.xml));
-0<M.length&&(a.sidebar.createThumb(M,u,v,O,null,!0,!1),O.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",O.firstChild.style.cursor="")}var V=document.createElement("img");V.setAttribute("src",Editor.closeImage);V.setAttribute("border","0");V.setAttribute("title",mxResources.get("delete"));V.setAttribute("align","top");V.style.paddingTop="4px";V.style.marginLeft="-22px";V.style.cursor="pointer";mxEvent.addListener(V,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=n&&
-(V.style.position="relative");(function(a,c){mxEvent.addListener(V,"click",function(d){t[b]=null;for(var e=0;e<m.length;e++)if(null!=b&&m[e].data==c||null!=n&&m[e].xml==n.xml){m.splice(e,1);break}O.parentNode.removeChild(a);0==m.length&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(V,"dblclick",function(a){mxEvent.consume(a)})})(O,b,n);O.appendChild(V);O.style.marginBottom="30px";var J=document.createElement("div");J.style.position=
+0<M.length&&(a.sidebar.createThumb(M,u,v,O,null,!0,!1),O.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",O.firstChild.style.cursor="")}var U=document.createElement("img");U.setAttribute("src",Editor.closeImage);U.setAttribute("border","0");U.setAttribute("title",mxResources.get("delete"));U.setAttribute("align","top");U.style.paddingTop="4px";U.style.marginLeft="-22px";U.style.cursor="pointer";mxEvent.addListener(U,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=n&&
+(U.style.position="relative");(function(a,c){mxEvent.addListener(U,"click",function(d){t[b]=null;for(var e=0;e<m.length;e++)if(null!=b&&m[e].data==c||null!=n&&m[e].xml==n.xml){m.splice(e,1);break}O.parentNode.removeChild(a);0==m.length&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(U,"dblclick",function(a){mxEvent.consume(a)})})(O,b,n);O.appendChild(U);O.style.marginBottom="30px";var J=document.createElement("div");J.style.position=
"absolute";J.style.boxSizing="border-box";J.style.bottom="-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var K=null;null!=b?(K={data:b,w:f,h:l,title:y},null!=p&&(K.aspect=p),t[b]=Q,m.push(K)):null!=n&&(n.aspect="fixed",m.push(n),K=n);var S=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));
J.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});S();O.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){mxEvent.consume(a)});f=function(b){if(!mxClient.IS_IOS&&!mxClient.IS_QUIRKS&&!mxClient.IS_FF&&(null==document.documentMode||9<document.documentMode)){if("true"!=J.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==K.title||0==K.title.length)J.innerHTML="";J.style.textOverflow=
"";J.style.whiteSpace="";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");J.focus();document.execCommand("selectAll",!1,null);x=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";K.title=J.innerHTML;S()}}}else{var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,S())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init()}mxEvent.consume(b)};mxEvent.addListener(J,"click",f);mxEvent.addListener(O,
-"dblclick",f);s.appendChild(O);mxEvent.addListener(O,"dragstart",function(a){null==b&&null!=n&&(V.style.visibility="hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=n.xml&&a.dataTransfer.setData("Text",n.xml);z=g(a);mxClient.IS_GC&&(O.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);V.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(O,"dragend",function(a){"hidden"==V.style.visibility&&
-(V.style.visibility="",J.style.visibility="");z=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,"transform",null)})}else a.handleError({message:mxResources.get("fileExists")});else{f=!1;try{if(null!=b&&"\x3cmxlibrary"==b.substring(0,10)){A=mxUtils.parseXml(b);r=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=r&&0<r.length)for(l=0;l<r.length;l++)null!=r[l].xml?k(null,null,0,0,0,0,r[l]):k(r[l].data,null,0,0,r[l].w,r[l].h,null,"fixed",r[l].title);a.spinner.stop();f=!0}}catch(Z){}f||
+"dblclick",f);s.appendChild(O);mxEvent.addListener(O,"dragstart",function(a){null==b&&null!=n&&(U.style.visibility="hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=n.xml&&a.dataTransfer.setData("Text",n.xml);z=g(a);mxClient.IS_GC&&(O.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);U.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(O,"dragend",function(a){"hidden"==U.style.visibility&&
+(U.style.visibility="",J.style.visibility="");z=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,"transform",null)})}else a.handleError({message:mxResources.get("fileExists")});else{f=!1;try{if(null!=b&&"\x3cmxlibrary"==b.substring(0,10)){A=mxUtils.parseXml(b);r=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=r&&0<r.length)for(l=0;l<r.length;l++)null!=r[l].xml?k(null,null,0,0,0,0,r[l]):k(r[l].data,null,0,0,r[l].w,r[l].h,null,"fixed",r[l].title);a.spinner.stop();f=!0}}catch(Z){}f||
(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ea){console.log("e",ea)}return null}function l(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function n(b){b.stopPropagation();b.preventDefault();y=g(b);if(null!=z)null!=y&&y<s.children.length?(m.splice(y>z?y-1:y,0,m.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(m.push(m.splice(z,1)[0]),s.appendChild(s.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,
0,0,a.maxImageSize,function(a,c,d,e,f,g,l){k(a,c,d,e,f,g,l,"fixed",mxEvent.isAltDown(b)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," "))});else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){k(c,null,0,0,a.width,a.height)})}b.stopPropagation();b.preventDefault()}var m=[];f=document.createElement("div");
f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var r=document.createElement("input");r.setAttribute("value",c);r.style.marginRight="20px";r.style.marginLeft="10px";r.style.width="500px";null!=b&&!b.isRenamable()&&r.setAttribute("disabled","true");this.init=function(){if(null==b||b.isRenamable())r.focus(),mxClient.IS_FF||5<=document.documentMode||
@@ -7260,7 +7260,7 @@ l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g
function(b,c,d){var e=n.value,f=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(f.documentElement),f=f.documentElement.getElementsByTagName("parsererror");if(null!=f&&0<f.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),f=!b.model.contains(c),!d||f||e!=r){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(f){var g=a.editor.graph.getInsertPoint();c.geometry.x=g.x;c.geometry.y=g.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,
"stencil("+e+")",[c])}catch(k){throw k;}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){s(m,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){s(a.editor.graph,c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");
g.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";
-a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.container=g};(function(){EditorUi.VERSION="5.7.0.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
+a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.container=g};(function(){EditorUi.VERSION="5.7.1.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();Editor.initMath=function(a,b){a=null!=a?a:"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config\x3dTeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.prototype.init=function(){this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};
@@ -7282,19 +7282,19 @@ null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].g
else throw{message:mxResources.get("notADiagramFile")};null!=a&&!b&&(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(a=mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(d))).documentElement));if(null!=a&&"mxGraphModel"!=a.nodeName&&(!b||"mxfile"!=a.nodeName))a=null;return a};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement);
return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(d){}return!1};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=d.apply(this,arguments);if(null==b)try{var c=a.indexOf("\x26lt;mxfile ");if(0<=c){var e=a.lastIndexOf("\x26lt;/mxfile\x26gt;");e>c&&(b=a.substring(c,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(a),g=this.editor.extractGraphModel(f.documentElement),
b=null!=g?mxUtils.getXml(g):""}catch(k){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('\x3cmeta charset\x3d"utf-8"\x3e');0<=b&&(a=a.slice(0,b)+'\x3cmeta charset\x3d"utf-8"/\x3e'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
-b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if(1<d.length||"1"==urlParams.pages){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);
-this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),1<a.length||"1"==urlParams.pages)){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-
-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=
-a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var c=a.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==a.nodeName){c=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==c||""==c)){if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=
-d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}}else c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");c=a.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,
-c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&
-b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;
-g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
-Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);
-b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,
-d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,
-620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
+b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("1"==urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=
+a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=
+function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"1"==urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",
+[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};
+var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var c=a.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==a.nodeName){c=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==c||""==c)){if(d=null!=this.graph.themes?this.graph.themes["default-old"]:
+mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}}else c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");c=a.getAttribute("backgroundImage");
+null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=e.apply(this,
+arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=
+38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");
+b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
+"none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=
+function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);
return a};EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,
0))};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createPngDataUri=function(a,b){var c=a.toDataURL("image/png");if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/png"))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
@@ -7349,7 +7349,7 @@ k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCod
d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
-var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
@@ -7392,42 +7392,43 @@ d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.lengt
else if("\x3cmxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,
9)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,b){var c=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename))});null!=a&&0<a.length&&(null!=this.getCurrentFile()&&!this.isDiagramEmpty()?(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,c)):c())};EditorUi.prototype.initializeEmbedMode=function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";this.editor.graph.setEnabled(!1);if((window.opener||window.parent)!=window)("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.diagramContainer.style.visibility=
-"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(a=mxUtils.parseXml(a),this.editor.setGraphXml(a.documentElement),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&
-(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
+"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==
+this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
this.editor.setStatus(mxResources.get(urlParams.modified)))});this.editor.graph.model.addListener(mxEvent.CHANGE,c);mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){var e=c.data;if("json"==urlParams.proto){e=JSON.parse(e);if("dialog"==e.action){this.showError(null!=e.titleKey?mxResources.get(e.titleKey):e.title,null!=e.messageKey?mxResources.get(e.messageKey):e.message,null!=e.buttonKey?mxResources.get(e.buttonKey):e.button);null!=e.modified&&(this.editor.modified=e.modified);return}if("template"==
e.action){this.spinner.stop();var f=new NewDialog(this,!1,!1,mxUtils.bind(this,function(b){a(b||"",c,null!=b)}));this.showDialog(f.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));f.init();return}if("status"==e.action){null!=e.messageKey?this.editor.setStatus(mxResources.get(e.messageKey)):null!=e.message&&this.editor.setStatus(e.message);null!=e.modified&&(this.editor.modified=e.modified);return}if("spinner"==e.action){var g=null!=e.messageKey?mxResources.get(e.messageKey):
e.message;null!=e.show&&!e.show?this.spinner.stop():this.spinner.spin(document.body,g);return}if("export"==e.action){if("png"==e.format||"xmlpng"==e.format){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin)){var k=null!=e.xml?e.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=e.format;b.xml=encodeURIComponent(k);b.data="data:image/png;base64,"+
-a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});this.isExportToCanvas()?this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));l(a.substring(a.lastIndexOf(",")+1))})):(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,
-function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&(f=mxUtils.parseXml(e.xml),this.editor.setGraphXml(f.documentElement));g=this.createLoadMessage("export");if("html"==e.format||"html2"==e.format)k=this.editor.getGraphXml(),g.data="html2"==e.format?this.getHtml2(k,this.editor.graph):this.getHtml(k,this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=mxUtils.getXml(this.editor.getGraphXml());g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(a);
-d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(mxUtils.getXml(this.editor.getGraphXml()),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),"*")}return}"load"==
-e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(f)),
-e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(m){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&(f=mxUtils.bind(this,function(a,b){var c=mxUtils.getXml(this.editor.getGraphXml()),
-d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",
-f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";
-a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding=
-"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);
-a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c=
-"tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
-this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
-a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,
-arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&
-!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=
-b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
-"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=
-null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);
-if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=
-[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+
-"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=
-[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];
-mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];
-mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];
-mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+
-"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),n=m.getGlobalVariable,u=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?1:n.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(u.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");
+"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);l(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&this.setFileData(e.xml);g=this.createLoadMessage("export");if("html2"==e.format||"html"==e.format&&("1"==urlParams.pages||null!=this.pages&&1<this.pages.length))f=this.getXmlFileData(),g.xml=mxUtils.getXml(f),g.data=this.getFileData(null,null,!0,null,null,null,f),g.format=e.format;else if("html"==e.format)k=this.editor.getGraphXml(),g.data=this.getHtml(k,
+this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=this.getFileData(!0);g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();g.data=this.createSvgDataUri(a);d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),
+"*")}return}"load"==e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop=
+"6px"),this.buttonContainer.appendChild(f)),e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"function"===typeof e.charAt&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(p){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&
+(f=mxUtils.bind(this,function(a,b){var c="1"==urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml()),d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",
+f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&
+(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
+"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};
+EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),
+c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),
+f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
+!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
+this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=
+function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",
+a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=
+new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=
+[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
+[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:{},createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:12,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=a},getUi:function(){return this.settings.ui},
setUi:function(a){this.settings.ui=a},getShowStartScreen:function(){return this.settings.showStartScreen},setShowStartScreen:function(a){this.settings.showStartScreen=a},getGridColor:function(){return this.settings.gridColor},setGridColor:function(a){this.settings.gridColor=a},getAutosave:function(){return this.settings.autosave},setAutosave:function(a){this.settings.autosave=a},getLibraries:function(){return this.settings.libraries},setLibraries:function(a){this.settings.libraries=a},addCustomLibrary:function(a){mxSettings.load();
@@ -7845,10 +7846,10 @@ App.prototype.getThumbnail=function(a,c){var f=!1;try{if(null==this.thumbImageCa
0.5),a.shape.paint(b),b.translate(-0.5,-0.5),b.restore())};s.drawText=function(a,b){};s.drawState(d.getView().getState(d.model.root),r);r.finish(function(){s.drawState(d.getView().getState(d.model.root),p);c(b)});f=!0}}catch(q){}return f};App.prototype.getPublicUrl=function(a,c){c(null)};
App.prototype.createFileData=function(a,c,f,d,b,e,g,k,l){c=null!=c?c:this.editor.graph;b=null!=b?b:!1;l=null!=l?l:!0;var n=null,m=null;null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER?n="_blank":m=n=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){var r=c.zapGremlins(mxUtils.getXml(a)),p=c.compress(r);if(c.decompress(p)!=r)return r;r=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(r,p);p=a.ownerDocument.createElement("mxfile");p.appendChild(r)}p.setAttribute("userAgent",
navigator.userAgent);p.setAttribute("version",EditorUi.VERSION);p.setAttribute("editor","www.draw.io");a=null!=f?f.getMode():this.mode;null!=a&&p.setAttribute("type",a);a=mxUtils.getXml(p);if(!e&&!b&&(g||null!=f&&/(\.html)$/i.test(f.getTitle())))a=this.getHtml2(p,c,null!=f?f.getTitle():null,n,m,l);else if(e||!b&&null!=f&&/(\.svg)$/i.test(f.getTitle())){if(null!=f&&(f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,c,d,null,k,l,m)}return a};
-App.prototype.getFileData=function(a,c,f,d,b,e){b=null!=b?b:!0;e=null!=e?e:!1;var g=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var k=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(g)));mxUtils.setTextContent(this.currentPage.node,k);g=this.fileNode.cloneNode(!1);if(e)g.appendChild(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var l=this.pages[e].mapping;this.currentPage!=this.pages[e]&&(null!=l&&l.needsUpdate)&&(k=(new mxCodec(mxUtils.createXmlDocument())).encode(l.graphModel),
-l.writeRealtimeToNode(k),k=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(k))),mxUtils.setTextContent(this.pages[e].node,k),l.needsUpdate=!1);g.appendChild(this.pages[e].node)}}k=this.editor.graph;e=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(c||!a&&null!=e&&/(\.svg)$/i.test(e.getTitle()))){var k=this.createTemporaryGraph(k.getStylesheet()),n=k.getGlobalVariable,m=this.pages[0];k.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==
-a?1:n.apply(this,arguments)};document.body.appendChild(k.container);k.model.setRoot(m.root)}a=this.createFileData(g,k,e,window.location.href,a,c,f,d,b);k!=this.editor.graph&&k.container.parentNode.removeChild(k.container);return a};
-App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
+App.prototype.getXmlFileData=function(a,c){a=null!=a?a:!0;c=null!=c?c:!1;var f=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f)));mxUtils.setTextContent(this.currentPage.node,d);f=this.fileNode.cloneNode(!1);if(c)f.appendChild(this.currentPage.node);else for(var b=0;b<this.pages.length;b++){var e=this.pages[b].mapping;this.currentPage!=this.pages[b]&&(null!=e&&e.needsUpdate)&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),
+e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[b].node,d),e.needsUpdate=!1);f.appendChild(this.pages[b].node)}}return f};
+App.prototype.getFileData=function(a,c,f,d,b,e,g){b=null!=b?b:!0;g=null!=g?g:this.getXmlFileData(b,null!=e?e:!1);e=this.editor.graph;var k=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(c||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){e=this.createTemporaryGraph(e.getStylesheet());var l=e.getGlobalVariable,n=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(n.root)}a=
+this.createFileData(g,e,k,window.location.href,a,c,f,d,b);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
App.prototype.setMode=function(a,c){this.mode=a;null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if("undefined"!=typeof Storage&&c){var f=new Date;f.setYear(f.getFullYear()+1);document.cookie="MODE\x3d"+a+"; expires\x3d"+f.toUTCString()}null!=this.appIcon&&(f=this.getCurrentFile(),a=null!=f?f.getMode():null,a==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):a==App.MODE_DROPBOX?
(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):a==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))};
App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var c=this.getCurrentFile(),f=null!=c?c.getMode():null;f==App.MODE_GOOGLE?0<c.desc.parents.length?window.open("https://drive.google.com/drive/folders/"+c.desc.parents[0].id):window.open("https://drive.google.com/?authuser\x3d0"):f==App.MODE_DROPBOX?window.open("https://www.dropbox.com/"):f==App.MODE_ONEDRIVE&&window.open("https://onedrive.live.com/")}mxEvent.consume(a)};
@@ -8039,46 +8040,47 @@ function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testD
"Bearer "+b)},b.send(function(b){a.spinner.stop();200==b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole\x3dShow Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-
1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){var b=a.getCurrentFile();if("1"==urlParams.embed||null!=b&&b.isEditable())b=new mxCell("",new mxGeometry(0,
0,120,120),a.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init()});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){var b=new EmbedHtmlDialog(a);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){var b=new EmbedSvgDialog(a);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("embedIframe",
-new Action(mxResources.get("iframe")+"...",function(){var b=new IframeDialog(a);a.showDialog(b.container,420,210,!0,!0);b.init()}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){var b=new IframeDialog(a,!1,!0);a.showDialog(b.container,420,210,!0,!0);b.init()}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){var b=new EmbedSvgDialog(a,!0);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("liveImage",new Action("Live image...",
+new Action(mxResources.get("iframe")+"...",function(){var b=new IframeDialog(a);a.showDialog(b.container,420,220,!0,!0);b.init()}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){var b=new IframeDialog(a,!1,!0);a.showDialog(b.container,420,200,!0,!0);b.init()}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){var b=new EmbedSvgDialog(a,!0);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("liveImage",new Action("Live image...",
function(){var b=new IframeDialog(a,!0);a.showDialog(b.container,420,180,!0,!0);b.init()}));a.actions.addAction("googleDocs...",function(){window.open("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){var b=new GoogleSitesDialog(a);a.showDialog(b.container,420,256,!0,!0);b.init()});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=a.scratchpad}),
-a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});l=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c=mxUtils.getXml(a.editor.getGraphXml());
-if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&(a.editor.modified=!1)},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),
-b):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,b,c,d,e)}))}),c):!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,
-function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),c);b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f)}))}),c);b.addSeparator(c);b.addItem(mxResources.get("formatHtmlEmbedded")+
-"...",null,mxUtils.bind(this,function(){this.editorUi.downloadFile("html")}),c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("print").funct,c):!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.padding="6px";var c=document.createElement("input");c.style.marginRight="8px";c.setAttribute("type","checkbox");d.isSelectionEmpty()&&
-c.setAttribute("disabled","disabled");b.appendChild(c);mxUtils.write(b,mxResources.get("selectionOnly"));mxUtils.br(b);var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.marginTop="16px";e.style.marginRight="8px";d.pageVisible||(e.setAttribute("checked","checked"),e.defaultChecked=!0);b.appendChild(e);mxUtils.write(b,mxResources.get("crop"));b=new CustomDialog(a,b,mxUtils.bind(this,function(){var a=d.pageVisible;d.pageVisible=!e.checked;this.editorUi.downloadFile("pdf",
-null,null,!c.checked);d.pageVisible=a}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,120,!0,!0)}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.padding="6px";var e=document.createElement("input");e.style.marginRight="8px";e.setAttribute("type","checkbox");d.isSelectionEmpty()&&e.setAttribute("disabled","disabled");c.appendChild(e);mxUtils.write(c,
-mxResources.get("selectionOnly"));var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";mxUtils.br(c);c.appendChild(g);b?mxUtils.write(c,mxResources.get("compressed")):mxUtils.write(c,mxResources.get("allPages"));c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("xml",b?!g.checked:null,null,!e.checked,!b?!g.checked:null)}),null,mxResources.get("export"));a.showDialog(c.container,
-300,120,!0,!0)}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function l(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&
-a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&(null==a.getCurrentFile()&&
-"1"!=urlParams.embed)&&a.showSplash()}}}function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):
-null)},!0)},!0)}var n=mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)},
-c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":
-"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=
-uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),
-mxUtils.bind(this,function(a){null!=a&&(0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),
-mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&
-(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),
-mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,
-function(b){a.handleError(b)}))}))}));a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://imgur.com/"+a)})}));a.actions.addAction("facebook...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://www.facebook.com/sharer.php?p[url]\x3d"+encodeURIComponent("https://imgur.com/"+a)+"\x26p[images][0]\x3d"+encodeURIComponent(a+".png"))})}));a.actions.addAction("twitter...",
-mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://twitter.com/intent/tweet?text\x3d"+encodeURIComponent("Check out the diagram I made with draw.io")+"\x26via\x3ddrawio\x26hashtags\x3dmadewithdrawio\x26url\x3d"+encodeURIComponent("https://imgur.com/"+a))})}));a.actions.addAction("github...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||
-10<=document.documentMode)"undefined"!==typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["twitter"],c),this.addMenuItems(b,["facebook"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));
-this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));
-this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),
-s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");
-a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),
-a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),
-e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
-b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),
-null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",
-null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=
-a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&(0<b.length&&a.spinner.spin(document.body,mxResources.get("loading")))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();
-try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline",
-"layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});l=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="1"==urlParams.pages||
+null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&(a.editor.modified=!1)},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):
+"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),b):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,b,c,d,e)}))}),c):
+!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),c);b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,
+e,f){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f)}))}),c);b.addSeparator(c);b.addItem(mxResources.get("formatHtmlEmbedded")+"...",null,mxUtils.bind(this,function(){this.editorUi.downloadFile("html")}),c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("print").funct,c):!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");
+b.style.padding="6px";var c=document.createElement("input");c.style.marginRight="8px";c.setAttribute("type","checkbox");d.isSelectionEmpty()&&c.setAttribute("disabled","disabled");b.appendChild(c);mxUtils.write(b,mxResources.get("selectionOnly"));mxUtils.br(b);var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.marginTop="16px";e.style.marginRight="8px";d.pageVisible||(e.setAttribute("checked","checked"),e.defaultChecked=!0);b.appendChild(e);mxUtils.write(b,mxResources.get("crop"));
+b=new CustomDialog(a,b,mxUtils.bind(this,function(){var a=d.pageVisible;d.pageVisible=!e.checked;this.editorUi.downloadFile("pdf",null,null,!c.checked);d.pageVisible=a}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,120,!0,!0)}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.padding="6px";var e=document.createElement("input");e.style.marginRight=
+"8px";e.setAttribute("type","checkbox");d.isSelectionEmpty()&&e.setAttribute("disabled","disabled");c.appendChild(e);mxUtils.write(c,mxResources.get("selectionOnly"));var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";mxUtils.br(c);c.appendChild(g);b?mxUtils.write(c,mxResources.get("compressed")):(mxUtils.write(c,mxResources.get("allPages")),mxEvent.addListener(e,"change",
+function(){e.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")}));c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("xml",b?!g.checked:null,null,!e.checked,!b?!g.checked:null)}),null,mxResources.get("export"));a.showDialog(c.container,300,120,!0,!0)}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,
+this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function l(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
+c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&(null==a.getCurrentFile()&&"1"!=urlParams.embed)&&a.showSplash()}}}function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,
+null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},!0)},!0)}var n=mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,
+0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),
+b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},
+c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));
+this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&(0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,
+null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():
+a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,
+function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=
+a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://imgur.com/"+a)})}));a.actions.addAction("facebook...",
+mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://www.facebook.com/sharer.php?p[url]\x3d"+encodeURIComponent("https://imgur.com/"+a)+"\x26p[images][0]\x3d"+encodeURIComponent(a+".png"))})}));a.actions.addAction("twitter...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://twitter.com/intent/tweet?text\x3d"+encodeURIComponent("Check out the diagram I made with draw.io")+"\x26via\x3ddrawio\x26hashtags\x3dmadewithdrawio\x26url\x3d"+
+encodeURIComponent("https://imgur.com/"+a))})}));a.actions.addAction("github...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||10<=document.documentMode)"undefined"!==typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["twitter"],c),this.addMenuItems(b,["facebook"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,
+["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));
+this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn",
+"-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,
+d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},
+null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),
+"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;
+var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=
+urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=
+b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,
+null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},
+c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&(0<b.length&&a.spinner.spin(document.body,mxResources.get("loading")))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),
+b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],
+c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&
isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?this.addMenuItems(b,["plugins","-","offline"],c):b.addSeparator(c);!a.isOffline()&&(!navigator.standalone&&"1"!=urlParams.embed)&&this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),
this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,
diff --git a/war/js/atlas-viewer.min.js b/war/js/atlas-viewer.min.js
index 4b888206..c215c799 100644
--- a/war/js/atlas-viewer.min.js
+++ b/war/js/atlas-viewer.min.js
@@ -52,10 +52,10 @@ J={};J["\x3e"]=J["+"]=J["~"]=J;p=function(a,e,f){function g(q,p){function t(c,f,
s]);var z;e.ia?(z=e.ia(k,s),"string"!==typeof z&&(r=d,z=s),r&&C!==+C&&(C=x.d.NONE)):(z=s,C!==+C&&(r=d));var v=s="",F=d;/^[~^$*|]?=$/.test(a[c])&&(s=a[c++],v=a[c++],/^[0-9A-Za-z:_\-]+$/.test(v)?v='"'+v+'"':"]"===v&&(v='""',--c),/^"([^\"\\]|\\.)*"$/.test(v)||(r=d),(F="i"===a[c])&&++c);"]"!==a[c]&&(++c,r=d);switch(C){case x.d.CLASSES:case x.d.LOCAL_NAME:case x.d.NONE:break;case x.d.GLOBAL_NAME:case x.d.ID:case x.d.IDREF:("\x3d"===s||"~\x3d"===s||"$\x3d"===s)&&'""'!=v&&!F?v='"'+v.substring(1,v.length-
1)+l+'"':"|\x3d"===s||""===s||(r=d);break;case x.d.URI:case x.d.URI_FRAGMENT:""!==s&&(r=d);break;default:r=d}r&&(q+="["+z.replace(/[^\w-]/g,"\\$\x26")+s+v+(F?" i]":"]"))}else if(c<f&&":"===a[c])if(C=a[++c],G.test(C))p+=":"+C;else break;else break;c!==f&&(r=d);r&&(c=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+q+p+g)&&u.push(c);return r}" "===a[q]&&++q;p-1!==q&&" "===a[p]&&--p;for(var u=[],C=q,r=b,s=q;r&&s<p;++s){var z=a[s];if(J[z]===J||" "===z)t(C,s,z)?C=s+1:r=d}t(C,p,"")||(r=d);return r?(u.length&&(C=
u.join(""),k!==c&&(C="."+k+" "+C),m.push(C)),b):!f||f(a.slice(q,p))}var k=e.na,l=e.L,n=e.Aa,m=[],q=0,p,t=0,u;for(p=0;p<a.length;++p)if(u=a[p],"("==u||"["==u?(++t,b):")"==u||"]"==u?(t&&--t,b):!(" "==a[p]&&(t||J[a[p-1]]===J||J[a[p+1]]===J)))a[q++]=a[p];a.length=q;q=a.length;for(p=t=0;p<q;++p)if(","===a[p]){if(!g(t,p))return c;t=p+1}return!g(t,q)?c:m};(function(){var a=/^\w/,b=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
-"i");s=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var g=c[f];" "!=g&&(c[e++]=g)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=b.exec(a))||(k=d.exec(a))||(k=f.exec(a))||(k=g.exec(a))?k[1]:c}function f(g,l,n,G,C,x,u){function r(){E=
-D.length&&D[D.length-1]===c}var F=a,A=u||[0],D=[],E=d;q(l,{startStylesheet:function(){F=[]},endStylesheet:function(){},startAtrule:function(a,b){if(E)a=c;else if("@media"===a)F.push("@media"," ",s(b));else if("@keyframes"===a||"@-webkit-keyframes"===a){var d=b[0];1===b.length&&!/__$|[^\w\-]/.test(d)?(F.push(a," ",d+n.L),a="@keyframes"):a=c}else if("@import"===a&&0<b.length)if(a=c,"function"===typeof x){var l=s(b.slice(1));if("not all"!==l){++A[0];var m=[];F.push(m);var q=t(k(g,e(b[0])),function(a){var b=
-f(q,a.qa,n,G,C,x,A);--A[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;x(a,!!A[0])},C)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;D.push(a)},endAtrule:function(){D.pop();E||F.push(";");r()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===D[D.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-E=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,n),!d||!d.length?E=b:e=d.join(", "));E||F.push(e,"{")}D.push(c)},endRuleset:function(){D.pop();E||F.push("}");r()},declaration:function(a,c){if(!E){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);m(a,c,G,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!A[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
+"i");s=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var g=c[f];" "!=g&&(c[e++]=g)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=b.exec(a))||(k=d.exec(a))||(k=f.exec(a))||(k=g.exec(a))?k[1]:c}function f(g,l,n,C,G,u,x){function r(){E=
+D.length&&D[D.length-1]===c}var F=a,A=x||[0],D=[],E=d;q(l,{startStylesheet:function(){F=[]},endStylesheet:function(){},startAtrule:function(a,b){if(E)a=c;else if("@media"===a)F.push("@media"," ",s(b));else if("@keyframes"===a||"@-webkit-keyframes"===a){var d=b[0];1===b.length&&!/__$|[^\w\-]/.test(d)?(F.push(a," ",d+n.L),a="@keyframes"):a=c}else if("@import"===a&&0<b.length)if(a=c,"function"===typeof u){var l=s(b.slice(1));if("not all"!==l){++A[0];var m=[];F.push(m);var q=t(k(g,e(b[0])),function(a){var b=
+f(q,a.qa,n,C,G,u,A);--A[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;u(a,!!A[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;D.push(a)},endAtrule:function(){D.pop();E||F.push(";");r()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===D[D.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+E=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,n),!d||!d.length?E=b:e=d.join(", "));E||F.push(e,"{")}D.push(c)},endRuleset:function(){D.pop();E||F.push("}");r()},declaration:function(a,c){if(!E){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);m(a,c,C,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!A[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
typeof window&&(window.sanitizeCssProperty=m,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,t;(function(){function a(b,d,e,f,g){for(var k=d++;d<e&&"{"!==b[d]&&";"!==b[d];)++d;if(d<e&&(g||";"===b[d])){g=k+1;var l=d;g<e&&" "===b[g]&&++g;l>g&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[k].toLowerCase(),b.slice(g,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,g,k){++f;for(k.startBlock&&k.startBlock();f<g;){var l=
b[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?a(b,f,g,k,d):"{"===l?c(b,f,g,k):e(b,f,g,k)}k.endBlock&&k.endBlock();return f}function e(a,c,d,g){var k=c,n=f(a,c,d,b);if(0>n)return n=~n,n===k?n+1:n;var m=a[n];if("{"!==m)return n===k?n+1:n;c=n+1;n>k&&" "===a[n-1]&&--n;for(g.startRuleset&&g.startRuleset(a.slice(k,n));c<d;){m=a[c];if("}"===m){++c;break}c=" "===m?c+1:l(a,c,d,g)}g.endRuleset&&g.endRuleset();return c}function f(a,b,c,d){for(var e,g=[],k=-1;b<c;++b)if(e=a[b].charAt(0),
"["===e||"("===e)g[++k]=e;else if("]"===e&&"["===g[k]||")"===e&&"("===g[k])--k;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=k&&(b=~(b+1));return b}function g(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function l(a,b,c,e){var k=a[b++];if(!n.test(k))return g(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return g(a,b,c);++b;b<c&&" "===a[b]&&++b;var m=f(a,b,c,d);if(0>m)m=~m;else{for(var q=[],p=0,t=b;t<m;++t)b=a[t]," "!==b&&(q[p++]=b);if(m<c){do{b=a[m];
@@ -115,8 +115,8 @@ d?(c[k++]=192|d>>>6,c[k++]=128|63&d):65536>d?(c[k++]=224|d>>>12,c[k++]=128|d>>>6
2===k?31:3===k?15:7;1<k&&d<l;)g=g<<6|63&b[d++],k--;1<k?n[f++]=65533:65536>g?n[f++]=g:(g-=65536,n[f++]=55296|g>>10&1023,n[f++]=56320|1023&g)}return e(n,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+m[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var l=65535&b|0;b=b>>>16&65535|0;for(var n=0;0!==d;){n=2E3<d?2E3:d;d-=n;do l=l+c[k++]|0,b=b+l|0;while(--n);l%=65521;b%=65521}return l|
b<<16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;
for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(v.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=
-0))}function k(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function n(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,m=b.window,q=b.w_mask,p=b.prev,t=b.strstart+O,G=m[g+k-1],C=m[g+k];b.prev_length>=b.good_match&&
-(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,m[d+k]===C&&m[d+k-1]===G&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;d++;do;while(m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<t);if(e=O-(t-g),g=t-O,e>k){if(b.match_start=c,k=e,e>=l)break;G=m[g+k-1];C=m[g+k]}}while((c=p[c&q])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
+0))}function k(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function n(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,m=b.window,q=b.w_mask,p=b.prev,t=b.strstart+O,C=m[g+k-1],G=m[g+k];b.prev_length>=b.good_match&&
+(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,m[d+k]===G&&m[d+k-1]===C&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;d++;do;while(m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<t);if(e=O-(t-g),g=t-O,e>k){if(b.match_start=c,k=e,e>=l)break;C=m[g+k-1];G=m[g+k]}}while((c=p[c&q])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-S)){v.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var k=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,k),1===c.state.wrap?c.adler=y(c.adler,e,l,k):2===c.state.wrap&&(c.adler=E(c.adler,e,l,k)),c.next_in+=l,c.total_in+=l,l)),
b.lookahead+=d,b.lookahead+b.insert>=I){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+I-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<I)););}}while(b.lookahead<S&&0!==b.strm.avail_in)}function r(b,c){for(var d,e;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===F)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-S&&(b.match_length=m(b,d)),b.match_length>=I)if(e=D._tr_tally(b,b.strstart-b.match_start,b.match_length-I),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=I){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
@@ -2036,26 +2036,26 @@ b,this.toolbarContainer.onmousedown=b,this.diagramContainer.onselectstart=b,this
9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b;d.init(this.diagramContainer);d.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(b.node,"click",function(a){for(var c=mxEvent.getSource(a);null!=c&&c!=b.node;){if("A"==c.nodeName){null==c.getAttribute("target")&&null!=c.getAttribute("href")&&(window.open(c.getAttribute("href")),mxEvent.consume(a));break}c=
c.parentNode}})};this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,f=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
function(a,b){return e||f.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(e=!0,this.hoverIcons.reset(),d.container.style.cursor="move",!d.isEditing()&&mxEvent.getSource(a)==d.container&&mxEvent.consume(a)):!mxEvent.isConsumed(a)&&27==a.keyCode&&this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&mxEvent.isControlDown(a)};
-var l=!1,n=null,m=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=m}l=d.cellEditor.isContentEditing();
-n=a;m=c;p=b}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=s.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));s.toolbar.setFontName(c);
-s.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&
-d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),
-A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),e.push(f));f=d.getModel().getStyle(b.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],n=l.indexOf("\x3d");0<=n&&(f=l.substring(0,n),l=l.substring(n+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle=
-{}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<D.length;a++)for(b=0;b<D[a].length;b++)u.push(D[a][b]);for(a=0;a<A.length;a++)u.push(A[a]);var y=function(a,b){d.getModel().beginUpdate();try{if(b)for(var c=d.getModel().isEdge(k),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var g=e[c[f]];null!=g&&d.setCellStyles(c[f],g,a)}else for(g=0;g<a.length;g++){for(var k=a[g],l=d.getModel().getStyle(k),n=null!=
-l?l.split(";"):[],m=u.slice(),f=0;f<n.length;f++){var q=n[f],t=q.indexOf("\x3d");if(0<=t){var p=q.substring(0,t),x=mxUtils.indexOf(m,p);0<=x&&m.splice(x,1);for(var r=0;r<D.length;r++){var z=D[r];if(0<=mxUtils.indexOf(z,p))for(var s=0;s<z.length;s++){var v=mxUtils.indexOf(m,z[s]);0<=v&&m.splice(v,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var p=m[f],y=e[p];if(null!=y&&("shape"!=p||c))(!c||0>mxUtils.indexOf(A,p))&&d.setCellStyles(p,y,[k])}}}finally{d.getModel().endUpdate()}};
-d.addListener("cellsInserted",function(a,b){y(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){y(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));y(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var g=0;g<c.length&&!(e=d.getModel().isVertex(c[g])||e,(f=d.getModel().isEdge(c[g])||
-f)&&e);g++);else f=e=!0;for(var c=b.getProperty("keys"),k=b.getProperty("values"),g=0;g<c.length;g++){var l=0<=mxUtils.indexOf(z,c[g]);if("strokeColor"!=c[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,c[g]))f||0<=mxUtils.indexOf(v,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(u,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(u,c[g])){if(e||l)null==k[g]?delete d.currentVertexStyle[c[g]]:
-d.currentVertexStyle[c[g]]=k[g];if(f||l||0<=mxUtils.indexOf(v,c[g]))null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
-"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
-this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||
-"Helvetica",b=String(d.currentVertexStyle.fontSize||"12"),c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_FONTFAMILY]||a,b=c.style[mxConstants.STYLE_FONTSIZE]||b,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(b)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,b){var c=b.getProperty("cells"),e=b.getProperty("parent");d.getModel().isLayer(e)&&
-(!d.isCellVisible(e)&&null!=c&&0<c.length)&&d.getModel().setVisible(e,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
-mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,
-function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;
-EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
+var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&(mxEvent.isControlDown(a)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(a))};var l=!1,n=null,m=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=
+n;this.toolbar.sizeMenu=m}l=d.cellEditor.isContentEditing();n=a;m=c;p=b}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=s.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-
+1)&&(c=c.substring(0,c.length-1));s.toolbar.setFontName(c);s.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor=
+"default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),e.push(f));f=d.getModel().getStyle(b.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],n=l.indexOf("\x3d");
+0<=n&&(f=l.substring(0,n),l=l.substring(n+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
+D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<D.length;a++)for(b=0;b<D[a].length;b++)u.push(D[a][b]);for(a=0;a<A.length;a++)u.push(A[a]);var y=function(a,b){d.getModel().beginUpdate();try{if(b)for(var c=d.getModel().isEdge(k),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var g=e[c[f]];null!=g&&d.setCellStyles(c[f],
+g,a)}else for(g=0;g<a.length;g++){for(var k=a[g],l=d.getModel().getStyle(k),n=null!=l?l.split(";"):[],m=u.slice(),f=0;f<n.length;f++){var q=n[f],t=q.indexOf("\x3d");if(0<=t){var p=q.substring(0,t),x=mxUtils.indexOf(m,p);0<=x&&m.splice(x,1);for(var r=0;r<D.length;r++){var z=D[r];if(0<=mxUtils.indexOf(z,p))for(var s=0;s<z.length;s++){var v=mxUtils.indexOf(m,z[s]);0<=v&&m.splice(v,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var p=m[f],y=e[p];if(null!=
+y&&("shape"!=p||c))(!c||0>mxUtils.indexOf(A,p))&&d.setCellStyles(p,y,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){y(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){y(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));y(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),
+e=!1,f=!1;if(0<c.length)for(var g=0;g<c.length&&!(e=d.getModel().isVertex(c[g])||e,(f=d.getModel().isEdge(c[g])||f)&&e);g++);else f=e=!0;for(var c=b.getProperty("keys"),k=b.getProperty("values"),g=0;g<c.length;g++){var l=0<=mxUtils.indexOf(z,c[g]);if("strokeColor"!=c[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,c[g]))f||0<=mxUtils.indexOf(v,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(u,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:
+d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(u,c[g])){if(e||l)null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g];if(f||l||0<=mxUtils.indexOf(v,c[g]))null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
+"orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
+d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
+(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",b=String(d.currentVertexStyle.fontSize||"12"),c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_FONTFAMILY]||a,b=c.style[mxConstants.STYLE_FONTSIZE]||b,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(b)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,
+b){var c=b.getProperty("cells"),e=b.getProperty("parent");d.getModel().isLayer(e)&&(!d.isCellVisible(e)&&null!=c&&0<c.length)&&d.getModel().setVisible(e,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,
+"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,
+function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
+EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(b){9==b.which&&(a.isEnabled()&&!mxEvent.isAltDown(b))&&(a.isEditing()?a.stopEditing(!1):a.selectCell(!mxEvent.isShiftDown(b)),mxEvent.consume(b))}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(b){if(this.isImmediateEditingEvent(b)&&(!a.isEditing()&&!a.isSelectionEmpty()&&0!==b.which&&!mxEvent.isAltDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b))&&
(a.escape(),a.startEditing(),mxClient.IS_FF)){var c=a.cellEditor;c.textarea.innerHTML=String.fromCharCode(b.which);b=document.createRange();b.selectNodeContents(c.textarea);b.collapse(!1);c=window.getSelection();c.removeAllRanges();c.addRange(b)}}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var b=a.setDefaultParent,c=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);c.updateActionStates()};a.editLink=c.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
@@ -2146,7 +2146,7 @@ EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroun
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};
EditorUi.prototype.createKeyHandler=function(a){function b(a,b,c){g.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(b=null!=b?b:1,c){d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),f=0;f<e.length;f++)if(d.getModel().isVertex(e[f])&&d.isCellResizable(e[f])){var g=d.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-b):38==a?g.height=Math.max(0,g.height-b):39==a?g.width+=b:40==a&&(g.height+=b),d.getModel().setGeometry(e[f],g))}}finally{d.getModel().endUpdate()}}else e=
d.getSelectionCell(),f=d.model.getParent(e),g=null,1==d.getSelectionCount()&&(d.model.isVertex(e)&&null!=d.layoutManager&&!d.isCellLocked(e))&&(g=d.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(e),37==a||38==a?d.model.add(f,e,Math.max(0,g-1)):(39==a||40==a)&&d.model.add(f,e,Math.min(d.model.getChildCount(f),g+1))):(f=e=0,37==a?e=-b:38==a?f=-b:39==a?e=b:40==a&&(f=b),d.moveCells(d.getMovableCells(d.getSelectionCells()),e,f))});null!=k&&window.clearTimeout(k);k=window.setTimeout(function(){if(0<
-g.length){d.getModel().beginUpdate();try{for(var a=0;a<g.length;a++)g[a]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var c=this,d=this.editor.graph,e=new mxKeyHandler(d),f=e.isEventIgnored;e.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode&&85!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+g.length){d.getModel().beginUpdate();try{for(var a=0;a<g.length;a++)g[a]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var c=this,d=this.editor.graph,e=new mxKeyHandler(d),f=e.isEventIgnored;e.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
!mxClient.IS_SF)&&f.apply(this,arguments)};e.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};e.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var g=[],k=null,l={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},n=e.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?
function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=l[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),l[a.keyCode],d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),null!=c.hoverIcons&&c.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return n.apply(this,arguments)};e.bindAction=mxUtils.bind(this,function(a,b,c,d){var f=this.actions.get(c);null!=f&&(c=function(){f.isEnabled()&&f.funct()},b?d?e.bindControlShiftKey(a,c):e.bindControlKey(a,c):d?e.bindShiftKey(a,c):e.bindKey(a,c))});var m=e.escape;e.escape=function(a){m.apply(this,arguments)};e.enter=function(){};e.bindControlShiftKey(36,function(){d.exitGroup()});
@@ -2174,7 +2174,7 @@ c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){v
function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<s||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,
arguments)||mxEvent.isShiftDown(a)};var u=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return u.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var A=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(A=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,
function(){this.isEnabled()&&(this.container.style.cursor=A)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){if(!this.isEnabled()&&!a.isConsumed()){var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))}else return z.apply(this,arguments)};var v=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return v.apply(this,arguments);if(null!=
-this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var q=g.getChildAt(e,n),t=this.view.getState(q);if(null!=t&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var p=
+this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var n=g.getChildCount(e),m=0;m<n;m++){var q=g.getChildAt(e,m),t=this.view.getState(q);if(null!=t&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var p=
mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(t=mxUtils.getBoundingBox(t,p));(g.isEdge(q)||g.isVertex(q))&&(t.x>=a&&t.y+t.height<=l&&t.y>=b&&t.x+t.width<=k)&&f.push(q);this.getAllCells(a,b,c,d,q,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var y=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();y=null!=c&&!this.isSelectionEmpty()&&!this.isCellSelected(c.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");
null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=y?this.addSelectionCells(y):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);y=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
@@ -2201,7 +2201,7 @@ match.index)+(null!=f?f:e));d=match.index+e.length}}c.push(b.substring(d));retur
Graph.prototype.connectVertex=function(a,b,c,d,e){var f=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(f.x+=a.geometry.width/2,f.y-=c):b==mxConstants.DIRECTION_SOUTH?(f.x+=a.geometry.width/2,f.y+=a.geometry.height+c):(f.x=b==mxConstants.DIRECTION_WEST?f.x-c:f.x+(a.geometry.width+c),f.y+=a.geometry.height/2);c=this.view.getState(this.model.getParent(a));
var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(c.cell)&&(l=c.x,k=c.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(f.x+=a.parent.geometry.x,f.y+=a.parent.geometry.y);c=mxEvent.isControlDown(d)&&!e?null:this.getCellAt(l+f.x*g,k+f.y*g);this.model.isAncestor(c,a)&&(c=null);for(g=c;null!=g;){if(this.isCellLocked(g)){c=null;break}g=this.model.getParent(g)}null!=c&&(g=this.view.getState(a),l=this.view.getState(c),null!=g&&(null!=l&&mxUtils.intersects(g,l))&&(c=null));
if(e=!mxEvent.isShiftDown(d)||e)b==mxConstants.DIRECTION_NORTH?f.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?f.y+=a.geometry.height/2:f.x=b==mxConstants.DIRECTION_WEST?f.x-a.geometry.width/2:f.x+a.geometry.width/2;null!=c&&!this.isCellConnectable(c)&&(g=this.getModel().getParent(c),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(c=g));if(c==a||this.model.isEdge(c)||!this.isCellConnectable(c))c=null;g=[];this.model.beginUpdate();try{l=c;if(null==l&&e){for(var k=a,n=this.getCellGeometry(a);null!=
-n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);var m=this.view.getState(k),p=null!=m?m.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];n=this.getCellGeometry(l);n.x=f.x-n.width/2;n.y=f.y-n.height/2}n=null;null!=this.layoutManager&&(n=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&e||null==c&&null!=n&&n.constructor==mxStackLayout?
+n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);var m=this.view.getState(k),p=null!=m?m.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];n=this.getCellGeometry(l);null!=n&&(n.x=f.x-n.width/2,n.y=f.y-n.height/2)}n=null;null!=this.layoutManager&&(n=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&e||null==c&&null!=n&&n.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&(null!=d.parent&&d.parent==s.parent)&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==c&&(null!=l&&null!=n&&null!=a.parent&&n.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
q));null!=s&&g.push(s);null==c&&null!=l&&g.push(l);null==l&&null!=s&&s.geometry.setTerminalPoint(f,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),c=a,d=null;null==d&&null!=c;)null!=c.value&&"object"==typeof c.value&&(d=c.hasAttribute(b)?null!=c.getAttribute(b)?c.getAttribute(b):"":null),c=this.model.getParent(c);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
@@ -2278,7 +2278,7 @@ f[1]),2<f.length?"0"!=f[2]:!0))}}catch(g){}return d}if(null!=a.shape)if(null!=a.
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null!=e&&!e.relative&&c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=
function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,g,!0);b.setTerminal(e,f,!1);var k=b.getGeometry(e);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();
-var l=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(m,!0);b.setGeometry(e,k);var n=this.view.getState(e),q=this.view.getState(f),t=this.view.getState(g);if(null!=n){var p=null!=q?this.getConnectionConstraint(n,q,!0):null,x=null!=t?this.getConnectionConstraint(n,t,!1):null;this.setConnectionConstraint(e,f,!0,x);this.setConnectionConstraint(e,g,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
+var l=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);b.setGeometry(e,k);var m=this.view.getState(e),q=this.view.getState(f),t=this.view.getState(g);if(null!=m){var p=null!=q?this.getConnectionConstraint(m,q,!0):null,x=null!=t?this.getConnectionConstraint(m,t,!1):null;this.setConnectionConstraint(e,f,!0,x);this.setConnectionConstraint(e,g,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
2;k.y+=k.height/2-k.width/2;var z=k.width;k.width=k.height;k.height=z;b.setGeometry(e,k);var u=this.view.getState(e);if(null!=u){var r=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==r?r="south":"south"==r?r="west":"west"==r?r="north":"north"==r&&(r="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,r,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&
"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==
typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,
@@ -2302,8 +2302,8 @@ d=d+l;null!=n&&(n=n.clone(),a?n.x=Math.round(d-n.width/2):n.y=Math.round(d-n.hei
d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}for(var d=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),0),c=0;c<a.length;c++)e.add(f,b[c]);return d.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:1;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;d=d?this.view.getBackgroundPageBounds():
f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==d)throw Error(mxResources.get("drawingEmpty"));var k=this.createSvgImageExport(),l=k.drawCellState;k.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&l.apply(this,arguments)};var n=this.view.scale,m=mxUtils.createXmlDocument(),q=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+
a));null==m.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/n;q.setAttribute("width",Math.ceil(d.width*a)+2*c+"px");q.setAttribute("height",Math.ceil(d.height*a)+2*c+"px");q.setAttribute("version","1.1");var t=q;e&&(t=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),t.setAttribute("transform","translate(0.5,0.5)"),
-q.appendChild(t));m.appendChild(q);m=new mxSvgCanvas2D(t);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.translate(Math.floor((c/b-d.x)/n),Math.floor((c/b-d.y)/n));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,g,k,l,m,n,q,t){var x=this.state;if(null!=this.foAltText&&(0==d||0!=x.fontSize&&f.length<5*d/x.fontSize)){var z=this.createElement("text");z.setAttribute("x",Math.round(d/2));z.setAttribute("y",Math.round((e+x.fontSize)/2));z.setAttribute("fill",x.fontColor||"black");
-z.setAttribute("text-anchor","middle");z.setAttribute("font-size",Math.round(x.fontSize)+"px");z.setAttribute("font-family",x.fontFamily);(x.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&z.setAttribute("font-weight","bold");(x.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&z.setAttribute("font-style","italic");(x.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&z.setAttribute("text-decoration","underline");mxUtils.write(z,f);return z}return p.apply(this,
+q.appendChild(t));m.appendChild(q);m=new mxSvgCanvas2D(t);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.translate(Math.floor((c/b-d.x)/n),Math.floor((c/b-d.y)/n));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,g,k,l,n,m,q,t){var x=this.state;if(null!=this.foAltText&&(0==d||0!=x.fontSize&&f.length<5*d/x.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(d/2));u.setAttribute("y",Math.round((e+x.fontSize)/2));u.setAttribute("fill",x.fontColor||"black");
+u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(x.fontSize)+"px");u.setAttribute("font-family",x.fontFamily);(x.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(x.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(x.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,f);return u}return p.apply(this,
arguments)};c=this.backgroundImage;null!=c&&(e=n/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(d,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=g;k.drawState(this.getView().getState(this.model.root),m);return q};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=
function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=
@@ -2311,8 +2311,8 @@ b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=
"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,
b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
-return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<
-c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,
+c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=
a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}(1!=a.nodeType||"BR"!==a.nodeName&&null==a.firstChild)&&(3!=a.nodeType||0==mxUtils.trim(mxUtils.getTextContent(a)).length)?a.parentNode.removeChild(a):(3==
@@ -2348,8 +2348,8 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==
a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){u.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&(this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount())&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&
(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&
-(null!=this.currentX&&null!=this.currentY)&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g)));this.reset();if(c){if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<k.length;c++)if(this.graph.isCellMovable(k[c])){var l=this.graph.view.getState(k[c]),m=this.graph.getCellGeometry(k[c]);
-null!=l&&null!=m&&(m=m.clone(),m.translate(f,g),this.graph.model.setGeometry(k[c],m))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-
+(null!=this.currentX&&null!=this.currentY)&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g)));this.reset();if(c){if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<k.length;c++)if(this.graph.isCellMovable(k[c])){var l=this.graph.view.getState(k[c]),n=this.graph.getCellGeometry(k[c]);
+null!=l&&null!=n&&(n=n.clone(),n.translate(f,g),this.graph.model.setGeometry(k[c],n))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-
c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<
this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),
this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var A=mxRubberband.prototype.reset;
@@ -2378,7 +2378,7 @@ a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultV
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function u(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function D(){mxShape.call(this)}function y(){mxShape.call(this)}function E(){mxEllipse.call(this)}function C(){mxShape.call(this)}
function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function L(){mxShape.call(this)}function K(){mxShape.call(this)}function R(){mxCylinder.call(this)}function T(){mxDoubleEllipse.call(this)}function aa(){mxDoubleEllipse.call(this)}function V(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxActor.call(this)}function N(){mxRectangleShape.call(this)}function H(){mxActor.call(this)}
function Z(){mxActor.call(this)}function M(){mxActor.call(this)}function I(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function Q(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}
-function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function na(){mxActor.call(this)}function va(a,b,c,d,e,f,g,k,l,m){g+=l;var n=d.clone();d.x-=e*(2*g+l);d.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){a.ellipse(n.x-e-g,n.y-f-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
+function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function na(){mxActor.call(this)}function va(a,b,c,d,e,f,g,k,l,n){g+=l;var m=d.clone();d.x-=e*(2*g+l);d.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var sa=Math.tan(mxUtils.toRadians(30)),ma=(0.5-sa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/sa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,0.25*b);a.lineTo(0.5*b,b*ma);a.lineTo(b,0.25*b);a.lineTo(0.5*b,(0.5-ma)*b);a.lineTo(0,
0.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(0.5+sa));f?(a.moveTo(0,0.25*b),a.lineTo(0.5*b,(0.5-ma)*b),a.lineTo(b,0.25*b),a.moveTo(0.5*b,(0.5-ma)*b),a.lineTo(0.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,0.25*b),a.lineTo(0.5*b,b*ma),a.lineTo(b,0.25*b),a.lineTo(b,0.75*b),a.lineTo(0.5*b,(1-ma)*b),a.lineTo(0,0.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=
c;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,
@@ -2394,7 +2394,7 @@ mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),
0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=r;mxUtils.extend(s,mxActor);s.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=s;q.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,
arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),e=Math.sqrt(c*c+d*d);if(2>e)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(e/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},
-l=k(a-this.lastX)*c/f,k=k(b-this.lastY)*d/f,c=c/e,d=d/e,e=0;e<f;e++){var m=l*e+this.lastX,n=k*e+this.lastY,q=(Math.random()-0.5)*g;this.originalLineTo.call(this.canvas,m-q*d,n-q*c)}this.originalLineTo.call(this.canvas,a,b)}}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=
+l=k(a-this.lastX)*c/f,k=k(b-this.lastY)*d/f,c=c/e,d=d/e,e=0;e<f;e++){var n=l*e+this.lastX,m=k*e+this.lastY,q=(Math.random()-0.5)*g;this.originalLineTo.call(this.canvas,n-q*d,m-q*c)}this.originalLineTo.call(this.canvas,a,b)}}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=
this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var za=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&("0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle)&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Aa=mxRectangleShape.prototype.isHtmlAllowed;
mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Aa.apply(this,arguments)};var Ba=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ba.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=
mxConstants.NONE){if(!f&&(null==this.fill||this.fill==mxConstants.NONE))a.pointerEvents=!1;a.begin();this.isRounded?(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,
@@ -2405,8 +2405,8 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPo
2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,0.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,0.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=u;mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.plus=A;var wa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){wa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),wa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};z.prototype.paintForeground=function(a,b,c,
-d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g=null;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var k=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+
-f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSpacing"];null!=t&&(q+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*t);var t=b,p=c,t=k==mxConstants.ALIGN_CENTER?t+(d-m)/2:k==mxConstants.ALIGN_RIGHT?t+(d-m-q):t+q,p=l==mxConstants.ALIGN_MIDDLE?p+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?p+(e-n-q):p+q;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,t,p,m,n);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
+d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g=null;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var k=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],n=this.style["symbol"+f+"Width"],m=this.style["symbol"+
+f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSpacing"];null!=t&&(q+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*t);var t=b,p=c,t=k==mxConstants.ALIGN_CENTER?t+(d-n)/2:k==mxConstants.ALIGN_RIGHT?t+(d-n-q):t+q,p=l==mxConstants.ALIGN_MIDDLE?p+(e-m)/2:l==mxConstants.ALIGN_BOTTOM?p+(e-m-q):p+q;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,t,p,n,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.ext=z;mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=v;mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,
e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=D;mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};y.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();
a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=y;mxUtils.extend(E,mxEllipse);E.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=E;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,
@@ -2442,15 +2442,15 @@ this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),"1"==mxUtils
mxCellRenderer.prototype.defaultShapes.partialRectangle=W;mxUtils.extend(ga,mxEllipse);ga.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=ga;mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,
e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ka;mxUtils.extend(ca,mxActor);ca.prototype.size=0.2;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);
a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=ca;mxUtils.extend(na,mxActor);na.prototype.size=0.25;na.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=na;mxMarker.addMarker("dash",
-function(a,b,c,d,e,f,g,k,l,m){var n=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-n/2-q/2,d.y-q/2+n/2);a.lineTo(d.x+q/2-3*n/2,d.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,k,l,m){var n=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-n/2-q/2,d.y-q/2+n/2);a.lineTo(d.x+q/2-3*n/2,d.y-3*q/2-n/2);a.moveTo(d.x-n/2+q/2,d.y-q/2-n/2);a.lineTo(d.x-q/2-3*n/2,d.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",va);mxMarker.addMarker("circlePlus",
-function(a,b,c,d,e,f,g,k,l,n){var m=d.clone(),q=va.apply(this,arguments),t=e*(g+2*l),p=f*(g+2*l);return function(){q.apply(this,arguments);a.begin();a.moveTo(m.x-e*l,m.y-f*l);a.lineTo(m.x-2*t+e*l,m.y-2*p+f*l);a.moveTo(m.x-t-p+f*l,m.y-p+t-e*l);a.lineTo(m.x+p-t-f*l,m.y-p-t+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,k,l,m){b=1.118*e*l;c=1.118*f*l;e*=g+l;f*=g+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);k?a.lineTo(n.x-
-e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,k,l,n,m){f*=k+n;g*=k+n;var q=e.clone();return function(){b.begin();b.moveTo(q.x,q.y);l?b.lineTo(q.x-f-g/a,q.y-g+f/a):b.lineTo(q.x+g/a-f,q.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
+function(a,b,c,d,e,f,g,k,l,n){var m=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-m/2-q/2,d.y-q/2+m/2);a.lineTo(d.x+q/2-3*m/2,d.y-3*q/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,k,l,n){var m=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-m/2-q/2,d.y-q/2+m/2);a.lineTo(d.x+q/2-3*m/2,d.y-3*q/2-m/2);a.moveTo(d.x-m/2+q/2,d.y-q/2-m/2);a.lineTo(d.x-q/2-3*m/2,d.y-3*q/2+m/2);a.stroke()}});mxMarker.addMarker("circle",va);mxMarker.addMarker("circlePlus",
+function(a,b,c,d,e,f,g,k,l,m){var n=d.clone(),q=va.apply(this,arguments),t=e*(g+2*l),p=f*(g+2*l);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*t+e*l,n.y-2*p+f*l);a.moveTo(n.x-t-p+f*l,n.y-p+t-e*l);a.lineTo(n.x+p-t-f*l,n.y-p-t+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,k,l,n){b=1.118*e*l;c=1.118*f*l;e*=g+l;f*=g+l;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);k?a.lineTo(m.x-
+e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,k,l,m,n){f*=k+m;g*=k+m;var q=e.clone();return function(){b.begin();b.moveTo(q.x,q.y);l?b.lineTo(q.x-f-g/a,q.y-g+f/a):b.lineTo(q.x+g/a-f,q.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},la=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100,e=null!=b?b:c.height/8;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*d),c.y+e)},function(a,b,c){a=Math.min(50,Math.max(0,
100*(a.width-b.x+a.x)/Math.min(a.width,a.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(a)})},ja=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b}},ia=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+0.75*c*b.width,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,
Math.min(a,(c.x-b.x)/(0.75*b.width)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(la(b));return c}},pa=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},ta=function(a,b,c){return function(d){var e=
[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},xa=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",M.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",M.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(b.y+b.height/2-c.y)/b.height)));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},oa=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,k=a.view.translate,l=a.view.scale,n=c?f[0]:f[g],m=c?f[1]:f[g-
-1],q=m.x-n.x,t=m.y-n.y,p=Math.sqrt(q*q+t*t);return fa(a,b,function(a){a=d.call(this,p,q/p,t/p,n,m);return new mxPoint(a.x/l-k.x,a.y/l-k.y)},function(a,b,c){a=Math.sqrt(q*q+t*t);b.x=(b.x+k.x)*l;b.y=(b.y+k.y)*l;e.call(this,a,q/a,t/a,n,m,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,k){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*
+"arrowWidth",M.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",M.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(b.y+b.height/2-c.y)/b.height)));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},oa=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,k=a.view.translate,l=a.view.scale,m=c?f[0]:f[g],n=c?f[1]:f[g-
+1],q=n.x-m.x,t=n.y-m.y,p=Math.sqrt(q*q+t*t);return fa(a,b,function(a){a=d.call(this,p,q/p,t/p,m,n);return new mxPoint(a.x/l-k.x,a.y/l-k.y)},function(a,b,c){a=Math.sqrt(q*q+t*t);b.x=(b.x+k.x)*l;b.y=(b.y+k.y)*l;e.call(this,a,q/a,t/a,m,n,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,k){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*
b)/a.view.scale-c})},ua={link:function(a){return[ya(a,!0,10),ya(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(oa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+
c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,k,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(oa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*
@@ -2475,8 +2475,8 @@ mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);t
function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,2*((b.y-a.y)/a.height)))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:pa(x.prototype.size,!0),hexagon:pa(u.prototype.size,!0,0.5),curlyBracket:pa(r.prototype.size,!1),display:pa(na.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(0.5,k.prototype.size,!0),loopLimit:ta(0.5,ba.prototype.size,!0),trapezoid:ia(0.5),parallelogram:ia(1)};Graph.createHandle=fa;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
ua[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=ua[this.state.style.shape];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var qa=new mxPoint(1,0),ra=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ja=Math.cos(ia),ia=Math.sin(ia),qa=mxUtils.getRotatedPoint(qa,ja,ia),ia=mxUtils.toRadians(-150),ja=Math.cos(ia),ia=Math.sin(ia),
-ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,n=qa.y,m=ra.x,q=ra.y,t="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){var p=k;a=function(a,b,c){a-=p.x;var d=
-b-p.y;b=(q*a-m*d)/(l*q-n*m);a=(n*a-l*d)/(n*m-l*q);t?(c&&(p=new mxPoint(p.x+l*b,p.y+n*b),e.push(p)),p=new mxPoint(p.x+m*a,p.y+q*a)):(c&&(p=new mxPoint(p.x+m*a,p.y+q*a),e.push(p)),p=new mxPoint(p.x+l*b,p.y+n*b));e.push(p)};null==d&&(d=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
+ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,m=qa.y,n=ra.x,q=ra.y,t="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){var p=k;a=function(a,b,c){a-=p.x;var d=
+b-p.y;b=(q*a-n*d)/(l*q-m*n);a=(m*a-l*d)/(m*n-l*q);t?(c&&(p=new mxPoint(p.x+l*b,p.y+m*b),e.push(p)),p=new mxPoint(p.x+n*a,p.y+q*a)):(c&&(p=new mxPoint(p.x+n*a,p.y+q*a),e.push(p)),p=new mxPoint(p.x+l*b,p.y+m*b));e.push(p)};null==d&&(d=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Da.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,
0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0.5,
0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
@@ -2582,19 +2582,19 @@ null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].g
else throw{message:mxResources.get("notADiagramFile")};null!=a&&!b&&(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(a=mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(d))).documentElement));if(null!=a&&"mxGraphModel"!=a.nodeName&&(!b||"mxfile"!=a.nodeName))a=null;return a};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement);
return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(d){}return!1};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=d.apply(this,arguments);if(null==b)try{var c=a.indexOf("\x26lt;mxfile ");if(0<=c){var e=a.lastIndexOf("\x26lt;/mxfile\x26gt;");e>c&&(b=a.substring(c,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(a),g=this.editor.extractGraphModel(f.documentElement),
b=null!=g?mxUtils.getXml(g):""}catch(k){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('\x3cmeta charset\x3d"utf-8"\x3e');0<=b&&(a=a.slice(0,b)+'\x3cmeta charset\x3d"utf-8"/\x3e'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
-b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if(1<d.length||"1"==urlParams.pages){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);
-this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),1<a.length||"1"==urlParams.pages)){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-
-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};var e=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=
-a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var b=a.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==a.nodeName){b=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==b||""==b)){if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=
-c){var d=new mxCodec(c.ownerDocument);d.decode(c,this.graph.getStylesheet())}}else b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(d=new mxCodec(c.ownerDocument),d.decode(c,this.graph.getStylesheet())));this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");b=a.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,
-b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}e.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&
-b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;
-g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
-Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);
-b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,
-d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,
-620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
+b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("1"==urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=
+a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=
+function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"1"==urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",
+[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};
+var e=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var b=a.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==a.nodeName){b=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==b||""==b)){if(c=null!=this.graph.themes?this.graph.themes["default-old"]:
+mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var d=new mxCodec(c.ownerDocument);d.decode(c,this.graph.getStylesheet())}}else b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(d=new mxCodec(c.ownerDocument),d.decode(c,this.graph.getStylesheet())));this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");b=a.getAttribute("backgroundImage");
+null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}e.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=f.apply(this,
+arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=
+38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");
+b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
+"none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=
+function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);
return a};EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,
0))};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createPngDataUri=function(a,b){var c=a.toDataURL("image/png");if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/png"))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
@@ -2640,7 +2640,7 @@ c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.max
a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<R.length;d++){var e=R[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,q=p.indexOf(","),
r=atob(p.substring(q+1)),z=mxUtils.parseXml(r),r=z.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&("\x3c"!=D.charAt(0)&&"%"!=D.charAt(0))&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===D.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(p.substring(0,
q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}p=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(p,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*
-v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var G=new Image;G.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,G.width,G.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var L=new Image;L.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,L.width,L.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,p){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var q=!l||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/n,d/p));return e(g,k.type,b+f*s,c+f*s,Math.round(n*q),Math.round(p*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(aa)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=
function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=
@@ -2649,7 +2649,7 @@ k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCod
d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
-var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
@@ -2692,42 +2692,43 @@ d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.lengt
else if("\x3cmxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,
9)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,b){var c=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename))});null!=a&&0<a.length&&(null!=this.getCurrentFile()&&!this.isDiagramEmpty()?(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,c)):c())};EditorUi.prototype.initializeEmbedMode=function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";this.editor.graph.setEnabled(!1);if((window.opener||window.parent)!=window)("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.diagramContainer.style.visibility=
-"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(a=mxUtils.parseXml(a),this.editor.setGraphXml(a.documentElement),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&
-(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
+"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==
+this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
this.editor.setStatus(mxResources.get(urlParams.modified)))});this.editor.graph.model.addListener(mxEvent.CHANGE,c);mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){var e=c.data;if("json"==urlParams.proto){e=JSON.parse(e);if("dialog"==e.action){this.showError(null!=e.titleKey?mxResources.get(e.titleKey):e.title,null!=e.messageKey?mxResources.get(e.messageKey):e.message,null!=e.buttonKey?mxResources.get(e.buttonKey):e.button);null!=e.modified&&(this.editor.modified=e.modified);return}if("template"==
e.action){this.spinner.stop();var f=new NewDialog(this,!1,!1,mxUtils.bind(this,function(b){a(b||"",c,null!=b)}));this.showDialog(f.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));f.init();return}if("status"==e.action){null!=e.messageKey?this.editor.setStatus(mxResources.get(e.messageKey)):null!=e.message&&this.editor.setStatus(e.message);null!=e.modified&&(this.editor.modified=e.modified);return}if("spinner"==e.action){var g=null!=e.messageKey?mxResources.get(e.messageKey):
e.message;null!=e.show&&!e.show?this.spinner.stop():this.spinner.spin(document.body,g);return}if("export"==e.action){if("png"==e.format||"xmlpng"==e.format){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin)){var k=null!=e.xml?e.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=e.format;b.xml=encodeURIComponent(k);b.data="data:image/png;base64,"+
-a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});this.isExportToCanvas()?this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));l(a.substring(a.lastIndexOf(",")+1))})):(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,
-function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&(f=mxUtils.parseXml(e.xml),this.editor.setGraphXml(f.documentElement));g=this.createLoadMessage("export");if("html"==e.format||"html2"==e.format)k=this.editor.getGraphXml(),g.data="html2"==e.format?this.getHtml2(k,this.editor.graph):this.getHtml(k,this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=mxUtils.getXml(this.editor.getGraphXml());g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(a);
-d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(mxUtils.getXml(this.editor.getGraphXml()),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),"*")}return}"load"==
-e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(f)),
-e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(m){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&(f=mxUtils.bind(this,function(a,b){var c=mxUtils.getXml(this.editor.getGraphXml()),
-d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",
-f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";
-a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding=
-"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);
-a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c=
-"tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
-this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
-a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,
-arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&
-!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=
-b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
-"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=
-null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);
-if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=
-[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+
-"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=
-[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];
-mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];
-mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];
-mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+
-"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),n=m.getGlobalVariable,p=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:n.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(p.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");
+"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);l(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&this.setFileData(e.xml);g=this.createLoadMessage("export");if("html2"==e.format||"html"==e.format&&("1"==urlParams.pages||null!=this.pages&&1<this.pages.length))f=this.getXmlFileData(),g.xml=mxUtils.getXml(f),g.data=this.getFileData(null,null,!0,null,null,null,f),g.format=e.format;else if("html"==e.format)k=this.editor.getGraphXml(),g.data=this.getHtml(k,
+this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=this.getFileData(!0);g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();g.data=this.createSvgDataUri(a);d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),
+"*")}return}"load"==e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop=
+"6px"),this.buttonContainer.appendChild(f)),e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"function"===typeof e.charAt&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(r){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&
+(f=mxUtils.bind(this,function(a,b){var c="1"==urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml()),d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",
+f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&
+(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
+"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};
+EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),
+c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),
+f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
+!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
+this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=
+function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",
+a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=
+new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=
+[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
+[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}
RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
@@ -2788,20 +2789,20 @@ d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.
b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),e=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(k,0):k();this.positionGraph=function(){b=this.graph.getGraphBounds();e=null;k()}};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
GraphViewer.prototype.showLayers=function(a,b){var c=this.graphConfig.layers;if(null!=c||null!=b)if(c=null!=c?c.split(" "):null,null!=b||0<c.length){var d=null!=b?b.getModel():null,e=a.getModel();e.beginUpdate();try{for(var f=e.getChildCount(e.root),g=0;g<f;g++)e.setVisible(e.getChildAt(e.root,g),null!=b?d.isVisible(d.getChildAt(d.root,g)):!1);if(null==d)for(g=0;g<c.length;g++)e.setVisible(e.getChildAt(e.root,parseInt(c[g])),!0)}finally{e.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,d,e){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=d&&f.setAttribute("title",d);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==e||e?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);c.appendChild(f);n++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var c=b.ownerDocument.createElement("div");c.style.position="absolute";c.style.overflow="hidden";c.style.boxSizing="border-box";
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);c.appendChild(f);m++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var c=b.ownerDocument.createElement("div");c.style.position="absolute";c.style.overflow="hidden";c.style.boxSizing="border-box";
c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.backgroundColor="#eee";c.style.height=this.toolbarHeight+"px";this.toolbar=c;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(c.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(c,30);var d=null,e=null,f=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(c,
0);d=null;e=window.setTimeout(mxUtils.bind(this,function(){c.style.display="none";e=null}),100)}),a||200)}),g=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);c.style.display="";mxUtils.setOpacity(c,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(g(30),f())}));mxEvent.addListener(c,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){g(100)}));mxEvent.addListener(c,"mousemove",mxUtils.bind(this,function(a){g(100);mxEvent.consume(a)}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var k=this.graph,l=k.getTolerance();k.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&(Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l)&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}var n=0,m=this.toolbarItems,p=[];"mxfile"==this.xmlNode.nodeName&&(p=this.xmlNode.getElementsByTagName("diagram"));for(var r=null,
-s=null,q=0;q<m.length;q++){var t=m[q];if("pages"==t&&1<p.length)s=b.ownerDocument.createElement("div"),s.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",mxUtils.write(s,this.currentPage+1+" / "+p.length),mxUtils.setOpacity(s,70),t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,p.length);s.innerHTML="";mxUtils.write(s,this.currentPage+1+" / "+p.length);
+k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&(Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l)&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}var n=this.toolbarItems,m=0,p=[];"mxfile"==this.xmlNode.nodeName&&(p=this.xmlNode.getElementsByTagName("diagram"));for(var r=null,
+s=null,q=0;q<n.length;q++){var t=n[q];if("pages"==t&&1<p.length)s=b.ownerDocument.createElement("div"),s.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",mxUtils.write(s,this.currentPage+1+" / "+p.length),mxUtils.setOpacity(s,70),t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,p.length);s.innerHTML="";mxUtils.write(s,this.currentPage+1+" / "+p.length);
this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(p[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page"),t.style.borderRightStyle="none",t.style.paddingLeft="0px",t.style.paddingRight="0px",c.appendChild(s),t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,p.length);s.innerHTML="";mxUtils.write(s,this.currentPage+1+" / "+p.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(p[this.currentPage]))).documentElement)}),
Editor.nextImage,mxResources.get("nextPage")||"Next Page"),t.style.paddingLeft="0px",t.style.paddingRight="0px";else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,
this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var x=this.graph.getModel(),u=a(mxUtils.bind(this,function(a){if(null!=r)r.parentNode.removeChild(r),r=null;else{r=this.graph.createLayersDialog();mxEvent.addListener(r,"mouseleave",function(){r.parentNode.removeChild(r);r=null});a=u.getBoundingClientRect();r.style.width="140px";r.style.padding="2px 0px 2px 0px";r.style.border="1px solid #d0d0d0";r.style.backgroundColor=
"#eee";r.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";r.style.fontSize="11px";mxUtils.setOpacity(r,80);var b=mxUtils.getDocumentScrollOrigin(document);r.style.left=b.x+a.left+"px";r.style.top=b.y+a.bottom+"px";document.body.appendChild(r)}}),Editor.layersImage,mxResources.get("layers")||"Layers");x.addListener(mxEvent.CHANGE,function(){u.style.display=1<x.getChildCount(x.root)?"inline-block":"none"});u.style.display=1<x.getChildCount(x.root)?"inline-block":"none"}}else"lightbox"==
-t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",
-m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var A=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width=
+t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(n=b.ownerDocument.createElement("div"),n.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",
+n.setAttribute("title",this.graphConfig.title),mxUtils.write(n,this.graphConfig.title),mxUtils.setOpacity(n,70),c.appendChild(n));this.minToolbarWidth=34*m;var A=b.style.border,n=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&
-(null!=c.parentNode&&c.parentNode.removeChild(c),null!=r&&(r.parentNode.removeChild(r),r=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==r)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
+(null!=c.parentNode&&c.parentNode.removeChild(c),null!=r&&(r.parentNode.removeChild(r),r=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==r)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",n)};
GraphViewer.prototype.addClickHandler=function(a,b){var c=a.isBlankLink,d=this.graphConfig;a.isBlankLink=function(a){return"self"!=d.target&&c.apply(this,arguments)};a.addClickHandler(this.graphConfig.highlight,function(a){null!=b&&b.destroy()},mxUtils.bind(this,function(a){null==b&&(this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(a)||0==this.toolbarItems.length))&&this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"\x26layers\x3d1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://test.draw.io/?dev\x3d1\x26client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26close\x3d1\x26edit\x3d_blank"+
a)}else window.drawdata=this.xml,window.open("https://test.draw.io/?dev\x3d1\x26client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26edit\x3d_blank"+a)}else this.showLocalLightbox()};
diff --git a/war/js/atlas.min.js b/war/js/atlas.min.js
index a2111c86..5975ac66 100644
--- a/war/js/atlas.min.js
+++ b/war/js/atlas.min.js
@@ -3,8 +3,8 @@
d[e])}return b}function g(b){this.opts=e(b||{},g.defaults,r)}function k(){function d(b,e){return a("\x3c"+b+' xmlns\x3d"urn:schemas-microsoft.com:vml" class\x3d"spin-vml"\x3e',e)}p.addRule(".spin-vml","behavior:url(#default#VML)");g.prototype.lines=function(a,e){function f(){return b(d("group",{coordsize:m+" "+m,coordorigin:-l+" "+-l}),{width:m,height:m})}function g(a,k,m){c(n,c(b(f(),{rotation:360/e.lines*a+"deg",left:~~k}),c(b(d("roundrect",{arcsize:e.corners}),{width:l,height:e.width,left:e.radius,
top:-e.width>>1,filter:m}),d("fill",{color:"string"==typeof e.color?e.color:e.color[a%e.color.length],opacity:e.opacity}),d("stroke",{opacity:0}))))}var k,l=e.length+e.width,m=2*l;k=2*-(e.width+e.length)+"px";var n=b(f(),{position:"absolute",top:k,left:k});if(e.shadow)for(k=1;k<=e.lines;k++)g(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(k=1;k<=e.lines;k++)g(k);return c(a,n)};g.prototype.opacity=function(b,a,d,e){b=b.firstChild;e=e.shadow&&
e.lines||0;b&&a+e<b.childNodes.length&&(b=b.childNodes[a+e],b=b&&b.firstChild,b=b&&b.firstChild,b&&(b.opacity=d))}}var l,m=["webkit","Moz","ms","O"],n={},p=function(){var b=a("style",{type:"text/css"});return c(document.getElementsByTagName("head")[0],b),b.sheet||b.styleSheet}(),r={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:0.25,fps:20,zIndex:2E9,className:"spinner",top:"50%",left:"50%",position:"absolute"};g.defaults={};e(g.prototype,
-{spin:function(d){this.stop();var e=this,c=e.opts,f=e.el=b(a(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex});c.radius+c.length+c.width;if(d&&(d.insertBefore(f,d.firstChild||null),b(f,{left:c.left,top:c.top})),f.setAttribute("role","progressbar"),e.lines(f,e.opts),!l){var g,k=0,m=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,r=(1-c.opacity)/(p*c.trail/100),s=p/c.lines;!function F(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*s)%p*r,c.opacity),e.opacity(f,
-b*c.direction+m,g,c);e.timeout=e.el&&setTimeout(F,~~(1E3/n))}()}return e},stop:function(){var b=this.el;return b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=void 0),this},lines:function(d,e){function g(d,c){return b(a(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:d,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*m+e.rotate)+"deg) translate("+e.radius+"px,0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(var k,
+{spin:function(d){this.stop();var e=this,c=e.opts,f=e.el=b(a(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex});c.radius+c.length+c.width;if(d&&(d.insertBefore(f,d.firstChild||null),b(f,{left:c.left,top:c.top})),f.setAttribute("role","progressbar"),e.lines(f,e.opts),!l){var g,k=0,m=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,r=(1-c.opacity)/(p*c.trail/100),s=p/c.lines;!function G(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*s)%p*r,c.opacity),e.opacity(f,
+b*c.direction+m,g,c);e.timeout=e.el&&setTimeout(G,~~(1E3/n))}()}return e},stop:function(){var b=this.el;return b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=void 0),this},lines:function(d,e){function g(d,c){return b(a(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:d,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*m+e.rotate)+"deg) translate("+e.radius+"px,0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(var k,
m=0,n=(e.lines-1)*(1-e.direction)/2;m<e.lines;m++)k=b(a(),{position:"absolute",top:1+~(e.width/2)+"px",transform:e.hwaccel?"translate3d(0,0,0)":"",opacity:e.opacity,animation:l&&f(e.opacity,e.trail,n+m*e.direction,e.lines)+" "+1/e.speed+"s linear infinite"}),e.shadow&&c(k,b(g("#000","0 0 4px #000"),{top:"2px"})),c(d,c(k,g("string"==typeof e.color?e.color:e.color[m%e.color.length],"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(b,a,d){a<b.childNodes.length&&(b.childNodes[a].style.opacity=d)}});
var s=b(a("group"),{behavior:"url(#default#VML)"});return!d(s,"transform")&&s.adj?k():l=d(s,"animation"),g});
(function(){var a=void 0,c=!0,f=null,d=!1,b=["aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke yellow yellowgreen".split(" "),"all-scroll col-resize crosshair default e-resize hand help move n-resize ne-resize no-drop not-allowed nw-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait".split(" "),
@@ -43,19 +43,19 @@ this.l);f!==this.o&&b.push("#",this.o);return b.join("")};g.prototype.T=function
function(){return this.h&&decodeURIComponent(this.h)};g.prototype.ca=function(b){if(b){b=Number(b);if(b!==(b&65535))throw Error("Bad port number "+b);this.h=""+b}else this.h=f};g.prototype.$=function(){return f!==this.h};g.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};g.prototype.G=function(b){b?(b=""+b,this.g=!this.k||/^\//.test(b)?b:"/"+b):this.g=f};g.prototype.O=function(b){this.l=b?b:f};g.prototype.aa=function(){return f!==this.l};g.prototype.ba=function(b){if("object"===typeof b&&
!(b instanceof Array)&&(b instanceof Object||"[object Array]"!==Object.prototype.toString.call(b))){var a=[],d=-1,e;for(e in b){var c=b[e];"string"===typeof c&&(a[++d]=e,a[++d]=c)}b=a}for(var a=[],d="",f=0;f<b.length;)e=b[f++],c=b[f++],a.push(d,encodeURIComponent(e.toString())),d="\x26",c&&a.push("\x3d",encodeURIComponent(c.toString()));this.l=a.join("")};g.prototype.fa=function(b){this.o=b?b:f};g.prototype.Z=function(){return f!==this.o};var n=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
q=/[#\/\?@]/g,p=/[\#\?]/g;g.parse=b;g.create=function(b,e,c,k,l,m,n){b=new g(a(b,q),a(e,q),"string"==typeof c?encodeURIComponent(c):f,0<k?k.toString():f,a(l,p),f,"string"==typeof n?encodeURIComponent(n):f);m&&("string"===typeof m?b.O(m.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(m));return b};g.N=c;g.ma=e;g.ha={ua:function(a){return/\.html$/.test(b(a).U())?"text/html":"application/javascript"},N:function(a,d){return a?c(b(a),b(d)).toString():""+d}};return g}();"undefined"!==typeof window&&(window.URI=
-m);var n=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(z,g)+'")':'url("about:blank")'}function g(b){return B[b]}function k(b,a){return b?m.ha.N(b,a):a}function t(b,a,d){if(!d)return f;var e=(""+b).match(C);return e&&(!e[1]||G.test(e[1]))?d(b,a):f}function D(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var z=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},C=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function N(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,v=q&1536,r=NaN,s=0,F=0;s<c.length;++s){var C=c[s].toLowerCase(),A=C.charCodeAt(0),G,B,z,H,V,ia;if(32===A)C="";else if(34===A)C=16===p?f?b(t(k(g,l(c[s].substring(1,C.length-1))),d,f)):"":q&8&&!(p&p-1)?C:"";else if("inherit"!==C){if(V=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
-{};for(var aa=V.length;0<=--aa;)for(var fa=V[aa],ja=fa.length;0<=--ja;)ea[fa[ja]]=a;ea=n.cssLitMap=ea}V=ea}else V=a;if(!(ia=V,ia[D(C)]===a))if(35===A&&/^#(?:[0-9a-f]{3}){1,2}$/.test(C))C=q&2?C:"";else if(48<=A&&57>=A)C=q&1?C:"";else if(G=C.charCodeAt(1),B=C.charCodeAt(2),z=48<=G&&57>=G,H=48<=B&&57>=B,43===A&&(z||46===G&&H))C=q&1?(z?"":"0")+C.substring(1):"";else if(45===A&&(z||46===G&&H))C=q&4?(z?"-":"-0")+C.substring(1):q&1?"0":"";else if(46===A&&z)C=q&1?"0"+C:"";else if('url("'===C.substring(0,
+m);var n=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(z,g)+'")':'url("about:blank")'}function g(b){return B[b]}function k(b,a){return b?m.ha.N(b,a):a}function t(b,a,d){if(!d)return f;var e=(""+b).match(C);return e&&(!e[1]||F.test(e[1]))?d(b,a):f}function D(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var z=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},C=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function N(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,v=q&1536,r=NaN,s=0,G=0;s<c.length;++s){var C=c[s].toLowerCase(),A=C.charCodeAt(0),F,B,z,I,V,ia;if(32===A)C="";else if(34===A)C=16===p?f?b(t(k(g,l(c[s].substring(1,C.length-1))),d,f)):"":q&8&&!(p&p-1)?C:"";else if("inherit"!==C){if(V=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
+{};for(var aa=V.length;0<=--aa;)for(var fa=V[aa],ja=fa.length;0<=--ja;)ea[fa[ja]]=a;ea=n.cssLitMap=ea}V=ea}else V=a;if(!(ia=V,ia[D(C)]===a))if(35===A&&/^#(?:[0-9a-f]{3}){1,2}$/.test(C))C=q&2?C:"";else if(48<=A&&57>=A)C=q&1?C:"";else if(F=C.charCodeAt(1),B=C.charCodeAt(2),z=48<=F&&57>=F,I=48<=B&&57>=B,43===A&&(z||46===F&&I))C=q&1?(z?"":"0")+C.substring(1):"";else if(45===A&&(z||46===F&&I))C=q&4?(z?"-":"-0")+C.substring(1):q&1?"0":"";else if(46===A&&z)C=q&1?"0"+C:"";else if('url("'===C.substring(0,
5))C=f&&q&16?b(t(k(g,c[s].substring(5,C.length-2)),d,f)):"";else if("("===C.charAt(C.length-1))a:{V=c;ea=s;C=1;aa=ea+1;for(A=V.length;aa<A&&C;)fa=V[aa++],C+=")"===fa?-1:/^[^"']*\($/.test(fa);if(!C){C=V[ea].toLowerCase();A=D(C);V=V.splice(ea,aa-ea,"");ea=n.cssFns;aa=0;for(fa=ea.length;aa<fa;++aa)if(ea[aa].substring(0,A.length)==A){V[0]=V[V.length-1]="";N(ea[aa],V,f,g);C=C+V.join(" ")+")";break a}}C=""}else C=v&&/^-?[a-z_][\w\-]*$/.test(C)&&!/__$/.test(C)?m&&512===v?c[s]+m:1024===v&&e[C]&&"number"===
-typeof e[C].oa?C:"":/^\w+$/.test(C)&&64===p&&q&8?r+1===F?(c[r]=c[r].substring(0,c[r].length-1)+" "+C+'"',""):(r=F,'"'+C+'"'):""}C&&(c[F++]=C)}1===F&&'url("about:blank")'===c[0]&&(F=0);c.length=F}}}();var F=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
-H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(q,p){function t(e,f,g){var k,n,q,p,u,s=c;k="";if(e<f)if(u=b[e],"*"===u)++e,k=u;else if(/^[a-zA-Z]/.test(u)&&(n=m(u.toLowerCase(),[])))"tagName"in n&&(u=n.tagName),++e,k=u;for(p=q=n="";s&&e<f;++e)if(u=b[e],"#"===u.charAt(0))/^#_|__$|[^\w#:\-]/.test(u)?s=d:n+=u+l;else if("."===u)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(u=b[e])&&!/^_|__$/.test(u)?n+="."+u:s=d;else if(e+1<f&&"["===b[e]){++e;var x=b[e++].toLowerCase();u=v.m[k+"::"+x];u!==+u&&(u=v.m["*::"+
+typeof e[C].oa?C:"":/^\w+$/.test(C)&&64===p&&q&8?r+1===G?(c[r]=c[r].substring(0,c[r].length-1)+" "+C+'"',""):(r=G,'"'+C+'"'):""}C&&(c[G++]=C)}1===G&&'url("about:blank")'===c[0]&&(G=0);c.length=G}}}();var G=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
+I={};I["\x3e"]=I["+"]=I["~"]=I;p=function(b,a,e){function g(q,p){function t(e,f,g){var k,n,q,p,u,s=c;k="";if(e<f)if(u=b[e],"*"===u)++e,k=u;else if(/^[a-zA-Z]/.test(u)&&(n=m(u.toLowerCase(),[])))"tagName"in n&&(u=n.tagName),++e,k=u;for(p=q=n="";s&&e<f;++e)if(u=b[e],"#"===u.charAt(0))/^#_|__$|[^\w#:\-]/.test(u)?s=d:n+=u+l;else if("."===u)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(u=b[e])&&!/^_|__$/.test(u)?n+="."+u:s=d;else if(e+1<f&&"["===b[e]){++e;var x=b[e++].toLowerCase();u=v.m[k+"::"+x];u!==+u&&(u=v.m["*::"+
x]);var C;a.ia?(C=a.ia(k,x),"string"!==typeof C&&(s=d,C=x),s&&u!==+u&&(u=v.d.NONE)):(C=x,u!==+u&&(s=d));var y=x="",A=d;/^[~^$*|]?=$/.test(b[e])&&(x=b[e++],y=b[e++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--e),/^"([^\"\\]|\\.)*"$/.test(y)||(s=d),(A="i"===b[e])&&++e);"]"!==b[e]&&(++e,s=d);switch(u){case v.d.CLASSES:case v.d.LOCAL_NAME:case v.d.NONE:break;case v.d.GLOBAL_NAME:case v.d.ID:case v.d.IDREF:("\x3d"===x||"~\x3d"===x||"$\x3d"===x)&&'""'!=y&&!A?y='"'+y.substring(1,y.length-
-1)+l+'"':"|\x3d"===x||""===x||(s=d);break;case v.d.URI:case v.d.URI_FRAGMENT:""!==x&&(s=d);break;default:s=d}s&&(q+="["+C.replace(/[^\w-]/g,"\\$\x26")+x+y+(A?" i]":"]"))}else if(e<f&&":"===b[e])if(u=b[++e],F.test(u))p+=":"+u;else break;else break;e!==f&&(s=d);s&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+q+p+g)&&r.push(e);return s}" "===b[q]&&++q;p-1!==q&&" "===b[p]&&--p;for(var r=[],u=q,s=c,x=q;s&&x<p;++x){var C=b[x];if(H[C]===H||" "===C)t(u,x,C)?u=x+1:s=d}t(u,p,"")||(s=d);return s?(r.length&&(u=
-r.join(""),k!==f&&(u="."+k+" "+u),n.push(u)),c):!e||e(b.slice(q,p))}var k=a.na,l=a.L,m=a.Aa,n=[],q=0,p,t=0,r;for(p=0;p<b.length;++p)if(r=b[p],"("==r||"["==r?(++t,c):")"==r||"]"==r?(t&&--t,c):!(" "==b[p]&&(t||H[b[p-1]]===H||H[b[p+1]]===H)))b[q++]=b[p];b.length=q;q=b.length;for(p=t=0;p<q;++p)if(","===b[p]){if(!g(t,p))return f;t=p+1}return!g(t,q)?f:n};(function(){var b=/^\w/,a=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
-"i");s=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return!d.length?"":!a.test(d)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,m,v,r,u,C){function F(){B=
-D.length&&D[D.length-1]===f}var A=a,G=C||[0],D=[],B=d;q(l,{startStylesheet:function(){A=[]},endStylesheet:function(){},startAtrule:function(a,d){if(B)a=f;else if("@media"===a)A.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(A.push(a," ",c+m.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof u){var l=s(d.slice(1));if("not all"!==l){++G[0];var n=[];A.push(n);var q=t(k(g,b(d[0])),function(b){var a=
-e(q,b.qa,m,v,r,u,G);--G[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;u(b,!!G[0])},r)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");B=!a;D.push(a)},endAtrule:function(){D.pop();B||A.push(";");F()},startBlock:function(){B||A.push("{")},endBlock:function(){B||(A.push("}"),B=c)},startRuleset:function(b){if(!B){var d=a;"@keyframes"===D[D.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-B=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?B=c:d=b.join(", "));B||A.push(d,"{")}D.push(f)},endRuleset:function(){D.pop();B||A.push("}");F()},declaration:function(b,a){if(!B){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,v,g,m.L);a.length&&A.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return A.join("")}},va:!!G[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
+1)+l+'"':"|\x3d"===x||""===x||(s=d);break;case v.d.URI:case v.d.URI_FRAGMENT:""!==x&&(s=d);break;default:s=d}s&&(q+="["+C.replace(/[^\w-]/g,"\\$\x26")+x+y+(A?" i]":"]"))}else if(e<f&&":"===b[e])if(u=b[++e],G.test(u))p+=":"+u;else break;else break;e!==f&&(s=d);s&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+q+p+g)&&r.push(e);return s}" "===b[q]&&++q;p-1!==q&&" "===b[p]&&--p;for(var r=[],u=q,s=c,x=q;s&&x<p;++x){var C=b[x];if(I[C]===I||" "===C)t(u,x,C)?u=x+1:s=d}t(u,p,"")||(s=d);return s?(r.length&&(u=
+r.join(""),k!==f&&(u="."+k+" "+u),n.push(u)),c):!e||e(b.slice(q,p))}var k=a.na,l=a.L,m=a.Aa,n=[],q=0,p,t=0,r;for(p=0;p<b.length;++p)if(r=b[p],"("==r||"["==r?(++t,c):")"==r||"]"==r?(t&&--t,c):!(" "==b[p]&&(t||I[b[p-1]]===I||I[b[p+1]]===I)))b[q++]=b[p];b.length=q;q=b.length;for(p=t=0;p<q;++p)if(","===b[p]){if(!g(t,p))return f;t=p+1}return!g(t,q)?f:n};(function(){var b=/^\w/,a=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
+"i");s=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return!d.length?"":!a.test(d)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,m,v,r,u,C){function G(){B=
+D.length&&D[D.length-1]===f}var A=a,F=C||[0],D=[],B=d;q(l,{startStylesheet:function(){A=[]},endStylesheet:function(){},startAtrule:function(a,d){if(B)a=f;else if("@media"===a)A.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(A.push(a," ",c+m.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof u){var l=s(d.slice(1));if("not all"!==l){++F[0];var n=[];A.push(n);var q=t(k(g,b(d[0])),function(b){var a=
+e(q,b.qa,m,v,r,u,F);--F[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;u(b,!!F[0])},r)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");B=!a;D.push(a)},endAtrule:function(){D.pop();B||A.push(";");G()},startBlock:function(){B||A.push("{")},endBlock:function(){B||(A.push("}"),B=c)},startRuleset:function(b){if(!B){var d=a;"@keyframes"===D[D.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+B=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?B=c:d=b.join(", "));B||A.push(d,"{")}D.push(f)},endRuleset:function(){D.pop();B||A.push("}");G()},declaration:function(b,a){if(!B){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,v,g,m.L);a.length&&A.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return A.join("")}},va:!!F[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
typeof window&&(window.sanitizeCssProperty=n,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,t;(function(){function b(d,e,c,f,g){for(var k=e++;e<c&&"{"!==d[e]&&";"!==d[e];)++e;if(e<c&&(g||";"===d[e])){g=k+1;var l=e;g<c&&" "===d[g]&&++g;l>g&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();f<g;){var l=
c[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?b(c,f,g,k,d):"{"===l?a(c,f,g,k):e(c,f,g,k)}k.endBlock&&k.endBlock();return f}function e(b,a,d,g){var k=a,m=f(b,a,d,c);if(0>m)return m=~m,m===k?m+1:m;var n=b[m];if("{"!==n)return m===k?m+1:m;a=m+1;m>k&&" "===b[m-1]&&--m;for(g.startRuleset&&g.startRuleset(b.slice(k,m));a<d;){n=b[a];if("}"===n){++a;break}a=" "===n?a+1:l(b,a,d,g)}g.endRuleset&&g.endRuleset();return a}function f(b,a,d,e){for(var c,g=[],k=-1;a<d;++a)if(c=b[a].charAt(0),
"["===c||"("===c)g[++k]=c;else if("]"===c&&"["===g[k]||")"===c&&"("===g[k])--k;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=k&&(a=~(a+1));return a}function g(b,a,d){for(;a<d&&";"!==b[a]&&"}"!==b[a];)++a;return a<d&&";"===b[a]?a+1:a}function l(b,a,e,c){var k=b[a++];if(!m.test(k))return g(b,a,e);a<e&&" "===b[a]&&++a;if(a==e||":"!==b[a])return g(b,a,e);++a;a<e&&" "===b[a]&&++a;var n=f(b,a,e,d);if(0>n)n=~n;else{for(var q=[],p=0,t=a;t<n;++t)a=b[t]," "!==a&&(q[p++]=a);if(n<e){do{a=b[n];
@@ -83,8 +83,8 @@ v.URIEFFECTS=v.J;v.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};v.ltypes=v.M;v.I={"a::hr
16)):K&&J.test(a)?(K.innerHTML="\x26"+a+";",c=K.textContent,Q[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(X,e)}function k(b){return(""+b).replace(ca,"\x26amp;").replace(Z,"\x26lt;").replace(ba,"\x26gt;").replace(Y,"\x26#34;")}function l(b){return b.replace(U,"\x26amp;$1").replace(Z,"\x26lt;").replace(ba,"\x26gt;")}function n(b){var a={z:b.z||b.cdata,A:b.A||b.comment,B:b.B||b.endDoc,t:b.t||b.endTag,e:b.e||b.pcdata,F:b.F||b.rcdata,H:b.H||b.startDoc,w:b.w||b.startTag};return function(b,
e){var c,g=/(<\/|<\!--|<[!?]|[&<>])/g;c=b+"";if(ia)c=c.split(g);else{for(var k=[],l=0,m;(m=g.exec(c))!==f;)k.push(c.substring(l,m.index)),k.push(m[0]),l=m.index+m[0].length;k.push(c.substring(l));c=k}p(a,c,0,{r:d,C:d},e)}}function q(b,a,d,e,c){return function(){p(b,a,d,e,c)}}function p(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,m,n=d.length;e<n;){var r=d[e++],s=d[e];switch(r){case "\x26":da.test(s)?(a.e&&a.e("\x26"+s,g,aa,q(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,aa,q(a,d,e,f,g));break;case "\x3c/":if(k=
/^([-\w:]+)[^\'\"]*/.exec(s))if(k[0].length===s.length&&"\x3e"===d[e+1])e+=2,m=k[1].toLowerCase(),a.t&&a.t(m,g,aa,q(a,d,e,f,g));else{var x=d,C=e,y=a,A=g,D=aa,z=f,T=v(x,C);T?(y.t&&y.t(T.name,A,D,q(y,x,C,z,A)),e=T.next):e=x.length}else a.e&&a.e("\x26lt;/",g,aa,q(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(s))if(k[0].length===s.length&&"\x3e"===d[e+1]){e+=2;m=k[1].toLowerCase();a.w&&a.w(m,[],g,aa,q(a,d,e,f,g));var V=b.f[m];V&ea&&(e=t(d,{name:m,next:e,c:V},a,g,aa,f))}else{var x=d,C=a,y=
-g,A=aa,D=f,H=v(x,e);H?(C.w&&C.w(H.name,H.R,y,A,q(C,x,H.next,D,y)),e=H.c&ea?t(x,H,C,y,A,D):H.next):e=x.length}else a.e&&a.e("\x26lt;",g,aa,q(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<n&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<n){if(a.A){var J=d.slice(e,l).join("");a.A(J.substr(0,J.length-2),g,aa,q(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,aa,q(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(s)){if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
-g,aa,q(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,aa,q(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,aa,q(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,aa,q(a,d,e,f,g));break;case "":break;default:a.e&&a.e(r,g,aa,q(a,d,e,f,g))}}a.B&&a.B(g)}catch(K){if(K!==aa)throw K;}}function t(a,d,e,c,f,g){var k=a.length;fa.hasOwnProperty(d.name)||(fa[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var m=fa[d.name],n=d.next,p=d.next+1;p<
+g,A=aa,D=f,I=v(x,e);I?(C.w&&C.w(I.name,I.R,y,A,q(C,x,I.next,D,y)),e=I.c&ea?t(x,I,C,y,A,D):I.next):e=x.length}else a.e&&a.e("\x26lt;",g,aa,q(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<n&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<n){if(a.A){var J=d.slice(e,l).join("");a.A(J.substr(0,J.length-2),g,aa,q(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,aa,q(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(s)){if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
+g,aa,q(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,aa,q(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<n&&"\x3e"!==d[l];l++);l<n?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,aa,q(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,aa,q(a,d,e,f,g));break;case "":break;default:a.e&&a.e(r,g,aa,q(a,d,e,f,g))}}a.B&&a.B(g)}catch(H){if(H!==aa)throw H;}}function t(a,d,e,c,f,g){var k=a.length;fa.hasOwnProperty(d.name)||(fa[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var m=fa[d.name],n=d.next,p=d.next+1;p<
k&&!("\x3c/"===a[p-1]&&m.test(a[p]));p++);p<k&&(p-=1);k=a.slice(n,p).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,q(e,a,p,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,q(e,a,p,g,c));else throw Error("bug");return p}function v(a,e){var f=/^([-\w:]+)/.exec(a[e]),k={};k.name=f[1].toLowerCase();k.c=b.f[k.name];for(var l=a[e].substr(f[0].length),m=e+1,n=a.length;m<n&&"\x3e"!==a[m];m++)l+=a[m];if(!(n<=m)){for(var q=[];""!==l;)if(f=V.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],p=d,l=[l,a[m++]];m<
n;m++){if(p){if("\x3e"===a[m])break}else 0<=a[m].indexOf(f)&&(p=c);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var p=f[1].toLowerCase(),t;if(f[2]){t=f[3];var r=t.charCodeAt(0);if(34===r||39===r)t=t.substr(1,t.length-2);t=g(t.replace(R,""))}else t="";q.push(p,t);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=q;k.next=m+1;return k}}function r(e){function c(b,a){l||a.push(b)}var g,l;return n({startDoc:function(){g=[];l=d},startTag:function(d,c,m){if(!l&&b.f.hasOwnProperty(d)){var n=
b.f[d];if(!(n&b.c.FOLDABLE)){var q=e(d,c);if(q){if("object"!==typeof q)throw Error("tagPolicy did not return object (old API?)");if("attribs"in q)c=q.attribs;else throw Error("tagPolicy gave no attribs");var p;"tagName"in q?(p=q.tagName,q=b.f[p]):(p=d,q=n);if(n&b.c.OPTIONAL_ENDTAG){var t=g[g.length-1];t&&t.D===d&&(t.v!==p||d!==p)&&m.push("\x3c/",t.v,"\x3e")}n&b.c.EMPTY||g.push({D:d,v:p});m.push("\x3c",p);d=0;for(t=c.length;d<t;d+=2){var v=c[d],r=c[d+1];r!==f&&r!==a&&m.push(" ",v,'\x3d"',k(r),'"')}m.push("\x3e");
@@ -102,9 +102,9 @@ new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/defla
f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),e=g.deflate(f,c),1!==e&&e!==r)return this.onEnd(e),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==c&&2!==c)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0<f.avail_in||0===f.avail_out)&&1!==e);return 4===c?(e=g.deflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===r):2!==c||(this.onEnd(r),f.avail_out=0,!0)};b.prototype.onData=
function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===r&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=b;d.deflate=e;d.deflateRaw=function(b,d){return d=d||{},d.raw=!0,e(b,d)};d.gzip=function(b,d){return d=d||{},d.gzip=!0,e(b,d)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(c,f,d){function b(d){if(!(this instanceof
b))return new b(d);var e=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},d||{});e.raw&&0<=e.windowBits&&16>e.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15));!(0<=e.windowBits&&16>e.windowBits)||d&&d.windowBits||(e.windowBits+=32);15<e.windowBits&&48>e.windowBits&&0===(15&e.windowBits)&&(e.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;d=g.inflateInit2(this.strm,e.windowBits);if(d!==m.Z_OK)throw Error(n[d]);
-this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,r,z=this.strm,B=this.options.chunkSize,C=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?z.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?z.input=new Uint8Array(b):z.input=b;z.next_in=0;z.avail_in=z.input.length;do{if(0===z.avail_out&&(z.output=new k.Buf8(B),z.next_out=0,z.avail_out=B),e=g.inflate(z,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&C&&(r="string"==typeof C?l.string2buf(C):"[object ArrayBuffer]"===s.call(C)?new Uint8Array(C):C,e=g.inflateSetDictionary(this.strm,r)),e===m.Z_BUF_ERROR&&!0===G&&(e=m.Z_OK,G=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
-this.ended=!0,!1;z.next_out&&(0!==z.avail_out&&e!==m.Z_STREAM_END&&(0!==z.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(z.output,z.next_out),n=z.next_out-f,p=l.buf2string(z.output,f),z.next_out=n,z.avail_out=B-n,n&&k.arraySet(z.output,z.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(z.output,z.next_out))));0===z.avail_in&&0===z.avail_out&&(G=!0)}while((0<z.avail_in||0===z.avail_out)&&e!==m.Z_STREAM_END);return e===m.Z_STREAM_END&&(c=m.Z_FINISH),
+this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,r,z=this.strm,B=this.options.chunkSize,C=this.options.dictionary,F=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
+"string"==typeof b?z.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?z.input=new Uint8Array(b):z.input=b;z.next_in=0;z.avail_in=z.input.length;do{if(0===z.avail_out&&(z.output=new k.Buf8(B),z.next_out=0,z.avail_out=B),e=g.inflate(z,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&C&&(r="string"==typeof C?l.string2buf(C):"[object ArrayBuffer]"===s.call(C)?new Uint8Array(C):C,e=g.inflateSetDictionary(this.strm,r)),e===m.Z_BUF_ERROR&&!0===F&&(e=m.Z_OK,F=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
+this.ended=!0,!1;z.next_out&&(0!==z.avail_out&&e!==m.Z_STREAM_END&&(0!==z.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(z.output,z.next_out),n=z.next_out-f,p=l.buf2string(z.output,f),z.next_out=n,z.avail_out=B-n,n&&k.arraySet(z.output,z.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(z.output,z.next_out))));0===z.avail_in&&0===z.avail_out&&(F=!0)}while((0<z.avail_in||0===z.avail_out)&&e!==m.Z_STREAM_END);return e===m.Z_STREAM_END&&(c=m.Z_FINISH),
c===m.Z_FINISH?(e=g.inflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===m.Z_OK):c!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),z.avail_out=0,!0)};b.prototype.onData=function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=b;d.inflate=e;d.inflateRaw=function(b,d){return d=d||{},d.raw=!0,e(b,d)};d.ungzip=e},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(c,f,d){c="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var e=d.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(var c in e)e.hasOwnProperty(c)&&(b[c]=e[c])}}return b};d.shrinkBuf=function(b,d){return b.length===
d?b:b.subarray?b.subarray(0,d):(b.length=d,b)};var b={arraySet:function(b,d,e,c,f){if(d.subarray&&b.subarray)return void b.set(d.subarray(e,e+c),f);for(var p=0;p<c;p++)b[f+p]=d[e+p]},flattenChunks:function(b){var d,e,c,f,p;d=c=0;for(e=b.length;d<e;d++)c+=b[d].length;p=new Uint8Array(c);d=c=0;for(e=b.length;d<e;d++)f=b[d],p.set(f,c),c+=f.length;return p}},e={arraySet:function(b,d,e,c,f){for(var p=0;p<c;p++)b[f+p]=d[e+p]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(c){c?
@@ -117,34 +117,34 @@ for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=fu
0))}function k(b,d){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-X?b.strstart-(b.w_size-X):0,n=b.window,q=b.w_mask,p=b.prev,t=b.strstart+R,v=n[g+k-1],r=n[g+k];b.prev_length>=b.good_match&&
(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===r&&n[e+k-1]===v&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;e++;do;while(n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&g<t);if(c=R-(t-g),g=t-R,c>k){if(b.match_start=d,k=c,c>=l)break;v=n[g+k-1];r=n[g+k]}}while((d=p[d&q])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-X)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=z(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),
-b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}}while(b.lookahead<X&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<X){if(p(b),b.lookahead<X&&d===G)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<
+b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}}while(b.lookahead<X&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<X){if(p(b),b.lookahead<X&&d===F)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e)),b.match_length>=K)if(c=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
-b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else c=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?U:Z}function s(b,d){for(var e,c,f;;){if(b.lookahead<X){if(p(b),
-b.lookahead<X&&d===G)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e),5>=b.match_length&&(b.strategy===N||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=
+b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else c=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=b.strstart<K-1?b.strstart:K-1,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?U:Z}function s(b,d){for(var e,c,f;;){if(b.lookahead<X){if(p(b),
+b.lookahead<X&&d===F)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e),5>=b.match_length&&(b.strategy===N||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=
K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return U}else if(b.match_available){if(c=D._tr_tally(b,0,
-b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return U}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===F?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?U:Z}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function t(){this.strm=null;this.status=
+b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return U}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?U:Z}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function t(){this.strm=null;this.status=
0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=P;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=
this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(2*T);this.dyn_dtree=new x.Buf16(2*(2*Q+1));this.bl_tree=new x.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(J+1);this.heap=new x.Buf16(2*O+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*O+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
-this.lit_bufsize=this.l_buf=0}function v(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=G,D._tr_init(e),H):b(d,I)}function u(b){var d=v(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
-0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function A(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>E||c!==P||8>f||15<f||0>e||9<e||0>k||k>S)return b(d,I);8===f&&(f=9);var m=new t;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=g+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+K-1)/K),m.window=new x.Buf8(2*
-m.w_size),m.head=new x.Buf16(m.hash_size),m.prev=new x.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new x.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,u(d)}var y,x=c("../utils/common"),D=c("./trees"),z=c("./adler32"),B=c("./crc32"),C=c("./messages"),G=0,F=4,H=0,I=-2,L=-1,N=1,S=4,W=2,P=8,E=9,O=286,Q=30,M=19,T=2*O+1,J=15,K=3,R=258,X=R+K+1,da=42,ca=113,U=1,Z=2,ba=3,Y=4;y=[new q(0,0,0,0,function(b,d){var e=
-65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return U;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),U)}),new q(4,4,8,
-4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return A(b,d,P,15,8,0)};d.deflateInit2=A;d.deflateReset=u;d.deflateResetKeep=v;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,H):I};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5<c||0>c)return d?b(d,I):I;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||
-666===n.status&&c!==F)return b(d,0===d.avail_out?-5:I);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
+this.lit_bufsize=this.l_buf=0}function v(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=F,D._tr_init(e),I):b(d,H)}function u(b){var d=v(b);d===I&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function A(d,e,c,f,g,k){if(!d)return H;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>E||c!==P||8>f||15<f||0>e||9<e||0>k||k>S)return b(d,H);8===f&&(f=9);var m=new t;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=g+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+K-1)/K),m.window=new x.Buf8(2*
+m.w_size),m.head=new x.Buf16(m.hash_size),m.prev=new x.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new x.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=e,m.strategy=k,m.method=c,u(d)}var y,x=c("../utils/common"),D=c("./trees"),z=c("./adler32"),B=c("./crc32"),C=c("./messages"),F=0,G=4,I=0,H=-2,L=-1,N=1,S=4,W=2,P=8,E=9,O=286,Q=30,M=19,T=2*O+1,J=15,K=3,R=258,X=R+K+1,da=42,ca=113,U=1,Z=2,ba=3,Y=4;y=[new q(0,0,0,0,function(b,d){var e=
+65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===F)return U;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),U)}),new q(4,4,8,
+4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return A(b,d,P,15,8,0)};d.deflateInit2=A;d.deflateReset=u;d.deflateResetKeep=v;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?H:(b.state.gzhead=d,I):H};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5<c||0>c)return d?b(d,H):H;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||
+666===n.status&&c!==G)return b(d,0===d.avail_out?-5:H);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(d.adler=B(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=P+(n.w_bits-8<<4)<<8,t=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=t<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&
n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&
(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),
q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=
--1,H}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==F)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==G&&666!==n.status){var v;if(2===n.strategy)a:{for(var r;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===G){v=U;break a}break}if(n.match_length=0,r=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,r&&(k(n,!1),0===n.strm.avail_out)){v=U;break a}}v=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&
-(k(n,!1),0===n.strm.avail_out)?U:Z)}else if(3===n.strategy)a:{var s,u;for(r=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===G){v=U;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(u=n.strstart-1,s=r[u],s===r[++u]&&s===r[++u]&&s===r[++u])){f=n.strstart+R;do;while(s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&u<f);n.match_length=R-(f-u);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
-K?(v=D._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(v=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),v&&(k(n,!1),0===n.strm.avail_out)){v=U;break a}}v=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?U:Z)}else v=y[n.level].func(n,c);if(v!==ba&&v!==Y||(n.status=666),v===U||v===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(v===Z&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n,
-0,0,!1),3===c&&(e(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,H}return c!==F?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?H:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,
-e!==da&&69!==e&&73!==e&&91!==e&&103!==e&&e!==ca&&666!==e?b(d,I):(d.state=null,e===ca?b(d,-3):H)):I};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,m,n;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==da||c.lookahead))return I;1===k&&(b.adler=z(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=
-0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+K-1])&c.hash_mask,c.prev[f&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=f,f++;while(--g);c.strstart=f;c.lookahead=K-1;p(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=K-1,c.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,c.wrap=k,H};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
-"./crc32":7,"./messages":13,"./trees":14}],9:[function(c,f,d){f.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(c,f,d){f.exports=function(b,d){var c,f,l,m,n,p,r,s,q,t,v,u,A,y,x,D,z,B,C,G,F,H,I,L;c=b.state;f=b.next_in;I=b.input;l=f+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;t=c.wnext;v=c.window;u=c.hold;A=c.bits;y=c.lencode;
-x=c.distcode;D=(1<<c.lenbits)-1;z=(1<<c.distbits)-1;a:do{15>A&&(u+=I[f++]<<A,A+=8,u+=I[f++]<<A,A+=8);B=y[u&D];b:for(;;){if(C=B>>>24,u>>>=C,A-=C,C=B>>>16&255,0===C)L[m++]=65535&B;else{if(!(16&C)){if(0===(64&C)){B=y[(65535&B)+(u&(1<<C)-1)];continue b}if(32&C){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&B;(C&=15)&&(A<C&&(u+=I[f++]<<A,A+=8),G+=u&(1<<C)-1,u>>>=C,A-=C);15>A&&(u+=I[f++]<<A,A+=8,u+=I[f++]<<A,A+=8);B=x[u&z];c:for(;;){if(C=B>>>24,u>>>=C,A-=C,C=B>>>16&255,
-!(16&C)){if(0===(64&C)){B=x[(65535&B)+(u&(1<<C)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(F=65535&B,C&=15,A<C&&(u+=I[f++]<<A,A+=8,A<C&&(u+=I[f++]<<A,A+=8)),F+=u&(1<<C)-1,F>r){b.msg="invalid distance too far back";c.mode=30;break a}if(u>>>=C,A-=C,C=m-n,F>C){if(C=F-C,C>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=v,0===t){if(B+=s-C,C<G){G-=C;do L[m++]=v[B++];while(--C);B=m-F;H=L}}else if(t<C){if(B+=s+t-C,C-=t,C<G){G-=C;do L[m++]=v[B++];while(--C);
-if(B=0,t<G){C=t;G-=C;do L[m++]=v[B++];while(--C);B=m-F;H=L}}}else if(B+=t-C,C<G){G-=C;do L[m++]=v[B++];while(--C);B=m-F;H=L}for(;2<G;)L[m++]=H[B++],L[m++]=H[B++],L[m++]=H[B++],G-=3;G&&(L[m++]=H[B++],1<G&&(L[m++]=H[B++]))}else{B=m-F;do L[m++]=L[B++],L[m++]=L[B++],L[m++]=L[B++],G-=3;while(2<G);G&&(L[m++]=L[B++],1<G&&(L[m++]=L[B++]))}break}}break}}while(f<l&&m<p);G=A>>3;f-=G;A-=G<<3;b.next_in=f;b.next_out=m;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=m<p?257+(p-m):257-(m-p);c.hold=u&(1<<A)-1;c.bits=A}},
+-1,I}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==G)return b(d,-5);if(666===n.status&&0!==d.avail_in)return b(d,-5);if(0!==d.avail_in||0!==n.lookahead||c!==F&&666!==n.status){var v;if(2===n.strategy)a:{for(var r;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){v=U;break a}break}if(n.match_length=0,r=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,r&&(k(n,!1),0===n.strm.avail_out)){v=U;break a}}v=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&
+(k(n,!1),0===n.strm.avail_out)?U:Z)}else if(3===n.strategy)a:{var s,u;for(r=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===F){v=U;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(u=n.strstart-1,s=r[u],s===r[++u]&&s===r[++u]&&s===r[++u])){f=n.strstart+R;do;while(s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&s===r[++u]&&u<f);n.match_length=R-(f-u);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
+K?(v=D._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(v=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),v&&(k(n,!1),0===n.strm.avail_out)){v=U;break a}}v=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?U:Z)}else v=y[n.level].func(n,c);if(v!==ba&&v!==Y||(n.status=666),v===U||v===ba)return 0===d.avail_out&&(n.last_flush=-1),I;if(v===Z&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n,
+0,0,!1),3===c&&(e(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,
+e!==da&&69!==e&&73!==e&&91!==e&&103!==e&&e!==ca&&666!==e?b(d,H):(d.state=null,e===ca?b(d,-3):I)):H};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,m,n;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==da||c.lookahead))return H;1===k&&(b.adler=z(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=
+0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+K-1])&c.hash_mask,c.prev[f&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=f,f++;while(--g);c.strstart=f;c.lookahead=K-1;p(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=K-1,c.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,c.wrap=k,I};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
+"./crc32":7,"./messages":13,"./trees":14}],9:[function(c,f,d){f.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(c,f,d){f.exports=function(b,d){var c,f,l,m,n,p,r,s,q,t,v,u,A,y,x,D,z,B,C,F,G,I,H,L;c=b.state;f=b.next_in;H=b.input;l=f+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;t=c.wnext;v=c.window;u=c.hold;A=c.bits;y=c.lencode;
+x=c.distcode;D=(1<<c.lenbits)-1;z=(1<<c.distbits)-1;a:do{15>A&&(u+=H[f++]<<A,A+=8,u+=H[f++]<<A,A+=8);B=y[u&D];b:for(;;){if(C=B>>>24,u>>>=C,A-=C,C=B>>>16&255,0===C)L[m++]=65535&B;else{if(!(16&C)){if(0===(64&C)){B=y[(65535&B)+(u&(1<<C)-1)];continue b}if(32&C){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}F=65535&B;(C&=15)&&(A<C&&(u+=H[f++]<<A,A+=8),F+=u&(1<<C)-1,u>>>=C,A-=C);15>A&&(u+=H[f++]<<A,A+=8,u+=H[f++]<<A,A+=8);B=x[u&z];c:for(;;){if(C=B>>>24,u>>>=C,A-=C,C=B>>>16&255,
+!(16&C)){if(0===(64&C)){B=x[(65535&B)+(u&(1<<C)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(G=65535&B,C&=15,A<C&&(u+=H[f++]<<A,A+=8,A<C&&(u+=H[f++]<<A,A+=8)),G+=u&(1<<C)-1,G>r){b.msg="invalid distance too far back";c.mode=30;break a}if(u>>>=C,A-=C,C=m-n,G>C){if(C=G-C,C>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,I=v,0===t){if(B+=s-C,C<F){F-=C;do L[m++]=v[B++];while(--C);B=m-G;I=L}}else if(t<C){if(B+=s+t-C,C-=t,C<F){F-=C;do L[m++]=v[B++];while(--C);
+if(B=0,t<F){C=t;F-=C;do L[m++]=v[B++];while(--C);B=m-G;I=L}}}else if(B+=t-C,C<F){F-=C;do L[m++]=v[B++];while(--C);B=m-G;I=L}for(;2<F;)L[m++]=I[B++],L[m++]=I[B++],L[m++]=I[B++],F-=3;F&&(L[m++]=I[B++],1<F&&(L[m++]=I[B++]))}else{B=m-G;do L[m++]=L[B++],L[m++]=L[B++],L[m++]=L[B++],F-=3;while(2<F);F&&(L[m++]=L[B++],1<F&&(L[m++]=L[B++]))}break}}break}}while(f<l&&m<p);F=A>>3;f-=F;A-=F<<3;b.next_in=f;b.next_out=m;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=m<p?257+(p-m):257-(m-p);c.hold=u&(1<<A)-1;c.bits=A}},
{}],11:[function(c,f,d){function b(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(D),d.distcode=d.distdyn=new s.Buf32(z),d.sane=1,d.back=-1,A):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state,
0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<d)?y:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):y}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==A&&(b.state=null),c):y}function n(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new s.Buf8(b.wsize)),c>=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e-
@@ -168,21 +168,21 @@ m--;z+=f[k++]<<E;E+=8}c.offset+=z&(1<<c.extra)-1;z>>>=c.extra;E-=c.extra;c.back+
29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return y}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=z,c.bits=E,(c.wsize||Q!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,Q-d.avail_out)?(c.mode=31,-4):(O-=d.avail_in,Q-=d.avail_out,d.total_in+=O,d.total_out+=Q,c.total+=Q,c.wrap&&Q&&(d.adler=c.check=c.flags?t(c.check,g,Q,d.next_out-Q):q(c.check,g,Q,d.next_out-Q)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===
c.mode?256:0),(0===O&&0===Q||4===e)&&Z===A&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,A};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,A)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,A)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,v){var u,A,y,x,D,z,B,C;x=v.bits;for(var G=0,F=0,H=0,I=0,L=0,N=0,S=0,W=0,P=0,E=null,O=0,Q=new b.Buf16(16),N=new b.Buf16(16),M=null,T=0,G=0;15>=G;G++)Q[G]=0;for(F=0;F<r;F++)Q[c[f+F]]++;L=x;for(I=15;1<=I&&0===Q[I];I--);if(L>I&&(L=I),0===I)return s[q++]=20971520,s[q++]=20971520,v.bits=1,0;for(H=1;H<I&&0===Q[H];H++);L<H&&(L=H);for(G=u=1;15>=G;G++)if(u<<=1,u-=Q[G],0>u)return-1;if(0<u&&(0===d||1!==I))return-1;N[1]=0;for(G=1;15>G;G++)N[G+
-1]=N[G]+Q[G];for(F=0;F<r;F++)0!==c[f+F]&&(t[N[c[f+F]]++]=F);if(0===d?(E=M=t,D=19):1===d?(E=e,O-=257,M=g,T-=257,D=256):(E=k,M=l,D=-1),P=0,F=0,G=H,x=q,N=L,S=0,y=-1,W=1<<L,r=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var J=0;;){J++;z=G-S;t[F]<D?(B=0,C=t[F]):t[F]>D?(B=M[T+t[F]],C=E[O+t[F]]):(B=96,C=0);u=1<<G-S;H=A=1<<N;do A-=u,s[x+(P>>S)+A]=z<<24|B<<16|C|0;while(0!==A);for(u=1<<G-1;P&u;)u>>=1;if(0!==u?(P&=u-1,P+=u):P=0,F++,0===--Q[G]){if(G===I)break;G=c[f+t[F]]}if(G>L&&(P&r)!==y){0===S&&(S=L);x+=H;N=
-G-S;for(u=1<<N;N+S<I&&(u-=Q[N+S],!(0>=u));)N++,u<<=1;if(W+=1<<N,1===d&&852<W||2===d&&592<W)return 1;y=P&r;s[y]=L<<24|N<<16|x-q|0}}return 0!==P&&(s[x+P]=G-S<<24|4194304),v.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,e,c,
+25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,v){var u,A,y,x,D,z,B,C;x=v.bits;for(var F=0,G=0,I=0,H=0,L=0,N=0,S=0,W=0,P=0,E=null,O=0,Q=new b.Buf16(16),N=new b.Buf16(16),M=null,T=0,F=0;15>=F;F++)Q[F]=0;for(G=0;G<r;G++)Q[c[f+G]]++;L=x;for(H=15;1<=H&&0===Q[H];H--);if(L>H&&(L=H),0===H)return s[q++]=20971520,s[q++]=20971520,v.bits=1,0;for(I=1;I<H&&0===Q[I];I++);L<I&&(L=I);for(F=u=1;15>=F;F++)if(u<<=1,u-=Q[F],0>u)return-1;if(0<u&&(0===d||1!==H))return-1;N[1]=0;for(F=1;15>F;F++)N[F+
+1]=N[F]+Q[F];for(G=0;G<r;G++)0!==c[f+G]&&(t[N[c[f+G]]++]=G);if(0===d?(E=M=t,D=19):1===d?(E=e,O-=257,M=g,T-=257,D=256):(E=k,M=l,D=-1),P=0,G=0,F=I,x=q,N=L,S=0,y=-1,W=1<<L,r=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var J=0;;){J++;z=F-S;t[G]<D?(B=0,C=t[G]):t[G]>D?(B=M[T+t[G]],C=E[O+t[G]]):(B=96,C=0);u=1<<F-S;I=A=1<<N;do A-=u,s[x+(P>>S)+A]=z<<24|B<<16|C|0;while(0!==A);for(u=1<<F-1;P&u;)u>>=1;if(0!==u?(P&=u-1,P+=u):P=0,G++,0===--Q[F]){if(F===H)break;F=c[f+t[G]]}if(F>L&&(P&r)!==y){0===S&&(S=L);x+=I;N=
+F-S;for(u=1<<N;N+S<H&&(u-=Q[N+S],!(0>=u));)N++,u<<=1;if(W+=1<<N,1===d&&852<W||2===d&&592<W)return 1;y=P&r;s[y]=L<<24|N<<16|x-q|0}}return 0!==P&&(s[x+P]=F-S<<24|4194304),v.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=b.length;0<=--d;)b[d]=0}function e(b,d,e,c,
f){this.static_tree=b;this.extra_bits=d;this.extra_base=e;this.elems=c;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,e){b.bi_valid>W-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>W-b.bi_valid,b.bi_valid+=e-W):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function m(b,d,e){l(b,e[2*d],e[2*d+1])}function n(b,d){var e=0;do e|=
-1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(S+1),g=0;for(c=1;c<=S;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=n(f[c]++,c))}function r(b){var d;for(d=0;d<H;d++)b.dyn_ltree[2*d]=0;for(d=0;d<I;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*P]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,d,e,c){var f=
-2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function t(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function v(b,d,e){var c,f,g,k,n=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===c?m(b,f,d):(g=ca[f],m(b,g+F+1,d),k=M[g],0!==k&&(f-=U[g],l(b,f,k)),c--,g=256>c?da[c]:da[256+(c>>>7)],m(b,g,e),k=T[g],
+1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(S+1),g=0;for(c=1;c<=S;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=n(f[c]++,c))}function r(b){var d;for(d=0;d<I;d++)b.dyn_ltree[2*d]=0;for(d=0;d<H;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*P]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,d,e,c){var f=
+2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function t(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function v(b,d,e){var c,f,g,k,n=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===c?m(b,f,d):(g=ca[f],m(b,g+G+1,d),k=M[g],0!==k&&(f-=U[g],l(b,f,k)),c--,g=256>c?da[c]:da[256+(c>>>7)],m(b,g,e),k=T[g],
0!==k&&(c-=Z[g],l(b,c,k)));while(n<b.last_lit)}m(b,P,d)}function u(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=N;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=m=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=m;for(e=b.heap_len>>1;1<=e;e--)t(b,g,e);f=l;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),
c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,v=d.stat_desc.static_tree,r=d.stat_desc.has_stree,s=d.stat_desc.extra_bits,u=d.stat_desc.extra_base,x=d.stat_desc.max_length,y=0;for(c=0;c<=S;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;e<N;e++)f=b.heap[e],c=k[2*
k[2*f+1]+1]+1,c>x&&(c=x,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=u&&(n=s[f-u]),q=k[2*f],b.opt_len+=q*(c+n),r&&(b.static_len+=q*(v[2*f+1]+n)));if(0!==y){do{for(c=x-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[x]--;y-=2}while(0<y);for(c=x;0!==c;c--)for(f=b.bl_count[c];0!==f;)n=b.heap[--e],n>l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function A(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<=
e;c++)f=k,k=d[2*(c+1)+1],++l<m&&f===k||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*E]++):10>=l?b.bl_tree[2*O]++:b.bl_tree[2*Q]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function y(b,d,e){var c,f,g=-1,k=d[1],n=0,q=7,p=4;0===k&&(q=138,p=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n<q&&f===k)){if(n<p){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,E,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,O,b.bl_tree),l(b,n-3,3)):(m(b,Q,b.bl_tree),l(b,
-n-11,7));n=0;g=f;0===k?(q=138,p=3):f===k?(q=6,p=3):(q=7,p=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(d=32;d<F;d++)if(0!==b.dyn_ltree[2*d])return C;return B}function D(b,d,e,c){l(b,(G<<1)+(c?1:0),3);s(b);k(b,e);k(b,~e);z.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var z=c("../utils/common"),B=0,C=1,G=0,F=256,H=F+1+29,I=30,L=19,N=2*H+1,S=15,W=16,P=256,
-E=16,O=17,Q=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],T=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(H+2));b(R);var X=Array(2*I);b(X);var da=Array(512);b(da);var ca=Array(256);b(ca);var U=Array(29);b(U);var Z=Array(I);b(Z);var ba,Y,V,ia=!1;d._tr_init=function(b){if(!ia){var d,c,f,k=Array(S+1);for(f=c=0;28>f;f++){U[f]=c;for(d=0;d<1<<M[f];d++)ca[c++]=
-f}ca[c-1]=f;for(f=c=0;16>f;f++){Z[f]=c;for(d=0;d<1<<T[f];d++)da[c++]=f}for(c>>=7;f<I;f++){Z[f]=c<<7;for(d=0;d<1<<T[f]-7;d++)da[256+c++]=f}for(d=0;d<=S;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,H+1,k);for(d=0;d<I;d++)X[2*d+1]=5,X[2*d]=n(d,5);ba=new e(R,M,F+1,H,S);Y=new e(X,T,0,I,S);V=new e([],J,0,L,7);ia=!0}b.l_desc=new g(b.dyn_ltree,ba);b.d_desc=new g(b.dyn_dtree,Y);b.bl_desc=new g(b.bl_tree,
+n-11,7));n=0;g=f;0===k?(q=138,p=3):f===k?(q=6,p=3):(q=7,p=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(d=32;d<G;d++)if(0!==b.dyn_ltree[2*d])return C;return B}function D(b,d,e,c){l(b,(F<<1)+(c?1:0),3);s(b);k(b,e);k(b,~e);z.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var z=c("../utils/common"),B=0,C=1,F=0,G=256,I=G+1+29,H=30,L=19,N=2*I+1,S=15,W=16,P=256,
+E=16,O=17,Q=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],T=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(I+2));b(R);var X=Array(2*H);b(X);var da=Array(512);b(da);var ca=Array(256);b(ca);var U=Array(29);b(U);var Z=Array(H);b(Z);var ba,Y,V,ia=!1;d._tr_init=function(b){if(!ia){var d,c,f,k=Array(S+1);for(f=c=0;28>f;f++){U[f]=c;for(d=0;d<1<<M[f];d++)ca[c++]=
+f}ca[c-1]=f;for(f=c=0;16>f;f++){Z[f]=c;for(d=0;d<1<<T[f];d++)da[c++]=f}for(c>>=7;f<H;f++){Z[f]=c<<7;for(d=0;d<1<<T[f]-7;d++)da[256+c++]=f}for(d=0;d<=S;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,I+1,k);for(d=0;d<H;d++)X[2*d+1]=5,X[2*d]=n(d,5);ba=new e(R,M,G+1,I,S);Y=new e(X,T,0,H,S);V=new e([],J,0,L,7);ia=!0}b.l_desc=new g(b.dyn_ltree,ba);b.d_desc=new g(b.dyn_dtree,Y);b.bl_desc=new g(b.bl_tree,
V);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=x(b));u(b,b.l_desc);u(b,b.d_desc);A(b,b.dyn_ltree,b.l_desc.max_code);A(b,b.dyn_dtree,b.d_desc.max_code);u(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*K[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e,c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),v(b,R,X);
-else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,d-1);y(b,b.dyn_dtree,e-1);v(b,b.dyn_ltree,b.dyn_dtree)}r(b);c&&s(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ca[e]+F+1)]++,b.dyn_dtree[2*(256>
+else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,d-1);y(b,b.dyn_dtree,e-1);v(b,b.dyn_ltree,b.dyn_dtree)}r(b);c&&s(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ca[e]+G+1)]++,b.dyn_dtree[2*(256>
d?da[d]:da[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,P,R);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(c,
f,d){d=c("./lib/utils/common").assign;var b=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,b,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,c){var f="",d,b,e,g,k,l,m=0;for(null!=c&&c||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),b=a.charCodeAt(m++),e=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|b>>4,k=(b&15)<<2|e>>6,l=e&63,isNaN(b)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(a,c){c=null!=c?c:!1;var f="",d,b,e,g,k,l=0;for(a=
@@ -668,9 +668,9 @@ function mxArrowConnector(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.f
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var c=this.getEdgeWidth();this.isMarkerStart()&&(c=Math.max(c,this.getStartArrowWidth()));this.isMarkerEnd()&&(c=Math.max(c,this.getEndArrowWidth()));a.grow((c/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,c){var f=this.strokewidth;this.outline&&(f=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+f,b=this.getEndArrowWidth()+f,e=this.outline?this.getEdgeWidth()+f:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+f/2,n=this.startSize+f,f=this.endSize+f,p=this.isArrowRounded(),r=c[c.length-1],s=1;s<c.length-1&&c[s].x==
-c[0].x&&c[s].y==c[0].y;)s++;var q=c[s].x-c[0].x,s=c[s].y-c[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var v=q/t,u,A=v,y=s/t,x,D=y,t=e*y,z=-e*v,B=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=v;s=y;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,v,y,n,d,e,m,!0);else{u=c[0].x+t/2+m*v;x=c[0].y+z/2+m*y;var C=c[0].x-t/2+m*v,G=c[0].y-z/2+m*y;g?(a.moveTo(u,x),B.push(function(){a.lineTo(C,G)})):(a.moveTo(C,G),a.lineTo(u,x))}for(var F=x=u=0,t=0;t<c.length-2;t++)if(z=mxUtils.relativeCcw(c[t].x,
-c[t].y,c[t+1].x,c[t+1].y,c[t+2].x,c[t+2].y),u=c[t+2].x-c[t+1].x,x=c[t+2].y-c[t+1].y,F=Math.sqrt(u*u+x*x),0!=F&&(A=u/F,D=x/F,tmp=Math.max(Math.sqrt((v*A+y*D+1)/2),0.04),u=v+A,x=y+D,F=Math.sqrt(u*u+x*x),0!=F)){u/=F;x/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),F=0!=z&&p?Math.max(0.1,F):Math.max(tmp,0.06),H=c[t+1].x+x*e/2/F,I=c[t+1].y-u*e/2/F;x=c[t+1].x-x*e/2/F;u=c[t+1].y+u*e/2/F;0==z||!p?(a.lineTo(H,I),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,u)):-1==z?(z=x+D*e,F=u-A*e,
-a.lineTo(x+y*e,u-v*e),a.quadTo(H,I,z,F),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,u)):(a.lineTo(H,I),function(b,d){var c=H-y*e,f=I+v*e,g=H-D*e,k=I+A*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,u));v=A;y=D}t=e*D;z=-e*A;if(l&&!g)this.paintMarker(a,r.x,r.y,-v,-y,f,b,e,m,!1);else{a.lineTo(r.x-m*A+t/2,r.y-m*D+z/2);var L=r.x-m*A-t/2,N=r.y-m*D-z/2;g?(a.moveTo(L,N),B.splice(0,0,function(){a.moveTo(L,N)})):a.lineTo(L,N)}for(t=B.length-1;0<=t;t--)B[t]();g?(a.end(),
+c[0].x&&c[s].y==c[0].y;)s++;var q=c[s].x-c[0].x,s=c[s].y-c[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var v=q/t,u,A=v,y=s/t,x,D=y,t=e*y,z=-e*v,B=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=v;s=y;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,v,y,n,d,e,m,!0);else{u=c[0].x+t/2+m*v;x=c[0].y+z/2+m*y;var C=c[0].x-t/2+m*v,F=c[0].y-z/2+m*y;g?(a.moveTo(u,x),B.push(function(){a.lineTo(C,F)})):(a.moveTo(C,F),a.lineTo(u,x))}for(var G=x=u=0,t=0;t<c.length-2;t++)if(z=mxUtils.relativeCcw(c[t].x,
+c[t].y,c[t+1].x,c[t+1].y,c[t+2].x,c[t+2].y),u=c[t+2].x-c[t+1].x,x=c[t+2].y-c[t+1].y,G=Math.sqrt(u*u+x*x),0!=G&&(A=u/G,D=x/G,tmp=Math.max(Math.sqrt((v*A+y*D+1)/2),0.04),u=v+A,x=y+D,G=Math.sqrt(u*u+x*x),0!=G)){u/=G;x/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=z&&p?Math.max(0.1,G):Math.max(tmp,0.06),I=c[t+1].x+x*e/2/G,H=c[t+1].y-u*e/2/G;x=c[t+1].x-x*e/2/G;u=c[t+1].y+u*e/2/G;0==z||!p?(a.lineTo(I,H),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,u)):-1==z?(z=x+D*e,G=u-A*e,
+a.lineTo(x+y*e,u-v*e),a.quadTo(I,H,z,G),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,u)):(a.lineTo(I,H),function(b,d){var c=I-y*e,f=H+v*e,g=I-D*e,k=H+A*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,u));v=A;y=D}t=e*D;z=-e*A;if(l&&!g)this.paintMarker(a,r.x,r.y,-v,-y,f,b,e,m,!1);else{a.lineTo(r.x-m*A+t/2,r.y-m*D+z/2);var L=r.x-m*A-t/2,N=r.y-m*D-z/2;g?(a.moveTo(L,N),B.splice(0,0,function(){a.moveTo(L,N)})):a.lineTo(L,N)}for(t=B.length-1;0<=t;t--)B[t]();g?(a.end(),
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<c.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,c[0].x,c[0].y,q,s,n,d,e,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-v,-y,f,b,e,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,c,f,d,b,e,g,k,l,m){g=k/g;var n=k*b/2;k=-k*d/2;var p=(l+e)*d;e=(l+e)*b;m?a.moveTo(c-n+p,f-k+e):a.lineTo(c-n+p,f-k+e);a.lineTo(c-n/g+p,f-k/g+e);a.lineTo(c+l*d,f+l*b);a.lineTo(c+n/g+p,f+k/g+e);a.lineTo(c+n+p,f+k+e)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
@@ -2043,26 +2043,26 @@ c,this.toolbarContainer.onmousedown=c,this.diagramContainer.onselectstart=c,this
9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c;d.init(this.diagramContainer);d.cellRenderer.initializeLabel=function(b,a){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(a.node,"click",function(b){for(var d=mxEvent.getSource(b);null!=d&&d!=a.node;){if("A"==d.nodeName){null==d.getAttribute("target")&&null!=d.getAttribute("href")&&(window.open(d.getAttribute("href")),mxEvent.consume(b));break}d=
d.parentNode}})};this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var a=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-a.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-a.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var b=!1,e=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
function(a,d){return b||e.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(b=!0,this.hoverIcons.reset(),d.container.style.cursor="move",!d.isEditing()&&mxEvent.getSource(a)==d.container&&mxEvent.consume(a)):!mxEvent.isConsumed(a)&&27==a.keyCode&&this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";b=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||b||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(b){return k.apply(this,arguments)||13==b.keyCode&&mxEvent.isControlDown(b)};
-var l=!1,m=null,n=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,a=[];null!=b;){var e=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),a.push(b));b=e}b=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;c<p.length;c++)this.toolbar.container.appendChild(p[c]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();
-m=b;n=e;p=a}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var b=!1,a=function(){b||(b=!0,window.setTimeout(function(){for(var a=d.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a&&(a=mxUtils.getCurrentStyle(a),null!=a&&null!=s.toolbar)){var e=a.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));s.toolbar.setFontName(e);
-s.toolbar.setFontSize(parseInt(a.fontSize))}b=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",a);mxEvent.addListener(d.cellEditor.textarea,"touchend",a);mxEvent.addListener(d.cellEditor.textarea,"mouseup",a);mxEvent.addListener(d.cellEditor.textarea,"keyup",a);a()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(b,a){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&
-d.container.focus();var v=d.fireMouseEvent;d.fireMouseEvent=function(b,a,d){b==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,a,d){this.menus.createPopupMenu(b,a,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),
-A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(b){var a=d.view.getState(b);if(null!=a){b=b.clone();b.style="";b=d.getCellStyle(b);var e=[],c=[],f;for(f in a.style)b[f]!=a.style[f]&&(e.push(a.style[f]),c.push(f));f=d.getModel().getStyle(a.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],m=l.indexOf("\x3d");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=b[f]&&"none"==l&&(e.push(l),c.push(f)))}d.getModel().isEdge(a.cell)?d.currentEdgeStyle=
-{}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",[a.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)u.push(D[a][c]);for(a=0;a<A.length;a++)u.push(A[a]);var z=function(b,a){d.getModel().beginUpdate();try{if(a)for(var e=d.getModel().isEdge(k),c=e?d.currentEdgeStyle:d.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],f=0;f<e.length;f++){var g=c[e[f]];null!=g&&d.setCellStyles(e[f],g,b)}else for(g=0;g<b.length;g++){for(var k=b[g],l=d.getModel().getStyle(k),m=null!=
-l?l.split(";"):[],n=u.slice(),f=0;f<m.length;f++){var q=m[f],p=q.indexOf("\x3d");if(0<=p){var t=q.substring(0,p),v=mxUtils.indexOf(n,t);0<=v&&n.splice(v,1);for(var r=0;r<D.length;r++){var s=D[r];if(0<=mxUtils.indexOf(s,t))for(var x=0;x<s.length;x++){var y=mxUtils.indexOf(n,s[x]);0<=y&&n.splice(y,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var t=n[f],z=c[t];if(null!=z&&("shape"!=t||e))(!e||0>mxUtils.indexOf(A,t))&&d.setCellStyles(t,z,[k])}}}finally{d.getModel().endUpdate()}};
-d.addListener("cellsInserted",function(b,a){z(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){z(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,a){var d=[a.getProperty("cell")];a.getProperty("terminalInserted")&&d.push(a.getProperty("terminal"));z(d)});this.addListener("styleChanged",mxUtils.bind(this,function(b,a){var e=a.getProperty("cells"),c=!1,f=!1;if(0<e.length)for(var g=0;g<e.length&&!(c=d.getModel().isVertex(e[g])||c,(f=d.getModel().isEdge(e[g])||
-f)&&c);g++);else f=c=!0;for(var e=a.getProperty("keys"),k=a.getProperty("values"),g=0;g<e.length;g++){var l=0<=mxUtils.indexOf(y,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,e[g]))f||0<=mxUtils.indexOf(x,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(u,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(u,e[g])){if(c||l)null==k[g]?delete d.currentVertexStyle[e[g]]:
-d.currentVertexStyle[e[g]]=k[g];if(f||l||0<=mxUtils.indexOf(x,e[g]))null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
-"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
-this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var b=d.currentVertexStyle.fontFamily||
-"Helvetica",a=String(d.currentVertexStyle.fontSize||"12"),e=d.getView().getState(d.getSelectionCell());null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,a=e.style[mxConstants.STYLE_FONTSIZE]||a,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(a)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(b,a){var e=a.getProperty("cells"),c=a.getProperty("parent");d.getModel().isLayer(c)&&
-!d.isCellVisible(c)&&null!=e&&0<e.length&&d.getModel().setVisible(c,!0)});this.gestureHandler=mxUtils.bind(this,function(b){null!=this.currentMenu&&mxEvent.getSource(b)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
-mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,
-function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;
-EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
+var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||b||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(b){return k.apply(this,arguments)||13==b.keyCode&&(mxEvent.isControlDown(b)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(b))};var l=!1,m=null,n=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,a=[];null!=b;){var e=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),a.push(b));b=e}b=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;c<p.length;c++)this.toolbar.container.appendChild(p[c]);this.toolbar.fontMenu=
+m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=b;n=e;p=a}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var b=!1,a=function(){b||(b=!0,window.setTimeout(function(){for(var a=d.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a&&(a=mxUtils.getCurrentStyle(a),null!=a&&null!=s.toolbar)){var e=a.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-
+1)&&(e=e.substring(0,e.length-1));s.toolbar.setFontName(e);s.toolbar.setFontSize(parseInt(a.fontSize))}b=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",a);mxEvent.addListener(d.cellEditor.textarea,"touchend",a);mxEvent.addListener(d.cellEditor.textarea,"mouseup",a);mxEvent.addListener(d.cellEditor.textarea,"keyup",a);a()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(b,a){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor=
+"default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var v=d.fireMouseEvent;d.fireMouseEvent=function(b,a,d){b==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,a,d){this.menus.createPopupMenu(b,a,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(b){var a=d.view.getState(b);if(null!=a){b=b.clone();b.style="";b=d.getCellStyle(b);var e=[],c=[],f;for(f in a.style)b[f]!=a.style[f]&&(e.push(a.style[f]),c.push(f));f=d.getModel().getStyle(a.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],m=l.indexOf("\x3d");
+0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=b[f]&&"none"==l&&(e.push(l),c.push(f)))}d.getModel().isEdge(a.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",[a.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
+D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)u.push(D[a][c]);for(a=0;a<A.length;a++)u.push(A[a]);var z=function(b,a){d.getModel().beginUpdate();try{if(a)for(var e=d.getModel().isEdge(k),c=e?d.currentEdgeStyle:d.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],f=0;f<e.length;f++){var g=c[e[f]];null!=g&&d.setCellStyles(e[f],
+g,b)}else for(g=0;g<b.length;g++){for(var k=b[g],l=d.getModel().getStyle(k),m=null!=l?l.split(";"):[],n=u.slice(),f=0;f<m.length;f++){var q=m[f],p=q.indexOf("\x3d");if(0<=p){var t=q.substring(0,p),v=mxUtils.indexOf(n,t);0<=v&&n.splice(v,1);for(var r=0;r<D.length;r++){var s=D[r];if(0<=mxUtils.indexOf(s,t))for(var x=0;x<s.length;x++){var y=mxUtils.indexOf(n,s[x]);0<=y&&n.splice(y,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var t=n[f],z=c[t];if(null!=
+z&&("shape"!=t||e))(!e||0>mxUtils.indexOf(A,t))&&d.setCellStyles(t,z,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){z(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){z(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,a){var d=[a.getProperty("cell")];a.getProperty("terminalInserted")&&d.push(a.getProperty("terminal"));z(d)});this.addListener("styleChanged",mxUtils.bind(this,function(b,a){var e=a.getProperty("cells"),
+c=!1,f=!1;if(0<e.length)for(var g=0;g<e.length&&!(c=d.getModel().isVertex(e[g])||c,(f=d.getModel().isEdge(e[g])||f)&&c);g++);else f=c=!0;for(var e=a.getProperty("keys"),k=a.getProperty("values"),g=0;g<e.length;g++){var l=0<=mxUtils.indexOf(y,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,e[g]))f||0<=mxUtils.indexOf(x,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(u,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:
+d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(u,e[g])){if(c||l)null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g];if(f||l||0<=mxUtils.indexOf(x,e[g]))null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
+"orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
+d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
+(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var b=d.currentVertexStyle.fontFamily||"Helvetica",a=String(d.currentVertexStyle.fontSize||"12"),e=d.getView().getState(d.getSelectionCell());null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,a=e.style[mxConstants.STYLE_FONTSIZE]||a,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(a)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(b,
+a){var e=a.getProperty("cells"),c=a.getProperty("parent");d.getModel().isLayer(c)&&!d.isCellVisible(c)&&null!=e&&0<e.length&&d.getModel().setVisible(c,!0)});this.gestureHandler=mxUtils.bind(this,function(b){null!=this.currentMenu&&mxEvent.getSource(b)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,
+"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,
+function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
+EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(d){9==d.which&&a.isEnabled()&&!mxEvent.isAltDown(d)&&(a.isEditing()?a.stopEditing(!1):a.selectCell(!mxEvent.isShiftDown(d)),mxEvent.consume(d))}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(d){if(this.isImmediateEditingEvent(d)&&!a.isEditing()&&!a.isSelectionEmpty()&&(0!==d.which&&!mxEvent.isAltDown(d)&&!mxEvent.isControlDown(d)&&!mxEvent.isMetaDown(d))&&
(a.escape(),a.startEditing(),mxClient.IS_FF)){var b=a.cellEditor;b.textarea.innerHTML=String.fromCharCode(d.which);d=document.createRange();d.selectNodeContents(b.textarea);d.collapse(!1);b=window.getSelection();b.removeAllRanges();b.addRange(d)}}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var c=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){c.apply(this,arguments);f.updateActionStates()};a.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
@@ -2153,7 +2153,7 @@ EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroun
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};
EditorUi.prototype.createKeyHandler=function(a){function c(b,a,e){g.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(a=null!=a?a:1,e){d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),f=0;f<c.length;f++)if(d.getModel().isVertex(c[f])&&d.isCellResizable(c[f])){var g=d.getCellGeometry(c[f]);null!=g&&(g=g.clone(),37==b?g.width=Math.max(0,g.width-a):38==b?g.height=Math.max(0,g.height-a):39==b?g.width+=a:40==b&&(g.height+=a),d.getModel().setGeometry(c[f],g))}}finally{d.getModel().endUpdate()}}else c=
d.getSelectionCell(),f=d.model.getParent(c),g=null,1==d.getSelectionCount()&&d.model.isVertex(c)&&null!=d.layoutManager&&!d.isCellLocked(c)&&(g=d.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(c),37==b||38==b?d.model.add(f,c,Math.max(0,g-1)):(39==b||40==b)&&d.model.add(f,c,Math.min(d.model.getChildCount(f),g+1))):(f=c=0,37==b?c=-a:38==b?f=-a:39==b?c=a:40==b&&(f=a),d.moveCells(d.getMovableCells(d.getSelectionCells()),c,f))});null!=k&&window.clearTimeout(k);k=window.setTimeout(function(){if(0<
-g.length){d.getModel().beginUpdate();try{for(var b=0;b<g.length;b++)g[b]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,b=new mxKeyHandler(d),e=b.isEventIgnored;b.isEventIgnored=function(b){return(!this.isControlDown(b)||mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode&&85!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+g.length){d.getModel().beginUpdate();try{for(var b=0;b<g.length;b++)g[b]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,b=new mxKeyHandler(d),e=b.isEventIgnored;b.isEventIgnored=function(b){return(!this.isControlDown(b)||mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
!mxClient.IS_SF)&&e.apply(this,arguments)};b.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()};b.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var g=[],k=null,l={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},m=b.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(d.isEnabled()){if(9==b.keyCode&&mxEvent.isAltDown(b))return mxEvent.isShiftDown(b)?
function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=l[b.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(d.model.isVertex(d.getSelectionCell()))return function(){var a=d.connectVertex(d.getSelectionCell(),l[b.keyCode],d.defaultEdgeLength,b,!0);null!=a&&0<a.length&&(1==a.length&&d.model.isEdge(a[0])?d.setSelectionCell(d.model.getTerminal(a[0],!1)):d.setSelectionCell(a[a.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(b)?
function(){c(b.keyCode,mxEvent.isShiftDown(b)?d.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?d.gridSize:null)}}return m.apply(this,arguments)};b.bindAction=mxUtils.bind(this,function(a,d,e,c){var f=this.actions.get(e);null!=f&&(e=function(){f.isEnabled()&&f.funct()},d?c?b.bindControlShiftKey(a,e):b.bindControlKey(a,e):c?b.bindShiftKey(a,e):b.bindKey(a,e))});var n=b.escape;b.escape=function(b){n.apply(this,arguments)};b.enter=function(){};b.bindControlShiftKey(36,function(){d.exitGroup()});
@@ -2314,27 +2314,27 @@ d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=k.y+k.height,d.
2+d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+k.height/2+d.height/2+e:f==mxConstants.DIRECTION_WEST&&(d.x=d.x-k.width/2-d.width/2-e),b.model.isEdge(c)&&null!=d.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(k=b.getCellGeometry(c.getTerminal(!1)),null!=k&&(f==mxConstants.DIRECTION_NORTH?(d.x-=k.getCenterX(),d.y-=k.getCenterY()+k.height/2):f==mxConstants.DIRECTION_EAST?(d.x-=k.getCenterX()-k.width/2,d.y-=k.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(d.x-=k.getCenterX(),d.y-=k.getCenterY()-
k.height/2):f==mxConstants.DIRECTION_WEST&&(d.x-=k.getCenterX()+k.width/2,d.y-=k.getCenterY()))))));return d};
Sidebar.prototype.createDragSource=function(a,c,f,d,b){function e(b,a){var d=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(d=document.createElement(mxClient.VML_PREFIX+":image"),d.setAttribute("src",b.src),d.style.borderStyle="none"):(d=document.createElement("div"),d.style.backgroundImage="url("+b.src+")",d.style.backgroundPosition="center",d.style.backgroundRepeat="no-repeat"),d.style.width=b.width+4+"px",d.style.height=b.height+4+"px",d.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block"):(d=mxUtils.createImage(b.src),d.style.width=b.width+"px",d.style.height=b.height+"px");null!=a&&d.setAttribute("title",a);mxUtils.setOpacity(d,b==this.refreshTarget?30:20);d.style.position="absolute";d.style.cursor="crosshair";return d}function g(b,a,d,e){null!=e.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(e,100),I=e):mxUtils.setOpacity(e,e==B?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,r=0;r<d.length&&!(null==
-n&&this.editorUi.editor.graph.model.isVertex(d[r])?n=r:null==m&&this.editorUi.editor.graph.model.isEdge(d[r])&&null==this.editorUi.editor.graph.model.getTerminal(d[r],!0)&&(m=r),null!=n&&null!=m);r++);var s=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(b,a,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=u&&I==B){var k=b.isCellSelected(u.cell)?b.getSelectionCells():[u.cell],k=this.updateShapes(b.model.isEdge(u.cell)?d[0]:d[n],
-k);b.setSelectionCells(k)}else null!=d&&null!=I&&null!=t&&I!=B?(k=b.model.isEdge(t.cell)||null==m?n:m,this.dropAndConnect(t.cell,d,H,k)):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}),f,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(b,a){s.isActive()&&s.reset()});var q=s.mouseDown;s.mouseDown=function(b){!mxEvent.isPopupTrigger(b)&&!mxEvent.isMultiTouchEvent(b)&&
-(l.stopEditing(),q.apply(this,arguments))};var t=null,v=null,u=null,A=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),z=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),C=null,G=e(this.roundDrop),F=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,I=null,L=s.createPreviewElement;s.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&
-(a.style.pointerEvents="none");this.previewElementWidth=a.style.width;this.previewElementHeight=a.style.height;return a};var N=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");N.apply(this,arguments)};var S=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");S.apply(this,arguments)};s.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=I&&this.currentGuide.hide();if(null!=
-this.previewElement){var c=a.view;if(null!=u&&I==B)this.previewElement.style.display=a.model.isEdge(u.cell)?"none":"",this.previewElement.style.left=u.x+"px",this.previewElement.style.top=u.y+"px",this.previewElement.style.width=u.width+"px",this.previewElement.style.height=u.height+"px";else if(null!=t&&null!=I){var f=a.model.isEdge(t.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(t.cell,d[f],H,d),k=!a.model.isEdge(t.cell)?a.getCellGeometry(t.cell):null,l=a.getCellGeometry(d[f]),q=a.model.getParent(t.cell),
+mxClient.IS_QUIRKS?"inline":"inline-block"):(d=mxUtils.createImage(b.src),d.style.width=b.width+"px",d.style.height=b.height+"px");null!=a&&d.setAttribute("title",a);mxUtils.setOpacity(d,b==this.refreshTarget?30:20);d.style.position="absolute";d.style.cursor="crosshair";return d}function g(b,a,d,e){null!=e.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(e,100),H=e):mxUtils.setOpacity(e,e==B?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,r=0;r<d.length&&!(null==
+n&&this.editorUi.editor.graph.model.isVertex(d[r])?n=r:null==m&&this.editorUi.editor.graph.model.isEdge(d[r])&&null==this.editorUi.editor.graph.model.getTerminal(d[r],!0)&&(m=r),null!=n&&null!=m);r++);var s=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(b,a,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=u&&H==B){var k=b.isCellSelected(u.cell)?b.getSelectionCells():[u.cell],k=this.updateShapes(b.model.isEdge(u.cell)?d[0]:d[n],
+k);b.setSelectionCells(k)}else null!=d&&null!=H&&null!=t&&H!=B?(k=b.model.isEdge(t.cell)||null==m?n:m,this.dropAndConnect(t.cell,d,I,k)):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}),f,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(b,a){s.isActive()&&s.reset()});var q=s.mouseDown;s.mouseDown=function(b){!mxEvent.isPopupTrigger(b)&&!mxEvent.isMultiTouchEvent(b)&&
+(l.stopEditing(),q.apply(this,arguments))};var t=null,v=null,u=null,A=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),z=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),C=null,F=e(this.roundDrop),G=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,H=null,L=s.createPreviewElement;s.createPreviewElement=function(b){var a=L.apply(this,arguments);mxClient.IS_SVG&&
+(a.style.pointerEvents="none");this.previewElementWidth=a.style.width;this.previewElementHeight=a.style.height;return a};var N=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");N.apply(this,arguments)};var S=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");S.apply(this,arguments)};s.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=H&&this.currentGuide.hide();if(null!=
+this.previewElement){var c=a.view;if(null!=u&&H==B)this.previewElement.style.display=a.model.isEdge(u.cell)?"none":"",this.previewElement.style.left=u.x+"px",this.previewElement.style.top=u.y+"px",this.previewElement.style.width=u.width+"px",this.previewElement.style.height=u.height+"px";else if(null!=t&&null!=H){var f=a.model.isEdge(t.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(t.cell,d[f],I,d),k=!a.model.isEdge(t.cell)?a.getCellGeometry(t.cell):null,l=a.getCellGeometry(d[f]),q=a.model.getParent(t.cell),
v=c.translate.x*c.scale,r=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(q)&&(r=c.getState(q),v=r.x,r=r.y);k=l.x;l=l.y;a.model.isEdge(d[f])&&(l=k=0);this.previewElement.style.left=(g.x-k)*c.scale+v+"px";this.previewElement.style.top=(g.y-l)*c.scale+r+"px";1==d.length&&(this.previewElement.style.width=g.width*c.scale+"px",this.previewElement.style.height=g.height*c.scale+"px");this.previewElement.style.display=""}else null!=s.currentHighlight.state&&a.model.isEdge(s.currentHighlight.state.cell)?
(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-b.width*c.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*c.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var W=(new Date).getTime(),P=0,E=null,O=this.editorUi.editor.graph.getCellStyle(d[0]);s.getDropTarget=mxUtils.bind(this,function(b,
-a,e,c){var f=!mxEvent.isAltDown(c)&&null!=d?b.getCellAt(a,e):null;if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}b.isCellLocked(f)&&(f=null);var l=b.view.getState(f),k=I=null;E!=l?(E=l,W=(new Date).getTime(),P=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(E=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
+a,e,c){var f=!mxEvent.isAltDown(c)&&null!=d?b.getCellAt(a,e):null;if(null!=f&&!this.graph.isCellConnectable(f)){var k=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(k)&&this.graph.isCellConnectable(k)&&(f=k)}b.isCellLocked(f)&&(f=null);var l=b.view.getState(f),k=H=null;E!=l?(E=l,W=(new Date).getTime(),P=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==H&&(E=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
10))):P=(new Date).getTime()-W;if(2500>P&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(O,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(O,mxConstants.STYLE_SHAPE)||1500<P||b.model.isEdge(l.cell))&&P>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){u=l;var m=b.model.isEdge(l.cell)?b.view.getPoint(l):
new mxPoint(l.getCenterX(),l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(m.x)+"px";B.style.top=Math.floor(m.y)+"px";null==C&&(b.container.appendChild(B),C=B.parentNode);g(a,e,m,B)}else null==u||!mxUtils.contains(u,a,e)||1500<P&&!mxEvent.isShiftDown(c)?(u=null,null!=C&&(B.parentNode.removeChild(B),C=null)):null!=u&&null!=C&&(m=b.model.isEdge(u.cell)?b.view.getPoint(u):new mxPoint(u.getCenterX(),
-u.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,m,B));if(A&&null!=t&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(t);if(b.model.isEdge(t.cell)){var q=t.absolutePoints;null!=G.parentNode&&(m=q[0],k.add(g(a,e,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)));null!=F.parentNode&&(q=q[q.length-1],k.add(g(a,e,new mxRectangle(q.x-
-this.roundDrop.width/2,q.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),F)))}else m=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(m=mxRectangle.fromRectangle(t.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(t.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/2,m.width+=q.horizontalOffset,m.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&
+u.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,m,B));if(A&&null!=t&&!mxEvent.isAltDown(c)&&null==H){k=mxRectangle.fromRectangle(t);if(b.model.isEdge(t.cell)){var q=t.absolutePoints;null!=F.parentNode&&(m=q[0],k.add(g(a,e,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),F)));null!=G.parentNode&&(q=q[q.length-1],k.add(g(a,e,new mxRectangle(q.x-
+this.roundDrop.width/2,q.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)))}else m=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(m=mxRectangle.fromRectangle(t.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(t.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/2,m.width+=q.horizontalOffset,m.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&
"hidden"!=q.rotationShape.node.style.visibility&&("none"!=q.rotationShape.node.style.display&&null!=q.rotationShape.boundingBox)&&m.add(q.rotationShape.boundingBox)),k.add(g(a,e,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),k.add(g(a,e,new mxRectangle(m.x+m.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),k.add(g(a,e,new mxRectangle(t.getCenterX()-this.triangleDown.width/
-2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),D)),k.add(g(a,e,new mxRectangle(m.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),z));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;I==x?H=mxConstants.DIRECTION_EAST:I==D||I==F?H=mxConstants.DIRECTION_SOUTH:I==z&&(H=mxConstants.DIRECTION_WEST);null!=u&&I==B&&(l=u);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));
-if(null!=t&&5E3<=P||t!=l&&(null==k||!mxUtils.contains(k,a,e)||500<P&&null==I&&m))if(A=!1,t=5E3>P&&P>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[G,F,y,x,D,z];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(q=l.absolutePoints,null!=q&&(m=q[0],q=q[q.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),G.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",F.style.left=Math.floor(q.x-
-this.roundDrop.width/2)+"px",F.style.top=Math.floor(q.y-this.roundDrop.height/2)+"px",null==b.model.getTerminal(f,!0)&&b.container.appendChild(G),null==b.model.getTerminal(f,!1)&&b.container.appendChild(F))):(m=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(m=mxRectangle.fromRectangle(l.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(l.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/
+2,m.y+m.height,this.triangleDown.width,this.triangleDown.height),D)),k.add(g(a,e,new mxRectangle(m.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),z));null!=k&&k.grow(10)}I=mxConstants.DIRECTION_NORTH;H==x?I=mxConstants.DIRECTION_EAST:H==D||H==G?I=mxConstants.DIRECTION_SOUTH:H==z&&(I=mxConstants.DIRECTION_WEST);null!=u&&H==B&&(l=u);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));
+if(null!=t&&5E3<=P||t!=l&&(null==k||!mxUtils.contains(k,a,e)||500<P&&null==H&&m))if(A=!1,t=5E3>P&&P>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,y,x,D,z];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(q=l.absolutePoints,null!=q&&(m=q[0],q=q[q.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),F.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",F.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",G.style.left=Math.floor(q.x-
+this.roundDrop.width/2)+"px",G.style.top=Math.floor(q.y-this.roundDrop.height/2)+"px",null==b.model.getTerminal(f,!0)&&b.container.appendChild(F),null==b.model.getTerminal(f,!1)&&b.container.appendChild(G))):(m=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(m=mxRectangle.fromRectangle(l.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),q=this.graph.selectionCellsHandler.getHandler(l.cell),null!=q&&(m.x-=q.horizontalOffset/2,m.y-=q.verticalOffset/
2,m.width+=q.horizontalOffset,m.height+=q.verticalOffset,null!=q.rotationShape&&null!=q.rotationShape.node&&"hidden"!=q.rotationShape.node.style.visibility&&("none"!=q.rotationShape.node.style.display&&null!=q.rotationShape.boundingBox)&&m.add(q.rotationShape.boundingBox)),y.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(m.y-this.triangleUp.height)+"px",x.style.left=Math.floor(m.x+m.width)+"px",x.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
-2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(m.y+m.height)+"px",z.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",z.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(y),b.container.appendChild(D)),b.container.appendChild(x),b.container.appendChild(z));null!=l&&(v=b.selectionCellsHandler.getHandler(l.cell),null!=v&&null!=v.setHandlesVisible&&v.setHandlesVisible(!1));A=!0}else{k=[G,F,y,x,D,z];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m])}!A&&
-null!=v&&v.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=u&&I==B)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=I||!b.isSplitTarget(f,d,c))){for(;null!=f&&!b.isValidDropTarget(f,d,c)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(b.view.currentRoot==f||!b.isValidRoot(f)&&0==b.getModel().getChildCount(f)||b.isCellLocked(f)||k.isEdge(f))f=null}return f});s.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var b=[G,F,B,y,x,D,z],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=t&&null!=v&&v.reset();I=C=u=t=v=null};return s};
+2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(m.y+m.height)+"px",z.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",z.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(y),b.container.appendChild(D)),b.container.appendChild(x),b.container.appendChild(z));null!=l&&(v=b.selectionCellsHandler.getHandler(l.cell),null!=v&&null!=v.setHandlesVisible&&v.setHandlesVisible(!1));A=!0}else{k=[F,G,y,x,D,z];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m])}!A&&
+null!=v&&v.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=u&&H==B)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=H||!b.isSplitTarget(f,d,c))){for(;null!=f&&!b.isValidDropTarget(f,d,c)&&k.isVertex(k.getParent(f));)f=k.getParent(f);if(b.view.currentRoot==f||!b.isValidRoot(f)&&0==b.getModel().getChildCount(f)||b.isCellLocked(f)||k.isEdge(f))f=null}return f});s.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var b=[F,G,B,y,x,D,z],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=t&&null!=v&&v.reset();H=C=u=t=v=null};return s};
Sidebar.prototype.itemClicked=function(a,c,f,d){d=this.editorUi.editor.graph;if(mxEvent.isAltDown(f)){if(1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){c=null;for(var b=0;b<a.length&&null==c;b++)d.model.isVertex(a[b])&&(c=b);null!=c&&(this.dropAndConnect(d.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
c),d.scrollCellToVisible(d.getSelectionCell()))}}else mxEvent.isShiftDown(f)?d.isSelectionEmpty()||(this.updateShapes(a[0],d.getSelectionCells()),d.scrollCellToVisible(d.getSelectionCell())):(a=d.getInsertPoint(),c.drop(d,f,null,a.x,a.y),null!=this.editorUi.hoverIcons&&mxEvent.isTouchEvent(f)&&this.editorUi.hoverIcons.update(d.view.getState(d.getSelectionCell())))};
Sidebar.prototype.addClickHandler=function(a,c,f){var d=this.editorUi.editor.graph,b=c.mouseUp,e=null;mxEvent.addGestureListeners(a,function(b){e=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))});c.mouseUp=mxUtils.bind(this,function(g){if(!mxEvent.isPopupTrigger(g)&&null==this.currentGraph&&null!=e){var k=d.tolerance;Math.abs(e.x-mxEvent.getClientX(g))<=k&&Math.abs(e.y-mxEvent.getClientY(g))<=k&&this.itemClicked(f,c,g,a)}b.apply(c,arguments);e=null;this.currentElt=a})};
@@ -2397,7 +2397,7 @@ match.index)+(null!=e?e:b));d=match.index+b.length}}f.push(c.substring(d));retur
Graph.prototype.connectVertex=function(a,c,f,d,b){var e=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(e.x+=a.geometry.width/2,e.y-=f):c==mxConstants.DIRECTION_SOUTH?(e.x+=a.geometry.width/2,e.y+=a.geometry.height+f):(e.x=c==mxConstants.DIRECTION_WEST?e.x-f:e.x+(a.geometry.width+f),e.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));
var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(f.cell)&&(l=f.x,k=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(e.x+=a.parent.geometry.x,e.y+=a.parent.geometry.y);f=mxEvent.isControlDown(d)&&!b?null:this.getCellAt(l+e.x*g,k+e.y*g);this.model.isAncestor(f,a)&&(f=null);for(g=f;null!=g;){if(this.isCellLocked(g)){f=null;break}g=this.model.getParent(g)}null!=f&&(g=this.view.getState(a),l=this.view.getState(f),null!=g&&null!=l&&mxUtils.intersects(g,l)&&(f=null));
if(b=!mxEvent.isShiftDown(d)||b)c==mxConstants.DIRECTION_NORTH?e.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?e.y+=a.geometry.height/2:e.x=c==mxConstants.DIRECTION_WEST?e.x-a.geometry.width/2:e.x+a.geometry.width/2;null!=f&&!this.isCellConnectable(f)&&(g=this.getModel().getParent(f),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(f=g));if(f==a||this.model.isEdge(f)||!this.isCellConnectable(f))f=null;g=[];this.model.beginUpdate();try{l=f;if(null==l&&b){for(var k=a,m=this.getCellGeometry(a);null!=
-m&&m.relative;)k=this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);m.x=e.x-m.width/2;m.y=e.y-m.height/2}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&b||null==f&&null!=m&&m.constructor==mxStackLayout?
+m&&m.relative;)k=this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);null!=m&&(m.x=e.x-m.width/2,m.y=e.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&b||null==f&&null!=m&&m.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==s.parent&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==f&&null!=l&&null!=m&&(null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
q));null!=s&&g.push(s);null==f&&null!=l&&g.push(l);null==l&&null!=s&&s.geometry.setTerminalPoint(e,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(c)?null!=f.getAttribute(c)?f.getAttribute(c):"":null),f=this.model.getParent(f);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
@@ -2507,8 +2507,8 @@ a?a:d.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,a){if(0<=
"Control"!=a.type&&a.createRange().pasteHTML(b)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(b,a){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(a){a=b.apply(this,arguments);if(mxEvent.isTouchEvent(a.getEvent())&&null==a.getState()){var d=this.getCellAt(a.graphX,a.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,
a.graphX,a.graphY)||(a.state=this.view.getState(d),null!=a.state&&null!=a.state.shape&&(this.container.style.cursor=a.state.shape.node.style.cursor))}null==a.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return a};var a=!1,d=!1,e=!1,c=this.fireMouseEvent;this.fireMouseEvent=function(b,f,g){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),a=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),e=this.popupMenuHandler.isMenuShowing());c.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(b,c){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==c.getState()||!c.isSource(c.getState().control))&&(this.popupMenuHandler.popupTrigger||!e&&!mxEvent.isMouseEvent(c.getEvent())&&(d&&null==c.getCell()&&this.isSelectionEmpty()||a&&this.isCellSelected(c.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);
-return null!=b&&1==b.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var b=[],a=0,d=sel.rangeCount;a<d;++a)b.push(sel.getRangeAt(a));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var a=0,d=b.length;a<
-d;++a)sel.addRange(b[a])}else document.selection&&b.select&&b.select()};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,a){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+return null!=b&&1==b.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var b=[],a=0,d=sel.rangeCount;a<d;++a)b.push(sel.getRangeAt(a));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var a=0,
+d=b.length;a<d;++a)sel.addRange(b[a])}else document.selection&&b.select&&b.select()}catch(e){}};var b=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));b.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,a){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,a){g.apply(this,arguments);var d=this.graph.view.getState(b);this.textarea.className=null!=d&&1==d.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var d=this.graph.getModel().getParent(b),
e=this.graph.getCellGeometry(b);this.graph.getModel().isEdge(d)&&null!=e&&e.relative||this.graph.getModel().isEdge(b)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function a(b,d){d.originalNode=
b;b=b.firstChild;for(var e=d.firstChild;null!=b&&null!=e;)a(b,e),b=b.nextSibling,e=e.nextSibling;return d}function d(b,a){if(null!=b)if(a.originalNode!=b)e(b);else{b=b.firstChild;for(a=a.firstChild;null!=b;){var c=b.nextSibling;null==a?e(b):(d(b,a),a=a.nextSibling);b=c}}}function e(b){for(var a=b.firstChild;null!=a;){var d=a.nextSibling;e(a);a=d}(1!=b.nodeType||"BR"!==b.nodeName&&null==b.firstChild)&&(3!=b.nodeType||0==mxUtils.trim(mxUtils.getTextContent(b)).length)?b.parentNode.removeChild(b):(3==
@@ -2553,10 +2553,10 @@ mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.pa
function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&z.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(b,a){var d=null!=b&&0==b,e=this.state.getVisibleTerminalState(d),c=null!=b&&(0==b||b>=this.state.absolutePoints.length-
1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,e,d):null,d=null!=(null!=c?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),c):null)?this.fixedHandleImage:null!=c&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&(d-=1);return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,
mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?v:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var C=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),e=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&
-null!=e&&e.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return C.apply(this,arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?
-(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):G.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&
-F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var H=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){H.apply(this,arguments);
-null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var I=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var L=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){L.apply(this,arguments);var b=
+null!=e&&e.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return C.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?
+(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):F.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&
+G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var I=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){I.apply(this,arguments);
+null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var H=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){H.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var L=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){L.apply(this,arguments);var b=
!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var a=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,
function(b,d){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,a){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var d=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(d);
null!=d&&(b=!0);b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.updateLinkHint(b),this.graph.container.appendChild(this.linkHint));
@@ -2573,7 +2573,7 @@ this.changeHandler=null)}}();
(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function s(){mxActor.call(this)}function q(b,a){this.canvas=
b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=a;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function x(){mxCylinder.call(this)}function D(){mxShape.call(this)}function z(){mxShape.call(this)}function B(){mxEllipse.call(this)}function C(){mxShape.call(this)}
-function G(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function N(){mxCylinder.call(this)}function S(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function P(){mxArrowConnector.call(this);this.spacing=0}function E(){mxArrowConnector.call(this);this.spacing=0}function O(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
+function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function H(){mxShape.call(this)}function L(){mxShape.call(this)}function N(){mxCylinder.call(this)}function S(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function P(){mxArrowConnector.call(this);this.spacing=0}function E(){mxArrowConnector.call(this);this.spacing=0}function O(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
function T(){mxActor.call(this)}function J(){mxActor.call(this)}function K(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(){mxActor.call(this)}function U(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function V(){mxRhombus.call(this)}function ia(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
function ja(){mxActor.call(this)}function ga(){mxActor.call(this)}function oa(){mxActor.call(this)}function wa(b,a,d,e,c,f,g,k,l,m){g+=l;var n=e.clone();e.x-=c*(2*g+l);e.y-=f*(2*g+l);c*=g+l;f*=g+l;return function(){b.ellipse(n.x-c-g,n.y-f-g,2*g,2*g);m?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(b,a,d,e,c,f){a=Math.max(0,Math.min(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(b.moveTo(a,c),b.lineTo(a,a),
b.lineTo(0,0),b.moveTo(a,a),b.lineTo(e,a)):(b.moveTo(0,0),b.lineTo(e-a,0),b.lineTo(e,a),b.lineTo(e,c),b.lineTo(a,c),b.lineTo(0,c-a),b.lineTo(0,0),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var ta=Math.tan(mxUtils.toRadians(30)),na=(0.5-ta)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e,c/ta);b.translate((e-a)/2,(c-a)/2+a/4);b.moveTo(0,0.25*a);b.lineTo(0.5*a,a*na);b.lineTo(a,0.25*a);b.lineTo(0.5*a,(0.5-na)*a);b.lineTo(0,
@@ -2607,15 +2607,15 @@ f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSp
arguments)};mxCellRenderer.prototype.defaultShapes.ext=y;mxUtils.extend(x,mxCylinder);x.prototype.redrawPath=function(b,a,d,e,c,f){f?(b.moveTo(0,0),b.lineTo(e/2,c/2),b.lineTo(e,0),b.end()):(b.moveTo(0,0),b.lineTo(e,0),b.lineTo(e,c),b.lineTo(0,c),b.close())};mxCellRenderer.prototype.defaultShapes.message=x;mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.ellipse(e/4,0,e/2,c/4);b.fillAndStroke();b.begin();b.moveTo(e/2,c/4);b.lineTo(e/2,2*c/3);b.moveTo(e/2,
c/3);b.lineTo(0,c/3);b.moveTo(e/2,c/3);b.lineTo(e,c/3);b.moveTo(e/2,2*c/3);b.lineTo(0,c);b.moveTo(e/2,2*c/3);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=D;mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};z.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(0,c/4);b.lineTo(0,3*c/4);b.end();b.stroke();b.begin();b.moveTo(0,c/2);b.lineTo(e/6,c/2);b.end();
b.stroke();b.ellipse(e/6,0,5*e/6,c);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=z;mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+e/8,d+c);b.lineTo(a+7*e/8,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=B;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(e,0);b.lineTo(0,c);b.moveTo(0,
-0);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=C;mxUtils.extend(G,mxShape);G.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};G.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};G.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,c/
-4);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=G;mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,a)};F.prototype.paintBackground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
-g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,a,d,e,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=F&&(g=new g,g.apply(this.state),b.save(),g.paintVertexShape(b,a,d,e,f),b.restore()));f<c&&(b.setDashed(!0),b.begin(),b.moveTo(a+e/2,d+f),b.lineTo(a+e/2,d+c),b.end(),b.stroke())};F.prototype.paintForeground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-mxRectangleShape.prototype.paintForeground.call(this,b,a,d,e,Math.min(c,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=F;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(b.x,b.y,
-a,d)};H.prototype.paintBackground=function(b,a,d,e,c){var f=this.corner,g=Math.min(e,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(c,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));b.begin();b.moveTo(a,d);b.lineTo(a+g,d);b.lineTo(a+g,d+Math.max(0,k-1.5*f));b.lineTo(a+Math.max(0,g-f),d+k);b.lineTo(a,d+k);b.close();b.fillAndStroke();b.begin();b.moveTo(a+g,d);b.lineTo(a+e,d);b.lineTo(a+e,d+c);b.lineTo(a,d+c);b.lineTo(a,d+k);b.stroke()};
-mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(b,a,d,e){e=F.prototype.size;null!=a&&(e=mxUtils.getValue(a.style,"size",e)*a.view.scale);a=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;d.x<b.getCenterX()&&(a=-1*(a+1));return new mxPoint(b.getCenterX()+a,Math.min(b.y+b.height,Math.max(b.y+e,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,a,d,e){e=!0;return mxPerimeter.RectanglePerimeter.apply(this,
+0);b.lineTo(e,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=C;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};F.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};F.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,1.1*(c/8));b.lineTo(5*e/8,c/
+4);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,a)};G.prototype.paintBackground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
+g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,a,d,e,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=G&&(g=new g,g.apply(this.state),b.save(),g.paintVertexShape(b,a,d,e,f),b.restore()));f<c&&(b.setDashed(!0),b.begin(),b.moveTo(a+e/2,d+f),b.lineTo(a+e/2,d+c),b.end(),b.stroke())};G.prototype.paintForeground=function(b,a,d,e,c){var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+mxRectangleShape.prototype.paintForeground.call(this,b,a,d,e,Math.min(c,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.prototype.getLabelBounds=function(b){var a=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(b.x,b.y,
+a,d)};I.prototype.paintBackground=function(b,a,d,e,c){var f=this.corner,g=Math.min(e,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(c,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));b.begin();b.moveTo(a,d);b.lineTo(a+g,d);b.lineTo(a+g,d+Math.max(0,k-1.5*f));b.lineTo(a+Math.max(0,g-f),d+k);b.lineTo(a,d+k);b.close();b.fillAndStroke();b.begin();b.moveTo(a+g,d);b.lineTo(a+e,d);b.lineTo(a+e,d+c);b.lineTo(a,d+c);b.lineTo(a,d+k);b.stroke()};
+mxCellRenderer.prototype.defaultShapes.umlFrame=I;mxPerimeter.LifelinePerimeter=function(b,a,d,e){e=G.prototype.size;null!=a&&(e=mxUtils.getValue(a.style,"size",e)*a.view.scale);a=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;d.x<b.getCenterX()&&(a=-1*(a+1));return new mxPoint(b.getCenterX()+a,Math.min(b.y+b.height,Math.max(b.y+e,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,a,d,e){e=!0;return mxPerimeter.RectanglePerimeter.apply(this,
arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,a,d,e){e=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;null!=a.style.backboneSize&&(e+=parseFloat(a.style.backboneSize)*a.view.scale/2-1);if("south"==a.style[mxConstants.STYLE_DIRECTION]||"north"==a.style[mxConstants.STYLE_DIRECTION])return d.x<b.getCenterX()&&(e=-1*(e+1)),new mxPoint(b.getCenterX()+e,Math.min(b.y+b.height,Math.max(b.y,d.y)));
-d.y<b.getCenterY()&&(e+=1,e*=-1);return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+e)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((e-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(e/2,f);b.lineTo(e/2,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
-I;mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(a,d);b.begin();b.moveTo(e/2,f+g);b.lineTo(e/2,c);b.end();b.stroke();b.begin();b.moveTo((e-f)/2-g,f/2);b.quadTo((e-f)/2-g,f+g,e/2,f+g);b.quadTo((e+f)/2+g,f+g,(e+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
+d.y<b.getCenterY()&&(e+=1,e*=-1);return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+e)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(H,mxShape);H.prototype.size=10;H.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((e-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(e/2,f);b.lineTo(e/2,c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
+H;mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,e,c){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(a,d);b.begin();b.moveTo(e/2,f+g);b.lineTo(e/2,c);b.end();b.stroke();b.begin();b.moveTo((e-f)/2-g,f/2);b.quadTo((e-f)/2-g,f+g,e/2,f+g);b.quadTo((e+f)/2+g,f+g,(e+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
L;mxUtils.extend(N,mxCylinder);N.prototype.jettyWidth=32;N.prototype.jettyHeight=12;N.prototype.redrawPath=function(b,a,d,e,c,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));a=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));d=g/2;var g=d+g/2,k=0.3*c-a/2,l=0.7*c-a/2;f?(b.moveTo(d,k),b.lineTo(g,k),b.lineTo(g,k+a),b.lineTo(d,k+a),b.moveTo(d,l),b.lineTo(g,l),b.lineTo(g,l+a),b.lineTo(d,l+a)):(b.moveTo(d,0),b.lineTo(e,0),b.lineTo(e,c),b.lineTo(d,c),
b.lineTo(d,l+a),b.lineTo(0,l+a),b.lineTo(0,l),b.lineTo(d,l),b.lineTo(d,k+a),b.lineTo(0,k+a),b.lineTo(0,k),b.lineTo(d,k),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.component=N;mxUtils.extend(S,mxDoubleEllipse);S.prototype.outerStroke=!0;S.prototype.paintVertexShape=function(b,a,d,e,c){var f=Math.min(4,Math.min(e/5,c/5));0<e&&0<c&&(b.ellipse(a+f,d+f,e-2*f,c-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(a,d,e,c),b.stroke())};mxCellRenderer.prototype.defaultShapes.endState=
S;mxUtils.extend(W,S);W.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=W;mxUtils.extend(P,mxArrowConnector);P.prototype.defaultWidth=4;P.prototype.isOpenEnded=function(){return!0};P.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};P.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=P;mxUtils.extend(E,mxArrowConnector);E.prototype.defaultWidth=
@@ -2659,8 +2659,8 @@ d,e,c,f){a=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxU
b.style.endWidth=Math.max(0,Math.round(2*d)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(l.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<a/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<
a&&(b.style.endWidth=b.style.startWidth))})));return d},swimlane:function(b){var a=[ha(b,[mxConstants.STYLE_STARTSIZE],function(a){var d=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(a.getCenterX(),a.y+Math.max(0,Math.min(a.height,d))):new mxPoint(a.x+Math.max(0,Math.min(a.width,d)),a.getCenterY())},function(a,d){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(a.height,d.y-a.y))):Math.round(Math.max(0,Math.min(a.width,d.x-a.x)))})];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var d=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));a.push(ma(b,d/2))}return a},label:la(),ext:la(),rectangle:la(),triangle:la(),rhombus:la(),hexagon:la(),umlLifeline:function(b){return[ha(b,["size"],function(b){var a=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",F.prototype.size))));return new mxPoint(b.getCenterX(),b.y+a)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))},!1)]},umlFrame:function(b){var a=[ha(b,["width","height"],function(b){var a=Math.max(H.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",H.prototype.width))),d=Math.max(1.5*H.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(b.x+a,b.y+d)},function(b,
-a){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(b.width,a.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(b.height,a.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},process:function(b){var a=[ha(b,["size"],function(b){var a=Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(b.x+b.width*a,b.y+b.height/4)},function(b,a){this.state.style.size=
+"size",G.prototype.size))));return new mxPoint(b.getCenterX(),b.y+a)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))},!1)]},umlFrame:function(b){var a=[ha(b,["width","height"],function(b){var a=Math.max(I.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),d=Math.max(1.5*I.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",I.prototype.height)));return new mxPoint(b.x+a,b.y+d)},function(b,
+a){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(b.width,a.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(b.height,a.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},process:function(b){var a=[ha(b,["size"],function(b){var a=Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(b.x+b.width*a,b.y+b.height/4)},function(b,a){this.state.style.size=
Math.max(0,Math.min(0.5,(a.x-b.x)/b.width))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},cross:function(b){return[ha(b,["size"],function(b){var a=Math.min(b.width,b.height),a=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ga.prototype.size)))*a/2;return new mxPoint(b.getCenterX()-a,b.getCenterY()-a)},function(b,a){var d=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(2*(Math.max(0,b.getCenterY()-a.y)/d),2*(Math.max(0,
b.getCenterX()-a.x)/d))))})]},note:function(a){return[ha(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",b.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-a.x),Math.min(b.height,a.y-b.y))))})]},manualInput:function(b){var a=[ha(b,["size"],function(b){var a=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
"size",O.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*a/4)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(a.y-b.y)/3)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a},dataStorage:function(b){return[ha(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(b.x+(1-a)*b.width,b.getCenterY())},function(b,a){this.state.style.size=Math.max(0,
@@ -2686,13 +2686,13 @@ O.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.cons
0.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.35),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.65),!1),new mxConnectionConstraint(new mxPoint(1,
0.35),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.65),!1),new mxConnectionConstraint(new mxPoint(0.25,1),!1),new mxConnectionConstraint(new mxPoint(0.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,
1),!0),new mxConnectionConstraint(new mxPoint(0.1,0.25),!1),new mxConnectionConstraint(new mxPoint(0.2,0.5),!1),new mxConnectionConstraint(new mxPoint(0.1,0.75),!1),new mxConnectionConstraint(new mxPoint(0.9,0.25),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.9,0.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),
-!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),
+!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),
new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.375,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.625,0),!0),new mxConnectionConstraint(new mxPoint(0.125,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0.125,0.75),!1),new mxConnectionConstraint(new mxPoint(0.875,
0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(0.875,0.75),!1),new mxConnectionConstraint(new mxPoint(0.375,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0.25),!1),new mxConnectionConstraint(new mxPoint(0.4,0.1),!1),new mxConnectionConstraint(new mxPoint(0.16,
0.55),!1),new mxConnectionConstraint(new mxPoint(0.07,0.4),!1),new mxConnectionConstraint(new mxPoint(0.31,0.8),!1),new mxConnectionConstraint(new mxPoint(0.13,0.77),!1),new mxConnectionConstraint(new mxPoint(0.8,0.8),!1),new mxConnectionConstraint(new mxPoint(0.55,0.95),!1),new mxConnectionConstraint(new mxPoint(0.875,0.5),!1),new mxConnectionConstraint(new mxPoint(0.96,0.7),!1),new mxConnectionConstraint(new mxPoint(0.625,0.2),!1),new mxConnectionConstraint(new mxPoint(0.88,0.25),!1)];n.prototype.constraints=
mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,
0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;T.prototype.constraints=null;M.prototype.constraints=null;J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
-0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];F.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
+0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];G.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
0.25),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.175,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(b){d.escape();var a=d.getDeletableCells(d.getSelectionCells());if(null!=a&&0<a.length){var e=d.model.getParents(a);d.removeCells(a,b);if(null!=e){b=[];for(a=0;a<e.length;a++)(d.model.isVertex(e[a])||d.model.isEdge(e[a]))&&b.push(e[a]);d.setSelectionCells(b)}}}var c=this.editorUi,f=c.editor,d=f.graph,b=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(c.getUrl())});this.addAction("open...",
function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,a){try{var d=mxUtils.parseXml(b),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var c=e.getChildren(e.getChildAt(e.getRoot(),0));f.graph.setSelectionCells(f.graph.importCells(c))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -2782,8 +2782,8 @@ Menus.prototype.createPopupMenu=function(a,c,f){var d=this.editorUi.editor.graph
"-"],null,f);if(d.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null)){var e=d.selectionCellsHandler.getHandler(c),g=!1;if(e instanceof mxEdgeHandler&&null!=e.bends&&2<e.bends.length){var g=e.getHandleForEvent(d.updateMouseEvent(new mxMouseEvent(f))),k=this.editorUi.actions.get("removeWaypoint");k.handler=e;k.index=g;g=0<g&&g<e.bends.length-1}this.addMenuItems(a,["-",g?"removeWaypoint":
"addWaypoint"],null,f);e=d.getModel().getGeometry(c);null!=e&&null!=e.points&&0<e.points.length&&this.addMenuItems(a,["clearWaypoints"],null,f)}1<d.getSelectionCount()?(a.addSeparator(),this.addMenuItems(a,["group"],null,f)):1==d.getSelectionCount()&&!d.getModel().isEdge(c)&&!d.isSwimlane(c)&&0<d.getModel().getChildCount(c)&&(a.addSeparator(),this.addMenuItems(a,["ungroup"],null,f));1==d.getSelectionCount()&&(a.addSeparator(),this.addMenuItems(a,["editData","editLink"],null,f),d.getModel().isVertex(c)&&
null!=mxUtils.getValue(b.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",null,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"..."))}}else this.addMenuItems(a,["-","selectVertices","selectEdges","-","selectAll"],null,f)};
-Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)(function(b){var a=c.addMenu(mxResources.get(f[d]),b.funct);null!=a&&b.addListener("stateChanged",function(){(a.enabled=b.enabled)?(a.className="geItem",8==document.documentMode&&(a.style.color="")):(a.className="geItem mxDisabled",8==document.documentMode&&(a.style.color="#c3c3c3"))})})(this.get(f[d]));return c};function Menubar(a,c){this.editorUi=a;this.container=c}
-Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Menubar.prototype.addMenu=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geItem";mxUtils.write(f,a);this.addMenuHandler(f,c);this.container.appendChild(f);return f};
+Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)mxUtils.bind(this,function(b){var a=c.addMenu(mxResources.get(f[d]),mxUtils.bind(this,function(){b.funct.apply(this,arguments)}));null!=a&&b.addListener("stateChanged",function(){(a.enabled=b.enabled)?(a.className="geItem",8==document.documentMode&&(a.style.color="")):(a.className="geItem mxDisabled",8==document.documentMode&&(a.style.color="#c3c3c3"))})})(this.get(f[d]));return c};
+function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Menubar.prototype.addMenu=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geItem";mxUtils.write(f,a);this.addMenuHandler(f,c);this.container.appendChild(f);return f};
Menubar.prototype.addMenuHandler=function(a,c){if(null!=c){var f=!0,d=mxUtils.bind(this,function(b){if(f&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(c);d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();d.destroy()});var g=mxUtils.getOffset(a);d.popup(g.x,g.y+a.offsetHeight,null,
b);this.editorUi.setCurrentMenu(d,a)}mxEvent.consume(b)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(b){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),d(b))}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(){f=this.currentElt!=a}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){d(b);f=!0}))}};Menubar.prototype.destroy=function(){};
function Menu(a,c){mxEventSource.call(this);this.funct=a;this.enabled=null!=c?c:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,c){this.funct(a,c)};EditorUi.prototype.createMenus=function(){return new Menus(this)};Format=function(a,c){this.editorUi=a;this.container=c};
@@ -2871,16 +2871,16 @@ l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px
")");var n=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([n]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT]),p),
s=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),p),q=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([r,s,q]);if(d.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([t])}var v=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),u=this.editorUi.toolbar.addButton("geSprite-middle",
-mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),A=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([v,u,A]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,x,D,z,B,C,G;d.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),A=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([v,u,A]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,x,D,z,B,C,F;d.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",
A.style.display="none",n.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([D,y=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
D.style.marginRight="9px",t=p.cloneNode(!1),t.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
!1,null)},t),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},t)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),t.style.height="40"),a.appendChild(t)):(m[2].style.marginRight="9px",q.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px";
-p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var F=document.createElement("select");F.style.position="absolute";F.style.right="20px";F.style.width="97px";F.style.marginTop="-2px";for(var H="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),I={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
+p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var G=document.createElement("select");G.style.position="absolute";G.style.right="20px";G.style.width="97px";G.style.marginTop="-2px";for(var I="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),H={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<H.length;t++){var L=document.createElement("option");L.setAttribute("value",H[t]);mxUtils.write(L,mxResources.get(H[t]));F.appendChild(L)}p.appendChild(F);H=e.cloneNode(!1);H.style.marginLeft="0px";H.style.paddingTop=
-"4px";H.style.paddingBottom="4px";H.style.fontWeight="normal";mxUtils.write(H,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],S={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<L.length;t++){var W=document.createElement("option");W.setAttribute("value",L[t]);mxUtils.write(W,
-mxResources.get(L[t]));N.appendChild(W)}H.appendChild(N);d.isEditing()||(a.appendChild(p),mxEvent.addListener(F,"change",function(b){d.getModel().beginUpdate();try{var a=I[F.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
-a.appendChild(H),mxEvent.addListener(N,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,S[N.value],d.getSelectionCells());mxEvent.consume(b)}));var P=document.createElement("input");P.style.textAlign="right";P.style.marginTop="4px";mxClient.IS_QUIRKS||(P.style.position="absolute",P.style.right="32px");P.style.width="46px";P.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(P);var E=null,p=this.installInputHandler(P,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<I.length;t++){var L=document.createElement("option");L.setAttribute("value",I[t]);mxUtils.write(L,mxResources.get(I[t]));G.appendChild(L)}p.appendChild(G);I=e.cloneNode(!1);I.style.marginLeft="0px";I.style.paddingTop=
+"4px";I.style.paddingBottom="4px";I.style.fontWeight="normal";mxUtils.write(I,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],S={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<L.length;t++){var W=document.createElement("option");W.setAttribute("value",L[t]);mxUtils.write(W,
+mxResources.get(L[t]));N.appendChild(W)}I.appendChild(N);d.isEditing()||(a.appendChild(p),mxEvent.addListener(G,"change",function(b){d.getModel().beginUpdate();try{var a=H[G.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
+a.appendChild(I),mxEvent.addListener(N,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,S[N.value],d.getSelectionCells());mxEvent.consume(b)}));var P=document.createElement("input");P.style.textAlign="right";P.style.marginTop="4px";mxClient.IS_QUIRKS||(P.style.position="absolute",P.style.right="32px");P.style.width="46px";P.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(P);var E=null,p=this.installInputHandler(P,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){E=b;document.execCommand("fontSize",!1,"4");b=d.cellEditor.textarea.getElementsByTagName("font");for(var a=0;a<b.length;a++)if("4"==b[a].getAttribute("size")){b[a].removeAttribute("size");b[a].style.fontSize=E+"px";window.setTimeout(function(){P.value=E+" pt";E=null},0);break}},!0),p=this.createStepper(P,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=P.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
k.style.cssFloat="right";var O=null,Q="#ffffff",M=null,T="#000000",J=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Q},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){O=b},destroy:function(){O=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");J.style.fontWeight="bold";var K=this.createCellColorOption(mxResources.get("borderColor"),
mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");K.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return T},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){J.style.display=null==b||b==mxConstants.NONE?"none":"";K.style.display=
@@ -2891,21 +2891,21 @@ mxResources.get("spacing"));k.appendChild(p);var R,X,da,ca,U,Z=this.addUnitInput
e&&e.nodeType!=mxConstants.NODETYPE_ELEMENT;)e=e.parentNode;null!=e&&e==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("FONT"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="\x3cfont\x3e"+d.cellEditor.textarea.innerHTML+"\x3c/font\x3e"),e=d.cellEditor.textarea.firstChild);null!=e&&e!=d.cellEditor.textarea&&(e.style.lineHeight=a+"%");b.value=a+" %"},function(b){aa=b;mxEvent.addListener(b,"mousedown",function(){ea=d.cellEditor.saveSelection()});mxEvent.addListener(b,
"touchstart",function(){ea=d.cellEditor.saveSelection()});b.value="120 %"}));g=e.cloneNode(!1);g.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],g,!0);p=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},g),this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(b){this.editorUi.menus.addInsertTableItem(b)}))];
this.styleButtons(k);this.styleButtons(p);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(g);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=C?C.cellIndex:0))}catch(b){alert(b)}},k),
-this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=C?C.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=B&&null!=C&&d.deleteColumn(B,C.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=G&&
-d.selectNode(d.insertRow(B,G.sectionRowIndex))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=G&&d.selectNode(d.insertRow(B,G.sectionRowIndex+1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=B&&null!=G&&d.deleteRow(B,G.sectionRowIndex)}catch(b){alert(b)}},k)];this.styleButtons(p);p[2].style.marginRight="9px";g=this.createPanel();
+this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=C?C.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=B&&null!=C&&d.deleteColumn(B,C.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=F&&
+d.selectNode(d.insertRow(B,F.sectionRowIndex))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=B&&null!=F&&d.selectNode(d.insertRow(B,F.sectionRowIndex+1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=B&&null!=F&&d.deleteRow(B,F.sectionRowIndex)}catch(b){alert(b)}},k)];this.styleButtons(p);p[2].style.marginRight="9px";g=this.createPanel();
g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("table")));g.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),g.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";p=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=B){var b=B.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+
("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){null==b||b==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=""):(B.setAttribute("border","1"),B.style.border="1px solid "+b,B.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=B){var b=B.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){B.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=B){var b=B.getAttribute("cellPadding")||0,b=new FilenameDialog(f,b,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length?B.setAttribute("cellPadding",
b):B.removeAttribute("cellPadding")}),mxResources.get("spacing"));f.showDialog(b.container,300,80,!0,!0);b.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=B&&B.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},
e)];this.styleButtons(p);p[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(g),mxUtils.br(g));g.appendChild(e);a.appendChild(g);z=g}else a.appendChild(g),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var fa=mxUtils.bind(this,function(a,d,e){b=this.format.getSelectionState();a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=P)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),P.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(r,a==mxConstants.ALIGN_LEFT);c(s,a==mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(A,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);F.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
+c(r,a==mxConstants.ALIGN_LEFT);c(s,a==mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(A,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);d=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);G.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(b.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(e||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING,2)),ba.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),Z.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ia)a=parseFloat(mxUtils.getValue(b.style,
mxConstants.STYLE_SPACING_RIGHT,0)),ia.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=V)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),V.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),Y.value=isNaN(a)?"":a+" pt"});X=this.installInputHandler(ba,mxConstants.STYLE_SPACING,2,-999,999," pt");R=this.installInputHandler(Z,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");U=this.installInputHandler(ia,
mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ca=this.installInputHandler(V,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");da=this.installInputHandler(Y,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(P,fa);this.addKeyHandler(ba,fa);this.addKeyHandler(Z,fa);this.addKeyHandler(ia,fa);this.addKeyHandler(V,fa);this.addKeyHandler(Y,fa);d.getModel().addListener(mxEvent.CHANGE,fa);this.listeners.push({destroy:function(){d.getModel().removeListener(fa)}});fa();if(d.cellEditor.isContentEditing()){var ja=
!1,e=function(){ja||(ja=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b){var a=mxUtils.getCurrentStyle(b);if(null!=a){c(m[0],"bold"==a.fontWeight||null!=d.getParentByName(b,"B",d.cellEditor.textarea));c(m[1],"italic"==a.fontStyle||null!=d.getParentByName(b,"I",d.cellEditor.textarea));c(m[2],null!=d.getParentByName(b,"U",d.cellEditor.textarea));c(r,"left"==a.textAlign);c(s,"center"==a.textAlign);c(q,"right"==
-a.textAlign);c(D,"justify"==a.textAlign);c(x,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(y,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));B=d.getParentByName(b,"TABLE",d.cellEditor.textarea);G=null==B?null:d.getParentByName(b,"TR",B);C=null==B?null:d.getParentByName(b,"TD",B);z.style.display=null!=B?"":"none";if(document.activeElement!=P){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=E?(b.removeAttribute("size"),b.style.fontSize=E+"px",E=null):P.value=parseFloat(a.fontSize)+
+a.textAlign);c(D,"justify"==a.textAlign);c(x,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(y,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));B=d.getParentByName(b,"TABLE",d.cellEditor.textarea);F=null==B?null:d.getParentByName(b,"TR",B);C=null==B?null:d.getParentByName(b,"TD",B);z.style.display=null!=B?"":"none";if(document.activeElement!=P){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=E?(b.removeAttribute("size"),b.style.fontSize=E+"px",E=null):P.value=parseFloat(a.fontSize)+
" pt";var b=b.style.lineHeight||a.lineHeight,e=parseFloat(b);"px"==b.substring(b.length-2)&&(e/=parseFloat(a.fontSize));"%"!=b.substring(b.length-1)&&(e*=100);aa.value=e+" %"}b=a.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});e=a.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,e){return"#"+
("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});null!=M&&(T="#"==b.charAt(0)?b:"#000000",M(T,!0));null!=O&&(Q="#"==e.charAt(0)?e:null,O(Q,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}ja=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
@@ -2958,7 +2958,7 @@ this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}));this.addArrow(t,8);this.addArrow(x);this.addArrow(D);
this.addArrow(z);A=this.addArrow(m,9);A.className="geIcon";A.style.width="84px";y=this.addArrow(n,9);y.className="geIcon";y.style.width="22px";var B=document.createElement("div");B.style.width="85px";B.style.height="1px";B.style.borderBottom="1px solid black";B.style.marginBottom="9px";A.appendChild(B);var C=document.createElement("div");C.style.width="23px";C.style.height="1px";C.style.borderBottom="1px solid black";C.style.marginBottom="9px";y.appendChild(C);m.style.height="15px";n.style.height=
"15px";t.style.height="15px";x.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";z.style.marginLeft="3px";z.style.height="17px";a.appendChild(g);a.appendChild(q);a.appendChild(r);m=r.cloneNode(!1);m.style.paddingBottom="6px";m.style.paddingTop="4px";m.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));
-m.appendChild(n);var G,F,H=this.addUnitInput(m,"pt",74,33,function(){G.apply(this,arguments)}),I=this.addUnitInput(m,"pt",20,33,function(){F.apply(this,arguments)});mxUtils.br(m);A=document.createElement("div");A.style.height="8px";m.appendChild(A);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,N,S=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,
+m.appendChild(n);var F,G,I=this.addUnitInput(m,"pt",74,33,function(){F.apply(this,arguments)}),H=this.addUnitInput(m,"pt",20,33,function(){G.apply(this,arguments)});mxUtils.br(m);A=document.createElement("div");A.style.height="8px";m.appendChild(A);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,N,S=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,
mxResources.get("spacing"),74,50);this.addLabel(m,mxResources.get("size"),20,50);mxUtils.br(m);g=g.cloneNode(!1);g.style.fontWeight="normal";g.style.position="relative";g.style.paddingLeft="16px";g.style.marginBottom="2px";g.style.marginTop="6px";g.style.borderWidth="0px";g.style.paddingBottom="18px";n=document.createElement("div");n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,
mxResources.get("perimeter"));g.appendChild(n);var P,E=this.addUnitInput(g,"pt",20,41,function(){P.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(m)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var O=mxUtils.bind(this,function(a,c,f){function g(b,a,c,f){c=c.getElementsByTagName("div")[0];c.className=d.getCssClassForMarker(f,e.style.shape,b,a);return c}
e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(f||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=u)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";k.style.visibility="connector"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?k.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,
@@ -2966,9 +2966,9 @@ null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHE
c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":
"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==b.getSelectionCount()?(q.style.display="",r.style.display="none"):(q.style.display="none",r.style.display="");a=g(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,
"startFill","1"),D,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),z,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(z,
-30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(z,100));if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),W.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),S.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(a)?
-"":a+" pt";if(f||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=E)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),E.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(I,
-mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");P=this.installInputHandler(E,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(v,O);this.addKeyHandler(W,O);this.addKeyHandler(S,O);this.addKeyHandler(I,O);this.addKeyHandler(H,O);this.addKeyHandler(E,O);b.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){b.getModel().removeListener(O)}});
+30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(z,100));if(f||document.activeElement!=W)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),W.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),S.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=H)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),H.value=isNaN(a)?
+"":a+" pt";if(f||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),I.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=E)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),E.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");G=this.installInputHandler(H,
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");P=this.installInputHandler(E,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(v,O);this.addKeyHandler(W,O);this.addKeyHandler(S,O);this.addKeyHandler(H,O);this.addKeyHandler(I,O);this.addKeyHandler(E,O);b.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){b.getModel().removeListener(O)}});
O();return a};
StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="0px";a.style.paddingBottom="2px";var d=document.createElement("table");mxClient.IS_QUIRKS&&(d.style.fontSize="1em");d.style.width="100%";d.style.fontWeight="bold";d.style.paddingRight="20px";var b=document.createElement("tbody"),e=document.createElement("tr");e.style.padding="0px";var g=document.createElement("td");g.style.padding="0px";g.style.width="50%";g.setAttribute("valign",
"top");var k=g.cloneNode(!0);k.style.paddingLeft="8px";e.appendChild(g);e.appendChild(k);b.appendChild(e);d.appendChild(b);a.appendChild(d);var l=g,m=0,n=mxUtils.bind(this,function(b,a,d){b=this.createCellOption(b,a,d);b.style.width="100%";l.appendChild(b);l=l==g?k:g;m++}),p=mxUtils.bind(this,function(b,d,e){f=this.format.getSelectionState();g.innerHTML="";k.innerHTML="";l=g;f.rounded&&n(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==f.style.shape&&n(mxResources.get("divider"),
@@ -3938,12 +3938,12 @@ q.vertex=!0;var t=new mxCell("",new mxGeometry(370,477,10,5),"shape\x3dtriangle;
u.vertex=!0;var A=new mxCell("",new mxGeometry(780,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");A.vertex=!0;var y=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");y.vertex=!0;var x=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;fontSize\x3d12;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
x.vertex=!0;var D=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");D.vertex=!0;var z=new mxCell("Design Department",new mxGeometry(10,583,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;fontSize\x3d12;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
z.vertex=!0;var B=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");B.vertex=!0;var C=new mxCell("Supply Department",new mxGeometry(10,623,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d5;");
-C.vertex=!0;var G=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");G.vertex=!0;var F=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");F.vertex=!0;var H=new mxCell("News",new mxGeometry(440,543,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
-H.vertex=!0;var I=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");I.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#55BFE0;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");L.vertex=!0;var N=new mxCell("",new mxGeometry(420,
+C.vertex=!0;var F=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");F.vertex=!0;var G=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");G.vertex=!0;var I=new mxCell("News",new mxGeometry(440,543,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
+I.vertex=!0;var H=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");H.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#55BFE0;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");L.vertex=!0;var N=new mxCell("",new mxGeometry(420,
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");N.vertex=!0;var S=new mxCell("Documents",new mxGeometry(440,583,70,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#EFAC43;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");S.vertex=!0;var W=new mxCell("",new mxGeometry(420,603,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");
W.vertex=!0;var P=new mxCell("Media",new mxGeometry(440,603,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");P.vertex=!0;var E=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");E.vertex=!0;var O=new mxCell("Text",new mxGeometry(440,623,30,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#999999;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
O.vertex=!0;var Q=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");Q.vertex=!0;var M=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fillColor\x3d#ffffff;align\x3dcenter;rSize\x3d5;strokeColor\x3d#dddddd;fontSize\x3d16;whiteSpace\x3dwrap;");
-M.vertex=!0;var T=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");T.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,r,s,q,t,v,u,A,y,x,D,z,B,C,G,F,H,I,L,N,S,W,P,E,O,Q,M,T],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
+M.vertex=!0;var T=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");T.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,r,s,q,t,v,u,A,y,x,D,z,B,C,F,G,I,H,L,N,S,W,P,E,O,Q,M,T],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
0,800,50),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.horLines;strokeColor\x3d#dddddd;fillColor\x3d#fdfdfd;");c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;strokeColor\x3d#dddddd;fillColor\x3dnone;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d10;fontStyle\x3d1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark as OK",new mxGeometry(0,
0.5,90,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(150,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark as Violation",new mxGeometry(0,0.5,120,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(250,
-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,0.5,100,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-110,-15);d.vertex=!0;c.insert(d);d=new mxCell("Phone",new mxGeometry(40,70,100,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");
@@ -7173,15 +7173,15 @@ b.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop=mxC
function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);
a.movePickersToTop()}))}),r.className="geBtn",f.appendChild(r))}mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&n(l.value)});r=mxUtils.button(mxResources.get("apply"),function(){n(l.value)});r.className="geBtn gePrimaryBtn";f.appendChild(r);a.editor.cancelFirst||f.appendChild(c);Graph.fileSupport&&(f.style.marginTop="120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=document.createElement("div"),
c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),k.appendChild(c));k.appendChild(f);this.container=k};
-PrintDialog.prototype.create=function(a){function c(){p.value=Math.min(g,Math.max(parseInt(p.value),parseInt(n.value)));n.value=Math.min(g,Math.min(parseInt(p.value),parseInt(n.value)))}function f(a){var b=parseInt(F.value)/100;isNaN(b)&&(b=1,F.value="100 %");var b=0.75*b,c=d.getGraphBounds(),e=0,f=0,g=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/d.pageScale,l=q.checked;if(l)var k=parseInt(C.value),m=parseInt(G.value),k=Math.min(g.height*m/(c.height/d.view.scale),g.width*k/(c.width/d.view.scale));
+PrintDialog.prototype.create=function(a){function c(){p.value=Math.min(g,Math.max(parseInt(p.value),parseInt(n.value)));n.value=Math.min(g,Math.min(parseInt(p.value),parseInt(n.value)))}function f(a){var b=parseInt(G.value)/100;isNaN(b)&&(b=1,G.value="100 %");var b=0.75*b,c=d.getGraphBounds(),e=0,f=0,g=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/d.pageScale,l=q.checked;if(l)var k=parseInt(C.value),m=parseInt(F.value),k=Math.min(g.height*m/(c.height/d.view.scale),g.width*k/(c.width/d.view.scale));
else k=parseInt(s.value)/(100*d.pageScale),isNaN(k)&&(b=1/d.pageScale,s.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*b);g.height=Math.ceil(g.height*b);k*=b;!l&&d.pageVisible?(b=d.getPageLayout(),e-=b.x*g.width,f-=b.y*g.height):l=!0;return PrintDialog.showPreview(PrintDialog.createPrintPreview(d,k,g,0,e,f,l,a),a)}var d=a.editor.graph,b=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("print"));b.appendChild(e);
var g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","all");l.setAttribute("type","radio");l.setAttribute("name","pages");k.appendChild(l);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));k.appendChild(e);mxUtils.br(k);var m=l.cloneNode(!0);m.setAttribute("value","range");
k.appendChild(m);l.setAttribute("checked","checked");e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");k.appendChild(e);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";k.appendChild(n);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));k.appendChild(e);var p=n.cloneNode(!0);k.appendChild(p);mxEvent.addListener(n,"focus",
function(){m.checked=!0});mxEvent.addListener(p,"focus",function(){m.checked=!0});mxEvent.addListener(n,"change",c);mxEvent.addListener(p,"change",c);n.setAttribute("max",g);p.setAttribute("max",g);1<g&&b.appendChild(k);l=document.createElement("div");l.style.marginBottom="10px";var r=document.createElement("input");r.style.marginRight="8px";r.setAttribute("value","adjust");r.setAttribute("type","radio");r.setAttribute("name","printZoom");l.appendChild(r);e=document.createElement("span");mxUtils.write(e,
mxResources.get("adjustTo"));l.appendChild(e);var s=document.createElement("input");s.style.cssText="margin:0 8px 0 8px;";s.setAttribute("value","100 %");s.style.width="50px";l.appendChild(s);mxEvent.addListener(s,"focus",function(){r.checked=!0});b.appendChild(l);var k=k.cloneNode(!1),q=r.cloneNode(!0);q.setAttribute("value","fit");r.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(q);
k.appendChild(e);l=document.createElement("table");l.style.display="inline-block";var t=document.createElement("tbody"),v=document.createElement("tr"),u=v.cloneNode(!0),A=document.createElement("td"),y=A.cloneNode(!0),x=A.cloneNode(!0),D=A.cloneNode(!0),z=A.cloneNode(!0),B=A.cloneNode(!0);A.style.textAlign="right";D.style.textAlign="right";mxUtils.write(A,mxResources.get("fitTo"));var C=document.createElement("input");C.style.cssText="margin:0 8px 0 8px;";C.setAttribute("value","1");C.setAttribute("min",
-"1");C.setAttribute("type","number");C.style.width="40px";y.appendChild(C);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));x.appendChild(e);mxUtils.write(D,mxResources.get("fitToBy"));var G=C.cloneNode(!0);z.appendChild(G);mxEvent.addListener(C,"focus",function(){q.checked=!0});mxEvent.addListener(G,"focus",function(){q.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));B.appendChild(e);v.appendChild(A);v.appendChild(y);
-v.appendChild(x);u.appendChild(D);u.appendChild(z);u.appendChild(B);t.appendChild(v);t.appendChild(u);l.appendChild(t);k.appendChild(l);b.appendChild(k);k=document.createElement("div");e=document.createElement("span");mxUtils.write(e,mxResources.get("paperSize"));k.appendChild(e);var F=document.createElement("input");F.style.cssText="margin:0 8px 0 8px;";F.setAttribute("value","100 %");F.style.width="60px";k.appendChild(F);b.appendChild(k);e=document.createElement("div");e.style.cssText="text-align:right;margin:36px 0 0 0;";
+"1");C.setAttribute("type","number");C.style.width="40px";y.appendChild(C);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));x.appendChild(e);mxUtils.write(D,mxResources.get("fitToBy"));var F=C.cloneNode(!0);z.appendChild(F);mxEvent.addListener(C,"focus",function(){q.checked=!0});mxEvent.addListener(F,"focus",function(){q.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));B.appendChild(e);v.appendChild(A);v.appendChild(y);
+v.appendChild(x);u.appendChild(D);u.appendChild(z);u.appendChild(B);t.appendChild(v);t.appendChild(u);l.appendChild(t);k.appendChild(l);b.appendChild(k);k=document.createElement("div");e=document.createElement("span");mxUtils.write(e,mxResources.get("paperSize"));k.appendChild(e);var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";k.appendChild(G);b.appendChild(k);e=document.createElement("div");e.style.cssText="text-align:right;margin:36px 0 0 0;";
k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&e.appendChild(k);mxClient.IS_CHROMEAPP||(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get(mxClient.IS_CHROMEAPP?"ok":"print"),function(){a.hideDialog();f(!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);a.editor.cancelFirst||e.appendChild(k);b.appendChild(e);this.container=b};
var LinkDialog=function(a,c,f,d){var b=document.createElement("div");mxUtils.write(b,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("value",c);g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));
g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=
@@ -7207,27 +7207,27 @@ u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute
"geSprite geSprite-fit";y.setAttribute("title",mxResources.get("fit"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var x=mxUtils.button("",function(){null!=t&&(g.zoomActual(),g.center())});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var D=
document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var z=mxUtils.button(mxResources.get("download"),function(){if(null!=t){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(t.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
(c="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(c):"\x26data\x3d"+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename\x3d"+encodeURIComponent(b)+"\x26format\x3dxml"+c)).simulate(document,"_blank"))}});z.className="geBtn";z.setAttribute("disabled","disabled");var B=mxUtils.button(mxResources.get("restore"),function(){null!=t&&null!=v&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&r.save(!0,
-function(b){a.spinner.stop();a.replaceFileData(v);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});B.className="geBtn";B.setAttribute("disabled","disabled");var C=document.createElement("select");C.setAttribute("disabled","disabled");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";var G=null;mxEvent.addListener(C,
-"change",function(a){null!=G&&(G(a),mxEvent.consume(a))});var F=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=t&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(t.documentElement)),window.openWindow(a.getUrl()))});F.className="geBtn";F.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("show"),function(){null!=q&&window.open(q.getUrl())});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");
-d=document.createElement("div");d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var L=null;if(null==r||null==a.drive&&r.constructor==DriveFile||null==a.dropbox&&r.constructor==DropboxFile)e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));
+function(b){a.spinner.stop();a.replaceFileData(v);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});B.className="geBtn";B.setAttribute("disabled","disabled");var C=document.createElement("select");C.setAttribute("disabled","disabled");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";var F=null;mxEvent.addListener(C,
+"change",function(a){null!=F&&(F(a),mxEvent.consume(a))});var G=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=t&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(t.documentElement)),window.openWindow(a.getUrl()))});G.className="geBtn";G.setAttribute("disabled","disabled");var I=mxUtils.button(mxResources.get("show"),function(){null!=q&&window.open(q.getUrl())});I.className="geBtn gePrimaryBtn";I.setAttribute("disabled","disabled");
+d=document.createElement("div");d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var L=null;if(null==r||null==a.drive&&r.constructor==DriveFile||null==a.dropbox&&r.constructor==DropboxFile)e.style.display="none",H.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));
else if(null!=c&&0<c.length){e.style.cursor="move";var N=document.createElement("table");N.style.border="1px solid lightGray";N.style.borderCollapse="collapse";N.style.borderSpacing="0px";N.style.width="100%";var S=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var P=c.length-1;0<=P;P--){var E=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");f.style.borderBottom=
"1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var n=document.createElement("td");n.style.padding="6px";n.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(n,mxResources.get("current")):d.toDateString()===W?mxUtils.write(n,d.toLocaleTimeString()):mxUtils.write(n,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(n);f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?
" "+b.lastModifyingUserName:""));var E=function(b){p.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){C.style.display="none";C.innerHTML="";t=c;v=b;l=parseSelectFunction=null;m=0;var q=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center();return a},s=function(b){null!=b&&(b=q(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));
-return b};if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");l=[];for(b=0;b<c.length;b++)l.push(c[b]);m=Math.min(k,l.length-1);0<l.length&&s(l[m]);if(1<l.length){C.removeAttribute("disabled");C.style.display="";for(b=0;b<l.length;b++)c=document.createElement("option"),mxUtils.write(c,l[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==m&&c.setAttribute("selected","selected"),C.appendChild(c)}G=function(){m=k=parseInt(C.value);s(l[k])}}else q(n);
-D.innerHTML="";mxUtils.write(D,d.toLocaleDateString()+" "+d.toLocaleTimeString());D.setAttribute("title",f.getAttribute("title"));u.removeAttribute("disabled");A.removeAttribute("disabled");y.removeAttribute("disabled");x.removeAttribute("disabled");if(null==r||!r.isRestricted())a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),z.removeAttribute("disabled"),H.removeAttribute("disabled"),F.removeAttribute("disabled");mxUtils.setOpacity(u,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(y,60);
+return b};if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");l=[];for(b=0;b<c.length;b++)l.push(c[b]);m=Math.min(k,l.length-1);0<l.length&&s(l[m]);if(1<l.length){C.removeAttribute("disabled");C.style.display="";for(b=0;b<l.length;b++)c=document.createElement("option"),mxUtils.write(c,l[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==m&&c.setAttribute("selected","selected"),C.appendChild(c)}F=function(){m=k=parseInt(C.value);s(l[k])}}else q(n);
+D.innerHTML="";mxUtils.write(D,d.toLocaleDateString()+" "+d.toLocaleTimeString());D.setAttribute("title",f.getAttribute("title"));u.removeAttribute("disabled");A.removeAttribute("disabled");y.removeAttribute("disabled");x.removeAttribute("disabled");if(null==r||!r.isRestricted())a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"),G.removeAttribute("disabled");mxUtils.setOpacity(u,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(y,60);
mxUtils.setOpacity(x,60)}else C.style.display="none",C.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))};mxEvent.addListener(f,"click",function(a){q!=b&&(p.stop(),null!=s&&(s.style.backgroundColor=""),q=b,s=f,s.style.backgroundColor="#ebf2f9",v=t=null,D.removeAttribute("title"),D.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),B.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),u.setAttribute("disabled",
-"disabled"),A.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(x,20),p.spin(e),b.getXml(function(a){q==b&&E(a)},function(a){p.stop();C.style.display="none";C.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),
-mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){H.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(f)}return f}(c[P]);null!=E&&P==c.length-1&&(L=E)}N.appendChild(S);b.appendChild(N)}else e.style.display="none",I.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=L&&L.click()};b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});
-b.className="geBtn";I.appendChild(C);I.appendChild(u);I.appendChild(A);I.appendChild(x);I.appendChild(y);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(z),d.appendChild(F),d.appendChild(B),d.appendChild(H)):(d.appendChild(z),d.appendChild(F),d.appendChild(B),d.appendChild(H),d.appendChild(b));f.appendChild(d);f.appendChild(I);f.appendChild(D);this.container=f},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=[],c=0;c<a.length;c++){var d=B.view.getState(a[c]);if(null!=d){for(var e=
+"disabled"),A.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(x,20),p.spin(e),b.getXml(function(a){q==b&&E(a)},function(a){p.stop();C.style.display="none";C.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),
+mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){I.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(f)}return f}(c[P]);null!=E&&P==c.length-1&&(L=E)}N.appendChild(S);b.appendChild(N)}else e.style.display="none",H.style.display="none",mxUtils.write(b,mxResources.get("noRevisions"));this.init=function(){null!=L&&L.click()};b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});
+b.className="geBtn";H.appendChild(C);H.appendChild(u);H.appendChild(A);H.appendChild(x);H.appendChild(y);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(z),d.appendChild(G),d.appendChild(B),d.appendChild(I)):(d.appendChild(z),d.appendChild(G),d.appendChild(B),d.appendChild(I),d.appendChild(b));f.appendChild(d);f.appendChild(H);f.appendChild(D);this.container=f},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=[],c=0;c<a.length;c++){var d=B.view.getState(a[c]);if(null!=d){for(var e=
B.cellRenderer.getShapesForState(d),f=0;f<e.length;f++)null!=e[f]&&null!=e[f].node&&b.push(e[f].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b}function g(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="0";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),a[b].style.opacity="1"},0)}}function k(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,
"transition",null),a[b].style.opacity="1";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),a[b].style.opacity="0"},0)}}function l(a){var b=a.absolutePoints.slice(),c=a.segments,d=a.length,e=b.length;return{execute:function(f,g){if(null!=a.shape){for(var k=[b[0]],l=d*f/g,m=1;m<e;m++)if(l<=c[m-1]){k.push(new mxPoint(b[m-1].x+(b[m].x-b[m-1].x)*l/c[m-1],b[m-1].y+(b[m].y-b[m-1].y)*l/c[m-1]));break}else l-=c[m-1],k.push(b[m]);
a.shape.points=k;a.shape.redraw()}},stop:function(){null!=a.shape&&(a.shape.points=b,a.shape.redraw())}}}function m(a){var b=new mxRectangle.fromRectangle(a.shape.bounds),c=null;null!=a.text&&null!=a.text.node&&null!=a.text.node.firstChild&&(c=a.text.node.firstChild.getAttribute("transform"));return{execute:function(d,e){if(null!=a.shape){var f=d/e;a.shape.bounds=new mxRectangle(b.x,b.y,b.width*f,b.height);a.shape.redraw();null!=c&&a.text.node.firstChild.setAttribute("transform",c+" scale("+f+",1)")}},
stop:function(){null!=a.shape&&(a.shape.bounds=b,a.shape.redraw(),null!=c&&a.text.node.firstChild.setAttribute("transform",c))}}}function n(a,b,c){function d(){if(k==b){window.clearInterval(n);for(var a=0;a<e.length;a++)e[a].stop()}else{for(a=0;a<e.length;a++)e[a].execute(k,b);k++}}b=null!=b?b:30;c=null!=c?c:30;for(var e=[],f=0;f<a.length;f++){var g=B.view.getState(a[f]);null!=g&&null!=g.shape&&B.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(l(g)):null!=g&&B.model.isVertex(g.cell)&&
-(null!=g.shape&&null!=g.shape.bounds)&&e.push(m(g))}var k=0,n=window.setInterval(d,c);d()}function p(a,b,c){c=null!=c?c:{};c[a.id]=b;for(var d=a.getChildCount(),e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function r(){if(!G){G=C=!0;B.getModel().clear();B.getModel().setRoot(B.cloneCells([a.editor.graph.getModel().getRoot()])[0]);B.maxFitScale=1;B.fit(8);B.center();B.getModel().beginUpdate();try{for(var b in B.getModel().cells){var c=B.getModel().cells[b];if(B.getModel().isVertex(c)||
+(null!=g.shape&&null!=g.shape.bounds)&&e.push(m(g))}var k=0,n=window.setInterval(d,c);d()}function p(a,b,c){c=null!=c?c:{};c[a.id]=b;for(var d=a.getChildCount(),e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function r(){if(!F){F=C=!0;B.getModel().clear();B.getModel().setRoot(B.cloneCells([a.editor.graph.getModel().getRoot()])[0]);B.maxFitScale=1;B.fit(8);B.center();B.getModel().beginUpdate();try{for(var b in B.getModel().cells){var c=B.getModel().cells[b];if(B.getModel().isVertex(c)||
B.getModel().isEdge(c))B.setCellStyles("opacity","0",[c]),B.setCellStyles("noLabel","1",[c])}}finally{B.getModel().endUpdate()}var d=p(a.editor.graph.getModel().getRoot(),B.getModel().getRoot()),f=x.value.split("\n"),l=0,m=function(){if(C&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;m()},parseFloat(a[1]));else{if(1<a.length){var c=d[a[1]];null!=c?"show"==a[0]?(B.setCellStyles("opacity","100",[c]),B.setCellStyles("noLabel",null,[c]),
-2<a.length&&"fade"==a[2]?g(e([c])):n([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;m()}}else G=!1};m()}}var s=document.createElement("table");s.style.width="100%";s.style.height="100%";var q=document.createElement("tbody"),t=document.createElement("tr"),v=document.createElement("td");v.style.width="140px";var u=document.createElement("td"),A=document.createElement("tr");A.style.height="40px";var y=document.createElement("td");y.setAttribute("colspan","2");var x=document.createElement("textarea");
+2<a.length&&"fade"==a[2]?g(e([c])):n([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;m()}}else F=!1};m()}}var s=document.createElement("table");s.style.width="100%";s.style.height="100%";var q=document.createElement("tbody"),t=document.createElement("tr"),v=document.createElement("td");v.style.width="140px";var u=document.createElement("td"),A=document.createElement("tr");A.style.height="40px";var y=document.createElement("td");y.setAttribute("colspan","2");var x=document.createElement("textarea");
x.style.overflow="auto";x.style.width="100%";x.style.height="100%";v.appendChild(x);var D=a.editor.graph.getModel().getRoot();null!=D.value&&"object"==typeof D.value&&(x.value=D.value.getAttribute("animation"));var z=document.createElement("div");z.style.border="1px solid lightGray";z.style.background="#ffffff";z.style.width="100%";z.style.height="100%";z.style.overflow="auto";mxEvent.disableContextMenu(z);u.appendChild(z);var B=new Graph(z);B.setEnabled(!1);B.setPanning(!0);B.foldingEnabled=!1;B.panningHandler.ignoreCell=
-!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var C=!1,G=!1,z=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=x.value+"show "+b[c].id+" fade\n";x.value+="wait 1000\n"}});y.appendChild(z);z=mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=x.value+"show "+b[c].id+"\n";x.value+="wait 1000\n"}});
+!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var C=!1,F=!1,z=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=x.value+"show "+b[c].id+" fade\n";x.value+="wait 1000\n"}});y.appendChild(z);z=mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=x.value+"show "+b[c].id+"\n";x.value+="wait 1000\n"}});
y.appendChild(z);z=mxUtils.button("Fade Out",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)x.value=x.value+"hide "+b[c].id+"\n";x.value+="wait 1000\n"}});y.appendChild(z);z=mxUtils.button("Wait",function(){x.value+="wait 1000\n"});y.appendChild(z);z=mxUtils.button("Preview",function(){r()});y.appendChild(z);z=mxUtils.button("Stop",function(){C=!1;B.getModel().clear()});y.appendChild(z);z=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(D,
"animation",x.value)});y.appendChild(z);D=a.editor.graph.getModel().getRoot();t.appendChild(v);t.appendChild(u);q.appendChild(t);A.appendChild(y);q.appendChild(A);s.appendChild(q);this.window=new mxWindow("Animation",s,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0)},AuthDialog=function(a,c,f,d){var b=document.createElement("div");b.style.textAlign="center";var e=document.createElement("p");
e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var g="Unknown",k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.marginRight="10px";c==a.drive?(g=mxResources.get("googleDrive"),k.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(g=mxResources.get("dropbox"),k.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive&&(g=mxResources.get("oneDrive"),
@@ -7279,7 +7279,7 @@ a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResour
a.hideDialog(),f=!b.model.contains(c),!d||f||e!=r){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(f){var g=a.editor.graph.getInsertPoint();c.geometry.x=g.x;c.geometry.y=g.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(k){throw k;}finally{b.getModel().endUpdate()}f&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){s(n,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){s(a.editor.graph,
c,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);a.editor.cancelFirst||g.appendChild(b);e.appendChild(g);l.appendChild(e);k.appendChild(l);this.container=k},CustomDialog=function(a,c,f,d,b,e){var g=document.createElement("div");g.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);if(!a.isOffline()&&
null!=e){var l=mxUtils.button(mxResources.get("help"),function(){window.open(e)});l.className="geBtn";c.appendChild(l)}b=mxUtils.button(b||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f()});c.appendChild(b);b.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);g.appendChild(c);this.container=g};
-(function(){EditorUi.VERSION="5.7.0.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
+(function(){EditorUi.VERSION="5.7.1.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();Editor.initMath=function(a,b){a=null!=a?a:"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config\x3dTeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.prototype.init=function(){this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};
@@ -7301,19 +7301,19 @@ null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].g
else throw{message:mxResources.get("notADiagramFile")};null!=a&&!b&&(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(a=mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(d))).documentElement));if(null!=a&&"mxGraphModel"!=a.nodeName&&(!b||"mxfile"!=a.nodeName))a=null;return a};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement);
return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(d){}return!1};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=d.apply(this,arguments);if(null==b)try{var c=a.indexOf("\x26lt;mxfile ");if(0<=c){var e=a.lastIndexOf("\x26lt;/mxfile\x26gt;");e>c&&(b=a.substring(c,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(a),g=this.editor.extractGraphModel(f.documentElement),
b=null!=g?mxUtils.getXml(g):""}catch(k){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('\x3cmeta charset\x3d"utf-8"\x3e');0<=b&&(a=a.slice(0,b)+'\x3cmeta charset\x3d"utf-8"/\x3e'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
-b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if(1<d.length||"1"==urlParams.pages){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);
-this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),1<a.length||"1"==urlParams.pages)){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-
-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=
-a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var c=a.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==a.nodeName){c=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==c||""==c)){if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=
-d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}}else c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");c=a.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,
-c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&
-b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;
-g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
-Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);
-b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,
-d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,
-620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
+b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("1"==urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=
+a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=
+function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"1"==urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",
+[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};
+var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var c=a.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==a.nodeName){c=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==c||""==c)){if(d=null!=this.graph.themes?this.graph.themes["default-old"]:
+mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}}else c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");c=a.getAttribute("backgroundImage");
+null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=e.apply(this,
+arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=
+38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");
+b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
+"none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=
+function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);
return a};EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,
0))};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createPngDataUri=function(a,b){var c=a.toDataURL("image/png");if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/png"))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
@@ -7325,9 +7325,9 @@ var k=document.createElement("input");k.style.marginTop="16px";k.style.marginRig
n.defaultChecked=!0;f.appendChild(n);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!k.checked,l.checked,n.checked,m.checked)}),mxResources.get("zoom")+" (%)",null,f,!this.isOffline()?c:null);this.showDialog(b.container,320,a?266:240,!0,!0);b.init()};EditorUi.prototype.uploadToGithub=function(a,b,c){var d=this.spinner.pause();c=document.createElement("div");c.style.paddingTop="20px";c.style.paddingRight="8px";
var e=document.createElement("table"),f=document.createElement("tbody"),g=document.createElement("tr"),k=document.createElement("td"),l=document.createElement("input");l.setAttribute("type","text");mxUtils.write(k,"Username:");g.appendChild(k);k=k.cloneNode(!1);k.appendChild(l);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),m=document.createElement("input");m.setAttribute("type","password");mxUtils.write(k,"Password:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(m);
g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),n=document.createElement("input");n.setAttribute("type","text");mxUtils.write(k,"Organisation:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(n);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),p=document.createElement("input");p.setAttribute("type","text");mxUtils.write(k,"Repository:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(p);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),r=
-document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"Path:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(r);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var s=a.lastIndexOf(".");0<s&&(a=a.substring(0,s));r.value=a+".png";var I=document.createElement("input");I.setAttribute("type","text");mxUtils.write(k,"Branch/Tag:");I.value="master";g=g.cloneNode(!1);g.appendChild(k);
-k=k.cloneNode(!1);k.appendChild(I);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),L=document.createElement("input");L.setAttribute("type","text");mxUtils.write(k,"Message:");L.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
-p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(I.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:L.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+I.value+"/"+r.value;var b=
+document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"Path:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(r);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var s=a.lastIndexOf(".");0<s&&(a=a.substring(0,s));r.value=a+".png";var H=document.createElement("input");H.setAttribute("type","text");mxUtils.write(k,"Branch/Tag:");H.value="master";g=g.cloneNode(!1);g.appendChild(k);
+k=k.cloneNode(!1);k.appendChild(H);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),L=document.createElement("input");L.setAttribute("type","text");mxUtils.write(k,"Message:");L.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
+p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(H.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:L.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+H.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),k=f;0<g&&(k=f=k.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:k+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),l=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
@@ -7344,7 +7344,7 @@ l));g=e.getContext("2d");g.scale(k,k);g.drawImage(d,0,0);a(e)});d.onerror=functi
a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,
function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};
c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement);if(null!=k){var l=new mxGraphModel;(new mxCodec(k.ownerDocument)).decode(k,l);var m=this.editor.graph,n=l.getChildCount(l.getRoot());m.model.getChildCount(m.model.getRoot());m.model.beginUpdate();try{a={};for(g=0;g<n;g++){var p=l.getChildAt(l.getRoot(),g);if(1==n&&!m.isCellLocked(m.getDefaultParent()))var r=
-l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);null!=s&&m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(I){throw e||this.handleError(I,mxResources.get("invalidOrMissingFile")),I;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=
+l.getChildren(p),f=f.concat(m.importCells(r,b,c,m.getDefaultParent(),null,a));else p=m.importCells([p],0,0,m.model.getRoot(),null,a)[0],r=m.model.getChildren(p),m.moveCells(r,b,c),f=f.concat(r)}if(d){m.isGridEnabled()&&(b=m.snap(b),c=m.snap(c));var s=m.getBoundingBoxFromGeometry(f,!0);null!=s&&m.moveCells(f,b-s.x,c-s.y)}}finally{m.model.endUpdate()}}}}catch(H){throw e||this.handleError(H,mxResources.get("invalidOrMissingFile")),H;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=
null!=f?f:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if(!this.isOffline()&&(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==
a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(m){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,
a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
@@ -7355,20 +7355,20 @@ null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c
a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(n=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200==a.status&&(b=this.importXml(a.responseText,c,d,m));null!=k&&k(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(l):p=this.insertTextAt(this.validateFileData(a),c,d,!0);!n&&null!=k&&k(p);return p};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=
a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
-c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=
-a.length,L=I,N=[],S=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<N.length;d++){var e=N[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),W=0;W<I;W++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),r=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=
+a.length,L=H,N=[],S=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<N.length;d++){var e=N[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),W=0;W<H;W++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),r=
atob(q.substring(p+1)),y=mxUtils.parseXml(r),r=y.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&"\x3c"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===D.substring(0,14))?S(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):S(f,mxUtils.bind(this,function(){try{if(q.substring(0,
p+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}q=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(q,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*
-x)),Math.max(1,Math.round(m*x)),k.name)}}}catch(z){}return null}))}}else{r=!1;if("image/png"==k.type){var G=this.extractGraphModelFromPng(a.target.result);if(null!=G&&0<G.length){var F=new Image;F.src=a.target.result;S(f,mxUtils.bind(this,function(){return e(G,"text/xml",b+f*s,c+f*s,F.width,F.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+x)),Math.max(1,Math.round(m*x)),k.name)}}}catch(z){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var H=new Image;H.src=a.target.result;S(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,H.width,H.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,q){S(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var p=!l||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/n,d/q));return e(g,k.type,b+f*s,c+f*s,Math.round(n*p),Math.round(q*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){S(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){S(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(W)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=
function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=
-document.createElement("canvas");s.width=m;s.height=n;var I=s.toDataURL();r!==I&&(b=r,g=m,k=n)}}}catch(L){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+document.createElement("canvas");s.width=m;s.height=n;var H=s.toDataURL();r!==H&&(b=r,g=m,k=n)}}}catch(L){}c(b,g,k)};(function(){EditorUi.prototype.crcTable=[];for(var a=0;256>a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
-var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
@@ -7411,42 +7411,43 @@ d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.lengt
else if("\x3cmxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,
9)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,b){var c=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename))});null!=a&&0<a.length&&(null!=this.getCurrentFile()&&!this.isDiagramEmpty()?(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,c)):c())};EditorUi.prototype.initializeEmbedMode=function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";this.editor.graph.setEnabled(!1);if((window.opener||window.parent)!=window)("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.diagramContainer.style.visibility=
-"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(a=mxUtils.parseXml(a),this.editor.setGraphXml(a.documentElement),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&
-(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
+"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==
+this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
this.editor.setStatus(mxResources.get(urlParams.modified)))});this.editor.graph.model.addListener(mxEvent.CHANGE,c);mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){var e=c.data;if("json"==urlParams.proto){e=JSON.parse(e);if("dialog"==e.action){this.showError(null!=e.titleKey?mxResources.get(e.titleKey):e.title,null!=e.messageKey?mxResources.get(e.messageKey):e.message,null!=e.buttonKey?mxResources.get(e.buttonKey):e.button);null!=e.modified&&(this.editor.modified=e.modified);return}if("template"==
e.action){this.spinner.stop();var f=new NewDialog(this,!1,!1,mxUtils.bind(this,function(b){a(b||"",c,null!=b)}));this.showDialog(f.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));f.init();return}if("status"==e.action){null!=e.messageKey?this.editor.setStatus(mxResources.get(e.messageKey)):null!=e.message&&this.editor.setStatus(e.message);null!=e.modified&&(this.editor.modified=e.modified);return}if("spinner"==e.action){var g=null!=e.messageKey?mxResources.get(e.messageKey):
e.message;null!=e.show&&!e.show?this.spinner.stop():this.spinner.spin(document.body,g);return}if("export"==e.action){if("png"==e.format||"xmlpng"==e.format){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin)){var k=null!=e.xml?e.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=e.format;b.xml=encodeURIComponent(k);b.data="data:image/png;base64,"+
-a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});this.isExportToCanvas()?this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));l(a.substring(a.lastIndexOf(",")+1))})):(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,
-function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&(f=mxUtils.parseXml(e.xml),this.editor.setGraphXml(f.documentElement));g=this.createLoadMessage("export");if("html"==e.format||"html2"==e.format)k=this.editor.getGraphXml(),g.data="html2"==e.format?this.getHtml2(k,this.editor.graph):this.getHtml(k,this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=mxUtils.getXml(this.editor.getGraphXml());g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(a);
-d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(mxUtils.getXml(this.editor.getGraphXml()),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),"*")}return}"load"==
-e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(f)),
-e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(m){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&(f=mxUtils.bind(this,function(a,b){var c=mxUtils.getXml(this.editor.getGraphXml()),
-d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",
-f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";
-a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding=
-"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);
-a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c=
-"tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
-this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
-a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,
-arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&
-!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=
-b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
-"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=
-null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);
-if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=
-[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+
-"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=
-[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];
-mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];
-mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];
-mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+
-"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),n=m.getGlobalVariable,p=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:n.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(p.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");
+"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);l(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&this.setFileData(e.xml);g=this.createLoadMessage("export");if("html2"==e.format||"html"==e.format&&("1"==urlParams.pages||null!=this.pages&&1<this.pages.length))f=this.getXmlFileData(),g.xml=mxUtils.getXml(f),g.data=this.getFileData(null,null,!0,null,null,null,f),g.format=e.format;else if("html"==e.format)k=this.editor.getGraphXml(),g.data=this.getHtml(k,
+this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=this.getFileData(!0);g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();g.data=this.createSvgDataUri(a);d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),
+"*")}return}"load"==e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop=
+"6px"),this.buttonContainer.appendChild(f)),e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"function"===typeof e.charAt&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(r){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&
+(f=mxUtils.bind(this,function(a,b){var c="1"==urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml()),d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",
+f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&
+(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
+"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};
+EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.apply(this,arguments),
+c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),
+f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
+!0);b.outline.view.validate()});return b};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
+this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=
+function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",
+a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=
+new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=
+[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
+[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();
var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:{},createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:12,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=a},getUi:function(){return this.settings.ui},
@@ -7515,10 +7516,10 @@ App.prototype.getThumbnail=function(a,c){var f=!1;try{if(null==this.thumbImageCa
0.5),a.shape.paint(b),b.translate(-0.5,-0.5),b.restore())};s.drawText=function(a,b){};s.drawState(d.getView().getState(d.model.root),r);r.finish(function(){s.drawState(d.getView().getState(d.model.root),p);c(b)});f=!0}}catch(q){}return f};App.prototype.getPublicUrl=function(a,c){c(null)};
App.prototype.createFileData=function(a,c,f,d,b,e,g,k,l){c=null!=c?c:this.editor.graph;b=null!=b?b:!1;l=null!=l?l:!0;var m=null,n=null;null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER?m="_blank":n=m=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){var r=c.zapGremlins(mxUtils.getXml(a)),p=c.compress(r);if(c.decompress(p)!=r)return r;r=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(r,p);p=a.ownerDocument.createElement("mxfile");p.appendChild(r)}p.setAttribute("userAgent",
navigator.userAgent);p.setAttribute("version",EditorUi.VERSION);p.setAttribute("editor","www.draw.io");a=null!=f?f.getMode():this.mode;null!=a&&p.setAttribute("type",a);a=mxUtils.getXml(p);if(!e&&!b&&(g||null!=f&&/(\.html)$/i.test(f.getTitle())))a=this.getHtml2(p,c,null!=f?f.getTitle():null,m,n,l);else if(e||!b&&null!=f&&/(\.svg)$/i.test(f.getTitle())){if(null!=f&&(f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,c,d,null,k,l,n)}return a};
-App.prototype.getFileData=function(a,c,f,d,b,e){b=null!=b?b:!0;e=null!=e?e:!1;var g=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var k=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(g)));mxUtils.setTextContent(this.currentPage.node,k);g=this.fileNode.cloneNode(!1);if(e)g.appendChild(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var l=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=l&&l.needsUpdate&&(k=(new mxCodec(mxUtils.createXmlDocument())).encode(l.graphModel),
-l.writeRealtimeToNode(k),k=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(k))),mxUtils.setTextContent(this.pages[e].node,k),l.needsUpdate=!1);g.appendChild(this.pages[e].node)}}k=this.editor.graph;e=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(c||!a&&null!=e&&/(\.svg)$/i.test(e.getTitle()))){var k=this.createTemporaryGraph(k.getStylesheet()),m=k.getGlobalVariable,n=this.pages[0];k.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==
-a?1:m.apply(this,arguments)};document.body.appendChild(k.container);k.model.setRoot(n.root)}a=this.createFileData(g,k,e,window.location.href,a,c,f,d,b);k!=this.editor.graph&&k.container.parentNode.removeChild(k.container);return a};
-App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
+App.prototype.getXmlFileData=function(a,c){a=null!=a?a:!0;c=null!=c?c:!1;var f=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f)));mxUtils.setTextContent(this.currentPage.node,d);f=this.fileNode.cloneNode(!1);if(c)f.appendChild(this.currentPage.node);else for(var b=0;b<this.pages.length;b++){var e=this.pages[b].mapping;this.currentPage!=this.pages[b]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),
+e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[b].node,d),e.needsUpdate=!1);f.appendChild(this.pages[b].node)}}return f};
+App.prototype.getFileData=function(a,c,f,d,b,e,g){b=null!=b?b:!0;g=null!=g?g:this.getXmlFileData(b,null!=e?e:!1);e=this.editor.graph;var k=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(c||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){e=this.createTemporaryGraph(e.getStylesheet());var l=e.getGlobalVariable,m=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(m.root)}a=
+this.createFileData(g,e,k,window.location.href,a,c,f,d,b);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
App.prototype.setMode=function(a,c){this.mode=a;null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if("undefined"!=typeof Storage&&c){var f=new Date;f.setYear(f.getFullYear()+1);document.cookie="MODE\x3d"+a+"; expires\x3d"+f.toUTCString()}null!=this.appIcon&&(f=this.getCurrentFile(),a=null!=f?f.getMode():null,a==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):a==App.MODE_DROPBOX?
(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):a==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))};
App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var c=this.getCurrentFile(),f=null!=c?c.getMode():null;f==App.MODE_GOOGLE?0<c.desc.parents.length?window.open("https://drive.google.com/drive/folders/"+c.desc.parents[0].id):window.open("https://drive.google.com/?authuser\x3d0"):f==App.MODE_DROPBOX?window.open("https://www.dropbox.com/"):f==App.MODE_ONEDRIVE&&window.open("https://onedrive.live.com/")}mxEvent.consume(a)};
@@ -7587,8 +7588,8 @@ mxEvent.addGestureListeners(e,function(){},mxUtils.bind(this,function(a){n.isMou
mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(e.style.border="3px solid transparent",null!=d&&(d.style.border="3px dotted lightGray"),e.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,q(a),mxEvent.consume(a))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",
e.style.border="3px solid transparent",e.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=d&&(d.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=d?d.style.border="3px dotted rgb(254, 137, 12)":e.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";e.style.cursor="copy";
this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){e.style.border="3px solid transparent";e.style.cursor="";null!=d&&(d.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,g,k,l,m,n,p){if(null!=f&&"image/"==g.substring(0,6)){var q="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
-this.convertDataUri(f),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;s(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=f&&"text/xml"==g)if(f=mxUtils.parseXml(f),"mxlibrary"==f.documentElement.nodeName)try{var t=JSON.parse(mxUtils.getTextContent(f.documentElement));b(t,e);c=c.concat(t);r(a);this.spinner.stop();p=!0}catch(F){}else if("mxfile"==f.documentElement.nodeName)try{t=mxUtils.getTextContent(f.documentElement.getElementsByTagName("diagram")[0]),
-q=this.stringToCells(this.editor.graph.decompress(t)),s(q,new mxRectangle(0,0,m,n),a),p=!0}catch(H){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=d&&null!=d.parentNode&&0<c.length&&(d.parentNode.removeChild(d),d=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"dragleave",function(a){null!=d?d.style.border="3px dotted lightGray":(e.style.border="3px solid transparent",e.style.cursor="");a.stopPropagation();a.preventDefault()}));
+this.convertDataUri(f),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;s(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=f&&"text/xml"==g)if(f=mxUtils.parseXml(f),"mxlibrary"==f.documentElement.nodeName)try{var t=JSON.parse(mxUtils.getTextContent(f.documentElement));b(t,e);c=c.concat(t);r(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==f.documentElement.nodeName)try{t=mxUtils.getTextContent(f.documentElement.getElementsByTagName("diagram")[0]),
+q=this.stringToCells(this.editor.graph.decompress(t)),s(q,new mxRectangle(0,0,m,n),a),p=!0}catch(I){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=d&&null!=d.parentNode&&0<c.length&&(d.parentNode.removeChild(d),d=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"dragleave",function(a){null!=d?d.style.border="3px dotted lightGray":(e.style.border="3px solid transparent",e.style.cursor="");a.stopPropagation();a.preventDefault()}));
l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));k.insertBefore(l,k.firstChild);mxEvent.addListener(l,"click",p);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&p(a)});l=l.cloneNode(!1);l.setAttribute("src",App.prototype.plusImage);l.setAttribute("title",mxResources.get("add"));k.insertBefore(l,k.firstChild);this.isOffline()||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText=
"color:gray;text-decoration:none;margin-right:8px;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),k.insertBefore(g,k.firstChild));var t=null;mxEvent.addListener(l,"click",q)}f.appendChild(k)};
App.prototype.fileLoaded=function(a){this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";this.editor.graph.setEnabled(!1);
@@ -7710,46 +7711,47 @@ function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testD
"Bearer "+b)},b.send(function(b){a.spinner.stop();200==b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole\x3dShow Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-
1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){var b=a.getCurrentFile();if("1"==urlParams.embed||null!=b&&b.isEditable())b=new mxCell("",new mxGeometry(0,
0,120,120),a.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init()});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){var b=new EmbedHtmlDialog(a);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){var b=new EmbedSvgDialog(a);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("embedIframe",
-new Action(mxResources.get("iframe")+"...",function(){var b=new IframeDialog(a);a.showDialog(b.container,420,210,!0,!0);b.init()}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){var b=new IframeDialog(a,!1,!0);a.showDialog(b.container,420,210,!0,!0);b.init()}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){var b=new EmbedSvgDialog(a,!0);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("liveImage",new Action("Live image...",
+new Action(mxResources.get("iframe")+"...",function(){var b=new IframeDialog(a);a.showDialog(b.container,420,220,!0,!0);b.init()}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){var b=new IframeDialog(a,!1,!0);a.showDialog(b.container,420,200,!0,!0);b.init()}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){var b=new EmbedSvgDialog(a,!0);a.showDialog(b.container,550,400,!0,!0);b.init()}));a.actions.put("liveImage",new Action("Live image...",
function(){var b=new IframeDialog(a,!0);a.showDialog(b.container,420,180,!0,!0);b.init()}));a.actions.addAction("googleDocs...",function(){window.open("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){var b=new GoogleSitesDialog(a);a.showDialog(b.container,420,256,!0,!0);b.init()});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=a.scratchpad}),
-a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});l=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c=mxUtils.getXml(a.editor.getGraphXml());
-if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&(a.editor.modified=!1)},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),
-b):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,b,c,d,e)}))}),c):!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,
-function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),c);b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f)}))}),c);b.addSeparator(c);b.addItem(mxResources.get("formatHtmlEmbedded")+
-"...",null,mxUtils.bind(this,function(){this.editorUi.downloadFile("html")}),c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("print").funct,c):!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.padding="6px";var c=document.createElement("input");c.style.marginRight="8px";c.setAttribute("type","checkbox");d.isSelectionEmpty()&&
-c.setAttribute("disabled","disabled");b.appendChild(c);mxUtils.write(b,mxResources.get("selectionOnly"));mxUtils.br(b);var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.marginTop="16px";e.style.marginRight="8px";d.pageVisible||(e.setAttribute("checked","checked"),e.defaultChecked=!0);b.appendChild(e);mxUtils.write(b,mxResources.get("crop"));b=new CustomDialog(a,b,mxUtils.bind(this,function(){var a=d.pageVisible;d.pageVisible=!e.checked;this.editorUi.downloadFile("pdf",
-null,null,!c.checked);d.pageVisible=a}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,120,!0,!0)}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.padding="6px";var e=document.createElement("input");e.style.marginRight="8px";e.setAttribute("type","checkbox");d.isSelectionEmpty()&&e.setAttribute("disabled","disabled");c.appendChild(e);mxUtils.write(c,
-mxResources.get("selectionOnly"));var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";mxUtils.br(c);c.appendChild(g);b?mxUtils.write(c,mxResources.get("compressed")):mxUtils.write(c,mxResources.get("allPages"));c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("xml",b?!g.checked:null,null,!e.checked,!b?!g.checked:null)}),null,mxResources.get("export"));a.showDialog(c.container,
-300,120,!0,!0)}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function l(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&
-a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&null==a.getCurrentFile()&&
-"1"!=urlParams.embed&&a.showSplash()}}}function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):
-null)},!0)},!0)}var n=mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)},
-c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":
-"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=
-uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),
-mxUtils.bind(this,function(a){null!=a&&0<a.length&&(null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),
-mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&
-(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),
-mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,
-function(b){a.handleError(b)}))}))}));a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://imgur.com/"+a)})}));a.actions.addAction("facebook...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://www.facebook.com/sharer.php?p[url]\x3d"+encodeURIComponent("https://imgur.com/"+a)+"\x26p[images][0]\x3d"+encodeURIComponent(a+".png"))})}));a.actions.addAction("twitter...",
-mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://twitter.com/intent/tweet?text\x3d"+encodeURIComponent("Check out the diagram I made with draw.io")+"\x26via\x3ddrawio\x26hashtags\x3dmadewithdrawio\x26url\x3d"+encodeURIComponent("https://imgur.com/"+a))})}));a.actions.addAction("github...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||
-10<=document.documentMode)"undefined"!==typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["twitter"],c),this.addMenuItems(b,["facebook"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));
-this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));
-this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),
-s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");
-a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),
-a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),
-e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
-b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),
-null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",
-null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=
-a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();
-try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline",
-"layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});l=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="1"==urlParams.pages||
+null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&(a.editor.modified=!1)},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):
+"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),b):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,b,c,d,e)}))}),c):
+!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),c);b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,
+e,f){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f)}))}),c);b.addSeparator(c);b.addItem(mxResources.get("formatHtmlEmbedded")+"...",null,mxUtils.bind(this,function(){this.editorUi.downloadFile("html")}),c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("print").funct,c):!a.isOffline()&&(!mxClient.IS_IOS||!navigator.standalone)&&b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");
+b.style.padding="6px";var c=document.createElement("input");c.style.marginRight="8px";c.setAttribute("type","checkbox");d.isSelectionEmpty()&&c.setAttribute("disabled","disabled");b.appendChild(c);mxUtils.write(b,mxResources.get("selectionOnly"));mxUtils.br(b);var e=document.createElement("input");e.setAttribute("type","checkbox");e.style.marginTop="16px";e.style.marginRight="8px";d.pageVisible||(e.setAttribute("checked","checked"),e.defaultChecked=!0);b.appendChild(e);mxUtils.write(b,mxResources.get("crop"));
+b=new CustomDialog(a,b,mxUtils.bind(this,function(){var a=d.pageVisible;d.pageVisible=!e.checked;this.editorUi.downloadFile("pdf",null,null,!c.checked);d.pageVisible=a}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,120,!0,!0)}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.padding="6px";var e=document.createElement("input");e.style.marginRight=
+"8px";e.setAttribute("type","checkbox");d.isSelectionEmpty()&&e.setAttribute("disabled","disabled");c.appendChild(e);mxUtils.write(c,mxResources.get("selectionOnly"));var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";mxUtils.br(c);c.appendChild(g);b?mxUtils.write(c,mxResources.get("compressed")):(mxUtils.write(c,mxResources.get("allPages")),mxEvent.addListener(e,"change",
+function(){e.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")}));c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("xml",b?!g.checked:null,null,!e.checked,!b?!g.checked:null)}),null,mxResources.get("export"));a.showDialog(c.container,300,120,!0,!0)}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,
+this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function l(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
+c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,
+null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},!0)},!0)}var n=mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,
+0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),
+b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(a){n(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},
+c))})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));
+this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming")))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,
+null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():
+a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,
+function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=
+a.getCurrentFile();(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE)&&a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://imgur.com/"+a)})}));a.actions.addAction("facebook...",
+mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://www.facebook.com/sharer.php?p[url]\x3d"+encodeURIComponent("https://imgur.com/"+a)+"\x26p[images][0]\x3d"+encodeURIComponent(a+".png"))})}));a.actions.addAction("twitter...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur),function(a){window.open("https://twitter.com/intent/tweet?text\x3d"+encodeURIComponent("Check out the diagram I made with draw.io")+"\x26via\x3ddrawio\x26hashtags\x3dmadewithdrawio\x26url\x3d"+
+encodeURIComponent("https://imgur.com/"+a))})}));a.actions.addAction("github...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||10<=document.documentMode)"undefined"!==typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["twitter"],c),this.addMenuItems(b,["facebook"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,
+["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));
+this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn",
+"-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,
+d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},
+null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),
+"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<r.length;c++)"-"==r[c]?a.addSeparator(b):s(a,b,mxResources.get(r[c]),r[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent(),e=0;if(null!=d){for(var g=0;g<d.length;g++)(function(d){e++;
+var g=d.mode;g==App.MODE_GOOGLE?g="googleDrive":g==App.MODE_ONEDRIVE&&(g="oneDrive");b.addItem(d.title+" ("+mxResources.get(g)+")",null,function(){a.loadFile(d.id)},c)})(d[g]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=
+urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=
+b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,
+null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},
+c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),
+b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],
+c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&
isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?this.addMenuItems(b,["plugins","-","offline"],c):b.addSeparator(c);!a.isOffline()&&!navigator.standalone&&"1"!=urlParams.embed&&this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",
b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle",
diff --git a/war/js/diagramly/App.js b/war/js/diagramly/App.js
index 15cee166..be66c2cd 100644
--- a/war/js/diagramly/App.js
+++ b/war/js/diagramly/App.js
@@ -1691,7 +1691,7 @@ App.prototype.createFileData = function(node, graph, file, url, forceXml, forceS
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
-App.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, currentPage)
+App.prototype.getXmlFileData = function(ignoreSelection, currentPage)
{
ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;
currentPage = (currentPage != null) ? currentPage : false;
@@ -1736,6 +1736,21 @@ App.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCall
}
}
+ return node;
+};
+
+/**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+App.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, currentPage, node)
+{
+ ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;
+ currentPage = (currentPage != null) ? currentPage : false;
+
+ node = (node != null) ? node : this.getXmlFileData(ignoreSelection, currentPage);
var graph = this.editor.graph;
var file = this.getCurrentFile();
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index d498fc7a..d41430d4 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -823,8 +823,9 @@
{
var oldPages = (this.pages != null) ? this.pages.slice() : null;
var nodes = node.getElementsByTagName('diagram');
-
- if (nodes.length > 1 || urlParams['pages'] == '1')
+
+ if (urlParams['pages'] == '1' || nodes.length > 1 ||
+ (nodes.length == 1 && nodes[0].hasAttribute('name')))
{
this.fileNode = node;
this.pages = (this.pages != null) ? this.pages : [];
@@ -903,8 +904,9 @@
if (node != null && node.nodeName == 'mxfile')
{
var nodes = node.getElementsByTagName('diagram');
-
- if (nodes.length > 1 || urlParams['pages'] == '1')
+
+ if (urlParams['pages'] == '1' || nodes.length > 1 ||
+ (nodes.length == 1 && nodes[0].hasAttribute('name')))
{
this.fileNode = node;
this.pages = [];
@@ -3447,9 +3449,16 @@
{
return ui.currentPage.getName();
}
- else if (name == 'pagenumber' && ui.currentPage != null && ui.pages != null)
+ else if (name == 'pagenumber')
{
- return mxUtils.indexOf(ui.pages, ui.currentPage) + 1;
+ if (ui.currentPage != null && ui.pages != null)
+ {
+ return mxUtils.indexOf(ui.pages, ui.currentPage) + 1;
+ }
+ else
+ {
+ return 1;
+ }
}
return graphGetGlobalVariable.apply(this, arguments);
@@ -4947,8 +4956,7 @@
if (xml != null && xml.length > 0)
{
- var doc = mxUtils.parseXml(xml);
- this.editor.setGraphXml(doc.documentElement);
+ this.setFileData(xml);
this.showLayersDialog();
}
else
@@ -5122,6 +5130,34 @@
if (this.isExportToCanvas())
{
+ var graph = this.editor.graph;
+
+ // Exports PNG for first page while other page is visible by creating a graph
+ // LATER: Add caching for the graph or SVG while not on first page
+ if (this.pages != null && this.currentPage != this.pages[0])
+ {
+ graph = this.createTemporaryGraph(graph.getStylesheet());
+ var graphGetGlobalVariable = graph.getGlobalVariable;
+ var page = this.pages[0];
+
+ graph.getGlobalVariable = function(name)
+ {
+ if (name == 'page')
+ {
+ return page.getName();
+ }
+ else if (name == 'pagenumber')
+ {
+ return 1;
+ }
+
+ return graphGetGlobalVariable.apply(this, arguments);
+ };
+
+ document.body.appendChild(graph.container);
+ graph.model.setRoot(page.root);
+ }
+
this.exportToCanvas(mxUtils.bind(this, function(canvas)
{
var uri = canvas.toDataURL('image/png');
@@ -5131,9 +5167,15 @@
uri = this.writeGraphModelToPng(uri, 'zTXt', 'mxGraphModel',
atob(this.editor.graph.compress(xml)));
}
-
+
+ // Removes temporary graph from DOM
+ if (graph != this.editor.graph)
+ {
+ graph.container.parentNode.removeChild(graph.container);
+ }
+
postDataBack(uri.substring(uri.lastIndexOf(',') + 1));
- }));
+ }), null, null, null, null, null, null, null, null, null, null, graph);
}
else
{
@@ -5164,17 +5206,24 @@
// SVG is generated from graph so parse optional XML
if (data.xml != null && data.xml.length > 0)
{
- var doc = mxUtils.parseXml(data.xml);
- this.editor.setGraphXml(doc.documentElement);
+ this.setFileData(data.xml);
}
var msg = this.createLoadMessage('export');
- if (data.format == 'html' || data.format == 'html2')
+ // Forces new HTML format if pages exists
+ if (data.format == 'html2' || (data.format == 'html' && (urlParams['pages'] == '1' ||
+ (this.pages != null && this.pages.length > 1))))
+ {
+ var node = this.getXmlFileData();
+ msg.xml = mxUtils.getXml(node);
+ msg.data = this.getFileData(null, null, true, null, null, null, node);
+ msg.format = data.format;
+ }
+ else if (data.format == 'html')
{
var xml = this.editor.getGraphXml();
- msg.data = (data.format == 'html2') ? this.getHtml2(xml, this.editor.graph) :
- this.getHtml(xml, this.editor.graph);
+ msg.data = this.getHtml(xml, this.editor.graph);
msg.xml = mxUtils.getXml(xml);
msg.format = data.format;
}
@@ -5190,7 +5239,7 @@
bg = null;
}
- msg.xml = mxUtils.getXml(this.editor.getGraphXml());
+ msg.xml = this.getFileData(true);
msg.format = 'svg';
if (data.embedImages || data.embedImages == null)
@@ -5228,7 +5277,7 @@
}
else
{
- var svg = (data.format == 'xmlsvg') ? this.getEmbeddedSvg(mxUtils.getXml(this.editor.getGraphXml()),
+ var svg = (data.format == 'xmlsvg') ? this.getEmbeddedSvg(this.getFileData(true),
this.editor.graph, null, true) : mxUtils.getXml(this.editor.graph.getSvg(bg));
msg.data = this.createSvgDataUri(svg);
}
@@ -5287,8 +5336,8 @@
data = null;
}
}
-
- if (data != null && data.charAt(0) != '<')
+
+ if (data != null && typeof data.charAt === 'function' && data.charAt(0) != '<')
{
try
{
@@ -5330,7 +5379,8 @@
{
var changeListener = mxUtils.bind(this, function(sender, eventObject)
{
- var data = mxUtils.getXml(this.editor.getGraphXml());
+ var data = (urlParams['pages'] == '1' || (this.pages != null && this.pages.length > 1)) ?
+ this.getFileData(true): mxUtils.getXml(this.editor.getGraphXml());
var msg = this.createLoadMessage('autosave');
msg.xml = data;
data = JSON.stringify(msg);
diff --git a/war/js/diagramly/ElectronApp.js b/war/js/diagramly/ElectronApp.js
index 6c75e2ee..0a63eee5 100644
--- a/war/js/diagramly/ElectronApp.js
+++ b/war/js/diagramly/ElectronApp.js
@@ -36,15 +36,10 @@ window.TEMPLATE_PATH = 'templates';
var editorUi = this.editorUi;
- editorUi.actions.addAction('online...', function()
- {
- window.open('https://www.draw.io/');
- });
-
// Replaces file menu to replace openFrom menu with open and rename downloadAs to export
this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
{
- this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-', 'import'], parent);
+ this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-'], parent);
this.addSubmenu('exportAs', menu, parent);
this.addSubmenu('embed', menu, parent);
this.addMenuItems(menu, ['-', 'newLibrary', 'openLibrary', '-', 'documentProperties', 'print'], parent);
@@ -52,11 +47,162 @@ window.TEMPLATE_PATH = 'templates';
this.put('extras', new Menu(mxUtils.bind(this, function(menu, parent)
{
- this.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-', 'gridColor', 'autosave', '-',
+ this.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-', 'mathematicalTypesetting', 'autosave', '-',
'createShape', 'editDiagram', '-', 'online'], parent);
})));
};
+ // Initializes the user interface
+ var editorUiInit = EditorUi.prototype.init;
+ EditorUi.prototype.init = function()
+ {
+ editorUiInit.apply(this, arguments);
+
+ var editorUi = this;
+ var graph = this.editor.graph;
+
+ // Adds support for libraries
+ this.actions.addAction('newLibrary...', mxUtils.bind(this, function()
+ {
+ editorUi.showLibraryDialog(null, null, null, null, App.MODE_DEVICE);
+ }));
+
+ this.actions.addAction('openLibrary...', mxUtils.bind(this, function()
+ {
+ editorUi.pickLibrary(App.MODE_DEVICE);
+ }));
+
+// // Replaces import action
+// this.actions.addAction('import...', mxUtils.bind(this, function()
+// {
+// if (this.getCurrentFile() != null)
+// {
+// chrome.fileSystem.chooseEntry({type: 'openFile', acceptsAllTypes: true}, mxUtils.bind(this, function(fileEntry)
+// {
+// if (!chrome.runtime.lastError)
+// {
+// fileEntry.file(mxUtils.bind(this, function(fileObject)
+// {
+// if (editorUi.spinner.spin(document.body, mxResources.get('loading')))
+// {
+// var reader = new FileReader();
+//
+// reader.onload = function(evt)
+// {
+// editorUi.spinner.stop();
+//
+// try
+// {
+// var data = reader.result;
+//
+// if (fileObject.type.substring(0, 9) == 'image/png')
+// {
+// data = editorUi.extractGraphModelFromPng(data);
+// }
+// else if (fileObject.type.substring(0, 6) == 'image/')
+// {
+// data = null;
+// }
+//
+// if (data != null)
+// {
+// graph.setSelectionCells(editorUi.importXml(data));
+// }
+// else
+// {
+// var img = new Image();
+// img.onload = function()
+// {
+// editorUi.resizeImage(img, reader.result, function(data2, w, h)
+// {
+// var pt = graph.getInsertPoint();
+// graph.setSelectionCell(graph.insertVertex(null, null, '', pt.x, pt.y, w, h,
+// 'shape=image;aspect=fixed;image=' + editorUi.convertDataUri(data2) + ';'));
+// }, true);
+// };
+// img.src = reader.result;
+// }
+// }
+// catch(e)
+// {
+// console.log(e);
+// editorUi.handleError(e);
+// }
+// };
+//
+// reader.onerror = function(ev)
+// {
+// editorUi.spinner.stop();
+// editorUi.handleError(ev);
+// };
+//
+// if (fileObject.type.substring(0, 6) == 'image/')
+// {
+// reader.readAsDataURL(fileObject);
+// }
+// else
+// {
+// reader.readAsText(fileObject);
+// }
+// }
+// }));
+// }
+// else if (chrome.runtime.lastError.message != 'User cancelled')
+// {
+// editorUi.handleError(chrome.runtime.lastError);
+// }
+// }));
+// }
+// }));
+
+// // Replaces new action
+// this.actions.addAction('new...', mxUtils.bind(this, function()
+// {
+// if (this.getCurrentFile() == null)
+// {
+// // LATER: In Chrome OS the extension is not enforced resulting
+// // in possible files with no extension. Extensions such as XML,
+// // SVG and HTML are and should be allowed. How can we fix this?
+// chrome.fileSystem.chooseEntry({type: 'saveFile',
+// accepts: [{description: 'Draw.io Diagram (.xml)',
+// extensions: ['xml']}]}, mxUtils.bind(this, function(f)
+// {
+// if (!chrome.runtime.lastError)
+// {
+// var file = new LocalFile(editorUi, this.emptyDiagramXml, '');
+// file.fileObject = f;
+//
+// editorUi.fileLoaded(file);
+// }
+// else if (chrome.runtime.lastError.message != 'User cancelled')
+// {
+// editorUi.handleError(chrome.runtime.lastError);
+// }
+// }));
+// }
+// else
+// {
+// // Could use URL parameter to call new action but conflicts with splash screen
+// chrome.app.window.create('index.html',
+// {
+// bounds :
+// {
+// width: Math.floor(Math.min(screen.availWidth * 3 / 4, 1024)),
+// height: Math.floor(Math.min(screen.availHeight * 3 / 4, 768)),
+// left: Math.floor((screen.availWidth - Math.min(screen.availWidth * 3 / 4, 1024)) / 2),
+// top: Math.floor((screen.availHeight - Math.min(screen.availHeight * 3 / 4, 768)) / 3)
+// }
+// });
+// }
+// }), null, null, 'Ctrl+N');
+
+ this.actions.get('open').shortcut = 'Ctrl+O';
+
+ // Adds shortcut keys for file operations
+ editorUi.keyHandler.bindAction(78, true, 'new'); // Ctrl+N
+ editorUi.keyHandler.bindAction(79, true, 'open'); // Ctrl+O
+ }
+
// Uses local picker
App.prototype.pickFile = function()
{
diff --git a/war/js/diagramly/GraphViewer.js b/war/js/diagramly/GraphViewer.js
index 84c47a7a..537b1943 100644
--- a/war/js/diagramly/GraphViewer.js
+++ b/war/js/diagramly/GraphViewer.js
@@ -713,6 +713,10 @@ GraphViewer.prototype.addToolbar = function()
});
}
+ var tokens = this.toolbarItems;
+ var buttonCount = 0;
+ var diagrams = [];
+
function addButton(fn, imgSrc, tip, enabled)
{
var a = document.createElement('div');
@@ -766,10 +770,6 @@ GraphViewer.prototype.addToolbar = function()
return a;
};
- var buttonCount = 0;
- var tokens = this.toolbarItems;
- var diagrams = [];
-
// Adds page placeholders
if (this.xmlNode.nodeName == 'mxfile')
{
@@ -804,7 +804,6 @@ GraphViewer.prototype.addToolbar = function()
prevButton.style.borderRightStyle = 'none';
prevButton.style.paddingLeft = '0px';
prevButton.style.paddingRight = '0px';
-
toolbar.appendChild(pageInfo);
var nextButton = addButton(mxUtils.bind(this, function()
diff --git a/war/js/diagramly/Menus.js b/war/js/diagramly/Menus.js
index 06137502..db26c5f6 100644
--- a/war/js/diagramly/Menus.js
+++ b/war/js/diagramly/Menus.js
@@ -816,14 +816,14 @@
editorUi.actions.put('embedIframe', new Action(mxResources.get('iframe') + '...', function()
{
var dlg = new IframeDialog(editorUi);
- editorUi.showDialog(dlg.container, 420, 210, true, true);
+ editorUi.showDialog(dlg.container, 420, 220, true, true);
dlg.init();
}));
editorUi.actions.put('publishLink', new Action(mxResources.get('link') + '...', function()
{
var dlg = new IframeDialog(editorUi, false, true);
- editorUi.showDialog(dlg.container, 420, 210, true, true);
+ editorUi.showDialog(dlg.container, 420, 200, true, true);
dlg.init();
}));
@@ -895,7 +895,8 @@
graph.stopEditing();
}
- var data = mxUtils.getXml(editorUi.editor.getGraphXml());
+ var data = (urlParams['pages'] == '1' || (editorUi.pages != null && editorUi.pages.length > 1)) ?
+ editorUi.getFileData(true) : mxUtils.getXml(editorUi.editor.getGraphXml());
if (urlParams['proto'] == 'json')
{
@@ -1084,6 +1085,18 @@
else
{
mxUtils.write(content, mxResources.get('allPages'));
+
+ mxEvent.addListener(cb2, 'change', function()
+ {
+ if (cb2.checked)
+ {
+ cb.setAttribute('disabled', 'disabled');
+ }
+ else
+ {
+ cb.removeAttribute('disabled');
+ }
+ });
}
var dlg = new CustomDialog(editorUi, content, mxUtils.bind(this, function()
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index e282f197..04121819 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||1E8;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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.1.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1549,7 +1549,7 @@ match.index)+(null!=f?f:e));d=match.index+e.length}}c.push(b.substring(d));retur
Graph.prototype.connectVertex=function(a,b,c,d,e){var f=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(f.x+=a.geometry.width/2,f.y-=c):b==mxConstants.DIRECTION_SOUTH?(f.x+=a.geometry.width/2,f.y+=a.geometry.height+c):(f.x=b==mxConstants.DIRECTION_WEST?f.x-c:f.x+(a.geometry.width+c),f.y+=a.geometry.height/2);c=this.view.getState(this.model.getParent(a));
var g=this.view.scale,h=this.view.translate,k=h.x*g,h=h.y*g;this.model.isVertex(c.cell)&&(k=c.x,h=c.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(f.x+=a.parent.geometry.x,f.y+=a.parent.geometry.y);c=mxEvent.isControlDown(d)&&!e?null:this.getCellAt(k+f.x*g,h+f.y*g);this.model.isAncestor(c,a)&&(c=null);for(g=c;null!=g;){if(this.isCellLocked(g)){c=null;break}g=this.model.getParent(g)}null!=c&&(g=this.view.getState(a),k=this.view.getState(c),null!=g&&(null!=k&&mxUtils.intersects(g,k))&&(c=null));
if(e=!mxEvent.isShiftDown(d)||e)b==mxConstants.DIRECTION_NORTH?f.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?f.y+=a.geometry.height/2:f.x=b==mxConstants.DIRECTION_WEST?f.x-a.geometry.width/2:f.x+a.geometry.width/2;null!=c&&!this.isCellConnectable(c)&&(g=this.getModel().getParent(c),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(c=g));if(c==a||this.model.isEdge(c)||!this.isCellConnectable(c))c=null;g=[];this.model.beginUpdate();try{k=c;if(null==k&&e){for(var h=a,l=this.getCellGeometry(a);null!=
-l&&l.relative;)h=this.getModel().getParent(h),l=this.getCellGeometry(h);var m=this.view.getState(h),n=null!=m?m.style:this.getCellStyle(h);if(mxUtils.getValue(n,"part",!1)){var p=this.model.getParent(h);this.model.isVertex(p)&&(h=p)}k=this.duplicateCells([h],!1)[0];l=this.getCellGeometry(k);l.x=f.x-l.width/2;l.y=f.y-l.height/2}l=null;null!=this.layoutManager&&(l=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&e||null==c&&null!=l&&l.constructor==mxStackLayout?
+l&&l.relative;)h=this.getModel().getParent(h),l=this.getCellGeometry(h);var m=this.view.getState(h),n=null!=m?m.style:this.getCellStyle(h);if(mxUtils.getValue(n,"part",!1)){var p=this.model.getParent(h);this.model.isVertex(p)&&(h=p)}k=this.duplicateCells([h],!1)[0];l=this.getCellGeometry(k);null!=l&&(l.x=f.x-l.width/2,l.y=f.y-l.height/2)}l=null;null!=this.layoutManager&&(l=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&e||null==c&&null!=l&&l.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,k,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&(null!=d.parent&&d.parent==r.parent)&&(q=d.parent.getIndex(d),d.parent.insert(r,q))}null==c&&(null!=k&&null!=l&&null!=a.parent&&l.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(k,
q));null!=r&&g.push(r);null==c&&null!=k&&g.push(k);null==k&&null!=r&&r.geometry.setTerminalPoint(f,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return g};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),c=a,d=null;null==d&&null!=c;)null!=c.value&&"object"==typeof c.value&&(d=c.hasAttribute(b)?null!=c.getAttribute(b)?c.getAttribute(b):"":null),c=this.model.getParent(c);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
@@ -1659,8 +1659,8 @@ b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=
"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,
b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
-return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<
-c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,
+c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=
a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}(1!=a.nodeType||"BR"!==a.nodeName&&null==a.firstChild)&&(3!=a.nodeType||0==mxUtils.trim(mxUtils.getTextContent(a)).length)?a.parentNode.removeChild(a):(3==
diff --git a/war/js/mxgraph/EditorUi.js b/war/js/mxgraph/EditorUi.js
index b81a54e0..e9ac8d38 100644
--- a/war/js/mxgraph/EditorUi.js
+++ b/war/js/mxgraph/EditorUi.js
@@ -3452,9 +3452,9 @@ EditorUi.prototype.createKeyHandler = function(editor)
var isEventIgnored = keyHandler.isEventIgnored;
keyHandler.isEventIgnored = function(evt)
{
- // Handles undo/redo/ctrl+./, via action and allows ctrl+b/u/i only if editing value is HTML (except for FF and Safari)
+ // Handles undo/redo/ctrl+./,/u via action and allows ctrl+b/i only if editing value is HTML (except for FF and Safari)
return (!this.isControlDown(evt) || mxEvent.isShiftDown(evt) || (evt.keyCode != 90 && evt.keyCode != 89 &&
- evt.keyCode != 188 && evt.keyCode != 190)) && ((evt.keyCode != 66 && evt.keyCode != 73 && evt.keyCode != 85) ||
+ evt.keyCode != 188 && evt.keyCode != 190 && evt.keyCode != 85)) && ((evt.keyCode != 66 && evt.keyCode != 73) ||
!this.isControlDown(evt) || (this.graph.cellEditor.isContentEditing() && !mxClient.IS_FF && !mxClient.IS_SF)) &&
isEventIgnored.apply(this, arguments);
};
diff --git a/war/js/mxgraph/Graph.js b/war/js/mxgraph/Graph.js
index ca41d25b..78c12ee5 100644
--- a/war/js/mxgraph/Graph.js
+++ b/war/js/mxgraph/Graph.js
@@ -1558,8 +1558,12 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
realTarget = this.duplicateCells([cellToClone], false)[0];
var geo = this.getCellGeometry(realTarget);
- geo.x = pt.x - geo.width / 2;
- geo.y = pt.y - geo.height / 2;
+
+ if (geo != null)
+ {
+ geo.x = pt.x - geo.width / 2;
+ geo.y = pt.y - geo.height / 2;
+ }
}
// Never connects children in stack layouts
@@ -5223,22 +5227,29 @@ if (typeof mxVertexHandler != 'undefined')
*/
mxCellEditor.prototype.restoreSelection = function(savedSel)
{
- if (savedSel)
+ try
{
- if (window.getSelection)
+ if (savedSel)
{
- sel = window.getSelection();
- sel.removeAllRanges();
-
- for (var i = 0, len = savedSel.length; i < len; ++i)
+ if (window.getSelection)
+ {
+ sel = window.getSelection();
+ sel.removeAllRanges();
+
+ for (var i = 0, len = savedSel.length; i < len; ++i)
+ {
+ sel.addRange(savedSel[i]);
+ }
+ }
+ else if (document.selection && savedSel.select)
{
- sel.addRange(savedSel[i]);
+ savedSel.select();
}
}
- else if (document.selection && savedSel.select)
- {
- savedSel.select();
- }
+ }
+ catch (e)
+ {
+ // ignore
}
};
diff --git a/war/js/mxgraph/Menus.js b/war/js/mxgraph/Menus.js
index 8929fe5c..e44a8bc3 100644
--- a/war/js/mxgraph/Menus.js
+++ b/war/js/mxgraph/Menus.js
@@ -1051,9 +1051,13 @@ Menus.prototype.createMenubar = function(container)
for (var i = 0; i < menus.length; i++)
{
- (function(menu)
+ (mxUtils.bind(this, function(menu)
{
- var elt = menubar.addMenu(mxResources.get(menus[i]), menu.funct);
+ var elt = menubar.addMenu(mxResources.get(menus[i]), mxUtils.bind(this, function()
+ {
+ // Allows extensions of menu.funct
+ menu.funct.apply(this, arguments);
+ }));
if (elt != null)
{
@@ -1081,7 +1085,7 @@ Menus.prototype.createMenubar = function(container)
}
});
}
- })(this.get(menus[i]));
+ }))(this.get(menus[i]));
}
return menubar;
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index 3161590f..25337e97 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||1E8;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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.1.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1549,7 +1549,7 @@ match.index)+(null!=f?f:e));d=match.index+e.length}}c.push(b.substring(d));retur
Graph.prototype.connectVertex=function(a,b,c,d,e){var f=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(f.x+=a.geometry.width/2,f.y-=c):b==mxConstants.DIRECTION_SOUTH?(f.x+=a.geometry.width/2,f.y+=a.geometry.height+c):(f.x=b==mxConstants.DIRECTION_WEST?f.x-c:f.x+(a.geometry.width+c),f.y+=a.geometry.height/2);c=this.view.getState(this.model.getParent(a));
var g=this.view.scale,h=this.view.translate,k=h.x*g,h=h.y*g;this.model.isVertex(c.cell)&&(k=c.x,h=c.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(f.x+=a.parent.geometry.x,f.y+=a.parent.geometry.y);c=mxEvent.isControlDown(d)&&!e?null:this.getCellAt(k+f.x*g,h+f.y*g);this.model.isAncestor(c,a)&&(c=null);for(g=c;null!=g;){if(this.isCellLocked(g)){c=null;break}g=this.model.getParent(g)}null!=c&&(g=this.view.getState(a),k=this.view.getState(c),null!=g&&(null!=k&&mxUtils.intersects(g,k))&&(c=null));
if(e=!mxEvent.isShiftDown(d)||e)b==mxConstants.DIRECTION_NORTH?f.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?f.y+=a.geometry.height/2:f.x=b==mxConstants.DIRECTION_WEST?f.x-a.geometry.width/2:f.x+a.geometry.width/2;null!=c&&!this.isCellConnectable(c)&&(g=this.getModel().getParent(c),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(c=g));if(c==a||this.model.isEdge(c)||!this.isCellConnectable(c))c=null;g=[];this.model.beginUpdate();try{k=c;if(null==k&&e){for(var h=a,l=this.getCellGeometry(a);null!=
-l&&l.relative;)h=this.getModel().getParent(h),l=this.getCellGeometry(h);var m=this.view.getState(h),n=null!=m?m.style:this.getCellStyle(h);if(mxUtils.getValue(n,"part",!1)){var p=this.model.getParent(h);this.model.isVertex(p)&&(h=p)}k=this.duplicateCells([h],!1)[0];l=this.getCellGeometry(k);l.x=f.x-l.width/2;l.y=f.y-l.height/2}l=null;null!=this.layoutManager&&(l=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&e||null==c&&null!=l&&l.constructor==mxStackLayout?
+l&&l.relative;)h=this.getModel().getParent(h),l=this.getCellGeometry(h);var m=this.view.getState(h),n=null!=m?m.style:this.getCellStyle(h);if(mxUtils.getValue(n,"part",!1)){var p=this.model.getParent(h);this.model.isVertex(p)&&(h=p)}k=this.duplicateCells([h],!1)[0];l=this.getCellGeometry(k);null!=l&&(l.x=f.x-l.width/2,l.y=f.y-l.height/2)}l=null;null!=this.layoutManager&&(l=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&e||null==c&&null!=l&&l.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,k,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&(null!=d.parent&&d.parent==r.parent)&&(q=d.parent.getIndex(d),d.parent.insert(r,q))}null==c&&(null!=k&&null!=l&&null!=a.parent&&l.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(k,
q));null!=r&&g.push(r);null==c&&null!=k&&g.push(k);null==k&&null!=r&&r.geometry.setTerminalPoint(f,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return g};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),c=a,d=null;null==d&&null!=c;)null!=c.value&&"object"==typeof c.value&&(d=c.hasAttribute(b)?null!=c.getAttribute(b)?c.getAttribute(b):"":null),c=this.model.getParent(c);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
@@ -1659,8 +1659,8 @@ b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=
"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,
b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
-return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<
-c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,
+c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=
a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}(1!=a.nodeType||"BR"!==a.nodeName&&null==a.firstChild)&&(3!=a.nodeType||0==mxUtils.trim(mxUtils.getTextContent(a)).length)?a.parentNode.removeChild(a):(3==
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index 0d4ee108..071b9b72 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -53,10 +53,10 @@ J={};J["\x3e"]=J["+"]=J["~"]=J;p=function(a,e,f){function g(q,p){function t(c,f,
s]);var z;e.ia?(z=e.ia(k,s),"string"!==typeof z&&(r=d,z=s),r&&C!==+C&&(C=x.d.NONE)):(z=s,C!==+C&&(r=d));var v=s="",F=d;/^[~^$*|]?=$/.test(a[c])&&(s=a[c++],v=a[c++],/^[0-9A-Za-z:_\-]+$/.test(v)?v='"'+v+'"':"]"===v&&(v='""',--c),/^"([^\"\\]|\\.)*"$/.test(v)||(r=d),(F="i"===a[c])&&++c);"]"!==a[c]&&(++c,r=d);switch(C){case x.d.CLASSES:case x.d.LOCAL_NAME:case x.d.NONE:break;case x.d.GLOBAL_NAME:case x.d.ID:case x.d.IDREF:("\x3d"===s||"~\x3d"===s||"$\x3d"===s)&&'""'!=v&&!F?v='"'+v.substring(1,v.length-
1)+l+'"':"|\x3d"===s||""===s||(r=d);break;case x.d.URI:case x.d.URI_FRAGMENT:""!==s&&(r=d);break;default:r=d}r&&(q+="["+z.replace(/[^\w-]/g,"\\$\x26")+s+v+(F?" i]":"]"))}else if(c<f&&":"===a[c])if(C=a[++c],G.test(C))p+=":"+C;else break;else break;c!==f&&(r=d);r&&(c=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+q+p+g)&&u.push(c);return r}" "===a[q]&&++q;p-1!==q&&" "===a[p]&&--p;for(var u=[],C=q,r=b,s=q;r&&s<p;++s){var z=a[s];if(J[z]===J||" "===z)t(C,s,z)?C=s+1:r=d}t(C,p,"")||(r=d);return r?(u.length&&(C=
u.join(""),k!==c&&(C="."+k+" "+C),m.push(C)),b):!f||f(a.slice(q,p))}var k=e.na,l=e.L,n=e.Aa,m=[],q=0,p,t=0,u;for(p=0;p<a.length;++p)if(u=a[p],"("==u||"["==u?(++t,b):")"==u||"]"==u?(t&&--t,b):!(" "==a[p]&&(t||J[a[p-1]]===J||J[a[p+1]]===J)))a[q++]=a[p];a.length=q;q=a.length;for(p=t=0;p<q;++p)if(","===a[p]){if(!g(t,p))return c;t=p+1}return!g(t,q)?c:m};(function(){var a=/^\w/,b=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
-"i");s=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var g=c[f];" "!=g&&(c[e++]=g)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=b.exec(a))||(k=d.exec(a))||(k=f.exec(a))||(k=g.exec(a))?k[1]:c}function f(g,l,n,G,C,x,u){function r(){E=
+"i");s=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var g=c[f];" "!=g&&(c[e++]=g)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=b.exec(a))||(k=d.exec(a))||(k=f.exec(a))||(k=g.exec(a))?k[1]:c}function f(g,l,n,C,G,x,u){function r(){E=
D.length&&D[D.length-1]===c}var F=a,A=u||[0],D=[],E=d;q(l,{startStylesheet:function(){F=[]},endStylesheet:function(){},startAtrule:function(a,b){if(E)a=c;else if("@media"===a)F.push("@media"," ",s(b));else if("@keyframes"===a||"@-webkit-keyframes"===a){var d=b[0];1===b.length&&!/__$|[^\w\-]/.test(d)?(F.push(a," ",d+n.L),a="@keyframes"):a=c}else if("@import"===a&&0<b.length)if(a=c,"function"===typeof x){var l=s(b.slice(1));if("not all"!==l){++A[0];var m=[];F.push(m);var q=t(k(g,e(b[0])),function(a){var b=
-f(q,a.qa,n,G,C,x,A);--A[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;x(a,!!A[0])},C)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;D.push(a)},endAtrule:function(){D.pop();E||F.push(";");r()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===D[D.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-E=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,n),!d||!d.length?E=b:e=d.join(", "));E||F.push(e,"{")}D.push(c)},endRuleset:function(){D.pop();E||F.push("}");r()},declaration:function(a,c){if(!E){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);m(a,c,G,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!A[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
+f(q,a.qa,n,C,G,x,A);--A[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;x(a,!!A[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;D.push(a)},endAtrule:function(){D.pop();E||F.push(";");r()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===D[D.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+E=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,n),!d||!d.length?E=b:e=d.join(", "));E||F.push(e,"{")}D.push(c)},endRuleset:function(){D.pop();E||F.push("}");r()},declaration:function(a,c){if(!E){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);m(a,c,C,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!A[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
typeof window&&(window.sanitizeCssProperty=m,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,t;(function(){function a(b,d,e,f,g){for(var k=d++;d<e&&"{"!==b[d]&&";"!==b[d];)++d;if(d<e&&(g||";"===b[d])){g=k+1;var l=d;g<e&&" "===b[g]&&++g;l>g&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[k].toLowerCase(),b.slice(g,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,g,k){++f;for(k.startBlock&&k.startBlock();f<g;){var l=
b[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?a(b,f,g,k,d):"{"===l?c(b,f,g,k):e(b,f,g,k)}k.endBlock&&k.endBlock();return f}function e(a,c,d,g){var k=c,n=f(a,c,d,b);if(0>n)return n=~n,n===k?n+1:n;var m=a[n];if("{"!==m)return n===k?n+1:n;c=n+1;n>k&&" "===a[n-1]&&--n;for(g.startRuleset&&g.startRuleset(a.slice(k,n));c<d;){m=a[c];if("}"===m){++c;break}c=" "===m?c+1:l(a,c,d,g)}g.endRuleset&&g.endRuleset();return c}function f(a,b,c,d){for(var e,g=[],k=-1;b<c;++b)if(e=a[b].charAt(0),
"["===e||"("===e)g[++k]=e;else if("]"===e&&"["===g[k]||")"===e&&"("===g[k])--k;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=k&&(b=~(b+1));return b}function g(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function l(a,b,c,e){var k=a[b++];if(!n.test(k))return g(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return g(a,b,c);++b;b<c&&" "===a[b]&&++b;var m=f(a,b,c,d);if(0>m)m=~m;else{for(var q=[],p=0,t=b;t<m;++t)b=a[t]," "!==b&&(q[p++]=b);if(m<c){do{b=a[m];
@@ -118,8 +118,8 @@ d?(c[k++]=192|d>>>6,c[k++]=128|63&d):65536>d?(c[k++]=224|d>>>12,c[k++]=128|d>>>6
2===k?31:3===k?15:7;1<k&&d<l;)g=g<<6|63&b[d++],k--;1<k?n[f++]=65533:65536>g?n[f++]=g:(g-=65536,n[f++]=55296|g>>10&1023,n[f++]=56320|1023&g)}return e(n,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+m[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var l=65535&b|0;b=b>>>16&65535|0;for(var n=0;0!==d;){n=2E3<d?2E3:d;d-=n;do l=l+c[k++]|0,b=b+l|0;while(--n);l%=65521;b%=65521}return l|
b<<16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;
for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(v.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=
-0))}function k(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function n(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,m=b.window,q=b.w_mask,p=b.prev,t=b.strstart+O,G=m[g+k-1],C=m[g+k];b.prev_length>=b.good_match&&
-(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,m[d+k]===C&&m[d+k-1]===G&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;d++;do;while(m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<t);if(e=O-(t-g),g=t-O,e>k){if(b.match_start=c,k=e,e>=l)break;G=m[g+k-1];C=m[g+k]}}while((c=p[c&q])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
+0))}function k(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function n(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,m=b.window,q=b.w_mask,p=b.prev,t=b.strstart+O,C=m[g+k-1],G=m[g+k];b.prev_length>=b.good_match&&
+(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,m[d+k]===G&&m[d+k-1]===C&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;d++;do;while(m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<t);if(e=O-(t-g),g=t-O,e>k){if(b.match_start=c,k=e,e>=l)break;C=m[g+k-1];G=m[g+k]}}while((c=p[c&q])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-S)){v.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var k=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,k),1===c.state.wrap?c.adler=y(c.adler,e,l,k):2===c.state.wrap&&(c.adler=E(c.adler,e,l,k)),c.next_in+=l,c.total_in+=l,l)),
b.lookahead+=d,b.lookahead+b.insert>=I){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+I-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<I)););}}while(b.lookahead<S&&0!==b.strm.avail_in)}function r(b,c){for(var d,e;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===F)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-S&&(b.match_length=m(b,d)),b.match_length>=I)if(e=D._tr_tally(b,b.strstart-b.match_start,b.match_length-I),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=I){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
@@ -2044,26 +2044,26 @@ b,this.toolbarContainer.onmousedown=b,this.diagramContainer.onselectstart=b,this
9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b;d.init(this.diagramContainer);d.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(b.node,"click",function(a){for(var c=mxEvent.getSource(a);null!=c&&c!=b.node;){if("A"==c.nodeName){null==c.getAttribute("target")&&null!=c.getAttribute("href")&&(window.open(c.getAttribute("href")),mxEvent.consume(a));break}c=
c.parentNode}})};this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,f=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
function(a,b){return e||f.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(e=!0,this.hoverIcons.reset(),d.container.style.cursor="move",!d.isEditing()&&mxEvent.getSource(a)==d.container&&mxEvent.consume(a)):!mxEvent.isConsumed(a)&&27==a.keyCode&&this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&mxEvent.isControlDown(a)};
-var l=!1,n=null,m=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=m}l=d.cellEditor.isContentEditing();
-n=a;m=c;p=b}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=s.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));s.toolbar.setFontName(c);
-s.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&
-d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),
-A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),e.push(f));f=d.getModel().getStyle(b.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],n=l.indexOf("\x3d");0<=n&&(f=l.substring(0,n),l=l.substring(n+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle=
-{}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<D.length;a++)for(b=0;b<D[a].length;b++)u.push(D[a][b]);for(a=0;a<A.length;a++)u.push(A[a]);var y=function(a,b){d.getModel().beginUpdate();try{if(b)for(var c=d.getModel().isEdge(k),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var g=e[c[f]];null!=g&&d.setCellStyles(c[f],g,a)}else for(g=0;g<a.length;g++){for(var k=a[g],l=d.getModel().getStyle(k),n=null!=
-l?l.split(";"):[],m=u.slice(),f=0;f<n.length;f++){var q=n[f],t=q.indexOf("\x3d");if(0<=t){var p=q.substring(0,t),x=mxUtils.indexOf(m,p);0<=x&&m.splice(x,1);for(var r=0;r<D.length;r++){var z=D[r];if(0<=mxUtils.indexOf(z,p))for(var s=0;s<z.length;s++){var v=mxUtils.indexOf(m,z[s]);0<=v&&m.splice(v,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var p=m[f],y=e[p];if(null!=y&&("shape"!=p||c))(!c||0>mxUtils.indexOf(A,p))&&d.setCellStyles(p,y,[k])}}}finally{d.getModel().endUpdate()}};
-d.addListener("cellsInserted",function(a,b){y(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){y(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));y(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var g=0;g<c.length&&!(e=d.getModel().isVertex(c[g])||e,(f=d.getModel().isEdge(c[g])||
-f)&&e);g++);else f=e=!0;for(var c=b.getProperty("keys"),k=b.getProperty("values"),g=0;g<c.length;g++){var l=0<=mxUtils.indexOf(z,c[g]);if("strokeColor"!=c[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,c[g]))f||0<=mxUtils.indexOf(v,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(u,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(u,c[g])){if(e||l)null==k[g]?delete d.currentVertexStyle[c[g]]:
-d.currentVertexStyle[c[g]]=k[g];if(f||l||0<=mxUtils.indexOf(v,c[g]))null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
-"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
-this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||
-"Helvetica",b=String(d.currentVertexStyle.fontSize||"12"),c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_FONTFAMILY]||a,b=c.style[mxConstants.STYLE_FONTSIZE]||b,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(b)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,b){var c=b.getProperty("cells"),e=b.getProperty("parent");d.getModel().isLayer(e)&&
-!d.isCellVisible(e)&&(null!=c&&0<c.length)&&d.getModel().setVisible(e,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
-mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,
-function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;
-EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
+var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&(mxEvent.isControlDown(a)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(a))};var l=!1,n=null,m=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=
+n;this.toolbar.sizeMenu=m}l=d.cellEditor.isContentEditing();n=a;m=c;p=b}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=s.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-
+1)&&(c=c.substring(0,c.length-1));s.toolbar.setFontName(c);s.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var t=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor=
+"default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var x=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();x.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),A="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),e.push(f));f=d.getModel().getStyle(b.cell);for(var g=null!=f?f.split(";"):[],k=0;k<g.length;k++){var l=g[k],n=l.indexOf("\x3d");
+0<=n&&(f=l.substring(0,n),l=l.substring(n+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
+D=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<D.length;a++)for(b=0;b<D[a].length;b++)u.push(D[a][b]);for(a=0;a<A.length;a++)u.push(A[a]);var y=function(a,b){d.getModel().beginUpdate();try{if(b)for(var c=d.getModel().isEdge(k),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var g=e[c[f]];null!=g&&d.setCellStyles(c[f],
+g,a)}else for(g=0;g<a.length;g++){for(var k=a[g],l=d.getModel().getStyle(k),n=null!=l?l.split(";"):[],m=u.slice(),f=0;f<n.length;f++){var q=n[f],t=q.indexOf("\x3d");if(0<=t){var p=q.substring(0,t),x=mxUtils.indexOf(m,p);0<=x&&m.splice(x,1);for(var r=0;r<D.length;r++){var z=D[r];if(0<=mxUtils.indexOf(z,p))for(var s=0;s<z.length;s++){var v=mxUtils.indexOf(m,z[s]);0<=v&&m.splice(v,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var p=m[f],y=e[p];if(null!=
+y&&("shape"!=p||c))(!c||0>mxUtils.indexOf(A,p))&&d.setCellStyles(p,y,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){y(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){y(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));y(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),
+e=!1,f=!1;if(0<c.length)for(var g=0;g<c.length&&!(e=d.getModel().isVertex(c[g])||e,(f=d.getModel().isEdge(c[g])||f)&&e);g++);else f=e=!0;for(var c=b.getProperty("keys"),k=b.getProperty("values"),g=0;g<c.length;g++){var l=0<=mxUtils.indexOf(z,c[g]);if("strokeColor"!=c[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,c[g]))f||0<=mxUtils.indexOf(v,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(u,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:
+d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(u,c[g])){if(e||l)null==k[g]?delete d.currentVertexStyle[c[g]]:d.currentVertexStyle[c[g]]=k[g];if(f||l||0<=mxUtils.indexOf(v,c[g]))null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
+"orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
+d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
+(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",b=String(d.currentVertexStyle.fontSize||"12"),c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_FONTFAMILY]||a,b=c.style[mxConstants.STYLE_FONTSIZE]||b,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(b)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,
+b){var c=b.getProperty("cells"),e=b.getProperty("parent");d.getModel().isLayer(e)&&!d.isCellVisible(e)&&(null!=c&&0<c.length)&&d.getModel().setVisible(e,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,
+"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,
+function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
+EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=500>=screen.width?116:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(b){9==b.which&&a.isEnabled()&&!mxEvent.isAltDown(b)&&(a.isEditing()?a.stopEditing(!1):a.selectCell(!mxEvent.isShiftDown(b)),mxEvent.consume(b))}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(b){if(this.isImmediateEditingEvent(b)&&!a.isEditing()&&(!a.isSelectionEmpty()&&0!==b.which&&!mxEvent.isAltDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b))&&
(a.escape(),a.startEditing(),mxClient.IS_FF)){var c=a.cellEditor;c.textarea.innerHTML=String.fromCharCode(b.which);b=document.createRange();b.selectNodeContents(c.textarea);b.collapse(!1);c=window.getSelection();c.removeAllRanges();c.addRange(b)}}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var b=a.setDefaultParent,c=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);c.updateActionStates()};a.editLink=c.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
@@ -2154,7 +2154,7 @@ EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroun
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};
EditorUi.prototype.createKeyHandler=function(a){function b(a,b,c){g.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(b=null!=b?b:1,c){d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),f=0;f<e.length;f++)if(d.getModel().isVertex(e[f])&&d.isCellResizable(e[f])){var g=d.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-b):38==a?g.height=Math.max(0,g.height-b):39==a?g.width+=b:40==a&&(g.height+=b),d.getModel().setGeometry(e[f],g))}}finally{d.getModel().endUpdate()}}else e=
d.getSelectionCell(),f=d.model.getParent(e),g=null,1==d.getSelectionCount()&&d.model.isVertex(e)&&(null!=d.layoutManager&&!d.isCellLocked(e))&&(g=d.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(e),37==a||38==a?d.model.add(f,e,Math.max(0,g-1)):(39==a||40==a)&&d.model.add(f,e,Math.min(d.model.getChildCount(f),g+1))):(f=e=0,37==a?e=-b:38==a?f=-b:39==a?e=b:40==a&&(f=b),d.moveCells(d.getMovableCells(d.getSelectionCells()),e,f))});null!=k&&window.clearTimeout(k);k=window.setTimeout(function(){if(0<
-g.length){d.getModel().beginUpdate();try{for(var a=0;a<g.length;a++)g[a]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var c=this,d=this.editor.graph,e=new mxKeyHandler(d),f=e.isEventIgnored;e.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode&&85!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+g.length){d.getModel().beginUpdate();try{for(var a=0;a<g.length;a++)g[a]();g=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var c=this,d=this.editor.graph,e=new mxKeyHandler(d),f=e.isEventIgnored;e.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
!mxClient.IS_SF)&&f.apply(this,arguments)};e.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};e.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var g=[],k=null,l={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},n=e.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?
function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=l[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),l[a.keyCode],d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),null!=c.hoverIcons&&c.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return n.apply(this,arguments)};e.bindAction=mxUtils.bind(this,function(a,b,c,d){var f=this.actions.get(c);null!=f&&(c=function(){f.isEnabled()&&f.funct()},b?d?e.bindControlShiftKey(a,c):e.bindControlKey(a,c):d?e.bindShiftKey(a,c):e.bindKey(a,c))});var m=e.escape;e.escape=function(a){m.apply(this,arguments)};e.enter=function(){};e.bindControlShiftKey(36,function(){d.exitGroup()});
@@ -2183,7 +2183,7 @@ c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){v
function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<s||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,
arguments)||mxEvent.isShiftDown(a)};var u=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return u.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var A=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(A=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,
function(){this.isEnabled()&&(this.container.style.cursor=A)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){if(!this.isEnabled()&&!a.isConsumed()){var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))}else return z.apply(this,arguments)};var v=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return v.apply(this,arguments);if(null!=
-this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var q=g.getChildAt(e,n),t=this.view.getState(q);if(null!=t&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var p=
+this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var n=g.getChildCount(e),m=0;m<n;m++){var q=g.getChildAt(e,m),t=this.view.getState(q);if(null!=t&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var p=
mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(t=mxUtils.getBoundingBox(t,p));(g.isEdge(q)||g.isVertex(q))&&t.x>=a&&(t.y+t.height<=l&&t.y>=b&&t.x+t.width<=k)&&f.push(q);this.getAllCells(a,b,c,d,q,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var y=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();y=null!=c&&!this.isSelectionEmpty()&&!this.isCellSelected(c.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");
null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=y?this.addSelectionCells(y):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);y=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
@@ -2210,7 +2210,7 @@ match.index)+(null!=f?f:e));d=match.index+e.length}}c.push(b.substring(d));retur
Graph.prototype.connectVertex=function(a,b,c,d,e){var f=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(f.x+=a.geometry.width/2,f.y-=c):b==mxConstants.DIRECTION_SOUTH?(f.x+=a.geometry.width/2,f.y+=a.geometry.height+c):(f.x=b==mxConstants.DIRECTION_WEST?f.x-c:f.x+(a.geometry.width+c),f.y+=a.geometry.height/2);c=this.view.getState(this.model.getParent(a));
var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(c.cell)&&(l=c.x,k=c.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(f.x+=a.parent.geometry.x,f.y+=a.parent.geometry.y);c=mxEvent.isControlDown(d)&&!e?null:this.getCellAt(l+f.x*g,k+f.y*g);this.model.isAncestor(c,a)&&(c=null);for(g=c;null!=g;){if(this.isCellLocked(g)){c=null;break}g=this.model.getParent(g)}null!=c&&(g=this.view.getState(a),l=this.view.getState(c),null!=g&&null!=l&&mxUtils.intersects(g,l)&&(c=null));
if(e=!mxEvent.isShiftDown(d)||e)b==mxConstants.DIRECTION_NORTH?f.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?f.y+=a.geometry.height/2:f.x=b==mxConstants.DIRECTION_WEST?f.x-a.geometry.width/2:f.x+a.geometry.width/2;null!=c&&!this.isCellConnectable(c)&&(g=this.getModel().getParent(c),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(c=g));if(c==a||this.model.isEdge(c)||!this.isCellConnectable(c))c=null;g=[];this.model.beginUpdate();try{l=c;if(null==l&&e){for(var k=a,n=this.getCellGeometry(a);null!=
-n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);var m=this.view.getState(k),p=null!=m?m.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];n=this.getCellGeometry(l);n.x=f.x-n.width/2;n.y=f.y-n.height/2}n=null;null!=this.layoutManager&&(n=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&e||null==c&&null!=n&&n.constructor==mxStackLayout?
+n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);var m=this.view.getState(k),p=null!=m?m.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];n=this.getCellGeometry(l);null!=n&&(n.x=f.x-n.width/2,n.y=f.y-n.height/2)}n=null;null!=this.layoutManager&&(n=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&e||null==c&&null!=n&&n.constructor==mxStackLayout?
null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==s.parent&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==c&&null!=l&&(null!=n&&null!=a.parent&&n.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
q));null!=s&&g.push(s);null==c&&null!=l&&g.push(l);null==l&&null!=s&&s.geometry.setTerminalPoint(f,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),c=a,d=null;null==d&&null!=c;)null!=c.value&&"object"==typeof c.value&&(d=c.hasAttribute(b)?null!=c.getAttribute(b)?c.getAttribute(b):"":null),c=this.model.getParent(c);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
@@ -2287,7 +2287,7 @@ f[1]),2<f.length?"0"!=f[2]:!0))}}catch(g){}return d}if(null!=a.shape)if(null!=a.
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null!=e&&!e.relative&&c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=
function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,g,!0);b.setTerminal(e,f,!1);var k=b.getGeometry(e);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();
-var l=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(m,!0);b.setGeometry(e,k);var n=this.view.getState(e),q=this.view.getState(f),t=this.view.getState(g);if(null!=n){var p=null!=q?this.getConnectionConstraint(n,q,!0):null,x=null!=t?this.getConnectionConstraint(n,t,!1):null;this.setConnectionConstraint(e,f,!0,x);this.setConnectionConstraint(e,g,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
+var l=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);b.setGeometry(e,k);var m=this.view.getState(e),q=this.view.getState(f),t=this.view.getState(g);if(null!=m){var p=null!=q?this.getConnectionConstraint(m,q,!0):null,x=null!=t?this.getConnectionConstraint(m,t,!1):null;this.setConnectionConstraint(e,f,!0,x);this.setConnectionConstraint(e,g,!1,p)}c.push(e)}}else if(b.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/
2;k.y+=k.height/2-k.width/2;var z=k.width;k.width=k.height;k.height=z;b.setGeometry(e,k);var u=this.view.getState(e);if(null!=u){var r=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==r?r="south":"south"==r?r="west":"west"==r?r="north":"north"==r&&(r="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,r,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&
"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==
typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,
@@ -2311,7 +2311,7 @@ d=d+l;null!=n&&(n=n.clone(),a?n.x=Math.round(d-n.width/2):n.y=Math.round(d-n.hei
d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}for(var d=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),0),c=0;c<a.length;c++)e.add(f,b[c]);return d.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:1;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;d=d?this.view.getBackgroundPageBounds():
f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==d)throw Error(mxResources.get("drawingEmpty"));var k=this.createSvgImageExport(),l=k.drawCellState;k.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&l.apply(this,arguments)};var n=this.view.scale,m=mxUtils.createXmlDocument(),q=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+
a));null==m.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/n;q.setAttribute("width",Math.ceil(d.width*a)+2*c+"px");q.setAttribute("height",Math.ceil(d.height*a)+2*c+"px");q.setAttribute("version","1.1");var t=q;e&&(t=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),t.setAttribute("transform","translate(0.5,0.5)"),
-q.appendChild(t));m.appendChild(q);m=new mxSvgCanvas2D(t);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.translate(Math.floor((c/b-d.x)/n),Math.floor((c/b-d.y)/n));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,g,k,l,m,n,q,t){var x=this.state;if(null!=this.foAltText&&(0==d||0!=x.fontSize&&f.length<5*d/x.fontSize)){var z=this.createElement("text");z.setAttribute("x",Math.round(d/2));z.setAttribute("y",Math.round((e+x.fontSize)/2));z.setAttribute("fill",x.fontColor||"black");
+q.appendChild(t));m.appendChild(q);m=new mxSvgCanvas2D(t);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.translate(Math.floor((c/b-d.x)/n),Math.floor((c/b-d.y)/n));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,g,k,l,n,m,q,t){var x=this.state;if(null!=this.foAltText&&(0==d||0!=x.fontSize&&f.length<5*d/x.fontSize)){var z=this.createElement("text");z.setAttribute("x",Math.round(d/2));z.setAttribute("y",Math.round((e+x.fontSize)/2));z.setAttribute("fill",x.fontColor||"black");
z.setAttribute("text-anchor","middle");z.setAttribute("font-size",Math.round(x.fontSize)+"px");z.setAttribute("font-family",x.fontFamily);(x.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&z.setAttribute("font-weight","bold");(x.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&z.setAttribute("font-style","italic");(x.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&z.setAttribute("text-decoration","underline");mxUtils.write(z,f);return z}return p.apply(this,
arguments)};c=this.backgroundImage;null!=c&&(e=n/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(d,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=g;k.drawState(this.getView().getState(this.model.root),m);return q};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=
@@ -2320,8 +2320,8 @@ b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=
"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,
b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=
mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);
-return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<
-c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,
+c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(d){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),
d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=
a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else{a=a.firstChild;for(b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}(1!=a.nodeType||"BR"!==a.nodeName&&null==a.firstChild)&&(3!=a.nodeType||0==mxUtils.trim(mxUtils.getTextContent(a)).length)?a.parentNode.removeChild(a):(3==
@@ -2357,8 +2357,8 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==
a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){u.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&
(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&
-null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g)));this.reset();if(c){if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<k.length;c++)if(this.graph.isCellMovable(k[c])){var l=this.graph.view.getState(k[c]),m=this.graph.getCellGeometry(k[c]);
-null!=l&&null!=m&&(m=m.clone(),m.translate(f,g),this.graph.model.setGeometry(k[c],m))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-
+null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g)));this.reset();if(c){if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<k.length;c++)if(this.graph.isCellMovable(k[c])){var l=this.graph.view.getState(k[c]),n=this.graph.getCellGeometry(k[c]);
+null!=l&&null!=n&&(n=n.clone(),n.translate(f,g),this.graph.model.setGeometry(k[c],n))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-
c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<
this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),
this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var A=mxRubberband.prototype.reset;
@@ -2388,7 +2388,7 @@ a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultV
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function u(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function D(){mxShape.call(this)}function y(){mxShape.call(this)}function E(){mxEllipse.call(this)}function C(){mxShape.call(this)}
function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function L(){mxShape.call(this)}function K(){mxShape.call(this)}function R(){mxCylinder.call(this)}function T(){mxDoubleEllipse.call(this)}function aa(){mxDoubleEllipse.call(this)}function V(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxActor.call(this)}function N(){mxRectangleShape.call(this)}function H(){mxActor.call(this)}
function Z(){mxActor.call(this)}function M(){mxActor.call(this)}function I(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function Q(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}
-function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function na(){mxActor.call(this)}function va(a,b,c,d,e,f,g,k,l,m){g+=l;var n=d.clone();d.x-=e*(2*g+l);d.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){a.ellipse(n.x-e-g,n.y-f-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
+function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function na(){mxActor.call(this)}function va(a,b,c,d,e,f,g,k,l,n){g+=l;var m=d.clone();d.x-=e*(2*g+l);d.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var sa=Math.tan(mxUtils.toRadians(30)),ma=(0.5-sa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/sa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,0.25*b);a.lineTo(0.5*b,b*ma);a.lineTo(b,0.25*b);a.lineTo(0.5*b,(0.5-ma)*b);a.lineTo(0,
0.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(0.5+sa));f?(a.moveTo(0,0.25*b),a.lineTo(0.5*b,(0.5-ma)*b),a.lineTo(b,0.25*b),a.moveTo(0.5*b,(0.5-ma)*b),a.lineTo(0.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,0.25*b),a.lineTo(0.5*b,b*ma),a.lineTo(b,0.25*b),a.lineTo(b,0.75*b),a.lineTo(0.5*b,(1-ma)*b),a.lineTo(0,0.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=
c;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,
@@ -2404,7 +2404,7 @@ mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),
0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=r;mxUtils.extend(s,mxActor);s.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=s;q.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,
arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),e=Math.sqrt(c*c+d*d);if(2>e)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(e/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},
-l=k(a-this.lastX)*c/f,k=k(b-this.lastY)*d/f,c=c/e,d=d/e,e=0;e<f;e++){var m=l*e+this.lastX,n=k*e+this.lastY,q=(Math.random()-0.5)*g;this.originalLineTo.call(this.canvas,m-q*d,n-q*c)}this.originalLineTo.call(this.canvas,a,b)}}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=
+l=k(a-this.lastX)*c/f,k=k(b-this.lastY)*d/f,c=c/e,d=d/e,e=0;e<f;e++){var n=l*e+this.lastX,m=k*e+this.lastY,q=(Math.random()-0.5)*g;this.originalLineTo.call(this.canvas,n-q*d,m-q*c)}this.originalLineTo.call(this.canvas,a,b)}}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=
this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var za=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Aa=mxRectangleShape.prototype.isHtmlAllowed;
mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Aa.apply(this,arguments)};var Ba=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ba.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=
mxConstants.NONE){if(!f&&(null==this.fill||this.fill==mxConstants.NONE))a.pointerEvents=!1;a.begin();this.isRounded?(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,
@@ -2415,8 +2415,8 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPo
2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,0.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,0.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=u;mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.plus=A;var wa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){wa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),wa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};z.prototype.paintForeground=function(a,b,c,
-d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g=null;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var k=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+
-f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSpacing"];null!=t&&(q+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*t);var t=b,p=c,t=k==mxConstants.ALIGN_CENTER?t+(d-m)/2:k==mxConstants.ALIGN_RIGHT?t+(d-m-q):t+q,p=l==mxConstants.ALIGN_MIDDLE?p+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?p+(e-n-q):p+q;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,t,p,m,n);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
+d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g=null;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var k=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],n=this.style["symbol"+f+"Width"],m=this.style["symbol"+
+f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSpacing"];null!=t&&(q+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*t);var t=b,p=c,t=k==mxConstants.ALIGN_CENTER?t+(d-n)/2:k==mxConstants.ALIGN_RIGHT?t+(d-n-q):t+q,p=l==mxConstants.ALIGN_MIDDLE?p+(e-m)/2:l==mxConstants.ALIGN_BOTTOM?p+(e-m-q):p+q;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,t,p,n,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.ext=z;mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=v;mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,
e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=D;mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};y.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();
a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=y;mxUtils.extend(E,mxEllipse);E.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=E;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,
@@ -2452,15 +2452,15 @@ this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),"1"==mxUtils
mxCellRenderer.prototype.defaultShapes.partialRectangle=W;mxUtils.extend(ga,mxEllipse);ga.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=ga;mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,
e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ka;mxUtils.extend(ca,mxActor);ca.prototype.size=0.2;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);
a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=ca;mxUtils.extend(na,mxActor);na.prototype.size=0.25;na.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=na;mxMarker.addMarker("dash",
-function(a,b,c,d,e,f,g,k,l,m){var n=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-n/2-q/2,d.y-q/2+n/2);a.lineTo(d.x+q/2-3*n/2,d.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,k,l,m){var n=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-n/2-q/2,d.y-q/2+n/2);a.lineTo(d.x+q/2-3*n/2,d.y-3*q/2-n/2);a.moveTo(d.x-n/2+q/2,d.y-q/2-n/2);a.lineTo(d.x-q/2-3*n/2,d.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",va);mxMarker.addMarker("circlePlus",
-function(a,b,c,d,e,f,g,k,l,n){var m=d.clone(),q=va.apply(this,arguments),t=e*(g+2*l),p=f*(g+2*l);return function(){q.apply(this,arguments);a.begin();a.moveTo(m.x-e*l,m.y-f*l);a.lineTo(m.x-2*t+e*l,m.y-2*p+f*l);a.moveTo(m.x-t-p+f*l,m.y-p+t-e*l);a.lineTo(m.x+p-t-f*l,m.y-p-t+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,k,l,m){b=1.118*e*l;c=1.118*f*l;e*=g+l;f*=g+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);k?a.lineTo(n.x-
-e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,k,l,n,m){f*=k+n;g*=k+n;var q=e.clone();return function(){b.begin();b.moveTo(q.x,q.y);l?b.lineTo(q.x-f-g/a,q.y-g+f/a):b.lineTo(q.x+g/a-f,q.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
+function(a,b,c,d,e,f,g,k,l,n){var m=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-m/2-q/2,d.y-q/2+m/2);a.lineTo(d.x+q/2-3*m/2,d.y-3*q/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,k,l,n){var m=e*(g+l+1),q=f*(g+l+1);return function(){a.begin();a.moveTo(d.x-m/2-q/2,d.y-q/2+m/2);a.lineTo(d.x+q/2-3*m/2,d.y-3*q/2-m/2);a.moveTo(d.x-m/2+q/2,d.y-q/2-m/2);a.lineTo(d.x-q/2-3*m/2,d.y-3*q/2+m/2);a.stroke()}});mxMarker.addMarker("circle",va);mxMarker.addMarker("circlePlus",
+function(a,b,c,d,e,f,g,k,l,m){var n=d.clone(),q=va.apply(this,arguments),t=e*(g+2*l),p=f*(g+2*l);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*t+e*l,n.y-2*p+f*l);a.moveTo(n.x-t-p+f*l,n.y-p+t-e*l);a.lineTo(n.x+p-t-f*l,n.y-p-t+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,k,l,n){b=1.118*e*l;c=1.118*f*l;e*=g+l;f*=g+l;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);k?a.lineTo(m.x-
+e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,k,l,m,n){f*=k+m;g*=k+m;var q=e.clone();return function(){b.begin();b.moveTo(q.x,q.y);l?b.lineTo(q.x-f-g/a,q.y-g+f/a):b.lineTo(q.x+g/a-f,q.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},la=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100,e=null!=b?b:c.height/8;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*d),c.y+e)},function(a,b,c){a=Math.min(50,Math.max(0,
100*(a.width-b.x+a.x)/Math.min(a.width,a.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(a)})},ja=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b}},ia=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+0.75*c*b.width,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,
Math.min(a,(c.x-b.x)/(0.75*b.width)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(la(b));return c}},pa=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},ta=function(a,b,c){return function(d){var e=
[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},xa=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",M.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",M.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(b.y+b.height/2-c.y)/b.height)));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},oa=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,k=a.view.translate,l=a.view.scale,n=c?f[0]:f[g],m=c?f[1]:f[g-
-1],q=m.x-n.x,t=m.y-n.y,p=Math.sqrt(q*q+t*t);return fa(a,b,function(a){a=d.call(this,p,q/p,t/p,n,m);return new mxPoint(a.x/l-k.x,a.y/l-k.y)},function(a,b,c){a=Math.sqrt(q*q+t*t);b.x=(b.x+k.x)*l;b.y=(b.y+k.y)*l;e.call(this,a,q/a,t/a,n,m,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,k){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*
+"arrowWidth",M.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",M.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(b.y+b.height/2-c.y)/b.height)));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},oa=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,k=a.view.translate,l=a.view.scale,m=c?f[0]:f[g],n=c?f[1]:f[g-
+1],q=n.x-m.x,t=n.y-m.y,p=Math.sqrt(q*q+t*t);return fa(a,b,function(a){a=d.call(this,p,q/p,t/p,m,n);return new mxPoint(a.x/l-k.x,a.y/l-k.y)},function(a,b,c){a=Math.sqrt(q*q+t*t);b.x=(b.x+k.x)*l;b.y=(b.y+k.y)*l;e.call(this,a,q/a,t/a,m,n,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,k){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));a.style.width=Math.round(2*
b)/a.view.scale-c})},ua={link:function(a){return[ya(a,!0,10),ya(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(oa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+
c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,k,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(oa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*
@@ -2485,8 +2485,8 @@ mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);t
function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,2*((b.y-a.y)/a.height)))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:pa(x.prototype.size,!0),hexagon:pa(u.prototype.size,!0,0.5),curlyBracket:pa(r.prototype.size,!1),display:pa(na.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(0.5,k.prototype.size,!0),loopLimit:ta(0.5,ba.prototype.size,!0),trapezoid:ia(0.5),parallelogram:ia(1)};Graph.createHandle=fa;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
ua[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=ua[this.state.style.shape];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var qa=new mxPoint(1,0),ra=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ja=Math.cos(ia),ia=Math.sin(ia),qa=mxUtils.getRotatedPoint(qa,ja,ia),ia=mxUtils.toRadians(-150),ja=Math.cos(ia),ia=Math.sin(ia),
-ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,n=qa.y,m=ra.x,q=ra.y,t="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){var p=k;a=function(a,b,c){a-=p.x;var d=
-b-p.y;b=(q*a-m*d)/(l*q-n*m);a=(n*a-l*d)/(n*m-l*q);t?(c&&(p=new mxPoint(p.x+l*b,p.y+n*b),e.push(p)),p=new mxPoint(p.x+m*a,p.y+q*a)):(c&&(p=new mxPoint(p.x+m*a,p.y+q*a),e.push(p)),p=new mxPoint(p.x+l*b,p.y+n*b));e.push(p)};null==d&&(d=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
+ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==k&&null!=b&&(k=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,m=qa.y,n=ra.x,q=ra.y,t="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=k){var p=k;a=function(a,b,c){a-=p.x;var d=
+b-p.y;b=(q*a-n*d)/(l*q-m*n);a=(m*a-l*d)/(m*n-l*q);t?(c&&(p=new mxPoint(p.x+l*b,p.y+m*b),e.push(p)),p=new mxPoint(p.x+n*a,p.y+q*a)):(c&&(p=new mxPoint(p.x+n*a,p.y+q*a),e.push(p)),p=new mxPoint(p.x+l*b,p.y+m*b));e.push(p)};null==d&&(d=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Da.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,
0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0.5,
0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
@@ -2595,19 +2595,19 @@ null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].g
else throw{message:mxResources.get("notADiagramFile")};null!=a&&!b&&(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(a=mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(d))).documentElement));if(null!=a&&"mxGraphModel"!=a.nodeName&&(!b||"mxfile"!=a.nodeName))a=null;return a};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement);
return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(d){}return!1};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=d.apply(this,arguments);if(null==b)try{var c=a.indexOf("\x26lt;mxfile ");if(0<=c){var e=a.lastIndexOf("\x26lt;/mxfile\x26gt;");e>c&&(b=a.substring(c,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(a),g=this.editor.extractGraphModel(f.documentElement),
b=null!=g?mxUtils.getXml(g):""}catch(k){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('\x3cmeta charset\x3d"utf-8"\x3e');0<=b&&(a=a.slice(0,b)+'\x3cmeta charset\x3d"utf-8"/\x3e'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
-b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if(1<d.length||"1"==urlParams.pages){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);
-this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),1<a.length||"1"==urlParams.pages)){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-
-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};var e=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=
-a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var b=a.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==a.nodeName){b=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==b||""==b)){if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=
-c){var d=new mxCodec(c.ownerDocument);d.decode(c,this.graph.getStylesheet())}}else b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(d=new mxCodec(c.ownerDocument),d.decode(c,this.graph.getStylesheet())));this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");b=a.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,
-b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}e.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&
-b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;
-g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,
-Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);
-b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,
-d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,
-620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
+b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("1"==urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=
+a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.setFileData=
+function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"1"==urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",
+[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"1"==urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};
+var e=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):null;if(null!=a){var b=a.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==a.nodeName){b=a.getAttribute("style")||"default-style2";if("1"!=urlParams.embed&&(null==b||""==b)){if(c=null!=this.graph.themes?this.graph.themes["default-old"]:
+mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var d=new mxCodec(c.ownerDocument);d.decode(c,this.graph.getStylesheet())}}else b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(d=new mxCodec(c.ownerDocument),d.decode(c,this.graph.getStylesheet())));this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");b=a.getAttribute("backgroundImage");
+null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}e.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=f.apply(this,
+arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;g.apply(this,arguments)};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=
+38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");
+b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
+"none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=
+function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));a.init()};EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);
return a};EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,
0))};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createPngDataUri=function(a,b){var c=a.toDataURL("image/png");if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/png"))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
@@ -2653,7 +2653,7 @@ c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.max
a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;d<R.length;d++){var e=R[d]();null!=e&&(c=c.concat(e))}}finally{r.getModel().endUpdate()}}f(c)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(f){var k=a[f],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,q=p.indexOf(","),
r=atob(p.substring(q+1)),z=mxUtils.parseXml(r),r=z.getElementsByTagName("svg");if(0<r.length){var D=r[0].getAttribute("content");null!=D&&"\x3c"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null!=D&&("\x3cmxfile "===D.substring(0,8)||"\x3cmxGraphModel "===D.substring(0,14))?T(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*s,c+f*s,0,0,k.name)})):T(f,mxUtils.bind(this,function(){try{if(p.substring(0,
q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=parseFloat(g.getAttribute("width")),m=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+m);else if(isNaN(l)||isNaN(m)){var r=n.split(" ");3<r.length&&(l=parseFloat(r[2]),m=parseFloat(r[3]))}p=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,m));return e(p,k.type,b+f*s,c+f*s,Math.max(1,Math.round(l*
-v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var G=new Image;G.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,G.width,G.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+v)),Math.max(1,Math.round(m*v)),k.name)}}}catch(y){}return null}))}}else{r=!1;if("image/png"==k.type){var F=this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var L=new Image;L.src=a.target.result;T(f,mxUtils.bind(this,function(){return e(F,"text/xml",b+f*s,c+f*s,L.width,L.height,k.name)}));r=!0}}r||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,n,p){T(f,mxUtils.bind(this,function(){if(null!=g&&g.length<m){var q=!l||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/n,d/p));return e(g,k.type,b+f*s,c+f*s,Math.round(n*q),Math.round(p*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),l,d,n)})))}else e(a.target.result,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*s,c+f*s,240,160,k.name,function(a){T(f,function(){return a})},k):"image"==k.type.substring(0,5)?p.readAsDataURL(k):p.readAsText(k)})(aa)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=
function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var r=p.toDataURL();if(r.length<b.length){var s=
@@ -2662,7 +2662,7 @@ k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCod
d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||
"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){k.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
-var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a&&null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
+var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a)&&!b.isEditing())try{for(var c=a.clipboardData||a.originalEvent.clipboardData,b=!1,d=0;d<c.types.length;d++)if("text/"===
c.types[d].substring(0,5)){b=!0;break}if(!b){var e=c.items;for(index in e){var f=e[index];if("file"===f.kind){var g=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a);break}}}}catch(k){}}),!1);var e=document.createElement("div");e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.contentEditable=!0;mxUtils.setOpacity(e,0);e.style.width="1px";e.style.height="1px";e.innerHTML="\x26nbsp;";
var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!f)e.style.left=a.container.scrollLeft+10+"px",e.style.top=a.container.scrollTop+
@@ -2705,42 +2705,43 @@ d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.lengt
else if("\x3cmxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,d)});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,
9)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,b){var c=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename))});null!=a&&0<a.length&&(null!=this.getCurrentFile()&&!this.isDiagramEmpty()?(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,c)):c())};EditorUi.prototype.initializeEmbedMode=function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";this.editor.graph.setEnabled(!1);if((window.opener||window.parent)!=window)("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.diagramContainer.style.visibility=
-"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(a=mxUtils.parseXml(a),this.editor.setGraphXml(a.documentElement),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&
-(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
+"";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==
+this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=!1,c=mxUtils.bind(this,function(a,b){null!=urlParams.modified&&("0"==urlParams.modified?this.editor.setStatus(""):
this.editor.setStatus(mxResources.get(urlParams.modified)))});this.editor.graph.model.addListener(mxEvent.CHANGE,c);mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){var e=c.data;if("json"==urlParams.proto){e=JSON.parse(e);if("dialog"==e.action){this.showError(null!=e.titleKey?mxResources.get(e.titleKey):e.title,null!=e.messageKey?mxResources.get(e.messageKey):e.message,null!=e.buttonKey?mxResources.get(e.buttonKey):e.button);null!=e.modified&&(this.editor.modified=e.modified);return}if("template"==
e.action){this.spinner.stop();var f=new NewDialog(this,!1,!1,mxUtils.bind(this,function(b){a(b||"",c,null!=b)}));this.showDialog(f.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));f.init();return}if("status"==e.action){null!=e.messageKey?this.editor.setStatus(mxResources.get(e.messageKey)):null!=e.message&&this.editor.setStatus(e.message);null!=e.modified&&(this.editor.modified=e.modified);return}if("spinner"==e.action){var g=null!=e.messageKey?mxResources.get(e.messageKey):
e.message;null!=e.show&&!e.show?this.spinner.stop():this.spinner.spin(document.body,g);return}if("export"==e.action){if("png"==e.format||"xmlpng"==e.format){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin)){var k=null!=e.xml?e.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var l=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=e.format;b.xml=encodeURIComponent(k);b.data="data:image/png;base64,"+
-a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});this.isExportToCanvas()?this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));l(a.substring(a.lastIndexOf(",")+1))})):(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,
-function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&(f=mxUtils.parseXml(e.xml),this.editor.setGraphXml(f.documentElement));g=this.createLoadMessage("export");if("html"==e.format||"html2"==e.format)k=this.editor.getGraphXml(),g.data="html2"==e.format?this.getHtml2(k,this.editor.graph):this.getHtml(k,this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=mxUtils.getXml(this.editor.getGraphXml());g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(a);
-d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(mxUtils.getXml(this.editor.getGraphXml()),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),"*")}return}"load"==
-e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(f)),
-e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(m){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&(f=mxUtils.bind(this,function(a,b){var c=mxUtils.getXml(this.editor.getGraphXml()),
-d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",
-f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";
-a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding=
-"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);
-a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c=
-"tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
-this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
-a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,
-arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&
-!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=
-b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=
-null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
-"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=
-null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);
-if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=
-[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+
-"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=
-[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];
-mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=[STENCIL_PATH+"/electrical/opto_electronics.xml"];
-mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];
-mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",
-STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+
-"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
+a;d.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),n=m.getGlobalVariable,p=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:n.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(p.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");
+"xmlpng"==e.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(k))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);l(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==e.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(k)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();200==a.getStatus()&&l(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=e.xml&&0<e.xml.length&&this.setFileData(e.xml);g=this.createLoadMessage("export");if("html2"==e.format||"html"==e.format&&("1"==urlParams.pages||null!=this.pages&&1<this.pages.length))f=this.getXmlFileData(),g.xml=mxUtils.getXml(f),g.data=this.getFileData(null,null,!0,null,null,null,f),g.format=e.format;else if("html"==e.format)k=this.editor.getGraphXml(),g.data=this.getHtml(k,
+this.editor.graph),g.xml=mxUtils.getXml(k),g.format=e.format;else{mxSvgCanvas2D.prototype.foAltText=null;f=this.editor.graph.background;f==mxConstants.NONE&&(f=null);g.xml=this.getFileData(!0);g.format="svg";if(e.embedImages||null==e.embedImages){if(null==e.spin&&null==e.spinKey||this.spinner.spin(document.body,null!=e.spinKey?mxResources.get(e.spinKey):e.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==e.format?this.getEmbeddedSvg(g.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();g.data=this.createSvgDataUri(a);d.postMessage(JSON.stringify(g),"*")})):this.convertImages(this.editor.graph.getSvg(f),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();g.data=this.createSvgDataUri(mxUtils.getXml(a));d.postMessage(JSON.stringify(g),"*")}));return}f="xmlsvg"==e.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(f));g.data=this.createSvgDataUri(f)}d.postMessage(JSON.stringify(g),
+"*")}return}"load"==e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams.modified=e.modified),null!=e.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=e.saveAndExit),null!=e.title&&null!=this.buttonContainer&&(f=document.createElement("span"),mxUtils.write(f,e.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop=
+"6px"),this.buttonContainer.appendChild(f)),e=null!=e.xmlpng?this.extractGraphModelFromPng(e.xmlpng):e.xml):e=null}if(null!=e&&"function"===typeof e.charAt&&"\x3c"!=e.charAt(0))try{"data:image/svg+xml;base64,"==e.substring(0,26)?e=atob(e.substring(26)):"data:image/svg+xml;utf8,"==e.substring(0,24)&&(e=e.substring(24)),null!=e&&("%"==e.charAt(0)?e=decodeURIComponent(e):"\x3c"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)))}catch(r){}a(e,c);null!=urlParams.modified&&this.editor.setStatus("");b&&
+(f=mxUtils.bind(this,function(a,b){var c="1"==urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml()),d=this.createLoadMessage("autosave");d.xml=c;c=JSON.stringify(d);(window.opener||window.parent).postMessage(c,"*")}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.addListener("pageFormatChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",
+f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
+document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&
+(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
+"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};
+EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),
+c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),
+f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
+!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);
+this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==
+urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("twitter").setEnabled(null!=b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.setShadowVisible=
+function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",
+a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=
+new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.bpmn=
+[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
+[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries.eeLogicGates=[STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeResistors=[STENCIL_PATH+"/electrical/resistors.xml"];mxStencilRegistry.libraries.eeCapacitors=
+[STENCIL_PATH+"/electrical/capacitors.xml"];mxStencilRegistry.libraries.eeInductors=[STENCIL_PATH+"/electrical/inductors.xml"];mxStencilRegistry.libraries.eeSwitchesRelays=[STENCIL_PATH+"/electrical/switchesRelays.xml",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries.eeDiodes=[STENCIL_PATH+"/electrical/diodes.xml"];mxStencilRegistry.libraries.eeSources=[STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries.eeTransistors=[STENCIL_PATH+"/electrical/mosfets1.xml",
+STENCIL_PATH+"/electrical/mosfets2.xml",STENCIL_PATH+"/electrical/transistors.xml"];mxStencilRegistry.libraries.eeMisc=[STENCIL_PATH+"/electrical/electro-mechanical.xml",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries.eeAudio=[STENCIL_PATH+"/electrical/radio.xml"];mxStencilRegistry.libraries.eePlcLadder=[STENCIL_PATH+"/electrical/plc_ladder.xml"];mxStencilRegistry.libraries.eeAbstract=[STENCIL_PATH+"/electrical/abstract.xml",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries.eeOptical=
+[STENCIL_PATH+"/electrical/opto_electronics.xml"];mxStencilRegistry.libraries.eeVacuumTubes=[STENCIL_PATH+"/electrical/vacuum_tubes.xml"];mxStencilRegistry.libraries.eeWaveforms=[STENCIL_PATH+"/electrical/waveforms.xml"];mxStencilRegistry.libraries.eeInstruments=[STENCIL_PATH+"/electrical/instruments.xml"];mxStencilRegistry.libraries["mscae/cloud"]=[STENCIL_PATH+"/mscae/cloud.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
+[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
+[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.citrix=[STENCIL_PATH+"/citrix.xml"];mxStencilRegistry.libraries.archimate=
[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&
("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,g,k,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
@@ -2802,20 +2803,20 @@ d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.
b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),e=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(k,0):k();this.positionGraph=function(){b=this.graph.getGraphBounds();e=null;k()}};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
GraphViewer.prototype.showLayers=function(a,b){var c=this.graphConfig.layers;if(null!=c||null!=b)if(c=null!=c?c.split(" "):null,null!=b||0<c.length){var d=null!=b?b.getModel():null,e=a.getModel();e.beginUpdate();try{for(var f=e.getChildCount(e.root),g=0;g<f;g++)e.setVisible(e.getChildAt(e.root,g),null!=b?d.isVisible(d.getChildAt(d.root,g)):!1);if(null==d)for(g=0;g<c.length;g++)e.setVisible(e.getChildAt(e.root,parseInt(c[g])),!0)}finally{e.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,d,e){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=d&&f.setAttribute("title",d);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==e||e?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);c.appendChild(f);n++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var c=b.ownerDocument.createElement("div");c.style.position="absolute";c.style.overflow="hidden";c.style.boxSizing="border-box";
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);c.appendChild(f);m++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var c=b.ownerDocument.createElement("div");c.style.position="absolute";c.style.overflow="hidden";c.style.boxSizing="border-box";
c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.backgroundColor="#eee";c.style.height=this.toolbarHeight+"px";this.toolbar=c;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(c.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(c,30);var d=null,e=null,f=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(c,
0);d=null;e=window.setTimeout(mxUtils.bind(this,function(){c.style.display="none";e=null}),100)}),a||200)}),g=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);c.style.display="";mxUtils.setOpacity(c,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(g(30),f())}));mxEvent.addListener(c,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){g(100)}));mxEvent.addListener(c,"mousemove",mxUtils.bind(this,function(a){g(100);mxEvent.consume(a)}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var k=this.graph,l=k.getTolerance();k.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}var n=0,m=this.toolbarItems,p=[];"mxfile"==this.xmlNode.nodeName&&(p=this.xmlNode.getElementsByTagName("diagram"));for(var r=null,
-s=null,q=0;q<m.length;q++){var t=m[q];if("pages"==t&&1<p.length)s=b.ownerDocument.createElement("div"),s.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",mxUtils.write(s,this.currentPage+1+" / "+p.length),mxUtils.setOpacity(s,70),t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,p.length);s.innerHTML="";mxUtils.write(s,this.currentPage+1+" / "+p.length);
+k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}var n=this.toolbarItems,m=0,p=[];"mxfile"==this.xmlNode.nodeName&&(p=this.xmlNode.getElementsByTagName("diagram"));for(var r=null,
+s=null,q=0;q<n.length;q++){var t=n[q];if("pages"==t&&1<p.length)s=b.ownerDocument.createElement("div"),s.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",mxUtils.write(s,this.currentPage+1+" / "+p.length),mxUtils.setOpacity(s,70),t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,p.length);s.innerHTML="";mxUtils.write(s,this.currentPage+1+" / "+p.length);
this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(p[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page"),t.style.borderRightStyle="none",t.style.paddingLeft="0px",t.style.paddingRight="0px",c.appendChild(s),t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,p.length);s.innerHTML="";mxUtils.write(s,this.currentPage+1+" / "+p.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(p[this.currentPage]))).documentElement)}),
Editor.nextImage,mxResources.get("nextPage")||"Next Page"),t.style.paddingLeft="0px",t.style.paddingRight="0px";else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,
this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var x=this.graph.getModel(),u=a(mxUtils.bind(this,function(a){if(null!=r)r.parentNode.removeChild(r),r=null;else{r=this.graph.createLayersDialog();mxEvent.addListener(r,"mouseleave",function(){r.parentNode.removeChild(r);r=null});a=u.getBoundingClientRect();r.style.width="140px";r.style.padding="2px 0px 2px 0px";r.style.border="1px solid #d0d0d0";r.style.backgroundColor=
"#eee";r.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";r.style.fontSize="11px";mxUtils.setOpacity(r,80);var b=mxUtils.getDocumentScrollOrigin(document);r.style.left=b.x+a.left+"px";r.style.top=b.y+a.bottom+"px";document.body.appendChild(r)}}),Editor.layersImage,mxResources.get("layers")||"Layers");x.addListener(mxEvent.CHANGE,function(){u.style.display=1<x.getChildCount(x.root)?"inline-block":"none"});u.style.display=1<x.getChildCount(x.root)?"inline-block":"none"}}else"lightbox"==
-t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",
-m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var A=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width=
+t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(n=b.ownerDocument.createElement("div"),n.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",
+n.setAttribute("title",this.graphConfig.title),mxUtils.write(n,this.graphConfig.title),mxUtils.setOpacity(n,70),c.appendChild(n));this.minToolbarWidth=34*m;var A=b.style.border,n=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&
-(null!=c.parentNode&&c.parentNode.removeChild(c),null!=r&&(r.parentNode.removeChild(r),r=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==r)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
+(null!=c.parentNode&&c.parentNode.removeChild(c),null!=r&&(r.parentNode.removeChild(r),r=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==r)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",n)};
GraphViewer.prototype.addClickHandler=function(a,b){var c=a.isBlankLink,d=this.graphConfig;a.isBlankLink=function(a){return"self"!=d.target&&c.apply(this,arguments)};a.addClickHandler(this.graphConfig.highlight,function(a){null!=b&&b.destroy()},mxUtils.bind(this,function(a){null==b&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(a)||0==this.toolbarItems.length)&&this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"\x26layers\x3d1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://test.draw.io/?dev\x3d1\x26client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26close\x3d1\x26edit\x3d_blank"+
a)}else window.drawdata=this.xml,window.open("https://test.draw.io/?dev\x3d1\x26client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26edit\x3d_blank"+a)}else this.showLocalLightbox()};
diff --git a/war/plugins/tags.js b/war/plugins/tags.js
index 73221b33..d29fcaaa 100644
--- a/war/plugins/tags.js
+++ b/war/plugins/tags.js
@@ -5,12 +5,9 @@ Draw.loadPlugin(function(ui)
{
var div = document.createElement('div');
div.style.userSelect = 'none';
- div.style.background = 'whiteSmoke';
- div.style.border = '1px solid whiteSmoke';
+ div.style.overflow = 'hidden';
div.style.padding = '10px';
div.style.height = '100%';
- div.style.marginBottom = '10px';
- div.style.overflow = 'auto';
var graph = ui.editor.graph;
@@ -37,39 +34,50 @@ Draw.loadPlugin(function(ui)
mxUtils.br(div);
div.appendChild(tagInput);
- var tagList = [];
- var graphIsCellVisible = graph.isCellVisible;
-
- graph.isCellVisible = function(cell)
+ function isCellVisible(cell, tagList)
{
- if (graphIsCellVisible.apply(this, arguments))
+ if (cell.value != null && typeof(cell.value) == 'object')
{
- if (!this.model.isVertex(cell) && !this.model.isEdge(cell))
- {
- return true;
- }
- else if (cell.value != null && typeof(cell.value) == 'object')
+ var tags = cell.value.getAttribute('tags');
+
+ if (tags != null && tags.length > 0)
{
- var tags = cell.value.getAttribute('tags');
+ var tmp = tags.split(' ');
- if (tags != null)
+ for (var i = 0; i < tagList.length; i++)
{
- var tmp = tags.split(' ');
-
- for (var i = 0; i < tagList.length; i++)
+ if (mxUtils.indexOf(tmp, tagList[i]) >= 0)
{
- if (mxUtils.indexOf(tmp, tagList[i]) >= 0)
- {
- return verbSelect.value != 'show';
- }
+ return verbSelect.value != 'show';
}
}
}
-
- return verbSelect.value == 'show'
}
- return false;
+ return verbSelect.value == 'show'
+ };
+
+ function updateVisibleStates()
+ {
+ var tagList = tagInput.value.split(' ');
+
+ graph.model.beginUpdate();
+ try
+ {
+ for (var key in graph.model.cells)
+ {
+ var cell = graph.model.cells[key];
+
+ if (graph.model.isVertex(cell) || graph.model.isEdge(cell))
+ {
+ graph.model.setVisible(cell, isCellVisible(cell, tagList));
+ }
+ }
+ }
+ finally
+ {
+ graph.model.endUpdate();
+ }
};
mxUtils.br(div);
@@ -77,27 +85,47 @@ Draw.loadPlugin(function(ui)
var resetBtn = mxUtils.button(mxResources.get('reset'), function()
{
tagInput.value = '';
- tagList = [];
verbSelect.value = 'show';
- graph.refresh();
+ updateVisibleStates();
});
+
resetBtn.style.marginTop = '4px';
resetBtn.style.padding = '4px';
div.appendChild(resetBtn);
var btn = mxUtils.button(mxResources.get('apply'), function()
{
- tagList = tagInput.value.split(' ');
- graph.refresh();
+ updateVisibleStates();
});
+
btn.style.marginTop = '4px';
btn.style.padding = '4px';
div.appendChild(btn);
- var wnd = new mxWindow('Tags', div, 0, 0, 200, 120, true, true);
+
+ var wnd = new mxWindow('Tags', div, document.body.offsetWidth - 300, 140, 200, 120, true, true);
wnd.destroyOnClose = false;
wnd.setMaximizable(false);
- wnd.setResizable(true);
- wnd.setClosable(false);
- wnd.setVisible(true);
+ wnd.setResizable(false);
+ wnd.setClosable(true);
+
+ // Extends Extras menu
+ mxResources.parse('tags=Tags');
+
+ // Adds action
+ ui.actions.addAction('tags', function()
+ {
+ wnd.setVisible(!wnd.isVisible());
+ });
+
+ var extrasMenu = ui.menus.get('extras');
+ var oldExtrasMenu = extrasMenu.funct;
+
+ extrasMenu.funct = function(menu, parent)
+ {
+ oldExtrasMenu.apply(this, arguments);
+
+ menu.addSeparator(parent);
+ ui.menus.addMenuItems(menu, ['tags'], parent);
+ };
});
diff --git a/war/resources/dia.txt b/war/resources/dia.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia.txt
+++ b/war/resources/dia.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_am.txt b/war/resources/dia_am.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_am.txt
+++ b/war/resources/dia_am.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ar.txt b/war/resources/dia_ar.txt
index 345ee3a5..9aa59ab7 100644
--- a/war/resources/dia_ar.txt
+++ b/war/resources/dia_ar.txt
@@ -383,6 +383,7 @@ navigation=‫تصفح‬
networking=Networking
new=‫جديد‬
newLibrary=‫مكتبة جديدة‬
+nextPage=Next Page
noColor=‫لا يوجد لون‬
noFiles=‫لا يوجد ملفات‬
noFileSelected=‫لم يتم اختيار أي ملف‬
@@ -459,6 +460,7 @@ position=‫وضع‬
posterPrint=‫طباعة الملصق‬
preferences=‫خيارات‬
preview=‫معاينة‬
+previousPage=Previous Page
print=‫طباعة‬
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_bg.txt b/war/resources/dia_bg.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_bg.txt
+++ b/war/resources/dia_bg.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_bn.txt b/war/resources/dia_bn.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_bn.txt
+++ b/war/resources/dia_bn.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_bs.txt b/war/resources/dia_bs.txt
index 0cc123be..837c695b 100644
--- a/war/resources/dia_bs.txt
+++ b/war/resources/dia_bs.txt
@@ -383,6 +383,7 @@ navigation=Navigacija
networking=Networking
new=Novi
newLibrary=New Library
+nextPage=Next Page
noColor=Bez boje
noFiles=Nema fajlova
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Pozicija
posterPrint=Štampa postera
preferences=Podešavanja
preview=Pregled
+previousPage=Previous Page
print=Štampa
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ca.txt b/war/resources/dia_ca.txt
index 40b5ec97..4baa9125 100644
--- a/war/resources/dia_ca.txt
+++ b/war/resources/dia_ca.txt
@@ -383,6 +383,7 @@ navigation=Navegació
networking=Networking
new=Nou
newLibrary=Biblioteca nova
+nextPage=Next Page
noColor=Sense color
noFiles=No hi ha fitxers
noFileSelected=No s'ha seleccionat cap fitxer
@@ -459,6 +460,7 @@ position=Posició
posterPrint=Imprimeix cartell
preferences=Preferències
preview=Vista prèvia
+previousPage=Previous Page
print=Imprimeix
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_cs.txt b/war/resources/dia_cs.txt
index d64a950b..2c2ac6e5 100644
--- a/war/resources/dia_cs.txt
+++ b/war/resources/dia_cs.txt
@@ -383,6 +383,7 @@ navigation=Navigace
networking=Networking
new=Nový
newLibrary=Nová knihovna
+nextPage=Next Page
noColor=Bez barvy
noFiles=Žádné soubory
noFileSelected=Nevybrán žádný soubor
@@ -459,6 +460,7 @@ position=Pozice
posterPrint=Tisk plakátu
preferences=Předvolby
preview=Náhled
+previousPage=Previous Page
print=Tisk
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_da.txt b/war/resources/dia_da.txt
index 865f3258..60b8e6f5 100644
--- a/war/resources/dia_da.txt
+++ b/war/resources/dia_da.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=Nyt
newLibrary=Nyt bibliotek
+nextPage=Next Page
noColor=Ingen farve
noFiles=Ingen filer
noFileSelected=Ingen fil valgt
@@ -459,6 +460,7 @@ position=Position
posterPrint=Plakatudskift
preferences=Indstillinger
preview=Eksempel
+previousPage=Previous Page
print=Udskriv
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_de.txt b/war/resources/dia_de.txt
index fdcb3b54..c631abad 100644
--- a/war/resources/dia_de.txt
+++ b/war/resources/dia_de.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Netzwerk
new=Neu
newLibrary=Neue Bibliothek
+nextPage=Nächste Seite
noColor=Keine Farbe
noFiles=Keine Dateien
noFileSelected=Keine Datei ausgewählt
@@ -459,6 +460,7 @@ position=Position
posterPrint=Posterdruck
preferences=Einstellungen
preview=Vorschau
+previousPage=Vorherige Seite
print=Drucken
printAllPages=Alle Seiten Drucken
procEng=Proc. Eng.
diff --git a/war/resources/dia_el.txt b/war/resources/dia_el.txt
index 2e658110..bc566126 100644
--- a/war/resources/dia_el.txt
+++ b/war/resources/dia_el.txt
@@ -383,6 +383,7 @@ navigation=Πλοήγηση
networking=Networking
new=Νέο
newLibrary=Νέα βιβλιοθήκη
+nextPage=Next Page
noColor=Χωρίς χρώμα
noFiles=Δεν υπάρχει αρχείο
noFileSelected=Δεν επιλέχθηκε αρχείο
@@ -459,6 +460,7 @@ position=Θέση
posterPrint=Εκτύπωση Αφίσας
preferences=Προτιμήσεις
preview=Προεπισκόπηση
+previousPage=Previous Page
print=Εκτύπωση
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_es.txt b/war/resources/dia_es.txt
index c3dc8974..b6abe112 100644
--- a/war/resources/dia_es.txt
+++ b/war/resources/dia_es.txt
@@ -383,6 +383,7 @@ navigation=Navegación
networking=Networking
new=Nuevo
newLibrary=Nueva biblioteca
+nextPage=Next Page
noColor=Sin color
noFiles=No hay archivos
noFileSelected=Ningún archivo seleccionado
@@ -459,6 +460,7 @@ position=Posición
posterPrint=Imprimir cartel
preferences=Preferencias
preview=Vista preliminar
+previousPage=Previous Page
print=Imprimir
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_et.txt b/war/resources/dia_et.txt
index f5690ca7..1bdc3a2e 100644
--- a/war/resources/dia_et.txt
+++ b/war/resources/dia_et.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_fa.txt b/war/resources/dia_fa.txt
index 0964742a..83f9f194 100644
--- a/war/resources/dia_fa.txt
+++ b/war/resources/dia_fa.txt
@@ -383,6 +383,7 @@ navigation=‫پیمایس‬
networking=Networking
new=‫جدید‬
newLibrary=New Library
+nextPage=Next Page
noColor=‫بدون رنگ‬
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_fi.txt b/war/resources/dia_fi.txt
index 3794411a..22b0d5b7 100644
--- a/war/resources/dia_fi.txt
+++ b/war/resources/dia_fi.txt
@@ -383,6 +383,7 @@ navigation=Navigaatio
networking=Verkkotyöskentely
new=Uusi
newLibrary=Uusi kokoelma
+nextPage=Next Page
noColor=Ei väriä
noFiles=Ei tiedostoja
noFileSelected=Tiedostoa ei valittu
@@ -459,6 +460,7 @@ position=Paikka
posterPrint=Julistetulostus
preferences=Asetukset
preview=Esikatsele
+previousPage=Previous Page
print=Tulosta
printAllPages=Tulosta kaikki sivut
procEng=Teollisuus
diff --git a/war/resources/dia_fil.txt b/war/resources/dia_fil.txt
index d6261cbd..319f0334 100644
--- a/war/resources/dia_fil.txt
+++ b/war/resources/dia_fil.txt
@@ -383,6 +383,7 @@ navigation=Nabigasyon
networking=Networking
new=Bago
newLibrary=Bagong libraryo
+nextPage=Next Page
noColor=Walang kulay
noFiles=Walang mga payl
noFileSelected=Walang payl na napili
@@ -459,6 +460,7 @@ position=Posisyon
posterPrint=Tatak ng poster
preferences=Mga kagusutuhan
preview=Paunang tingin
+previousPage=Previous Page
print=Tatak
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_fr.txt b/war/resources/dia_fr.txt
index b1a13ce3..ab32f889 100644
--- a/war/resources/dia_fr.txt
+++ b/war/resources/dia_fr.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=Nouveau
newLibrary=Nouvelle librairie
+nextPage=Next Page
noColor=Pas de couleur
noFiles=Pas de fichiers
noFileSelected=Aucun fichier sélectionné
@@ -459,6 +460,7 @@ position=Position
posterPrint=Données de l’impression
preferences=Préférences
preview=Aperçu
+previousPage=Previous Page
print=Imprimer
printAllPages=Imprimer toutes les pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_gu.txt b/war/resources/dia_gu.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_gu.txt
+++ b/war/resources/dia_gu.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_he.txt b/war/resources/dia_he.txt
index 4b4332cb..08e48b7d 100644
--- a/war/resources/dia_he.txt
+++ b/war/resources/dia_he.txt
@@ -383,6 +383,7 @@ navigation=‫ניווט‬
networking=Networking
new=‫חדש‬
newLibrary=‫ספרייה חדשה‬
+nextPage=Next Page
noColor=‫ללא צבע‬
noFiles=‫ללא קבצים‬
noFileSelected=‫לא נבחרו קבצים‬
@@ -459,6 +460,7 @@ position=‫מיקום‬
posterPrint=‫הדפסת מודעה‬
preferences=‫העדפות‬
preview=‫תצוגה מקדימה‬
+previousPage=Previous Page
print=‫הדפס‬
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_hi.txt b/war/resources/dia_hi.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_hi.txt
+++ b/war/resources/dia_hi.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_hr.txt b/war/resources/dia_hr.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_hr.txt
+++ b/war/resources/dia_hr.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_hu.txt b/war/resources/dia_hu.txt
index 9f795200..a7c03c49 100644
--- a/war/resources/dia_hu.txt
+++ b/war/resources/dia_hu.txt
@@ -383,6 +383,7 @@ navigation=Navigáció
networking=Networking
new=Új
newLibrary=Új könyvtár
+nextPage=Next Page
noColor=Szín nélkül
noFiles=Fájlok nélkül
noFileSelected=Nincs kiválasztott fájl
@@ -459,6 +460,7 @@ position=Pozíció
posterPrint=Poszter nyomtatás
preferences=Beállítások
preview=Előnézet
+previousPage=Previous Page
print=Nyomtat
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_i18n.txt b/war/resources/dia_i18n.txt
index 296d8ba9..5c6a5314 100644
--- a/war/resources/dia_i18n.txt
+++ b/war/resources/dia_i18n.txt
@@ -383,6 +383,7 @@ navigation=navigation
networking=networking
new=new
newLibrary=newLibrary
+nextPage=nextPage
noColor=noColor
noFiles=noFiles
noFileSelected=noFileSelected
@@ -459,6 +460,7 @@ position=position
posterPrint=posterPrint
preferences=preferences
preview=preview
+previousPage=previousPage
print=print
printAllPages=printAllPages
procEng=procEng
diff --git a/war/resources/dia_id.txt b/war/resources/dia_id.txt
index a16fd595..f1b545c3 100644
--- a/war/resources/dia_id.txt
+++ b/war/resources/dia_id.txt
@@ -383,6 +383,7 @@ navigation=Navigasi
networking=Networking
new=Baru
newLibrary=Librari baru
+nextPage=Next Page
noColor=Tidak ada warna
noFiles=Tidak ada file
noFileSelected=Tidak ada file yang dipilih
@@ -459,6 +460,7 @@ position=Posisi
posterPrint=Cetak Poster
preferences=Preferensi
preview=Pracetak
+previousPage=Previous Page
print=Cetak
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_it.txt b/war/resources/dia_it.txt
index efc16731..80db27a5 100644
--- a/war/resources/dia_it.txt
+++ b/war/resources/dia_it.txt
@@ -383,6 +383,7 @@ navigation=Navigazione
networking=Networking
new=Nuovo
newLibrary=Nuova libreria
+nextPage=Next Page
noColor=Nessun colore
noFiles=Nessun file
noFileSelected=Nessun file selezionato
@@ -459,6 +460,7 @@ position=Posizione
posterPrint=Stampa poster
preferences=Preferenze
preview=Anteprima
+previousPage=Previous Page
print=Stampa
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ja.txt b/war/resources/dia_ja.txt
index 5a0ace8d..5d9ba3b5 100644
--- a/war/resources/dia_ja.txt
+++ b/war/resources/dia_ja.txt
@@ -383,6 +383,7 @@ navigation=ナビゲーション
networking=新規
new=新規作成
newLibrary=新規ライブラリ
+nextPage=Next Page
noColor=色なし
noFiles=ファイルなし
noFileSelected=ファイルが選ばれていません。
@@ -459,6 +460,7 @@ position=位置
posterPrint=ポスター印刷
preferences=環境設定
preview=印刷プレビュー
+previousPage=Previous Page
print=印刷
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_kn.txt b/war/resources/dia_kn.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_kn.txt
+++ b/war/resources/dia_kn.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ko.txt b/war/resources/dia_ko.txt
index e57f8d26..93f23081 100644
--- a/war/resources/dia_ko.txt
+++ b/war/resources/dia_ko.txt
@@ -383,6 +383,7 @@ navigation=탐색
networking=Networking
new=새로 만들기
newLibrary=새로운 라이브러리
+nextPage=Next Page
noColor=색 없음
noFiles=파일 없음
noFileSelected=선택된 파일 없음
@@ -459,6 +460,7 @@ position=위치
posterPrint=포스터 인쇄
preferences=환경 설정
preview=미리보기
+previousPage=Previous Page
print=인쇄
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_lt.txt b/war/resources/dia_lt.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_lt.txt
+++ b/war/resources/dia_lt.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_lv.txt b/war/resources/dia_lv.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_lv.txt
+++ b/war/resources/dia_lv.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ml.txt b/war/resources/dia_ml.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_ml.txt
+++ b/war/resources/dia_ml.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_mr.txt b/war/resources/dia_mr.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_mr.txt
+++ b/war/resources/dia_mr.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ms.txt b/war/resources/dia_ms.txt
index a51e4d82..8135219a 100644
--- a/war/resources/dia_ms.txt
+++ b/war/resources/dia_ms.txt
@@ -383,6 +383,7 @@ navigation=Pelayaran
networking=Networking
new=Baru
newLibrary=Perpustakaan baru
+nextPage=Next Page
noColor=Tiada warna
noFiles=Tiada fail-fail
noFileSelected=Tiada fail yang dipilih
@@ -459,6 +460,7 @@ position=Posisi
posterPrint=Cetakan poster
preferences=Keutamaan
preview=Pratonton
+previousPage=Previous Page
print=Cetak
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_nl.txt b/war/resources/dia_nl.txt
index 74689686..dce5074e 100644
--- a/war/resources/dia_nl.txt
+++ b/war/resources/dia_nl.txt
@@ -383,6 +383,7 @@ navigation=Navigatie
networking=Networking
new=Nieuw
newLibrary=Nieuwe bibliotheek
+nextPage=Next Page
noColor=Geen kleur
noFiles=Geen bestanden
noFileSelected=Geen bestand geselecteerd
@@ -459,6 +460,7 @@ position=Positie
posterPrint=Poster Afdrukken
preferences=Voorkeuren
preview=Voorbeeld
+previousPage=Previous Page
print=Afdrukken
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_no.txt b/war/resources/dia_no.txt
index fe626a3b..617cb08d 100644
--- a/war/resources/dia_no.txt
+++ b/war/resources/dia_no.txt
@@ -383,6 +383,7 @@ navigation=Navigasjon
networking=Nettverksbygging
new=Ny
newLibrary=Nytt bibliotek
+nextPage=Next Page
noColor=Ingen farge
noFiles=Ingen filer
noFileSelected=Ingen fil valgt
@@ -459,6 +460,7 @@ position=Posisjon
posterPrint=Plakatutskrift
preferences=Innstillinger
preview=Forhåndsvisning
+previousPage=Previous Page
print=Skriv ut
printAllPages=Print All Pages
procEng=Prosessteknikk
diff --git a/war/resources/dia_pl.txt b/war/resources/dia_pl.txt
index a2e68ff7..e98667bd 100644
--- a/war/resources/dia_pl.txt
+++ b/war/resources/dia_pl.txt
@@ -383,6 +383,7 @@ navigation=Nawigacja
networking=Sieci komputerowe
new=Nowy
newLibrary=Nowa biblioteka
+nextPage=Next Page
noColor=Brak koloru
noFiles=Brak plików
noFileSelected=Nie wybrano żadnego pliku
@@ -459,6 +460,7 @@ position=Pozycja
posterPrint=Wydruk plakatu
preferences=Preferencje
preview=Podgląd
+previousPage=Previous Page
print=Drukuj
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_pt-br.txt b/war/resources/dia_pt-br.txt
index 46dc94e9..95c83ee3 100644
--- a/war/resources/dia_pt-br.txt
+++ b/war/resources/dia_pt-br.txt
@@ -383,6 +383,7 @@ navigation=Navegação
networking=Networking
new=Novo 
newLibrary=Nova biblioteca
+nextPage=Next Page
noColor=Sem cor
noFiles=Nenhum arquivo
noFileSelected=Nenhum arquivo selecionado
@@ -459,6 +460,7 @@ position=Posição 
posterPrint=Imprimir Cartaz 
preferences=Preferências
preview=Pré-visualizar 
+previousPage=Previous Page
print=Imprimir 
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_pt.txt b/war/resources/dia_pt.txt
index 1fde9149..a9a43b75 100644
--- a/war/resources/dia_pt.txt
+++ b/war/resources/dia_pt.txt
@@ -383,6 +383,7 @@ navigation=Navegação
networking=Networking
new=Novo 
newLibrary=Nova biblioteca
+nextPage=Next Page
noColor=Sem cor
noFiles=Nenhum ficheiro
noFileSelected=Nenhum ficheiro selecionado
@@ -459,6 +460,7 @@ position=Posição 
posterPrint=Imprimir cartaz 
preferences=Preferências
preview=Pré-visualizar 
+previousPage=Previous Page
print=Imprimir 
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ro.txt b/war/resources/dia_ro.txt
index 7138d2cf..f04f5b4e 100644
--- a/war/resources/dia_ro.txt
+++ b/war/resources/dia_ro.txt
@@ -383,6 +383,7 @@ navigation=Navigare
networking=Networking
new=Nou
newLibrary=Bibliotecă nouă
+nextPage=Next Page
noColor=Fără culoare
noFiles=Nu există fișiere
noFileSelected=Nu a fost selectat nici un fișier
@@ -459,6 +460,7 @@ position=Poziție
posterPrint=Imprimare poster
preferences=Preferințe
preview=Previzualizare
+previousPage=Previous Page
print=Imprimare
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ru.txt b/war/resources/dia_ru.txt
index a1b6f6fa..fa9c48cd 100644
--- a/war/resources/dia_ru.txt
+++ b/war/resources/dia_ru.txt
@@ -383,6 +383,7 @@ navigation=Навигация
networking=Сеть
new=Создать
newLibrary=Новая библиотека
+nextPage=Next Page
noColor=Нет цвета
noFiles=Нет файлов
noFileSelected=Файлы не выделены
@@ -459,6 +460,7 @@ position=Положение
posterPrint=Печать постера
preferences=Предпочтения
preview=Просмотр
+previousPage=Previous Page
print=Печать
printAllPages=Пачать всех страниц
procEng=Техн. процессы
diff --git a/war/resources/dia_sk.txt b/war/resources/dia_sk.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_sk.txt
+++ b/war/resources/dia_sk.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_sl.txt b/war/resources/dia_sl.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_sl.txt
+++ b/war/resources/dia_sl.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_sr.txt b/war/resources/dia_sr.txt
index a69ec733..98d3e1ed 100644
--- a/war/resources/dia_sr.txt
+++ b/war/resources/dia_sr.txt
@@ -383,6 +383,7 @@ navigation=Navigacija
networking=Networking
new=Novi
newLibrary=Nova biblioteka
+nextPage=Next Page
noColor=Bez boje
noFiles=Nema fajlova
noFileSelected=Nijedan izabrani dokument
@@ -459,6 +460,7 @@ position=Pozicija
posterPrint=Štampa postera
preferences=Podešavanja
preview=Pregled
+previousPage=Previous Page
print=Štampa
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_sv.txt b/war/resources/dia_sv.txt
index 9632101c..f6d7743b 100644
--- a/war/resources/dia_sv.txt
+++ b/war/resources/dia_sv.txt
@@ -383,6 +383,7 @@ navigation=Navigering
networking=Networking
new=Ny
newLibrary=Nytt bibliotek
+nextPage=Next Page
noColor=Ingen färg
noFiles=Inga filer
noFileSelected=Inga filer har valts
@@ -459,6 +460,7 @@ position=Position
posterPrint=Posterutskrift
preferences=Preferenser
preview=Förhandsgranska
+previousPage=Previous Page
print=Skriv ut
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_sw.txt b/war/resources/dia_sw.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_sw.txt
+++ b/war/resources/dia_sw.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_ta.txt b/war/resources/dia_ta.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_ta.txt
+++ b/war/resources/dia_ta.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_te.txt b/war/resources/dia_te.txt
index d8305f64..b24ae5d1 100644
--- a/war/resources/dia_te.txt
+++ b/war/resources/dia_te.txt
@@ -383,6 +383,7 @@ navigation=Navigation
networking=Networking
new=New
newLibrary=New Library
+nextPage=Next Page
noColor=No Color
noFiles=No Files
noFileSelected=No file selected
@@ -459,6 +460,7 @@ position=Position
posterPrint=Poster Print
preferences=Preferences
preview=Preview
+previousPage=Previous Page
print=Print
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_th.txt b/war/resources/dia_th.txt
index c9656cdd..27796773 100644
--- a/war/resources/dia_th.txt
+++ b/war/resources/dia_th.txt
@@ -383,6 +383,7 @@ navigation=ท่องเว็บ
networking=Networking
new=ใหม่
newLibrary=ที่จัดเก็บเอกสารใหม่
+nextPage=Next Page
noColor=ไม่มีสี
noFiles=ไม่มีไฟล์
noFileSelected=ไม่มีไฟล์ที่เลือก
@@ -459,6 +460,7 @@ position=ตำแหน่ง
posterPrint=พิมพ์โปสเตอร์
preferences=การตั้งค่า
preview=ดูภาพก่อนพิมพ์
+previousPage=Previous Page
print=พิมพ์
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_tr.txt b/war/resources/dia_tr.txt
index ab608e72..1a8db1b2 100644
--- a/war/resources/dia_tr.txt
+++ b/war/resources/dia_tr.txt
@@ -383,6 +383,7 @@ navigation=Navigasyon
networking=Networking
new=Yeni
newLibrary=Yeni kütüphane
+nextPage=Next Page
noColor=Renk yok
noFiles=Dosya yok
noFileSelected=Hiç dosya seçilmedi
@@ -459,6 +460,7 @@ position=Konum
posterPrint=Poster baskısı
preferences=Tercihler
preview=Ön-izleme
+previousPage=Previous Page
print=Yazdır
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_uk.txt b/war/resources/dia_uk.txt
index 915a1fa9..c6e0fa62 100644
--- a/war/resources/dia_uk.txt
+++ b/war/resources/dia_uk.txt
@@ -383,6 +383,7 @@ navigation=Навігація
networking=Networking
new=Створити
newLibrary=Нова бібліотека
+nextPage=Next Page
noColor=Немає кольору
noFiles=Немає файлів
noFileSelected=Файли не виділені
@@ -459,6 +460,7 @@ position=Положення
posterPrint=Друк постера
preferences=Налаштування
preview=Попередній перегляд
+previousPage=Previous Page
print=Роздрукувати
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_vi.txt b/war/resources/dia_vi.txt
index d366b889..c25bca5a 100644
--- a/war/resources/dia_vi.txt
+++ b/war/resources/dia_vi.txt
@@ -383,6 +383,7 @@ navigation=Định hướng
networking=Networking
new=Mới
newLibrary=Thư viện mới
+nextPage=Next Page
noColor=Không có màu
noFiles=Không có tập tin
noFileSelected=Không có tập tin được chọn
@@ -459,6 +460,7 @@ position=Vị trí
posterPrint=In áp phích
preferences=Tùy chọn
preview=Xem trước
+previousPage=Previous Page
print=In
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_zh-tw.txt b/war/resources/dia_zh-tw.txt
index bf7b9c81..606f5f62 100644
--- a/war/resources/dia_zh-tw.txt
+++ b/war/resources/dia_zh-tw.txt
@@ -383,6 +383,7 @@ navigation=導航
networking=Networking
new=新增
newLibrary=New Library
+nextPage=Next Page
noColor=無顏色
noFiles=無檔案
noFileSelected=未選擇檔案
@@ -459,6 +460,7 @@ position=位置
posterPrint=Poster Print
preferences=偏好
preview=預覽
+previousPage=Previous Page
print=列印
printAllPages=Print All Pages
procEng=Proc. Eng.
diff --git a/war/resources/dia_zh.txt b/war/resources/dia_zh.txt
index 7c596786..cf1e3d74 100644
--- a/war/resources/dia_zh.txt
+++ b/war/resources/dia_zh.txt
@@ -383,6 +383,7 @@ navigation=局部导航
networking=Networking
new=新建
newLibrary=新建库
+nextPage=Next Page
noColor=无颜色
noFiles=无文件
noFileSelected=没有选择文件
@@ -459,6 +460,7 @@ position=位置
posterPrint=海报样式
preferences=喜好
preview=预览
+previousPage=Previous Page
print=打印
printAllPages=Print All Pages
procEng=Proc. Eng.