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:
authorGaudenz Alder <alderg@gmail.com>2016-11-23 15:47:55 +0300
committerGaudenz Alder <alderg@gmail.com>2016-11-23 15:47:55 +0300
commitb5e1fcbcf451468ff5833fcd4039648f7bc432e1 (patch)
tree124427bd7b5468398076013ac8a0d2b5d1aa7ce4
parentddd10e5fff0ba74181e8738f3f9358e0ace3952c (diff)
6.0.1.7 releasev6.0.1.7
Former-commit-id: 8624c0275ef48eafda7829ab656e4057524952af
-rw-r--r--ChangeLog7
-rw-r--r--VERSION2
-rw-r--r--etc/sandstorm/README.md2
-rw-r--r--etc/sandstorm/rootFiles1
-rw-r--r--etc/sandstorm/stage.sh2
-rw-r--r--src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java10
-rw-r--r--war/cache.manifest2
-rw-r--r--war/js/app.min.js1321
-rw-r--r--war/js/atlas-viewer.min.js577
-rw-r--r--war/js/atlas.min.js757
-rw-r--r--war/js/diagramly/App.js11
-rw-r--r--war/js/diagramly/Dialogs.js23
-rw-r--r--war/js/diagramly/EditorUi.js34
-rw-r--r--war/js/embed-static.min.js4
-rw-r--r--war/js/mxgraph/Dialogs.js4
-rw-r--r--war/js/mxgraph/Graph.js2
-rw-r--r--war/js/reader.min.js4
-rw-r--r--war/js/viewer.min.js575
-rw-r--r--war/resources/dia_pt-br.txt96
-rw-r--r--war/styles/grapheditor.css10
20 files changed, 1752 insertions, 1692 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d67d8bf..f99a2745 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+23-NOV-2016: 6.0.1.7
+
+- Fixes links to same domain for viewer in iframes
+- Fixes automatic loading of libraries
+- Fixes sidebar title overlap with buttons
+- Fixes lost names, delete order in library dialog
+
21-NOV-2016: 6.0.1.6
- Fixes missing auth header in Google client API
diff --git a/VERSION b/VERSION
index ee0a6aaa..3d8681cd 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-6.0.1.6 \ No newline at end of file
+6.0.1.7 \ No newline at end of file
diff --git a/etc/sandstorm/README.md b/etc/sandstorm/README.md
index 24231172..b8e1090a 100644
--- a/etc/sandstorm/README.md
+++ b/etc/sandstorm/README.md
@@ -9,4 +9,4 @@
- Log into the vagrant box `vagrant-spk vm ssh`
- `sudo apt-get install g++`
- [Install latest capnp](https://capnproto.org/install.html)
-- In the build directory `vagrant-spk dev`
+- In the build directory `vagrant-spk dev` \ No newline at end of file
diff --git a/etc/sandstorm/rootFiles b/etc/sandstorm/rootFiles
index 63a73263..9f19cf58 100644
--- a/etc/sandstorm/rootFiles
+++ b/etc/sandstorm/rootFiles
@@ -1,5 +1,6 @@
description.md
Makefile
+pgp-keyring
pgp-signature
sandstorm-pkgdef.capnp
server.c++
diff --git a/etc/sandstorm/stage.sh b/etc/sandstorm/stage.sh
index 5ba86205..1662279a 100644
--- a/etc/sandstorm/stage.sh
+++ b/etc/sandstorm/stage.sh
@@ -43,4 +43,4 @@ cp -rf ../../war/templates/* build/.sandstorm/client/templates/
echo "Creating file list"
cd build/.sandstorm
gfind ./client -type f -printf "%p\n" | cut -c 3- > sandstorm-files.list
-cat ../../rootFiles >> sandstorm-files.list \ No newline at end of file
+cat ../../rootFiles >> sandstorm-files.list
diff --git a/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java b/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
index 47476f7d..f42a990b 100644
--- a/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
+++ b/src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
@@ -292,6 +292,14 @@ public class GliffyDiagramConverter
}
/**
+ * Returns true if the gradient is ignored for this shape.
+ */
+ private boolean isGradientIgnored(GliffyObject gliffyObject, GliffyObject parent)
+ {
+ return false; //gliffyObject.tid == null || gliffyObject.tid.startsWith("com.gliffy.shape.venn.outline.default");
+ }
+
+ /**
* Performs the object conversion
*
*
@@ -347,7 +355,7 @@ public class GliffyDiagramConverter
if(style.lastIndexOf("strokeColor") == -1)
style.append("strokeColor=" + shape.strokeColor).append(";");
- if (shape.gradient)
+ if (shape.gradient && !isGradientIgnored(gliffyObject, parent))
{
style.append("gradientColor=#FFFFFF;gradientDirection=north;");
}
diff --git a/war/cache.manifest b/war/cache.manifest
index c79aa3cc..f52e396d 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 11/21/2016 09:53 AM
+# 11/23/2016 01:33 PM
/app.html
/index.html?offline=1
diff --git a/war/js/app.min.js b/war/js/app.min.js
index 922316ad..1eedee02 100644
--- a/war/js/app.min.js
+++ b/war/js/app.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:n+" "+n,coordorigin:-l+" "+-l}),{width:n,height:n})}function g(a,k,n){c(m,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:n}),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,n=2*l;k=2*-(e.width+e.length)+"px";var m=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,m)};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,n=["webkit","Moz","ms","O"],m={},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,n=(c.lines-1)*(1-c.direction)/2,m=c.fps,p=m/c.speed,s=(1-c.opacity)/(p*c.trail/100),r=p/c.lines;!function E(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*r)%p*s,c.opacity),e.opacity(f,
-b*c.direction+n,g,c);e.timeout=e.el&&setTimeout(E,~~(1E3/m))}()}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*n+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,n=(c.lines-1)*(1-c.direction)/2,m=c.fps,p=m/c.speed,s=(1-c.opacity)/(p*c.trail/100),r=p/c.lines;!function F(){k++;for(var b=0;b<c.lines;b++)g=Math.max(1-(k+(c.lines-b)*r)%p*s,c.opacity),e.opacity(f,
+b*c.direction+n,g,c);e.timeout=e.el&&setTimeout(F,~~(1E3/m))}()}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*n+e.rotate)+"deg) translate("+e.radius+"px,0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(var k,
n=0,m=(e.lines-1)*(1-e.direction)/2;n<e.lines;n++)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,m+n*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[n%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(" "),"armenian decimal decimal-leading-zero disc georgian lower-alpha lower-greek lower-latin lower-roman square upper-alpha upper-latin upper-roman".split(" "),"100 200 300 400 500 600 700 800 900 bold bolder lighter".split(" "),"block-level inline-level table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group".split(" "),
@@ -35,32 +35,32 @@ b[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},g;for(g in e)"string"===typeof e[g]&&Object.hasOwnProperty.call(e,g)&&(e[g]=e[e[g]]);"undefined"!==typeof window&&(window.cssSchema=e);var k,l;(function(){function b(a){var d=parseInt(a.substring(1),16);return 65535<d?(d-=65536,String.fromCharCode(55296+(d>>10),56320+(d&1023))):d==d?String.fromCharCode(d):" ">a[1]?"":a[1]}function a(b,d){return'"'+b.replace(/[\u0000-\u001f\\\"<>]/g,
d)+'"'}function d(b){return c[b]||(c[b]="\\"+b.charCodeAt(0).toString(16)+" ")}function e(b){return f[b]||(f[b]=("\u0010">b?"%0":"%")+b.charCodeAt(0).toString(16))}var c={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])",
-"gi"),n=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),m=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(a){return a.replace(n,b)};k=function(b){b=(""+b).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,n=b.length;k<n;++k){var p=l(b[k]),u=p.length,t=p.charCodeAt(0),p=34==t||39==t?a(p.substring(1,u-1),d):47==t&&1<u||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
-p||32>=t?" ":/url\(/i.test(p)?"url("+a(p.replace(m,""),e)+")":p;if(f!=p||" "!=p)b[c++]=f=p}b.length=c;return b}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var n=function(){function b(a){a=(""+a).match(m);return!a?f:new g(k(a[1]),k(a[2]),k(a[3]),k(a[4]),k(a[5]),k(a[6]),k(a[7]))}function a(b,e){return"string"==typeof b?encodeURI(b).replace(e,d):f}function d(b){b=b.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function e(b){if(b===
+"gi"),n=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),m=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(a){return a.replace(n,b)};k=function(b){b=(""+b).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,n=b.length;k<n;++k){var p=l(b[k]),t=p.length,u=p.charCodeAt(0),p=34==u||39==u?a(p.substring(1,t-1),d):47==u&&1<t||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
+p||32>=u?" ":/url\(/i.test(p)?"url("+a(p.replace(m,""),e)+")":p;if(f!=p||" "!=p)b[c++]=f=p}b.length=c;return b}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var n=function(){function b(a){a=(""+a).match(m);return!a?f:new g(k(a[1]),k(a[2]),k(a[3]),k(a[4]),k(a[5]),k(a[6]),k(a[7]))}function a(b,e){return"string"==typeof b?encodeURI(b).replace(e,d):f}function d(b){b=b.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function e(b){if(b===
f)return f;b=b.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var a=l,d;(d=b.replace(a,"$1"))!=b;b=d);return b}function c(b,a){var d=b.T(),f=a.K();f?d.ga(a.j):f=a.X();f?d.da(a.n):f=a.Y();f?d.ea(a.k):f=a.$();var g=a.g,k=e(g);if(f)d.ca(a.V()),k=k&&k.replace(n,"");else if(f=!!g){if(47!==k.charCodeAt(0))var k=e(d.g||"").replace(n,""),l=k.lastIndexOf("/")+1,k=e((l?k.substring(0,l):"")+e(g)).replace(n,"")}else k=k&&k.replace(n,""),k!==g&&d.G(k);f?d.G(k):f=a.aa();f?d.O(a.l):f=a.Z();f&&d.fa(a.o);
return d}function g(b,a,d,e,c,f,k){this.j=b;this.n=a;this.k=d;this.h=e;this.g=c;this.l=f;this.o=k}function k(b){return"string"==typeof b&&0<b.length?b:f}var l=RegExp(/(\/|^)(?:[^./][^/]*|\.{2,}(?:[^./][^/]*)|\.{3,}[^/]*)\/\.\.(?:\/|$)/),n=/^(?:\.\.\/)*(?:\.\.$)?/;g.prototype.toString=function(){var b=[];f!==this.j&&b.push(this.j,":");f!==this.k&&(b.push("//"),f!==this.n&&b.push(this.n,"@"),b.push(this.k),f!==this.h&&b.push(":",this.h.toString()));f!==this.g&&b.push(this.g);f!==this.l&&b.push("?",
this.l);f!==this.o&&b.push("#",this.o);return b.join("")};g.prototype.T=function(){return new g(this.j,this.n,this.k,this.h,this.g,this.l,this.o)};g.prototype.W=function(){return this.j&&decodeURIComponent(this.j).toLowerCase()};g.prototype.ga=function(b){this.j=b?b:f};g.prototype.K=function(){return f!==this.j};g.prototype.da=function(b){this.n=b?b:f};g.prototype.X=function(){return f!==this.n};g.prototype.ea=function(b){this.k=b?b:f;this.G(this.g)};g.prototype.Y=function(){return f!==this.k};g.prototype.V=
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 m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
-p=/[#\/\?@]/g,u=/[\#\?]/g;g.parse=b;g.create=function(b,e,c,k,l,n,m){b=new g(a(b,p),a(e,p),"string"==typeof c?encodeURIComponent(c):f,0<k?k.toString():f,a(l,u),f,"string"==typeof m?encodeURIComponent(m):f);n&&("string"===typeof n?b.O(n.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(n));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=
-n);var m=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?n.ha.N(b,a):a}function t(b,a,d){if(!d)return f;var e=(""+b).match(F);return e&&(!e[1]||G.test(e[1]))?d(b,a):f}function C(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"},F=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function Q(d,c,f,g,n){d=C(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var p=m.cssPropBits,u=p&80,q=p&1536,s=NaN,r=0,A=0;r<c.length;++r){var E=c[r].toLowerCase(),B=E.charCodeAt(0),F,G,H,z,R,ga;if(32===B)E="";else if(34===B)E=16===u?f?b(t(k(g,l(c[r].substring(1,E.length-1))),d,f)):"":p&8&&!(u&u-1)?E:"";else if("inherit"!==E){if(R=m.cssLitGroup){var ca;if(!(ca=m.cssLitMap)){ca=
-{};for(var $=R.length;0<=--$;)for(var fa=R[$],ia=fa.length;0<=--ia;)ca[fa[ia]]=a;ca=m.cssLitMap=ca}R=ca}else R=a;if(!(ga=R,ga[C(E)]===a))if(35===B&&/^#(?:[0-9a-f]{3}){1,2}$/.test(E))E=p&2?E:"";else if(48<=B&&57>=B)E=p&1?E:"";else if(F=E.charCodeAt(1),G=E.charCodeAt(2),H=48<=F&&57>=F,z=48<=G&&57>=G,43===B&&(H||46===F&&z))E=p&1?(H?"":"0")+E.substring(1):"";else if(45===B&&(H||46===F&&z))E=p&4?(H?"-":"-0")+E.substring(1):p&1?"0":"";else if(46===B&&H)E=p&1?"0"+E:"";else if('url("'===E.substring(0,5))E=
-f&&p&16?b(t(k(g,c[r].substring(5,E.length-2)),d,f)):"";else if("("===E.charAt(E.length-1))a:{R=c;ca=r;E=1;$=ca+1;for(B=R.length;$<B&&E;)fa=R[$++],E+=")"===fa?-1:/^[^"']*\($/.test(fa);if(!E){E=R[ca].toLowerCase();B=C(E);R=R.splice(ca,$-ca,"");ca=m.cssFns;$=0;for(fa=ca.length;$<fa;++$)if(ca[$].substring(0,B.length)==B){R[0]=R[R.length-1]="";Q(ca[$],R,f,g);E=E+R.join(" ")+")";break a}}E=""}else E=q&&/^-?[a-z_][\w\-]*$/.test(E)&&!/__$/.test(E)?n&&512===q?c[r]+n:1024===q&&e[E]&&"number"===typeof e[E].oa?
-E:"":/^\w+$/.test(E)&&64===u&&p&8?s+1===A?(c[s]=c[s].substring(0,c[s].length-1)+" "+E+'"',""):(s=A,'"'+E+'"'):""}E&&(c[A++]=E)}1===A&&'url("about:blank")'===c[0]&&(A=0);c.length=A}}}();var E=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(p,t){function q(e,f,g){var k,m,p,t,s,r=c;k="";if(e<f)if(s=b[e],"*"===s)++e,k=s;else if(/^[a-zA-Z]/.test(s)&&(m=n(s.toLowerCase(),[])))"tagName"in m&&(s=m.tagName),++e,k=s;for(t=p=m="";r&&e<f;++e)if(s=b[e],"#"===s.charAt(0))/^#_|__$|[^\w#:\-]/.test(s)?r=d:m+=s+l;else if("."===s)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(s=b[e])&&!/^_|__$/.test(s)?m+="."+s:r=d;else if(e+1<f&&"["===b[e]){++e;var A=b[e++].toLowerCase();s=u.m[k+"::"+A];s!==+s&&(s=u.m["*::"+
-A]);var y;a.ia?(y=a.ia(k,A),"string"!==typeof y&&(r=d,y=A),r&&s!==+s&&(s=u.d.NONE)):(y=A,s!==+s&&(r=d));var x=A="",B=d;/^[~^$*|]?=$/.test(b[e])&&(A=b[e++],x=b[e++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--e),/^"([^\"\\]|\\.)*"$/.test(x)||(r=d),(B="i"===b[e])&&++e);"]"!==b[e]&&(++e,r=d);switch(s){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===A||"~\x3d"===A||"$\x3d"===A)&&'""'!=x&&!B?x='"'+x.substring(1,x.length-
-1)+l+'"':"|\x3d"===A||""===A||(r=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==A&&(r=d);break;default:r=d}r&&(p+="["+y.replace(/[^\w-]/g,"\\$\x26")+A+x+(B?" i]":"]"))}else if(e<f&&":"===b[e])if(s=b[++e],E.test(s))t+=":"+s;else break;else break;e!==f&&(r=d);r&&(e=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+p+t+g)&&v.push(e);return r}" "===b[p]&&++p;t-1!==p&&" "===b[t]&&--t;for(var v=[],s=p,r=c,A=p;r&&A<t;++A){var y=b[A];if(H[y]===H||" "===y)q(s,A,y)?s=A+1:r=d}q(s,t,"")||(r=d);return r?(v.length&&(s=
-v.join(""),k!==f&&(s="."+k+" "+s),m.push(s)),c):!e||e(b.slice(p,t))}var k=a.na,l=a.L,n=a.Aa,m=[],p=0,t,q=0,v;for(t=0;t<b.length;++t)if(v=b[t],"("==v||"["==v?(++q,c):")"==v||"]"==v?(q&&--q,c):!(" "==b[t]&&(q||H[b[t-1]]===H||H[b[t+1]]===H)))b[p++]=b[t];b.length=p;p=b.length;for(t=q=0;t<p;++t)if(","===b[t]){if(!g(q,t))return f;q=t+1}return!g(q,p)?f:m};(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,n,u,v,r,A){function E(){G=
-C.length&&C[C.length-1]===f}var B=a,F=A||[0],C=[],G=d;q(l,{startStylesheet:function(){B=[]},endStylesheet:function(){},startAtrule:function(a,d){if(G)a=f;else if("@media"===a)B.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(B.push(a," ",c+n.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof r){var l=s(d.slice(1));if("not all"!==l){++F[0];var m=[];B.push(m);var p=t(k(g,b(d[0])),function(b){var a=
-e(p,b.qa,n,u,v,r,F);--F[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;m[0]=b;r(b,!!F[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");G=!a;C.push(a)},endAtrule:function(){C.pop();G||B.push(";");E()},startBlock:function(){G||B.push("{")},endBlock:function(){G||(B.push("}"),G=c)},startRuleset:function(b){if(!G){var d=a;"@keyframes"===C[C.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-G=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,n),!b||!b.length?G=c:d=b.join(", "));G||B.push(d,"{")}C.push(f)},endRuleset:function(){C.pop();G||B.push("}");E()},declaration:function(b,a){if(!G){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);m(b,a,u,g,n.L);a.length&&B.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return B.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=m,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=
+p=/[#\/\?@]/g,t=/[\#\?]/g;g.parse=b;g.create=function(b,e,c,k,l,n,m){b=new g(a(b,p),a(e,p),"string"==typeof c?encodeURIComponent(c):f,0<k?k.toString():f,a(l,t),f,"string"==typeof m?encodeURIComponent(m):f);n&&("string"===typeof n?b.O(n.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(n));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=
+n);var m=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(A,g)+'")':'url("about:blank")'}function g(b){return B[b]}function k(b,a){return b?n.ha.N(b,a):a}function u(b,a,d){if(!d)return f;var e=(""+b).match(E);return e&&(!e[1]||G.test(e[1]))?d(b,a):f}function C(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function Q(d,c,f,g,n){d=C(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var p=m.cssPropBits,t=p&80,q=p&1536,s=NaN,r=0,z=0;r<c.length;++r){var F=c[r].toLowerCase(),E=F.charCodeAt(0),B,G,H,A,R,ga;if(32===E)F="";else if(34===E)F=16===t?f?b(u(k(g,l(c[r].substring(1,F.length-1))),d,f)):"":p&8&&!(t&t-1)?F:"";else if("inherit"!==F){if(R=m.cssLitGroup){var ca;if(!(ca=m.cssLitMap)){ca=
+{};for(var Z=R.length;0<=--Z;)for(var ea=R[Z],ia=ea.length;0<=--ia;)ca[ea[ia]]=a;ca=m.cssLitMap=ca}R=ca}else R=a;if(!(ga=R,ga[C(F)]===a))if(35===E&&/^#(?:[0-9a-f]{3}){1,2}$/.test(F))F=p&2?F:"";else if(48<=E&&57>=E)F=p&1?F:"";else if(B=F.charCodeAt(1),G=F.charCodeAt(2),H=48<=B&&57>=B,A=48<=G&&57>=G,43===E&&(H||46===B&&A))F=p&1?(H?"":"0")+F.substring(1):"";else if(45===E&&(H||46===B&&A))F=p&4?(H?"-":"-0")+F.substring(1):p&1?"0":"";else if(46===E&&H)F=p&1?"0"+F:"";else if('url("'===F.substring(0,5))F=
+f&&p&16?b(u(k(g,c[r].substring(5,F.length-2)),d,f)):"";else if("("===F.charAt(F.length-1))a:{R=c;ca=r;F=1;Z=ca+1;for(E=R.length;Z<E&&F;)ea=R[Z++],F+=")"===ea?-1:/^[^"']*\($/.test(ea);if(!F){F=R[ca].toLowerCase();E=C(F);R=R.splice(ca,Z-ca,"");ca=m.cssFns;Z=0;for(ea=ca.length;Z<ea;++Z)if(ca[Z].substring(0,E.length)==E){R[0]=R[R.length-1]="";Q(ca[Z],R,f,g);F=F+R.join(" ")+")";break a}}F=""}else F=q&&/^-?[a-z_][\w\-]*$/.test(F)&&!/__$/.test(F)?n&&512===q?c[r]+n:1024===q&&e[F]&&"number"===typeof e[F].oa?
+F:"":/^\w+$/.test(F)&&64===t&&p&8?s+1===z?(c[s]=c[s].substring(0,c[s].length-1)+" "+F+'"',""):(s=z,'"'+F+'"'):""}F&&(c[z++]=F)}1===z&&'url("about:blank")'===c[0]&&(z=0);c.length=z}}}();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(p,u){function q(e,f,g){var k,m,p,u,s,r=c;k="";if(e<f)if(s=b[e],"*"===s)++e,k=s;else if(/^[a-zA-Z]/.test(s)&&(m=n(s.toLowerCase(),[])))"tagName"in m&&(s=m.tagName),++e,k=s;for(u=p=m="";r&&e<f;++e)if(s=b[e],"#"===s.charAt(0))/^#_|__$|[^\w#:\-]/.test(s)?r=d:m+=s+l;else if("."===s)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(s=b[e])&&!/^_|__$/.test(s)?m+="."+s:r=d;else if(e+1<f&&"["===b[e]){++e;var z=b[e++].toLowerCase();s=t.m[k+"::"+z];s!==+s&&(s=t.m["*::"+
+z]);var y;a.ia?(y=a.ia(k,z),"string"!==typeof y&&(r=d,y=z),r&&s!==+s&&(s=t.d.NONE)):(y=z,s!==+s&&(r=d));var x=z="",E=d;/^[~^$*|]?=$/.test(b[e])&&(z=b[e++],x=b[e++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--e),/^"([^\"\\]|\\.)*"$/.test(x)||(r=d),(E="i"===b[e])&&++e);"]"!==b[e]&&(++e,r=d);switch(s){case t.d.CLASSES:case t.d.LOCAL_NAME:case t.d.NONE:break;case t.d.GLOBAL_NAME:case t.d.ID:case t.d.IDREF:("\x3d"===z||"~\x3d"===z||"$\x3d"===z)&&'""'!=x&&!E?x='"'+x.substring(1,x.length-
+1)+l+'"':"|\x3d"===z||""===z||(r=d);break;case t.d.URI:case t.d.URI_FRAGMENT:""!==z&&(r=d);break;default:r=d}r&&(p+="["+y.replace(/[^\w-]/g,"\\$\x26")+z+x+(E?" i]":"]"))}else if(e<f&&":"===b[e])if(s=b[++e],F.test(s))u+=":"+s;else break;else break;e!==f&&(r=d);r&&(e=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+p+u+g)&&v.push(e);return r}" "===b[p]&&++p;u-1!==p&&" "===b[u]&&--u;for(var v=[],s=p,r=c,z=p;r&&z<u;++z){var y=b[z];if(H[y]===H||" "===y)q(s,z,y)?s=z+1:r=d}q(s,u,"")||(r=d);return r?(v.length&&(s=
+v.join(""),k!==f&&(s="."+k+" "+s),m.push(s)),c):!e||e(b.slice(p,u))}var k=a.na,l=a.L,n=a.Aa,m=[],p=0,u,q=0,v;for(u=0;u<b.length;++u)if(v=b[u],"("==v||"["==v?(++q,c):")"==v||"]"==v?(q&&--q,c):!(" "==b[u]&&(q||H[b[u-1]]===H||H[b[u+1]]===H)))b[p++]=b[u];b.length=p;p=b.length;for(u=q=0;u<p;++u)if(","===b[u]){if(!g(q,u))return f;q=u+1}return!g(q,p)?f:m};(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,n,t,v,r,z){function F(){C=
+G.length&&G[G.length-1]===f}var E=a,B=z||[0],G=[],C=d;q(l,{startStylesheet:function(){E=[]},endStylesheet:function(){},startAtrule:function(a,d){if(C)a=f;else if("@media"===a)E.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(E.push(a," ",c+n.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof r){var l=s(d.slice(1));if("not all"!==l){++B[0];var m=[];E.push(m);var p=u(k(g,b(d[0])),function(b){var a=
+e(p,b.qa,n,t,v,r,B);--B[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;m[0]=b;r(b,!!B[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");C=!a;G.push(a)},endAtrule:function(){G.pop();C||E.push(";");F()},startBlock:function(){C||E.push("{")},endBlock:function(){C||(E.push("}"),C=c)},startRuleset:function(b){if(!C){var d=a;"@keyframes"===G[G.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+C=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,n),!b||!b.length?C=c:d=b.join(", "));C||E.push(d,"{")}G.push(f)},endRuleset:function(){G.pop();C||E.push("}");F()},declaration:function(b,a){if(!C){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);m(b,a,t,g,n.L);a.length&&E.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return E.join("")}},va:!!B[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
+typeof window&&(window.sanitizeCssProperty=m,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,u;(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,n=f(b,a,d,c);if(0>n)return n=~n,n===k?n+1:n;var m=b[n];if("{"!==m)return n===k?n+1:n;a=n+1;n>k&&" "===b[n-1]&&--n;for(g.startRuleset&&g.startRuleset(b.slice(k,n));a<d;){m=b[a];if("}"===m){++a;break}a=" "===m?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(!n.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 m=f(b,a,e,d);if(0>m)m=~m;else{for(var p=[],u=0,t=a;t<m;++t)a=b[t]," "!==a&&(p[u++]=a);if(m<e){do{a=b[m];
-if(";"===a||"}"===a)break;u=0}while(++m<e);";"===a&&++m}u&&c.declaration&&c.declaration(k.toLowerCase(),p)}return m}q=function(a,d){var f=k(a);d.startStylesheet&&d.startStylesheet();for(var g=0,l=f.length;g<l;)g=" "===f[g]?g+1:g<l?"@"===f[g].charAt(0)?b(f,g,l,d,c):e(f,g,l,d):g;d.endStylesheet&&d.endStylesheet()};var n=/^-?[a-z]/i;t=function(b,a){for(var d=k(b),e=0,c=d.length;e<c;)e=" "!==d[e]?l(d,e,c,a):e+1}})();"undefined"!==typeof window&&(window.parseCssStylesheet=q,window.parseCssDeclarations=
-t);var u={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};u.atype=u.d;u.m={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,
+"["===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(!n.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 m=f(b,a,e,d);if(0>m)m=~m;else{for(var p=[],t=0,u=a;u<m;++u)a=b[u]," "!==a&&(p[t++]=a);if(m<e){do{a=b[m];
+if(";"===a||"}"===a)break;t=0}while(++m<e);";"===a&&++m}t&&c.declaration&&c.declaration(k.toLowerCase(),p)}return m}q=function(a,d){var f=k(a);d.startStylesheet&&d.startStylesheet();for(var g=0,l=f.length;g<l;)g=" "===f[g]?g+1:g<l?"@"===f[g].charAt(0)?b(f,g,l,d,c):e(f,g,l,d):g;d.endStylesheet&&d.endStylesheet()};var n=/^-?[a-z]/i;u=function(b,a){for(var d=k(b),e=0,c=d.length;e<c;)e=" "!==d[e]?l(d,e,c,a):e+1}})();"undefined"!==typeof window&&(window.parseCssStylesheet=q,window.parseCssDeclarations=
+u);var t={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};t.atype=t.d;t.m={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,
"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::ontouchcancel":2,"*::ontouchend":2,"*::ontouchenter":2,"*::ontouchleave":2,"*::ontouchmove":2,"*::ontouchstart":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::tabindex":0,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,
"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::target":10,"audio::controls":0,"audio::loop":0,"audio::mediagroup":5,"audio::muted":0,"audio::preload":0,"audio::src":1,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,
"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"command::checked":0,"command::command":5,"command::disabled":0,"command::icon":1,"command::label":0,"command::radiogroup":0,"command::type":0,"data::value":0,"del::cite":1,"del::datetime":0,"details::open":0,"dir::compact":0,"div::align":0,"dl::compact":0,"fieldset::disabled":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,
@@ -70,41 +70,41 @@ t);var u={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,
"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"output::for":6,"output::name":8,"p::align":0,"pre::width":0,"progress::max":0,"progress::min":0,"progress::value":0,"q::cite":1,"select::autocomplete":0,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::required":0,"select::size":0,"source::type":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,
"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::autocomplete":0,"textarea::cols":0,"textarea::disabled":0,"textarea::inputmode":0,"textarea::name":8,
"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::placeholder":0,"textarea::readonly":0,"textarea::required":0,"textarea::rows":0,"textarea::wrap":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,
-"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0};u.ATTRIBS=u.m;u.c={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};u.eflags=
-u.c;u.f={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,
-kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2};u.ELEMENTS=u.f;u.Q={a:"HTMLAnchorElement",abbr:"HTMLElement",
+"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0};t.ATTRIBS=t.m;t.c={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};t.eflags=
+t.c;t.f={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,
+kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2};t.ELEMENTS=t.f;t.Q={a:"HTMLAnchorElement",abbr:"HTMLElement",
acronym:"HTMLElement",address:"HTMLElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLBaseFontElement",bdi:"HTMLElement",bdo:"HTMLElement",big:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",center:"HTMLElement",cite:"HTMLElement",code:"HTMLElement",
col:"HTMLTableColElement",colgroup:"HTMLTableColElement",command:"HTMLCommandElement",data:"HTMLElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",
frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",
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(P.hasOwnProperty(a))d=P[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,P[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(Z,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(X,"\x26lt;").replace(aa,"\x26gt;").replace(W,"\x26#34;")}function l(b){return b.replace(T,"\x26amp;$1").replace(X,"\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}u(a,c,0,{r:d,C:d},e)}}function p(b,a,d,e,c){return function(){u(b,a,d,e,c)}}function u(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,n,m=d.length;e<m;){var s=d[e++],r=d[e];switch(s){case "\x26":ea.test(r)?(a.e&&a.e("\x26"+r,g,$,p(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,$,p(a,d,e,f,g));break;case "\x3c/":if(k=
-/^([-\w:]+)[^\'\"]*/.exec(r))if(k[0].length===r.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,$,p(a,d,e,f,g));else{var A=d,y=e,x=a,F=g,C=$,D=f,H=q(A,y);H?(x.t&&x.t(H.name,F,C,p(x,A,y,D,F)),e=H.next):e=A.length}else a.e&&a.e("\x26lt;/",g,$,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(r))if(k[0].length===r.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,$,p(a,d,e,f,g));var P=b.f[n];P&ca&&(e=t(d,{name:n,next:e,c:P},a,g,$,f))}else{var A=d,y=a,x=g,F=
-$,C=f,z=q(A,e);z?(y.w&&y.w(z.name,z.R,x,F,p(y,A,z.next,C,x)),e=z.c&ca?t(A,z,y,x,F,C):z.next):e=A.length}else a.e&&a.e("\x26lt;",g,$,p(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 R=d.slice(e,l).join("");a.A(R.substr(0,R.length-2),g,$,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,$,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(r)){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,$,p(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,$,p(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,$,p(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,$,p(a,d,e,f,g));break;case "":break;default:a.e&&a.e(s,g,$,p(a,d,e,f,g))}}a.B&&a.B(g)}catch(N){if(N!==$)throw N;}}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 n=fa[d.name],m=d.next,u=d.next+1;u<k&&!("\x3c/"===
-a[u-1]&&n.test(a[u]));u++);u<k&&(u-=1);k=a.slice(m,u).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,p(e,a,u,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,u,g,c));else throw Error("bug");return u}function q(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 p=[];""!==l;)if(f=R.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],u=d,l=[l,a[n++]];n<m;n++){if(u){if("\x3e"===
-a[n])break}else 0<=a[n].indexOf(f)&&(u=c);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var u=f[1].toLowerCase(),t;if(f[2]){t=f[3];var s=t.charCodeAt(0);if(34===s||39===s)t=t.substr(1,t.length-2);t=g(t.replace(S,""))}else t="";p.push(u,t);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=n+1;return k}}function s(e){function c(b,a){l||a.push(b)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,c,n){if(!l&&b.f.hasOwnProperty(d)){var m=b.f[d];if(!(m&b.c.FOLDABLE)){var p=
-e(d,c);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)c=p.attribs;else throw Error("tagPolicy gave no attribs");var u;"tagName"in p?(u=p.tagName,p=b.f[u]):(u=d,p=m);if(m&b.c.OPTIONAL_ENDTAG){var t=g[g.length-1];t&&t.D===d&&(t.v!==u||d!==u)&&n.push("\x3c/",t.v,"\x3e")}m&b.c.EMPTY||g.push({D:d,v:u});n.push("\x3c",u);d=0;for(t=c.length;d<t;d+=2){var q=c[d],s=c[d+1];s!==f&&s!==a&&n.push(" ",q,'\x3d"',k(s),'"')}n.push("\x3e");m&b.c.EMPTY&&!(p&b.c.EMPTY)&&
-n.push("\x3c/",u,"\x3e")}else l=!(m&b.c.EMPTY)}}},endTag:function(a,e){if(l)l=d;else if(b.f.hasOwnProperty(a)){var c=b.f[a];if(!(c&(b.c.EMPTY|b.c.FOLDABLE))){if(c&b.c.OPTIONAL_ENDTAG)for(c=g.length;0<=--c;){var f=g[c].D;if(f===a)break;if(!(b.f[f]&b.c.OPTIONAL_ENDTAG))return}else for(c=g.length;0<=--c&&g[c].D!==a;);if(!(0>c)){for(f=g.length;--f>c;){var k=g[f].v;b.f[k]&b.c.OPTIONAL_ENDTAG||e.push("\x3c/",k,"\x3e")}c<g.length&&(a=g[c].v);g.length=c;e.push("\x3c/",a,"\x3e")}}}},pcdata:c,rcdata:c,cdata:c,
+time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};t.ELEMENT_DOM_INTERFACES=t.Q;t.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};t.ueffects=t.P;t.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};
+t.URIEFFECTS=t.J;t.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};t.ltypes=t.M;t.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};t.LOADERTYPES=t.I;"undefined"!==typeof window&&(window.html4=t);b=function(b){function e(b,a){var d;if(M.hasOwnProperty(a))d=M[a];else{var c=a.match(K);d=c?String.fromCharCode(parseInt(c[1],10)):(c=a.match($))?String.fromCharCode(parseInt(c[1],
+16)):I&&N.test(a)?(I.innerHTML="\x26"+a+";",c=I.textContent,M[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(W,e)}function k(b){return(""+b).replace(da,"\x26amp;").replace(X,"\x26lt;").replace(aa,"\x26gt;").replace(V,"\x26#34;")}function l(b){return b.replace(S,"\x26amp;$1").replace(X,"\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 p(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 s=d[e++],r=d[e];switch(s){case "\x26":fa.test(r)?(a.e&&a.e("\x26"+r,g,Z,p(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,Z,p(a,d,e,f,g));break;case "\x3c/":if(k=
+/^([-\w:]+)[^\'\"]*/.exec(r))if(k[0].length===r.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,Z,p(a,d,e,f,g));else{var z=d,y=e,x=a,E=g,C=Z,D=f,H=q(z,y);H?(x.t&&x.t(H.name,E,C,p(x,z,y,D,E)),e=H.next):e=z.length}else a.e&&a.e("\x26lt;/",g,Z,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(r))if(k[0].length===r.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,Z,p(a,d,e,f,g));var M=b.f[n];M&ca&&(e=u(d,{name:n,next:e,c:M},a,g,Z,f))}else{var z=d,y=a,x=g,E=
+Z,C=f,A=q(z,e);A?(y.w&&y.w(A.name,A.R,x,E,p(y,z,A.next,C,x)),e=A.c&ca?u(z,A,y,x,E,C):A.next):e=z.length}else a.e&&a.e("\x26lt;",g,Z,p(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 R=d.slice(e,l).join("");a.A(R.substr(0,R.length-2),g,Z,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,Z,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(r)){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,Z,p(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,Z,p(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,Z,p(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,Z,p(a,d,e,f,g));break;case "":break;default:a.e&&a.e(s,g,Z,p(a,d,e,f,g))}}a.B&&a.B(g)}catch(T){if(T!==Z)throw T;}}function u(a,d,e,c,f,g){var k=a.length;ea.hasOwnProperty(d.name)||(ea[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=ea[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,p(e,a,t,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,t,g,c));else throw Error("bug");return t}function q(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 p=[];""!==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"===
+a[n])break}else 0<=a[n].indexOf(f)&&(t=c);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var t=f[1].toLowerCase(),u;if(f[2]){u=f[3];var s=u.charCodeAt(0);if(34===s||39===s)u=u.substr(1,u.length-2);u=g(u.replace(P,""))}else u="";p.push(t,u);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=n+1;return k}}function s(e){function c(b,a){l||a.push(b)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,c,n){if(!l&&b.f.hasOwnProperty(d)){var m=b.f[d];if(!(m&b.c.FOLDABLE)){var p=
+e(d,c);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)c=p.attribs;else throw Error("tagPolicy gave no attribs");var t;"tagName"in p?(t=p.tagName,p=b.f[t]):(t=d,p=m);if(m&b.c.OPTIONAL_ENDTAG){var u=g[g.length-1];u&&u.D===d&&(u.v!==t||d!==t)&&n.push("\x3c/",u.v,"\x3e")}m&b.c.EMPTY||g.push({D:d,v:t});n.push("\x3c",t);d=0;for(u=c.length;d<u;d+=2){var q=c[d],s=c[d+1];s!==f&&s!==a&&n.push(" ",q,'\x3d"',k(s),'"')}n.push("\x3e");m&b.c.EMPTY&&!(p&b.c.EMPTY)&&
+n.push("\x3c/",t,"\x3e")}else l=!(m&b.c.EMPTY)}}},endTag:function(a,e){if(l)l=d;else if(b.f.hasOwnProperty(a)){var c=b.f[a];if(!(c&(b.c.EMPTY|b.c.FOLDABLE))){if(c&b.c.OPTIONAL_ENDTAG)for(c=g.length;0<=--c;){var f=g[c].D;if(f===a)break;if(!(b.f[f]&b.c.OPTIONAL_ENDTAG))return}else for(c=g.length;0<=--c&&g[c].D!==a;);if(!(0>c)){for(f=g.length;--f>c;){var k=g[f].v;b.f[k]&b.c.OPTIONAL_ENDTAG||e.push("\x3c/",k,"\x3e")}c<g.length&&(a=g[c].v);g.length=c;e.push("\x3c/",a,"\x3e")}}}},pcdata:c,rcdata:c,cdata:c,
endDoc:function(b){for(;g.length;g.length--)b.push("\x3c/",g[g.length-1].v,"\x3e")}})}function r(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 Q(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];a="*::"+
-d;if(b.hasOwnProperty(a))return b[a]}function U(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var n=e[l],m=e[l+1],p=m,u=f,t;if((t=d+"::"+n,b.m.hasOwnProperty(t))||(t="*::"+n,b.m.hasOwnProperty(t)))u=b.m[t];if(u!==f)switch(u){case b.d.NONE:break;case b.d.SCRIPT:m=f;k&&L(k,d,n,p,m);break;case b.d.STYLE:if("undefined"===typeof D){m=f;k&&L(k,d,n,p,m);break}var q=[];D(m,{declaration:function(a,d){var e=a.toLowerCase();N(e,d,c?function(a){return r(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&q.push(e+
+d;if(b.hasOwnProperty(a))return b[a]}function U(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var n=e[l],m=e[l+1],p=m,t=f,u;if((u=d+"::"+n,b.m.hasOwnProperty(u))||(u="*::"+n,b.m.hasOwnProperty(u)))t=b.m[u];if(t!==f)switch(t){case b.d.NONE:break;case b.d.SCRIPT:m=f;k&&L(k,d,n,p,m);break;case b.d.STYLE:if("undefined"===typeof D){m=f;k&&L(k,d,n,p,m);break}var q=[];D(m,{declaration:function(a,d){var e=a.toLowerCase();T(e,d,c?function(a){return r(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&q.push(e+
": "+d.join(" "))}});m=0<q.length?q.join(" ; "):f;k&&L(k,d,n,p,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,p,m);break;case b.d.URI:m=r(m,Q(b.J,d,n),Q(b.I,d,n),{TYPE:"MARKUP",XML_ATTR:n,XML_TAG:d},c);k&&L(k,d,n,p,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,p,m);break;default:m=f,k&&L(k,d,n,p,m)}else m=f,k&&L(k,d,n,p,m);e[l+1]=m}return e}
-function Y(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:U(f,g,d,e,c)}}}function O(b,a){var d=[];s(a)(b,d);return d.join("")}var D,N;"undefined"!==typeof window&&(D=window.parseCssDeclarations,N=window.sanitizeCssProperty);var P={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,T=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,X=/[<]/g,aa=/>/g,W=/\"/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=s;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=Y;ba.wa=ba.normalizeRCData=l;ba.xa=
-ba.sanitize=function(b,a,d,e){return O(b,Y(a,d,e))};ba.ya=ba.sanitizeAttribs=U;ba.za=ba.sanitizeWithPolicy=O;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=
+function Y(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:U(f,g,d,e,c)}}}function O(b,a){var d=[];s(a)(b,d);return d.join("")}var D,T;"undefined"!==typeof window&&(D=window.parseCssDeclarations,T=window.sanitizeCssProperty);var M={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},K=/^#(\d+)$/,$=/^#x([0-9A-Fa-f]+)$/,N=/^[A-Za-z][A-za-z0-9]+$/,I="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+f,P=/\0/g,W=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,fa=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,da=/&/g,S=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,X=/[<]/g,aa=/>/g,V=/\"/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,Z={},ea={},ia=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=s;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=Y;ba.wa=ba.normalizeRCData=l;ba.xa=
+ba.sanitize=function(b,a,d,e){return O(b,Y(a,d,e))};ba.ya=ba.sanitizeAttribs=U;ba.za=ba.sanitizeWithPolicy=O;ba.Ba=ba.unescapeEntities=g;return ba}(t);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:u,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=
-new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/deflate"),k=c("./utils/common"),l=c("./utils/strings"),n=c("./zlib/messages"),m=c("./zlib/zstream"),p=Object.prototype.toString,r=0,s=-1,q=0,t=8;b.prototype.push=function(b,d){var e,c,f=this.strm,n=this.options.chunkSize;if(this.ended)return!1;c=d===~~d?d:!0===d?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0===
+new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/deflate"),k=c("./utils/common"),l=c("./utils/strings"),n=c("./zlib/messages"),m=c("./zlib/zstream"),p=Object.prototype.toString,r=0,s=-1,q=0,u=8;b.prototype.push=function(b,d){var e,c,f=this.strm,n=this.options.chunkSize;if(this.ended)return!1;c=d===~~d?d:!0===d?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0===
f.avail_out&&(f.output=new k.Buf8(n),f.next_out=0,f.avail_out=n),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!==n.Z_OK)throw Error(m[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"),n=c("./zlib/constants"),m=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,m,p,r,z=this.strm,B=this.options.chunkSize,F=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?n.Z_FINISH:n.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,n.Z_NO_FLUSH),e===n.Z_NEED_DICT&&F&&(r="string"==typeof F?l.string2buf(F):"[object ArrayBuffer]"===s.call(F)?new Uint8Array(F):F,e=g.inflateSetDictionary(this.strm,r)),e===n.Z_BUF_ERROR&&!0===G&&(e=n.Z_OK,G=!1),e!==n.Z_STREAM_END&&e!==n.Z_OK)return this.onEnd(e),
-this.ended=!0,!1;z.next_out&&(0!==z.avail_out&&e!==n.Z_STREAM_END&&(0!==z.avail_in||c!==n.Z_FINISH&&c!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(z.output,z.next_out),m=z.next_out-f,p=l.buf2string(z.output,f),z.next_out=m,z.avail_out=B-m,m&&k.arraySet(z.output,z.output,f,m,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!==n.Z_STREAM_END);return e===n.Z_STREAM_END&&(c=n.Z_FINISH),
-c===n.Z_FINISH?(e=g.inflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===n.Z_OK):c!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),z.avail_out=0,!0)};b.prototype.onData=function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===n.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,
+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"),n=c("./zlib/constants"),m=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,m,p,r,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?n.Z_FINISH:n.Z_NO_FLUSH;
+"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,n.Z_NO_FLUSH),e===n.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,r)),e===n.Z_BUF_ERROR&&!0===G&&(e=n.Z_OK,G=!1),e!==n.Z_STREAM_END&&e!==n.Z_OK)return this.onEnd(e),
+this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&e!==n.Z_STREAM_END&&(0!==A.avail_in||c!==n.Z_FINISH&&c!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),m=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=m,A.avail_out=B-m,m&&k.arraySet(A.output,A.output,f,m,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(G=!0)}while((0<A.avail_in||0===A.avail_out)&&e!==n.Z_STREAM_END);return e===n.Z_STREAM_END&&(c=n.Z_FINISH),
+c===n.Z_FINISH?(e=g.inflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===n.Z_OK):c!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),A.avail_out=0,!0)};b.prototype.onData=function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===n.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?
(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,b)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,e))};d.setTyped(c)},{}],4:[function(c,f,d){function b(b,d){if(65537>d&&(b.subarray&&k||!b.subarray&&g))return String.fromCharCode.apply(null,e.shrinkBuf(b,d));for(var c="",f=0;f<d;f++)c+=String.fromCharCode(b[f]);return c}var e=c("./common"),g=!0,k=!0;try{String.fromCharCode.apply(null,[0])}catch(l){g=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){k=!1}var m=
@@ -112,77 +112,77 @@ new e.Buf8(256);for(c=0;256>c;c++)m[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=
c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6&63,d[k++]=128|63&c):(d[k++]=240|c>>>18,d[k++]=128|c>>>12&63,d[k++]=128|c>>>6&63,d[k++]=128|63&c);return d};d.buf2binstring=function(d){return b(d,d.length)};d.binstring2buf=function(b){for(var d=new e.Buf8(b.length),c=0,f=d.length;c<f;c++)d[c]=b.charCodeAt(c);return d};d.buf2string=function(d,e){var c,f,g,k,l=e||d.length,n=Array(2*l);for(c=f=0;c<l;)if(g=d[c++],128>g)n[f++]=g;else if(k=m[g],4<k)n[f++]=65533,c+=k-1;else{for(g&=
2===k?31:3===k?15:7;1<k&&c<l;)g=g<<6|63&d[c++],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 b(n,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+m[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var l=65535&b|0;b=b>>>16&65535|0;for(var n=0;0!==c;){n=2E3<c?2E3:c;c-=n;do l=l+d[f++]|0,b=b+l|0;while(--n);l%=65521;b%=65521}return l|
b<<16|0}},{}],6:[function(c,f,d){f.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(c,f,d){var b=function(){for(var b,d=[],c=0;256>c;c++){b=c;
-for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=F[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(y.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=
-0))}function k(b,d){C._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,p=b.w_mask,u=b.prev,t=b.strstart+S,q=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]===q&&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<t);if(c=S-(t-g),g=t-S,c>k){if(b.match_start=d,k=c,c>=l)break;q=m[g+k-1];v=m[g+k]}}while((d=u[d&p])>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)){y.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,y.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<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 T;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=C._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=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=b.strstart<K-1?b.strstart:K-1,d===E?(k(b,!0),0===b.strm.avail_out?aa:W):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:X}function s(b,d){for(var e,c,f;;){if(b.lookahead<Z){if(p(b),
-b.lookahead<Z&&d===G)return T;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===Q||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=C._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 T}else if(b.match_available){if(c=C._tr_tally(b,0,
-b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(C._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,d===E?(k(b,!0),0===b.strm.avail_out?aa:W):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?T:X}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=
+for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=E[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(y.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=
+0))}function k(b,d){C._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-W?b.strstart-(b.w_size-W):0,m=b.window,p=b.w_mask,t=b.prev,u=b.strstart+P,q=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]===q&&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<u);if(c=P-(u-g),g=u-P,c>k){if(b.match_start=d,k=c,c>=l)break;q=m[g+k-1];v=m[g+k]}}while((d=t[d&p])>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-W)){y.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,y.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>=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<W&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<W){if(p(b),b.lookahead<W&&d===G)return S;if(0===b.lookahead)break}if(e=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<
+b.hash_shift^b.window[b.strstart+I-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-W&&(b.match_length=m(b,e)),b.match_length>=I)if(c=C._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,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=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return S}return b.insert=b.strstart<I-1?b.strstart:I-1,d===F?(k(b,!0),0===b.strm.avail_out?aa:V):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?S:X}function s(b,d){for(var e,c,f;;){if(b.lookahead<W){if(p(b),
+b.lookahead<W&&d===G)return S;if(0===b.lookahead)break}if(e=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-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=I-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-W&&(b.match_length=m(b,e),5>=b.match_length&&(b.strategy===Q||b.match_length===I&&4096<b.strstart-b.match_start)&&(b.match_length=I-1)),b.prev_length>=
+I&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-I;c=C._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-I);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+I-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=I-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return S}else if(b.match_available){if(c=C._tr_tally(b,0,
+b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return S}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(C._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<I-1?b.strstart:I-1,d===F?(k(b,!0),0===b.strm.avail_out?aa:V):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?S:X}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 u(){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=O;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 y.Buf16(2*V);this.dyn_dtree=new y.Buf16(2*(2*P+1));this.bl_tree=new y.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 y.Buf16(J+1);this.heap=new y.Buf16(2*N+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new y.Buf16(2*N+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=Y,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,C._tr_init(e),H):b(d,I)}function v(b){var d=u(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=x[b.level].max_lazy,b.good_match=x[b.level].good_length,b.nice_match=x[b.level].nice_length,b.max_chain_length=x[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>D||c!==O||8>f||15<f||0>e||9<e||0>k||k>U)return b(d,I);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 y.Buf8(2*
-n.w_size),n.head=new y.Buf16(n.hash_size),n.prev=new y.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new y.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 x,y=c("../utils/common"),C=c("./trees"),z=c("./adler32"),B=c("./crc32"),F=c("./messages"),G=0,E=4,H=0,I=-2,L=-1,Q=1,U=4,Y=2,O=8,D=9,N=286,P=30,M=19,V=2*N+1,J=15,K=3,S=258,Z=S+K+1,ea=42,da=113,T=1,X=2,aa=3,W=4;x=[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 T;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 T}return b.insert=0,d===E?(k(b,!0),0===b.strm.avail_out?aa:W):(b.strstart>b.block_start&&k(b,!1),T)}),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,O,15,8,0)};d.deflateInit2=A;d.deflateReset=v;d.deflateResetKeep=u;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,m,u,t;if(!d||!d.state||5<c||0>c)return d?b(d,I):I;if(m=d.state,!d.output||!d.input&&0!==d.avail_in||
-666===m.status&&c!==E)return b(d,0===d.avail_out?-5:I);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)):(u=O+(m.w_bits-8<<4)<<8,t=-1,t=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,u|=t<<6,0!==m.strstart&&(u|=32),m.status=da,n(m,u+(31-u%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(u=m.pending;m.gzindex<
-(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>u&&(d.adler=B(d.adler,m.pending_buf,m.pending-u,u)),g(d),u=m.pending,m.pending!==m.pending_buf_size));)l(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>u&&(d.adler=B(d.adler,m.pending_buf,m.pending-u,u));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){u=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>
-u&&(d.adler=B(d.adler,m.pending_buf,m.pending-u,u)),g(d),u=m.pending,m.pending===m.pending_buf_size)){t=1;break}t=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;l(m,t)}while(0!==t);m.gzhead.hcrc&&m.pending>u&&(d.adler=B(d.adler,m.pending_buf,m.pending-u,u));0===t&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){u=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>u&&(d.adler=B(d.adler,m.pending_buf,m.pending-u,u)),
-g(d),u=m.pending,m.pending===m.pending_buf_size)){t=1;break}t=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;l(m,t)}while(0!==t);m.gzhead.hcrc&&m.pending>u&&(d.adler=B(d.adler,m.pending_buf,m.pending-u,u));0===t&&(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,H}else if(0===d.avail_in&&(c<<1)-(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==E)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=T;break a}break}if(m.match_length=0,v=C._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,v&&(k(m,!1),0===m.strm.avail_out)){q=T;break a}}q=(m.insert=0,c===E?(k(m,!0),0===m.strm.avail_out?aa:W):m.last_lit&&
-(k(m,!1),0===m.strm.avail_out)?T:X)}else if(3===m.strategy)a:{var s,r;for(v=m.window;;){if(m.lookahead<=S){if(p(m),m.lookahead<=S&&c===G){q=T;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=K&&0<m.strstart&&(r=m.strstart-1,s=v[r],s===v[++r]&&s===v[++r]&&s===v[++r])){f=m.strstart+S;do;while(s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&r<f);m.match_length=S-(f-r);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
-K?(q=C._tr_tally(m,1,m.match_length-K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=C._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(k(m,!1),0===m.strm.avail_out)){q=T;break a}}q=(m.insert=0,c===E?(k(m,!0),0===m.strm.avail_out?aa:W):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?T:X)}else q=x[m.level].func(m,c);if(q!==aa&&q!==W||(m.status=666),q===T||q===aa)return 0===d.avail_out&&(m.last_flush=-1),H;if(q===X&&(1===c?C._tr_align(m):5!==c&&(C._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,H}return c!==E?H: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?H: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,I):(d.state=null,e===da?b(d,-3):H)):I};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 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 y.Buf8(c.w_size),y.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,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,n,m,p,r,s,q,t,u,v,A,x,y,C,z,B,F,G,E,H,I,L;c=b.state;f=b.next_in;I=b.input;l=f+(b.avail_in-5);n=b.next_out;L=b.output;m=n-(d-b.avail_out);p=n+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;t=c.wnext;u=c.window;v=c.hold;A=c.bits;x=c.lencode;
-y=c.distcode;C=(1<<c.lenbits)-1;z=(1<<c.distbits)-1;a:do{15>A&&(v+=I[f++]<<A,A+=8,v+=I[f++]<<A,A+=8);B=x[v&C];b:for(;;){if(F=B>>>24,v>>>=F,A-=F,F=B>>>16&255,0===F)L[n++]=65535&B;else{if(!(16&F)){if(0===(64&F)){B=x[(65535&B)+(v&(1<<F)-1)];continue b}if(32&F){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&B;(F&=15)&&(A<F&&(v+=I[f++]<<A,A+=8),G+=v&(1<<F)-1,v>>>=F,A-=F);15>A&&(v+=I[f++]<<A,A+=8,v+=I[f++]<<A,A+=8);B=y[v&z];c:for(;;){if(F=B>>>24,v>>>=F,A-=F,F=B>>>16&255,
-!(16&F)){if(0===(64&F)){B=y[(65535&B)+(v&(1<<F)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(E=65535&B,F&=15,A<F&&(v+=I[f++]<<A,A+=8,A<F&&(v+=I[f++]<<A,A+=8)),E+=v&(1<<F)-1,E>r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=F,A-=F,F=n-m,E>F){if(F=E-F,F>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=u,0===t){if(B+=s-F,F<G){G-=F;do L[n++]=u[B++];while(--F);B=n-E;H=L}}else if(t<F){if(B+=s+t-F,F-=t,F<G){G-=F;do L[n++]=u[B++];while(--F);
-if(B=0,t<G){F=t;G-=F;do L[n++]=u[B++];while(--F);B=n-E;H=L}}}else if(B+=t-F,F<G){G-=F;do L[n++]=u[B++];while(--F);B=n-E;H=L}for(;2<G;)L[n++]=H[B++],L[n++]=H[B++],L[n++]=H[B++],G-=3;G&&(L[n++]=H[B++],1<G&&(L[n++]=H[B++]))}else{B=n-E;do L[n++]=L[B++],L[n++]=L[B++],L[n++]=L[B++],G-=3;while(2<G);G&&(L[n++]=L[B++],1<G&&(L[n++]=L[B++]))}break}}break}}while(f<l&&n<p);G=A>>3;f-=G;A-=G<<3;b.next_in=f;b.next_out=n;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=n<p?257+(p-n):257-(n-p);c.hold=v&(1<<A)-1;c.bits=A}},
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new y.Buf16(2*$);this.dyn_dtree=new y.Buf16(2*(2*M+1));this.bl_tree=new y.Buf16(2*(2*K+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 y.Buf16(N+1);this.heap=new y.Buf16(2*T+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new y.Buf16(2*T+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 t(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=Y,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?fa:da,d.adler=2===e.wrap?0:1,e.last_flush=G,C._tr_init(e),H):b(d,J)}function v(b){var d=t(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=x[b.level].max_lazy,b.good_match=x[b.level].good_length,b.nice_match=x[b.level].nice_length,b.max_chain_length=x[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=I-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return J;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>D||c!==O||8>f||15<f||0>e||9<e||0>k||k>U)return b(d,J);8===f&&(f=9);var n=new u;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+I-1)/I),n.window=new y.Buf8(2*
+n.w_size),n.head=new y.Buf16(n.hash_size),n.prev=new y.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new y.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 x,y=c("../utils/common"),C=c("./trees"),A=c("./adler32"),B=c("./crc32"),E=c("./messages"),G=0,F=4,H=0,J=-2,L=-1,Q=1,U=4,Y=2,O=8,D=9,T=286,M=30,K=19,$=2*T+1,N=15,I=3,P=258,W=P+I+1,fa=42,da=113,S=1,X=2,aa=3,V=4;x=[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 S;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-W&&(k(b,!1),0===b.strm.avail_out))return S}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?aa:V):(b.strstart>b.block_start&&k(b,!1),S)}),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,O,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?J:(b.state.gzhead=d,H):J};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5<c||0>c)return d?b(d,J):J;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:J);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===fa)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=O+(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,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===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=S;break a}break}if(m.match_length=0,v=C._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,v&&(k(m,!1),0===m.strm.avail_out)){q=S;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:V):m.last_lit&&
+(k(m,!1),0===m.strm.avail_out)?S:X)}else if(3===m.strategy)a:{var s,r;for(v=m.window;;){if(m.lookahead<=P){if(p(m),m.lookahead<=P&&c===G){q=S;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=I&&0<m.strstart&&(r=m.strstart-1,s=v[r],s===v[++r]&&s===v[++r]&&s===v[++r])){f=m.strstart+P;do;while(s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&s===v[++r]&&r<f);m.match_length=P-(f-r);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
+I?(q=C._tr_tally(m,1,m.match_length-I),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=C._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(k(m,!1),0===m.strm.avail_out)){q=S;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:V):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?S:X)}else q=x[m.level].func(m,c);if(q!==aa&&q!==V||(m.status=666),q===S||q===aa)return 0===d.avail_out&&(m.last_flush=-1),H;if(q===X&&(1===c?C._tr_align(m):5!==c&&(C._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,H}return c!==F?H: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?H:1)};d.deflateEnd=function(d){var e;return d&&d.state?(e=d.state.status,
+e!==fa&&69!==e&&73!==e&&91!==e&&103!==e&&e!==da&&666!==e?b(d,J):(d.state=null,e===da?b(d,-3):H)):J};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!==fa||c.lookahead))return J;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 y.Buf8(c.w_size),y.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>=I;){f=c.strstart;g=c.lookahead-(I-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+I-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=I-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=I-1,c.match_available=0,b.next_in=n,b.input=m,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,n,m,p,r,s,q,u,t,v,z,x,y,C,A,B,E,G,F,H,J,L;c=b.state;f=b.next_in;J=b.input;l=f+(b.avail_in-5);n=b.next_out;L=b.output;m=n-(d-b.avail_out);p=n+(b.avail_out-257);r=c.dmax;s=c.wsize;q=c.whave;u=c.wnext;t=c.window;v=c.hold;z=c.bits;x=c.lencode;
+y=c.distcode;C=(1<<c.lenbits)-1;A=(1<<c.distbits)-1;a:do{15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=x[v&C];b:for(;;){if(E=B>>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[n++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<<E)-1)];continue b}if(32&E){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}G=65535&B;(E&=15)&&(z<E&&(v+=J[f++]<<z,z+=8),G+=v&(1<<E)-1,v>>>=E,z-=E);15>z&&(v+=J[f++]<<z,z+=8,v+=J[f++]<<z,z+=8);B=y[v&A];c:for(;;){if(E=B>>>24,v>>>=E,z-=E,E=B>>>16&255,
+!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<<E)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(F=65535&B,E&=15,z<E&&(v+=J[f++]<<z,z+=8,z<E&&(v+=J[f++]<<z,z+=8)),F+=v&(1<<E)-1,F>r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=n-m,F>E){if(E=F-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=t,0===u){if(B+=s-E,E<G){G-=E;do L[n++]=t[B++];while(--E);B=n-F;H=L}}else if(u<E){if(B+=s+u-E,E-=u,E<G){G-=E;do L[n++]=t[B++];while(--E);
+if(B=0,u<G){E=u;G-=E;do L[n++]=t[B++];while(--E);B=n-F;H=L}}}else if(B+=u-E,E<G){G-=E;do L[n++]=t[B++];while(--E);B=n-F;H=L}for(;2<G;)L[n++]=H[B++],L[n++]=H[B++],L[n++]=H[B++],G-=3;G&&(L[n++]=H[B++],1<G&&(L[n++]=H[B++]))}else{B=n-F;do L[n++]=L[B++],L[n++]=L[B++],L[n++]=L[B++],G-=3;while(2<G);G&&(L[n++]=L[B++],1<G&&(L[n++]=L[B++]))}break}}break}}while(f<l&&n<p);G=z>>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=n;b.avail_in=f<l?5+(l-f):5-(f-l);b.avail_out=n<p?257+(p-n):257-(n-p);c.hold=v&(1<<z)-1;c.bits=z}},
{}],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=y,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(C),d.distcode=d.distdyn=new s.Buf32(z),d.sane=1,d.back=-1,A):x}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):x}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)?x:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):x}function n(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):x}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"),A=0,x=-2,y=1,C=852,z=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,C,z,D,N,P,M,V,J,K,S,Z,ea,da,T,X,aa,W=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 x;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;C=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;z=c.hold;D=c.bits;N=n;P=C;X=A;a:for(;;)switch(c.mode){case y:if(0===c.wrap){c.mode=13;break}for(;16>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(2&c.wrap&&35615===z){c.check=0;R[0]=255&z;R[1]=z>>>8&255;c.check=t(c.check,R,2,0);D=z=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
-!(1&c.wrap)||(((255&z)<<8)+(z>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&z)){d.msg="unknown compression method";c.mode=30;break}if(z>>>=4,D-=4,T=(15&z)+8,0===c.wbits)c.wbits=T;else if(T>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<T;d.adler=c.check=1;c.mode=512&z?10:12;D=z=0;break;case 2:for(;16>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(c.flags=z,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=z>>8&1);512&c.flags&&(R[0]=255&z,R[1]=z>>>8&255,c.check=t(c.check,R,2,0));D=z=0;c.mode=3;case 3:for(;32>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}c.head&&(c.head.time=z);512&c.flags&&(R[0]=255&z,R[1]=z>>>8&255,R[2]=z>>>16&255,R[3]=z>>>24&255,c.check=t(c.check,R,4,0));D=z=0;c.mode=4;case 4:for(;16>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}c.head&&(c.head.xflags=255&z,c.head.os=z>>8);512&c.flags&&(R[0]=255&z,R[1]=z>>>8&255,c.check=t(c.check,R,2,0));D=z=0;c.mode=
-5;case 5:if(1024&c.flags){for(;16>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}c.length=z;c.head&&(c.head.extra_len=z);512&c.flags&&(R[0]=255&z,R[1]=z>>>8&255,c.check=t(c.check,R,2,0));D=z=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&&(T=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,T)),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 T=f[k+M++],c.head&&T&&65536>c.length&&(c.head.name+=String.fromCharCode(T));while(T&&M<n);if(512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,T)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 T=f[k+M++],c.head&&T&&65536>c.length&&(c.head.comment+=String.fromCharCode(T));while(T&&M<n);if(512&c.flags&&(c.check=t(c.check,f,M,k)),n-=M,k+=M,T)break a}else c.head&&(c.head.comment=null);c.mode=
-9;case 9:if(512&c.flags){for(;16>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(z!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}D=z=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>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}d.adler=c.check=b(z);D=z=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=C,d.next_in=k,d.avail_in=n,c.hold=z,c.bits=D,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){z>>>=
-7&D;D-=7&D;c.mode=27;break}for(;3>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}switch(c.last=1&z,z>>>=1,D-=1,3&z){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){z>>>=2;D-=2;break a}break;
-case 2:c.mode=17;break;case 3:d.msg="invalid block type",c.mode=30}z>>>=2;D-=2;break;case 14:z>>>=7&D;for(D-=7&D;32>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if((65535&z)!==(z>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&z,z=0,D=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>C&&(M=C),0===M)break a;s.arraySet(g,f,k,M,l);n-=M;k+=M;C-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>D;){if(0===n)break a;n--;z+=f[k++]<<
-D;D+=8}if(c.nlen=(31&z)+257,z>>>=5,D-=5,c.ndist=(31&z)+1,z>>>=5,D-=5,c.ncode=(15&z)+4,z>>>=4,D-=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>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}c.lens[ga[c.have++]]=7&z;z>>>=3;D-=3}for(;19>c.have;)c.lens[ga[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,aa={bits:c.lenbits},X=v(0,c.lens,0,19,c.lencode,0,c.work,aa),c.lenbits=aa.bits,X){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(;W=c.lencode[z&(1<<c.lenbits)-1],K=W>>>24,S=65535&W,!(K<=D);){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(16>S)z>>>=K,D-=K,c.lens[c.have++]=S;else{if(16===S){for(J=K+2;D<J;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(z>>>=K,D-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}T=c.lens[c.have-1];M=3+(3&z);z>>>=2;D-=2}else if(17===S){for(J=K+3;D<J;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}z>>>=K;D-=K;T=0;M=3+(7&z);
-z>>>=3;D-=3}else{for(J=K+7;D<J;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}z>>>=K;D-=K;T=0;M=11+(127&z);z>>>=7;D-=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++]=T}}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},X=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,X){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
-c.distdyn,aa={bits:c.distbits},X=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,X){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<=C){d.next_out=l;d.avail_out=C;d.next_in=k;d.avail_in=n;c.hold=z;c.bits=D;u(d,P);l=d.next_out;g=d.output;C=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;z=c.hold;D=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;W=c.lencode[z&(1<<c.lenbits)-1],K=W>>>24,J=W>>>16&255,S=65535&W,!(K<=
-D);){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(J&&0===(240&J)){Z=K;ea=J;for(da=S;W=c.lencode[da+((z&(1<<Z+ea)-1)>>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=D);){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}z>>>=Z;D-=Z;c.back+=Z}if(z>>>=K,D-=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;D<J;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}c.length+=z&(1<<c.extra)-
-1;z>>>=c.extra;D-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;W=c.distcode[z&(1<<c.distbits)-1],K=W>>>24,J=W>>>16&255,S=65535&W,!(K<=D);){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(0===(240&J)){Z=K;ea=J;for(da=S;W=c.distcode[da+((z&(1<<Z+ea)-1)>>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=D);){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}z>>>=Z;D-=Z;c.back+=Z}if(z>>>=K,D-=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;D<J;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}c.offset+=z&(1<<c.extra)-1;z>>>=c.extra;D-=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===C)break a;if(M=P-C,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>C&&(M=C);C-=M;c.length-=M;do g[l++]=J[V++];while(--M);
-0===c.length&&(c.mode=21);break;case 26:if(0===C)break a;g[l++]=c.length;C--;c.mode=21;break;case 27:if(c.wrap){for(;32>D;){if(0===n)break a;n--;z|=f[k++]<<D;D+=8}if(P-=C,d.total_out+=P,c.total+=P,P&&(d.adler=c.check=c.flags?t(c.check,g,P,l-P):q(c.check,g,P,l-P)),P=C,(c.flags?z:b(z))!==c.check){d.msg="incorrect data check";c.mode=30;break}D=z=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>D;){if(0===n)break a;n--;z+=f[k++]<<D;D+=8}if(z!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
-30;break}D=z=0}c.mode=29;case 29:X=1;break a;case 30:X=-3;break a;case 31:return-4;default:return x}return d.next_out=l,d.avail_out=C,d.next_in=k,d.avail_in=n,c.hold=z,c.bits=D,(c.wsize||P!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(N-=d.avail_in,P-=d.avail_out,d.total_in+=N,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?t(c.check,g,P,d.next_out-P):q(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:
-0)+(20===c.mode||15===c.mode?256:0),(0===N&&0===P||4===e)&&X===A&&(X=-5),X)};d.inflateEnd=function(b){if(!b||!b.state)return x;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)?x:(e.head=d,d.done=!1,A)):x};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?x: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,A)):
+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=y,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(C),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):x}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):x}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)?x:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):x}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):x}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"),u=c("./crc32"),t=c("./inffast"),v=c("./inftrees"),z=0,x=-2,y=1,C=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,C,A,D,T,M,K,$,N,I,P,W,fa,da,S,X,aa,V=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 x;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;C=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;D=c.bits;T=n;M=C;X=z;a:for(;;)switch(c.mode){case y:if(0===c.wrap){c.mode=13;break}for(;16>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if(2&c.wrap&&35615===A){c.check=0;R[0]=255&A;R[1]=A>>>8&255;c.check=u(c.check,R,2,0);D=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,D-=4,S=(15&A)+8,0===c.wbits)c.wbits=S;else if(S>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<S;d.adler=c.check=1;c.mode=512&A?10:12;D=A=0;break;case 2:for(;16>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=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=u(c.check,R,2,0));D=A=0;c.mode=3;case 3:for(;32>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=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=u(c.check,R,4,0));D=A=0;c.mode=4;case 4:for(;16>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=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=u(c.check,R,2,0));D=A=0;c.mode=
+5;case 5:if(1024&c.flags){for(;16>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=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=u(c.check,R,2,0));D=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(K=c.length,K>n&&(K=n),K&&(c.head&&(S=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,K,S)),512&c.flags&&(c.check=u(c.check,f,K,k)),n-=K,k+=K,c.length-=K),c.length))break a;c.length=0;c.mode=
+7;case 7:if(2048&c.flags){if(0===n)break a;K=0;do S=f[k+K++],c.head&&S&&65536>c.length&&(c.head.name+=String.fromCharCode(S));while(S&&K<n);if(512&c.flags&&(c.check=u(c.check,f,K,k)),n-=K,k+=K,S)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;K=0;do S=f[k+K++],c.head&&S&&65536>c.length&&(c.head.comment+=String.fromCharCode(S));while(S&&K<n);if(512&c.flags&&(c.check=u(c.check,f,K,k)),n-=K,k+=K,S)break a}else c.head&&(c.head.comment=null);c.mode=
+9;case 9:if(512&c.flags){for(;16>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if(A!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}D=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>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}d.adler=c.check=b(A);D=A=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=C,d.next_in=k,d.avail_in=n,c.hold=A,c.bits=D,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&D;D-=7&D;c.mode=27;break}for(;3>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}switch(c.last=1&A,A>>>=1,D-=1,3&A){case 0:c.mode=14;break;case 1:N=c;if(B){P=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(P=0;144>P;)N.lens[P++]=8;for(;256>P;)N.lens[P++]=9;for(;280>P;)N.lens[P++]=7;for(;288>P;)N.lens[P++]=8;v(1,N.lens,0,288,p,0,N.work,{bits:9});for(P=0;32>P;)N.lens[P++]=5;v(2,N.lens,0,32,r,0,N.work,{bits:5});B=!1}N.lencode=p;N.lenbits=9;N.distcode=r;N.distbits=5;if(c.mode=20,6===e){A>>>=2;D-=2;break a}break;
+case 2:c.mode=17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;D-=2;break;case 14:A>>>=7&D;for(D-=7&D;32>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if((65535&A)!==(A>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,D=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(K=c.length){if(K>n&&(K=n),K>C&&(K=C),0===K)break a;s.arraySet(g,f,k,K,l);n-=K;k+=K;C-=K;l+=K;c.length-=K;break}c.mode=12;break;case 17:for(;14>D;){if(0===n)break a;n--;A+=f[k++]<<
+D;D+=8}if(c.nlen=(31&A)+257,A>>>=5,D-=5,c.ndist=(31&A)+1,A>>>=5,D-=5,c.ncode=(15&A)+4,A>>>=4,D-=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>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}c.lens[ga[c.have++]]=7&A;A>>>=3;D-=3}for(;19>c.have;)c.lens[ga[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,aa={bits:c.lenbits},X=v(0,c.lens,0,19,c.lencode,0,c.work,aa),c.lenbits=aa.bits,X){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(;V=c.lencode[A&(1<<c.lenbits)-1],I=V>>>24,P=65535&V,!(I<=D);){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if(16>P)A>>>=I,D-=I,c.lens[c.have++]=P;else{if(16===P){for(N=I+2;D<N;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if(A>>>=I,D-=I,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}S=c.lens[c.have-1];K=3+(3&A);A>>>=2;D-=2}else if(17===P){for(N=I+3;D<N;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}A>>>=I;D-=I;S=0;K=3+(7&A);
+A>>>=3;D-=3}else{for(N=I+7;D<N;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}A>>>=I;D-=I;S=0;K=11+(127&A);A>>>=7;D-=7}if(c.have+K>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;K--;)c.lens[c.have++]=S}}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},X=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,X){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
+c.distdyn,aa={bits:c.distbits},X=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,X){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<=C){d.next_out=l;d.avail_out=C;d.next_in=k;d.avail_in=n;c.hold=A;c.bits=D;t(d,M);l=d.next_out;g=d.output;C=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;D=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;V=c.lencode[A&(1<<c.lenbits)-1],I=V>>>24,N=V>>>16&255,P=65535&V,!(I<=
+D);){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if(N&&0===(240&N)){W=I;fa=N;for(da=P;V=c.lencode[da+((A&(1<<W+fa)-1)>>W)],I=V>>>24,N=V>>>16&255,P=65535&V,!(W+I<=D);){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}A>>>=W;D-=W;c.back+=W}if(A>>>=I,D-=I,c.back+=I,c.length=P,0===N){c.mode=26;break}if(32&N){c.back=-1;c.mode=12;break}if(64&N){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&N;c.mode=22;case 22:if(c.extra){for(N=c.extra;D<N;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}c.length+=A&(1<<c.extra)-
+1;A>>>=c.extra;D-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;V=c.distcode[A&(1<<c.distbits)-1],I=V>>>24,N=V>>>16&255,P=65535&V,!(I<=D);){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if(0===(240&N)){W=I;fa=N;for(da=P;V=c.distcode[da+((A&(1<<W+fa)-1)>>W)],I=V>>>24,N=V>>>16&255,P=65535&V,!(W+I<=D);){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}A>>>=W;D-=W;c.back+=W}if(A>>>=I,D-=I,c.back+=I,64&N){d.msg="invalid distance code";c.mode=30;break}c.offset=P;c.extra=15&N;c.mode=24;case 24:if(c.extra){for(N=
+c.extra;D<N;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;D-=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===C)break a;if(K=M-C,c.offset>K){if(K=c.offset-K,K>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}K>c.wnext?(K-=c.wnext,$=c.wsize-K):$=c.wnext-K;K>c.length&&(K=c.length);N=c.window}else N=g,$=l-c.offset,K=c.length;K>C&&(K=C);C-=K;c.length-=K;do g[l++]=N[$++];while(--K);
+0===c.length&&(c.mode=21);break;case 26:if(0===C)break a;g[l++]=c.length;C--;c.mode=21;break;case 27:if(c.wrap){for(;32>D;){if(0===n)break a;n--;A|=f[k++]<<D;D+=8}if(M-=C,d.total_out+=M,c.total+=M,M&&(d.adler=c.check=c.flags?u(c.check,g,M,l-M):q(c.check,g,M,l-M)),M=C,(c.flags?A:b(A))!==c.check){d.msg="incorrect data check";c.mode=30;break}D=A=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>D;){if(0===n)break a;n--;A+=f[k++]<<D;D+=8}if(A!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
+30;break}D=A=0}c.mode=29;case 29:X=1;break a;case 30:X=-3;break a;case 31:return-4;default:return x}return d.next_out=l,d.avail_out=C,d.next_in=k,d.avail_in=n,c.hold=A,c.bits=D,(c.wsize||M!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,M-d.avail_out)?(c.mode=31,-4):(T-=d.avail_in,M-=d.avail_out,d.total_in+=T,d.total_out+=M,c.total+=M,c.wrap&&M&&(d.adler=c.check=c.flags?u(c.check,g,M,d.next_out-M):q(c.check,g,M,d.next_out-M)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:
+0)+(20===c.mode||15===c.mode?256:0),(0===T&&0===M||4===e)&&X===z&&(X=-5),X)};d.inflateEnd=function(b){if(!b||!b.state)return x;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)?x:(e.head=d,d.done=!1,z)):x};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?x: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)):
x};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,A,x,y,C,z,B,F;y=u.bits;for(var G=0,E=0,H=0,I=0,L=0,Q=0,U=0,Y=v=0,O=0,D=null,N=0,P=new b.Buf16(16),Q=new b.Buf16(16),M=null,V=0,G=0;15>=G;G++)P[G]=0;for(E=0;E<r;E++)P[c[f+E]]++;L=y;for(I=15;1<=I&&0===P[I];I--);if(L>I&&(L=I),0===I)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<I&&0===P[H];H++);L<H&&(L=H);for(G=v=1;15>=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0<
-v&&(0===d||1!==I))return-1;Q[1]=0;for(G=1;15>G;G++)Q[G+1]=Q[G]+P[G];for(E=0;E<r;E++)0!==c[f+E]&&(t[Q[c[f+E]]++]=E);if(0===d?(D=M=t,C=19):1===d?(D=e,N-=257,M=g,V-=257,C=256):(D=k,M=l,C=-1),O=0,E=0,G=H,y=q,Q=L,U=0,x=-1,Y=1<<L,r=Y-1,1===d&&852<Y||2===d&&592<Y)return 1;for(var J=0;;){J++;z=G-U;t[E]<C?(B=0,F=t[E]):t[E]>C?(B=M[V+t[E]],F=D[N+t[E]]):(B=96,F=0);v=1<<G-U;H=A=1<<Q;do A-=v,s[y+(O>>U)+A]=z<<24|B<<16|F|0;while(0!==A);for(v=1<<G-1;O&v;)v>>=1;if(0!==v?(O&=v-1,O+=v):O=0,E++,0===--P[G]){if(G===I)break;
-G=c[f+t[E]]}if(G>L&&(O&r)!==x){0===U&&(U=L);y+=H;Q=G-U;for(v=1<<Q;Q+U<I&&(v-=P[Q+U],!(0>=v));)Q++,v<<=1;if(Y+=1<<Q,1===d&&852<Y||2===d&&592<Y)return 1;x=O&r;s[x]=L<<24|Q<<16|y-q|0}}return 0!==O&&(s[y+O]=G-U<<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=
+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,u,t){var v,z,x,y,C,A,B,E;y=t.bits;for(var G=0,F=0,H=0,J=0,L=0,Q=0,U=0,Y=v=0,O=0,D=null,T=0,M=new b.Buf16(16),Q=new b.Buf16(16),K=null,$=0,G=0;15>=G;G++)M[G]=0;for(F=0;F<r;F++)M[c[f+F]]++;L=y;for(J=15;1<=J&&0===M[J];J--);if(L>J&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,t.bits=1,0;for(H=1;H<J&&0===M[H];H++);L<H&&(L=H);for(G=v=1;15>=G;G++)if(v<<=1,v-=M[G],0>v)return-1;if(0<
+v&&(0===d||1!==J))return-1;Q[1]=0;for(G=1;15>G;G++)Q[G+1]=Q[G]+M[G];for(F=0;F<r;F++)0!==c[f+F]&&(u[Q[c[f+F]]++]=F);if(0===d?(D=K=u,C=19):1===d?(D=e,T-=257,K=g,$-=257,C=256):(D=k,K=l,C=-1),O=0,F=0,G=H,y=q,Q=L,U=0,x=-1,Y=1<<L,r=Y-1,1===d&&852<Y||2===d&&592<Y)return 1;for(var N=0;;){N++;A=G-U;u[F]<C?(B=0,E=u[F]):u[F]>C?(B=K[$+u[F]],E=D[T+u[F]]):(B=96,E=0);v=1<<G-U;H=z=1<<Q;do z-=v,s[y+(O>>U)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<<G-1;O&v;)v>>=1;if(0!==v?(O&=v-1,O+=v):O=0,F++,0===--M[G]){if(G===J)break;
+G=c[f+u[F]]}if(G>L&&(O&r)!==x){0===U&&(U=L);y+=H;Q=G-U;for(v=1<<Q;Q+U<J&&(v-=M[Q+U],!(0>=v));)Q++,v<<=1;if(Y+=1<<Q,1===d&&852<Y||2===d&&592<Y)return 1;x=O&r;s[x]=L<<24|Q<<16|y-q|0}}return 0!==O&&(s[y+O]=G-U<<24|4194304),t.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>Y-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>Y-b.bi_valid,b.bi_valid+=e-Y):(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(U+1),g=0;for(c=1;c<=U;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<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*O]=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+E+1,d),k=M[g],0!==k&&(f-=T[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-=X[g],l(b,c,k)));while(m<b.last_lit)}n(b,O,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=Q;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,s=d.stat_desc.extra_bits,r=d.stat_desc.extra_base,A=d.stat_desc.max_length,y=0;for(c=0;c<=U;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
-1]=0;for(e=b.heap_max+1;e<Q;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>A&&(c=A,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=r&&(m=s[f-r]),u=k[2*f],b.opt_len+=u*(c+m),v&&(b.static_len+=u*(q[2*f+1]+m)));if(0!==y){do{for(c=A-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[A]--;y-=2}while(0<y);for(c=A;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 A(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*D]++):10>=l?b.bl_tree[2*N]++:b.bl_tree[2*P]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function x(b,d,e){var c,f,g=-1,k=d[1],m=0,p=7,u=4;0===k&&(p=138,u=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m<p&&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,D,b.bl_tree),l(b,m-3,2)):10>=m?
-(n(b,N,b.bl_tree),l(b,m-3,3)):(n(b,P,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(p=138,u=3):f===k?(p=6,u=3):(p=7,u=4)}}function y(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 F;for(d=32;d<E;d++)if(0!==b.dyn_ltree[2*d])return F;return B}function C(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,F=1,
-G=0,E=256,H=E+1+29,I=30,L=19,Q=2*H+1,U=15,Y=16,O=256,D=16,N=17,P=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*(H+2));b(S);var Z=Array(2*I);b(Z);var ea=Array(512);b(ea);var da=Array(256);b(da);var T=Array(29);b(T);var X=Array(I);b(X);var aa,W,R,ga=!1;d._tr_init=function(b){if(!ga){var d,c,f,k=Array(U+1);for(f=
-c=0;28>f;f++){T[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){X[f]=c;for(d=0;d<1<<V[f];d++)ea[c++]=f}for(c>>=7;f<I;f++){X[f]=c<<7;for(d=0;d<1<<V[f]-7;d++)ea[256+c++]=f}for(d=0;d<=U;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,H+1,k);for(d=0;d<I;d++)Z[2*d+1]=5,Z[2*d]=m(d,5);aa=new e(S,M,E+1,H,U);W=new e(Z,V,0,I,U);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,W);b.bl_desc=new g(b.bl_tree,R);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=C;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=y(b));v(b,b.l_desc);v(b,b.d_desc);A(b,b.dyn_ltree,b.l_desc.max_code);A(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)C(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);x(b,b.dyn_ltree,d-1);x(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]+E+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,O,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=
+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(U+1),g=0;for(c=1;c<=U;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<H;d++)b.dyn_ltree[2*d]=0;for(d=0;d<J;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*O]=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 u(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 t(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=K[g],0!==k&&(f-=S[g],l(b,f,
+k)),c--,g=256>c?fa[c]:fa[256+(c>>>7)],n(b,g,e),k=$[g],0!==k&&(c-=X[g],l(b,c,k)));while(m<b.last_lit)}n(b,O,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=Q;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--)u(b,g,e);f=l;
+do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(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++,u(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,t,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,v=d.stat_desc.has_stree,s=d.stat_desc.extra_bits,r=d.stat_desc.extra_base,z=d.stat_desc.max_length,y=0;for(c=0;c<=U;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
+1]=0;for(e=b.heap_max+1;e<Q;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>z&&(c=z,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=r&&(m=s[f-r]),t=k[2*f],b.opt_len+=t*(c+m),v&&(b.static_len+=t*(q[2*f+1]+m)));if(0!==y){do{for(c=z-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[z]--;y-=2}while(0<y);for(c=z;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*D]++):10>=l?b.bl_tree[2*T]++:b.bl_tree[2*M]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function x(b,d,e){var c,f,g=-1,k=d[1],m=0,p=7,t=4;0===k&&(p=138,t=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m<p&&f===k)){if(m<t){do n(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(n(b,f,b.bl_tree),m--),n(b,D,b.bl_tree),l(b,m-3,2)):10>=m?
+(n(b,T,b.bl_tree),l(b,m-3,3)):(n(b,M,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(p=138,t=3):f===k?(p=6,t=3):(p=7,t=4)}}function y(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 C(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,H=F+1+29,J=30,L=19,Q=2*H+1,U=15,Y=16,O=256,D=16,T=17,M=18,K=[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],$=[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],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],P=Array(2*(H+2));b(P);var W=Array(2*J);b(W);var fa=Array(512);b(fa);var da=Array(256);b(da);var S=Array(29);b(S);var X=Array(J);b(X);var aa,V,R,ga=!1;d._tr_init=function(b){if(!ga){var d,c,f,k=Array(U+1);for(f=
+c=0;28>f;f++){S[f]=c;for(d=0;d<1<<K[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){X[f]=c;for(d=0;d<1<<$[f];d++)fa[c++]=f}for(c>>=7;f<J;f++){X[f]=c<<7;for(d=0;d<1<<$[f]-7;d++)fa[256+c++]=f}for(d=0;d<=U;d++)k[d]=0;for(d=0;143>=d;)P[2*d+1]=8,d++,k[8]++;for(;255>=d;)P[2*d+1]=9,d++,k[9]++;for(;279>=d;)P[2*d+1]=7,d++,k[7]++;for(;287>=d;)P[2*d+1]=8,d++,k[8]++;p(P,H+1,k);for(d=0;d<J;d++)W[2*d+1]=5,W[2*d]=m(d,5);aa=new e(P,K,F+1,H,U);V=new e(W,$,0,J,U);R=new e([],N,0,L,7);ga=!0}b.l_desc=new g(b.dyn_ltree,
+aa);b.d_desc=new g(b.dyn_dtree,V);b.bl_desc=new g(b.bl_tree,R);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=C;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=y(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*I[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)C(b,d,e,
+c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),t(b,P,W);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*I[f]+1],3);x(b,b.dyn_ltree,d-1);x(b,b.dyn_dtree,e-1);t(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?fa[d]:fa[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,O,P);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,n=0;for(null!=c&&c||(a=Base64._utf8_encode(a));n<a.length;)d=a.charCodeAt(n++),b=a.charCodeAt(n++),e=a.charCodeAt(n++),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=
a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),b=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|b>>4,b=(b&15)<<4|g>>2,e=(g&3)<<6|k,f+=String.fromCharCode(d),64!=g&&(f+=String.fromCharCode(b)),64!=k&&(f+=String.fromCharCode(e));c||(f=Base64._utf8_decode(f));return f},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var c="",f=0;f<a.length;f++){var d=a.charCodeAt(f);128>d?c+=String.fromCharCode(d):
(127<d&&2048>d?c+=String.fromCharCode(d>>6|192):(c+=String.fromCharCode(d>>12|224),c+=String.fromCharCode(d>>6&63|128)),c+=String.fromCharCode(d&63|128))}return c},_utf8_decode:function(a){for(var c="",f=0,d=c1=c2=0;f<a.length;)d=a.charCodeAt(f),128>d?(c+=String.fromCharCode(d),f++):191<d&&224>d?(c2=a.charCodeAt(f+1),c+=String.fromCharCode((d&31)<<6|c2&63),f+=2):(c2=a.charCodeAt(f+1),c3=a.charCodeAt(f+2),c+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),f+=3);return c}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
@@ -249,8 +249,8 @@ c(b))},g)})(a[k],k);0==d&&c(b)},post:function(a,c,f,d){return(new mxXmlRequest(a
a?a=f:a==mxConstants.NONE&&(a=null);return a},clone:function(a,c,f){f=null!=f?f:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,b;for(b in a)if(b!=mxObjectIdentity.FIELD_NAME&&(null==c||0>mxUtils.indexOf(c,b)))d[b]=!f&&"object"==typeof a[b]?mxUtils.clone(a[b]):a[b]}return d},equalPoints:function(a,c){if(null==a&&null!=c||null!=a&&null==c||null!=a&&null!=c&&a.length!=c.length)return!1;if(null!=a&&null!=c)for(var f=0;f<a.length;f++)if(a[f]==c[f]||null!=a[f]&&!a[f].equals(c[f]))return!1;
return!0},equalEntries:function(a,c){if(null==a&&null!=c||null!=a&&null==c||null!=a&&null!=c&&a.length!=c.length)return!1;if(null!=a&&null!=c){var f=0,d;for(d in c)f++;for(d in a)if(f--,(!mxUtils.isNaN(a[d])||!mxUtils.isNaN(c[d]))&&a[d]!=c[d])return!1}return 0==f},removeDuplicates:function(a){for(var c=new mxDictionary,f=[],d=0;d<a.length;d++)c.get(a[d])||(f.push(a[d]),c.put(a[d],!0));return f},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,c){var f=function(){};f.prototype=
c.prototype;a.prototype=new f;a.prototype.constructor=a},toString:function(a){var c="",f;for(f in a)try{if(null==a[f])c+=f+" \x3d [null]\n";else if("function"==typeof a[f])c+=f+" \x3d\x3e [Function]\n";else if("object"==typeof a[f])var d=mxUtils.getFunctionName(a[f].constructor),c=c+(f+" \x3d\x3e ["+d+"]\n");else c+=f+" \x3d "+a[f]+"\n"}catch(b){c+=f+"\x3d"+b.message}return c},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,c,f,d,b,e,g,
-k,l){k-=a;l-=c;if(0===f||0===d)return r;f=Math.abs(f);d=Math.abs(d);var n=-k/2,m=-l/2,p=Math.cos(b*Math.PI/180),r=Math.sin(b*Math.PI/180);b=p*n+r*m;var n=-1*r*n+p*m,m=b*b,s=n*n,q=f*f,t=d*d,u=m/q+s/t;1<u?(f*=Math.sqrt(u),d*=Math.sqrt(u),e=0):(u=1,e===g&&(u=-1),e=u*Math.sqrt((q*t-q*s-t*m)/(q*s+t*m)));m=e*f*n/d;s=-1*e*d*b/f;k=p*m-r*s+k/2;l=r*m+p*s+l/2;q=Math.atan2((n-s)/d,(b-m)/f)-Math.atan2(0,1);e=0<=q?q:2*Math.PI+q;q=Math.atan2((-n-s)/d,(-b-m)/f)-Math.atan2((n-s)/d,(b-m)/f);b=0<=q?q:2*Math.PI+q;0==
-g&&0<b?b-=2*Math.PI:0!=g&&0>b&&(b+=2*Math.PI);g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;n=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);m=p*f;p*=d;f*=r;d*=r;for(var v=Math.cos(e),A=Math.sin(e),s=-n*(m*A+d*v),q=-n*(f*A-p*v),r=[],x=0;x<g;++x){e+=b;var v=Math.cos(e),A=Math.sin(e),t=m*v-d*A+k,u=f*v+p*A+l,y=-n*(m*A+d*v),v=-n*(f*A-p*v),A=6*x;r[A]=Number(s+a);r[A+1]=Number(q+c);r[A+2]=Number(t-y+a);r[A+3]=Number(u-v+c);r[A+4]=Number(t+a);r[A+5]=Number(u+c);s=t+y;q=u+v}return r},getBoundingBox:function(a,
+k,l){k-=a;l-=c;if(0===f||0===d)return r;f=Math.abs(f);d=Math.abs(d);var n=-k/2,m=-l/2,p=Math.cos(b*Math.PI/180),r=Math.sin(b*Math.PI/180);b=p*n+r*m;var n=-1*r*n+p*m,m=b*b,s=n*n,q=f*f,u=d*d,t=m/q+s/u;1<t?(f*=Math.sqrt(t),d*=Math.sqrt(t),e=0):(t=1,e===g&&(t=-1),e=t*Math.sqrt((q*u-q*s-u*m)/(q*s+u*m)));m=e*f*n/d;s=-1*e*d*b/f;k=p*m-r*s+k/2;l=r*m+p*s+l/2;q=Math.atan2((n-s)/d,(b-m)/f)-Math.atan2(0,1);e=0<=q?q:2*Math.PI+q;q=Math.atan2((-n-s)/d,(-b-m)/f)-Math.atan2((n-s)/d,(b-m)/f);b=0<=q?q:2*Math.PI+q;0==
+g&&0<b?b-=2*Math.PI:0!=g&&0>b&&(b+=2*Math.PI);g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;n=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);m=p*f;p*=d;f*=r;d*=r;for(var v=Math.cos(e),z=Math.sin(e),s=-n*(m*z+d*v),q=-n*(f*z-p*v),r=[],x=0;x<g;++x){e+=b;var v=Math.cos(e),z=Math.sin(e),u=m*v-d*z+k,t=f*v+p*z+l,y=-n*(m*z+d*v),v=-n*(f*z-p*v),z=6*x;r[z]=Number(s+a);r[z+1]=Number(q+c);r[z+2]=Number(u-y+a);r[z+3]=Number(t-v+c);r[z+4]=Number(u+a);r[z+5]=Number(t+c);s=u+y;q=t+v}return r},getBoundingBox:function(a,
c,f){var d=null;if(null!=a&&null!=c&&0!=c){c=mxUtils.toRadians(c);var d=Math.cos(c),b=Math.sin(c);f=null!=f?f:new mxPoint(a.x+a.width/2,a.y+a.height/2);var e=new mxPoint(a.x,a.y);c=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(c.x,a.y+a.height);a=new mxPoint(a.x,g.y);e=mxUtils.getRotatedPoint(e,d,b,f);c=mxUtils.getRotatedPoint(c,d,b,f);g=mxUtils.getRotatedPoint(g,d,b,f);a=mxUtils.getRotatedPoint(a,d,b,f);d=new mxRectangle(e.x,e.y,0,0);d.add(new mxRectangle(c.x,c.y,0,0));d.add(new mxRectangle(g.x,
g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,c,f,d){d=null!=d?d:new mxPoint;var b=a.x-d.x;a=a.y-d.y;return new mxPoint(b*c-a*f+d.x,a*c+b*f+d.y)},getPortConstraints:function(a,c,f,d){c=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==c)return d;d=c.toString();c=mxConstants.DIRECTION_MASK_NONE;f=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(f=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<
f?(a=1,135<=f&&(a=2)):-45>f&&(a=3,-135>=f&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:c|=mxConstants.DIRECTION_MASK_EAST;break;case 2:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:c|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_WEST;break;case 1:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:c|=mxConstants.DIRECTION_MASK_EAST;break;case 3:c|=
@@ -518,22 +518,22 @@ mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:un
c+'"\x3e'+a+"\x3c/div\x3e":d+=c);if(!mxClient.IS_IE&&document.createElementNS)return b=document.createElementNS("http://www.w3.org/1999/xhtml","div"),b.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?b.appendChild(a.cloneNode(!0)):b.appendChild(a):b.innerHTML=a,b;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"'+d+'"\x3e'+a+"\x3c/div\x3e").documentElement};
mxSvgCanvas2D.prototype.invalidateCachedOffsetSize=function(a){delete a.firstChild.mxCachedOffsetWidth;delete a.firstChild.mxCachedFinalOffsetWidth;delete a.firstChild.mxCachedFinalOffsetHeight};
mxSvgCanvas2D.prototype.updateText=function(a,c,f,d,b,e,g,k,l,n,m){if(null!=m&&null!=m.firstChild&&null!=m.firstChild.firstChild&&null!=m.firstChild.firstChild.firstChild){m=m.firstChild;var p=m.firstChild,r=p.firstChild;n=null!=n?n:0;var s=this.state;a+=s.dx;c+=s.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(f)+"px"):"fill"==k?(r.style.width=Math.round(f+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(f+1)+"px",0<d&&(r.style.maxHeight=Math.round(d)+
-"px"));g&&0<f&&(r.style.width=Math.round(f+1)+"px");var q=0,t=0,t=r;null!=t.firstChild&&"DIV"==t.firstChild.nodeName&&(t=t.firstChild);q=(null!=m.mxCachedOffsetWidth?m.mxCachedOffsetWidth:t.offsetWidth)+2;g&&"fill"!=k&&(l&&(q=Math.min(q,f)),r.style.width=q+"px");q=(null!=m.mxCachedFinalOffsetWidth?m.mxCachedFinalOffsetWidth:t.offsetWidth)+2;t=(null!=m.mxCachedFinalOffsetHeight?m.mxCachedFinalOffsetHeight:t.offsetHeight)-2;l&&(t=Math.min(t,d),q=Math.min(q,f));"width"==k?d=t:"fill"!=k&&(f=q,d=t);l=
+"px"));g&&0<f&&(r.style.width=Math.round(f+1)+"px");var q=0,u=0,u=r;null!=u.firstChild&&"DIV"==u.firstChild.nodeName&&(u=u.firstChild);q=(null!=m.mxCachedOffsetWidth?m.mxCachedOffsetWidth:u.offsetWidth)+2;g&&"fill"!=k&&(l&&(q=Math.min(q,f)),r.style.width=q+"px");q=(null!=m.mxCachedFinalOffsetWidth?m.mxCachedFinalOffsetWidth:u.offsetWidth)+2;u=(null!=m.mxCachedFinalOffsetHeight?m.mxCachedFinalOffsetHeight:u.offsetHeight)-2;l&&(u=Math.min(u,d),q=Math.min(q,f));"width"==k?d=u:"fill"!=k&&(f=q,d=u);l=
g=0;b==mxConstants.ALIGN_CENTER?g-=f/2:b==mxConstants.ALIGN_RIGHT&&(g-=f);a+=g;e==mxConstants.ALIGN_MIDDLE?l-=d/2:e==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);c+=l;b=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(b+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(a*=s.scale,c*=s.scale);0!=n&&(b+="rotate("+n+","+-g+","+
-l+")");m.setAttribute("transform","translate("+Math.round(a)+","+Math.round(c)+")"+b);p.setAttribute("width",Math.round(Math.max(1,f)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p,r){if(this.textEnabled&&null!=b){p=null!=p?p:0;var s=this.state;a+=s.dx;c+=s.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";m?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(f)+"px;":"fill"==n?q+="width:"+Math.round(f+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==n&&(q+="width:"+Math.round(f+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<f?q+("width:"+
-Math.round(f+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(b,e,g,q,n);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,A=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var x=
-document.createElement("div");x.style.cssText=q.getAttribute("style");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.position="absolute";x.style.visibility="hidden";A=document.createElement("div");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;x.appendChild(A);document.body.appendChild(x);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
-f){var y=A.offsetWidth;if(!m&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=n){var C=x.style.whiteSpace;A.style.whiteSpace="nowrap";y<A.offsetWidth&&(x.style.whiteSpace=C)}m&&(y=Math.min(y,f));x.style.width=y+"px";v=A.offsetWidth+v+0;A=A.offsetHeight+r;x.style.display="inline-block";x.style.position="";x.style.visibility="";x.style.width=v+"px";q.setAttribute("style",x.style.cssText)}else v=A.offsetWidth+v,A=A.offsetHeight+r;x.parentNode.removeChild(x);u.appendChild(q)}else this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):u.appendChild(q),x=q,null!=x.firstChild&&"DIV"==x.firstChild.nodeName&&(x=x.firstChild,k&&"break-word"==q.style.wordWrap&&(x.style.width="100%")),y=x.offsetWidth,0==y&&q.parentNode==u&&(q.style.visibility="hidden",document.body.appendChild(q),y=x.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=y),!m&&k&&(0<f&&this.root.ownerDocument!=document&&"fill"!=n&&"width"!=n)&&(C=q.style.whiteSpace,q.style.whiteSpace="nowrap",y<x.offsetWidth&&
-(q.style.whiteSpace=C)),v=y+v-1,k&&"fill"!=n&&"width"!=n&&(m&&(v=Math.min(v,f)),q.style.width=v+"px"),v=x.offsetWidth,A=x.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=v,t.mxCachedFinalOffsetHeight=A),A-=r,q.parentNode!=u&&(u.appendChild(q),q.style.visibility="");m&&(A=Math.min(A,d),v=Math.min(v,f));"width"==n?d=A:"fill"!=n&&(f=v,d=A);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;e==mxConstants.ALIGN_CENTER?q-=f/2:e==mxConstants.ALIGN_RIGHT&&(q-=f);a+=q;g==mxConstants.ALIGN_MIDDLE?
-r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);c+=r;x=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(x+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(a*=s.scale,c*=s.scale);0!=p&&(x+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+
-")"+x);u.setAttribute("width",Math.round(Math.max(1,f)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,c,f,d,b,e,g,k,l,n,m,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(u),f.appendChild(a),t.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,n,m,p,r)}};
+Math.round(f+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",u=this.createElement("g");1>s.alpha&&u.setAttribute("opacity",s.alpha);var t=this.createElement("foreignObject");t.setAttribute("style","overflow:visible;");t.setAttribute("pointer-events","all");q=this.createDiv(b,e,g,q,n);if(null!=q){null!=r&&q.setAttribute("dir",r);u.appendChild(t);this.root.appendChild(u);var v=0,z=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var x=
+document.createElement("div");x.style.cssText=q.getAttribute("style");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.position="absolute";x.style.visibility="hidden";z=document.createElement("div");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;x.appendChild(z);document.body.appendChild(x);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
+f){var y=z.offsetWidth;if(!m&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=n){var C=x.style.whiteSpace;z.style.whiteSpace="nowrap";y<z.offsetWidth&&(x.style.whiteSpace=C)}m&&(y=Math.min(y,f));x.style.width=y+"px";v=z.offsetWidth+v+0;z=z.offsetHeight+r;x.style.display="inline-block";x.style.position="";x.style.visibility="";x.style.width=v+"px";q.setAttribute("style",x.style.cssText)}else v=z.offsetWidth+v,z=z.offsetHeight+r;x.parentNode.removeChild(x);t.appendChild(q)}else this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):t.appendChild(q),x=q,null!=x.firstChild&&"DIV"==x.firstChild.nodeName&&(x=x.firstChild,k&&"break-word"==q.style.wordWrap&&(x.style.width="100%")),y=x.offsetWidth,0==y&&q.parentNode==t&&(q.style.visibility="hidden",document.body.appendChild(q),y=x.offsetWidth),this.cacheOffsetSize&&(u.mxCachedOffsetWidth=y),!m&&k&&(0<f&&this.root.ownerDocument!=document&&"fill"!=n&&"width"!=n)&&(C=q.style.whiteSpace,q.style.whiteSpace="nowrap",y<x.offsetWidth&&
+(q.style.whiteSpace=C)),v=y+v-1,k&&"fill"!=n&&"width"!=n&&(m&&(v=Math.min(v,f)),q.style.width=v+"px"),v=x.offsetWidth,z=x.offsetHeight,this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=v,u.mxCachedFinalOffsetHeight=z),z-=r,q.parentNode!=t&&(t.appendChild(q),q.style.visibility="");m&&(z=Math.min(z,d),v=Math.min(v,f));"width"==n?d=z:"fill"!=n&&(f=v,d=z);1>s.alpha&&u.setAttribute("opacity",s.alpha);r=q=0;e==mxConstants.ALIGN_CENTER?q-=f/2:e==mxConstants.ALIGN_RIGHT&&(q-=f);a+=q;g==mxConstants.ALIGN_MIDDLE?
+r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);c+=r;x=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(x+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(a*=s.scale,c*=s.scale);0!=p&&(x+="rotate("+p+","+-q+","+-r+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+
+")"+x);t.setAttribute("width",Math.round(Math.max(1,f)));t.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(t,a,c,f,d,b,e,g,k,l,n,m,p),null!=a&&(t.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(t),f.appendChild(a),u.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,n,m,p,r)}};
mxSvgCanvas2D.prototype.createClip=function(a,c,f,d){a=Math.round(a);c=Math.round(c);f=Math.round(f);d=Math.round(d);for(var b="mx-clip-"+a+"-"+c+"-"+f+"-"+d,e=0,g=b+"-"+e;null!=document.getElementById(g);)g=b+"-"+ ++e;clip=this.createElement("clipPath");clip.setAttribute("id",g);b=this.createElement("rect");b.setAttribute("x",a);b.setAttribute("y",c);b.setAttribute("width",f);b.setAttribute("height",d);clip.appendChild(b);return clip};
mxSvgCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,n,m,p){m=null!=m?m:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=m&&(q+="rotate("+m+","+this.format(a*k.scale)+","+this.format(c*k.scale)+")");null!=p&&s.setAttribute("direction",p);n&&0<f&&0<d&&(p=a,m=c,e==mxConstants.ALIGN_CENTER?p-=f/2:e==mxConstants.ALIGN_RIGHT&&(p-=f),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d)),m=this.createClip(p*k.scale-2,
m*k.scale-2,f*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document?(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),s.setAttribute("clip-path","url("+p+"#"+m.getAttribute("id")+")")):s.setAttribute("clip-path","url(#"+m.getAttribute("id")+")"));m=e==mxConstants.ALIGN_RIGHT?"end":e==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&s.setAttribute("text-anchor",
-m);(!this.styleEnabled||r!=mxConstants.DEFAULT_FONTSIZE)&&s.setAttribute("font-size",r*k.scale+"px");0<q.length&&s.setAttribute("transform",q);1>k.alpha&&s.setAttribute("opacity",k.alpha);q=b.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var t=r+(q.length-1)*p;m=c+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?m-=d/2:(n=(this.matchHtmlAlignment&&n&&0<d?Math.min(t,d):t)/2,m-=n+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?m-=d:(n=this.matchHtmlAlignment&&n&&0<d?Math.min(t,d):t,m-=n+2));for(n=0;n<q.length;n++)0<
-q[n].length&&0<mxUtils.trim(q[n]).length&&(r=this.createElement("text"),r.setAttribute("x",this.format(a*k.scale)+this.textOffset),r.setAttribute("y",this.format(m*k.scale)+this.textOffset),mxUtils.write(r,q[n]),s.appendChild(r)),m+=p;this.root.appendChild(s);this.addTextBackground(s,b,a,c,f,"fill"==l?d:t,e,g,l)};
+m);(!this.styleEnabled||r!=mxConstants.DEFAULT_FONTSIZE)&&s.setAttribute("font-size",r*k.scale+"px");0<q.length&&s.setAttribute("transform",q);1>k.alpha&&s.setAttribute("opacity",k.alpha);q=b.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var u=r+(q.length-1)*p;m=c+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?m-=d/2:(n=(this.matchHtmlAlignment&&n&&0<d?Math.min(u,d):u)/2,m-=n+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?m-=d:(n=this.matchHtmlAlignment&&n&&0<d?Math.min(u,d):u,m-=n+2));for(n=0;n<q.length;n++)0<
+q[n].length&&0<mxUtils.trim(q[n]).length&&(r=this.createElement("text"),r.setAttribute("x",this.format(a*k.scale)+this.textOffset),r.setAttribute("y",this.format(m*k.scale)+this.textOffset),mxUtils.write(r,q[n]),s.appendChild(r)),m+=p;this.root.appendChild(s);this.addTextBackground(s,b,a,c,f,"fill"==l?d:u,e,g,l)};
mxSvgCanvas2D.prototype.updateFont=function(a){var c=this.state;a.setAttribute("fill",c.fontColor);(!this.styleEnabled||c.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",c.fontFamily);(c.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(c.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(c.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
"underline")};
mxSvgCanvas2D.prototype.addTextBackground=function(a,c,f,d,b,e,g,k,l){var n=this.state;if(null!=n.fontBackgroundColor||null!=n.fontBorderColor){var m=null;if("fill"==l||"width"==l)g==mxConstants.ALIGN_CENTER?f-=b/2:g==mxConstants.ALIGN_RIGHT&&(f-=b),k==mxConstants.ALIGN_MIDDLE?d-=e/2:k==mxConstants.ALIGN_BOTTOM&&(d-=e),m=new mxRectangle((f+1)*n.scale,d*n.scale,(b-2)*n.scale,(e+2)*n.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var m=a.getBBox(),p=mxClient.IS_IE&&mxClient.IS_SVG,
@@ -560,22 +560,22 @@ mxVmlCanvas2D.prototype.createDiv=function(a,c,f,d){f=this.createElement("div");
e,f.innerHTML=a);a=f.style;a.fontSize=b.fontSize/this.vmlScale+"px";a.fontFamily=b.fontFamily;a.color=b.fontColor;a.verticalAlign="top";a.textAlign=c||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?b.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
(a.textDecoration="underline");return f};
mxVmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p,r){if(this.textEnabled&&null!=b){var s=this.state;if("html"==l){null!=s.rotation&&(c=this.rotatePoint(a,c,s.rotation,s.rotationCx,s.rotationCy),a=c.x,c=c.y);8==document.documentMode&&!mxClient.IS_EM?(a+=s.dx,c+=s.dy,"fill"!=n&&g==mxConstants.ALIGN_TOP&&(c-=1)):(a*=s.scale,c*=s.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline";
-l.style.left=this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(e,g),u=t.x,t=t.y;b=this.createDiv(b,e,g,n);e=this.createElement("div");null!=r&&b.setAttribute("dir",r);if(k&&0<f){if(m||(b.style.width=Math.round(f)+"px"),b.style.wordWrap=mxConstants.WORD_WRAP,b.style.whiteSpace="normal","break-word"==b.style.wordWrap){var v=b;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
+l.style.left=this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var u=mxUtils.getAlignmentAsPoint(e,g),t=u.x,u=u.y;b=this.createDiv(b,e,g,n);e=this.createElement("div");null!=r&&b.setAttribute("dir",r);if(k&&0<f){if(m||(b.style.width=Math.round(f)+"px"),b.style.wordWrap=mxConstants.WORD_WRAP,b.style.whiteSpace="normal","break-word"==b.style.wordWrap){var v=b;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
(v.firstChild.style.width="100%")}}else b.style.whiteSpace="nowrap";p=s.rotation+(p||0);this.rotateHtml&&0!=p?(e.style.display="inline",e.style.zoom="1",e.appendChild(b),8==document.documentMode&&!mxClient.IS_EM&&"DIV"!=this.root.nodeName?(q.appendChild(e),l.appendChild(q)):l.appendChild(e)):8==document.documentMode&&!mxClient.IS_EM?(q.appendChild(b),l.appendChild(q)):(b.style.display="inline",l.appendChild(b));"DIV"!=this.root.nodeName?(r=this.createVmlElement("rect"),r.stroked="false",r.filled=
"false",r.appendChild(l),this.root.appendChild(r)):this.root.appendChild(l);m?(b.style.overflow="hidden",b.style.width=Math.round(f)+"px",mxClient.IS_QUIRKS||(b.style.maxHeight=Math.round(d)+"px")):"fill"==n?(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.height=Math.max(0,d)+1+"px"):"width"==n&&(b.style.overflow="hidden",b.style.width=Math.max(0,f)+1+"px",b.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){v=p*(Math.PI/180);p=parseFloat(parseFloat(Math.cos(v)).toFixed(8));
-r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var A=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(b.style.display="inline-block",e.style.display="inline-block",q.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);q=b;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;m?(f=Math.min(f,v),
-q=Math.min(q,d)):f=v;k&&(b.style.width=f+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&q>d)q=d,b.style.height=q+"px";d=q;m=(d-d*g+f*-A)/2-r*f*(u+0.5)+p*d*(t+0.5);k=(f-f*g+d*-A)/2+p*f*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-f/2)*s.scale)+"px",n.style.top=this.format(c+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&&
+r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var z=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(b.style.display="inline-block",e.style.display="inline-block",q.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);q=b;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;m?(f=Math.min(f,v),
+q=Math.min(q,d)):f=v;k&&(b.style.width=f+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&q>d)q=d,b.style.height=q+"px";d=q;m=(d-d*g+f*-z)/2-r*f*(t+0.5)+p*d*(u+0.5);k=(f-f*g+d*-z)/2+p*f*(t+0.5)+r*d*(u+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-f/2)*s.scale)+"px",n.style.top=this.format(c+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&&
!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-f/2)*s)+"px",l.style.top=this.format(c+(m-d/2)*s)+"px");e.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";e.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(e.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");e.appendChild(b);b.style.position="";b.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(b.style.verticalAlign=
-"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=b.parentNode,b.style.visibility="hidden",document.body.appendChild(b),f=b.offsetWidth,q=b.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,b.style.height=q+"px"),d=q,b.style.visibility="",s.appendChild(b),l.style.left=this.format(a+f*u*this.state.scale)+"px",l.style.top=this.format(c+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(b.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*u+
-"%",q.style.top=100*t+"%")}else this.plainText(a,c,f,d,mxUtils.htmlEntities(b,!1),e,g,k,l,n,m,p,r)}};
+"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=b.parentNode,b.style.visibility="hidden",document.body.appendChild(b),f=b.offsetWidth,q=b.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,b.style.height=q+"px"),d=q,b.style.visibility="",s.appendChild(b),l.style.left=this.format(a+f*t*this.state.scale)+"px",l.style.top=this.format(c+d*u*this.state.scale)+"px"):(1>this.state.alpha&&(b.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*t+
+"%",q.style.top=100*u+"%")}else this.plainText(a,c,f,d,mxUtils.htmlEntities(b,!1),e,g,k,l,n,m,p,r)}};
mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,n,m,p,r){k=this.state;a=(a+k.dx)*k.scale;c=(c+k.dy)*k.scale;f=this.createVmlElement("shape");f.style.width="1px";f.style.height="1px";f.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.alpha+"%";f.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);f.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
"v-text-align:"+e;d.style.align=e;d.style.fontFamily=k.fontFamily;d.string=b;d.on="true";e=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=e+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");b=b.split("\n");k=e+(b.length-1)*e*mxConstants.LINE_HEIGHT;e=b=0;
g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=p*(Math.PI/180),b=Math.sin(g)*e,e*=Math.cos(g));f.appendChild(d);f.style.left=this.format(a-b)+"px";f.style.top=this.format(c+e)+"px";this.root.appendChild(f)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,c){this.graph=a;this.setStates(c)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=this.graph.getView().translate,b=this.graph.getView().scale,e=c.x,g=c.y,k=!1,l=null,n=null,m=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=c.x;s.y+=c.y;var u=s.x,v=s.x+s.width,A=s.getCenterX(),x=s.y,y=s.y+s.height,C=s.getCenterY();c=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-A)<q?(e=b-a.getCenterX(),q=Math.abs(b-A),c=!0):Math.abs(b-u)<q?(e=b-a.x,
-q=Math.abs(b-u),c=!0):Math.abs(b-v)<q&&(e=b-a.x-a.width,q=Math.abs(b-v),c=!0);c&&(l=d,n=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||c};for(var s=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-C)<t?(g=b-a.getCenterY(),t=Math.abs(b-C),d=!0):Math.abs(b-
-x)<t?(g=b-a.y,t=Math.abs(b-x),d=!0):Math.abs(b-y)<t&&(g=b-a.y-a.height,t=Math.abs(b-y),d=!0);d&&(p=B,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));m=m||d},z=0;z<this.states.length;z++){var B=this.states[z];null!=B&&(this.horizontal&&(c.call(this,B.getCenterX(),
+mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=this.graph.getView().translate,b=this.graph.getView().scale,e=c.x,g=c.y,k=!1,l=null,n=null,m=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,u=s,s=a.clone();s.x+=c.x;s.y+=c.y;var t=s.x,v=s.x+s.width,z=s.getCenterX(),x=s.y,y=s.y+s.height,C=s.getCenterY();c=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-z)<q?(e=b-a.getCenterX(),q=Math.abs(b-z),c=!0):Math.abs(b-t)<q?(e=b-a.x,
+q=Math.abs(b-t),c=!0):Math.abs(b-v)<q&&(e=b-a.x-a.width,q=Math.abs(b-v),c=!0);c&&(l=d,n=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||c};for(var s=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-C)<u?(g=b-a.getCenterY(),u=Math.abs(b-C),d=!0):Math.abs(b-
+x)<u?(g=b-a.y,u=Math.abs(b-x),d=!0):Math.abs(b-y)<u&&(g=b-a.y-a.height,u=Math.abs(b-y),d=!0);d&&(p=B,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));m=m||d},A=0;A<this.states.length;A++){var B=this.states[A];null!=B&&(this.horizontal&&(c.call(this,B.getCenterX(),
B),c.call(this,B.x,B),c.call(this,B.x+B.width,B)),this.vertical&&(s.call(this,B.getCenterY(),B),s.call(this,B.y,B),s.call(this,B.y+B.height,B)))}f&&(k||(f=a.x-(this.graph.snap(a.x/b-d.x)+d.x)*b,e=this.graph.snap(e/b)*b-f),m||(d=a.y-(this.graph.snap(a.y/b-d.y)+d.y)*b,g=this.graph.snap(g/b)*b-d));b=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
l.y+l.height)),this.guideX.points=null!=minY&&null!=maxY?[new mxPoint(n,minY),new mxPoint(n,maxY)]:[new mxPoint(n,-this.graph.panDy),new mxPoint(n,b.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw());!m&&null!=this.guideY?this.guideY.node.style.visibility="hidden":null!=this.guideY&&(null!=p&&null!=a&&(minX=Math.min(a.x+e-this.graph.panDx,p.x),maxX=Math.max(a.x+a.width+e-this.graph.panDx,p.x+p.width)),this.guideY.points=
null!=minX&&null!=maxX?[new mxPoint(minX,r),new mxPoint(maxX,r)]:[new mxPoint(-this.graph.panDx,r),new mxPoint(b.scrollWidth-3-this.graph.panDx,r)],this.guideY.stroke=this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw());c=new mxPoint(e,g)}return c};mxGuide.prototype.getGuideColor=function(a,c){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
@@ -653,19 +653,19 @@ mxRhombus.prototype.paintVertexShape=function(a,c,f,d,b){var e=d/2,g=b/2,k=mxUti
mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,c){null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,c,this.isRounded):this.paintCurvedLine(a,c)};mxPolyline.prototype.paintLine=function(a,c,f){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,c,f,d,!1);a.stroke()};
mxPolyline.prototype.paintCurvedLine=function(a,c){a.begin();var f=c[0],d=c.length;a.moveTo(f.x,f.y);for(f=1;f<d-2;f++){var b=c[f],e=c[f+1];a.quadTo(b.x,b.y,(b.x+e.x)/2,(b.y+e.y)/2)}b=c[d-2];e=c[d-1];a.quadTo(b.x,b.y,e.x,e.y);a.stroke()};
function mxArrow(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.fill=c;this.stroke=f;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=b?b:mxConstants.ARROW_WIDTH;this.spacing=null!=e?e:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);mxArrow.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var c=Math.max(this.arrowWidth,this.endSize);a.grow((c/2+this.strokewidth)*this.scale)};
-mxArrow.prototype.paintEdgeShape=function(a,c){var f=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,b=mxConstants.ARROW_SIZE,e=c[0],g=c[c.length-1],k=g.x-e.x,l=g.y-e.y,n=Math.sqrt(k*k+l*l),m=n-2*f-b,k=k/n,l=l/n,n=d*l/3,d=-d*k/3,b=e.x-n/2+f*k,e=e.y-d/2+f*l,p=b+n,r=e+d,s=p+m*k,m=r+m*l,q=s+n,t=m+d,u=q-3*n,v=t-3*d;a.begin();a.moveTo(b,e);a.lineTo(p,r);a.lineTo(s,m);a.lineTo(q,t);a.lineTo(g.x-f*k,g.y-f*l);a.lineTo(u,v);a.lineTo(u+n,v+d);a.close();a.fillAndStroke()};
+mxArrow.prototype.paintEdgeShape=function(a,c){var f=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,b=mxConstants.ARROW_SIZE,e=c[0],g=c[c.length-1],k=g.x-e.x,l=g.y-e.y,n=Math.sqrt(k*k+l*l),m=n-2*f-b,k=k/n,l=l/n,n=d*l/3,d=-d*k/3,b=e.x-n/2+f*k,e=e.y-d/2+f*l,p=b+n,r=e+d,s=p+m*k,m=r+m*l,q=s+n,u=m+d,t=q-3*n,v=u-3*d;a.begin();a.moveTo(b,e);a.lineTo(p,r);a.lineTo(s,m);a.lineTo(q,u);a.lineTo(g.x-f*k,g.y-f*l);a.lineTo(t,v);a.lineTo(t+n,v+d);a.close();a.fillAndStroke()};
function mxArrowConnector(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.fill=c;this.stroke=f;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=b?b:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=e?e:mxConstants.ARROW_SPACING;this.startSize=mxConstants.ARROW_SIZE/5;this.endSize=mxConstants.ARROW_SIZE/5}mxUtils.extend(mxArrowConnector,mxShape);mxArrowConnector.prototype.useSvgBoundingBox=!0;
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(),n=g?0:this.arrowSpacing+f/2,m=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 u=q/t,v,A=u,x=s/t,y,C=x,t=e*x,z=-e*u,B=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=u;s=x;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,u,x,m,d,e,n,!0);else{v=c[0].x+t/2+n*u;y=c[0].y+z/2+n*x;var F=c[0].x-t/2+n*u,G=c[0].y-z/2+n*x;g?(a.moveTo(v,y),B.push(function(){a.lineTo(F,G)})):(a.moveTo(F,G),a.lineTo(v,y))}for(var E=y=v=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),v=c[t+2].x-c[t+1].x,y=c[t+2].y-c[t+1].y,E=Math.sqrt(v*v+y*y),0!=E&&(A=v/E,C=y/E,tmp=Math.max(Math.sqrt((u*A+x*C+1)/2),0.04),v=u+A,y=x+C,E=Math.sqrt(v*v+y*y),0!=E)){v/=E;y/=E;var E=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),E=0!=z&&p?Math.max(0.1,E):Math.max(tmp,0.06),H=c[t+1].x+y*e/2/E,I=c[t+1].y-v*e/2/E;y=c[t+1].x-y*e/2/E;v=c[t+1].y+v*e/2/E;0==z||!p?(a.lineTo(H,I),function(b,d){B.push(function(){a.lineTo(b,d)})}(y,v)):-1==z?(z=y+C*e,E=v-A*e,
-a.lineTo(y+x*e,v-u*e),a.quadTo(H,I,z,E),function(b,d){B.push(function(){a.lineTo(b,d)})}(y,v)):(a.lineTo(H,I),function(b,d){var c=H-x*e,f=I+u*e,g=H-C*e,k=I+A*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(y,v));u=A;x=C}t=e*C;z=-e*A;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-x,f,b,e,n,!1);else{a.lineTo(r.x-n*A+t/2,r.y-n*C+z/2);var L=r.x-n*A-t/2,Q=r.y-n*C-z/2;g?(a.moveTo(L,Q),B.splice(0,0,function(){a.moveTo(L,Q)})):a.lineTo(L,Q)}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,m,d,e,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-x,f,b,e,n,!0),a.stroke(),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,u=Math.sqrt(q*q+s*s);if(0!=u){var t=q/u,v,z=t,x=s/u,y,C=x,u=e*x,A=-e*t,B=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();q=t;s=x;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,t,x,m,d,e,n,!0);else{v=c[0].x+u/2+n*t;y=c[0].y+A/2+n*x;var E=c[0].x-u/2+n*t,G=c[0].y-A/2+n*x;g?(a.moveTo(v,y),B.push(function(){a.lineTo(E,G)})):(a.moveTo(E,G),a.lineTo(v,y))}for(var F=y=v=0,u=0;u<c.length-2;u++)if(A=mxUtils.relativeCcw(c[u].x,
+c[u].y,c[u+1].x,c[u+1].y,c[u+2].x,c[u+2].y),v=c[u+2].x-c[u+1].x,y=c[u+2].y-c[u+1].y,F=Math.sqrt(v*v+y*y),0!=F&&(z=v/F,C=y/F,tmp=Math.max(Math.sqrt((t*z+x*C+1)/2),0.04),v=t+z,y=x+C,F=Math.sqrt(v*v+y*y),0!=F)){v/=F;y/=F;var F=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),F=0!=A&&p?Math.max(0.1,F):Math.max(tmp,0.06),H=c[u+1].x+y*e/2/F,J=c[u+1].y-v*e/2/F;y=c[u+1].x-y*e/2/F;v=c[u+1].y+v*e/2/F;0==A||!p?(a.lineTo(H,J),function(b,d){B.push(function(){a.lineTo(b,d)})}(y,v)):-1==A?(A=y+C*e,F=v-z*e,
+a.lineTo(y+x*e,v-t*e),a.quadTo(H,J,A,F),function(b,d){B.push(function(){a.lineTo(b,d)})}(y,v)):(a.lineTo(H,J),function(b,d){var c=H-x*e,f=J+t*e,g=H-C*e,k=J+z*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(y,v));t=z;x=C}u=e*C;A=-e*z;if(l&&!g)this.paintMarker(a,r.x,r.y,-t,-x,f,b,e,n,!1);else{a.lineTo(r.x-n*z+u/2,r.y-n*C+A/2);var L=r.x-n*z-u/2,Q=r.y-n*C-A/2;g?(a.moveTo(L,Q),B.splice(0,0,function(){a.moveTo(L,Q)})):a.lineTo(L,Q)}for(u=B.length-1;0<=u;u--)B[u]();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,m,d,e,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-t,-x,f,b,e,n,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,c,f,d,b,e,g,k,l,n){g=k/g;var m=k*b/2;k=-k*d/2;var p=(l+e)*d;e=(l+e)*b;n?a.moveTo(c-m+p,f-k+e):a.lineTo(c-m+p,f-k+e);a.lineTo(c-m/g+p,f-k/g+e);a.lineTo(c+l*d,f+l*b);a.lineTo(c+m/g+p,f+k/g+e);a.lineTo(c+m+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};
-function mxText(a,c,f,d,b,e,g,k,l,n,m,p,r,s,q,t,u,v,A,x,y){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:"";this.valign=null!=d?d:"";this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
-0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=A?A:"visible";this.labelPadding=null!=x?x:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+function mxText(a,c,f,d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,x,y){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:"";this.valign=null!=d?d:"";this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
+0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=u;this.wrap=null!=t?t:!1;this.clipped=null!=v?v:!1;this.overflow=null!=z?z:"visible";this.labelPadding=null!=x?x:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
mxText.prototype.paint=function(a,c){var f=this.scale,d=this.bounds.x/f,b=this.bounds.y/f,e=this.bounds.width/f,f=this.bounds.height/f;this.updateTransform(a,d,b,e,f);this.configureCanvas(a,d,b,e,f);if(c){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,b,e,f,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
@@ -755,7 +755,7 @@ mxStackLayout.prototype.moveCell=function(a,c,f){var d=this.graph.getModel(),b=d
mxStackLayout.prototype.getParentSize=function(a){var c=this.graph.getModel(),f=c.getGeometry(a);if(null!=this.graph.container&&(null==f&&c.isLayer(a)||a==this.graph.getView().currentRoot))f=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return f};
mxStackLayout.prototype.execute=function(a){if(null!=a){var c=this.getParentSize(a),f=this.isHorizontal(),d=this.graph.getModel(),b=null;null!=c&&(b=f?c.height-this.marginTop-this.marginBottom:c.width-this.marginLeft-this.marginRight);var b=b-(2*this.spacing+2*this.border),e=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k,
mxConstants.STYLE_HORIZONTAL,!0);null!=c&&(l=k?Math.min(l,c.height):Math.min(l,c.width));f==k&&(b-=l);k?g+=l:e+=l}d.beginUpdate();try{for(var l=0,k=null,n=0,m=null,p=d.getChildCount(a),r=0;r<p;r++){var s=d.getChildAt(a,r);if(!this.isVertexIgnored(s)&&this.isVertexMovable(s)){var q=d.getGeometry(s);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=k&&(f&&k.x+k.width+q.width+2*this.spacing>this.wrap||!f&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,f?g+=l+this.spacing:e+=l+this.spacing,l=
-0;var l=Math.max(l,f?q.height:q.width),t=0;if(!this.borderCollapse)var u=this.graph.getCellStyle(s),t=mxUtils.getNumber(u,mxConstants.STYLE_STROKEWIDTH,1);null!=k?f?q.x=n+this.spacing+Math.floor(t/2):q.y=n+this.spacing+Math.floor(t/2):this.keepFirstLocation||(f?q.x=e:q.y=g);f?q.y=g:q.x=e;this.fill&&null!=b&&(f?q.height=b:q.width=b);this.setChildGeometry(s,q);m=s;k=q;n=f?k.x+k.width+Math.floor(t/2):k.y+k.height+Math.floor(t/2)}}}this.resizeParent&&null!=c&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+0;var l=Math.max(l,f?q.height:q.width),u=0;if(!this.borderCollapse)var t=this.graph.getCellStyle(s),u=mxUtils.getNumber(t,mxConstants.STYLE_STROKEWIDTH,1);null!=k?f?q.x=n+this.spacing+Math.floor(u/2):q.y=n+this.spacing+Math.floor(u/2):this.keepFirstLocation||(f?q.x=e:q.y=g);f?q.y=g:q.x=e;this.fill&&null!=b&&(f?q.height=b:q.width=b);this.setChildGeometry(s,q);m=s;k=q;n=f?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}}this.resizeParent&&null!=c&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
c,k):this.resizeLast&&null!=c&&(null!=k&&null!=m)&&(f?k.width=c.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=c.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(m,k))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,c){var f=this.graph.getCellGeometry(a);(null==f||c.x!=f.x||c.y!=f.y||c.width!=f.width||c.height!=f.height)&&this.graph.getModel().setGeometry(a,c)};
mxStackLayout.prototype.updateParentGeometry=function(a,c,f){var d=this.isHorizontal(),b=this.graph.getModel(),e=c.clone();d?(f=f.x+f.width+this.spacing+this.marginRight,e.width=this.resizeParentMax?Math.max(e.width,f):f):(f=f.y+f.height+this.spacing+this.marginBottom,e.height=this.resizeParentMax?Math.max(e.height,f):f);(c.x!=e.x||c.y!=e.y||c.width!=e.width||c.height!=e.height)&&b.setGeometry(a,e)};
function mxPartitionLayout(a,c,f,d){mxGraphLayout.call(this,a);this.horizontal=null!=c?c:!0;this.spacing=f||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
@@ -858,9 +858,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}}else{f++;for(b=0;b<this.nestedBestRanks.length;b++){e=a.ranks[b];for(g=0;g<e.length;g++)k=e[g],k.setGeneralPurposeVariable(b,g)}}if(0==d)break}f=[];d=[];for(c=0;c<a.maxRank+1;c++)d[c]=[],f[c]=d[c];for(c=0;c<this.nestedBestRanks.length;c++)for(b=0;b<this.nestedBestRanks[c].length;b++)d[c].push(this.nestedBestRanks[c][b]);a.ranks=f};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var c=a.ranks.length,f=0,d=1;d<c;d++)f+=this.calculateRankCrossing(d,a);return f};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,c){for(var f=0,d=c.ranks[a],b=c.ranks[a-1],e=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),n=[],m=0;m<k.length;m++){var p=k[m].getGeneralPurposeVariable(a-1);n.push(p)}n.sort(function(b,a){return b-a});e[l]=n}d=[];for(g=0;g<e.length;g++)d=d.concat(e[g]);for(e=1;e<b.length;)e<<=1;l=2*e-1;e-=1;b=[];for(g=0;g<l;++g)b[g]=0;for(g=0;g<d.length;g++){l=d[g]+e;for(++b[l];0<
l;)l%2&&(f+=b[l+1]),l=l-1>>1,++b[l]}return f};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;e<c.ranks.length;e++){for(var g=c.ranks[e],k=[],l=0;l<g.length;l++){var n=g[l],m=n.getGeneralPurposeVariable(e);0>m&&(m=l);k[m]=n}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,A=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],n=v.getNextLayerConnectedCells(e),m=v.getPreviousLayerConnectedCells(e),s=[],q=[],x=0;x<n.length;x++)s[x]=n[x].getGeneralPurposeVariable(e+
-1);for(x=0;x<m.length;x++)q[x]=m[x].getGeneralPurposeVariable(e-1)}else n=p,m=r,s=t,q=u,v=A;A=k[l+1];p=A.getNextLayerConnectedCells(e);r=A.getPreviousLayerConnectedCells(e);t=[];u=[];for(x=0;x<p.length;x++)t[x]=p[x].getGeneralPurposeVariable(e+1);for(x=0;x<r.length;x++)u[x]=r[x].getGeneralPurposeVariable(e-1);for(var y=0,C=0,x=0;x<s.length;x++)for(var z=0;z<t.length;z++)s[x]>t[z]&&y++,s[x]<t[z]&&C++;for(x=0;x<q.length;x++)for(z=0;z<u.length;z++)q[x]>u[z]&&y++,q[x]<u[z]&&C++;if(C<y||C==y&&b)p=v.getGeneralPurposeVariable(e),
-v.setGeneralPurposeVariable(e,A.getGeneralPurposeVariable(e)),A.setGeneralPurposeVariable(e,p),p=n,r=m,t=s,u=q,A=v,b||(f=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,c){var f=0==a%2;if(f)for(var d=c.maxRank-1;0<=d;d--)this.medianRank(d,f);else for(d=1;d<c.maxRank;d++)this.medianRank(d,f)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;e<c.ranks.length;e++){for(var g=c.ranks[e],k=[],l=0;l<g.length;l++){var n=g[l],m=n.getGeneralPurposeVariable(e);0>m&&(m=l);k[m]=n}for(var p=null,r=null,s=null,q=null,u=null,t=null,v=null,z=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],n=v.getNextLayerConnectedCells(e),m=v.getPreviousLayerConnectedCells(e),s=[],q=[],x=0;x<n.length;x++)s[x]=n[x].getGeneralPurposeVariable(e+
+1);for(x=0;x<m.length;x++)q[x]=m[x].getGeneralPurposeVariable(e-1)}else n=p,m=r,s=u,q=t,v=z;z=k[l+1];p=z.getNextLayerConnectedCells(e);r=z.getPreviousLayerConnectedCells(e);u=[];t=[];for(x=0;x<p.length;x++)u[x]=p[x].getGeneralPurposeVariable(e+1);for(x=0;x<r.length;x++)t[x]=r[x].getGeneralPurposeVariable(e-1);for(var y=0,C=0,x=0;x<s.length;x++)for(var A=0;A<u.length;A++)s[x]>u[A]&&y++,s[x]<u[A]&&C++;for(x=0;x<q.length;x++)for(A=0;A<t.length;A++)q[x]>t[A]&&y++,q[x]<t[A]&&C++;if(C<y||C==y&&b)p=v.getGeneralPurposeVariable(e),
+v.setGeneralPurposeVariable(e,z.getGeneralPurposeVariable(e)),z.setGeneralPurposeVariable(e,p),p=n,r=m,u=s,t=q,z=v,b||(f=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,c){var f=0==a%2;if(f)for(var d=c.maxRank-1;0<=d;d--)this.medianRank(d,f);else for(d=1;d<c.maxRank;d++)this.medianRank(d,f)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,c){for(var f=this.nestedBestRanks[a].length,d=[],b=[],e=0;e<f;e++){var g=this.nestedBestRanks[a][e],k=new MedianCellSorter;k.cell=g;var l;l=c?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var n;n=c?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,n),d.push(k)):b[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(e=0;e<f;e++)null==b[e]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
e))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,c){for(var f=[],d=0,b=0;b<a.length;b++){var e=a[b];f[d++]=e.getGeneralPurposeVariable(c)}f.sort(function(b,a){return b-a});if(1==d%2)return f[Math.floor(d/2)];if(2==d)return(f[0]+f[1])/2;b=d/2;e=f[b-1]-f[0];d=f[d-1]-f[b];return(f[b-1]*d+f[b]*e)/(e+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,c){return null!=a&&null!=c?c.medianValue>a.medianValue?-1:c.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -873,8 +873,8 @@ mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getMod
mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var c=1E8;if(this.fineTuning)for(var f=0;f<this.maxIterations;f++){0!=f&&(this.medianPos(f,a),this.minNode(a));if(this.currentXDelta<c){for(var d=0;d<a.ranks.length;d++)for(var b=a.ranks[d],e=0;e<b.length;e++){var g=b[e];g.setX(d,g.getGeneralPurposeVariable(d))}c=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){b=
a.ranks[d];for(e=0;e<b.length;e++)g=b[e],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
mxCoordinateAssignment.prototype.minNode=function(a){for(var c=[],f=new mxDictionary,d=[],b=0;b<=a.maxRank;b++){d[b]=a.ranks[b];for(var e=0;e<d[b].length;e++){var g=d[b][e],k=new WeightedCellSorter(g,b);k.rankIndex=e;k.visited=!0;c.push(k);f.put(g,k)}}a=10*c.length;for(e=0;0<c.length&&e<=a;){var g=c.shift(),b=g.cell,l=g.weightedValue,n=parseInt(g.rankIndex),k=b.getNextLayerConnectedCells(l),m=b.getPreviousLayerConnectedCells(l),p=k.length,r=m.length,s=this.medianXValue(k,l+1),q=this.medianXValue(m,
-l-1),t=p+r,u=b.getGeneralPurposeVariable(l),v=u;0<t&&(v=(s*p+q*r)/t);p=!1;v<u-1?0==n?(b.setGeneralPurposeVariable(l,v),p=!0):(n=d[l][n-1],u=n.getGeneralPurposeVariable(l),u=u+n.width/2+this.intraCellSpacing+b.width/2,u<v?(b.setGeneralPurposeVariable(l,v),p=!0):u<b.getGeneralPurposeVariable(l)-1&&(b.setGeneralPurposeVariable(l,u),p=!0)):v>u+1&&(n==d[l].length-1?(b.setGeneralPurposeVariable(l,v),p=!0):(n=d[l][n+1],u=n.getGeneralPurposeVariable(l),u=u-n.width/2-this.intraCellSpacing-b.width/2,u>v?(b.setGeneralPurposeVariable(l,
-v),p=!0):u>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,u),p=!0)));if(p){for(b=0;b<k.length;b++)l=k[b],l=f.get(l),null!=l&&!1==l.visited&&(l.visited=!0,c.push(l));for(b=0;b<m.length;b++)l=m[b],l=f.get(l),null!=l&&!1==l.visited&&(l.visited=!0,c.push(l))}g.visited=!1;e++}};mxCoordinateAssignment.prototype.medianPos=function(a,c){if(0==a%2)for(var f=c.maxRank;0<f;f--)this.rankMedianPosition(f-1,c,f);else for(f=0;f<c.maxRank-1;f++)this.rankMedianPosition(f+1,c,f)};
+l-1),u=p+r,t=b.getGeneralPurposeVariable(l),v=t;0<u&&(v=(s*p+q*r)/u);p=!1;v<t-1?0==n?(b.setGeneralPurposeVariable(l,v),p=!0):(n=d[l][n-1],t=n.getGeneralPurposeVariable(l),t=t+n.width/2+this.intraCellSpacing+b.width/2,t<v?(b.setGeneralPurposeVariable(l,v),p=!0):t<b.getGeneralPurposeVariable(l)-1&&(b.setGeneralPurposeVariable(l,t),p=!0)):v>t+1&&(n==d[l].length-1?(b.setGeneralPurposeVariable(l,v),p=!0):(n=d[l][n+1],t=n.getGeneralPurposeVariable(l),t=t-n.width/2-this.intraCellSpacing-b.width/2,t>v?(b.setGeneralPurposeVariable(l,
+v),p=!0):t>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,t),p=!0)));if(p){for(b=0;b<k.length;b++)l=k[b],l=f.get(l),null!=l&&!1==l.visited&&(l.visited=!0,c.push(l));for(b=0;b<m.length;b++)l=m[b],l=f.get(l),null!=l&&!1==l.visited&&(l.visited=!0,c.push(l))}g.visited=!1;e++}};mxCoordinateAssignment.prototype.medianPos=function(a,c){if(0==a%2)for(var f=c.maxRank;0<f;f--)this.rankMedianPosition(f-1,c,f);else for(f=0;f<c.maxRank-1;f++)this.rankMedianPosition(f+1,c,f)};
mxCoordinateAssignment.prototype.rankMedianPosition=function(a,c,f){c=c.ranks[a];for(var d=[],b={},e=0;e<c.length;e++){var g=c[e];d[e]=new WeightedCellSorter;d[e].cell=g;d[e].rankIndex=e;b[g.id]=d[e];var k=null,k=f<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[e].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(e=0;e<d.length;e++){var l=0,g=d[e].cell,l=0,k=f<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
null!=k&&(l=k.length,l=0<l?this.medianXValue(k,f):g.getGeneralPurposeVariable(a));for(var n=0,k=-1E8,m=d[e].rankIndex-1;0<=m;){var p=b[c[m].id];if(null!=p){var r=p.cell;p.visited?(k=r.getGeneralPurposeVariable(a)+r.width/2+this.intraCellSpacing+n+g.width/2,m=-1):(n+=r.width+this.intraCellSpacing,m--)}}n=0;r=1E8;for(m=d[e].rankIndex+1;m<d.length;)if(p=b[c[m].id],null!=p){var s=p.cell;p.visited?(r=s.getGeneralPurposeVariable(a)-s.width/2-this.intraCellSpacing-n-g.width/2,m=d.length):(n+=s.width+this.intraCellSpacing,
m++)}l>=k&&l<=r?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>r&&(g.setGeneralPurposeVariable(a,r),this.currentXDelta+=l-r);d[e].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,c){for(var f=0,d=0;d<c.length;d++){var b=c[d];a.isVertex()&&b.isVertex()?f++:f=a.isEdge()&&b.isEdge()?f+8:f+2}return f};
@@ -891,13 +891,13 @@ mxCoordinateAssignment.prototype.repositionValid=function(a,c,f,d){a=a.ranks[f];
mxCoordinateAssignment.prototype.setCellLocations=function(a,c){this.rankTopY=[];this.rankBottomY=[];for(var f=0;f<c.ranks.length;f++)this.rankTopY[f]=Number.MAX_VALUE,this.rankBottomY[f]=-Number.MAX_VALUE;for(var d=c.vertexMapper.getValues(),f=0;f<d.length;f++)this.setVertexLocation(d[f]);(this.layout.edgeStyle==mxHierarchicalEdgeStyle.ORTHOGONAL||this.layout.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(c);d=c.edgeMapper.getValues();
for(f=0;f<d.length;f++)this.setEdgePosition(d[f])};
mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var c=0;c<a.ranks.length;c++)for(var f=a.ranks[c],d=0;d<f.length;d++){var b=f[d];if(b.isVertex())for(var e=b.getPreviousLayerConnectedCells(c),g=c-1,k=0;2>k;k++){if(-1<g&&g<a.ranks.length&&null!=e&&0<e.length){for(var l=[],n=0;n<e.length;n++){var m=new WeightedCellSorter(e[n],e[n].getX(g));l.push(m)}l.sort(WeightedCellSorter.prototype.compare);for(var m=b.x[0]-b.width/2,p=m+b.width,r=e=0,g=[],n=0;n<l.length;n++){var s=l[n].cell,
-q;if(s.isVertex()){q=0==k?b.connectsAsSource:b.connectsAsTarget;for(var t=0;t<q.length;t++)if(q[t].source==s||q[t].target==s)e+=q[t].edges.length,r++,g.push(q[t])}else e+=s.edges.length,r++,g.push(s)}b.width>(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-m)/e;m+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(n=r=0;n<g.length;n++){s=g[n].edges.length;q=this.jettyPositions[g[n].ids[0]];null==q&&(q=[],this.jettyPositions[g[n].ids[0]]=q);n<e/2?
-p+=this.prefVertEdgeOff:n>e/2&&(p-=this.prefVertEdgeOff);for(t=0;t<s;t++)q[4*t+2*k]=m,m+=l,q[4*t+2*k+1]=p;r=Math.max(r,p)}}e=b.getNextLayerConnectedCells(c);g=c+1}}};
+q;if(s.isVertex()){q=0==k?b.connectsAsSource:b.connectsAsTarget;for(var u=0;u<q.length;u++)if(q[u].source==s||q[u].target==s)e+=q[u].edges.length,r++,g.push(q[u])}else e+=s.edges.length,r++,g.push(s)}b.width>(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-m)/e;m+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(n=r=0;n<g.length;n++){s=g[n].edges.length;q=this.jettyPositions[g[n].ids[0]];null==q&&(q=[],this.jettyPositions[g[n].ids[0]]=q);n<e/2?
+p+=this.prefVertEdgeOff:n>e/2&&(p-=this.prefVertEdgeOff);for(u=0;u<s;u++)q[4*u+2*k]=m,m+=l,q[4*u+2*k+1]=p;r=Math.max(r,p)}}e=b.getNextLayerConnectedCells(c);g=c+1}}};
mxCoordinateAssignment.prototype.setEdgePosition=function(a){var c=0;if(101207!=a.temp[0]){var f=a.maxRank,d=a.minRank;f==d&&(f=a.source.maxRank,d=a.target.minRank);for(var b=0,e=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,n=0;n<a.edges.length;n++){var m=a.edges[n],p=this.layout.getVisibleTerminal(m,!0),r=[],s=a.isReversed;p!=g&&(s=!s);if(null!=e){var q=s?
-2:0,t=s?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[f]:this.rankBottomY[f],u=e[4*b+1+q];s!=l&&(u=-u);var t=t+u,q=e[4*b+q],v=k.model.getTerminal(m,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,t+u))):(r.push(new mxPoint(t,
-q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t+u,q)))}q=a.x.length-1;t=u=-1;p=a.maxRank-1;for(s&&(q=0,u=a.x.length,t=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=u;q+=t){var v=a.x[q]+c,A=(this.rankTopY[p]+this.rankBottomY[p+1])/2,x=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var y=A,A=x,x=y;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,A)),r.push(new mxPoint(v,x))):(r.push(new mxPoint(A,v)),r.push(new mxPoint(x,
-v)));this.limitX=Math.max(this.limitX,v);p+=t}null!=e&&(q=s?2:0,t=s?l?this.rankTopY[f]:this.rankBottomY[f]:l?this.rankBottomY[d]:this.rankTopY[d],u=e[4*b+3-q],s!=l&&(u=-u),t-=u,q=e[4*b+2-q],s=k.model.getTerminal(m,!1),p=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(s)&&k.model.getParent(s)==p&&(q=k.view.getState(s),q=null!=q?q.x:p.geometry.x+a.target.width*s.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
-r.push(new mxPoint(q,t-u)),r.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t-u,q)),r.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,r);c=0==c?this.parallelEdgeSpacing:0<c?-c:-c+this.parallelEdgeSpacing;b++}a.temp[0]=101207}};
+2:0,u=s?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[f]:this.rankBottomY[f],t=e[4*b+1+q];s!=l&&(t=-t);var u=u+t,q=e[4*b+q],v=k.model.getTerminal(m,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,u+t))):(r.push(new mxPoint(u,
+q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(u+t,q)))}q=a.x.length-1;u=t=-1;p=a.maxRank-1;for(s&&(q=0,t=a.x.length,u=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=t;q+=u){var v=a.x[q]+c,z=(this.rankTopY[p]+this.rankBottomY[p+1])/2,x=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var y=z,z=x,x=y;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,z)),r.push(new mxPoint(v,x))):(r.push(new mxPoint(z,v)),r.push(new mxPoint(x,
+v)));this.limitX=Math.max(this.limitX,v);p+=u}null!=e&&(q=s?2:0,u=s?l?this.rankTopY[f]:this.rankBottomY[f]:l?this.rankBottomY[d]:this.rankTopY[d],t=e[4*b+3-q],s!=l&&(t=-t),u-=t,q=e[4*b+2-q],s=k.model.getTerminal(m,!1),p=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(s)&&k.model.getParent(s)==p&&(q=k.view.getState(s),q=null!=q?q.x:p.geometry.x+a.target.width*s.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+r.push(new mxPoint(q,u-t)),r.push(new mxPoint(q,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(u-t,q)),r.push(new mxPoint(u,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,r);c=0==c?this.parallelEdgeSpacing:0<c?-c:-c+this.parallelEdgeSpacing;b++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var c=a.cell,f=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(c,f,d):this.layout.setVertexLocation(c,d,f);this.limitX=Math.max(this.limitX,f+a.width)};
mxCoordinateAssignment.prototype.processReversedEdge=function(a,c){};function WeightedCellSorter(a,c){this.cell=a;this.weightedValue=c}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,c){return null!=a&&null!=c?c.weightedValue>a.weightedValue?-1:c.weightedValue<a.weightedValue?1:c.nudge?-1:1:0};
function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null;
@@ -1001,14 +1001,14 @@ Math.tan(e)/2):e<-n?(g.y=a.y,g.x=c-a.height*Math.tan(l)/2):e<n?(g.x=a.x+a.width,
n+k*p/Math.abs(p));if(0==m&&0==p)return new mxPoint(c,f);if(d){if(f>=e&&f<=e+a.height)return a=f-n,a=Math.sqrt(g*g*(1-a*a/(k*k)))||0,c<=b&&(a=-a),new mxPoint(l+a,f);if(c>=b&&c<=b+a.width)return a=c-l,a=Math.sqrt(k*k*(1-a*a/(g*g)))||0,f<=e&&(a=-a),new mxPoint(c,n+a)}b=p/m;n-=b*l;e=g*g*b*b+k*k;a=-2*l*e;k=Math.sqrt(a*a-4*e*(g*g*b*b*l*l+k*k*l*l-g*g*k*k));g=(-a+k)/(2*e);k=(-a-k)/(2*e);l=b*g+n;n=b*k+n;b=Math.sqrt(Math.pow(g-c,2)+Math.pow(l-f,2));c=Math.sqrt(Math.pow(k-c,2)+Math.pow(n-f,2));e=f=0;b<c?(f=
g,e=l):(f=k,e=n);return new mxPoint(f,e)},RhombusPerimeter:function(a,c,f,d){c=a.x;var b=a.y,e=a.width;a=a.height;var g=c+e/2,k=b+a/2,l=f.x;f=f.y;if(g==l)return k>f?new mxPoint(g,b):new mxPoint(g,b+a);if(k==f)return g>l?new mxPoint(c,k):new mxPoint(c+e,k);var n=g,m=k;d&&(l>=c&&l<=c+e?n=l:f>=b&&f<=b+a&&(m=f));return l<g?f<k?mxUtils.intersection(l,f,n,m,g,b,c,k):mxUtils.intersection(l,f,n,m,g,b+a,c,k):f<k?mxUtils.intersection(l,f,n,m,g,b,c+e,k):mxUtils.intersection(l,f,n,m,g,b+a,c+e,k)},TrianglePerimeter:function(a,
c,f,d){c=null!=c?c.style[mxConstants.STYLE_DIRECTION]:null;var b=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH,e=a.x,g=a.y,k=a.width;a=a.height;var l=e+k/2,n=g+a/2,m=new mxPoint(e,g),p=new mxPoint(e+k,n),r=new mxPoint(e,g+a);c==mxConstants.DIRECTION_NORTH?(m=r,p=new mxPoint(l,g),r=new mxPoint(e+k,g+a)):c==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(l,g+a),r=new mxPoint(e+k,g)):c==mxConstants.DIRECTION_WEST&&(m=new mxPoint(e+k,g),p=new mxPoint(e,n),r=new mxPoint(e+k,g+a));var s=f.x-
-l,q=f.y-n,s=b?Math.atan2(s,q):Math.atan2(q,s),t=b?Math.atan2(k,a):Math.atan2(a,k),q=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?s>-t&&s<t:s<-Math.PI+t||s>Math.PI-t,t=null;q?t=d&&(b&&f.x>=m.x&&f.x<=r.x||!b&&f.y>=m.y&&f.y<=r.y)?b?new mxPoint(f.x,m.y):new mxPoint(m.x,f.y):c==mxConstants.DIRECTION_NORTH?new mxPoint(e+k/2+a*Math.tan(s)/2,g+a):c==mxConstants.DIRECTION_SOUTH?new mxPoint(e+k/2-a*Math.tan(s)/2,g):c==mxConstants.DIRECTION_WEST?new mxPoint(e+k,g+a/2+k*Math.tan(s)/2):new mxPoint(e,
-g+a/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,n),f.y>=g&&f.y<=g+a?(d.x=b?l:c==mxConstants.DIRECTION_WEST?e+k:e,d.y=f.y):f.x>=e&&f.x<=e+k&&(d.x=f.x,d.y=!b?n:c==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,n=d.y),t=b&&f.x<=e+k/2||!b&&f.y<=g+a/2?mxUtils.intersection(f.x,f.y,l,n,m.x,m.y,p.x,p.y):mxUtils.intersection(f.x,f.y,l,n,p.x,p.y,r.x,r.y));null==t&&(t=new mxPoint(l,n));return t},HexagonPerimeter:function(a,c,f,d){var b=a.x,e=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var n=f.x,m=f.y,p=
--Math.atan2(m-a,n-l),r=Math.PI,s=Math.PI/2,q=new mxPoint(l,a);c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var t=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH;c=new mxPoint;q=new mxPoint;if(n<b&&m<e||n<b&&m>e+k||n>b+g&&m<e||n>b+g&&m>e+k)d=!1;if(d){if(t){if(n==l){if(m<=e)return new mxPoint(l,e);if(m>=e+k)return new mxPoint(l,e+k)}else if(n<b){if(m==e+k/4)return new mxPoint(b,e+k/4);if(m==e+3*k/4)return new mxPoint(b,
+l,q=f.y-n,s=b?Math.atan2(s,q):Math.atan2(q,s),u=b?Math.atan2(k,a):Math.atan2(a,k),q=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?s>-u&&s<u:s<-Math.PI+u||s>Math.PI-u,u=null;q?u=d&&(b&&f.x>=m.x&&f.x<=r.x||!b&&f.y>=m.y&&f.y<=r.y)?b?new mxPoint(f.x,m.y):new mxPoint(m.x,f.y):c==mxConstants.DIRECTION_NORTH?new mxPoint(e+k/2+a*Math.tan(s)/2,g+a):c==mxConstants.DIRECTION_SOUTH?new mxPoint(e+k/2-a*Math.tan(s)/2,g):c==mxConstants.DIRECTION_WEST?new mxPoint(e+k,g+a/2+k*Math.tan(s)/2):new mxPoint(e,
+g+a/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,n),f.y>=g&&f.y<=g+a?(d.x=b?l:c==mxConstants.DIRECTION_WEST?e+k:e,d.y=f.y):f.x>=e&&f.x<=e+k&&(d.x=f.x,d.y=!b?n:c==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,n=d.y),u=b&&f.x<=e+k/2||!b&&f.y<=g+a/2?mxUtils.intersection(f.x,f.y,l,n,m.x,m.y,p.x,p.y):mxUtils.intersection(f.x,f.y,l,n,p.x,p.y,r.x,r.y));null==u&&(u=new mxPoint(l,n));return u},HexagonPerimeter:function(a,c,f,d){var b=a.x,e=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var n=f.x,m=f.y,p=
+-Math.atan2(m-a,n-l),r=Math.PI,s=Math.PI/2,q=new mxPoint(l,a);c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var u=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH;c=new mxPoint;q=new mxPoint;if(n<b&&m<e||n<b&&m>e+k||n>b+g&&m<e||n>b+g&&m>e+k)d=!1;if(d){if(u){if(n==l){if(m<=e)return new mxPoint(l,e);if(m>=e+k)return new mxPoint(l,e+k)}else if(n<b){if(m==e+k/4)return new mxPoint(b,e+k/4);if(m==e+3*k/4)return new mxPoint(b,
e+3*k/4)}else if(n>b+g){if(m==e+k/4)return new mxPoint(b+g,e+k/4);if(m==e+3*k/4)return new mxPoint(b+g,e+3*k/4)}else if(n==b){if(m<a)return new mxPoint(b,e+k/4);if(m>a)return new mxPoint(b,e+3*k/4)}else if(n==b+g){if(m<a)return new mxPoint(b+g,e+k/4);if(m>a)return new mxPoint(b+g,e+3*k/4)}if(m==e)return new mxPoint(l,e);if(m==e+k)return new mxPoint(l,e+k);n<l?m>e+k/4&&m<e+3*k/4?(c=new mxPoint(b,e),q=new mxPoint(b,e+k)):m<e+k/4?(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+
g,e-Math.floor(0.25*k))):m>e+3*k/4&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+g,e+Math.floor(1.25*k))):n>l&&(m>e+k/4&&m<e+3*k/4?(c=new mxPoint(b+g,e),q=new mxPoint(b+g,e+k)):m<e+k/4?(c=new mxPoint(b,e-Math.floor(0.25*k)),q=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k))):m>e+3*k/4&&(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b,e+Math.floor(1.25*k))))}else{if(m==a){if(n<=b)return new mxPoint(b,e+k/2);if(n>=b+g)return new mxPoint(b+g,e+k/
2)}else if(m<e){if(n==b+g/4)return new mxPoint(b+g/4,e);if(n==b+3*g/4)return new mxPoint(b+3*g/4,e)}else if(m>e+k){if(n==b+g/4)return new mxPoint(b+g/4,e+k);if(n==b+3*g/4)return new mxPoint(b+3*g/4,e+k)}else if(m==e){if(n<l)return new mxPoint(b+g/4,e);if(n>l)return new mxPoint(b+3*g/4,e)}else if(m==e+k){if(n<l)return new mxPoint(b+g/4,e+k);if(m>a)return new mxPoint(b+3*g/4,e+k)}if(n==b)return new mxPoint(b,a);if(n==b+g)return new mxPoint(b+g,a);m<a?n>b+g/4&&n<b+3*g/4?(c=new mxPoint(b,e),q=new mxPoint(b+
g,e)):n<b+g/4?(c=new mxPoint(b-Math.floor(0.25*g),e+k),q=new mxPoint(b+Math.floor(0.5*g),e-Math.floor(0.5*k))):n>b+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e-Math.floor(0.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e+k)):m>a&&(n>b+g/4&&n<b+3*g/4?(c=new mxPoint(b,e+k),q=new mxPoint(b+g,e+k)):n<b+g/4?(c=new mxPoint(b-Math.floor(0.25*g),e),q=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k))):n>b+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e)))}d=
-l;p=a;n>=b&&n<=b+g?(d=n,p=m<a?e+k:e):m>=e&&m<=e+k&&(p=m,d=n<l?b+g:b);q=mxUtils.intersection(d,p,f.x,f.y,c.x,c.y,q.x,q.y)}else{if(t){n=Math.atan2(k/4,g/2);if(p==n)return new mxPoint(b+g,e+Math.floor(0.25*k));if(p==s)return new mxPoint(b+Math.floor(0.5*g),e);if(p==r-n)return new mxPoint(b,e+Math.floor(0.25*k));if(p==-n)return new mxPoint(b+g,e+Math.floor(0.75*k));if(p==-s)return new mxPoint(b+Math.floor(0.5*g),e+k);if(p==-r+n)return new mxPoint(b,e+Math.floor(0.75*k));p<n&&p>-n?(c=new mxPoint(b+g,e),
+l;p=a;n>=b&&n<=b+g?(d=n,p=m<a?e+k:e):m>=e&&m<=e+k&&(p=m,d=n<l?b+g:b);q=mxUtils.intersection(d,p,f.x,f.y,c.x,c.y,q.x,q.y)}else{if(u){n=Math.atan2(k/4,g/2);if(p==n)return new mxPoint(b+g,e+Math.floor(0.25*k));if(p==s)return new mxPoint(b+Math.floor(0.5*g),e);if(p==r-n)return new mxPoint(b,e+Math.floor(0.25*k));if(p==-n)return new mxPoint(b+g,e+Math.floor(0.75*k));if(p==-s)return new mxPoint(b+Math.floor(0.5*g),e+k);if(p==-r+n)return new mxPoint(b,e+Math.floor(0.75*k));p<n&&p>-n?(c=new mxPoint(b+g,e),
q=new mxPoint(b+g,e+k)):p>n&&p<s?(c=new mxPoint(b,e-Math.floor(0.25*k)),q=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k))):p>s&&p<r-n?(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+g,e-Math.floor(0.25*k))):p>r-n&&p<=r||p<-r+n&&p>=-r?(c=new mxPoint(b,e),q=new mxPoint(b,e+k)):p<-n&&p>-s?(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b,e+Math.floor(1.25*k))):p<-s&&p>-r+n&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+g,e+
Math.floor(1.25*k)))}else{n=Math.atan2(k/2,g/4);if(p==n)return new mxPoint(b+Math.floor(0.75*g),e);if(p==r-n)return new mxPoint(b+Math.floor(0.25*g),e);if(p==r||p==-r)return new mxPoint(b,e+Math.floor(0.5*k));if(0==p)return new mxPoint(b+g,e+Math.floor(0.5*k));if(p==-n)return new mxPoint(b+Math.floor(0.75*g),e+k);if(p==-r+n)return new mxPoint(b+Math.floor(0.25*g),e+k);0<p&&p<n?(c=new mxPoint(b+Math.floor(0.5*g),e-Math.floor(0.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e+k)):p>n&&p<r-n?(c=new mxPoint(b,
e),q=new mxPoint(b+g,e)):p>r-n&&p<r?(c=new mxPoint(b-Math.floor(0.25*g),e+k),q=new mxPoint(b+Math.floor(0.5*g),e-Math.floor(0.5*k))):0>p&&p>-n?(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e)):p<-n&&p>-r+n?(c=new mxPoint(b,e+k),q=new mxPoint(b+g,e+k)):p<-r+n&&p>-r&&(c=new mxPoint(b-Math.floor(0.25*g),e),q=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)))}q=mxUtils.intersection(l,a,f.x,f.y,c.x,c.y,q.x,q.y)}return null==q?new mxPoint(l,a):q}};
@@ -1019,10 +1019,10 @@ mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode
mxPrintPreview.prototype.appendGraph=function(a,c,f,d,b,e){this.graph=a;this.scale=null!=c?c:1/a.pageScale;this.x0=f;this.y0=d;this.open(null,null,b,e)};
mxPrintPreview.prototype.open=function(a,c,f,d){var b=this.graph.cellRenderer.initializeOverlay,e=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(b,a){a.init(b.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(b,a,d,e){a.dialect=b.view.graph.dialect;a.init(b.view.getDrawPane())});this.wnd=null!=c?c:this.wnd;c=!1;null==this.wnd&&(c=!0,this.wnd=window.open());var g=this.wnd.document;if(c){var k=this.getDoctype();null!=k&&0<k.length&&
g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microsoft-com:vml" xmlns:o\x3d"urn:schemas-microsoft-com:office:office"\x3e'):("CSS1Compat"===document.compatMode&&g.writeln("\x3c!DOCTYPE html\x3e"),g.writeln("\x3chtml\x3e"));g.writeln("\x3chead\x3e");this.writeHead(g,a);g.writeln("\x3c/head\x3e");g.writeln('\x3cbody class\x3d"mxPage"\x3e')}var l=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),m=n/this.scale,p=this.graph.getView().getTranslate();this.autoOrigin||
-(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=m;l.height/=m;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*t;var u=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<q)){var b=this.createPageSelector(t,q);g.body.appendChild(b);
+(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=m;l.height/=m;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),u=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*u;var t=mxUtils.bind(this,function(){if(this.pageSelector&&(1<u||1<q)){var b=this.createPageSelector(u,q);g.body.appendChild(b);
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){b.style.position="absolute";var a=function(){b.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),v=mxUtils.bind(this,function(b,a){null!=this.borderColor&&(b.style.borderColor=this.borderColor,b.style.borderStyle="solid",b.style.borderWidth="1px");b.style.background=this.backgroundColor;
-if(f||a)b.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),g.body.appendChild(b));(f||a)&&this.addPageBreak(g)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var x=0;x<A.length;x++)v(A[x],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),x=0;x<t;x++){var C=x*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
-q;a++){if(null==this.wnd)return null;var z=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,B=x*q+a+1,F=new mxRectangle(z,C,r,s),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-z,-C,this.scale,B,b,F);this.printBackgroundImage&&this.insertBackgroundImage(b,-z,-C)}),B);e.setAttribute("id","mxPage-"+B);v(e,null!=y||x<t-1||a<q-1)}}if(null!=y)for(x=0;x<y.length;x++)v(y[x],x<y.length);c&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(G){null!=
+if(f||a)b.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),g.body.appendChild(b));(f||a)&&this.addPageBreak(g)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var x=0;x<z.length;x++)v(z[x],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),x=0;x<u;x++){var C=x*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
+q;a++){if(null==this.wnd)return null;var A=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,B=x*q+a+1,E=new mxRectangle(A,C,r,s),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-A,-C,this.scale,B,b,E);this.printBackgroundImage&&this.insertBackgroundImage(b,-A,-C)}),B);e.setAttribute("id","mxPage-"+B);v(e,null!=y||x<u-1||a<q-1)}}if(null!=y)for(x=0;x<y.length;x++)v(y[x],x<y.length);c&&!d&&(this.closeDocument(),t());this.wnd.focus()}catch(G){null!=
e&&null!=e.parentNode&&e.parentNode.removeChild(e)}finally{this.graph.cellRenderer.initializeOverlay=b}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var c=a.createElement("hr");c.className="mxPageBreak";a.body.appendChild(c)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,c){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=c&&a.writeln(c);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1033,7 +1033,7 @@ mxPrintPreview.prototype.renderPage=function(a,c,f,d,b,e){e=this.wnd.document;va
c-2*this.border+"px",l.style.overflow="hidden",mxClient.IS_IE&&(null==e.documentMode||5==e.documentMode||8==e.documentMode||7==e.documentMode)?(l.style.marginTop=this.border+"px",l.style.marginLeft=this.border+"px"):(l.style.top=this.border+"px",l.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(l.style.position="absolute"),g.appendChild(l),document.body.appendChild(g),k=l}catch(m){throw g.parentNode.removeChild(g),m;}b(k);return g};
mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
mxPrintPreview.prototype.addGraphFragment=function(a,c,f,d,b,e){var g=this.graph.getView();d=this.graph.container;this.graph.container=b;var k=g.getCanvas(),l=g.getBackgroundPane(),n=g.getDrawPane(),m=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var s=g.getTranslate();g.translate=new mxPoint(a,
-c);var q=this.graph.cellRenderer.redraw,t=g.states;a=g.scale;if(this.clipping){var u=new mxRectangle((e.x+s.x)*a,(e.y+s.y)*a,e.width*a/f,e.height*a/f);this.graph.cellRenderer.redraw=function(b,a,d){if(null!=b){var e=t.get(b.cell);if(null!=e&&(e=g.getBoundingBox(e,!1),null!=e&&!mxUtils.intersects(u,e)))return}q.apply(this,arguments)}}a=null;try{var v=[this.getRoot()];a=new mxTemporaryCellStates(g,f,v)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
+c);var q=this.graph.cellRenderer.redraw,u=g.states;a=g.scale;if(this.clipping){var t=new mxRectangle((e.x+s.x)*a,(e.y+s.y)*a,e.width*a/f,e.height*a/f);this.graph.cellRenderer.redraw=function(b,a,d){if(null!=b){var e=u.get(b.cell);if(null!=e&&(e=g.getBoundingBox(e,!1),null!=e&&!mxUtils.intersects(t,e)))return}q.apply(this,arguments)}}a=null;try{var v=[this.getRoot()];a=new mxTemporaryCellStates(g,f,v)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=e.width+"px",g.canvas.style.height=e.height+"px";else for(f=b.firstChild;null!=f;)v=f.nextSibling,c=f.nodeName.toLowerCase(),"svg"==c?(f.style.overflow="hidden",f.style.position="relative",f.style.top=this.marginTop+"px",f.setAttribute("width",e.width),f.setAttribute("height",e.height),f.style.width="",f.style.height=""):"default"!=f.style.cursor&&"div"!=c&&f.parentNode.removeChild(f),f=v;this.printBackgroundImage&&(b=b.getElementsByTagName("svg"),
0<b.length&&(b[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=q;g.canvas=k;g.backgroundPane=l;g.drawPane=n;g.overlayPane=m;g.translate=s;a.destroy();g.setEventsEnabled(p)}};
mxPrintPreview.prototype.insertBackgroundImage=function(a,c,f){var d=this.graph.backgroundImage;if(null!=d){var b=document.createElement("img");b.style.position="absolute";b.style.marginLeft=Math.round(c*this.scale)+"px";b.style.marginTop=Math.round(f*this.scale)+"px";b.setAttribute("width",Math.round(this.scale*d.width));b.setAttribute("height",Math.round(this.scale*d.height));b.src=d.src;a.insertBefore(b,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
@@ -1149,23 +1149,23 @@ c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&
a,d.y)&&!mxUtils.contains(c,a,d.y)&&b.push(new mxPoint(a,d.y)):(e=Math.max(c.y,f.y),c=Math.min(c.y+c.height,f.y+f.height),b.push(new mxPoint(a,e+(c-e)/2)))))},TopToBottom:function(a,c,f,d,b){var e=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=e.transformControlPoint(a,d));null!=k&&(c=new mxCellState,c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&(k=Math.max(c.y,f.y),g=Math.min(c.y+c.height,f.y+f.height),a=e.getRoutingCenterX(c),
null!=d&&d.x>=c.x&&d.x<=c.x+c.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),a=null!=d&&d.x>=f.x&&d.x<=f.x+f.width?d.x:e.getRoutingCenterX(f),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),1==b.length&&(null!=d&&1==b.length?!mxUtils.contains(f,d.x,k)&&!mxUtils.contains(c,d.x,k)&&b.push(new mxPoint(d.x,k)):(e=Math.max(c.x,f.x),c=Math.min(c.x+c.width,f.x+f.width),b.push(new mxPoint(e+(c-e)/
2,k)))))},SegmentConnector:function(a,c,f,d,b){function e(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)b.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<b.length?b[0]:null,n=!0,m=null,p=g[0];null==p&&null!=c?p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var m=[],s=0;s<d.length;s++){var q=a.view.transformControlPoint(a,d[s]);null!=
-q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var m=d[0],t=c,u=g[0],v=!1,A=!1,v=m;null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);for(s=0;2>s;s++){var x=null!=u&&u.x==v.x,y=null!=u&&u.y==v.y,C=null!=t&&v.y>=t.y&&
-v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=y||null==u&&C,A=x||null==u&&t;if(!(0==s&&(v&&A||x&&y))){if(null!=u&&!y&&!x&&(C||t)){n=C?!1:!0;break}if(A||v){n=v;1==s&&(n=0==d.length%2?v:A);break}}t=f;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];x&&y&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=c&&(m.y<c.y||m.y>c.y+c.height))?e(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=c&&(m.x<c.x||m.x>c.x+c.width))&&e(new mxPoint(m.x,
+q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var m=d[0],u=c,t=g[0],v=!1,z=!1,v=m;null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),u=null);for(s=0;2>s;s++){var x=null!=t&&t.x==v.x,y=null!=t&&t.y==v.y,C=null!=u&&v.y>=u.y&&
+v.y<=u.y+u.height,u=null!=u&&v.x>=u.x&&v.x<=u.x+u.width,v=y||null==t&&C,z=x||null==t&&u;if(!(0==s&&(v&&z||x&&y))){if(null!=t&&!y&&!x&&(C||u)){n=C?!1:!0;break}if(z||v){n=v;1==s&&(n=0==d.length%2?v:z);break}}u=f;t=g[r];null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),u=null);v=d[d.length-1];x&&y&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=c&&(m.y<c.y||m.y>c.y+c.height))?e(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=c&&(m.x<c.x||m.x>c.x+c.width))&&e(new mxPoint(m.x,
p.y));n?p.y=m.y:p.x=m.x;for(s=0;s<d.length;s++)n=!n,m=d[s],n?p.y=m.y:p.x=m.x,e(p.clone())}else m=p,n=!0;p=g[r];null==p&&null!=f&&(p=new mxPoint(a.view.getRoutingCenterX(f),a.view.getRoutingCenterY(f)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=m&&(n&&(null!=g[r]&&g[r].y!=m.y||null==g[r]&&null!=f&&(m.y<f.y||m.y>f.y+f.height))?e(new mxPoint(p.x,m.y)):!n&&(null!=g[r]&&g[r].x!=m.x||null==g[r]&&null!=f&&(m.x<f.x||m.x>f.x+f.width))&&e(new mxPoint(m.x,p.y))));if(null==g[0]&&null!=c)for(;1<
b.length&&null!=b[1]&&mxUtils.contains(c,b[1].x,b[1].y);)b.splice(1,1);if(null==g[r]&&null!=f)for(;1<b.length&&null!=b[b.length-1]&&mxUtils.contains(f,b[b.length-1].x,b[b.length-1].y);)b.splice(b.length-1,1);null!=q&&null!=b[b.length-1]&&(Math.abs(q.x-b[b.length-1].x)<k&&Math.abs(q.y-b[b.length-1].y)<k)&&(b.splice(b.length-1,1),null!=b[b.length-1]&&(Math.abs(b[b.length-1].x-q.x)<k&&(b[b.length-1].x=q.x),Math.abs(b[b.length-1].y-q.y)<k&&(b[b.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,
dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,
2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,
VERTEX_MASK:3072,getJettySize:function(a,c,f,d,b){c=mxUtils.getValue(a.style,b?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==c&&(mxUtils.getValue(a.style,b?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,b?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),c=Math.max(2,Math.ceil((a+
-mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(a,c,f,d,b){var e=a.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=a.absolutePoints,l=e[0],n=e[e.length-1],m=null!=c?c.x:l.x,p=null!=c?c.y:l.y,r=null!=c?c.width:0,s=null!=c?c.height:0,q=null!=f?f.x:n.x,t=null!=f?f.y:n.y,u=null!=f?f.width:0,v=null!=f?f.height:0,e=a.view.scale*mxEdgeStyle.getJettySize(a,c,f,d,!0),A=a.view.scale*
-mxEdgeStyle.getJettySize(a,c,f,d,!1);null!=c&&f==c&&(e=A=Math.max(e,A));var x=A+e,y=!1;if(null!=l&&null!=n)var y=n.x-l.x,C=n.y-l.y,y=y*y+C*C<x*x;if(y||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];y=0;null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(m,
-p,r,s),y),m=y.x,p=y.y,r=y.width,s=y.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(q,t,u,v),y),q=y.x,t=y.y,u=y.width,v=y.height));m=Math.round(10*m)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;a=[0,0];m=[[m,p,r,s],[q,t,u,v]];A=[e,A];for(y=0;2>
-y;y++)mxEdgeStyle.limits[y][1]=m[y][0]-A[y],mxEdgeStyle.limits[y][2]=m[y][1]-A[y],mxEdgeStyle.limits[y][4]=m[y][0]+m[y][2]+A[y],mxEdgeStyle.limits[y][8]=m[y][1]+m[y][3]+A[y];A=m[0][1]+m[0][3]/2;p=m[1][1]+m[1][3]/2;y=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);C=A-p;A=0;0>y?A=0>C?2:1:0>=C&&(A=3,0==y&&(A=2));p=null;null!=c&&(p=l);c=[[0.5,0.5],[0.5,0.5]];for(y=0;2>y;y++)null!=p&&(c[y][0]=(p.x-m[y][0])/m[y][2],1>=Math.abs(p.x-m[y][0])?a[y]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-m[y][0]-m[y][2])&&(a[y]=
+mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(a,c,f,d,b){var e=a.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=a.absolutePoints,l=e[0],n=e[e.length-1],m=null!=c?c.x:l.x,p=null!=c?c.y:l.y,r=null!=c?c.width:0,s=null!=c?c.height:0,q=null!=f?f.x:n.x,u=null!=f?f.y:n.y,t=null!=f?f.width:0,v=null!=f?f.height:0,e=a.view.scale*mxEdgeStyle.getJettySize(a,c,f,d,!0),z=a.view.scale*
+mxEdgeStyle.getJettySize(a,c,f,d,!1);null!=c&&f==c&&(e=z=Math.max(e,z));var x=z+e,y=!1;if(null!=l&&null!=n)var y=n.x-l.x,C=n.y-l.y,y=y*y+C*C<x*x;if(y||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];y=0;null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(m,
+p,r,s),y),m=y.x,p=y.y,r=y.width,s=y.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(q,u,t,v),y),q=y.x,u=y.y,t=y.width,v=y.height));m=Math.round(10*m)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;u=Math.round(10*u)/10;t=Math.round(10*t)/10;v=Math.round(10*v)/10;a=[0,0];m=[[m,p,r,s],[q,u,t,v]];z=[e,z];for(y=0;2>
+y;y++)mxEdgeStyle.limits[y][1]=m[y][0]-z[y],mxEdgeStyle.limits[y][2]=m[y][1]-z[y],mxEdgeStyle.limits[y][4]=m[y][0]+m[y][2]+z[y],mxEdgeStyle.limits[y][8]=m[y][1]+m[y][3]+z[y];z=m[0][1]+m[0][3]/2;p=m[1][1]+m[1][3]/2;y=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);C=z-p;z=0;0>y?z=0>C?2:1:0>=C&&(z=3,0==y&&(z=2));p=null;null!=c&&(p=l);c=[[0.5,0.5],[0.5,0.5]];for(y=0;2>y;y++)null!=p&&(c[y][0]=(p.x-m[y][0])/m[y][2],1>=Math.abs(p.x-m[y][0])?a[y]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-m[y][0]-m[y][2])&&(a[y]=
mxConstants.DIRECTION_MASK_EAST),c[y][1]=(p.y-m[y][1])/m[y][3],1>=Math.abs(p.y-m[y][1])?a[y]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-m[y][1]-m[y][3])&&(a[y]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=n);y=m[0][1]-(m[1][1]+m[1][3]);n=m[0][0]-(m[1][0]+m[1][2]);p=m[1][1]-(m[0][1]+m[0][3]);r=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(n-x,0);mxEdgeStyle.vertexSeperations[2]=Math.max(y-x,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-x,0);mxEdgeStyle.vertexSeperations[3]=
Math.max(r-x,0);x=[];f=[];l=[];f[0]=n>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=y>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);n=n>=r?n:r;p=y>=p?y:p;r=[[0,0],[0,0]];s=!1;for(y=0;2>y;y++)0==a[y]&&(0==(f[y]&d[y])&&(f[y]=mxUtils.reversePortConstraints(f[y])),0==(l[y]&d[y])&&(l[y]=mxUtils.reversePortConstraints(l[y])),r[y][0]=l[y],r[y][1]=f[y]);0<p&&0<n&&(0<(f[0]&d[0])&&
0<(l[1]&d[1])?(r[0][0]=f[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=f[1],s=!0):0<(l[0]&d[0])&&0<(f[1]&d[1])&&(r[0][0]=l[0],r[0][1]=f[0],r[1][0]=f[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=f[0],r[1][0]=l[1],r[1][1]=f[1],s=!0);0<n&&!s&&(r[0][0]=f[0],r[0][1]=l[0],r[1][0]=f[1],r[1][1]=l[1]);for(y=0;2>y;y++)if(0==a[y]&&(0==(r[y][0]&d[y])&&(r[y][0]=r[y][1]),x[y]=r[y][0]&d[y],x[y]|=(r[y][1]&d[y])<<8,x[y]|=(r[1-y][y]&d[y])<<16,x[y]|=(r[1-y][1-y]&d[y])<<24,0==(x[y]&15)&&(x[y]<<=8),0==(x[y]&3840)&&(x[y]=
-x[y]&15|x[y]>>8),0==(x[y]&983040)&&(x[y]=x[y]&65535|(x[y]&251658240)>>8),a[y]=x[y]&15,d[y]==mxConstants.DIRECTION_MASK_WEST||d[y]==mxConstants.DIRECTION_MASK_NORTH||d[y]==mxConstants.DIRECTION_MASK_EAST||d[y]==mxConstants.DIRECTION_MASK_SOUTH))a[y]=d[y];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];x=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=A;x-=A;1>d&&(d+=4);1>x&&(x+=4);d=mxEdgeStyle.routePatterns[d-1][x-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+x[y]&15|x[y]>>8),0==(x[y]&983040)&&(x[y]=x[y]&65535|(x[y]&251658240)>>8),a[y]=x[y]&15,d[y]==mxConstants.DIRECTION_MASK_WEST||d[y]==mxConstants.DIRECTION_MASK_NORTH||d[y]==mxConstants.DIRECTION_MASK_EAST||d[y]==mxConstants.DIRECTION_MASK_SOUTH))a[y]=d[y];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];x=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=z;x-=z;1>d&&(d+=4);1>x&&(x+=4);d=mxEdgeStyle.routePatterns[d-1][x-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+e;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=e}e=0;f=x=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(y=0;y<d.length;y++)l=d[y]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=A,4<q&&(q-=4),n=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=x&&(e++,mxEdgeStyle.wayPoints1[e][0]=mxEdgeStyle.wayPoints1[e-1][0],mxEdgeStyle.wayPoints1[e][1]=mxEdgeStyle.wayPoints1[e-1][1]),t=0<(d[y]&mxEdgeStyle.TARGET_MASK),s=0<(d[y]&mxEdgeStyle.SOURCE_MASK),p=(d[y]&mxEdgeStyle.SIDE_MASK)>>5,p<<=A,15<p&&(p>>=4),r=0<(d[y]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?m[s][0]+c[s][0]*m[s][2]:r?m[s][1]+c[s][1]*
+0:1;for(y=0;y<d.length;y++)l=d[y]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=z,4<q&&(q-=4),n=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=x&&(e++,mxEdgeStyle.wayPoints1[e][0]=mxEdgeStyle.wayPoints1[e-1][0],mxEdgeStyle.wayPoints1[e][1]=mxEdgeStyle.wayPoints1[e-1][1]),u=0<(d[y]&mxEdgeStyle.TARGET_MASK),s=0<(d[y]&mxEdgeStyle.SOURCE_MASK),p=(d[y]&mxEdgeStyle.SIDE_MASK)>>5,p<<=z,15<p&&(p>>=4),r=0<(d[y]&mxEdgeStyle.CENTER_MASK),(s||u)&&9>p?(s=s?0:1,q=r&&0==l?m[s][0]+c[s][0]*m[s][2]:r?m[s][1]+c[s][1]*
m[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[e][0])*n[0],0<p&&(mxEdgeStyle.wayPoints1[e][0]+=n[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[e][1])*n[1],0<p&&(mxEdgeStyle.wayPoints1[e][1]+=n[1]*p))):r&&(mxEdgeStyle.wayPoints1[e][0]+=n[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[e][1]+=n[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<e&&mxEdgeStyle.wayPoints1[e][l]==mxEdgeStyle.wayPoints1[e-1][l]?e--:x=l;for(y=0;y<=e&&!(y==e&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
mxConstants.DIRECTION_MASK_WEST))?0:1)==f?0:1)!=(e+1)%2);y++)b.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[y][0]),Math.round(mxEdgeStyle.wayPoints1[y][1])));for(a=1;a<b.length;)null==b[a-1]||null==b[a]||b[a-1].x!=b[a].x||b[a-1].y!=b[a].y?a++:b.splice(a,1)}},getRoutePattern:function(a,c,f,d){var b=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];b-=c;a-=c;1>b&&(b+=4);1>a&&(a+=4);c=routePatterns[b-1][a-1];if(0==f||0==d)null!=inlineRoutePatterns[b-1][a-
1]&&(c=inlineRoutePatterns[b-1][a-1]);return c}},mxStyleRegistry={values:[],putValue:function(a,c){mxStyleRegistry.values[a]=c},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var c in mxStyleRegistry.values)if(mxStyleRegistry.values[c]==a)return c;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
@@ -1318,7 +1318,7 @@ m=this.view.getState(this.model.getParent(a[e]));if(null!=n&&null!=m)if(f=m.orig
l.length;n++)l[n].x+=f,l[n].y+=m}else l.translate(f,m)}}else d=[]}return d};mxGraph.prototype.insertVertex=function(a,c,f,d,b,e,g,k,l){c=this.createVertex(a,c,f,d,b,e,g,k,l);return this.addCell(c,a)};mxGraph.prototype.createVertex=function(a,c,f,d,b,e,g,k,l){a=new mxGeometry(d,b,e,g);a.relative=null!=l?l:!1;f=new mxCell(f,a,k);f.setId(c);f.setVertex(!0);f.setConnectable(!0);return f};mxGraph.prototype.insertEdge=function(a,c,f,d,b,e){c=this.createEdge(a,c,f,d,b,e);return this.addEdge(c,a,d,b)};
mxGraph.prototype.createEdge=function(a,c,f,d,b,e){a=new mxCell(f,new mxGeometry,e);a.setId(c);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,c,f,d,b){return this.addCell(a,c,b,f,d)};mxGraph.prototype.addCell=function(a,c,f,d,b){return this.addCells([a],c,f,d,b)[0]};
mxGraph.prototype.addCells=function(a,c,f,d,b){null==c&&(c=this.getDefaultParent());null==f&&(f=this.model.getChildCount(c));this.model.beginUpdate();try{this.cellsAdded(a,c,f,d,b,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",c,"index",f,"source",d,"target",b))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.cellsAdded=function(a,c,f,d,b,e,g){if(null!=a&&null!=c&&null!=f){this.model.beginUpdate();try{for(var k=e?this.view.getState(c):null,l=null!=k?k.origin:null,n=new mxPoint(0,0),k=0;k<a.length;k++)if(null==a[k])f--;else{var m=this.model.getParent(a[k]);if(null!=l&&a[k]!=c&&c!=m){var p=this.view.getState(m),r=null!=p?p.origin:n,s=this.model.getGeometry(a[k]);if(null!=s){var q=r.x-l.x,t=r.y-l.y,s=s.clone();s.translate(q,t);!s.relative&&this.model.isVertex(a[k])&&!this.isAllowNegativeCoordinates()&&
+mxGraph.prototype.cellsAdded=function(a,c,f,d,b,e,g){if(null!=a&&null!=c&&null!=f){this.model.beginUpdate();try{for(var k=e?this.view.getState(c):null,l=null!=k?k.origin:null,n=new mxPoint(0,0),k=0;k<a.length;k++)if(null==a[k])f--;else{var m=this.model.getParent(a[k]);if(null!=l&&a[k]!=c&&c!=m){var p=this.view.getState(m),r=null!=p?p.origin:n,s=this.model.getGeometry(a[k]);if(null!=s){var q=r.x-l.x,u=r.y-l.y,s=s.clone();s.translate(q,u);!s.relative&&this.model.isVertex(a[k])&&!this.isAllowNegativeCoordinates()&&
(s.x=Math.max(0,s.x),s.y=Math.max(0,s.y));this.model.setGeometry(a[k],s)}}c==m&&f+k>this.model.getChildCount(c)&&f--;this.model.add(c,a[k],f+k);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[k],!0);this.isExtendParentsOnAdd(a[k])&&this.isExtendParent(a[k])&&this.extendParent(a[k]);(null==g||g)&&this.constrainChild(a[k]);null!=d&&this.cellConnected(a[k],d,!0);null!=b&&this.cellConnected(a[k],b,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",c,"index",f,"source",d,"target",
b,"absolute",e))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,c){if(null!=c?c:1)for(var f=this.model.getChildCount(a),d=0;d<f;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
mxGraph.prototype.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",c))}finally{this.model.endUpdate()}return a};
@@ -1637,8 +1637,8 @@ mxConnectionHandler.prototype.drawPreview=function(){this.updatePreview(null==th
mxConnectionHandler.prototype.connect=function(a,c,f,d){if(null!=c||this.isCreateTarget(f)||this.graph.allowDanglingEdges){var b=this.graph.getModel(),e=!1,g=null;b.beginUpdate();try{if(null!=a&&null==c&&(!this.graph.isIgnoreTerminalEvent(f)&&this.isCreateTarget(f))&&(c=this.createTargetVertex(f,a),null!=c)){d=this.graph.getDropTarget([c],f,d);e=!0;if(null==d||!this.graph.getModel().isEdge(d)){var k=this.graph.getView().getState(d);if(null!=k){var l=b.getGeometry(c);l.x-=k.origin.x;l.y-=k.origin.y}}else d=
this.graph.getDefaultParent();this.graph.addCell(c,d)}var n=this.graph.getDefaultParent();null!=a&&null!=c&&(b.getParent(a)==b.getParent(c)&&b.getParent(b.getParent(a))!=b.getRoot())&&(n=b.getParent(a),null!=a.geometry&&a.geometry.relative&&null!=c.geometry&&c.geometry.relative&&(n=b.getParent(n)));var m=k=null;null!=this.edgeState&&(k=this.edgeState.cell.value,m=this.edgeState.cell.style);g=this.insertEdge(n,null,k,a,c,m);if(null!=g){this.graph.setConnectionConstraint(g,a,!0,this.sourceConstraint);
this.graph.setConnectionConstraint(g,c,!1,this.constraintHandler.currentConstraint);null!=this.edgeState&&b.setGeometry(g,this.edgeState.cell.geometry);b.getParent(a);if(this.isInsertBefore(g,a,c,f,d)){n=null;for(l=a;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=g.parent;)l=this.graph.model.getParent(l);null!=l&&null!=l.parent&&l.parent==g.parent&&(n=l.parent.getIndex(l),l.parent.insert(g,n))}var p=b.getGeometry(g);null==p&&(p=new mxGeometry,p.relative=!0,b.setGeometry(g,p));if(null!=
-this.waypoints&&0<this.waypoints.length){var r=this.graph.view.scale,s=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];p.points.push(new mxPoint(q.x/r-s.x,q.y/r-s.y))}}if(null==c){var t=this.graph.view.translate,r=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/r-t.x,this.originalPoint.y/r-t.y):new mxPoint(this.currentPoint.x/r-t.x,this.currentPoint.y/r-t.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
-this.graph.view.scale;p.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",c,"event",f,"target",d,"terminalInserted",e))}}catch(u){mxLog.show(),mxLog.debug(u.message)}finally{b.endUpdate()}this.select&&this.selectCells(g,e?c:null)}};mxConnectionHandler.prototype.selectCells=function(a,c){this.graph.setSelectionCell(a)};
+this.waypoints&&0<this.waypoints.length){var r=this.graph.view.scale,s=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];p.points.push(new mxPoint(q.x/r-s.x,q.y/r-s.y))}}if(null==c){var u=this.graph.view.translate,r=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/r-u.x,this.originalPoint.y/r-u.y):new mxPoint(this.currentPoint.x/r-u.x,this.currentPoint.y/r-u.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
+this.graph.view.scale;p.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",c,"event",f,"target",d,"terminalInserted",e))}}catch(t){mxLog.show(),mxLog.debug(t.message)}finally{b.endUpdate()}this.select&&this.selectCells(g,e?c:null)}};mxConnectionHandler.prototype.selectCells=function(a,c){this.graph.setSelectionCell(a)};
mxConnectionHandler.prototype.insertEdge=function(a,c,f,d,b,e){if(null==this.factoryMethod)return this.graph.insertEdge(a,c,f,d,b,e);c=this.createEdge(f,d,b,e);return this.graph.addEdge(c,a,d,b)};
mxConnectionHandler.prototype.createTargetVertex=function(a,c){for(var f=this.graph.getCellGeometry(c);null!=f&&f.relative;)c=this.graph.getModel().getParent(c),f=this.graph.getCellGeometry(c);var d=this.graph.cloneCells([c])[0],f=this.graph.getModel().getGeometry(d);if(null!=f){var b=this.graph.view.translate,e=this.graph.view.scale,g=new mxPoint(this.currentPoint.x/e-b.x,this.currentPoint.y/e-b.y);f.x=Math.round(g.x-f.width/2-this.graph.panDx/e);f.y=Math.round(g.y-f.height/2-this.graph.panDy/e);
g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(c);if(null!=k){var l=k.x/e-b.x,b=k.y/e-b.y;Math.abs(l-f.x)<=g&&(f.x=Math.round(l));Math.abs(b-f.y)<=g&&(f.y=Math.round(b))}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(a){return this.graph.isGridEnabled()?this.graph.gridSize/2:this.graph.tolerance};
@@ -1726,8 +1726,8 @@ mxVertexHandler.prototype.reset=function(){null!=this.sizers&&null!=this.index&&
this.customHandles.length;a++)this.customHandles[a].reset();null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());this.removeHint();this.redrawHandles();this.unscaledBounds=this.edgeHandlers=null};
mxVertexHandler.prototype.resizeCell=function(a,c,f,d,b,e,g){b=this.graph.model.getGeometry(a);null!=b&&(d==mxEvent.LABEL_HANDLE?(f=this.graph.view.scale,c=Math.round((this.labelShape.bounds.getCenterX()-this.startX)/f),f=Math.round((this.labelShape.bounds.getCenterY()-this.startY)/f),b=b.clone(),null==b.offset?b.offset=new mxPoint(c,f):(b.offset.x+=c,b.offset.y+=f),this.graph.model.setGeometry(a,b)):null!=this.unscaledBounds&&(f=this.graph.view.scale,(0!=this.childOffsetX||0!=this.childOffsetY)&&
this.moveChildren(a,Math.round(this.childOffsetX/f),Math.round(this.childOffsetY/f)),this.graph.resizeCell(a,this.unscaledBounds,g)))};mxVertexHandler.prototype.moveChildren=function(a,c,f){for(var d=this.graph.getModel(),b=d.getChildCount(a),e=0;e<b;e++){var g=d.getChildAt(a,e),k=this.graph.getCellGeometry(g);null!=k&&(k=k.clone(),k.translate(c,f),d.setGeometry(g,k))}};
-mxVertexHandler.prototype.union=function(a,c,f,d,b,e,g,k,l){if(this.singleSizer)return d=a.x+a.width+c,g=a.y+a.height+f,b&&(d=this.graph.snap(d/e)*e,g=this.graph.snap(g/e)*e),e=new mxRectangle(a.x,a.y,0,0),e.add(new mxRectangle(d,g,0,0)),e;var n=a.width,m=a.height,p=a.x-g.x*e,r=p+n;a=a.y-g.y*e;var s=a+m,q=p+n/2,t=a+m/2;4<d?(s+=f,b&&(s=this.graph.snap(s/e)*e)):3>d&&(a+=f,b&&(a=this.graph.snap(a/e)*e));if(0==d||3==d||5==d)p+=c,b&&(p=this.graph.snap(p/e)*e);else if(2==d||4==d||7==d)r+=c,b&&(r=this.graph.snap(r/
-e)*e);b=r-p;f=s-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?b=f*k:f=b/k,0==d&&(p=r-b,a=s-f)));l&&(b+=b-n,f+=f-m,p+=q-(p+b/2),a+=t-(a+f/2));0>b&&(p+=b,b=Math.abs(b));0>f&&(a+=f,f=Math.abs(f));d=new mxRectangle(p+g.x*e,a+g.y*e,b,f);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*e+this.minBounds.width*e+Math.max(0,this.x0*e-d.x)),d.height=Math.max(d.height,this.minBounds.y*e+this.minBounds.height*e+Math.max(0,this.y0*e-d.y)));
+mxVertexHandler.prototype.union=function(a,c,f,d,b,e,g,k,l){if(this.singleSizer)return d=a.x+a.width+c,g=a.y+a.height+f,b&&(d=this.graph.snap(d/e)*e,g=this.graph.snap(g/e)*e),e=new mxRectangle(a.x,a.y,0,0),e.add(new mxRectangle(d,g,0,0)),e;var n=a.width,m=a.height,p=a.x-g.x*e,r=p+n;a=a.y-g.y*e;var s=a+m,q=p+n/2,u=a+m/2;4<d?(s+=f,b&&(s=this.graph.snap(s/e)*e)):3>d&&(a+=f,b&&(a=this.graph.snap(a/e)*e));if(0==d||3==d||5==d)p+=c,b&&(p=this.graph.snap(p/e)*e);else if(2==d||4==d||7==d)r+=c,b&&(r=this.graph.snap(r/
+e)*e);b=r-p;f=s-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?b=f*k:f=b/k,0==d&&(p=r-b,a=s-f)));l&&(b+=b-n,f+=f-m,p+=q-(p+b/2),a+=u-(a+f/2));0>b&&(p+=b,b=Math.abs(b));0>f&&(a+=f,f=Math.abs(f));d=new mxRectangle(p+g.x*e,a+g.y*e,b,f);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*e+this.minBounds.width*e+Math.max(0,this.x0*e-d.x)),d.height=Math.max(d.height,this.minBounds.y*e+this.minBounds.height*e+Math.max(0,this.y0*e-d.y)));
return d};mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;if(null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]&&(this.bounds.width<2*this.sizers[0].bounds.width+2*c||this.bounds.height<2*this.sizers[0].bounds.height+2*c))c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c;return a};
mxVertexHandler.prototype.redrawHandles=function(){var a=this.tolerance;this.verticalOffset=this.horizontalOffset=0;var c=this.bounds;if(null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]){if(null==this.index&&this.manageSizers&&8<=this.sizers.length){var f=this.getHandlePadding();this.horizontalOffset=f.x;this.verticalOffset=f.y;if(0!=this.horizontalOffset||0!=this.verticalOffset)c=new mxRectangle(c.x,c.y,c.width,c.height),c.x-=this.horizontalOffset/2,c.width+=this.horizontalOffset,c.y-=
@@ -1970,8 +1970,8 @@ g={});for(e=f.firstChild;null!=e;){if(e.nodeType==mxConstants.NODETYPE_ELEMENT){
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,f){return null};a.decode=function(a,f,d){if(null!=d)for(f=f.firstChild;null!=f;){if(!this.processInclude(a,f,d)&&"add"==f.nodeName){var b=f.getAttribute("as"),e=f.getAttribute("action"),g=f.getAttribute("control");d.bindAction(b,e,g)}f=f.nextSibling}return d};return a}());
var mxDefaultToolbarCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,f){return null};a.decode=function(a,f,d){if(null!=d){var b=d.editor;for(f=f.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,f,d))if("separator"==f.nodeName)d.addSeparator();else if("br"==f.nodeName)d.toolbar.addBreak();else if("hr"==f.nodeName)d.toolbar.addLine();else if("add"==f.nodeName){var e=f.getAttribute("as"),e=mxResources.get(e)||
e,g=f.getAttribute("icon"),k=f.getAttribute("pressedIcon"),l=f.getAttribute("action"),n=f.getAttribute("mode"),m=f.getAttribute("template"),p="0"!=f.getAttribute("toggle"),r=mxUtils.getTextContent(f),s=null;if(null!=l)s=d.addItem(e,g,l,k);else if(null!=n)var q=mxDefaultToolbarCodec.allowEval?mxUtils.eval(r):null,s=d.addMode(e,g,n,k,q);else if(null!=m||null!=r&&0<r.length)s=b.templates[m],m=f.getAttribute("style"),null!=s&&null!=m&&(s=b.graph.cloneCells([s])[0],s.setStyle(m)),m=null,null!=r&&0<r.length&&
-mxDefaultToolbarCodec.allowEval&&(m=mxUtils.eval(r)),s=d.addPrototype(e,g,s,k,m,p);else if(k=mxUtils.getChildNodes(f),0<k.length)if(null==g){m=d.addActionCombo(e);for(e=0;e<k.length;e++)p=k[e],"separator"==p.nodeName?d.addOption(m,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(m,g,p))}else{var t=null,u=d.addPrototype(e,g,function(){var a=b.templates[t.value];if(null!=a){var a=a.clone(),d=t.options[t.selectedIndex].cellStyle;null!=d&&a.setStyle(d);return a}mxLog.warn("Template "+
-a+" not found");return null},null,null,p),t=d.addCombo();mxEvent.addListener(t,"change",function(){d.toolbar.selectMode(u,function(a){a=mxUtils.convertPoint(b.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return b.addVertex(null,q(),a.x,a.y)});d.toolbar.noReset=!1});for(e=0;e<k.length;e++)p=k[e],"separator"==p.nodeName?d.addOption(t,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),r=p.getAttribute("template"),d.addOption(t,g,r||m).cellStyle=p.getAttribute("style"))}null!=s&&(m=f.getAttribute("id"),
+mxDefaultToolbarCodec.allowEval&&(m=mxUtils.eval(r)),s=d.addPrototype(e,g,s,k,m,p);else if(k=mxUtils.getChildNodes(f),0<k.length)if(null==g){m=d.addActionCombo(e);for(e=0;e<k.length;e++)p=k[e],"separator"==p.nodeName?d.addOption(m,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(m,g,p))}else{var u=null,t=d.addPrototype(e,g,function(){var a=b.templates[u.value];if(null!=a){var a=a.clone(),d=u.options[u.selectedIndex].cellStyle;null!=d&&a.setStyle(d);return a}mxLog.warn("Template "+
+a+" not found");return null},null,null,p),u=d.addCombo();mxEvent.addListener(u,"change",function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(b.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return b.addVertex(null,q(),a.x,a.y)});d.toolbar.noReset=!1});for(e=0;e<k.length;e++)p=k[e],"separator"==p.nodeName?d.addOption(u,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),r=p.getAttribute("template"),d.addOption(u,g,r||m).cellStyle=p.getAttribute("style"))}null!=s&&(m=f.getAttribute("id"),
null!=m&&0<m.length&&s.setAttribute("id",m))}f=f.nextSibling}}return d};return a}());mxDefaultToolbarCodec.allowEval=!0;mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,f){return null};a.decode=function(a,f,d){var b=f.getElementsByTagName("include")[0];null!=b?this.processInclude(a,b,d):null!=d&&(d.config=f);return d};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,f,d){a=f.getAttribute("defaultEdge");null!=a&&(f.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=f.getAttribute("defaultGroup");null!=a&&(f.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,f,d){if("Array"==f.nodeName){if("templates"==f.getAttribute("as")){this.decodeTemplates(a,
f,d);return}}else if("ui"==f.nodeName){this.decodeUi(a,f,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,f,d){for(a=f.firstChild;null!=a;){if("add"==a.nodeName){f=a.getAttribute("as");var b=a.getAttribute("element"),e=a.getAttribute("style"),g=null;if(null!=b)g=document.getElementById(b),null!=g&&null!=e&&(g.style.cssText+=";"+e);else{var b=parseInt(a.getAttribute("x")),k=parseInt(a.getAttribute("y")),l=a.getAttribute("width"),n=a.getAttribute("height"),
@@ -2018,8 +2018,8 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(b.container.className="geDiagramContainer",d.style.backgroundPosition=c,d.style.backgroundColor=a,d.style.backgroundImage=e)};mxGraphView.prototype.createSvgGrid=function(b){for(var a=this.graph.gridSize*this.scale;a<this.minGridSize;)a*=2;for(var d=this.gridSteps*a,e=[],c=1;c<this.gridSteps;c++){var f=c*a;e.push("M 0 "+f+" L "+d+" "+f+" M "+f+" 0 L "+f+" "+d)}return'\x3csvg width\x3d"'+d+'" height\x3d"'+
d+'" xmlns\x3d"'+mxConstants.NS_SVG+'"\x3e\x3cdefs\x3e\x3cpattern id\x3d"grid" width\x3d"'+d+'" height\x3d"'+d+'" patternUnits\x3d"userSpaceOnUse"\x3e\x3cpath d\x3d"'+e.join(" ")+'" fill\x3d"none" stroke\x3d"'+b+'" opacity\x3d"0.2" stroke-width\x3d"1"/\x3e\x3cpath d\x3d"M '+d+" 0 L 0 0 0 "+d+'" fill\x3d"none" stroke\x3d"'+b+'" stroke-width\x3d"1"/\x3e\x3c/pattern\x3e\x3c/defs\x3e\x3crect width\x3d"100%" height\x3d"100%" fill\x3d"url(#grid)"/\x3e\x3c/svg\x3e'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=
function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(b,a,d){var e=this.view.scale,c=this.view.translate,f=this.pageFormat,g=e*this.pageScale,
-q=this.view.getBackgroundPageBounds();a=q.width;d=q.height;var t=new mxRectangle(e*c.x,e*c.y,f.width*g,f.height*g),u=(b=b&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(d/t.height)-1:0,v=b?Math.ceil(a/t.width)-1:0,A=q.x+a,x=q.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var a=b==this.horizontalPageBreaks?u:v,d=0;d<=a;d++){var e=b==this.horizontalPageBreaks?
-[new mxPoint(Math.round(q.x),Math.round(q.y+(d+1)*t.height)),new mxPoint(Math.round(A),Math.round(q.y+(d+1)*t.height))]:[new mxPoint(Math.round(q.x+(d+1)*t.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(d+1)*t.width),Math.round(x))];null!=b[d]?(b[d].points=e,b[d].redraw()):(e=new mxPolyline(e,this.pageBreakColor),e.dialect=this.dialect,e.isDashed=this.pageBreakDashed,e.pointerEvents=!1,e.init(this.view.backgroundPane),e.redraw(),b[d]=e)}for(d=a;d<b.length;d++)b[d].destroy();b.splice(a,b.length-
+q=this.view.getBackgroundPageBounds();a=q.width;d=q.height;var u=new mxRectangle(e*c.x,e*c.y,f.width*g,f.height*g),t=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(d/u.height)-1:0,v=b?Math.ceil(a/u.width)-1:0,z=q.x+a,x=q.y+d;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var a=b==this.horizontalPageBreaks?t:v,d=0;d<=a;d++){var e=b==this.horizontalPageBreaks?
+[new mxPoint(Math.round(q.x),Math.round(q.y+(d+1)*u.height)),new mxPoint(Math.round(z),Math.round(q.y+(d+1)*u.height))]:[new mxPoint(Math.round(q.x+(d+1)*u.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(d+1)*u.width),Math.round(x))];null!=b[d]?(b[d].points=e,b[d].redraw()):(e=new mxPolyline(e,this.pageBreakColor),e.dialect=this.dialect,e.isDashed=this.pageBreakDashed,e.pointerEvents=!1,e.init(this.view.backgroundPane),e.redraw(),b[d]=e)}for(d=a;d<b.length;d++)b[d].destroy();b.splice(a,b.length-
a)}});b(this.horizontalPageBreaks);b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,a,d){for(var e=0;e<a.length;e++)if(this.graph.getModel().isVertex(a[e])){var f=this.graph.getCellGeometry(a[e]);if(null!=f&&f.relative)return!1}return c.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=f.apply(this,arguments);b.intersects=
mxUtils.bind(this,function(a,d){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),a=0<b.width?b.x/this.scale-this.translate.x:0,d=0<b.height?b.y/this.scale-this.translate.y:0,e=b.width/this.scale,c=b.height/this.scale,f=this.graph.pageFormat,g=this.graph.pageScale,
b=f.width*g,f=f.height*g,g=Math.floor(Math.min(0,a)/b),q=Math.floor(Math.min(0,d)/f),a=Math.ceil(Math.max(1,a+e)/b),d=Math.ceil(Math.max(1,d+c)/f);return new mxRectangle(this.scale*(this.translate.x+g*b),this.scale*(this.translate.y+q*f),this.scale*(a-g)*b,this.scale*(d-q)*f)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,a){d.apply(this,arguments);if(this.dialect!=mxConstants.DIALECT_SVG&&null!=this.view.backgroundPageShape&&(!this.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.container)))this.view.backgroundPageShape.node.style.marginLeft=
@@ -2036,14 +2036,14 @@ function(a,d){return b||e.apply(this,arguments)};this.keydownHandler=mxUtils.bin
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(" "),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],n=l.indexOf("\x3d");
+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 u=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(b,a){u.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 t=d.fireMouseEvent;d.fireMouseEvent=function(b,a,d){b==mxEvent.MOUSE_DOWN&&this.container.focus();t.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 x=["fontFamily","fontSize","fontColor"],y="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
-C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)v.push(C[a][c]);for(a=0;a<A.length;a++)v.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),n=null!=l?l.split(";"):[],m=v.slice(),f=0;f<n.length;f++){var p=n[f],u=p.indexOf("\x3d");if(0<=u){var t=p.substring(0,u),q=mxUtils.indexOf(m,t);0<=q&&m.splice(q,1);for(var s=0;s<C.length;s++){var r=C[s];if(0<=mxUtils.indexOf(r,t))for(var y=0;y<r.length;y++){var x=mxUtils.indexOf(m,r[y]);0<=x&&m.splice(x,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var t=m[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(x,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,e[g]))f||0<=mxUtils.indexOf(y,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]]:
+C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)v.push(C[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 p=n[f],t=p.indexOf("\x3d");if(0<=t){var u=p.substring(0,t),q=mxUtils.indexOf(m,u);0<=q&&m.splice(q,1);for(var s=0;s<C.length;s++){var r=C[s];if(0<=mxUtils.indexOf(r,u))for(var y=0;y<r.length;y++){var x=mxUtils.indexOf(m,r[y]);0<=x&&m.splice(x,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var u=m[f],A=c[u];if(null!=
+A&&("shape"!=u||e))(!e||0>mxUtils.indexOf(z,u))&&d.setCellStyles(u,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(x,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(z,e[g]))f||0<=mxUtils.indexOf(y,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(y,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&&
@@ -2075,12 +2075,12 @@ function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor
function(b){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),c(!1)):c(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit")||"Fit");var m=null,p=null,r=mxUtils.bind(this,function(b){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";
p=null}),600)}),b||200)}),s=mxUtils.bind(this,function(b){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=d(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var d=q.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),t=a.getModel();t.addListener(mxEvent.CHANGE,function(){q.style.display=1<t.getChildCount(t.root)?
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){q.style.display=1<u.getChildCount(u.root)?
"":"none"})}null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(b){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("openInNewWindow")||"Open in New Window");a.lightbox&&this.container!=document.body&&d(mxUtils.bind(this,function(b){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeLargeImage,(mxResources.get("close")||
"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*b+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||s(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,
-"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?r():s(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?r():s(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||s(30)}));var u=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();
-this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(b,a){},mouseUp:function(b,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&Math.abs(this.startX-d.getGraphX())<u&&Math.abs(this.startY-d.getGraphY())<u&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
-mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),a=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*a.width;this.translate.y=b.y-(this.y0||0)*a.height}A.apply(this,arguments)};var x=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),d=this.getPagePadding(),e=this.getPageSize(),c=Math.ceil(2*d.x+b.width*e.width),f=Math.ceil(2*d.y+b.height*e.height),g=a.minimumGraphSize;if(null==
+"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?r():s(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?r():s(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||s(30)}));var t=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(b,a){},mouseUp:function(b,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<t&&Math.abs(this.scrollTop-a.container.scrollTop)<t&&Math.abs(this.startX-d.getGraphX())<t&&Math.abs(this.startY-d.getGraphY())<t&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
+mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),a=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*a.width;this.translate.y=b.y-(this.y0||0)*a.height}z.apply(this,arguments)};var x=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),d=this.getPagePadding(),e=this.getPageSize(),c=Math.ceil(2*d.x+b.width*e.width),f=Math.ceil(2*d.y+b.height*e.height),g=a.minimumGraphSize;if(null==
g||g.width!=c||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,c,f);c=d.x-b.x*e.width;d=d.y-b.y*e.height;!this.autoTranslate&&(this.view.translate.x!=c||this.view.translate.y!=d)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,e=a.view.translate.y,a.view.setTranslate(c,d),a.container.scrollLeft+=Math.round((c-b)*a.view.scale),a.container.scrollTop+=Math.round((d-e)*a.view.scale),this.autoTranslate=!1):x.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
1;var y=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=c&&c(!1);if(null!=y&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-y.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/
@@ -2180,9 +2180,9 @@ null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for
Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.paddingBottom="8px";
d.style.cursor="default";var b=document.createElement("input");b.setAttribute("placeholder",mxResources.get("searchShapes"));b.setAttribute("type","text");b.style.fontSize="12px";b.style.overflow="hidden";b.style.boxSizing="border-box";b.style.border="solid 1px #d5d5d5";b.style.borderRadius="4px";b.style.width="100%";b.style.outline="none";b.style.padding="6px";d.appendChild(b);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",mxResources.get("search"));
e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(b.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var g;d.appendChild(e);f.appendChild(d);var k=document.createElement("center"),l=mxUtils.button(mxResources.get("moreResults"),function(){g()});l.style.display="none";l.style.lineHeight="normal";l.style.marginTop="4px";l.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom="8px";k.appendChild(l);
-f.appendChild(k);var n="",m=!1,p=!1,r=0,s={},q=12,t=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var b=f.firstChild;null!=b;){var a=b.nextSibling;b!=d&&b!=k&&b.parentNode.removeChild(b);b=a}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),l.style.display="none",n=b.value="",t());b.focus()});g=mxUtils.bind(this,function(){q=4*Math.max(1,
-Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=b.value){if(null!=k.parentNode&&(n!=b.value&&(t(),n=b.value,s={},p=!1,r=0),!m&&!p)){l.setAttribute("disabled","true");l.style.display="";l.style.cursor="wait";l.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(n,q,r,mxUtils.bind(this,function(b,d,e,c){if(this.currentSearch==a){b=null!=b?b:[];m=!1;r++;k.parentNode.removeChild(k);this.insertSearchHint(f,n,q,r,b,d,e,
-c);for(d=0;d<b.length;d++)c=b[d](),null==s[c.innerHTML]&&(s[c.innerHTML]="1",f.appendChild(b[d]()));e?(l.removeAttribute("disabled"),l.innerHTML=mxResources.get("moreResults")):(l.innerHTML=mxResources.get("reset"),l.style.display="none",p=!0);l.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){l.style.cursor=""}))}}else t(),n=b.value="",s={},l.style.display="none",p=!1,b.focus()});mxEvent.addListener(b,"keydown",mxUtils.bind(this,function(b){13==b.keyCode&&g()}));mxEvent.addListener(b,
+f.appendChild(k);var n="",m=!1,p=!1,r=0,s={},q=12,u=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var b=f.firstChild;null!=b;){var a=b.nextSibling;b!=d&&b!=k&&b.parentNode.removeChild(b);b=a}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),l.style.display="none",n=b.value="",u());b.focus()});g=mxUtils.bind(this,function(){q=4*Math.max(1,
+Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=b.value){if(null!=k.parentNode&&(n!=b.value&&(u(),n=b.value,s={},p=!1,r=0),!m&&!p)){l.setAttribute("disabled","true");l.style.display="";l.style.cursor="wait";l.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(n,q,r,mxUtils.bind(this,function(b,d,e,c){if(this.currentSearch==a){b=null!=b?b:[];m=!1;r++;k.parentNode.removeChild(k);this.insertSearchHint(f,n,q,r,b,d,e,
+c);for(d=0;d<b.length;d++)c=b[d](),null==s[c.innerHTML]&&(s[c.innerHTML]="1",f.appendChild(b[d]()));e?(l.removeAttribute("disabled"),l.innerHTML=mxResources.get("moreResults")):(l.innerHTML=mxResources.get("reset"),l.style.display="none",p=!0);l.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){l.style.cursor=""}))}}else u(),n=b.value="",s={},l.style.display="none",p=!1,b.focus()});mxEvent.addListener(b,"keydown",mxUtils.bind(this,function(b){13==b.keyCode&&g()}));mxEvent.addListener(b,
"focus",function(){b.style.paddingRight=""});mxEvent.addListener(b,"blur",function(){b.style.paddingRight="20px"});b.style.paddingRight="20px";mxEvent.addListener(b,"keyup",mxUtils.bind(this,function(a){""==b.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==b.value?(p=!0,l.style.display="none"):b.value!=n?(l.style.display="none",p=!1):
m||(l.style.display=p?"none":"")}));mxEvent.addListener(b,"mousedown",function(b){b.stopPropagation&&b.stopPropagation();b.cancelBubble=!0});mxEvent.addListener(b,"selectstart",function(b){b.stopPropagation&&b.stopPropagation();b.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.container.appendChild(a);this.palettes.search=[c,a]};
Sidebar.prototype.insertSearchHint=function(a,c,f,d,b,e,g,k){0==b.length&&1==d&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[c])),a.appendChild(f))};
@@ -2294,38 +2294,38 @@ Sidebar.prototype.updateShapes=function(a,c){var f=this.editorUi.editor.graph,d=
f.view.getState(l),m=null!=n?n.style:f.getCellStyle(c[k]);f.getModel().setStyle(l,e);if(null!=n&&"1"==mxUtils.getValue(n.style,"composite","0"))for(var p=f.model.getChildCount(l);0<=p;p--)f.model.remove(f.model.getChildAt(l,p));if(null!=m){"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=d[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[l]),f.setCellStyles("participant",d[mxConstants.STYLE_SHAPE],[l]));for(p=0;p<g.length;p++){var r=m[g[p]];null!=r&&f.setCellStyles(g[p],
r,[l])}}b.push(l)}}}finally{f.model.endUpdate()}return b};
Sidebar.prototype.createDropHandler=function(a,c,f,d){f=null!=f?f:!0;return mxUtils.bind(this,function(b,e,g,k,l){if(b.isEnabled()){a=b.getImportableCells(a);if(0<a.length){b.stopEditing();var n=null!=g&&!mxEvent.isAltDown(e)?b.isValidDropTarget(g,a,e):!1,m=null;null!=g&&!n&&(g=null);if(!b.isCellLocked(g||b.getDefaultParent())){b.model.beginUpdate();try{k=Math.round(k);l=Math.round(l);if(c&&b.isSplitTarget(g,a,e)){var p=b.cloneCells(a);b.splitEdge(g,p,null,k-d.width/2,l-d.height/2);m=p}else 0<a.length&&
-(m=b.importCells(a,k,l,g));if(null!=b.layoutManager){var r=b.layoutManager.getLayout(g);if(null!=r){var s=b.view.scale,q=b.view.translate,t=(k+q.x)*s,u=(l+q.y)*s;for(g=0;g<m.length;g++)r.moveCell(m[g],t,u)}}f&&b.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{b.model.endUpdate()}null!=m&&0<m.length&&(b.scrollCellToVisible(m[0]),b.setSelectionCells(m))}}mxEvent.consume(e)}})};
+(m=b.importCells(a,k,l,g));if(null!=b.layoutManager){var r=b.layoutManager.getLayout(g);if(null!=r){var s=b.view.scale,q=b.view.translate,u=(k+q.x)*s,t=(l+q.y)*s;for(g=0;g<m.length;g++)r.moveCell(m[g],u,t)}}f&&b.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{b.model.endUpdate()}null!=m&&0<m.length&&(b.scrollCellToVisible(m[0]),b.setSelectionCells(m))}}mxEvent.consume(e)}})};
Sidebar.prototype.createDragPreview=function(a,c){var f=document.createElement("div");f.style.border="1px dashed black";f.style.width=a+"px";f.style.height=c+"px";return f};
Sidebar.prototype.dropAndConnect=function(a,c,f,d){var b=this.getDropAndConnectGeometry(a,c[d],f,c);if(null!=b){var e=this.editorUi.editor.graph,g=[];e.model.beginUpdate();try{var k=e.getCellGeometry(a),l=e.getCellGeometry(c[d]),n=e.model.getParent(a),m=!0;if(null!=e.layoutManager){var p=e.layoutManager.getLayout(n);if(null!=p&&p.constructor==mxStackLayout&&(m=!1,g=e.view.getState(n),null!=g)){var r=new mxPoint(g.x/e.view.scale-e.view.translate.x,g.y/e.view.scale-e.view.translate.y);b.x+=r.x;b.y+=
-r.y;var s=b.getTerminalPoint(!1);null!=s&&(s.x+=r.x,s.y+=r.y)}}var q=l.x,t=l.y;e.model.isEdge(c[d])&&(t=q=0);var u=e.model.isEdge(a)||null!=k&&!k.relative&&m,g=c=e.importCells(c,b.x-(u?q:0),b.y-(u?t:0),u?n:null);if(e.model.isEdge(a))e.model.setTerminal(a,c[d],f==mxConstants.DIRECTION_NORTH);else if(e.model.isEdge(c[d])){e.model.setTerminal(c[d],a,!0);var v=e.getCellGeometry(c[d]);v.points=null;if(null!=v.getTerminalPoint(!1))v.setTerminalPoint(b.getTerminalPoint(!1),!1);else if(u&&e.model.isVertex(n)){var A=
-e.view.getState(n),r=new mxPoint(A.x/e.view.scale-e.view.translate.x,A.y/e.view.scale-e.view.translate.y);e.cellsMoved(c,r.x,r.y,null,null,!0)}}else l=e.getCellGeometry(c[d]),q=b.x-Math.round(l.x),t=b.y-Math.round(l.y),b.x=Math.round(l.x),b.y=Math.round(l.y),e.model.setGeometry(c[d],b),e.cellsMoved(c,q,t,null,null,!0),g=c.slice(),c.push(e.insertEdge(null,null,"",a,c[d],e.createCurrentEdgeStyle()));e.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{e.model.endUpdate()}e.setSelectionCells(g)}};
+r.y;var s=b.getTerminalPoint(!1);null!=s&&(s.x+=r.x,s.y+=r.y)}}var q=l.x,u=l.y;e.model.isEdge(c[d])&&(u=q=0);var t=e.model.isEdge(a)||null!=k&&!k.relative&&m,g=c=e.importCells(c,b.x-(t?q:0),b.y-(t?u:0),t?n:null);if(e.model.isEdge(a))e.model.setTerminal(a,c[d],f==mxConstants.DIRECTION_NORTH);else if(e.model.isEdge(c[d])){e.model.setTerminal(c[d],a,!0);var v=e.getCellGeometry(c[d]);v.points=null;if(null!=v.getTerminalPoint(!1))v.setTerminalPoint(b.getTerminalPoint(!1),!1);else if(t&&e.model.isVertex(n)){var z=
+e.view.getState(n),r=new mxPoint(z.x/e.view.scale-e.view.translate.x,z.y/e.view.scale-e.view.translate.y);e.cellsMoved(c,r.x,r.y,null,null,!0)}}else l=e.getCellGeometry(c[d]),q=b.x-Math.round(l.x),u=b.y-Math.round(l.y),b.x=Math.round(l.x),b.y=Math.round(l.y),e.model.setGeometry(c[d],b),e.cellsMoved(c,q,u,null,null,!0),g=c.slice(),c.push(e.insertEdge(null,null,"",a,c[d],e.createCurrentEdgeStyle()));e.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{e.model.endUpdate()}e.setSelectionCells(g)}};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,f,d){var b=this.editorUi.editor.graph,e=b.view,g=1<d.length,k=b.getCellGeometry(a);d=b.getCellGeometry(c);null!=k&&null!=d&&(d=d.clone(),b.model.isEdge(a)?(a=b.view.getState(a),k=a.absolutePoints,c=k[0],b=k[k.length-1],f==mxConstants.DIRECTION_NORTH?(d.x=c.x/e.scale-e.translate.x-d.width/2,d.y=c.y/e.scale-e.translate.y-d.height/2):(d.x=b.x/e.scale-e.translate.x-d.width/2,d.y=b.y/e.scale-e.translate.y-d.height/2)):(k.relative&&(a=b.view.getState(a),
k=k.clone(),k.x=(a.x-e.translate.x)/e.scale,k.y=(a.y-e.translate.y)/e.scale),e=b.defaultEdgeLength,b.model.isEdge(c)&&null!=d.getTerminalPoint(!0)&&null!=d.getTerminalPoint(!1)?(c=d.getTerminalPoint(!0),b=d.getTerminalPoint(!1),e=b.x-c.x,c=b.y-c.y,e=Math.sqrt(e*e+c*c),d.x=k.getCenterX(),d.y=k.getCenterY(),d.width=1,d.height=1,f==mxConstants.DIRECTION_NORTH?(d.height=e,d.y=k.y-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1)):f==mxConstants.DIRECTION_EAST?(d.width=e,d.x=k.x+k.width,d.setTerminalPoint(new mxPoint(d.x+
d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=k.y+k.height,d.setTerminalPoint(new mxPoint(d.x,d.y+d.height),!1)):f==mxConstants.DIRECTION_WEST&&(d.width=e,d.x=k.x-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1))):(!g&&45<d.width&&(45<d.height&&45<k.width&&45<k.height)&&(d.width*=k.height/d.height,d.height=k.height),d.x=k.x+k.width/2-d.width/2,d.y=k.y+k.height/2-d.height/2,f==mxConstants.DIRECTION_NORTH?d.y=d.y-k.height/2-d.height/2-e:f==mxConstants.DIRECTION_EAST?d.x=d.x+k.width/
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,c){null!=c.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(c,100),I=c):mxUtils.setOpacity(c,c==B?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,n=null,m=null,p=this,r=0;r<d.length&&!(null==
-m&&this.editorUi.editor.graph.model.isVertex(d[r])?m=r:null==n&&this.editorUi.editor.graph.model.isEdge(d[r])&&null==this.editorUi.editor.graph.model.getTerminal(d[r],!0)&&(n=r),null!=m&&null!=n);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!=v&&I==B){var k=b.isCellSelected(v.cell)?b.getSelectionCells():[v.cell],k=this.updateShapes(b.model.isEdge(v.cell)?d[0]:d[m],
-k);b.setSelectionCells(k)}else null!=d&&null!=I&&null!=t&&I!=B?(k=b.model.isEdge(t.cell)||null==n?m:n,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,u=null,v=null,A=!1,x=e(this.triangleUp,mxResources.get("connect")),y=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),z=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),F=null,G=e(this.roundDrop),E=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 Q=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");Q.apply(this,arguments)};var U=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");U.apply(this,arguments)};s.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=I&&this.currentGuide.hide();if(null!=
-this.previewElement){var e=a.view;if(null!=v&&I==B)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=t&&null!=I){var f=a.model.isEdge(t.cell)||null==n?m:n,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]),u=a.model.getParent(t.cell),
-q=e.translate.x*e.scale,r=e.translate.y*e.scale;null!=k&&!k.relative&&a.model.isVertex(u)&&(r=e.getState(u),q=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)*e.scale+q+"px";this.previewElement.style.top=(g.y-l)*e.scale+r+"px";1==d.length&&(this.previewElement.style.width=g.width*e.scale+"px",this.previewElement.style.height=g.height*e.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*e.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*e.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var Y=(new Date).getTime(),O=0,D=null,N=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;D!=l?(D=l,Y=(new Date).getTime(),O=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(D=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
-10))):O=(new Date).getTime()-Y;if(2500>O&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(N,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(N,mxConstants.STYLE_SHAPE)||1500<O||b.model.isEdge(l.cell))&&O>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=m||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var n=b.model.isEdge(l.cell)?b.view.getPoint(l):
-new mxPoint(l.getCenterX(),l.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(n.x)+"px";B.style.top=Math.floor(n.y)+"px";null==F&&(b.container.appendChild(B),F=B.parentNode);g(a,e,n,B)}else null==v||!mxUtils.contains(v,a,e)||1500<O&&!mxEvent.isShiftDown(c)?(v=null,null!=F&&(B.parentNode.removeChild(B),F=null)):null!=v&&null!=F&&(n=b.model.isEdge(v.cell)?b.view.getPoint(v):new mxPoint(v.getCenterX(),
-v.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,n,B));if(A&&null!=t&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(t);if(b.model.isEdge(t.cell)){var p=t.absolutePoints;null!=G.parentNode&&(n=p[0],k.add(g(a,e,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)));null!=E.parentNode&&(p=p[p.length-1],k.add(g(a,e,new mxRectangle(p.x-
-this.roundDrop.width/2,p.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),E)))}else n=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(n=mxRectangle.fromRectangle(t.shape.boundingBox)),n.grow(this.graph.tolerance),n.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(t.cell),null!=p&&(n.x-=p.horizontalOffset/2,n.y-=p.verticalOffset/2,n.width+=p.horizontalOffset,n.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&
-("hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox)&&n.add(p.rotationShape.boundingBox)),k.add(g(a,e,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,n.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),k.add(g(a,e,new mxRectangle(n.x+n.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),y)),k.add(g(a,e,new mxRectangle(t.getCenterX()-this.triangleDown.width/
-2,n.y+n.height,this.triangleDown.width,this.triangleDown.height),C)),k.add(g(a,e,new mxRectangle(n.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==y?H=mxConstants.DIRECTION_EAST:I==C||I==E?H=mxConstants.DIRECTION_SOUTH:I==z&&(H=mxConstants.DIRECTION_WEST);null!=v&&I==B&&(l=v);n=(null==m||b.isCellConnectable(d[m]))&&(b.model.isEdge(f)&&null!=m||b.model.isVertex(f)&&b.isCellConnectable(f));
-if(null!=t&&5E3<=O||t!=l&&(null==k||!mxUtils.contains(k,a,e)||500<O&&null==I&&n))if(A=!1,t=5E3>O&&O>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&n){k=[G,E,x,y,C,z];for(n=0;n<k.length;n++)null!=k[n].parentNode&&k[n].parentNode.removeChild(k[n]);b.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(n=p[0],p=p[p.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),G.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(n.y-this.roundDrop.height/2)+"px",E.style.left=Math.floor(p.x-
-this.roundDrop.width/2)+"px",E.style.top=Math.floor(p.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(E))):(n=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(n=mxRectangle.fromRectangle(l.shape.boundingBox)),n.grow(this.graph.tolerance),n.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(l.cell),null!=p&&(n.x-=p.horizontalOffset/2,n.y-=p.verticalOffset/
+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,c){null!=c.parentNode&&(mxUtils.contains(d,b,a)?(mxUtils.setOpacity(c,100),J=c):mxUtils.setOpacity(c,c==B?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,n=null,m=null,p=this,r=0;r<d.length&&!(null==
+m&&this.editorUi.editor.graph.model.isVertex(d[r])?m=r:null==n&&this.editorUi.editor.graph.model.isEdge(d[r])&&null==this.editorUi.editor.graph.model.getTerminal(d[r],!0)&&(n=r),null!=m&&null!=n);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!=v&&J==B){var k=b.isCellSelected(v.cell)?b.getSelectionCells():[v.cell],k=this.updateShapes(b.model.isEdge(v.cell)?d[0]:d[m],
+k);b.setSelectionCells(k)}else null!=d&&null!=J&&null!=u&&J!=B?(k=b.model.isEdge(u.cell)||null==n?m:n,this.dropAndConnect(u.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 u=null,t=null,v=null,z=!1,x=e(this.triangleUp,mxResources.get("connect")),y=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),E=null,G=e(this.roundDrop),F=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,J=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 Q=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");Q.apply(this,arguments)};var U=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");U.apply(this,arguments)};s.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=
+this.previewElement){var e=a.view;if(null!=v&&J==B)this.previewElement.style.display=a.model.isEdge(v.cell)?"none":"",this.previewElement.style.left=v.x+"px",this.previewElement.style.top=v.y+"px",this.previewElement.style.width=v.width+"px",this.previewElement.style.height=v.height+"px";else if(null!=u&&null!=J){var f=a.model.isEdge(u.cell)||null==n?m:n,g=p.getDropAndConnectGeometry(u.cell,d[f],H,d),k=!a.model.isEdge(u.cell)?a.getCellGeometry(u.cell):null,l=a.getCellGeometry(d[f]),t=a.model.getParent(u.cell),
+q=e.translate.x*e.scale,r=e.translate.y*e.scale;null!=k&&!k.relative&&a.model.isVertex(t)&&(r=e.getState(t),q=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)*e.scale+q+"px";this.previewElement.style.top=(g.y-l)*e.scale+r+"px";1==d.length&&(this.previewElement.style.width=g.width*e.scale+"px",this.previewElement.style.height=g.height*e.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*e.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-b.height*e.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var Y=(new Date).getTime(),O=0,D=null,T=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=J=null;D!=l?(D=l,Y=(new Date).getTime(),O=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==J&&(D=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
+10))):O=(new Date).getTime()-Y;if(2500>O&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(T,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(T,mxConstants.STYLE_SHAPE)||1500<O||b.model.isEdge(l.cell))&&O>this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=m||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var n=b.model.isEdge(l.cell)?b.view.getPoint(l):
+new mxPoint(l.getCenterX(),l.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(n.x)+"px";B.style.top=Math.floor(n.y)+"px";null==E&&(b.container.appendChild(B),E=B.parentNode);g(a,e,n,B)}else null==v||!mxUtils.contains(v,a,e)||1500<O&&!mxEvent.isShiftDown(c)?(v=null,null!=E&&(B.parentNode.removeChild(B),E=null)):null!=v&&null!=E&&(n=b.model.isEdge(v.cell)?b.view.getPoint(v):new mxPoint(v.getCenterX(),
+v.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),g(a,e,n,B));if(z&&null!=u&&!mxEvent.isAltDown(c)&&null==J){k=mxRectangle.fromRectangle(u);if(b.model.isEdge(u.cell)){var p=u.absolutePoints;null!=G.parentNode&&(n=p[0],k.add(g(a,e,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)));null!=F.parentNode&&(p=p[p.length-1],k.add(g(a,e,new mxRectangle(p.x-
+this.roundDrop.width/2,p.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),F)))}else n=mxRectangle.fromRectangle(u),null!=u.shape&&null!=u.shape.boundingBox&&(n=mxRectangle.fromRectangle(u.shape.boundingBox)),n.grow(this.graph.tolerance),n.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(u.cell),null!=p&&(n.x-=p.horizontalOffset/2,n.y-=p.verticalOffset/2,n.width+=p.horizontalOffset,n.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&
+("hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox)&&n.add(p.rotationShape.boundingBox)),k.add(g(a,e,new mxRectangle(u.getCenterX()-this.triangleUp.width/2,n.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),k.add(g(a,e,new mxRectangle(n.x+n.width,u.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),y)),k.add(g(a,e,new mxRectangle(u.getCenterX()-this.triangleDown.width/
+2,n.y+n.height,this.triangleDown.width,this.triangleDown.height),C)),k.add(g(a,e,new mxRectangle(n.x-this.triangleLeft.width,u.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;J==y?H=mxConstants.DIRECTION_EAST:J==C||J==F?H=mxConstants.DIRECTION_SOUTH:J==A&&(H=mxConstants.DIRECTION_WEST);null!=v&&J==B&&(l=v);n=(null==m||b.isCellConnectable(d[m]))&&(b.model.isEdge(f)&&null!=m||b.model.isVertex(f)&&b.isCellConnectable(f));
+if(null!=u&&5E3<=O||u!=l&&(null==k||!mxUtils.contains(k,a,e)||500<O&&null==J&&n))if(z=!1,u=5E3>O&&O>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=u&&n){k=[G,F,x,y,C,A];for(n=0;n<k.length;n++)null!=k[n].parentNode&&k[n].parentNode.removeChild(k[n]);b.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(n=p[0],p=p[p.length-1],k=b.tolerance,new mxRectangle(a-k,e-k,2*k,2*k),G.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(n.y-this.roundDrop.height/2)+"px",F.style.left=Math.floor(p.x-
+this.roundDrop.width/2)+"px",F.style.top=Math.floor(p.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))):(n=mxRectangle.fromRectangle(l),null!=l.shape&&null!=l.shape.boundingBox&&(n=mxRectangle.fromRectangle(l.shape.boundingBox)),n.grow(this.graph.tolerance),n.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(l.cell),null!=p&&(n.x-=p.horizontalOffset/2,n.y-=p.verticalOffset/
2,n.width+=p.horizontalOffset,n.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&("hidden"!=p.rotationShape.node.style.visibility&&"none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox)&&n.add(p.rotationShape.boundingBox)),x.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",x.style.top=Math.floor(n.y-this.triangleUp.height)+"px",y.style.left=Math.floor(n.x+n.width)+"px",y.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/
-2)+"px",C.style.left=x.style.left,C.style.top=Math.floor(n.y+n.height)+"px",z.style.left=Math.floor(n.x-this.triangleLeft.width)+"px",z.style.top=y.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(x),b.container.appendChild(C)),b.container.appendChild(y),b.container.appendChild(z));null!=l&&(u=b.selectionCellsHandler.getHandler(l.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));A=!0}else{k=[G,E,x,y,C,z];for(n=0;n<k.length;n++)null!=k[n].parentNode&&k[n].parentNode.removeChild(k[n])}!A&&
-null!=u&&u.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=v&&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,E,B,x,y,C,z],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=t&&null!=u&&u.reset();I=F=v=t=u=null};return s};
+2)+"px",C.style.left=x.style.left,C.style.top=Math.floor(n.y+n.height)+"px",A.style.left=Math.floor(n.x-this.triangleLeft.width)+"px",A.style.top=y.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(x),b.container.appendChild(C)),b.container.appendChild(y),b.container.appendChild(A));null!=l&&(t=b.selectionCellsHandler.getHandler(l.cell),null!=t&&null!=t.setHandlesVisible&&t.setHandlesVisible(!1));z=!0}else{k=[G,F,x,y,C,A];for(n=0;n<k.length;n++)null!=k[n].parentNode&&k[n].parentNode.removeChild(k[n])}!z&&
+null!=t&&t.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=v&&J==B)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=J||!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,x,y,C,A],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=u&&null!=t&&t.reset();J=E=v=u=t=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.getFreeInsertPoint(),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})};
@@ -2358,13 +2358,13 @@ a){l=e=g=k=null})})}this.cellRenderer.getLabelValue=function(b){var a=mxCellRend
c,c=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)a.push(new mxRectangle(((g.x+k)*e+c.x)*f,(g.y*d+c.y)*f,e*f,d*f));for(k=0;k<g.height;k++)a.push(new mxRectangle((g.x*e+c.x)*f,((g.y+k)*d+c.y)*f,e*f,d*f));b=a.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(b,a){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor=
"#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(b){for(var a=mxGraphHandler.prototype.getCells.apply(this,arguments),d=[],c=0;c<a.length;c++){var e=this.graph.view.getState(a[c]),e=null!=e?e.style:this.graph.getCellStyle(a[c]);"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(a[c]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(a,e)&&d.push(e)):
d.push(a[c])}return d};this.connectionHandler.createTargetVertex=function(b,a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(a),this.graph.model.isVertex(d)&&(a=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
-function(){var b=this.currentState;q.apply(this,arguments);b!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<s||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(b){return u.apply(this,
-arguments)||mxEvent.isShiftDown(b)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(b){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.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(b){return mxEvent.isMouseEvent(b.getEvent())};var x=this.click;this.click=function(b){if(!this.isEnabled()&&!b.isConsumed()){var a=b.getCell();null!=a&&(a=this.getLinkForCell(a),null!=a&&window.open(a))}else return x.apply(this,arguments)};var y=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return y.apply(this,arguments);if(null!=
-this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,c,e,f){f=null!=f?f:[];if(0<d||0<c){var g=this.getModel(),k=b+d,l=a+c;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 p=g.getChildAt(e,m),u=this.view.getState(p);if(null!=u&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var t=
-mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=t&&(u=mxUtils.getBoundingBox(u,t));(g.isEdge(p)||g.isVertex(p))&&u.x>=b&&(u.y+u.height<=l&&u.y>=a&&u.x+u.width<=k)&&f.push(p);this.getAllCells(b,a,d,c,p,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:C.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,
-"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();z=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),c=a.getProperty("cell");
-null==c?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=z?this.addSelectionCells(z):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);z=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,a){return a&&b.view.graph.isCellSelected(b.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var b=this.currentState;q.apply(this,arguments);b!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var u=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<s||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&u.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(b){return t.apply(this,
+arguments)||mxEvent.isShiftDown(b)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(b){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(z=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=z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var x=this.click;this.click=function(b){if(!this.isEnabled()&&!b.isConsumed()){var a=b.getCell();null!=a&&(a=this.getLinkForCell(a),null!=a&&window.open(a))}else return x.apply(this,arguments)};var y=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return y.apply(this,arguments);if(null!=
+this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,c,e,f){f=null!=f?f:[];if(0<d||0<c){var g=this.getModel(),k=b+d,l=a+c;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 p=g.getChildAt(e,m),t=this.view.getState(p);if(null!=t&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var u=
+mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(t=mxUtils.getBoundingBox(t,u));(g.isEdge(p)||g.isVertex(p))&&t.x>=b&&(t.y+t.height<=l&&t.y>=a&&t.x+t.width<=k)&&f.push(p);this.getAllCells(b,a,d,c,p,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:C.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,
+"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),c=a.getProperty("cell");
+null==c?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);A=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,a){return a&&b.view.graph.isCellSelected(b.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(b){b=B.apply(this,arguments);this.isCellLocked(b.getCell())&&(b.state=null);return b}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkTarget="_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;
Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
@@ -2380,8 +2380,8 @@ Graph.prototype.isLabelMovable=function(a){var c=this.view.getState(a),c=null!=c
Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,g=function(b,a){b=String(b);for(a=a||2;b.length<a;)b="0"+b;return b};1==arguments.length&&"[object String]"==Object.prototype.toString.call(a)&&
-!/\d/.test(a)&&(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var k=f?"getUTC":"get",l=a[k+"Date"](),n=a[k+"Day"](),m=a[k+"Month"](),p=a[k+"FullYear"](),r=a[k+"Hours"](),s=a[k+"Minutes"](),q=a[k+"Seconds"](),k=a[k+"Milliseconds"](),t=f?0:a.getTimezoneOffset(),u={d:l,dd:g(l),ddd:d.i18n.dayNames[n],dddd:d.i18n.dayNames[n+7],m:m+1,mm:g(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:r%12||12,hh:g(r%12||12),H:r,HH:g(r),M:s,MM:g(s),s:q,ss:g(q),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:f?"UTC":(String(a).match(b)||[""]).pop().replace(e,""),o:(0<t?"-":"+")+g(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in u?u[b]:b.slice(1,
+!/\d/.test(a)&&(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var k=f?"getUTC":"get",l=a[k+"Date"](),n=a[k+"Day"](),m=a[k+"Month"](),p=a[k+"FullYear"](),r=a[k+"Hours"](),s=a[k+"Minutes"](),q=a[k+"Seconds"](),k=a[k+"Milliseconds"](),u=f?0:a.getTimezoneOffset(),t={d:l,dd:g(l),ddd:d.i18n.dayNames[n],dddd:d.i18n.dayNames[n+7],m:m+1,mm:g(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
+12],yy:String(p).slice(2),yyyy:p,h:r%12||12,hh:g(r%12||12),H:r,HH:g(r),M:s,MM:g(s),s:q,ss:g(q),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:f?"UTC":(String(a).match(b)||[""]).pop().replace(e,""),o:(0<u?"-":"+")+g(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in t?t[b]:b.slice(1,
b.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),f=c.getChildCount(c.root),d=0;d<f;d++)(function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");c.isVisible(b)&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d.appendChild(f);var k=b.value||
mxResources.get("background")||"Background";d.setAttribute("title",k);mxUtils.write(d,k);a.appendChild(d);mxEvent.addListener(f,"click",function(){null!=f.getAttribute("checked")?f.removeAttribute("checked"):f.setAttribute("checked","checked");c.setVisible(b,f.checked)})})(c.getChildAt(c.root,d));return a};
@@ -2469,7 +2469,7 @@ f[1]),2<f.length?"0"!=f[2]:!0))}}catch(g){}return c}if(null!=b.shape)if(null!=b.
this.setCellStyles(mxConstants.STYLE_ELBOW,a,[b]))}};Graph.prototype.isValidRoot=function(b){for(var a=this.model.getChildCount(b),d=0,c=0;c<a;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null!=e&&!e.relative&&d++)}return 0<d||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b){var a=this.view.getState(b),a=null!=a?a.style:this.getCellStyle(b);return"1"!=mxUtils.getValue(a,"part","0")&&(this.isContainer(b)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(a,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var a=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(a&&null!=b&&null!=this.layoutManager){var d=this.model.getParent(b);null!=d&&(d=this.layoutManager.getLayout(d),null!=d&&d.constructor==mxStackLayout&&(a=!1))}return a};Graph.prototype.getPreferredSizeForCell=
function(b){var a=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=a&&(a.width+=10,a.height+=4,this.gridEnabled&&(a.width=this.snap(a.width),a.height=this.snap(a.height)));return a};Graph.prototype.turnShapes=function(b){var a=this.getModel(),d=[];a.beginUpdate();try{for(var c=0;c<b.length;c++){var e=b[c];if(a.isEdge(e)){var f=a.getTerminal(e,!0),g=a.getTerminal(e,!1);a.setTerminal(e,g,!0);a.setTerminal(e,f,!1);var k=a.getGeometry(e);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();
-var l=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);a.setGeometry(e,k);var m=this.view.getState(e),p=this.view.getState(f),u=this.view.getState(g);if(null!=m){var t=null!=p?this.getConnectionConstraint(m,p,!0):null,q=null!=u?this.getConnectionConstraint(m,u,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,!1,t)}d.push(e)}}else if(a.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);a.setGeometry(e,k);var m=this.view.getState(e),p=this.view.getState(f),t=this.view.getState(g);if(null!=m){var u=null!=p?this.getConnectionConstraint(m,p,!0):null,q=null!=t?this.getConnectionConstraint(m,t,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,!1,u)}d.push(e)}}else if(a.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 v=k.width;k.width=k.height;k.height=v;a.setGeometry(e,k);var s=this.view.getState(e);if(null!=s){var r=s.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])}d.push(e)}}}finally{a.endUpdate()}return d};Graph.prototype.processChange=function(b){mxGraph.prototype.processChange.apply(this,arguments);if(b instanceof mxValueChange&&null!=b.cell.value&&
"object"==typeof b.cell.value){var a=this.model.getDescendants(b.cell);if(0<a.length)for(var d=0;d<a.length;d++)this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.cellLabelChanged=function(b,a,d){a=this.zapGremlins(a);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==
typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,a);break}e=this.model.getParent(e)}var f=b.value.cloneNode(!0);f.setAttribute("label",a);a=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(b){for(var a=[],d=0;d<b.length;d++)if(this.isCellDeletable(b[d])){var c=this.view.getState(b[d]);if(null!=c){var e=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,
@@ -2481,7 +2481,7 @@ e.width),d=Math.max(d,c.y*e.height);return new mxPoint(this.snap(a+b),this.snap(
function(b,a,d){var c=new mxCell;c.value="Text";c.style="text;html\x3d1;resizable\x3d0;points\x3d[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=d){c.style+="align\x3dcenter;verticalAlign\x3dmiddle;labelBackgroundColor\x3d#ffffff;";c.geometry.relative=!0;c.connectable=!1;var e=this.view.getRelativePoint(d,b,a);c.geometry.x=Math.round(1E4*e.x)/1E4;c.geometry.y=Math.round(e.y);c.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(d,c.geometry),f=this.view.scale;c.geometry.offset=
new mxPoint(Math.round((b-e.x)/f),Math.round((a-e.y)/f))}else c.style+="autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;",e=this.view.translate,c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(b/this.view.scale)-e.x,c.geometry.y=Math.round(a/this.view.scale)-e.y;this.getModel().beginUpdate();try{this.addCells([c],null!=d?d.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};Graph.prototype.getLinkUrl=
function(b){return b};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};Graph.prototype.isBlankLink=function(b){var a=this.domainUrl;return"self"!=urlParams.target&&null!=b&&"#"!=b.charAt(0)&&b.substring(0,a.length)!=a&&!this.isRelativeUrl(b)};Graph.prototype.isRelativeUrl=function(b){return!/^(?:[a-z]+:)?\/\//i.test(b)&&"data:image"!=b.substring(0,10)&&"mailto:"!=b.substring(0,7)};Graph.prototype.addClickHandler=
-function(b,a,d){var c=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var d=0;d<b.length;d++){var c=this.getLinkUrl(b[d].getAttribute("href"));b[d].setAttribute("href",c);null!=c&&!this.isBlankLink(c)&&(window!=window.top?(b[d].setAttribute("target","_top"),c.charAt("#")?b[d].setAttribute("href",this.baseUrl+c):b[d].setAttribute("href",this.getAbsoluteUrl(c))):"_blank"==b[d].getAttribute("target")&&b[d].removeAttribute("target"),null!=a&&mxEvent.addListener(b[d],
+function(b,a,d){var c=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var d=0;d<b.length;d++){var c=this.getLinkUrl(b[d].getAttribute("href"));b[d].setAttribute("href",c);null!=c&&!this.isBlankLink(c)&&(window!=window.top?(b[d].setAttribute("target","_top"),"#"===c.charAt(0)?b[d].setAttribute("href",this.baseUrl+c):b[d].setAttribute("href",this.getAbsoluteUrl(c))):"_blank"==b[d].getAttribute("target")&&b[d].removeAttribute("target"),null!=a&&mxEvent.addListener(b[d],
"click",a))}});this.model.addListener(mxEvent.CHANGE,c);c();var e=this.container.style.cursor,f=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=b&&""!=b&&b!=mxConstants.NONE?new mxCellHighlight(g,b,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(b){b=g.view.getState(b.getCell());b!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(b,
a){this.startX=a.getGraphX();this.startY=a.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(a)},mouseMove:function(b,a){if(g.isMouseDown){if(null!=this.currentLink){var d=Math.abs(this.startX-a.getGraphX()),c=Math.abs(this.startY-a.getGraphY());(d>f||c>f)&&this.clear()}}else"a"==a.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&
(a.getState()==this.currentState||null==a.getState())&&g.intersects(this.currentState,a.getGraphX(),a.getGraphY())||this.updateCurrentState(a)},mouseUp:function(b,c){var e=c.getSource(),k=this.currentLink;this.clear();if("a"!=e.nodeName.toLowerCase()&&!c.isConsumed()&&(null==c.getState()||!c.isSource(c.getState().control))&&(mxEvent.isLeftMouseButton(c.getEvent())||mxEvent.isTouchEvent(c.getEvent())))null!=k?(g.isBlankLink(k)?window.open(k):(null!=a&&a(c.getEvent()),"#"==k.charAt(0)?window!=window.top?
@@ -2494,9 +2494,9 @@ if(null!=g){var k=b?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,k):k,e=nu
n))}}finally{this.getModel().endUpdate()}}}return a};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.encodeCells=function(b){for(var a=this.cloneCells(b),d=0;d<a.length;d++){var c=this.view.getState(b[d]);if(null!=c){var e=this.getCellGeometry(a[d]);null!=e&&e.relative&&(e.relative=!1,e.x=c.x/c.view.scale-c.view.translate.x,e.y=c.y/c.view.scale-c.view.translate.y)}}for(var c=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),
0),d=0;d<b.length;d++)e.add(f,a[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,a){return this.getLinkForCell(b.cell)});return b};Graph.prototype.getSvg=function(b,a,d,c,e,f,g){a=null!=a?a:1;d=null!=d?d:1;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;c=c?this.view.getBackgroundPageBounds():f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));
var k=this.createSvgImageExport(),l=k.drawCellState;k.drawCellState=function(b,a){(f||b.view.graph.isCellSelected(b.cell))&&l.apply(this,arguments)};var n=this.view.scale,m=mxUtils.createXmlDocument(),p=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=b&&(null!=p.style?p.style.backgroundColor=b:p.setAttribute("style","background-color:"+b));null==m.createElementNS?(p.setAttribute("xmlns",mxConstants.NS_SVG),p.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=a/n;p.setAttribute("width",Math.ceil(c.width*b)+2*d+"px");p.setAttribute("height",Math.ceil(c.height*b)+2*d+"px");p.setAttribute("version","1.1");var u=p;e&&(u=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),u.setAttribute("transform","translate(0.5,0.5)"),p.appendChild(u));m.appendChild(p);m=new mxSvgCanvas2D(u);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.translate(Math.floor((d/
-a-c.x)/n),Math.floor((d/a-c.y)/n));var t=m.createAlternateContent;m.createAlternateContent=function(b,a,d,c,e,f,g,k,l,n,m,p,u){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&f.length<5*c/q.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(c/2));v.setAttribute("y",Math.round((e+q.fontSize)/2));v.setAttribute("fill",q.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(q.fontSize)+"px");v.setAttribute("font-family",
-q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");mxUtils.write(v,f);return v}return t.apply(this,arguments)};d=this.backgroundImage;null!=d&&(e=n/a,a=this.view.translate,e=new mxRectangle(a.x*e,a.y*e,d.width*e,d.height*e),
+p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=a/n;p.setAttribute("width",Math.ceil(c.width*b)+2*d+"px");p.setAttribute("height",Math.ceil(c.height*b)+2*d+"px");p.setAttribute("version","1.1");var t=p;e&&(t=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),t.setAttribute("transform","translate(0.5,0.5)"),p.appendChild(t));m.appendChild(p);m=new mxSvgCanvas2D(t);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.translate(Math.floor((d/
+a-c.x)/n),Math.floor((d/a-c.y)/n));var u=m.createAlternateContent;m.createAlternateContent=function(b,a,d,c,e,f,g,k,l,n,m,p,t){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&f.length<5*c/q.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(c/2));v.setAttribute("y",Math.round((e+q.fontSize)/2));v.setAttribute("fill",q.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(q.fontSize)+"px");v.setAttribute("font-family",
+q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");mxUtils.write(v,f);return v}return u.apply(this,arguments)};d=this.backgroundImage;null!=d&&(e=n/a,a=this.view.translate,e=new mxRectangle(a.x*e,a.y*e,d.width*e,d.height*e),
mxUtils.intersects(c,e)&&m.image(a.x,a.y,d.width,d.height,d.src,!0));m.scale(b);m.textEnabled=g;k.drawState(this.getView().getState(this.model.root),m);return p};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var a=window.getSelection();a.getRangeAt&&a.rangeCount&&(b=a.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getParentByName=function(b,a,d){for(;null!=b&&b.nodeName!=
a;){if(b==d)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var a=null;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){var d=document.createRange();d.selectNode(b);a.removeAllRanges();a.addRange(d)}}else if((a=document.selection)&&"Control"!=a.type)b=a.createRange(),b.collapse(!0),d=a.createRange(),d.setEndPoint("StartToStart",b),d.select()};Graph.prototype.insertRow=function(b,a){for(var d=b.tBodies[0],c=0<d.rows.length?d.rows[0].cells.length:
1,d=d.insertRow(a),e=0;e<c;e++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(b,a){b.tBodies[0].deleteRow(a)};Graph.prototype.insertColumn=function(b,a){var d=b.tHead;if(null!=d)for(var c=0;c<d.rows.length;c++){var e=document.createElement("th");d.rows[c].appendChild(e);mxUtils.br(e)}d=b.tBodies[0];for(c=0;c<d.rows.length;c++)e=d.rows[c].insertCell(a),mxUtils.br(e);return d.rows[0].cells[0<=a?a:d.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,
@@ -2547,22 +2547,22 @@ this.graph.view.getState(k[d]),n=this.graph.getCellGeometry(k[d]);null!=l&&null!
var c=a.getX()+d.x,d=a.getY()+d.y,e=this.first.x-c,f=this.first.y-d,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(c,d),this.isSpaceEvent(a)?(c=this.x+this.width,d=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(a.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=c-this.width),this.y<this.first.y&&(this.y=d-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)),a.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,a,d,c){v.apply(this,arguments);d!=this.currentTerminalState?(t=(new Date).getTime(),u=0):u=(new Date).getTime()-t;this.currentTerminalState=
-d};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(b,a){var d=null!=
+this.secondDiv=null)),a.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var u=(new Date).getTime(),t=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,a,d,c){v.apply(this,arguments);d!=this.currentTerminalState?(u=(new Date).getTime(),t=0):t=(new Date).getTime()-u;this.currentTerminalState=
+d};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<t||(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,c=this.state.getVisibleTerminalState(d),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,d):null,d=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),e):null)?this.fixedHandleImage:null!=e&&null!=c?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 x=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return x.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=c&&c.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 y.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=this.graph.getModel(),d=a.getParent(b.cell),
-c=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=c&&c.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))):C.apply(this,arguments)};var z=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),c=d.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&z.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 B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var F=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+c=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=c&&c.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))):C.apply(this,arguments)};var A=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),c=d.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&A.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 B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var E=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.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));var d=b;60<d.length&&(d=d.substring(0,36)+"..."+d.substring(d.length-20));var c=document.createElement("a");c.setAttribute("href",this.graph.getLinkUrl(b));c.setAttribute("title",b);null!=this.graph.linkTarget&&c.setAttribute("target",this.graph.linkTarget);mxUtils.write(c,d);this.linkHint.innerHTML="";this.linkHint.appendChild(c);this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&(b=document.createElement("img"),
-b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var E=
-mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){E.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
+b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var F=
+mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){F.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
this.selectionHandler=mxUtils.bind(this,function(a,d){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var a=this.graph.getLinkForCell(this.state.cell);null!=a&&(this.updateLinkHint(a),this.redrawHandles())};var H=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
-function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this);if(null!=this.state&&null!=this.linkHint){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),a=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(a,this.state.style[mxConstants.STYLE_ROTATION]||
+function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this);if(null!=this.state&&null!=this.linkHint){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),a=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(a,this.state.style[mxConstants.STYLE_ROTATION]||
"0",b),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==b&&(b=this.state);this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b.y+b.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var L=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var Q=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Q.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var U=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(U.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b.y+
@@ -2570,9 +2570,9 @@ b.height+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype
this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),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 n(){mxActor.call(this)}function m(){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 u(){mxActor.call(this)}function v(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function C(){mxShape.call(this)}function z(){mxShape.call(this)}function B(){mxEllipse.call(this)}function F(){mxShape.call(this)}
-function G(){mxShape.call(this)}function E(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function Q(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function Y(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function N(){mxActor.call(this)}function P(){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 T(){mxActor.call(this)}function X(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function W(){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)}
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function C(){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 H(){mxShape.call(this)}function J(){mxShape.call(this)}function L(){mxShape.call(this)}function Q(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function Y(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function M(){mxRectangleShape.call(this)}function K(){mxActor.call(this)}
+function $(){mxActor.call(this)}function N(){mxActor.call(this)}function I(){mxActor.call(this)}function P(){mxActor.call(this)}function W(){mxActor.call(this)}function fa(){mxActor.call(this)}function da(){mxActor.call(this)}function S(){mxActor.call(this)}function X(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}function R(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ea(){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=
@@ -2593,59 +2593,59 @@ l=k(b-this.lastX)*d/f,k=k(a-this.lastY)*c/f,d=d/e,c=c/e,e=0;e<f;e++){var n=l*e+t
this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var za=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(b){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==b.handHiggle&&(b.handJiggle=new q(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),delete b.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(b,a,d,c,e){if(null==b.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))b.pointerEvents=!1;b.begin();this.isRounded?(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(c*f,e*f),b.moveTo(a+f,d),b.lineTo(a+c-f,d),b.quadTo(a+c,d,a+c,d+f),b.lineTo(a+c,d+e-f),b.quadTo(a+c,d+e,a+c-f,d+e),b.lineTo(a+f,d+e),b.quadTo(a,d+e,a,d+e-f),b.lineTo(a,d+f),b.quadTo(a,d,a+f,d)):(b.moveTo(a,d),b.lineTo(a+c,d),b.lineTo(a+c,d+e),b.lineTo(a,d+e),b.lineTo(a,
-d));b.close();b.end();b.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(b,a,d,c,e){null==b.handJiggle&&Ca.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=0.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var a=
-b.width,d=b.height;b=new mxRectangle(b.x,b.y,a,d);var c=a*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(a*e,d*e));b.x+=c;b.width-=2*c}return b};t.prototype.paintForeground=function(b,a,d,c,e){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));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));b.begin();b.moveTo(a+f,d);b.lineTo(a+f,d+e);b.moveTo(a+c-f,d);b.lineTo(a+c-f,d+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(u,mxActor);u.prototype.size=0.2;u.prototype.redrawPath=function(b,a,d,c,e){a=c*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-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(0,e),new mxPoint(a,e/2)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.step=u;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(b,a,d,c,e){a=c*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(a,0),new mxPoint(c-a,0),new mxPoint(c,0.5*e),new mxPoint(c-a,e),new mxPoint(a,e),new mxPoint(0,0.5*e)],this.isRounded,d,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=v;mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(b,a,d,c,e){var f=Math.min(c/5,e/5)+1;b.begin();b.moveTo(a+c/2,d+f);b.lineTo(a+c/2,d+e-f);b.moveTo(a+f,d+e/2);b.lineTo(a+c-f,d+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.prototype.defaultShapes.plus=A;var wa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var a=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+a,b.y+a,b.width-2*a,b.height-2*a)}return b};mxRhombus.prototype.paintVertexShape=function(b,a,d,c,e){wa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
+d));b.close();b.end();b.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(b,a,d,c,e){null==b.handJiggle&&Ca.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=0.1;u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var a=
+b.width,d=b.height;b=new mxRectangle(b.x,b.y,a,d);var c=a*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(a*e,d*e));b.x+=c;b.width-=2*c}return b};u.prototype.paintForeground=function(b,a,d,c,e){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));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));b.begin();b.moveTo(a+f,d);b.lineTo(a+f,d+e);b.moveTo(a+c-f,d);b.lineTo(a+c-f,d+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=u;mxUtils.extend(t,mxActor);t.prototype.size=0.2;t.prototype.redrawPath=function(b,a,d,c,e){a=c*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-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(0,e),new mxPoint(a,e/2)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.step=t;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(b,a,d,c,e){a=c*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(a,0),new mxPoint(c-a,0),new mxPoint(c,0.5*e),new mxPoint(c-a,e),new mxPoint(a,e),new mxPoint(0,0.5*e)],this.isRounded,d,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=v;mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.paintForeground=function(b,a,d,c,e){var f=Math.min(c/5,e/5)+1;b.begin();b.moveTo(a+c/2,d+f);b.lineTo(a+c/2,d+e-f);b.moveTo(a+f,d+e/2);b.lineTo(a+c-f,d+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.prototype.defaultShapes.plus=z;var wa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var a=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+a,b.y+a,b.width-2*a,b.height-2*a)}return b};mxRhombus.prototype.paintVertexShape=function(b,a,d,c,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);a+=f;d+=f;c-=2*f;e-=2*f;0<c&&0<e&&(b.setShadow(!1),wa.apply(this,[b,a,d,c,e]))}};mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var a=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+a,b.y+a,b.width-2*a,b.height-2*a)}return b};x.prototype.paintForeground=function(b,a,d,
c,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);a+=f;d+=f;c-=2*f;e-=2*f;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.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"],p=this.style["symbol"+f+"Spacing"]||0,u=this.style["symbol"+f+"ArcSpacing"];null!=u&&(p+=this.getArcSize(c+this.strokewidth,e+this.strokewidth)*u);var u=a,t=d,u=k==mxConstants.ALIGN_CENTER?u+(c-n)/2:k==mxConstants.ALIGN_RIGHT?u+(c-n-p):u+p,t=l==mxConstants.ALIGN_MIDDLE?t+(e-m)/2:l==mxConstants.ALIGN_BOTTOM?t+(e-m-p):t+p;b.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,b,u,t,n,m);b.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
+f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSpacing"];null!=t&&(p+=this.getArcSize(c+this.strokewidth,e+this.strokewidth)*t);var t=a,u=d,t=k==mxConstants.ALIGN_CENTER?t+(c-n)/2:k==mxConstants.ALIGN_RIGHT?t+(c-n-p):t+p,u=l==mxConstants.ALIGN_MIDDLE?u+(e-m)/2:l==mxConstants.ALIGN_BOTTOM?u+(e-m-p):u+p;b.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,b,t,u,n,m);b.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.ext=x;mxUtils.extend(y,mxCylinder);y.prototype.redrawPath=function(b,a,d,c,e,f){f?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.prototype.defaultShapes.message=y;mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(b,a,d,c,e){b.translate(a,d);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,
-e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=C;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,c,e){b.translate(a,d);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();
-b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=z;mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+c/8,d+e);b.lineTo(a+7*c/8,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=B;mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(b,a,d,c,e){b.translate(a,d);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,
-0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=F;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,c,e){b.translate(a,d);b.begin();b.moveTo(3*c/8,1.1*(e/8));b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};G.prototype.paintForeground=function(b,a,d,c,e){b.begin();b.moveTo(3*c/8,1.1*(e/8));b.lineTo(5*c/8,e/
-4);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=G;mxUtils.extend(E,mxRectangleShape);E.prototype.size=40;E.prototype.isHtmlAllowed=function(){return!1};E.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)};E.prototype.paintBackground=function(b,a,d,c,e){var f=Math.max(0,Math.min(e,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,c,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=E&&(g=new g,g.apply(this.state),b.save(),g.paintVertexShape(b,a,d,c,f),b.restore()));f<e&&(b.setDashed(!0),b.begin(),b.moveTo(a+c/2,d+f),b.lineTo(a+c/2,d+e),b.end(),b.stroke())};E.prototype.paintForeground=function(b,a,d,c,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-mxRectangleShape.prototype.paintForeground.call(this,b,a,d,c,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=E;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,
+e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=C;mxUtils.extend(A,mxShape);A.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};A.prototype.paintBackground=function(b,a,d,c,e){b.translate(a,d);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();
+b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=A;mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(a+c/8,d+e);b.lineTo(a+7*c/8,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=B;mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(b,a,d,c,e){b.translate(a,d);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,
+0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=E;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,c,e){b.translate(a,d);b.begin();b.moveTo(3*c/8,1.1*(e/8));b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};G.prototype.paintForeground=function(b,a,d,c,e){b.begin();b.moveTo(3*c/8,1.1*(e/8));b.lineTo(5*c/8,e/
+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,c,e){var f=Math.max(0,Math.min(e,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,c,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,c,f),b.restore()));f<e&&(b.setDashed(!0),b.begin(),b.moveTo(a+c/2,d+f),b.lineTo(a+c/2,d+e),b.end(),b.stroke())};F.prototype.paintForeground=function(b,a,d,c,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+mxRectangleShape.prototype.paintForeground.call(this,b,a,d,c,Math.min(e,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,c,e){var f=this.corner,g=Math.min(c,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(e,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+c,d);b.lineTo(a+c,d+e);b.lineTo(a,d+e);b.lineTo(a,d+k);b.stroke()};
-mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(b,a,d,c){c=E.prototype.size;null!=a&&(c=mxUtils.getValue(a.style,"size",c)*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+c,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,a,d,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,
+mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(b,a,d,c){c=F.prototype.size;null!=a&&(c=mxUtils.getValue(a.style,"size",c)*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+c,d.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,a,d,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,
arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,a,d,c){c=parseFloat(a.style[mxConstants.STYLE_STROKEWIDTH]||1)*a.view.scale/2-1;null!=a.style.backboneSize&&(c+=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()&&(c=-1*(c+1)),new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,d.y)));
-d.y<b.getCenterY()&&(c+=1,c*=-1);return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(b,a,d,c,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((c-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(c/2,f);b.lineTo(c/2,e);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,c,e){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(c/2,f+g);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-f)/2-g,f/2);b.quadTo((c-f)/2-g,f+g,c/2,f+g);b.quadTo((c+f)/2+g,f+g,(c+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
+d.y<b.getCenterY()&&(c+=1,c*=-1);return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,d.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(b,a,d,c,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(a,d);b.ellipse((c-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(c/2,f);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
+J;mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.inset=2;L.prototype.paintBackground=function(b,a,d,c,e){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(c/2,f+g);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-f)/2-g,f/2);b.quadTo((c-f)/2-g,f+g,c/2,f+g);b.quadTo((c+f)/2+g,f+g,(c+f)/2+g,f/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
L;mxUtils.extend(Q,mxCylinder);Q.prototype.jettyWidth=32;Q.prototype.jettyHeight=12;Q.prototype.redrawPath=function(b,a,d,c,e,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*e-a/2,l=0.7*e-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(c,0),b.lineTo(c,e),b.lineTo(d,e),
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=Q;mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.prototype.paintVertexShape=function(b,a,d,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(a+f,d+f,c-2*f,e-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(a,d,c,e),b.stroke())};mxCellRenderer.prototype.defaultShapes.endState=
U;mxUtils.extend(Y,U);Y.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=Y;mxUtils.extend(O,mxArrowConnector);O.prototype.defaultWidth=4;O.prototype.isOpenEnded=function(){return!0};O.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};O.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=O;mxUtils.extend(D,mxArrowConnector);D.prototype.defaultWidth=
-10;D.prototype.defaultArrowWidth=20;D.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};D.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=D;mxUtils.extend(N,
-mxActor);N.prototype.size=30;N.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=N;mxUtils.extend(P,mxRectangleShape);P.prototype.dx=20;P.prototype.dy=20;P.prototype.isHtmlAllowed=function(){return!1};
-P.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=P;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=
-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(T,mxActor);T.prototype.size=0.375;
-T.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=T;mxUtils.extend(X,mxEllipse);X.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=X;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(W,mxEllipse);W.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=W;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+
+10;D.prototype.defaultArrowWidth=20;D.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};D.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=D;mxUtils.extend(T,
+mxActor);T.prototype.size=30;T.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=T;mxUtils.extend(M,mxRectangleShape);M.prototype.dx=20;M.prototype.dy=20;M.prototype.isHtmlAllowed=function(){return!1};
+M.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=M;mxUtils.extend(K,mxActor);K.prototype.dx=20;K.prototype.dy=20;K.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=K;mxUtils.extend($,mxActor);$.prototype.dx=20;$.prototype.dy=20;$.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=$;mxUtils.extend(N,mxActor);N.prototype.arrowWidth=
+0.3;N.prototype.arrowSize=0.2;N.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=N;mxUtils.extend(I,mxActor);I.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",N.prototype.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",N.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=I;mxUtils.extend(P,mxActor);P.prototype.size=0.1;P.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=P;mxUtils.extend(W,mxActor);W.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=W;mxUtils.extend(fa,mxActor);fa.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=fa;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(S,mxActor);S.prototype.size=0.375;
+S.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=S;mxUtils.extend(X,mxEllipse);X.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=X;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(V,mxEllipse);V.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=V;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;
-b.begin();b.moveTo(a,d);b.lineTo(a,d+e);b.moveTo(a,f);b.lineTo(a+10,f-5);b.moveTo(a,f);b.lineTo(a+10,f+5);b.moveTo(a,f);b.lineTo(a+c,f);b.moveTo(a+c,d);b.lineTo(a+c,d+e);b.moveTo(a+c,f);b.lineTo(a+c-10,f-5);b.moveTo(a+c,f);b.lineTo(a+c-10,f+5);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=ca;mxUtils.extend($,mxEllipse);$.prototype.paintVertexShape=function(b,a,d,c,e){this.outline||b.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=
+b.begin();b.moveTo(a,d);b.lineTo(a,d+e);b.moveTo(a,f);b.lineTo(a+10,f-5);b.moveTo(a,f);b.lineTo(a+10,f+5);b.moveTo(a,f);b.lineTo(a+c,f);b.moveTo(a+c,d);b.lineTo(a+c,d+e);b.moveTo(a+c,f);b.lineTo(a+c-10,f-5);b.moveTo(a+c,f);b.lineTo(a+c-10,f+5);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=ca;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(b,a,d,c,e){this.outline||b.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=
this.style&&(b.setStrokeColor(this.stroke),b.rect(a,d,c,e),b.fill(),"1"==mxUtils.getValue(this.style,"top","1")&&(b.begin(),b.moveTo(a,d),b.lineTo(a+c,d),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(b.begin(),b.moveTo(a+c,d),b.lineTo(a+c,d+e),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(b.begin(),b.moveTo(a+c,d+e),b.lineTo(a,d+e),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(b.begin(),b.moveTo(a,d+e),b.lineTo(a,d),b.end(),b.stroke()))};
-mxCellRenderer.prototype.defaultShapes.partialRectangle=$;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(a+c/2,d),b.lineTo(a+c/2,d+e)):(b.moveTo(a,d+e/2),b.lineTo(a+c,d+e/2));b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=fa;mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c,
+mxCellRenderer.prototype.defaultShapes.partialRectangle=Z;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(b,a,d,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(a+c/2,d),b.lineTo(a+c/2,d+e)):(b.moveTo(a,d+e/2),b.lineTo(a+c,d+e/2));b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=ea;mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c,
e/2);b.moveTo(0,0);b.lineTo(c-a,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-a,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.delay=ia;mxUtils.extend(ba,mxActor);ba.prototype.size=0.2;ba.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(e,c);var f=Math.max(0,Math.min(a,a*parseFloat(mxUtils.getValue(this.style,"size",this.size))));a=(e-f)/2;d=a+f;var g=(c-f)/2,f=g+f;b.moveTo(0,a);b.lineTo(g,a);b.lineTo(g,0);b.lineTo(f,0);b.lineTo(f,a);b.lineTo(c,a);b.lineTo(c,d);b.lineTo(f,d);
b.lineTo(f,e);b.lineTo(g,e);b.lineTo(g,d);b.lineTo(0,d);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.cross=ba;mxUtils.extend(ka,mxActor);ka.prototype.size=0.25;ka.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c,e/2);d=Math.min(c-a,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(d,0);b.lineTo(c-a,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-a,e);b.lineTo(d,e);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.display=ka;mxMarker.addMarker("dash",
function(b,a,d,c,e,f,g,k,l,n){var m=e*(g+l+1),p=f*(g+l+1);return function(){b.begin();b.moveTo(c.x-m/2-p/2,c.y-p/2+m/2);b.lineTo(c.x+p/2-3*m/2,c.y-3*p/2-m/2);b.stroke()}});mxMarker.addMarker("cross",function(b,a,d,c,e,f,g,k,l,n){var m=e*(g+l+1),p=f*(g+l+1);return function(){b.begin();b.moveTo(c.x-m/2-p/2,c.y-p/2+m/2);b.lineTo(c.x+p/2-3*m/2,c.y-3*p/2-m/2);b.moveTo(c.x-m/2+p/2,c.y-p/2-m/2);b.lineTo(c.x-p/2-3*m/2,c.y-3*p/2+m/2);b.stroke()}});mxMarker.addMarker("circle",va);mxMarker.addMarker("circlePlus",
-function(b,a,d,c,e,f,g,k,l,n){var m=c.clone(),p=va.apply(this,arguments),u=e*(g+2*l),t=f*(g+2*l);return function(){p.apply(this,arguments);b.begin();b.moveTo(m.x-e*l,m.y-f*l);b.lineTo(m.x-2*u+e*l,m.y-2*t+f*l);b.moveTo(m.x-u-t+f*l,m.y-t+u-e*l);b.lineTo(m.x+t-u-f*l,m.y-t-u+e*l);b.stroke()}});mxMarker.addMarker("async",function(b,a,d,c,e,f,g,k,l,n){a=1.118*e*l;d=1.118*f*l;e*=g+l;f*=g+l;var m=c.clone();m.x-=a;m.y-=d;c.x+=1*-e-a;c.y+=1*-f-d;return function(){b.begin();b.moveTo(m.x,m.y);k?b.lineTo(m.x-
+function(b,a,d,c,e,f,g,k,l,n){var m=c.clone(),p=va.apply(this,arguments),t=e*(g+2*l),u=f*(g+2*l);return function(){p.apply(this,arguments);b.begin();b.moveTo(m.x-e*l,m.y-f*l);b.lineTo(m.x-2*t+e*l,m.y-2*u+f*l);b.moveTo(m.x-t-u+f*l,m.y-u+t-e*l);b.lineTo(m.x+u-t-f*l,m.y-u-t+e*l);b.stroke()}});mxMarker.addMarker("async",function(b,a,d,c,e,f,g,k,l,n){a=1.118*e*l;d=1.118*f*l;e*=g+l;f*=g+l;var m=c.clone();m.x-=a;m.y-=d;c.x+=1*-e-a;c.y+=1*-f-d;return function(){b.begin();b.moveTo(m.x,m.y);k?b.lineTo(m.x-
e-f/2,m.y-f+e/2):b.lineTo(m.x+f/2-e,m.y-f-e/2);b.lineTo(m.x-e,m.y-f);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(a,d,c,e,f,g,k,l,n,m){f*=k+n;g*=k+n;var p=e.clone();return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-f-g/b,p.y-g+f/b):a.lineTo(p.x+g/b-f,p.y-g-f/b);a.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ha=function(b,a,d,c,e){b=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);
b.execute=function(){for(var b=0;b<a.length;b++)this.copyStyle(a[b])};b.getPosition=d;b.setPosition=c;b.ignoreGrid=null!=e?e:!0;return b},ma=function(b,a){return ha(b,[mxConstants.STYLE_ARCSIZE],function(d){var c=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100,e=null!=a?a:d.height/8;return new mxPoint(d.x+d.width-Math.min(Math.max(d.width/2,d.height/2),Math.min(d.width,d.height)*c),d.y+e)},function(b,a,d){b=Math.min(50,Math.max(0,
100*(b.width-a.x+b.x)/Math.min(b.width,b.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(b)})},la=function(){return function(b){var a=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a}},ja=function(b){return function(a){var d=[ha(a,["size"],function(a){var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(a.x+0.75*d*a.width,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,
Math.min(b,(d.x-a.x)/(0.75*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ma(a));return d}},pa=function(b,a,d){d=null!=d?d:1;return function(c){var e=[ha(c,["size"],function(a){var d=parseFloat(mxUtils.getValue(this.state.style,"size",b));return new mxPoint(a.x+d*a.width,a.getCenterY())},function(b,a){this.state.style.size=Math.max(0,Math.min(d,(a.x-b.x)/b.width))})];a&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ma(c));return e}},ta=function(b,a,d){return function(c){var e=
[ha(c,["size"],function(d){var c=Math.max(0,Math.min(d.width,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"size",a)))))*b;return new mxPoint(d.x+c,d.y+c)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,d.x-a.x),Math.min(a.height,d.y-a.y)))/b)})];d&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ma(c));return e}},xa=function(b){return function(a){return[ha(a,["arrowWidth","arrowSize"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",J.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",J.prototype.arrowSize)));return new mxPoint(a.x+(1-c)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},oa=function(b,a,d,c,e){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,n=d?f[0]:f[g],m=d?f[1]:f[g-
-1],p=m.x-n.x,u=m.y-n.y,t=Math.sqrt(p*p+u*u);return ha(b,a,function(b){b=c.call(this,t,p/t,u/t,n,m);return new mxPoint(b.x/l-k.x,b.y/l-k.y)},function(b,a,d){b=Math.sqrt(p*p+u*u);a.x=(a.x+k.x)*l;a.y=(a.y+k.y)*l;e.call(this,b,p/b,u/b,n,m,a,d)})},ya=function(b,a,d){return oa(b,["width"],a,function(a,c,e,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+c*a/4+e*g/2,f.y+e*a/4-c*g/2)},function(a,c,e,f,g,k){a=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));b.style.width=Math.round(2*
+"arrowWidth",N.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",N.prototype.arrowSize)));return new mxPoint(a.x+(1-c)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},oa=function(b,a,d,c,e){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,n=d?f[0]:f[g],m=d?f[1]:f[g-
+1],p=m.x-n.x,t=m.y-n.y,u=Math.sqrt(p*p+t*t);return ha(b,a,function(b){b=c.call(this,u,p/u,t/u,n,m);return new mxPoint(b.x/l-k.x,b.y/l-k.y)},function(b,a,d){b=Math.sqrt(p*p+t*t);a.x=(a.x+k.x)*l;a.y=(a.y+k.y)*l;e.call(this,b,p/b,t/b,n,m,a,d)})},ya=function(b,a,d){return oa(b,["width"],a,function(a,c,e,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+c*a/4+e*g/2,f.y+e*a/4-c*g/2)},function(a,c,e,f,g,k){a=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));b.style.width=Math.round(2*
a)/b.view.scale-d})},ua={link:function(b){return[ya(b,!0,10),ya(b,!1,10)]},flexArrow:function(b){var a=b.view.graph.gridSize/b.view.scale,d=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(d.push(oa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(a,d,c,e,f){a=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+
d*(f+b.shape.strokewidth*b.view.scale)+c*a/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)-d*a/2)},function(d,c,e,f,g,k,l){d=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*d)/b.view.scale;mxEvent.isControlDown(l.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<a/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),d.push(oa(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(a,d,c,e,f){a=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+d*(f+b.shape.strokewidth*
@@ -2657,40 +2657,40 @@ d,c,e,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",E.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",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",u.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",ba.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",N.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",P.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",P.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",
+"size",T.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",P.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",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)))})];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",K.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",K.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",$.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",$.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",T.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=
+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",S.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(t.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,p=ra.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=k){var t=k;b=function(b,a,d){b-=t.x;var c=
-a-t.y;a=(p*b-m*c)/(l*p-n*m);b=(n*b-l*c)/(n*m-l*p);u?(d&&(t=new mxPoint(t.x+l*a,t.y+n*a),e.push(t)),t=new mxPoint(t.x+m*b,t.y+p*b)):(d&&(t=new mxPoint(t.x+m*b,t.y+p*b),e.push(t)),t=new mxPoint(t.x+l*a,t.y+n*a));e.push(t)};null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,a){if(a==mxEdgeStyle.IsometricConnector){var d=
+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,p=ra.y,t="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=k){var u=k;b=function(b,a,d){b-=u.x;var c=
+a-u.y;a=(p*b-m*c)/(l*p-n*m);b=(n*b-l*c)/(n*m-l*p);t?(d&&(u=new mxPoint(u.x+l*a,u.y+n*a),e.push(u)),u=new mxPoint(u.x+m*b,u.y+p*b)):(d&&(u=new mxPoint(u.x+m*b,u.y+p*b),e.push(u)),u=new mxPoint(u.x+l*a,u.y+n*a));e.push(u)};null==c&&(c=new mxPoint(k.x+(g.x-k.x)/2,k.y+(g.y-k.y)/2));b(c.x,c.y,!0);b(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,a){if(a==mxEdgeStyle.IsometricConnector){var d=
new mxElbowEdgeHandler(b);d.snapToTerminals=!1;return d}return Da.apply(this,arguments)};c.prototype.constraints=[];f.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;b.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
-mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;
-N.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;T.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),
+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;M.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;
+T.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;S.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)];C.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)];Q.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,
0.2),!1),new mxConnectionConstraint(new mxPoint(0.1,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(0.75,0.25),!1),new mxConnectionConstraint(new mxPoint(0.9,0.5),!1),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)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0.5,
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)];u.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,
+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)];t.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)];J.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)];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),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];E.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.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;$.prototype.constraints=null;K.prototype.constraints=null;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];I.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;W.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)];fa.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...",
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),c=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,c);var e=c.getChildren(c.getChildAt(c.getRoot(),0));f.graph.setSelectionCells(f.graph.importCells(e))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -2733,7 +2733,7 @@ function(){d.isEnabled()&&c.clearDefaultStyle()},null,null,"Ctrl+Shift+R");this.
e-m));e=Math.round(d.snap(d.popupMenuHandler.triggerY/e-c));a.addPointAt(a.state,m,e)}}});this.addAction("removeWaypoint",function(){var b=c.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(){var b=d.getSelectionCells();if(null!=b){d.getModel().beginUpdate();try{for(var a=0;a<b.length;a++){var c=b[a];if(d.getModel().isEdge(c)){var e=d.getCellGeometry(c);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(c,
e))}}}finally{d.getModel().endUpdate()}}});e=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,"Ctrl+,");e=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,"Ctrl+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+
"):",a=d.getView().getState(d.getSelectionCell()),e="";null!=a&&(e=a.style[mxConstants.STYLE_IMAGE]||e);var f=d.cellEditor.saveSelection();c.showImageDialog(b,e,function(b,a,c){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(b,a,c);else{var e=d.getSelectionCells();if(null!=b){var g=null;d.getModel().beginUpdate();try{if(0==e.length)var k=d.getFreeInsertPoint(),g=e=[d.insertVertex(d.getDefaultParent(),null,"",k.x,k.y,a,c,"shape\x3dimage;imageAspect\x3d0;aspect\x3dfixed;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;")];
-d.setCellStyles(mxConstants.STYLE_IMAGE,b,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=a&&null!=c){var A=e[0],x=d.getModel().getGeometry(A);null!=x&&(x=x.clone(),x.width=a,x.height=c,d.getModel().setGeometry(A,x))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),
+d.setCellStyles(mxConstants.STYLE_IMAGE,b,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=a&&null!=c){var z=e[0],x=d.getModel().getGeometry(z);null!=x&&(x=x.clone(),x.width=a,x.height=c,d.getModel().setGeometry(z,x))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),
!d.cellEditor.isContentEditing())}}).isEnabled=b;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),c.actions.get("image").funct())}).isEnabled=b;e=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(c,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",
function(){c.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,"Ctrl+Shift+L");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));e=this.addAction("formatPanel",mxUtils.bind(this,function(){c.toggleFormatPanel()}),null,null,"Ctrl+Shift+P");e.setToggleAction(!0);
e.setSelectedCallback(mxUtils.bind(this,function(){return 0<c.formatWidth}));e=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(c,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("outline"))):
@@ -2804,7 +2804,7 @@ n=l.cloneNode(!1);l.style.backgroundColor="#d7d7d7";n.style.backgroundColor="#d7
mxUtils.write(n,mxResources.get("arrange"));f.appendChild(n);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);c(l,d,k++);c(n,f,k++)}}};BaseFormatPanel=function(a,c,f){this.format=a;this.editorUi=c;this.container=f;this.listeners=[]};
BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),f=null,d=0;d<c.length;d++){var b=a.view.getState(c[d]);if(null!=b&&(b=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),null!=b))if(null==f)f=b;else if(f!=b)return null}return f};
BaseFormatPanel.prototype.installInputHandler=function(a,c,f,d,b,e,g,k){e=null!=e?e:"";k=null!=k?k:!1;var l=this.editorUi,n=l.editor.graph;d=null!=d?d:1;b=null!=b?b:999;var m=null,p=!1,r=mxUtils.bind(this,function(s){var q=k?parseFloat(a.value):parseInt(a.value);!isNaN(q)&&c==mxConstants.STYLE_ROTATION&&(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(b,Math.max(d,isNaN(q)?f:q));if(n.cellEditor.isContentEditing()&&g)p||(p=!0,null!=m&&(n.cellEditor.restoreSelection(m),m=null),g(q),a.value=q+
-e,p=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){n.isEditing()&&n.stopEditing(!0);n.getModel().beginUpdate();try{if(n.setCellStyles(c,q,n.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var t=n.getSelectionCells(),u=0;u<t.length;u++){var v=t[u];if(n.isHtmlLabel(v)){var r=document.createElement("div");r.innerHTML=n.convertValueToString(v);for(var x=r.getElementsByTagName("font"),y=0;y<x.length;y++)x[y].removeAttribute("size"),x[y].style.fontSize=q+"px";n.cellLabelChanged(v,
+e,p=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,f)){n.isEditing()&&n.stopEditing(!0);n.getModel().beginUpdate();try{if(n.setCellStyles(c,q,n.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var u=n.getSelectionCells(),t=0;t<u.length;t++){var v=u[t];if(n.isHtmlLabel(v)){var r=document.createElement("div");r.innerHTML=n.convertValueToString(v);for(var x=r.getElementsByTagName("font"),y=0;y<x.length;y++)x[y].removeAttribute("size"),x[y].style.fontSize=q+"px";n.cellLabelChanged(v,
r.innerHTML)}}}finally{n.getModel().endUpdate()}l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",n.getSelectionCells()))}a.value=q+e;mxEvent.consume(s)});g&&n.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){m=n.cellEditor.saveSelection()}),mxEvent.addListener(a,"touchstart",function(){m=n.cellEditor.saveSelection()}));mxEvent.addListener(a,"change",r);mxEvent.addListener(a,"blur",r);return r};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.style.padding="12px 0px 12px 18px";a.style.borderBottom="1px solid #c0c0c0";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
BaseFormatPanel.prototype.createStepper=function(a,c,f,d,b,e){f=null!=f?f:1;d=null!=d?d:8;if(mxClient.IS_QUIRKS)d-=2;else if(mxClient.IS_MT||8<=document.documentMode)d+=1;var g=document.createElement("div");mxUtils.setPrefixedStyle(g.style,"borderRadius","3px");g.style.border="1px solid rgb(192, 192, 192)";g.style.position="absolute";var k=document.createElement("div");k.style.borderBottom="1px solid rgb(192, 192, 192)";k.style.position="relative";k.style.height=d+"px";k.style.width="10px";k.className=
@@ -2851,9 +2851,9 @@ this.addKeyHandler(g,k);f.getModel().addListener(mxEvent.CHANGE,k);this.listener
ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,f=c.editor.graph,d=this.format.getSelectionState(),b=this.createPanel();b.style.paddingBottom="8px";var e=document.createElement("div");e.style.position="absolute";e.style.width="50px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("size"));b.appendChild(e);var g,k,l,n,m=this.addUnitInput(b,"pt",84,44,function(){g.apply(this,arguments)}),p=this.addUnitInput(b,"pt",20,44,function(){k.apply(this,arguments)}),
r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="52px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r,100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){c.actions.get("autosize").funct()});
b.appendChild(r);this.addLabel(b,mxResources.get("width"),84);this.addLabel(b,mxResources.get("height"),20);mxUtils.br(b);e=document.createElement("div");e.style.paddingTop="8px";e.style.paddingRight="20px";e.style.whiteSpace="nowrap";e.style.textAlign="right";var s=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");s.style.width="100%";e.appendChild(s);b.appendChild(e);this.addKeyHandler(m,v);this.addKeyHandler(p,v);g=this.addGeometryHandler(m,
-function(b,a){0<b.width&&(b.width=Math.max(1,a))});k=this.addGeometryHandler(p,function(b,a){0<b.height&&(b.height=Math.max(1,a))});a.appendChild(b);var q=this.createPanel();q.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("position"));q.appendChild(e);var t=this.addUnitInput(q,"pt",84,44,function(){l.apply(this,arguments)}),u=this.addUnitInput(q,"pt",20,44,
+function(b,a){0<b.width&&(b.width=Math.max(1,a))});k=this.addGeometryHandler(p,function(b,a){0<b.height&&(b.height=Math.max(1,a))});a.appendChild(b);var q=this.createPanel();q.style.paddingBottom="30px";e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("position"));q.appendChild(e);var u=this.addUnitInput(q,"pt",84,44,function(){l.apply(this,arguments)}),t=this.addUnitInput(q,"pt",20,44,
function(){n.apply(this,arguments)});mxUtils.br(q);this.addLabel(q,mxResources.get("left"),84);this.addLabel(q,mxResources.get("top"),20);var v=mxUtils.bind(this,function(a,c,e){d=this.format.getSelectionState();if(!d.containsLabel&&d.vertices.length==f.getSelectionCount()&&null!=d.width&&null!=d.height){b.style.display="";if(e||document.activeElement!=m)m.value=d.width+(""==d.width?"":" pt");if(e||document.activeElement!=p)p.value=d.height+(""==d.height?"":" pt")}else b.style.display="none";if(d.vertices.length==
-f.getSelectionCount()&&null!=d.x&&null!=d.y){q.style.display="";if(e||document.activeElement!=t)t.value=d.x+(""==d.x?"":" pt");if(e||document.activeElement!=u)u.value=d.y+(""==d.y?"":" pt")}else q.style.display="none"});this.addKeyHandler(t,v);this.addKeyHandler(u,v);f.getModel().addListener(mxEvent.CHANGE,v);this.listeners.push({destroy:function(){f.getModel().removeListener(v)}});v();l=this.addGeometryHandler(t,function(b,a){b.relative?b.offset.x=a:b.x=a});n=this.addGeometryHandler(u,function(b,
+f.getSelectionCount()&&null!=d.x&&null!=d.y){q.style.display="";if(e||document.activeElement!=u)u.value=d.x+(""==d.x?"":" pt");if(e||document.activeElement!=t)t.value=d.y+(""==d.y?"":" pt")}else q.style.display="none"});this.addKeyHandler(u,v);this.addKeyHandler(t,v);f.getModel().addListener(mxEvent.CHANGE,v);this.listeners.push({destroy:function(){f.getModel().removeListener(v)}});v();l=this.addGeometryHandler(u,function(b,a){b.relative?b.offset.x=a:b.x=a});n=this.addGeometryHandler(t,function(b,
a){b.relative?b.offset.y=a:b.y=a});a.appendChild(q)};
ArrangePanel.prototype.addGeometryHandler=function(a,c){function f(e){if(""!=a.value){var f=parseFloat(a.value);if(f!=b){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),l=0;l<k.length;l++)if(d.getModel().isVertex(k[l])){var n=d.getCellGeometry(k[l]);null!=n&&(n=n.clone(),c(n,f),d.getModel().setGeometry(k[l],n))}}finally{d.getModel().endUpdate()}b=f;a.value=f+" pt"}else isNaN(f)&&(a.value=b+" pt")}mxEvent.consume(e)}var d=this.editorUi.editor.graph,b=null;mxEvent.addListener(a,"blur",
f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){b=a.value});return f};
@@ -2867,44 +2867,44 @@ e.style.paddingBottom="6px";a.appendChild(e);e=this.createPanel();e.style.paddin
l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";k=e.cloneNode(!1);k.style.marginLeft="-3px";var n=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);n[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");n[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");n[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+
")");var m=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(n);this.styleButtons([m]);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 u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),v=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([u,v,A]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var x,y,C,z,B,F,G;d.cellEditor.isContentEditing()?(u.style.display="none",v.style.display="none",
-A.style.display="none",m.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),y=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
-C.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)):(n[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 E=document.createElement("select");E.style.position="absolute";E.style.right="20px";E.style.width="97px";E.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,
+[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([r,s,q]);if(d.cellEditor.isContentEditing()){var u=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([u])}var t=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),v=this.editorUi.toolbar.addButton("geSprite-middle",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([t,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var x,y,C,A,B,E,G;d.cellEditor.isContentEditing()?(t.style.display="none",v.style.display="none",
+z.style.display="none",m.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),y=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
+C.style.marginRight="9px",u=p.cloneNode(!1),u.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
+!1,null)},u),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},u),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},u)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),u.style.height="40"),a.appendChild(u)):(n[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(" "),J={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]));E.appendChild(L)}p.appendChild(E);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 Q=document.createElement("select");Q.style.position="absolute";Q.style.right="20px";Q.style.width="97px";Q.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],U={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<L.length;t++){var Y=document.createElement("option");Y.setAttribute("value",L[t]);mxUtils.write(Y,
-mxResources.get(L[t]));Q.appendChild(Y)}H.appendChild(Q);d.isEditing()||(a.appendChild(p),mxEvent.addListener(E,"change",function(b){d.getModel().beginUpdate();try{var a=I[E.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)}),
+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]},u=0;u<H.length;u++){var L=document.createElement("option");L.setAttribute("value",H[u]);mxUtils.write(L,mxResources.get(H[u]));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 Q=document.createElement("select");Q.style.position="absolute";Q.style.right="20px";Q.style.width="97px";Q.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],U={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},u=0;u<L.length;u++){var Y=document.createElement("option");Y.setAttribute("value",L[u]);mxUtils.write(Y,
+mxResources.get(L[u]));Q.appendChild(Y)}H.appendChild(Q);d.isEditing()||(a.appendChild(p),mxEvent.addListener(F,"change",function(b){d.getModel().beginUpdate();try{var a=J[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(Q,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,U[Q.value],d.getSelectionCells());mxEvent.consume(b)}));var O=document.createElement("input");O.style.textAlign="right";O.style.marginTop="4px";mxClient.IS_QUIRKS||(O.style.position="absolute",O.style.right="32px");O.style.width="46px";O.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(O);var D=null,p=this.installInputHandler(O,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){D=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=D+"px";window.setTimeout(function(){O.value=D+" pt";D=null},0);break}},!0),p=this.createStepper(O,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=O.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 N=null,P="#ffffff",M=null,V="#000000",J=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){N=b},destroy:function(){N=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=
-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",
+k.style.cssFloat="right";var T=null,M="#ffffff",K=null,$="#000000",N=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return M},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){T=b},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");N.style.fontWeight="bold";var I=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");I.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return $},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){K=b},destroy:function(){K=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){N.style.display=null==b||b==mxConstants.NONE?"none":"";I.style.display=
+N.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(N);d.cellEditor.isContentEditing()||g.appendChild(I);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,T,X=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 W=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(){T.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,
+mxResources.get("spacing"));k.appendChild(p);var P,W,fa,da,S,X=this.addUnitInput(k,"pt",91,44,function(){P.apply(this,arguments)}),aa=this.addUnitInput(k,"pt",20,44,function(){W.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 V=this.addUnitInput(k,"pt",162,44,function(){fa.apply(this,arguments)}),R=this.addUnitInput(k,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(k,
+"pt",20,44,function(){S.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,Z=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){Z=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!=F?F.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!=F?F.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=B&&null!=F&&d.deleteColumn(B,F.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=G&&
+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),
+this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=B&&d.selectNode(d.insertColumn(B,null!=E?E.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=B&&null!=E&&d.deleteColumn(B,E.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();
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,c){return"#"+("0"+Number(a).toString(16)).substr(-2)+
("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).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,c){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).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(n[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(n[1],(a&mxConstants.FONT_ITALIC)==
+e)];this.styleButtons(p);p[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(g),mxUtils.br(g));g.appendChild(e);a.appendChild(g);A=g}else a.appendChild(g),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var ea=mxUtils.bind(this,function(a,d,e){b=this.format.getSelectionState();a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0);c(n[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(n[1],(a&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC);c(n[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(m,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=O)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),O.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(u,a==mxConstants.ALIGN_TOP);c(v,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);E.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(t,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?Q.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?Q.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(Q.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!=X)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_TOP,0)),X.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!=W)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),W.value=isNaN(a)?"":a+" pt"});Z=this.installInputHandler(aa,mxConstants.STYLE_SPACING,2,-999,999," pt");S=this.installInputHandler(X,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");T=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(W,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,fa);this.addKeyHandler(aa,fa);this.addKeyHandler(X,fa);this.addKeyHandler(ga,fa);this.addKeyHandler(R,fa);this.addKeyHandler(W,fa);d.getModel().addListener(mxEvent.CHANGE,fa);this.listeners.push({destroy:function(){d.getModel().removeListener(fa)}});fa();if(d.cellEditor.isContentEditing()){var ia=
+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!=V)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),V.value=isNaN(a)?"":a+" pt"});W=this.installInputHandler(aa,mxConstants.STYLE_SPACING,2,-999,999," pt");P=this.installInputHandler(X,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");S=this.installInputHandler(ga,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");da=this.installInputHandler(R,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");fa=this.installInputHandler(V,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,ea);this.addKeyHandler(aa,ea);this.addKeyHandler(X,ea);this.addKeyHandler(ga,ea);this.addKeyHandler(R,ea);this.addKeyHandler(V,ea);d.getModel().addListener(mxEvent.CHANGE,ea);this.listeners.push({destroy:function(){d.getModel().removeListener(ea)}});ea();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(C,"justify"==a.textAlign);c(y,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(x,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);F=null==B?null:d.getParentByName(b,"TD",B);z.style.display=null!=B?"":"none";if(document.activeElement!=O){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=D?(b.removeAttribute("size"),b.style.fontSize=D+"px",D=null):O.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!=N&&(P="#"==e.charAt(0)?e:null,N(P,!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,
+a.textAlign);c(C,"justify"==a.textAlign);c(y,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(x,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!=O){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=D?(b.removeAttribute("size"),b.style.fontSize=D+"px",D=null):O.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);Z.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!=K&&($="#"==b.charAt(0)?b:"#000000",K($,!0));null!=T&&(M="#"==e.charAt(0)?e:null,T(M,!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))};
@@ -2914,19 +2914,19 @@ StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,
null==b||b==mxConstants.NONE?"none":""}),e="image"==f.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,g=this.createCellColorOption(mxResources.get("fill"),e,"#ffffff");g.style.fontWeight="bold";e=mxUtils.getValue(f.style,e,null);b.style.display=null!=e&&e!=mxConstants.NONE&&f.fill&&"image"!=f.style.shape?"":"none";for(var e=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],k=0;k<e.length;k++){var l=document.createElement("option");
l.setAttribute("value",e[k]);mxUtils.write(l,mxResources.get(e[k]));d.appendChild(l)}b.appendChild(d);var n=mxUtils.bind(this,function(){f=this.format.getSelectionState();var c=mxUtils.getValue(f.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);d.value=c;a.style.display=f.fill?"":"none";c=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,null);b.style.display=!f.fill||f.containsImage||null==c||c==mxConstants.NONE?"none":""});c.getModel().addListener(mxEvent.CHANGE,
n);this.listeners.push({destroy:function(){c.getModel().removeListener(n)}});n();mxEvent.addListener(d,"change",function(b){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,c.getSelectionCells());mxEvent.consume(b)});a.appendChild(g);a.appendChild(b);"swimlane"==f.style.shape&&a.appendChild(this.createCellColorOption(mxResources.get("laneColor"),"swimlaneFillColor","#ffffff"));return a};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(u.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));u.value=c+" pt";mxEvent.consume(a)}function f(a){var c=parseInt(v.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(t.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));t.value=c+" pt";mxEvent.consume(a)}function f(a){var c=parseInt(v.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(b.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",b.getSelectionCells())));v.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var g=document.createElement("div");g.style.fontWeight=
"bold";var k=document.createElement("select");k.style.position="absolute";k.style.marginTop="-2px";k.style.right="72px";k.style.width="80px";for(var l=["sharp","rounded","curved"],n=0;n<l.length;n++){var m=document.createElement("option");m.setAttribute("value",l[n]);mxUtils.write(m,mxResources.get(l[n]));k.appendChild(m)}mxEvent.addListener(k,"change",function(a){b.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],e=["0",null];"rounded"==k.value?e=["1",null]:
"curved"==k.value&&(e=[null,"1"]);for(var f=0;f<c.length;f++)b.setCellStyles(c[f],e[f],b.getSelectionCells());d.fireEvent(new mxEventObject("styleChanged","keys",c,"values",e,"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(k,"click",function(b){mxEvent.consume(b)});var p="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,l=this.createCellColorOption(mxResources.get("line"),p,"#000000");l.appendChild(k);g.appendChild(l);
var r=g.cloneNode(!1);r.style.fontWeight="normal";r.style.whiteSpace="nowrap";r.style.position="relative";r.style.paddingLeft="16px";r.style.marginBottom="2px";r.style.marginTop="2px";r.className="geToolbarContainer";var s=mxUtils.bind(this,function(b,a,d,c,e){b=this.editorUi.menus.styleChange(b,"",c,e,"geIcon",null);c=document.createElement("div");c.style.width=a+"px";c.style.height="1px";c.style.borderBottom="1px "+d+" black";c.style.paddingTop="6px";b.firstChild.firstChild.style.padding="0px 4px 0px 4px";
b.firstChild.firstChild.style.width=a+"px";b.firstChild.firstChild.appendChild(c);return b}),n=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(b){s(b,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));s(b,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));s(b,75,
-"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");s(b,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");s(b,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),q=r.cloneNode(!1),t=this.editorUi.toolbar.addMenuFunctionInContainer(q,"geSprite-connection",
+"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");s(b,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");s(b,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),q=r.cloneNode(!1),u=this.editorUi.toolbar.addMenuFunctionInContainer(q,"geSprite-connection",
mxResources.get("connection"),!1,mxUtils.bind(this,function(b){this.editorUi.menus.styleChange(b,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(b,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",
mxResources.get("link"));this.editorUi.menus.styleChange(b,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(b,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),
m=this.editorUi.toolbar.addMenuFunctionInContainer(q,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(b){s(b,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));s(b,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));s(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
-mxResources.get("dotted")+" (1)");s(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");s(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),l=r.cloneNode(!1),u=document.createElement("input");u.style.textAlign="right";u.style.marginTop="2px";u.style.width="41px";u.setAttribute("title",mxResources.get("linewidth"));r.appendChild(u);
-var v=u.cloneNode(!0);q.appendChild(v);var A=this.createStepper(u,c,1,9);A.style.display=u.style.display;A.style.marginTop="2px";r.appendChild(A);var x=this.createStepper(v,f,1,9);x.style.display=v.style.display;x.style.marginTop="2px";q.appendChild(x);mxClient.IS_QUIRKS?(u.style.height="17px",v.style.height="17px"):(u.style.position="absolute",u.style.right="32px",u.style.height="15px",A.style.right="20px",v.style.position="absolute",v.style.right="32px",v.style.height="15px",x.style.right="20px");
-mxEvent.addListener(u,"blur",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"blur",f);mxEvent.addListener(v,"change",f);mxClient.IS_QUIRKS&&(mxUtils.br(l),mxUtils.br(l));var y=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(b){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
+mxResources.get("dotted")+" (1)");s(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");s(b,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),l=r.cloneNode(!1),t=document.createElement("input");t.style.textAlign="right";t.style.marginTop="2px";t.style.width="41px";t.setAttribute("title",mxResources.get("linewidth"));r.appendChild(t);
+var v=t.cloneNode(!0);q.appendChild(v);var z=this.createStepper(t,c,1,9);z.style.display=t.style.display;z.style.marginTop="2px";r.appendChild(z);var x=this.createStepper(v,f,1,9);x.style.display=v.style.display;x.style.marginTop="2px";q.appendChild(x);mxClient.IS_QUIRKS?(t.style.height="17px",v.style.height="17px"):(t.style.position="absolute",t.style.right="32px",t.style.height="15px",z.style.right="20px",v.style.position="absolute",v.style.right="32px",v.style.height="15px",x.style.right="20px");
+mxEvent.addListener(t,"blur",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"blur",f);mxEvent.addListener(v,"change",f);mxClient.IS_QUIRKS&&(mxUtils.br(l),mxUtils.br(l));var y=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(b){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,
@@ -2942,7 +2942,7 @@ null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.ed
null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,
"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",
null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))})),
-z=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(b){if("connector"==e.style.shape||"flexArrow"==e.style.shape)this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon geSprite geSprite-noarrow",null,!1).setAttribute("title",mxResources.get("none")),"connector"==e.style.shape?(this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,
+A=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(b){if("connector"==e.style.shape||"flexArrow"==e.style.shape)this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon geSprite geSprite-noarrow",null,!1).setAttribute("title",mxResources.get("none")),"connector"==e.style.shape?(this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,
1],"geIcon geSprite geSprite-endclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(b,
"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(b,
"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-endblockthin",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],"geIcon geSprite geSprite-endasync",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],"geIcon geSprite geSprite-endoval",null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,
@@ -2952,21 +2952,21 @@ null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.ed
"endFill"],[mxConstants.ARROW_DIAMOND,0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),
this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],
["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(b,
-"",[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(y);this.addArrow(C);
-this.addArrow(z);A=this.addArrow(n,9);A.className="geIcon";A.style.width="84px";x=this.addArrow(m,9);x.className="geIcon";x.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 F=document.createElement("div");F.style.width="23px";F.style.height="1px";F.style.borderBottom="1px solid black";F.style.marginBottom="9px";x.appendChild(F);n.style.height="15px";m.style.height=
-"15px";t.style.height="15px";y.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";z.style.marginLeft="3px";z.style.height="17px";a.appendChild(g);a.appendChild(q);a.appendChild(r);n=r.cloneNode(!1);n.style.paddingBottom="6px";n.style.paddingTop="4px";n.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
-n.appendChild(m);var G,E,H=this.addUnitInput(n,"pt",74,33,function(){G.apply(this,arguments)}),I=this.addUnitInput(n,"pt",20,33,function(){E.apply(this,arguments)});mxUtils.br(n);A=document.createElement("div");A.style.height="8px";n.appendChild(A);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));n.appendChild(m);var L,Q,U=this.addUnitInput(n,"pt",74,33,function(){L.apply(this,arguments)}),Y=this.addUnitInput(n,"pt",20,33,function(){Q.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,
+"",[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(u,8);this.addArrow(y);this.addArrow(C);
+this.addArrow(A);z=this.addArrow(n,9);z.className="geIcon";z.style.width="84px";x=this.addArrow(m,9);x.className="geIcon";x.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";z.appendChild(B);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid black";E.style.marginBottom="9px";x.appendChild(E);n.style.height="15px";m.style.height=
+"15px";u.style.height="15px";y.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";A.style.marginLeft="3px";A.style.height="17px";a.appendChild(g);a.appendChild(q);a.appendChild(r);n=r.cloneNode(!1);n.style.paddingBottom="6px";n.style.paddingTop="4px";n.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
+n.appendChild(m);var G,F,H=this.addUnitInput(n,"pt",74,33,function(){G.apply(this,arguments)}),J=this.addUnitInput(n,"pt",20,33,function(){F.apply(this,arguments)});mxUtils.br(n);z=document.createElement("div");z.style.height="8px";n.appendChild(z);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));n.appendChild(m);var L,Q,U=this.addUnitInput(n,"pt",74,33,function(){L.apply(this,arguments)}),Y=this.addUnitInput(n,"pt",20,33,function(){Q.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,
mxResources.get("spacing"),74,50);this.addLabel(n,mxResources.get("size"),20,50);mxUtils.br(n);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";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,
-mxResources.get("perimeter"));g.appendChild(m);var O,D=this.addUnitInput(g,"pt",20,41,function(){O.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(n)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var N=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!=u)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.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,
-null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?B.style.borderBottom="1px dashed black":B.style.borderBottom="1px dotted black":B.style.borderBottom="1px solid black";F.style.borderBottom=B.style.borderBottom;a=y.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==
+mxResources.get("perimeter"));g.appendChild(m);var O,D=this.addUnitInput(g,"pt",20,41,function(){O.apply(this,arguments)});e.edges.length==b.getSelectionCount()?(a.appendChild(l),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(n)):e.vertices.length==b.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(g));var T=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!=t)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),t.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=v)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),v.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,
+null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?B.style.borderBottom="1px dashed black":B.style.borderBottom="1px dotted black":B.style.borderBottom="1px solid black";E.style.borderBottom=B.style.borderBottom;a=y.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==
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"),C,"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(y,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(z,
-30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(z,100));if(f||document.activeElement!=Y)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),Y.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),U.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!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=D)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),D.value=isNaN(a)?"":a+" pt"});Q=this.installInputHandler(Y,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");E=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");O=this.installInputHandler(D,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,N);this.addKeyHandler(Y,N);this.addKeyHandler(U,N);this.addKeyHandler(I,N);this.addKeyHandler(H,N);this.addKeyHandler(D,N);b.getModel().addListener(mxEvent.CHANGE,N);this.listeners.push({destroy:function(){b.getModel().removeListener(N)}});
-N();return a};
+"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";u.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"),C,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"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(y,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(A,
+30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(A,100));if(f||document.activeElement!=Y)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),Y.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),U.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)?
+"":a+" pt";if(f||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=D)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),D.value=isNaN(a)?"":a+" pt"});Q=this.installInputHandler(Y,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");F=this.installInputHandler(J,
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");O=this.installInputHandler(D,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,T);this.addKeyHandler(Y,T);this.addKeyHandler(U,T);this.addKeyHandler(J,T);this.addKeyHandler(H,T);this.addKeyHandler(D,T);b.getModel().addListener(mxEvent.CHANGE,T);this.listeners.push({destroy:function(){b.getModel().removeListener(T)}});
+T();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,n=0,m=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;n++}),p=mxUtils.bind(this,function(b,d,c){f=this.format.getSelectionState();g.innerHTML="";k.innerHTML="";l=g;f.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==f.style.shape&&m(mxResources.get("divider"),
"swimlaneLine",1);f.containsImage||m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);f.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);f.comic&&m(mxResources.get("comic"),"comic",0);0==n&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){c.getModel().removeListener(p)}});p();return a};
@@ -3040,8 +3040,8 @@ Dialog.prototype.lockedImage=!mxClient.IS_SVG?IMAGE_PATH+"/locked.png":"data:ima
Dialog.prototype.unlockedImage=!mxClient.IS_SVG?IMAGE_PATH+"/unlocked.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg\x3d\x3d";
Dialog.prototype.bgOpacity=80;Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.container.parentNode.removeChild(this.container)};
var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=
-function(a,c,f,d){function b(){var b=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);b.style.marginBottom="8px";return b}function e(a,d,c,e){d=null!=d?d:12;var f=document.createElement("table");f.style.borderCollapse="collapse";f.setAttribute("cellspacing","0");f.style.marginBottom="20px";f.style.cellSpacing="0px";var l=document.createElement("tbody");f.appendChild(l);for(var m=a.length/d,p=0;p<m;p++){for(var r=document.createElement("tr"),z=0;z<d;z++)(function(b){var a=
-document.createElement("td");a.style.border="1px solid black";a.style.padding="0px";a.style.width="16px";a.style.height="16px";null==b&&(b=c);"none"==b?a.style.background="url('"+Dialog.prototype.noColorImage+"')":a.style.backgroundColor="#"+b;r.appendChild(a);null!=b&&(a.style.cursor="pointer",mxEvent.addListener(a,"click",function(){"none"==b?(k.fromString("ffffff"),g.value="none"):k.fromString(b)}))})(a[p*d+z]);l.appendChild(r)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
+function(a,c,f,d){function b(){var b=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);b.style.marginBottom="8px";return b}function e(a,d,c,e){d=null!=d?d:12;var f=document.createElement("table");f.style.borderCollapse="collapse";f.setAttribute("cellspacing","0");f.style.marginBottom="20px";f.style.cellSpacing="0px";var l=document.createElement("tbody");f.appendChild(l);for(var m=a.length/d,p=0;p<m;p++){for(var r=document.createElement("tr"),A=0;A<d;A++)(function(b){var a=
+document.createElement("td");a.style.border="1px solid black";a.style.padding="0px";a.style.width="16px";a.style.height="16px";null==b&&(b=c);"none"==b?a.style.background="url('"+Dialog.prototype.noColorImage+"')":a.style.backgroundColor="#"+b;r.appendChild(a);null!=b&&(a.style.cursor="pointer",mxEvent.addListener(a,"click",function(){"none"==b?(k.fromString("ffffff"),g.value="none"):k.fromString(b)}))})(a[p*d+A]);l.appendChild(r)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),
a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",r.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();f.parentNode.replaceChild(b(),f)}));n.appendChild(f);return f}this.editorUi=a;var g=document.createElement("input");g.style.marginBottom="10px";
g.style.width="216px";mxClient.IS_IE&&(g.style.marginTop="10px",document.body.appendChild(g));this.init=function(){mxClient.IS_TOUCH||g.focus()};var k=new jscolor.color(g);k.pickerOnfocus=!1;k.showPicker();var l=document.createElement("div");jscolor.picker.box.style.position="relative";jscolor.picker.box.style.width="230px";jscolor.picker.box.style.height="100px";jscolor.picker.box.style.paddingBottom="10px";l.appendChild(jscolor.picker.box);var n=document.createElement("center");l.appendChild(g);
mxUtils.br(l);b();var m=e("E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" "),12);m.style.marginBottom="8px";m=e("none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" "));
@@ -3055,15 +3055,15 @@ s?(r.removeAttribute("title"),r.style.fontSize="",r.innerHTML=mxResources.get("c
e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",d.pageFormat);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("background")+":");b.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var n=document.createElement("button");n.style.width="18px";
n.style.height="18px";n.style.marginRight="20px";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";var m=d.background;c();mxEvent.addListener(n,"click",function(b){a.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(b)});e.appendChild(n);mxUtils.write(e,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=d.getGridSize();e.appendChild(p);
mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?d.getGridSize():b)});b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+":");b.appendChild(e);e=document.createElement("td");var r=document.createElement("a");r.style.textDecoration="underline";r.style.cursor="pointer";r.style.color="#a0a0a0";var s=d.backgroundImage;mxEvent.addListener(r,"click",function(b){a.showBackgroundImageDialog(function(b){s=
-b;f()});mxEvent.consume(b)});f();e.appendChild(r);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&e.appendChild(q);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=m&&a.setBackgroundColor(m);d.backgroundImage!==
-s&&a.setBackgroundImage(s);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});t.className="geBtn gePrimaryBtn";e.appendChild(t);a.editor.cancelFirst||e.appendChild(q);b.appendChild(e);k.appendChild(b);g.appendChild(k);this.container=g};
-PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function b(b,a,d){if(d||p!=document.activeElement&&r!=document.activeElement){b=!1;for(a=0;a<q.length;a++)d=q[a],A?"custom"==d.key&&(k.value=d.key,A=!1):null!=d.format&&(f.width==d.format.width&&f.height==d.format.height?(k.value=d.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,b=!0):f.width==d.format.height&&f.height==d.format.width&&(k.value=d.key,e.removeAttribute("checked"),
+b;f()});mxEvent.consume(b)});f();e.appendChild(r);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&e.appendChild(q);var u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=m&&a.setBackgroundColor(m);d.backgroundImage!==
+s&&a.setBackgroundImage(s);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});u.className="geBtn gePrimaryBtn";e.appendChild(u);a.editor.cancelFirst||e.appendChild(q);b.appendChild(e);k.appendChild(b);g.appendChild(k);this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function b(b,a,d){if(d||p!=document.activeElement&&r!=document.activeElement){b=!1;for(a=0;a<q.length;a++)d=q[a],z?"custom"==d.key&&(k.value=d.key,z=!1):null!=d.format&&(f.width==d.format.width&&f.height==d.format.height?(k.value=d.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,b=!0):f.width==d.format.height&&f.height==d.format.width&&(k.value=d.key,e.removeAttribute("checked"),
e.defaultChecked=!1,e.checked=!1,g.setAttribute("checked","checked"),g.defaultChecked=!0,b=g.checked=!0));b?(l.style.display="",m.style.display="none"):(p.value=f.width,r.value=f.height,v.setAttribute("selected","selected"),e.setAttribute("checked","checked"),e.defaultChecked=!0,l.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var g=document.createElement("input");
g.setAttribute("name",c);g.setAttribute("type","radio");g.setAttribute("value","landscape");var k=document.createElement("select");k.style.marginBottom="8px";k.style.width="202px";var l=document.createElement("div");l.style.marginLeft="4px";l.style.width="210px";l.style.height="24px";e.style.marginRight="6px";l.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));l.appendChild(c);g.style.marginLeft="10px";g.style.marginRight="6px";l.appendChild(g);
var n=document.createElement("span");n.style.width="100px";mxUtils.write(n,mxResources.get("landscape"));l.appendChild(n);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");p.setAttribute("size","6");p.setAttribute("value",f.width);m.appendChild(p);mxUtils.write(m," x ");var r=document.createElement("input");r.setAttribute("size","6");r.setAttribute("value",f.height);m.appendChild(r);mxUtils.write(m," pt");
-l.style.display="none";m.style.display="none";for(var s={},q=PageSetupDialog.getFormats(),t=0;t<q.length;t++){var u=q[t];s[u.key]=u;var v=document.createElement("option");v.setAttribute("value",u.key);mxUtils.write(v,u.title);k.appendChild(v)}var A=!1;b();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(m);var x=f,y=function(){var b=s[k.value];null!=b.format?(p.value=b.format.width,r.value=b.format.height,m.style.display="none",l.style.display=""):(l.style.display="none",m.style.display=
+l.style.display="none";m.style.display="none";for(var s={},q=PageSetupDialog.getFormats(),u=0;u<q.length;u++){var t=q[u];s[t.key]=t;var v=document.createElement("option");v.setAttribute("value",t.key);mxUtils.write(v,t.title);k.appendChild(v)}var z=!1;b();a.appendChild(k);mxUtils.br(a);a.appendChild(l);a.appendChild(m);var x=f,y=function(){var b=s[k.value];null!=b.format?(p.value=b.format.width,r.value=b.format.height,m.style.display="none",l.style.display=""):(l.style.display="none",m.style.display=
"");b=new mxRectangle(0,0,parseInt(p.value),parseInt(r.value));"custom"!=k.value&&g.checked&&(b=new mxRectangle(0,0,b.height,b.width));if(b.width!=x.width||b.height!=x.height)x=b,null!=d&&d(x)};mxEvent.addListener(c,"click",function(b){e.checked=!0;y();mxEvent.consume(b)});mxEvent.addListener(n,"click",function(b){g.checked=!0;y();mxEvent.consume(b)});mxEvent.addListener(p,"blur",y);mxEvent.addListener(p,"click",y);mxEvent.addListener(r,"blur",y);mxEvent.addListener(r,"click",y);mxEvent.addListener(g,
-"change",y);mxEvent.addListener(e,"change",y);mxEvent.addListener(k,"change",function(){A="custom"==k.value;y()});y();return{set:function(a){f=a;b(null,null,!0)},get:function(){return x},widthInput:p,heightInput:r}};
+"change",y);mxEvent.addListener(e,"change",y);mxEvent.addListener(k,"change",function(){z="custom"==k.value;y()});y();return{set:function(a){f=a;b(null,null,!0)},get:function(){return x},widthInput:p,heightInput:r}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1652)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",
format:new mxRectangle(0,0,584,826)},{key:"custom",title:mxResources.get("custom"),format:null}]};var PrintDialog=function(a){this.create(a)};
PrintDialog.prototype.create=function(a){function c(b){var a=k.checked||n.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=0.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,e=1/f.pageScale;if(a){var g=k.checked?1:parseInt(m.value);isNaN(g)||(e=mxUtils.getScaleForPageCount(g,f,c))}f.getGraphBounds();var l=g=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);e*=d;!a&&f.pageVisible?(d=f.getPageLayout(),g-=d.x*c.width,l-=d.y*c.height):
@@ -3086,28 +3086,28 @@ function(){a.hideDialog();null!=b&&b()});c.className="geBtn";a.editor.cancelFirs
function(b){f.value=b.target.result};d.readAsText(b)}else f.value=a.extractGraphModelFromEvent(b)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);var b=document.createElement("select");b.style.width="180px";b.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));b.appendChild(e)}e=
document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime||b.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),b.appendChild(e));c.appendChild(b);e=mxUtils.button(mxResources.get("ok"),function(){var d=a.editor.graph.zapGremlins(mxUtils.trim(f.value)),c=null;if("new"==
b.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(d,null),window.open(a.getUrl());else if("replace"==b.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(d).documentElement),a.hideDialog()}catch(e){c=e}finally{a.editor.graph.model.endUpdate()}}else if("import"==b.value){a.editor.graph.model.beginUpdate();try{var n=mxUtils.parseXml(d),m=new mxGraphModel;(new mxCodec(n)).decode(n.documentElement,m);var p=m.getChildren(m.getChildAt(m.getRoot(),
-0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(p));a.hideDialog()}catch(r){c=r}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(d);this.container=c},ExportDialog=function(a){function c(){var b=p.value,a=b.lastIndexOf(".");p.value=0<a?b.substring(0,a+1)+r.value:b+"."+r.value;"xml"===r.value?(t.setAttribute("disabled","true"),u.setAttribute("disabled","true"),v.setAttribute("disabled",
-"true")):(t.removeAttribute("disabled"),u.removeAttribute("disabled"),v.removeAttribute("disabled"));"png"===r.value||"svg"===r.value?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}function f(){t.style.backgroundColor=t.value*u.value>MAX_AREA||0>=t.value?"red":"";u.style.backgroundColor=t.value*u.value>MAX_AREA||0>=u.value?"red":""}function d(){var a=Math.max(0,parseInt(v.value))+1,d=parseInt(t.value)/k,c=null;""!=s.value&&s.value!=mxConstants.NONE&&!q.checked&&(c=s.value);return b.getSvg(c,
+0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(p));a.hideDialog()}catch(r){c=r}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(d);this.container=c},ExportDialog=function(a){function c(){var b=p.value,a=b.lastIndexOf(".");p.value=0<a?b.substring(0,a+1)+r.value:b+"."+r.value;"xml"===r.value?(u.setAttribute("disabled","true"),t.setAttribute("disabled","true"),v.setAttribute("disabled",
+"true")):(u.removeAttribute("disabled"),t.removeAttribute("disabled"),v.removeAttribute("disabled"));"png"===r.value||"svg"===r.value?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}function f(){u.style.backgroundColor=u.value*t.value>MAX_AREA||0>=u.value?"red":"";t.style.backgroundColor=u.value*t.value>MAX_AREA||0>=t.value?"red":""}function d(){var a=Math.max(0,parseInt(v.value))+1,d=parseInt(u.value)/k,c=null;""!=s.value&&s.value!=mxConstants.NONE&&!q.checked&&(c=s.value);return b.getSvg(c,
d,a)}var b=a.editor.graph,e=b.getGraphBounds(),g=b.view.scale,k=Math.ceil(e.width/g),l=Math.ceil(e.height/g),n,g=document.createElement("table"),m=document.createElement("tbody"),e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";n.style.width="100px";mxUtils.write(n,mxResources.get("filename")+":");e.appendChild(n);var p=document.createElement("input");p.setAttribute("value",a.editor.getOrCreateFilename());p.style.width="180px";n=document.createElement("td");n.appendChild(p);
e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("format")+":");e.appendChild(n);var r=document.createElement("select");r.style.width="180px";n=document.createElement("option");n.setAttribute("value","png");mxUtils.write(n,mxResources.get("formatPng"));r.appendChild(n);n=document.createElement("option");ExportDialog.showGifOption&&(n.setAttribute("value","gif"),mxUtils.write(n,mxResources.get("formatGif")),
r.appendChild(n));n=document.createElement("option");n.setAttribute("value","jpg");mxUtils.write(n,mxResources.get("formatJpg"));r.appendChild(n);n=document.createElement("option");n.setAttribute("value","pdf");mxUtils.write(n,mxResources.get("formatPdf"));r.appendChild(n);n=document.createElement("option");n.setAttribute("value","svg");mxUtils.write(n,mxResources.get("formatSvg"));r.appendChild(n);ExportDialog.showXmlOption&&(n=document.createElement("option"),n.setAttribute("value","xml"),mxUtils.write(n,
mxResources.get("formatXml")),r.appendChild(n));n=document.createElement("td");n.appendChild(r);e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("backgroundColor")+":");e.appendChild(n);var s=document.createElement("input");s.setAttribute("value",null==b.background||b.background==mxConstants.NONE?"#ffffff":b.background);s.style.width="80px";var q=document.createElement("input");q.setAttribute("type",
-"checkbox");q.checked=null==b.background||b.background==mxConstants.NONE;n=document.createElement("td");n.appendChild(s);n.appendChild(q);mxUtils.write(n,mxResources.get("transparent"));e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("width")+":");e.appendChild(n);var t=document.createElement("input");t.setAttribute("value",k);t.style.width="180px";n=document.createElement("td");n.appendChild(t);
-e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("height")+":");e.appendChild(n);var u=document.createElement("input");u.setAttribute("value",l);u.style.width="180px";n=document.createElement("td");n.appendChild(u);e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("borderWidth")+":");e.appendChild(n);
-var v=document.createElement("input");v.setAttribute("value",k);v.style.width="180px";v.value="0";n=document.createElement("td");n.appendChild(v);e.appendChild(n);m.appendChild(e);g.appendChild(m);mxEvent.addListener(r,"change",c);c();mxEvent.addListener(t,"change",function(){u.value=0<k?Math.ceil(parseInt(t.value)*l/k):"0";f()});mxEvent.addListener(u,"change",function(){t.value=0<l?Math.ceil(parseInt(u.value)*k/l):"0";f()});var A=new mxImageExport,e=document.createElement("tr");n=document.createElement("td");
-n.setAttribute("align","right");n.style.paddingTop="24px";n.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(t.value)&&0>=parseInt(u.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=r.value,e=p.value;if("xml"==c)a.hideDialog(),ExportDialog.saveLocalFile(mxUtils.getXml(a.editor.getGraphXml()),e,c);else if("svg"==c){var f=mxUtils.getXml(d());f.length<MAX_REQUEST_SIZE?(a.hideDialog(),ExportDialog.saveLocalFile(f,e,c)):(mxUtils.alert(mxResources.get("drawingTooLarge")),
-mxUtils.popup(f))}else{var g=null,l=parseInt(t.value)||0,n=parseInt(u.value)||0,m=Math.max(0,parseInt(v.value))+1,f=ExportDialog.getExportParameter(a,c);if("function"==typeof f)g=f();else{var f=parseInt(t.value)/k,y=b.getGraphBounds(),x=b.view.scale,Q=mxUtils.createXmlDocument(),U=Q.createElement("output");Q.appendChild(U);Q=new mxXmlCanvas2D(U);Q.translate(Math.floor((m/f-y.x)/x),Math.floor((m/f-y.y)/x));Q.scale(f/x);A.drawState(b.getView().getState(b.model.root),Q);l=Math.ceil(y.width*f/x+2*m);
+"checkbox");q.checked=null==b.background||b.background==mxConstants.NONE;n=document.createElement("td");n.appendChild(s);n.appendChild(q);mxUtils.write(n,mxResources.get("transparent"));e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("width")+":");e.appendChild(n);var u=document.createElement("input");u.setAttribute("value",k);u.style.width="180px";n=document.createElement("td");n.appendChild(u);
+e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("height")+":");e.appendChild(n);var t=document.createElement("input");t.setAttribute("value",l);t.style.width="180px";n=document.createElement("td");n.appendChild(t);e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("borderWidth")+":");e.appendChild(n);
+var v=document.createElement("input");v.setAttribute("value",k);v.style.width="180px";v.value="0";n=document.createElement("td");n.appendChild(v);e.appendChild(n);m.appendChild(e);g.appendChild(m);mxEvent.addListener(r,"change",c);c();mxEvent.addListener(u,"change",function(){t.value=0<k?Math.ceil(parseInt(u.value)*l/k):"0";f()});mxEvent.addListener(t,"change",function(){u.value=0<l?Math.ceil(parseInt(t.value)*k/l):"0";f()});var z=new mxImageExport,e=document.createElement("tr");n=document.createElement("td");
+n.setAttribute("align","right");n.style.paddingTop="24px";n.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(u.value)&&0>=parseInt(t.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=r.value,e=p.value;if("xml"==c)a.hideDialog(),ExportDialog.saveLocalFile(mxUtils.getXml(a.editor.getGraphXml()),e,c);else if("svg"==c){var f=mxUtils.getXml(d());f.length<MAX_REQUEST_SIZE?(a.hideDialog(),ExportDialog.saveLocalFile(f,e,c)):(mxUtils.alert(mxResources.get("drawingTooLarge")),
+mxUtils.popup(f))}else{var g=null,l=parseInt(u.value)||0,n=parseInt(t.value)||0,m=Math.max(0,parseInt(v.value))+1,f=ExportDialog.getExportParameter(a,c);if("function"==typeof f)g=f();else{var f=parseInt(u.value)/k,y=b.getGraphBounds(),x=b.view.scale,Q=mxUtils.createXmlDocument(),U=Q.createElement("output");Q.appendChild(U);Q=new mxXmlCanvas2D(U);Q.translate(Math.floor((m/f-y.x)/x),Math.floor((m/f-y.y)/x));Q.scale(f/x);z.drawState(b.getView().getState(b.model.root),Q);l=Math.ceil(y.width*f/x+2*m);
n=Math.ceil(y.height*f/x+2*m);g="xml\x3d"+encodeURIComponent(mxUtils.getXml(U))}if(null!=g&&g.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA){var Y="\x26bg\x3dnone";if(""!=s.value&&s.value!=mxConstants.NONE&&("png"!=c||!q.checked))Y="\x26bg\x3d"+s.value;a.hideDialog();f=decodeURIComponent(g.substring(g.indexOf("\x3d")+1));ExportDialog.saveRequest(f,e,c,function(b,a){return new mxXmlRequest(EXPORT_URL,"format\x3d"+c+"\x26base64\x3d"+(a||"0")+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):"")+Y+"\x26w\x3d"+
l+"\x26h\x3d"+n+"\x26border\x3d"+m+"\x26"+g)})}else mxUtils.alert(mxResources.get("drawingTooLarge"))}}}));x.className="geBtn gePrimaryBtn";var y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst?(n.appendChild(y),n.appendChild(x)):(n.appendChild(x),n.appendChild(y));e.appendChild(n);m.appendChild(e);g.appendChild(m);this.container=g};ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.saveLocalFile=function(a,c,f){(new mxXmlRequest(SAVE_URL,"xml\x3d"+encodeURIComponent(a)+"\x26filename\x3d"+encodeURIComponent(c)+"\x26format\x3d"+f)).simulate(document,"_blank")};ExportDialog.saveRequest=function(a,c,f,d){d(c).simulate(document,"_blank")};ExportDialog.getExportParameter=function(a,c){return null};
-var EditDataDialog=function(a,c){function f(){0<q.value.length?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}var d=document.createElement("div"),b=a.editor.graph;d.style.height="310px";d.style.overflow="auto";var e=b.getModel().getValue(c);if(!mxUtils.isNode(e)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",e||"");e=g}var k=new mxForm("properties");k.table.style.width="100%";k.table.style.paddingRight="20px";for(var g=e.attributes,l=[],n=[],
+var EditDataDialog=function(a,c){function f(){0<q.value.length?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}var d=document.createElement("div"),b=a.editor.graph;d.style.height="310px";d.style.overflow="auto";var e=b.getModel().getValue(c);if(!mxUtils.isNode(e)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",e||"");e=g}var k=new mxForm("properties");k.table.style.width="100%";k.table.style.paddingRight="20px";for(var g=e.attributes,l=[],n=[],
m=0,p=function(b,a){b.parentNode.style.marginRight="12px";var d=document.createElement("a"),c=mxUtils.createImage(Dialog.prototype.closeImage);c.style.height="9px";c.style.fontSize="9px";c.style.marginBottom="7px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.margin="0px";d.style.width="14px";d.style.height="14px";d.style.fontSize="14px";d.style.cursor="pointer";d.style.marginLeft="6px";d.appendChild(c);c=function(b){return function(){for(var a=0,d=0;d<l.length;d++){if(l[d]==
b){n[d]=null;k.table.deleteRow(a);break}null!=n[d]&&a++}}}(a);mxEvent.addListener(d,"click",c);b.parentNode.style.whiteSpace="nowrap";b.parentNode.appendChild(d)},r=function(b,a,d){l[b]=a;n[b]=k.addTextarea(l[m]+":",d,2);n[b].style.width="100%";p(n[b],a)},s=0;s<g.length;s++)"label"!=g[s].nodeName&&"placeholders"!=g[s].nodeName&&(r(m,g[s].nodeName,g[s].nodeValue),m++);d.appendChild(k.table);g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.marginTop="6px";var q=document.createElement("input");
-q.setAttribute("placeholder",mxResources.get("enterPropertyName"));q.setAttribute("type","text");q.setAttribute("size",mxClient.IS_QUIRKS?"18":"22");q.style.marginLeft="2px";g.appendChild(q);d.appendChild(g);var t=mxUtils.button(mxResources.get("addProperty"),function(){var b=q.value;if(0<b.length&&"label"!=b&&"placeholders"!=b)try{var a=mxUtils.indexOf(l,b);if(0<=a&&null!=n[a])n[a].focus();else{e.cloneNode(!1).setAttribute(b,"");0<=a&&(l.splice(a,1),n.splice(a,1));l.push(b);var d=k.addTextarea(b+
-":","",2);d.style.width="100%";n.push(d);p(d,b);d.focus()}q.value=""}catch(c){mxUtils.alert(c)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<n.length?n[0].focus():q.focus()};t.setAttribute("disabled","disabled");t.style.marginLeft="10px";t.style.width="144px";g.appendChild(t);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});g.className="geBtn";r=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);
-e=e.cloneNode(!0);for(var d=!1,f=0;f<l.length;f++)null==n[f]?e.removeAttribute(l[f]):(e.setAttribute(l[f],n[f].value),d=d||"placeholder"==l[f]&&"1"==e.getAttribute("placeholders"));d&&e.removeAttribute("label");b.getModel().setValue(c,e)}catch(g){mxUtils.alert(g)}});r.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keyup",f);mxEvent.addListener(q,"change",f);s=document.createElement("div");s.style.marginTop="18px";s.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){var u=
-document.createElement("span");u.style.marginRight="10px";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});u.appendChild(v);mxUtils.write(u,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){v=
-document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="10px";v.style.cursor="help";var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("valign","middle");A.style.marginTop="-4px";A.setAttribute("src",Editor.helpImage);v.appendChild(A);u.appendChild(v)}s.appendChild(u)}a.editor.cancelFirst?(s.appendChild(g),s.appendChild(r)):(s.appendChild(r),
+q.setAttribute("placeholder",mxResources.get("enterPropertyName"));q.setAttribute("type","text");q.setAttribute("size",mxClient.IS_QUIRKS?"18":"22");q.style.marginLeft="2px";g.appendChild(q);d.appendChild(g);var u=mxUtils.button(mxResources.get("addProperty"),function(){var b=q.value;if(0<b.length&&"label"!=b&&"placeholders"!=b)try{var a=mxUtils.indexOf(l,b);if(0<=a&&null!=n[a])n[a].focus();else{e.cloneNode(!1).setAttribute(b,"");0<=a&&(l.splice(a,1),n.splice(a,1));l.push(b);var d=k.addTextarea(b+
+":","",2);d.style.width="100%";n.push(d);p(d,b);d.focus()}q.value=""}catch(c){mxUtils.alert(c)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<n.length?n[0].focus():q.focus()};u.setAttribute("disabled","disabled");u.style.marginLeft="10px";u.style.width="144px";g.appendChild(u);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});g.className="geBtn";r=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);
+e=e.cloneNode(!0);for(var d=!1,f=0;f<l.length;f++)null==n[f]?e.removeAttribute(l[f]):(e.setAttribute(l[f],n[f].value),d=d||"placeholder"==l[f]&&"1"==e.getAttribute("placeholders"));d&&e.removeAttribute("label");b.getModel().setValue(c,e)}catch(g){mxUtils.alert(g)}});r.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keyup",f);mxEvent.addListener(q,"change",f);s=document.createElement("div");s.style.marginTop="18px";s.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){var t=
+document.createElement("span");t.style.marginRight="10px";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);mxEvent.addListener(v,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});t.appendChild(v);mxUtils.write(t,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){v=
+document.createElement("a");v.setAttribute("href",EditDataDialog.placeholderHelpLink);v.setAttribute("title",mxResources.get("help"));v.setAttribute("target","_blank");v.style.marginLeft="10px";v.style.cursor="help";var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("valign","middle");z.style.marginTop="-4px";z.setAttribute("src",Editor.helpImage);v.appendChild(z);t.appendChild(v)}s.appendChild(t)}a.editor.cancelFirst?(s.appendChild(g),s.appendChild(r)):(s.appendChild(r),
s.appendChild(g));d.appendChild(s);this.container=d};EditDataDialog.placeholderHelpLink=null;
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","http://www.example.com/");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=(mxClient.IS_VML?
@@ -3120,21 +3120,21 @@ d=this.window.getX(),c=this.window.getY();d+this.window.table.clientWidth>b&&(d=
var d=mxUtils.getCurrentStyle(g.container);k.style.backgroundColor=d.backgroundColor;return a};l.init(k);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var m=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(b,a){for(var d=!1,c=mxEvent.getSource(b);null!=
c;){if(c==l.outline.view.canvas.ownerSVGElement){d=!0;break}c=c.parentNode}d&&(a?m.funct():p.funct(),mxEvent.consume(b))})}},LayersWindow=function(a,c,f,d,b){function e(b){if(k.isEnabled()&&null!=b){var d=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&k.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(d.container,300,100,!0,!0);d.init()}}function g(){function b(a,d,c,f){var l=document.createElement("div");
l.className="geToolbarContainer";l.style.overflow="hidden";l.style.position="relative";l.style.padding="4px";l.style.height="22px";l.style.display="block";l.style.backgroundColor="whiteSmoke";l.style.borderWidth="0px 0px 1px 0px";l.style.borderColor="#c3c3c3";l.style.borderStyle="solid";l.style.whiteSpace="nowrap";var n=document.createElement("div");n.style.display="inline-block";n.style.width="100%";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxEvent.addListener(l,"dragover",function(b){b.dataTransfer.dropEffect=
-"move";r=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"dragstart",function(b){p=l;mxClient.IS_FF&&b.dataTransfer.setData("Text","\x3clayer/\x3e")});mxEvent.addListener(l,"dragend",function(b){null!=p&&(k.addCell(c,k.model.root,r),r=p=null);b.stopPropagation();b.preventDefault()});var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","top");u.setAttribute("border","0");u.style.cursor="pointer";u.style.padding="4px";u.setAttribute("title",
-mxResources.get("lockUnlock"));var t=k.view.getState(c),v=null!=t?t.style:k.getCellStyle(c);"1"==mxUtils.getValue(v,"locked","0")?u.setAttribute("src",Dialog.prototype.lockedImage):u.setAttribute("src",Dialog.prototype.unlockedImage);mxEvent.addListener(u,"click",function(b){if(k.isEnabled()){var a=null;k.getModel().beginUpdate();try{a="1"==mxUtils.getValue(v,"locked","0")?null:"1",k.setCellStyles("locked",a,[c])}finally{k.getModel().endUpdate()}"1"==a&&k.removeSelectionCells(k.getModel().getDescendants(c));
-mxEvent.consume(b)}});n.appendChild(u);u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));u.style.marginLeft="4px";u.style.marginRight="6px";u.style.marginTop="4px";n.appendChild(u);k.isEnabled()||u.setAttribute("disabled","disabled");k.model.isVisible(c)&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);mxEvent.addListener(u,"click",function(b){k.isEnabled()&&(k.model.setVisible(c,
+"move";r=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"dragstart",function(b){p=l;mxClient.IS_FF&&b.dataTransfer.setData("Text","\x3clayer/\x3e")});mxEvent.addListener(l,"dragend",function(b){null!=p&&(k.addCell(c,k.model.root,r),r=p=null);b.stopPropagation();b.preventDefault()});var t=document.createElement("img");t.setAttribute("draggable","false");t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.padding="4px";t.setAttribute("title",
+mxResources.get("lockUnlock"));var u=k.view.getState(c),v=null!=u?u.style:k.getCellStyle(c);"1"==mxUtils.getValue(v,"locked","0")?t.setAttribute("src",Dialog.prototype.lockedImage):t.setAttribute("src",Dialog.prototype.unlockedImage);mxEvent.addListener(t,"click",function(b){if(k.isEnabled()){var a=null;k.getModel().beginUpdate();try{a="1"==mxUtils.getValue(v,"locked","0")?null:"1",k.setCellStyles("locked",a,[c])}finally{k.getModel().endUpdate()}"1"==a&&k.removeSelectionCells(k.getModel().getDescendants(c));
+mxEvent.consume(b)}});n.appendChild(t);t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));t.style.marginLeft="4px";t.style.marginRight="6px";t.style.marginTop="4px";n.appendChild(t);k.isEnabled()||t.setAttribute("disabled","disabled");k.model.isVisible(c)&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);mxEvent.addListener(t,"click",function(b){k.isEnabled()&&(k.model.setVisible(c,
!k.model.isVisible(c)),mxEvent.consume(b))});mxUtils.write(n,d);l.appendChild(n);if(k.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)d=document.createElement("div"),d.style.display="block",d.style.textAlign="right",d.style.whiteSpace="nowrap",d.style.position="absolute",d.style.right="6px",d.style.top="6px",0<a&&(n=document.createElement("a"),n.setAttribute("title",mxResources.get("toBack")),n.className="geButton",n.style.cssFloat=
-"none",n.innerHTML="\x26#9650;",n.style.width="14px",n.style.height="14px",n.style.fontSize="14px",n.style.margin="0px",n.style.marginTop="-1px",d.appendChild(n),mxEvent.addListener(n,"click",function(b){k.isEnabled()&&k.addCell(c,k.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<s-1&&(n=document.createElement("a"),n.setAttribute("title",mxResources.get("toFront")),n.className="geButton",n.style.cssFloat="none",n.innerHTML="\x26#9660;",n.style.width="14px",n.style.height="14px",n.style.fontSize="14px",
+"none",n.innerHTML="\x26#9660;",n.style.width="14px",n.style.height="14px",n.style.fontSize="14px",n.style.margin="0px",n.style.marginTop="-1px",d.appendChild(n),mxEvent.addListener(n,"click",function(b){k.isEnabled()&&k.addCell(c,k.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<s-1&&(n=document.createElement("a"),n.setAttribute("title",mxResources.get("toFront")),n.className="geButton",n.style.cssFloat="none",n.innerHTML="\x26#9650;",n.style.width="14px",n.style.height="14px",n.style.fontSize="14px",
n.style.margin="0px",n.style.marginTop="-1px",d.appendChild(n),mxEvent.addListener(n,"click",function(b){k.isEnabled()&&k.addCell(c,k.model.root,a+1);mxEvent.consume(b)})),l.appendChild(d);if(mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode))l.setAttribute("draggable","true"),l.style.cursor="move"}mxEvent.addListener(l,"dblclick",function(b){var a=mxEvent.getSource(b).nodeName;"INPUT"!=a&&"IMG"!=a&&(e(c),mxEvent.consume(b))});k.getDefaultParent()==c?(l.style.background="#e6eff8",l.style.fontWeight=
-"bold",q=c):mxEvent.addListener(l,"click",function(b){k.isEnabled()&&(k.setDefaultParent(f),k.view.setCurrentRoot(null),g())});m.appendChild(l)}s=k.model.getChildCount(k.model.root);m.innerHTML="";for(var a=s-1;0<=a;a--)mxUtils.bind(this,function(d){b(a,d.value||mxResources.get("background"),d,d)})(k.model.getChildAt(k.model.root,a));u.setAttribute("title",mxResources.get("removeIt",[q.value||mxResources.get("background")]));v.setAttribute("title",mxResources.get("moveSelectionTo",[q.value||mxResources.get("background")]));
-x.setAttribute("title",mxResources.get("duplicateIt",[q.value||mxResources.get("background")]));A.setAttribute("title",mxResources.get("renameIt",[q.value||mxResources.get("background")]));k.isSelectionEmpty()&&(v.className="geButton mxDisabled")}var k=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background="whiteSmoke";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var n=!EditorUi.compactUi?"30px":
-"26px",m=document.createElement("div");m.style.backgroundColor="#e5e5e5";m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(n)+7+"px";l.appendChild(m);var p=null,r=null;mxEvent.addListener(l,"dragover",function(b){b.dataTransfer.dropEffect="move";r=null;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"drop",function(b){b.stopPropagation();b.preventDefault()});var s=null,q=null,t=document.createElement("div");
-t.className="geToolbarContainer";t.style.position="absolute";t.style.bottom="0px";t.style.left="0px";t.style.right="0px";t.style.height=n;t.style.overflow="hidden";t.style.padding=!EditorUi.compactUi?"1px":"4px 0px 3px 0px";t.style.backgroundColor="whiteSmoke";t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");n=document.createElement("a");n.className="geButton";
-mxClient.IS_QUIRKS&&(n.style.filter="none");var u=n.cloneNode();u.innerHTML='\x3cdiv class\x3d"geSprite geSprite-delete" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';mxEvent.addListener(u,"click",function(b){if(k.isEnabled()){k.model.beginUpdate();try{var a=k.model.root.getIndex(q);k.removeCells([q],!1);0==k.model.getChildCount(k.model.root)?(k.model.add(k.model.root,new mxCell),k.setDefaultParent(null)):0<a&&a<=k.model.getChildCount(k.model.root)?k.setDefaultParent(k.model.getChildAt(k.model.root,
-a-1)):k.setDefaultParent(null)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(u.className="geButton mxDisabled");t.appendChild(u);var v=n.cloneNode();v.innerHTML='\x3cdiv class\x3d"geSprite geSprite-insert" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';mxEvent.addListener(v,"click",function(b){k.isEnabled()&&!k.isSelectionEmpty()&&k.moveCells(k.getSelectionCells(),0,0,!1,q)});t.appendChild(v);var A=n.cloneNode();A.innerHTML='\x3cdiv class\x3d"geSprite geSprite-dots" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';
-A.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(A,"click",function(b){k.isEnabled()&&e(q);mxEvent.consume(b)});k.isEnabled()||(A.className="geButton mxDisabled");t.appendChild(A);var x=n.cloneNode();x.innerHTML='\x3cdiv class\x3d"geSprite geSprite-duplicate" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';mxEvent.addListener(x,"click",function(b){if(k.isEnabled()){b=null;k.model.beginUpdate();try{b=k.cloneCells([q])[0],b.value=mxResources.get("untitledLayer"),b.setVisible(!0),
-b=k.addCell(b,k.model.root),k.setDefaultParent(b)}finally{k.model.endUpdate()}null!=b&&!k.isCellLocked(b)&&k.selectAll(b)}});k.isEnabled()||(x.className="geButton mxDisabled");t.appendChild(x);n=n.cloneNode();n.innerHTML='\x3cdiv class\x3d"geSprite geSprite-plus" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';n.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(n,"click",function(b){if(k.isEnabled()){k.model.beginUpdate();try{var a=k.addCell(new mxCell(mxResources.get("untitledLayer")),
-k.model.root);k.setDefaultParent(a)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(n.className="geButton mxDisabled");t.appendChild(n);l.appendChild(t);g();k.model.addListener(mxEvent.CHANGE,function(){g()});k.selectionModel.addListener(mxEvent.CHANGE,function(){k.isSelectionEmpty()?v.className="geButton mxDisabled":v.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),l,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);
+"bold",q=c):mxEvent.addListener(l,"click",function(b){k.isEnabled()&&(k.setDefaultParent(f),k.view.setCurrentRoot(null),g())});m.appendChild(l)}s=k.model.getChildCount(k.model.root);m.innerHTML="";for(var a=s-1;0<=a;a--)mxUtils.bind(this,function(d){b(a,d.value||mxResources.get("background"),d,d)})(k.model.getChildAt(k.model.root,a));t.setAttribute("title",mxResources.get("removeIt",[q.value||mxResources.get("background")]));v.setAttribute("title",mxResources.get("moveSelectionTo",[q.value||mxResources.get("background")]));
+x.setAttribute("title",mxResources.get("duplicateIt",[q.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("renameIt",[q.value||mxResources.get("background")]));k.isSelectionEmpty()&&(v.className="geButton mxDisabled")}var k=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background="whiteSmoke";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var n=!EditorUi.compactUi?"30px":
+"26px",m=document.createElement("div");m.style.backgroundColor="#e5e5e5";m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(n)+7+"px";l.appendChild(m);var p=null,r=null;mxEvent.addListener(l,"dragover",function(b){b.dataTransfer.dropEffect="move";r=null;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"drop",function(b){b.stopPropagation();b.preventDefault()});var s=null,q=null,u=document.createElement("div");
+u.className="geToolbarContainer";u.style.position="absolute";u.style.bottom="0px";u.style.left="0px";u.style.right="0px";u.style.height=n;u.style.overflow="hidden";u.style.padding=!EditorUi.compactUi?"1px":"4px 0px 3px 0px";u.style.backgroundColor="whiteSmoke";u.style.borderWidth="1px 0px 0px 0px";u.style.borderColor="#c3c3c3";u.style.borderStyle="solid";u.style.display="block";u.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(u.style.filter="none");n=document.createElement("a");n.className="geButton";
+mxClient.IS_QUIRKS&&(n.style.filter="none");var t=n.cloneNode();t.innerHTML='\x3cdiv class\x3d"geSprite geSprite-delete" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';mxEvent.addListener(t,"click",function(b){if(k.isEnabled()){k.model.beginUpdate();try{var a=k.model.root.getIndex(q);k.removeCells([q],!1);0==k.model.getChildCount(k.model.root)?(k.model.add(k.model.root,new mxCell),k.setDefaultParent(null)):0<a&&a<=k.model.getChildCount(k.model.root)?k.setDefaultParent(k.model.getChildAt(k.model.root,
+a-1)):k.setDefaultParent(null)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(t.className="geButton mxDisabled");u.appendChild(t);var v=n.cloneNode();v.innerHTML='\x3cdiv class\x3d"geSprite geSprite-insert" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';mxEvent.addListener(v,"click",function(b){k.isEnabled()&&!k.isSelectionEmpty()&&k.moveCells(k.getSelectionCells(),0,0,!1,q)});u.appendChild(v);var z=n.cloneNode();z.innerHTML='\x3cdiv class\x3d"geSprite geSprite-dots" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';
+z.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(z,"click",function(b){k.isEnabled()&&e(q);mxEvent.consume(b)});k.isEnabled()||(z.className="geButton mxDisabled");u.appendChild(z);var x=n.cloneNode();x.innerHTML='\x3cdiv class\x3d"geSprite geSprite-duplicate" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';mxEvent.addListener(x,"click",function(b){if(k.isEnabled()){b=null;k.model.beginUpdate();try{b=k.cloneCells([q])[0],b.value=mxResources.get("untitledLayer"),b.setVisible(!0),
+b=k.addCell(b,k.model.root),k.setDefaultParent(b)}finally{k.model.endUpdate()}null!=b&&!k.isCellLocked(b)&&k.selectAll(b)}});k.isEnabled()||(x.className="geButton mxDisabled");u.appendChild(x);n=n.cloneNode();n.innerHTML='\x3cdiv class\x3d"geSprite geSprite-plus" style\x3d"display:inline-block;"\x3e\x3c/div\x3e';n.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(n,"click",function(b){if(k.isEnabled()){k.model.beginUpdate();try{var a=k.addCell(new mxCell(mxResources.get("untitledLayer")),
+k.model.root);k.setDefaultParent(a)}finally{k.model.endUpdate()}}mxEvent.consume(b)});k.isEnabled()||(n.className="geButton mxDisabled");u.appendChild(n);l.appendChild(u);g();k.model.addListener(mxEvent.CHANGE,function(){g()});k.selectionModel.addListener(mxEvent.CHANGE,function(){k.isSelectionEmpty()?v.className="geButton mxDisabled":v.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),l,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);this.refreshLayers=g;this.window.setLocation=function(b,a){b=Math.max(0,b);a=Math.max(0,a);mxWindow.prototype.setLocation.apply(this,arguments)};mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){var b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,d=this.window.getX(),c=this.window.getY();d+this.window.table.clientWidth>
b&&(d=Math.max(0,b-this.window.table.clientWidth));c+this.window.table.clientHeight>a&&(c=Math.max(0,a-this.window.table.clientHeight));(this.window.getX()!=d||this.window.getY()!=c)&&this.window.setLocation(d,c)}))};(function(){Sidebar.prototype.tagIndex="vX3ZcttI0vXTTPz/XIihlrvb31xqt2YsWy3K9tw5QBISMSIBNhbL6qefczKrsJBYCosmgkGCJPJUoZasrNxq+/M69nbrmRfH0Uvyt+N/yAU+D16n1VtnZ36Y/u3k+KP/yI9TQ+aFTxt/hYs0i0NXjPvgaT0a5MuuhJDt2mH2Mc69zSbKCHMRZYuNX4JKXyJ8e/FeXRqlwPkj81YllMcoi3vArP0fcRSW6MMoXa7lYZLgKfQ2+CvobprzIF5mG48lW6AlftoE4ZNLNf6ZbXdHKMZSnxz/gvtif7fhUyy85TObOlxF8qt8uEOdDIUyI84L2b6VXo/idB09RWwex7HzyTTryfFcmrVcRbSV6QaHphrV3fONH658EuzNpuQ5CENChHZaJptg6wr2ICP3G+pQg7jScd4M3Yz7LVhxgjx4AafXuNo+xEGl4dJ17BPcseUOH/Hk+EMUB39FYSqjYF3+Mgjuqx+nwVLofxSXLVB/ZbE/O10u/SQB+TkKjyOSJP4yi4OUz/Xs8/3ghyasLI22XhrISPTwBR9PPmb18T825JyhTudlxPfHjZesW4DmqD+7Xe82MO2Pwnc2yAaPzxqAobBXwZKCRzSHqZgTxrmHObVXb1vjlZd6Cy/h36tFN9StFz/76W7jLUmxlW/CSoiZrCOuAN0o84t/8fboMX3x5IeV/8PfRLutLirPATGTZey/rOIA/e/6oPNsAapgZxpniVWBzHvnh8vgcPw0gHzzF0mQ8vEWWFfYXZtowa+t1Gdgplj/UAc//hFI69ji8SmMNkmj3YsH1scZF2zLkPtgQXqWLdm0HMoy7+fgbYK60D+6J8NZ8NeDt3kuqkRBw9api/ick07GmTwJFgd0TSCTcOXLirgKdhtMELZP5sVemIKDcIgt/VBG086Pt9KPh9hSh0pLOU+LPVoz1x+DpyzWKXFyfAUGKax2mcl4Ijzv6AmNqzv0qffEK4O5iH66tJ322GE9ugm3uyyV4b6NwiCNeLUKEky3Q758QIsekNlz4W84Z8hNP/mQo2KOPdvvdtqXWUEz6EUDc2i8P452Z2ijmlErLbczDdoBc4lHiXdxIAUvsmCz0oousiQIyeA76Pu3vFCodNSD6jpIP2QL+7RoZI9U0TKN9OrJjP8m+g8XNyEES0jhzXy4ntD3NumaY2KNOSNDfO0Lj8F3/ONATF6uY0zb1gIZQberAq+Y3lymuY/wl5EZb7deiO7lqHXlMx+9HbiizNF87HfR3GII6CjaQhjCh28/Q1lF9sbXPnW00OGxW0chP9MoE5bsQlXhpUnOv1qg9nGyTRqQOXgYJbJDyNI1WWu+opfkE7Nu7LyVuWrBfZ3/8ZGTvxhGyZ/CrZvH1R4EpPJCsoBAh5HNIa1bq+5e2SN/iHbBUuSWqvxSC7gH9RmDCzgYl2jv1yT1t7i42WqfR2z6tReTVYM3yqBf7Q21Pby76MWP52sfq/kQtnx/cSfDfIsnlDr1h5hzv5OhKYql30oFHXSUZoYVidEp5cW6zXO5X5e9s4zL6h+Zn8kw/5MXAwDu/bply4lUBg8vdLtZFutYI3AMGVtJVdxrL2J/ejgtaHtUqIr8oKKiwahndY1A89eQdd+fl4n+HPvL16V0dSvQvb/Dtls59z5SaYw86qhpgkrB8kVmffBkHrmLYXMwL52OKLtSRhvFPNjudBvkuDo8EJwPsrVM24lZfwmxVwZPfQxkp2xkkc+L//hLgmWP3Mt5m8DvHDVfwOPJYLKtx3t3fqQPoF+9H2j6clvtUX/9cGF5VQ2Tqr9fBwk/DG9Tanc2/jVAp4qq6hbbPshL3EKT83aIlJ0wYEK+B/0OAR/zqzpUKa4TtxBOw/yqq4W+nV6cX11L63hPYZRg3SSb6M8d7Sbv5PjaD/1Y2Ind5zVV5xCCMzGSouv3iG1EZGTOVKiOyFu2NJ2iOl/dKaXIVtInIcVAC5azX7kDigLZU5BVWAVbfXXLlL8fUiZB086pTPh/h4S+kY+7SM+8EP2oO5wmNWv5fuyXtCWjrZ+i/xv1SxWiOJLdx26DZQrzv35KlykuDpgxFDgiMnqUoNtIr9q3arU0kO1F2sq3ARuI5oLxfCgVlwlvI1lCQ8fW/kSN3fx1uxAd22MUL4IVWK4D5edCW4x1B3pImgtEaXkguNfSz7doRjIZEcewsxceudvVbpArhGYIY2/M5pdR1kWSEX0lPA3v0hFdNA+BSFt2PyafVJN10X3zpF5m9C7saG6l+bdRKolYHS599kXIta2uQwraKEqTFJez7krW0902bru2+dasHSHrva4ahN2WN5QUAbs4Ep0vV6KVtEAT3eyUwsCHiKzetZlJBpFUCwMThQhfiEttok+J/mOkPWStQk3Wvhoqo28tsbW8xqK/X8vDNGJgO65LranwmuJ0Z33zPYehMgwLgphuz1s5lwDk0ryTXFmiFHGrqG7f0bH0FuipVPScesnR+WcWqGK5sWxLNzs/o7Ut7y2ob06OF7HvaRfoirHTJdgJ5+T45y/H06CdNNWKltJ+OG216on2rrFWYlHqh4R6/TYV3K9NFTMiTB+glnr1QLs91/b/DW+/vzvlI99xTAdhYGXpHk/ugv+rC379EzTC//5Oyjh+s/qXC5j2ASLqOv9Ss/NLQDOMfYT8Hyyn+k+fetfhas3H43L3KrxEuvXXYzRLfSs4MLcqIB/+ZCq0dydaxwnw7mIsN0ujRAT4YMB7PwlWuvydZ3FsbSNmZTphB8XL9uXQEUs62xlrnsViUqo86C+EaFoR3GHkqZpYuDuMzIpmlusOJC3TyCNrcR5oNtTdwa/H2y0Hlq5Wi1p9aSfGBBDkSuNhfpvgabixPvltPM77nhh+wOUUw74wy2H75ONPo3rdeRQOD929lPxxE0UxdEP8HxqiZnvC3u1wMiNXNc5hqKgYcR/hYhSYBcERYY7dsyA00zaQR9HzUtVufUnP114g61NfOii3hcfBJ0KtS25UqheFTwVN8r3a6Pz+gUL314oOr6TXq6lHDcqFD6GdytZYNyh2d9SrKlUQNcgOA4qxY7OWyEQ2AnA1WcWqb2uAqsG53PjYbkg7+AmURObapQrQ38guamS7XvGKTmrelpOwXglRT1pnXN1xx7j1zDtmcaRuQLYy1HwmaeFeVAP7+RF2PvErMkN82TnUa1DuoPoRnyr4jnDpDEKoBurVt3XUeFNFV0x1OP6Aic+JEPZubYle8+seeio+Ml0xoW3aoPK9aTmYe9P6j3EAk7oZd33J58oOloY79OogMb5IO8lu3J1EW8mQDSjS+GGMoH83kv7XkfTcLg6ij6Dc5LAG68A4FbUL1R0RvCtoG8QMiaJD3859mG/w2hLZPILMxWEDrzM/XtpvLjWh3aBgA5sBjKRkiuDsBI8QzTSvlWWouwnUM4VnGYw6sVdrPMohZqchFFLWy4ADDXUyXANN3m0ObkDikBuMdB5t0GN86jWE3Sco7g99lOop9w3SUOcaw2o3aaOdt41KHFCOSrRb/uBkOStA7kQFSEWdaH07tan79POi1429k8t8o/7/gJyGa9P7cOoIdtJ+4mPv1HKWnn0+jD6CQ2RR9aZOa6DOtpDDxY8kC3WnRFcGDvsGg9I+wgOWzORR1cBGlYxFot42obQb3wu/b7F6qBnph7eBS8fJMfiJX5lv7ZRwkwuDRD33r6NoRZU4/KK5KUYTbIdWaHYt1iTxQMf2cZXZ7aPxmtE6y6wSE6Yj6ucsxa698EIUtXBR0STjWto2XitocEiHO3BJK21MGC60p4EwVVblPZtIhaXYmjb1v3qODNkojgKOii02aRJg08y+zc3qC/rTmNlPbWueidJ81WXm6QahLBquIA3LhJ0YEP7Xa+N9XT+E+kKPhZtjlEh0yBTtWAs2RXt2Ar9RQwyCvaO7pEjDpdFtHHxad0UW4I8MVlas0Fh2NVBALxbqaiBf9doVRNeCgUAwmOl94hRaItrDa8UAo9AtL/x+KEWSx15hVU7U2d51ULTiYDyYPurRWQXineypB1bHEg+qA+Rqowmw+oCWTWJOhJELD7CNxCLiWuQk/dpFSQ9NVBnjQ3h8n5pWSCkhSEt1N9hLIhNi6yFuihI7/IRyD2PxNZE40Vq6GZaZ7/ZWDWOYw9YqOz7raZfYH1rKb8ZhxM4V3uEq49ETbRTwpXEbMB99SOeXc/ElMm6E1gGhcMR2hPlUgdkLqRqCdnKsTwWvtj2wSQv58PBAV+Q3LcM6bk+G+kelsa038RAYuEPk/iUTAYqX8yRw367KMFSjma3uECRal5YQXtV1bipM4ww4GNLs/r+D2X03TpIUby/PdSPl0R2zzSHaDQoSxu1NEyBUDcanNTDxAH3Bha9BQyJM67AMG6A3rOYXtIaKcITIntQo6g4LUT/tYutP3WdZq9ejxEsDjhJpbDssS0w3w56m9RlGo3I9q6nuXlP0gb+9r0Bi+4VtelajLHWG43DBllEmzcTAHy6uyIC68NfeSv3HYEKATnABPInjU2k50egY56K/3p1z+298sOk9F0C92OCS74xYUgBAMQA8jSOfvpgbqu7p1vW2xdzDQildMj3017tPGrIaGiP52xUysoXaAxIbb59dvIbeNgIjBJ1cDqHFGpCa0T4VDtlNDgRzdY7eF/FGZ9yYShGiUh9soQ/VcN04uYmmb13MqmETA5TYsPmlPwrFUomC7QM2e4qjbCdxCbzo8QT3FxQrYxTGaSSDu1aCaUcwK3ZpoRuPmIMxTEvcdBGthbh47pomRYcaO1wt1DI0FvaWbxpbNmlj5HGpkzfzZ8Q1irFtSmiNUBPmlcvIvWnpsYLdYGVr1gWCERK90gIjHB0aZgi3/Krb8KsozlOR5JH8pd8mgZYBpfEAb1fEg48Gqa5AE5ViRfoWQX4YJHOwmNjlSaBvTm/J8SVCUcK8Pc1aI/7t5qbhyKjtanUkjfl2RcwfyHyH44dReGRm5vdkh50u9AszDJNMVkUMCLGGdbRwsnoWhetKcqvYXDKiQc5zySDHTyUHwyHCDGGIEjqYarhAV6Fq6pNmQfARU258R9iJJNwwox25qyQjgx3e5vsUqOQsL+EmklUFCl4VYvb4wqTlXa7EdeUjM1q8ZTlzsUSqWfStHuzyjKO2EE+s3yOJWvebnaiof+jtkP5IAk7epICv0QYW+jeAn9NZJl+nClO2gz6oC5fh/CZZ0RsXgNRlgeQ00SBv4QttJUY2FnxouaPLWQbJMprZ5DYEKiW6afHmrZLNzuAKIGuUccoTZ4x2PrYPYQOg2Zh5DXqj3F58yZ1JXuhUITAZfJ9q0Rpx5lsm3ZJEEDbEDz41sg3tqox1Tkqk3+ChEuzgHuhtktnNGVcthC2Gj/Av0oxTuSNTalwH6bClXk7i2jS0ELhIcBGeI1ijxmFq1AM8mJpOBNroHjoQD4kCcjewEqT6iBWtW/UwLQp0LyeAXdWm3Cn+GDVCRC9WqnRTdQdiUypDa6tXnmZ0mK7iVmG1nBY4d5SdCBA5EI1/2FSAOxsONBUg4r3VSlJ0+ERzY57hWwlrItg8QUqlBdROPhTSholMVskv+5NrDNhX7DrE5Qx8PKZKZaK+18QcZ0xIOuWQahxMDatNHbakMoXrrqIjzB1R6Mnsl+PrS/p2nEeXGvzO2HSXqtbDvfvlPQOd/j8jMFCvv5dME3k6VXUfLhDGFPdvLU6iG966sCI3Yh6geWvba3TDXQVIU6oySxH4buD5gC/z279PUc4B+BSYNrna9G1e5PnJ27xUCBrm6/z83fHxMdumV4ErtDdz54n+3Fz3IUNmBcTxlCixi3Ka5GtkG5NHfFLDCqcgfOASn9FTmi0PtwwCOufvo1HGUVvBexzKvunJ/NFghDrMtLRXwBbvs3/5r+zsarbmVor7uzle1AWLbcGJpjaxoxNlbtND6ltkN9FR5fa4NYgwomzNOkIRF4ND8xaK02TZU7KzbgdIH5B/JZebzWd/lDwVZp5tG54HRf2QhsZlNtXh4heTx6Vd/deEgGin3s+XJxexft1dBLBTcaXn4LJm4i6SUkrP0mU3FRM42vHoWJCQMJHwFltv1dmxh/JkkAxxyf/pgcgMa3k1WsJNmmjLdSB570eSTR+8InPCLX/IPSXbMWQF0qlt8zB00bxggUA1SfMC9XRr2AFuXGoOsZm3YIKjJaJzTin0rgLkABYuAL34RtLgYLFjRvuaFDotYP42Y/40DHgqWDBgf3Zkyq1DQT9osQjUWe26YpTqEG6zn0e2LtWatNesC/QArh+CyRdrkoqdIk7WBGpCM8ckkNMgqn/uYMQHZjRhrZApK8fGXo2xPBgTjHoxBsyGQhzgWcU3hKem+E3gGRJlLYSa/89GRDk1MgIcoHoyMmH+pT81DpKxtNpVkuVvDAg7ZDQIm13vijavqvqvwewByPDWrD3dZjcIY1xH10qiEbn+0pGxhMX9fVEUlzNJGKr8c4sYepGmIFxqNr+3K/NO0k3nZe4iZA11LXMVQELRbYp6xjhRmTY92voI9uNKvZmdHOnhKGYnZVO8DIX7CHsarK5Gd1ZcDcW7y6DyLe3zPnHlC2nV38g5Q5KBoSWwsSf65yo6GFJLjG47tqao1p0p+NDkda/BH1r7wF/++sv72en5EQQLQcyliFy06Al00QhUiC3ueExdPBmYpLrovdiWqKHKC3SPb5eqoWhILGuFJQiuXScU1NObJJ2D6C+48pYbtkamdAerGT4j8Q5GUYHXIOp2QAaPCG3Oo8PHDYXLcBm/IpklkxctezBhQ/4hGNPzH6Oh1N/RDcFStCriG6nqAzdqkcVUFLLXvWlnN5bSCNKa5uXAzaAPDqWYKXAodwzG0ch5sF/RQfLRAj1qbjQWJb3+WDbljfZWYwKcbnoyPRhufMN7t3B/yi8d5191zMm3prHXQQ69MpwS0Bgw3NM6Sf+Vj8Znzpxz4ARJ7Rq0SYiOB9Dsil4AptP8cRjSWb6ktxsOIruhRYKkKu6zsxaI4vjw2txs4BgEg505m+Qs21AfEthf83Pf7OdCb+hVhuSe0qa3WHkBdR4rzojsiKkQzXGm+w2gaIftMaQdPvmyRTWpuDqLGANvBukERURIFZIm7Du9lOMbWlJz1NDOLtSUQ70+DVCf51eXtHp8qm7DKPeG+zm4B0IzmK202xoEnYPdUEaZorJVxEnrSBuCpNXHANZDMSaqqkYMF8Bja/zpyJKVuovDq3FDPgiRw39aRDLsaRHJuadFpHQzLeLvYxDvmvq6UREyCJF9PS0i+3paRPb1tIjs62kR2dcDEdkFQ9eHk8l5QgPiCJ7QgDiCJzQgjuAJDYgjeEID4giecDI5T2hAHMETGhBH8IQGxBE8oQFxBE9oQBzCEyI4Bn83+kxoMpPZe7HfPpnzmRGgYbLZJoi1aT+pvT9q7suPYxeLElaIEoLStP7oHqfS/tHwDDhaaXjD1INWH8EUMP4JPl5SyVrehfk4YtkeA3hoZOgBWt6ITQFKqCOovMX1RVJwnzM5AzJiScgEwmGNqsR4flHFLtraPSWfU2mf8cMRctzCqCMnq+Br8W1YvwqkWDcRjCQaNN5S+WEYMNxk0sg2K5xU5Fz5egNRPd537A4lIZTsQavm2B62190GWkbkm/RjntzKAJIshW+qtVF3HPnqBCTW6EFAE9RlcC0YY4HEOXAvUbO2qlIrP4zBml0/fC6mQ/dEMPo3ZBDmbdHjoxzN8Ios/FIR52Jvrs/tOm1T90tZBl/8guCnLL+V8Ps/nylItBdvWtAncbu7uT4rnivBAVuV0hYBjp2Q5Hu1U3dYWfpo/5uyKLP8r8oSPeTblXX3iZqI/01/Vcp64/6qlPXG/VUp6437iyxKO6rHet2/AEm8+UYF3FgvPAlBq+M2zYjIVyk3i6enuXZl/HqI/vckzzusV8PIYarPcxjLucXMgWSYqTmMaAComG0NqEnYL+byKVEljf/kqJLcfwLUr5Js+0e0Sbtyd7dgiH13NAYbqidIigCjLeQ+2Nw0Za44GrUdaeEAodKp8eC2wmmtQ3ctXs5u5JD23rJyib6itvhnrTrpP65Kqg7YPZ3SINjyxrtU277b7g7IIRqRFxwrSxu1+DGb61baIErez8hExSStTNnlbpyuyum0RBqHDnNomUYSq0hORslkkDJ7LtktjFya/LIb40xz1sRIWdLkVV9Lw+OAJDoDQ592akK8oFhHAO6OkfCBe7BFdHi2dS2RTiQcIiR90O8pcRCVFBW1HdRbQ8aqFZkJmKu31X2xTBsH/qM5/CrF2SF1j9lAeu5t/BA5jzXLpfNwwHlCkosFRtEsSZoDFA4Jq+PHtrADIQIy4eBHpceqkiimg0qEFN0XiqrEnESMzXga1JxRUAsi6c7+g+NdXIs1p020J+arJQRDkF7AkNPzwN3IikNBllHNAdsdZLIgFRDwhWrzJKkAvIjGz6a6EUHQdx22l/Y0asQYXm536atEX+Z5g8Gf3KZ4GcekHSZSFtYiNIG8FqnxTTaLwqTfdrZMCUPOga+4cLiWfhVtlL9E8RM8Uv9y7nklNK5rHWduVMhiw1VDk28dfe5Eee1l0jucwO3yQploo6e5PeGzMYLzgOrgiHw3KmQ37UhFckAjSlDjZnLo5CK9XxkZnXChHqZdyh3qVg+bvCk/5agz+KdK/Sy7sZ23Mmy29rzIetqIaUnp3mHORGpIF99Abw6aL2Zv6ah5m/y9CyKnhTylrMwe8uRMLInN9nEcqMt5Sn5EKpmzeD3wDkwtekJ+HJvEPS4HmdXiFUcH5sYLt4pEGjBhxuAqCv+ffqJjkN3dJBfO5CS9dhxMZ6SiCvwXGRFbdXRsWgOh+5bwwy5QMHZzjlDOsODg2ecBoXiWikSZtOwWuYO44SfEBk/WDfAZsg5c9M0s4ZBXY4UvticcaWsnbG3L1yFKGJMGWEAUcn0QnJIhzs+6nSsa0EHMqIeD/WUphjr1QHeqBKIW7LKLQ4oknQ+ka8j1cpHKWXSdEPn9BUSO6gihtw2vxLzcaPXtut+emJFcUMCkmlFxBBcHG+xL+jxObTrHVkEO35L8P3L8SeY8vOdYhM1ZbTLOoSrQXHAUkRzIsWPI46Jbw8cPSXFSGhu83imzkSja2RSZiJ/pkMwbEA42LKvYazji85AceXwoJ7OBHWWvOhhzup1w7pbDSg7psFnam7RudDEEPSRJ0rXhVbPb4vBmV/ovnOH9huUXTXbDMyalo6l+ZaCSC22ekbCb/1ennwOoMUgjUE3qV5MZuo74G4KqRHujc8tszx3ogiuuvaWQ7w4ySftwbs8LLI4QdCLLD5AvJdVUtY6LSCcYvTd0SqXcwp7Q50Jy+XOnwool6uwJIfvoP7Ib+pT0EaPW8Efbrok5PMoN4N42BRI1dnnkl6iMTNSnqnreF/eFH6I4wHlNiHbi1rDhvDAHHBwuiAjUgSii7RO51G88xv2AqB9fFxphL23tpOkT9JzCmbdi6FeAJI4tR4PW0KEVRHWkody5GsmBDuk4En8DJ/qf6RHkqB9V5Z47wBBaHsupqUjkdDJIXghRMUfc2s9ulEKtZC5dqKjRpYeJVbmYSxdS3JdprZFsNxXVC/i3yTIspy2Fmay80c5IGqTohjVsLpF4rVMzYsTpyW0MVAE+KAfqS3+tQpxKdFiihHOZpaprcaoFNJtRKwoUG8L2ymBAiDnEgyag8/T4nRyGuAvMOa1FgFe+UMQwz8gS5YdP8CtDqrnKBC4jib1gGqiZx5hOY9mx17KtCLCatRy8XqGdnVpK8LzzOEqSozNkfZYUYPxGRlF3Hq0DGg/b94/O4Pwjx+/BB2gj6rqWPLbK3wRyt/PACjEXnOdRQSxJn4JH6K9k4ubfugmhh+GhiCZtRf6tD6HahnG+rGYsKBB6WYn3Qc/tQ0hkTgn35PiIaWihKaBLI/gE9pfqncmLPhX/fvQ9SMS62OO5Y6QCYJ65J4xUk6dYfqucCyZ/2k/NeaR0bpizc/4ikgib9toWxfTBtog9wMYKo1VUiyoX8vnatoUhjc7FYlbKlq3VZ6FEhRNZ1PInWQLN1Dg950ToPSDaIC8E0t0IX8aTdNN22o6sWwVrSKUefd8quuWqs0s1lNsxqLtEAO3tnxmYO3RcSocKnwWRBM2q3LcI2nN6KFi+0zKX3SQ43Q9+MaFhM3rVSQXlePrd/0kT9JM+bv5FVef66LxwR0ECqp/qCwxDt4nWfMgWGOxY5ImEhCylUlL81bei1O5XcbjSRHIypxTFlp4MGMehh/JA5inIMK68cNIy9ttqMPgXNvwaKo1ShQc3+6DIdRJuMQRkPMmF4+0I/z+C9UNOVIIqFro/5llX+iBEqvnuCh8AYQekSX96AqlAVQIaSy/KvWUviEw9wPnpdjNWWyxiBYl+aaFKfJGILM8wXzoLSzC+8HQ4MEaWSj0Qxq6a7aQ/eDy07H30ypUAWo2Mh6BpAk5ohnn54FlTWYqc/yoEwA6ARcYNU+hlOn+1lRmHNbouWC2QvNMmyx0FVGonZq+dCpPrGCEj7CRVpJ8O9D6KHt8AEh/cW05caeg9/NWUWDoSJ+t/BCmtZRGYrFUriFrbNxkQV8ioLsN2Qkhoy03mjMmaYw9zRPchOeKzyUdqU0SfQ1O/QdpuQprdbp4a7d3xyTE+oBHi0s7Qs7X/AmWout8sn9U3Y6KyfhlbVl8ius3qgTtPcrqZnAVbOunvdbsQjZn5v54eB/UzCE/UGHIlzm1IyStWYr2iAiL/sx0GlmdRl6lIHmFfjOCjdi2+0j9GkQTA1BTdSQf3OknqW/Au9dFR09FCvjvhXNE9h1Z3qcsWDjGONYeyHYcaZHBXtUFa5nlqMToBqKjqAaCeO9DXikeOdePZwoMP58+olw5MBwcp5xpR0J4SrPlRjs2ATWbN3EnBX205khuQbiS7slKKZFz63g9pHi01AZpzXvIGoIeLCw4vWgn2cj/n3uIr35OwMtyznzZ7DxfzLQPmJTTabHO4QuipeQlmb+eYM8T/zNA5esaGJX+SvsdohM47ehLb3R5gPdStp3k8P+oDYAJ4q3Z3yj1ykW/HVwNHu2TikTAeSl11EmywYVXsMGNVKD/5uzTT1OdjK3G3ycTzfzTQnB+y7xiNFEYv0OU+8054aXdpXqq0cqyPBDKp2asXncQnDaCTY/UG0DGqqx/dF7BRsVONbuWvNAiNAnJKp39IMLuCWUXoXnB0bg+6W6XqSWPHgymzF50kSulF900eyayT9jl70soS6UqbeAhiYWetvb/qRKomCkoz/cSYgg4L1VadPSnXPqntjZ+Q7jpXhmQJ97ulj6xwCzj+QNPAym9qTrGqId1FML3KwMRF6dOBimklcfyQirVbOX2UdsZGu2sNwr+8V0/CTyJwJbF0Q/bXpShqSpxQAbiXc28WEK+VPj8HRy/4R3fzWagXU/p+bZyov6rfEQN4VD744a8D9cRwoZ/TLEpxVEpM8K1LPb1HDudWVe0xi0aUqPCTWyuLQ7SgEBWTz8thQEEDNIxyouqj46rNvfEDYreLqGAxnrEiozVj001J/r0HBtYwIVG3UPutfN2a+rAKZkesDTXrM2pLxBpU5kScwqWh8TSaOuGxBWXvMDg9IxLv+QGS1WMXcas9lK4R090+f0B6P+dhQTQBcQ4EmqhUpS8cQwD3ybKrZh3AQ/70pjtaTp9pJZbuGEosCY6GEksuo6HEkrbIlZhRjhyHpQkNr3694Cm2/QBmsH6LvGKbXq77VqOMIn0wGkU6YzSK9MpoFOme0SiSSWo0yvvhKDgT2HYydP4yUPI7BkFJT08DJd09DZT0+VgoeJnb5N3YzDl4fbegyMk3o1EkAfhoFDbOGBQe1whjpXhKPuJamli/9oG5hrOgqN8kC/geN2vosE7QuVpjEScsIhS+LfSyJ44xOcHVXn2B+Cn6eUeJbh8OFmi7fxk9Li3YJFPPgk0y+QDGWPSpnpJYEz0kh6dWbMTgsjCs0wQwbPIJYDidJ4DhAjcBDFe4CWC4xPWEMQJQgxGgiWSmzrXI78wzgHGsTLo+8jXmVr6Y615I33KkF+jo7Rdz3QdpzjohJK+ok3wZUKc566RIph7ypUedkK/hSTcDm8xeOZPGC3HFYQiX6FQQn9CRT64KwNQNcNKU5QJZbOAxKf6aBo8pHfJEEriE9sOFQRNZQ0kQ31d48GiOODcjgUGBgx/Cf/Qo3EDiNhwJJTJYvYBtuJYjpeiL7pDHQve7fTROBuHOhHqql5+EONacaFZPy4YXjZG2ep8W/7LDnjRQrxh7sff6Lw\x3d\x3d";
Sidebar.prototype.searchFileUrl="search.xml";Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.defaultEntries="general;images;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.rack="General APC Cisco Dell F5 HP IBM Oracle".split(" ");Sidebar.prototype.pids="Agitators;Apparatus Elements;Centrifuges;Compressors;Compressors ISO;Crushers Grinding;Driers;Engines;Feeders;Filters;Fittings;Flow Sensors;Heat Exchangers;Instruments;Misc;Mixers;Piping;Pumps;Pumps DIN;Pumps ISO;Separators;Shaping Machines;Valves;Vessels".split(";");
@@ -3145,7 +3145,7 @@ Sidebar.prototype.configuration=[{id:"general",libs:["general","misc","advanced"
{id:"clipart",prefix:null,libs:"computer finance clipart networking people telco".split(" ")},{id:"eip",prefix:"eip",libs:Sidebar.prototype.eip},{id:"mockups",prefix:"mockup",libs:"Buttons Containers Forms Graphics Markup Misc Navigation Text".split(" ")},{id:"pid2",prefix:"pid2",libs:"Agitators;Apparatus Elements;Centrifuges;Compressors;Compressors ISO;Crushers Grinding;Driers;Engines;Feeders;Filters;Fittings;Flow Sensors;Heat Exchangers;Instruments;Misc;Mixers;Piping;Pumps;Pumps DIN;Pumps ISO;Separators;Shaping Machines;Valves;Vessels".split(";")},
{id:"signs",prefix:"signs",libs:Sidebar.prototype.signs},{id:"rack",prefix:"rack",libs:Sidebar.prototype.rack},{id:"electrical",prefix:"electrical",libs:Sidebar.prototype.electrical},{id:"aws2",prefix:"aws2",libs:Sidebar.prototype.aws2},{id:"pid",prefix:"pid",libs:Sidebar.prototype.pids},{id:"cisco",prefix:"cisco",libs:Sidebar.prototype.cisco},{id:"office",prefix:"office",libs:Sidebar.prototype.office},{id:"veeam",prefix:"veeam",libs:Sidebar.prototype.veeam},{id:"cabinets",libs:["cabinets"]},{id:"floorplan",
libs:["floorplan"]},{id:"bootstrap",libs:["bootstrap"]},{id:"gmdl",prefix:"gmdl",libs:Sidebar.prototype.gmdl},{id:"archimate3",prefix:"archimate3",libs:Sidebar.prototype.archimate3},{id:"archimate",libs:["archimate"]},{id:"sysml",prefix:"sysml",libs:Sidebar.prototype.sysml}];var a=Sidebar.prototype.insertSearchHint;Sidebar.prototype.insertSearchHint=function(b,d,c,f,n,m,p,r){if(null!=r&&1==f){var s=null;if(0<=mxUtils.indexOf(r,"text"))s="Double click anywhere in the diagram to insert text.";else for(var q=
-"line lines arrow arrows connect connection connections connector connectors curve curves link links".split(" "),t=0;t<q.length;t++)if(0<=mxUtils.indexOf(r,q[t])){s="Need help with connections?";break}null!=s&&(q=document.createElement("a"),q.setAttribute("href","https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1"),q.setAttribute("target","_blank"),q.className="geTitle",q.style.cssText="background-color:#ffd350;border-radius:6px;color:black;border:1px solid black !important;text-align:center;white-space:normal;padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;",
+"line lines arrow arrows connect connection connections connector connectors curve curves link links".split(" "),u=0;u<q.length;u++)if(0<=mxUtils.indexOf(r,q[u])){s="Need help with connections?";break}null!=s&&(q=document.createElement("a"),q.setAttribute("href","https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1"),q.setAttribute("target","_blank"),q.className="geTitle",q.style.cssText="background-color:#ffd350;border-radius:6px;color:black;border:1px solid black !important;text-align:center;white-space:normal;padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;",
mxUtils.write(q,s),b.appendChild(q))}a.apply(this,arguments)};Sidebar.prototype.togglePalettes=function(b,a){this.showPalettes(b,a)};Sidebar.prototype.togglePalette=function(b){this.showPalette(b)};Sidebar.prototype.showPalettes=function(b,a,d){for(var c=0;c<a.length;c++)this.showPalette(b+a[c],d)};Sidebar.prototype.showPalette=function(b,a){var d=this.palettes[b];if(null!=d)for(var c=null!=a?a?"block":"none":"none"==d[0].style.display?"block":"none",f=0;f<d.length;f++)d[f].style.display=c};Sidebar.prototype.isEntryVisible=
function(b){for(var a=0;a<this.configuration.length;a++)if(this.configuration[a].id==b){var d=this.palettes[null!=this.configuration[a].libs?(this.configuration[a].prefix||"")+this.configuration[a].libs[0]:b];if(null!=d)return"none"!=d[0].style.display}return!1};Sidebar.prototype.showEntries=function(b,a,d){this.libs=null!=b&&(d||0<b.length)?b:null!=urlParams.libs&&0<urlParams.libs.length?decodeURIComponent(urlParams.libs):mxSettings.getLibraries();d=this.libs.split(";");for(var c=0;c<this.configuration.length;c++)"search"!=
this.configuration[c].id&&this.showPalettes(this.configuration[c].prefix||"",this.configuration[c].libs||[this.configuration[c].id],0<=mxUtils.indexOf(d,this.configuration[c].id));a&&(mxSettings.setLibraries(b),mxSettings.save())};Sidebar.prototype.init=function(){this.entries=[{title:mxResources.get("standard"),entries:[{title:mxResources.get("general"),id:"general",image:IMAGE_PATH+"/sidebar-general.png"},{title:mxResources.get("arrows"),id:"arrows2",image:IMAGE_PATH+"/sidebar-arrows2.png"},{title:mxResources.get("basic"),
@@ -3795,8 +3795,8 @@ e.vertex=!0;var g=new mxCell("Nested Media heading",new mxGeometry(140,90,300,30
k.vertex=!0;var l=new mxCell("64x64",new mxGeometry(140,180,64,64),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;align\x3dcenter;strokeColor\x3dnone;fillColor\x3d#f6f6f6;fontColor\x3d#999999;whiteSpace\x3dwrap;");l.vertex=!0;var n=new mxCell("Nested media heading",new mxGeometry(210,180,300,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;fontSize\x3d24;align\x3dleft;whiteSpace\x3dwrap;");n.vertex=!0;var m=new mxCell("Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.",
new mxGeometry(210,210,490,60),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;align\x3dleft;verticalAlign\x3dtop;whiteSpace\x3dwrap;fontSize\x3d14;whiteSpace\x3dwrap;");m.vertex=!0;var p=new mxCell("64x64",new mxGeometry(70,280,64,64),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;align\x3dcenter;strokeColor\x3dnone;fillColor\x3d#f6f6f6;fontColor\x3d#999999;whiteSpace\x3dwrap;");p.vertex=!0;var r=new mxCell("Nested Media heading",new mxGeometry(140,280,300,
30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;fontSize\x3d24;align\x3dleft;whiteSpace\x3dwrap;");r.vertex=!0;var s=new mxCell("Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.",new mxGeometry(140,310,560,60),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;align\x3dleft;verticalAlign\x3dtop;whiteSpace\x3dwrap;fontSize\x3d14;whiteSpace\x3dwrap;");
-s.vertex=!0;var q=new mxCell("64x64",new mxGeometry(636,370,64,64),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;align\x3dcenter;strokeColor\x3dnone;fillColor\x3d#f6f6f6;fontColor\x3d#999999;whiteSpace\x3dwrap;");q.vertex=!0;var t=new mxCell("Media heading",new mxGeometry(0,370,200,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;fontSize\x3d24;align\x3dleft;whiteSpace\x3dwrap;");t.vertex=!0;var u=new mxCell("Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.",
-new mxGeometry(0,400,630,60),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;align\x3dleft;verticalAlign\x3dtop;whiteSpace\x3dwrap;fontSize\x3d14;whiteSpace\x3dwrap;");u.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,t,u],700,460,"Media List")}),this.addEntry("bootstrap linked item custom content",function(){var c=new mxCell("",new mxGeometry(0,0,400,240),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;fillColor\x3d#ffffff;strokeColor\x3d#dddddd;whiteSpace\x3dwrap;");
+s.vertex=!0;var q=new mxCell("64x64",new mxGeometry(636,370,64,64),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;align\x3dcenter;strokeColor\x3dnone;fillColor\x3d#f6f6f6;fontColor\x3d#999999;whiteSpace\x3dwrap;");q.vertex=!0;var u=new mxCell("Media heading",new mxGeometry(0,370,200,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;fontSize\x3d24;align\x3dleft;whiteSpace\x3dwrap;");u.vertex=!0;var t=new mxCell("Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.",
+new mxGeometry(0,400,630,60),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;align\x3dleft;verticalAlign\x3dtop;whiteSpace\x3dwrap;fontSize\x3d14;whiteSpace\x3dwrap;");t.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,u,t],700,460,"Media List")}),this.addEntry("bootstrap linked item custom content",function(){var c=new mxCell("",new mxGeometry(0,0,400,240),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;fillColor\x3d#ffffff;strokeColor\x3d#dddddd;whiteSpace\x3dwrap;");
c.vertex=!0;var d=new mxCell("Donec id elit non mi porta gravida at eget metus.\nMaecenas sed diam eget risus varius blandit.",new mxGeometry(0,0,400,80),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;fillColor\x3dnone;strokeColor\x3d#dddddd;perimeter\x3dnone;spacingLeft\x3d10;align\x3dleft;fontSize\x3d14;whiteSpace\x3dwrap;verticalAlign\x3dbottom;spacingBottom\x3d10;resizeWidth\x3d1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(0,80);d.vertex=!0;c.insert(d);var b=new mxCell("List group item heading",
new mxGeometry(0,0,400,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;spacingLeft\x3d10;align\x3dleft;fontSize\x3d18;whiteSpace\x3dwrap;resizeWidth\x3d1;");b.geometry.relative=!0;b.vertex=!0;d.insert(b);d=new mxCell("Donec id elit non mi porta gravida at eget metus.\nMaecenas sed diam eget risus varius blandit.",new mxGeometry(0,1,400,80),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.bottomButton;rSize\x3d5;fillColor\x3dnone;strokeColor\x3d#dddddd;spacingLeft\x3d10;align\x3dleft;fontSize\x3d14;perimeter\x3dnone;whiteSpace\x3dwrap;verticalAlign\x3dbottom;spacingBottom\x3d13;resizeWidth\x3d1;");
d.geometry.relative=!0;d.geometry.offset=new mxPoint(0,-80);d.vertex=!0;c.insert(d);b=new mxCell("List group item heading",new mxGeometry(0,0,400,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.anchor;spacingLeft\x3d10;align\x3dleft;fontSize\x3d18;whiteSpace\x3dwrap;resizeWidth\x3d1;");b.geometry.relative=!0;b.vertex=!0;d.insert(b);d=new mxCell("Donec id elit non mi porta gravida at eget metus.\nMaecenas sed diam eget risus varius blandit.",new mxGeometry(0,0,400,80),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.topButton;rSize\x3d5;fillColor\x3d#3D8BCD;strokeColor\x3d#3D8BCD;fontColor\x3d#ffffff;spacingLeft\x3d10;align\x3dleft;fontSize\x3d14;perimeter\x3dnone;whiteSpace\x3dwrap;verticalAlign\x3dbottom;spacingBottom\x3d13;resizeWidth\x3d1;");
@@ -3929,16 +3929,16 @@ g.vertex=!0;var k=new mxCell("",new mxGeometry(772,87,8,4),"shape\x3dtriangle;st
new mxGeometry(0,180,800,240),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;fontSize\x3d12;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;align\x3dleft;spacing\x3d10;verticalAlign\x3dtop;whiteSpace\x3dwrap;");n.vertex=!0;var m=new mxCell("Insert System Variable",new mxGeometry(650,160,120,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;align\x3dright;fontSize\x3d10;whiteSpace\x3dwrap;");m.vertex=!0;var p=new mxCell("",
new mxGeometry(772,167,8,4),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");p.vertex=!0;var r=new mxCell("%USER_FULL_NAME%\n%USER_EMAIL%\n%USER_PROFILE_COMPLETENESS%\n%USER_NUM_SUCCESS_TRADES%\n%USER_FULL_NAME%\n%USER_EMAIL%\n%USER_PROFILE_COMPLETENESS%\n%USER_NUM_SUCCESS_SELLS%",new mxGeometry(550,175,240,140),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fontSize\x3d12;rSize\x3d2;strokeColor\x3d#dddddd;fillColor\x3d#ffffff;align\x3dleft;verticalAlign\x3dtop;spacing\x3d10;shadow\x3d1;whiteSpace\x3dwrap;");
r.vertex=!0;var s=new mxCell("Message Type",new mxGeometry(0,440,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;");s.vertex=!0;var q=new mxCell("Email + Push",new mxGeometry(0,460,390,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;align\x3dleft;spacingLeft\x3d10;fontSize\x3d16;whiteSpace\x3dwrap;");
-q.vertex=!0;var t=new mxCell("",new mxGeometry(370,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");t.vertex=!0;var u=new mxCell("Tap target",new mxGeometry(410,440,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;");u.vertex=!0;var v=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;align\x3dleft;spacingLeft\x3d10;fontSize\x3d16;whiteSpace\x3dwrap;");
-v.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 x=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;");x.vertex=!0;var y=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;");
-y.vertex=!0;var C=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;");C.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 F=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;");
-F.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 E=new mxCell("",new mxGeometry(420,543,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");E.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 Q=new mxCell("",new mxGeometry(420,
+q.vertex=!0;var u=new mxCell("",new mxGeometry(370,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");u.vertex=!0;var t=new mxCell("Tap target",new mxGeometry(410,440,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;");t.vertex=!0;var v=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;align\x3dleft;spacingLeft\x3d10;fontSize\x3d16;whiteSpace\x3dwrap;");
+v.vertex=!0;var z=new mxCell("",new mxGeometry(780,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");z.vertex=!0;var x=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;");x.vertex=!0;var y=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;");
+y.vertex=!0;var C=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;");C.vertex=!0;var A=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;");
+A.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 E=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;");
+E.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 J=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");J.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 Q=new mxCell("",new mxGeometry(420,
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");Q.vertex=!0;var U=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;");U.vertex=!0;var Y=new mxCell("",new mxGeometry(420,603,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");
-Y.vertex=!0;var O=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;");O.vertex=!0;var D=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");D.vertex=!0;var N=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;");
-N.vertex=!0;var P=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;");P.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,A,x,y,C,z,B,F,G,E,H,I,L,Q,U,Y,O,D,N,P,M,V],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
+Y.vertex=!0;var O=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;");O.vertex=!0;var D=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");D.vertex=!0;var T=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;");
+T.vertex=!0;var M=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;");M.vertex=!0;var K=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;");
+K.vertex=!0;var $=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;");$.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,x,y,C,A,B,E,G,F,H,J,L,Q,U,Y,O,D,T,M,K,$],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;");
@@ -3954,20 +3954,20 @@ g.vertex=!0;var k=new mxCell("Company",new mxGeometry(40,140,100,20),"html\x3d1;
160,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");n.vertex=!0;var m=new mxCell("ok",new mxGeometry(700,170,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;align\x3dcenter;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");m.vertex=!0;var p=new mxCell("Working from",
new mxGeometry(40,210,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;");p.vertex=!0;var r=new mxCell("",new mxGeometry(13,243,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");r.vertex=!0;var s=new mxCell("October",new mxGeometry(40,230,130,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");
s.vertex=!0;var q=new mxCell("",new mxGeometry(1,0.5,10,5),"shape\x3dtriangle;direction\x3dsouth;fillColor\x3d#000000;strokeColor\x3dnone;perimeter\x3dnone;whiteSpace\x3dwrap;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(-30,-3);q.vertex=!0;s.insert(q);q=new mxCell("2011",new mxGeometry(190,230,130,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");
-q.vertex=!0;var t=new mxCell("",new mxGeometry(1,0.5,10,5),"shape\x3dtriangle;direction\x3dsouth;fillColor\x3d#000000;strokeColor\x3dnone;perimeter\x3dnone;whiteSpace\x3dwrap;");t.geometry.relative=!0;t.geometry.offset=new mxPoint(-30,-3);t.vertex=!0;q.insert(t);t=new mxCell("Working to",new mxGeometry(400,210,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;");t.vertex=
-!0;var u=new mxCell("Current time",new mxGeometry(580,210,100,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;align\x3dright;spacingRight\x3d5;fontColor\x3d#55C0E0;whiteSpace\x3dwrap;");u.vertex=!0;var v=new mxCell("",new mxGeometry(340,240,40,20),"shape\x3dline;strokeWidth\x3d2;shadow\x3d0;dashed\x3d0;");v.vertex=!0;var A=new mxCell("December",new mxGeometry(400,230,130,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");
-A.vertex=!0;var x=new mxCell("",new mxGeometry(1,0.5,10,5),"shape\x3dtriangle;direction\x3dsouth;fillColor\x3d#000000;strokeColor\x3dnone;perimeter\x3dnone;");x.geometry.relative=!0;x.geometry.offset=new mxPoint(-30,-3);x.vertex=!0;A.insert(x);x=new mxCell("2012",new mxGeometry(550,230,130,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");x.vertex=!0;var y=
+q.vertex=!0;var u=new mxCell("",new mxGeometry(1,0.5,10,5),"shape\x3dtriangle;direction\x3dsouth;fillColor\x3d#000000;strokeColor\x3dnone;perimeter\x3dnone;whiteSpace\x3dwrap;");u.geometry.relative=!0;u.geometry.offset=new mxPoint(-30,-3);u.vertex=!0;q.insert(u);u=new mxCell("Working to",new mxGeometry(400,210,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;");u.vertex=
+!0;var t=new mxCell("Current time",new mxGeometry(580,210,100,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;align\x3dright;spacingRight\x3d5;fontColor\x3d#55C0E0;whiteSpace\x3dwrap;");t.vertex=!0;var v=new mxCell("",new mxGeometry(340,240,40,20),"shape\x3dline;strokeWidth\x3d2;shadow\x3d0;dashed\x3d0;");v.vertex=!0;var z=new mxCell("December",new mxGeometry(400,230,130,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");
+z.vertex=!0;var x=new mxCell("",new mxGeometry(1,0.5,10,5),"shape\x3dtriangle;direction\x3dsouth;fillColor\x3d#000000;strokeColor\x3dnone;perimeter\x3dnone;");x.geometry.relative=!0;x.geometry.offset=new mxPoint(-30,-3);x.vertex=!0;z.insert(x);x=new mxCell("2012",new mxGeometry(550,230,130,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");x.vertex=!0;var y=
new mxCell("",new mxGeometry(1,0.5,10,5),"shape\x3dtriangle;direction\x3dsouth;fillColor\x3d#000000;strokeColor\x3dnone;perimeter\x3dnone;");y.geometry.relative=!0;y.geometry.offset=new mxPoint(-30,-3);y.vertex=!0;x.insert(y);y=new mxCell("ok",new mxGeometry(700,240,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;align\x3dcenter;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");y.vertex=!0;return a.createVertexTemplateFromCells([c,
-d,b,e,g,k,l,n,m,p,r,s,q,t,u,v,A,x,y],800,270,"Experience")}),this.addEntry("bootstrap skills",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("Select fields to update status",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#dddddd;fillColor\x3d#ffffff;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d10;fontStyle\x3d1;");
+d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,x,y],800,270,"Experience")}),this.addEntry("bootstrap skills",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("Select fields to update status",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#dddddd;fillColor\x3d#ffffff;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 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#fdfdfd;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-120,-15);d.vertex=!0;c.insert(d);d=new mxCell("",new mxGeometry(13,103,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");
d.vertex=!0;var b=new mxCell("Engineering",new mxGeometry(40,90,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");b.vertex=!0;var e=new mxCell("ok",new mxGeometry(700,100,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");
e.vertex=!0;var g=new mxCell("",new mxGeometry(13,173,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");g.vertex=!0;var k=new mxCell("Thinking",new mxGeometry(40,160,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#FDF8E4;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");k.vertex=!0;var l=new mxCell("To Moderate",new mxGeometry(700,
170,90,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#EFAC43;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");l.vertex=!0;var n=new mxCell("",new mxGeometry(13,243,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");n.vertex=!0;var m=new mxCell("Working",new mxGeometry(40,230,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");
m.vertex=!0;var p=new mxCell("ok",new mxGeometry(700,240,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");p.vertex=!0;var r=new mxCell("",new mxGeometry(13,313,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");r.vertex=!0;var s=new mxCell("Sleeping",new mxGeometry(40,
-300,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");s.vertex=!0;var q=new mxCell("ok",new mxGeometry(700,310,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");q.vertex=!0;var t=new mxCell("",
-new mxGeometry(13,383,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");t.vertex=!0;var u=new mxCell("Eating",new mxGeometry(40,370,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");u.vertex=!0;var v=new mxCell("ok",new mxGeometry(700,380,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");
-v.vertex=!0;var A=new mxCell("",new mxGeometry(13,453,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");A.vertex=!0;var x=new mxCell("Walking",new mxGeometry(40,440,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");x.vertex=!0;var y=new mxCell("ok",new mxGeometry(700,
-450,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");y.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,t,u,v,A,x,y],800,480,"Skills")}),this.addEntry("bootstrap chat",function(){var c=new mxCell("",new mxGeometry(0,0,400,660),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3d#333333;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");
+300,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");s.vertex=!0;var q=new mxCell("ok",new mxGeometry(700,310,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");q.vertex=!0;var u=new mxCell("",
+new mxGeometry(13,383,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");u.vertex=!0;var t=new mxCell("Eating",new mxGeometry(40,370,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");t.vertex=!0;var v=new mxCell("ok",new mxGeometry(700,380,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");
+v.vertex=!0;var z=new mxCell("",new mxGeometry(13,453,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d3;strokeColor\x3d#999999;fillColor\x3d#ffffff;");z.vertex=!0;var x=new mxCell("Walking",new mxGeometry(40,440,640,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#999999;fillColor\x3d#ffffff;align\x3dleft;fontSize\x3d16;spacingLeft\x3d10;whiteSpace\x3dwrap;");x.vertex=!0;var y=new mxCell("ok",new mxGeometry(700,
+450,30,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#58B957;fontSize\x3d12;fontStyle\x3d1;fontColor\x3d#ffffff;whiteSpace\x3dwrap;");y.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,x,y],800,480,"Skills")}),this.addEntry("bootstrap chat",function(){var c=new mxCell("",new mxGeometry(0,0,400,660),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3d#333333;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");
c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,400,50),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3d#333333;fillColor\x3d#333333;whiteSpace\x3dwrap;resizeWidth\x3d1;");d.geometry.relative=!0;d.vertex=!0;c.insert(d);var b=new mxCell("John Boo",new mxGeometry(0,0.5,30,30),"shape\x3dellipse;strokeColor\x3dnone;fillColor\x3d#f0f0f0;labelPosition\x3dright;align\x3dleft;spacingLeft\x3d10;fontColor\x3d#f0f0f0;html\x3d1;");b.geometry.relative=!0;b.geometry.offset=
new mxPoint(15,-15);b.vertex=!0;d.insert(b);var e=new mxCell("",new mxGeometry(0.5,0.5,20,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.user;strokeColor\x3dnone;fillColor\x3d#999999;");e.geometry.relative=!0;e.geometry.offset=new mxPoint(-10,-10);e.vertex=!0;b.insert(e);b=new mxCell("Michael Robinson",new mxGeometry(1,0.5,30,30),"shape\x3dellipse;strokeColor\x3dnone;fillColor\x3d#f0f0f0;labelPosition\x3dleft;align\x3dright;spacingRight\x3d10;fontColor\x3d#f0f0f0;html\x3d1;");b.geometry.relative=
!0;b.geometry.offset=new mxPoint(-45,-15);b.vertex=!0;d.insert(b);d=new mxCell("",new mxGeometry(0.5,0.5,20,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.user;strokeColor\x3dnone;fillColor\x3d#999999;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-10,-10);d.vertex=!0;b.insert(d);d=new mxCell("15 September 2013",new mxGeometry(0,0,400,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#fdfdfd;fontColor\x3d#999999;whiteSpace\x3dwrap;resizeWidth\x3d1;");
@@ -4116,8 +4116,8 @@ this.addEntry("eip enterprise integration pattern message routing message broker
"strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;shape\x3drect;fillColor\x3d#fffbc0;strokeColor\x3d#000000;");e.vertex=!0;var f=new mxCell("",new mxGeometry(0,54,26,18),"strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;shape\x3drect;fillColor\x3d#fffbc0;strokeColor\x3d#000000;");f.vertex=!0;var k=new mxCell("",new mxGeometry(94,54,26,18),"strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;shape\x3drect;fillColor\x3d#fffbc0;strokeColor\x3d#000000;");k.vertex=!0;var l=new mxCell("",
new mxGeometry(47,72,26,18),"strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;shape\x3drect;fillColor\x3d#fffbc0;strokeColor\x3d#000000;");l.vertex=!0;var n=new mxCell("",new mxGeometry(47,36,26,18),"strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;shape\x3drect;fillColor\x3d#c0f5a9;strokeColor\x3d#000000;");n.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");m.geometry.relative=!0;m.edge=!0;a.insertEdge(m,
!1);n.insertEdge(m,!0);var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!1);n.insertEdge(p,!0);var r=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");r.geometry.relative=!0;r.edge=!0;e.insertEdge(r,!1);n.insertEdge(r,!0);var s=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");
-s.geometry.relative=!0;s.edge=!0;f.insertEdge(s,!1);n.insertEdge(s,!0);var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");q.geometry.relative=!0;q.edge=!0;k.insertEdge(q,!1);n.insertEdge(q,!0);var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");t.geometry.relative=!0;t.edge=!0;l.insertEdge(t,!1);n.insertEdge(t,!0);return c.createVertexTemplateFromCells([a,b,
-e,f,k,l,n,m,p,r,s,q,t],120,90,"Message Broker")}),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.message_filter;",150,90,"","Message Filter",null,null,this.getTagsForStencil("mxgraph.eip","message_filter","eip enterprise integration pattern message routing ").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.process_manager;",
+s.geometry.relative=!0;s.edge=!0;f.insertEdge(s,!1);n.insertEdge(s,!0);var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");q.geometry.relative=!0;q.edge=!0;k.insertEdge(q,!1);n.insertEdge(q,!0);var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle\x3dnone;endArrow\x3dnone;dashed\x3d0;html\x3d1;strokeWidth\x3d2;");u.geometry.relative=!0;u.edge=!0;l.insertEdge(u,!1);n.insertEdge(u,!0);return c.createVertexTemplateFromCells([a,b,
+e,f,k,l,n,m,p,r,s,q,u],120,90,"Message Broker")}),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.message_filter;",150,90,"","Message Filter",null,null,this.getTagsForStencil("mxgraph.eip","message_filter","eip enterprise integration pattern message routing ").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.process_manager;",
150,90,"","Process Manager",null,null,this.getTagsForStencil("mxgraph.eip","process_manager","eip enterprise integration pattern message routing ").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.recipient_list;",150,90,"","Recipient List",null,null,this.getTagsForStencil("mxgraph.eip","recipient_list","eip enterprise integration pattern message routing ").join(" ")),
this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.resequencer;",150,90,"","Resequencer",null,null,this.getTagsForStencil("mxgraph.eip","resequencer","eip enterprise integration pattern message routing ").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.routing_slip;",
150,90,"","Routing Slip",null,null,this.getTagsForStencil("mxgraph.eip","routing_slip","eip enterprise integration pattern message routing ").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;fillColor\x3d#c0f5a9;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;strokeColor\x3d#000000;shape\x3dmxgraph.eip.splitter;",150,90,"","Splitter",null,null,this.getTagsForStencil("mxgraph.eip","splitter","eip enterprise integration pattern message routing ").join(" "))];
@@ -4167,17 +4167,17 @@ this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fon
this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.eip.test_message;fillColor\x3d#c0f5a9;strokeColor\x3d#000000;",150,90,"","Test Message",null,null,this.getTagsForStencil("mxgraph.eip","test_message","eip enterprise integration pattern system management ").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;dashed\x3d0;align\x3dcenter;fontSize\x3d8;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.eip.wire_tap;fillColor\x3d#c0f5a9;strokeColor\x3d#000000;",
150,90,"","Wire Tap",null,null,this.getTagsForStencil("mxgraph.eip","wire_tap","eip enterprise integration pattern system management ").join(" "))])}})();
(function(){Sidebar.prototype.addElectricalPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"\x3dbottom;shadow\x3d0;dashed\x3d0;align\x3dcenter;fillColor\x3d#ffffff;html\x3d1;"+mxConstants.STYLE_VERTICAL_ALIGN+"\x3dtop;strokeWidth\x3d1;"+mxConstants.STYLE_SHAPE,c=a+"\x3dmxgraph.electrical.abstract.",f=a+"\x3dmxgraph.electrical.capacitors.",d="fillColor\x3d#000000;"+a+"\x3dmxgraph.electrical.diodes.",b=a+"\x3dmxgraph.electrical.inductors.",e=a+"\x3dmxgraph.electrical.miscellaneous.",
-g=a+"\x3dmxgraph.electrical.electro-mechanical.",k=a+"\x3dmxgraph.electrical.logic_gates.",l=a+"\x3dmxgraph.electrical.mosfets1.",n=a+"\x3dmxgraph.electrical.transistors.",m=a+"\x3dmxgraph.electrical.opto_electronics.",p=a+"\x3dmxgraph.electrical.plc_ladder.",r=a+"\x3dmxgraph.electrical.radio.",s=a+"\x3dmxgraph.electrical.resistors.",q=a+"\x3dmxgraph.electrical.signal_sources.",t=a+"\x3dmxgraph.electrical.thermionic_devices.",u=a+"\x3dmxgraph.electrical.waveforms.",v="perimeter\x3dellipsePerimeter;"+
-a+"\x3dmxgraph.electrical.instruments.",A=a+"\x3dmxgraph.electrical.iec_logic_gates.",x=a+"\x3dmxgraph.electrical.rot_mech.",y=a+"\x3dmxgraph.electrical.transmission.";this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(k+"and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"buffer;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
+g=a+"\x3dmxgraph.electrical.electro-mechanical.",k=a+"\x3dmxgraph.electrical.logic_gates.",l=a+"\x3dmxgraph.electrical.mosfets1.",n=a+"\x3dmxgraph.electrical.transistors.",m=a+"\x3dmxgraph.electrical.opto_electronics.",p=a+"\x3dmxgraph.electrical.plc_ladder.",r=a+"\x3dmxgraph.electrical.radio.",s=a+"\x3dmxgraph.electrical.resistors.",q=a+"\x3dmxgraph.electrical.signal_sources.",u=a+"\x3dmxgraph.electrical.thermionic_devices.",t=a+"\x3dmxgraph.electrical.waveforms.",v="perimeter\x3dellipsePerimeter;"+
+a+"\x3dmxgraph.electrical.instruments.",z=a+"\x3dmxgraph.electrical.iec_logic_gates.",x=a+"\x3dmxgraph.electrical.rot_mech.",y=a+"\x3dmxgraph.electrical.transmission.";this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(k+"and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"buffer;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
"buffer","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"d_type_flip-flop;",100,80,"","D Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"d_type_flip-flop_with_clear;",100,90,"","D Type Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+
"d_type_rs_flip-flop;",100,100,"","D Type RS Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_rs_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"inverter;",100,60,"","Inverter",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverter","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"inverting_contact;",5,5,"","Inverting Contact",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
"inverting_contact","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"jk_flip-flop;",100,80,"","JK Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"jk_flip-flop_with_clear;",100,90,"","JK Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+
"jk_flip-flop_with_sr;",100,100,"","JK Flip-Flop With SR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop_with_sr","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"nand;",100,60,"","NAND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nand","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"nor;",100,60,"","NOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nor","electrical logic gate ").join(" ")),
this.createVertexTemplateEntry(k+"or;",100,60,"","OR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","or","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"rs_latch;",100,80,"","RS Latch",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","rs_latch","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"synchronous_rs_latch;",100,80,"","RS Latch (Synchronous)",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","synchronous_rs_latch",
"electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"schmitt_trigger;",100,60,"","Schmitt Trigger",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","schmitt_trigger","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"t_type_flip-flop;",100,80,"","T Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","t_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xnor;",100,60,"","XNOR",null,
-null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(A+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"nand;",66,80,"","NAND (IEC)",
-null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"nor;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+
-"not;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(A+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" "))]);this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(s+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
+null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(k+"xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(z+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(z+"nand;",66,80,"","NAND (IEC)",
+null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(z+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(z+"nor;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(z+
+"not;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(z+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" "))]);this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(s+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
"resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(s+"resistor_2;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(s+"potentiometer_1;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(s+"potentiometer_2;",100,40,"","Potentiometer",
null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(s+"trimmer_pot_1;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(s+"trimmer_pot_2;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_2","electrical resistor ").join(" ")),
this.createVertexTemplateEntry(s+"trimmer_resistor_1;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(s+"trimmer_resistor_2;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(s+"variable_resistor_1;",100,60,"","Resistor (Variable)",
@@ -4298,12 +4298,12 @@ this.createVertexTemplateEntry(m+"led_1;",100,65,"","LED",null,null,this.getTags
"light-activated_scr","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"opto-coupler;",99,60,"","Opto-coupler",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","opto-coupler","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"opto-transistor;",100,110,"","Opto-transistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","opto-transistor","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photodiode;",100,
70,"","Photodiode",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photodiode","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_1;",100,90,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photo_resistor_1","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_2;",100,50,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photo_resistor_2",
"electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_3;",100,90,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photo_resistor_3","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"solar_cell;",100,70,"","Solar Cell",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","solar_cell","electrical optical ").join(" "))]);this.addPaletteFunctions("electricalVacuumTubes","Electrical / Vacuum Tubes",
-!1,[this.createVertexTemplateEntry(t+"diode;",70,77,"","Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(t+"double_diode;",70,77,"","Double Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(t+"triode;",70,77,"","Triode",null,null,
-this.getTagsForStencil("mxgraph.electrical.thermionic_devices","triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(t+"double_triode;",70,77,"","Double Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(t+"tetrode;",70,77,"","Tetrode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","tetrode",
-"electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(t+"pentode;",70,77,"","Pentode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","pentode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(t+"photocell;",70,87,"","Photocell",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","photocell","electrical thermionic thermo device vacuum tube ").join(" "))]);this.addPaletteFunctions("electricalWaveforms",
-"Electrical / Waveforms",!1,[this.createVertexTemplateEntry(u+"pulse_1;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"pulse_2;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_2","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"sawtooth;",90,40,"","Sawtooth",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms",
-"sawtooth","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"sine_wave;",90,66.18,"","Sine Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sine_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"slow_square_wave;",90,80,"","Chopped Square Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","slow_square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"square_wave;",90,
-80,"","square_wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"step_1;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"step_2;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_2","electrical waveform signal ").join(" "))]);this.addPaletteFunctions("electricalRotMech",
+!1,[this.createVertexTemplateEntry(u+"diode;",70,77,"","Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"double_diode;",70,77,"","Double Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"triode;",70,77,"","Triode",null,null,
+this.getTagsForStencil("mxgraph.electrical.thermionic_devices","triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"double_triode;",70,77,"","Double Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"tetrode;",70,77,"","Tetrode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","tetrode",
+"electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"pentode;",70,77,"","Pentode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","pentode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"photocell;",70,87,"","Photocell",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","photocell","electrical thermionic thermo device vacuum tube ").join(" "))]);this.addPaletteFunctions("electricalWaveforms",
+"Electrical / Waveforms",!1,[this.createVertexTemplateEntry(t+"pulse_1;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(t+"pulse_2;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_2","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(t+"sawtooth;",90,40,"","Sawtooth",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms",
+"sawtooth","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(t+"sine_wave;",90,66.18,"","Sine Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sine_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(t+"slow_square_wave;",90,80,"","Chopped Square Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","slow_square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(t+"square_wave;",90,
+80,"","square_wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(t+"step_1;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(t+"step_2;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_2","electrical waveform signal ").join(" "))]);this.addPaletteFunctions("electricalRotMech",
"Electrical / Rotating Equipment \x26 Mechanical Functions",!1,[this.createVertexTemplateEntry("verticalLabelPosition\x3dmiddle;shadow\x3d0;dashed\x3d0;align\x3dcenter;fillColor\x3d#ffffff;html\x3d1;verticalAlign\x3dmiddle;strokeWidth\x3d1;shape\x3dellipse;fontSize\x3d32;fontColor\x3d#000000;perimeter\x3dellipsePerimeter;",100,100,"M","Rotating Machine",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotating machine","electrical rotating equipment mechanical function functions").join(" ")),
this.createVertexTemplateEntry(x+"armature;",100,100,"","Armature",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","armature","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"field;",90,15,"","Field",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","field","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(e+"permanent_magnet;",20,70,"","Permanent Magnet",null,
null,this.getTagsForStencil("mxgraph.electrical.rot_mech","permanent magnet","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"winding_connection;",100,100,"","Winding Connection",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","winding connection","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"synchro;",80,100,"","Synchro",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
@@ -4395,9 +4395,9 @@ a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");m.ver
s.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,n,m,p,r,s,d],320,140,"Large office table")}),this.addEntry("floorplan office table conference large huge",function(){var d=new mxCell("",new mxGeometry(20,20,520,100),"shape\x3dellipse;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");d.vertex=!0;var b=new mxCell("",new mxGeometry(50,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");b.vertex=!0;var c=new mxCell("",new mxGeometry(50,97,40,43),
a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");c.vertex=!0;var f=new mxCell("",new mxGeometry(0,50,43,40),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dnorth;");f.vertex=!0;var k=new mxCell("",new mxGeometry(517,50,43,40),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dsouth");k.vertex=!0;var l=new mxCell("",new mxGeometry(110,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");
l.vertex=!0;var n=new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");n.vertex=!0;var m=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");m.vertex=!0;var p=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");p.vertex=!0;var r=new mxCell("",new mxGeometry(230,0,40,43),
-a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");r.vertex=!0;var s=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");s.vertex=!0;var q=new mxCell("",new mxGeometry(290,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");q.vertex=!0;var t=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");
-t.vertex=!0;var u=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");u.vertex=!0;var v=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");v.vertex=!0;var A=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");A.vertex=!0;var x=new mxCell("",new mxGeometry(410,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");
-x.vertex=!0;var y=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");y.vertex=!0;var C=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");C.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,n,m,p,r,s,q,t,u,v,A,x,y,C,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=
+a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");r.vertex=!0;var s=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");s.vertex=!0;var q=new mxCell("",new mxGeometry(290,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");q.vertex=!0;var u=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");
+u.vertex=!0;var t=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");t.vertex=!0;var v=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");v.vertex=!0;var z=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");z.vertex=!0;var x=new mxCell("",new mxGeometry(410,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");
+x.vertex=!0;var y=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");y.vertex=!0;var C=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");C.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,n,m,p,r,s,q,u,t,v,z,x,y,C,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=
0;b<f.length;b++)a.appendChild(f[b](a))}))}})();
(function(){Sidebar.prototype.addFlowchartPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"\x3dbottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"\x3dtop;html\x3d1;strokeWidth\x3d2;shape\x3dmxgraph.flowchart.";this.addPaletteFunctions("flowchart",mxResources.get("flowchart"),!1,[this.createVertexTemplateEntry("strokeWidth\x3d2;html\x3d1;shape\x3dmxgraph.flowchart.annotation_1;align\x3dleft;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_1","").join(" ")),
this.createVertexTemplateEntry("strokeWidth\x3d2;html\x3d1;shape\x3dmxgraph.flowchart.annotation_2;align\x3dleft;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_2","").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;html\x3d1;shape\x3dmxgraph.flowchart.card;whiteSpace\x3dwrap;",100,60,"","Card",null,null,this.getTagsForStencil("mxgraph.flowchart","card","").join(" ")),this.createVertexTemplateEntry(a+"collate;",100,100,"","Collate",null,null,this.getTagsForStencil("mxgraph.flowchart",
@@ -5873,8 +5873,8 @@ d=new mxCell("8",new mxGeometry(70,148,20,20),c+"forms.rrect;rSize\x3d0;strokeCo
new mxGeometry(130,148,20,20),c+"forms.rrect;rSize\x3d0;strokeColor\x3d#999999;fontColor\x3d#999999;fillColor\x3d#ddeeff;");d.vertex=!0;a.insert(d);d=new mxCell("24",new mxGeometry(50,108,20,20),c+"forms.rrect;rSize\x3d0;strokeColor\x3d#ff0000;fontColor\x3d#ffffff;strokeWidth\x3d2;fillColor\x3d#008cff;");d.vertex=!0;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Calendar")}),this.addEntry("mockup form email",function(){var a=new mxCell("From",new mxGeometry(0,
0,50,18),c+"forms.anchor;align\x3dright;spacingRight\x3d2;fontColor\x3d#666666;");a.vertex=!0;var d=new mxCell("john@jgraph.com",new mxGeometry(50,0,350,18),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;");d.vertex=!0;var e=new mxCell("Subject",new mxGeometry(0,35,50,18),c+"forms.anchor;align\x3dright;spacingRight\x3d2;fontColor\x3d#666666;");e.vertex=!0;var f=new mxCell("Greeting",new mxGeometry(50,35,350,18),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;");
f.vertex=!0;var m=new mxCell("To",new mxGeometry(0,70,50,18),c+"forms.anchor;align\x3dright;spacingRight\x3d2;fontColor\x3d#666666;");m.vertex=!0;var p=new mxCell("fred@jgraph.com",new mxGeometry(50,70,350,18),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;");p.vertex=!0;var r=new mxCell("CC",new mxGeometry(0,105,50,18),c+"forms.anchor;align\x3dright;spacingRight\x3d2;fontColor\x3d#666666;");r.vertex=!0;var s=new mxCell("",
-new mxGeometry(50,105,350,18),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;");s.vertex=!0;var q=new mxCell("BCC",new mxGeometry(0,140,50,18),c+"forms.anchor;align\x3dright;spacingRight\x3d2;fontColor\x3d#666666;");q.vertex=!0;var t=new mxCell("",new mxGeometry(50,140,350,18),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;");t.vertex=!0;var u=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
-new mxGeometry(0,175,400,125),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;verticalAlign\x3dtop;whiteSpace\x3dwrap;");u.vertex=!0;return b.createVertexTemplateFromCells([a,d,e,f,m,p,r,s,q,t,u],400,300,"Email")})];this.addPalette("mockupForms","Mockup Forms",!1,mxUtils.bind(this,function(b){for(var a=0;a<e.length;a++)b.appendChild(e[a](b))}))};Sidebar.prototype.addMockupGraphicsPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+
+new mxGeometry(50,105,350,18),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;");s.vertex=!0;var q=new mxCell("BCC",new mxGeometry(0,140,50,18),c+"forms.anchor;align\x3dright;spacingRight\x3d2;fontColor\x3d#666666;");q.vertex=!0;var u=new mxCell("",new mxGeometry(50,140,350,18),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;");u.vertex=!0;var t=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
+new mxGeometry(0,175,400,125),c+"forms.rrect;fillColor\x3d#ffffff;rSize\x3d0;fontColor\x3d#666666;align\x3dleft;spacingLeft\x3d3;strokeColor\x3d#999999;verticalAlign\x3dtop;whiteSpace\x3dwrap;");t.vertex=!0;return b.createVertexTemplateFromCells([a,d,e,f,m,p,r,s,q,u,t],400,300,"Email")})];this.addPalette("mockupForms","Mockup Forms",!1,mxUtils.bind(this,function(b){for(var a=0;a<e.length;a++)b.appendChild(e[a](b))}))};Sidebar.prototype.addMockupGraphicsPalette=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_FILLCOLOR+"\x3d#ffffff;",d=mxConstants.STYLE_STROKECOLOR+"\x3dnone;",b=this,e=[this.createVertexTemplateEntry(a+"graphics.barChart;"+f+d+"strokeColor2\x3dnone;strokeColor3\x3d#666666;fillColor2\x3d#008cff;fillColor3\x3d#dddddd;",
400,200,"","Bar Chart",null,null,this.getTagsForStencil("mxgraph.mockup.graphics","barChart","mockup graphics ").join(" ")),this.createVertexTemplateEntry(a+"graphics.columnChart;"+f+d+"strokeColor2\x3dnone;strokeColor3\x3d#666666;fillColor2\x3d#008cff;fillColor3\x3d#dddddd;",400,200,"","Column Chart",null,null,this.getTagsForStencil("mxgraph.mockup.graphics","columnChart","mockup graphics ").join(" ")),this.createVertexTemplateEntry(a+"graphics.lineChart;"+f+d+"strokeColor2\x3d#666666;strokeColor3\x3d#008cff;strokeColor4\x3d#dddddd;",
400,200,"","Line Chart",null,null,this.getTagsForStencil("mxgraph.mockup.graphics","lineChart","mockup graphics ").join(" ")),this.createVertexTemplateEntry(a+"graphics.pieChart;"+mxConstants.STYLE_STROKECOLOR+"\x3d#008cff;parts\x3d10,20,35;partColors\x3d#e0e0e0,#d0d0d0,#c0c0c0,#b0b0b0,#a0a0a0;strokeWidth\x3d2;",200,200,"","Pie Chart",null,null,this.getTagsForStencil("mxgraph.mockup.graphics","pieChart","mockup graphics ").join(" ")),this.createVertexTemplateEntry(a+"graphics.simpleIcon;strokeColor\x3d#999999;fillColor\x3d#ffffff;",
@@ -5918,9 +5918,9 @@ a.vertex=!0;b.insert(a);a=new mxCell("Text 3",new mxGeometry(310,5,115,20),c+"mi
15,0,0),c+"misc.anchor;");a.vertex=!0;b.insert(a);d=new mxCell("",new mxGeometry(-20,5,20,10),"shape\x3dline;strokeColor\x3d#008cff;resizable\x3d0;");d.vertex=!0;a.insert(d);return e.createVertexTemplateFromCells([b],b.geometry.width,b.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;",
+"\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",
@@ -7106,9 +7106,9 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,c,f,d){if(this.isEditable()){var b=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=f&&f()}))}catch(b){null!=d&&d(b)}});this.isRenamable()&&"."==a.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(c){!this.isRenamable()||this.getTitle()==a||null==c?b():
this.ui.confirm(mxResources.get("replaceIt",[a]),b,d)}))}else null!=f&&f()};StorageFile.prototype.rename=function(a,c,f){var d=this.getTitle();this.title=a;this.hasSameExtension(d,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){d!=a&&this.ui.removeLocalData(d,c)}),f)};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,c,f){StorageFile.call(this,a,c,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!1};StorageLibrary.prototype.saveAs=function(a,c,f){this.saveFile(a,!1,c,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,c,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};var StorageDialog=function(a,c){function f(b,d,e,f){function l(){mxEvent.addListener(q,"click",function(){e==App.MODE_GOOGLE&&!a.isDriveDomain()?window.location.hostname=DriveClient.prototype.newAppHostname:e==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,k.checked);c()})):(a.setMode(e,k.checked),c())})}var q=document.createElement("a");q.style.overflow="hidden";var t=document.createElement("img");
-t.setAttribute("src",b);t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";q.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";q.className="geBaseButton";q.style.position="relative";q.style.margin="4px";q.style.padding="8px 10px 12px 10px";q.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(q.style.cssFloat="left",q.style.zoom="1");q.appendChild(t);var u=document.createElement("div");q.appendChild(u);mxUtils.write(u,
-d);if(null!=f&&null==a[f]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(q);var A=window.setTimeout(function(){null==a[f]&&(v.stop(),q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[f]&&(window.clearTimeout(A),mxUtils.setOpacity(u,100),t.style.visibility="",v.stop(),l())}))}else l();g.appendChild(q)}
+StorageLibrary.prototype.isRenamable=function(a,c,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};var StorageDialog=function(a,c){function f(b,d,e,f){function l(){mxEvent.addListener(q,"click",function(){e==App.MODE_GOOGLE&&!a.isDriveDomain()?window.location.hostname=DriveClient.prototype.newAppHostname:e==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(e,k.checked);c()})):(a.setMode(e,k.checked),c())})}var q=document.createElement("a");q.style.overflow="hidden";var u=document.createElement("img");
+u.setAttribute("src",b);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";q.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";q.className="geBaseButton";q.style.position="relative";q.style.margin="4px";q.style.padding="8px 10px 12px 10px";q.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(q.style.cssFloat="left",q.style.zoom="1");q.appendChild(u);var t=document.createElement("div");q.appendChild(t);mxUtils.write(t,
+d);if(null!=f&&null==a[f]){u.style.visibility="hidden";mxUtils.setOpacity(t,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(q);var z=window.setTimeout(function(){null==a[f]&&(v.stop(),q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[f]&&(window.clearTimeout(z),mxUtils.setOpacity(t,100),u.style.visibility="",v.stop(),l())}))}else l();g.appendChild(q)}
var d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var b=a.addLanguageMenu(d);null!=b&&(b.style.bottom="28px");a.isOffline()||(b=document.createElement("a"),b.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),b.setAttribute("title",mxResources.get("help")),b.setAttribute("target","_blank"),b.style.position="absolute",b.style.textDecoration="none",b.style.cursor="pointer",b.style.fontSize="12px",b.style.bottom="28px",b.style.left="26px",
b.style.color="gray",mxUtils.write(b,mxResources.get("help")),d.appendChild(b));var e=document.createElement("div");e.style.position="absolute";e.style.cursor="pointer";e.style.fontSize="12px";e.style.bottom="28px";e.style.color="gray";mxUtils.write(e,mxResources.get("decideLater"));a.isOfflineApp()?e.style.right="20px":(mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0)"),e.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)e.style.marginLeft=-Math.round(e.clientWidth/
2)+"px"};d.appendChild(e);mxEvent.addListener(e,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,App.MODE_DEVICE);a.setMode(null);Editor.useLocalStorage=b});var g=document.createElement("div");mxClient.IS_QUIRKS&&(g.style.whiteSpace="nowrap",g.style.cssFloat="left");g.style.border="1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";g.style.padding="26px 0px 12px 0px";var k=document.createElement("input");k.setAttribute("type","checkbox");
@@ -7129,15 +7129,15 @@ g.style.paddingBottom="18px";mxEvent.addListener(d,"click",function(){a.oneDrive
c.style.marginTop="16px";c.style.textAlign="center";e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);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(e);g.appendChild(c);this.container=g},ErrorDialog=function(a,c,f,d,b,e,g,k,l){l=null!=l?l:!0;var n=document.createElement("div");n.style.textAlign=
"center";if(null!=c){var m=document.createElement("div");m.style.padding="0px";m.style.margin="0px";m.style.fontSize="18px";m.style.paddingBottom="16px";m.style.marginBottom="16px";m.style.borderBottom="1px solid #c0c0c0";m.style.color="gray";mxUtils.write(m,c);n.appendChild(m)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=f;n.appendChild(c);f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),
function(){a.hideDialog();e()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");var p=mxUtils.button(d,function(){l&&a.hideDialog();null!=b&&b()});p.className="geBtn";f.appendChild(p);null!=g&&(d=mxUtils.button(g,function(){l&&a.hideDialog();null!=k&&k()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){p.focus()};n.appendChild(f);this.container=n},EmbedHtmlDialog=function(a){function c(c){c=a.getBasenames();var f={};""!=p.value&&p.value!=mxConstants.NONE&&
-(f.highlight=p.value);r.checked||(f.lightbox=!1);f.nav=d.foldingEnabled;var k=parseInt(m.value);!isNaN(k)&&100!=k&&(f.zoom=k/100);k=[];u.checked&&(k.push("pages"),f.resize=!0,null!=a.pages&&null!=a.currentPage&&(f.page=mxUtils.indexOf(a.pages,a.currentPage)));t.checked&&(k.push("zoom"),f.resize=!0);q.checked&&k.push("layers");0<k.length&&(r&&k.push("lightbox"),f.toolbar=k.join(" "));s.checked&&(f.edit=""!=g.value?g.value:"_blank");""!=g.value?f.url=g.value:f.xml=a.getFileData(!0,null,null,null,null,
-!u.checked);b.value='\x3cdiv class\x3d"mxgraph" style\x3d"'+(l.checked?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(f))+'"\x3e\x3c/div\x3e';c=0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26s\x3d":"https://www.draw.io/embed2.js?s\x3d")+c.join(";"):"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js";e.value='\x3cscript type\x3d"text/javascript" src\x3d"'+
+(f.highlight=p.value);r.checked||(f.lightbox=!1);f.nav=d.foldingEnabled;var k=parseInt(m.value);!isNaN(k)&&100!=k&&(f.zoom=k/100);k=[];t.checked&&(k.push("pages"),f.resize=!0,null!=a.pages&&null!=a.currentPage&&(f.page=mxUtils.indexOf(a.pages,a.currentPage)));u.checked&&(k.push("zoom"),f.resize=!0);q.checked&&k.push("layers");0<k.length&&(r&&k.push("lightbox"),f.toolbar=k.join(" "));s.checked&&(f.edit=""!=g.value?g.value:"_blank");""!=g.value?f.url=g.value:f.xml=a.getFileData(!0,null,null,null,null,
+!t.checked);b.value='\x3cdiv class\x3d"mxgraph" style\x3d"'+(l.checked?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(f))+'"\x3e\x3c/div\x3e';c=0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26s\x3d":"https://www.draw.io/embed2.js?s\x3d")+c.join(";"):"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js";e.value='\x3cscript type\x3d"text/javascript" src\x3d"'+
c+'"\x3e\x3c/script\x3e';b.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",!1,null)}a.getCurrentFile();var f=document.createElement("div"),d=a.editor.graph;d.getGraphBounds();mxUtils.write(f,mxResources.get("mainEmbedNotice")+": ");mxUtils.br(f);var b=document.createElement("textarea");b.style.marginTop="6px";b.style.width="550px";b.style.height="160px";b.style.marginBottom="10px";b.style.resize="none";f.appendChild(b);mxUtils.br(f);
mxUtils.write(f,mxResources.get("embedNotice")+": ");mxUtils.br(f);var e=document.createElement("textarea");e.style.marginTop="6px";e.style.width="550px";e.style.height="20px";e.style.resize="none";e.style.marginBottom="10px";f.appendChild(e);mxUtils.br(f);mxUtils.write(f,mxResources.get("publicDiagramUrl")+": ");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","28");g.style.width="340px";g.style.marginBottom="8px";f.appendChild(g);mxUtils.br(f);var k=document.createElement("div");
k.style.paddingTop="10px";k.style.textAlign="center";var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;k.appendChild(l);mxUtils.write(k,mxResources.get("fit"));var n=document.createElement("span");n.style.marginLeft="10px";mxUtils.write(n,mxResources.get("zoom")+": ");k.appendChild(n);var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","4");m.style.width="40px";m.value="100%";k.appendChild(m);
n=document.createElement("span");n.style.marginLeft="10px";mxUtils.write(n,mxResources.get("link")+": ");k.appendChild(n);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","8");p.style.width="50px";p.value="#0000ff";k.appendChild(p);mxUtils.br(k);var r=document.createElement("input");r.setAttribute("type","checkbox");r.setAttribute("checked","checked");r.defaultChecked=!0;r.style.marginTop="14px";k.appendChild(r);mxUtils.write(k,mxResources.get("lightbox"));
var s=document.createElement("input");s.setAttribute("type","checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="10px";var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginLeft="10px";n=a.editor.graph.getModel();null==a.pages||0==a.pages.length&&1>=n.getChildCount(n.getRoot())?q.setAttribute("disabled","disabled"):(q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);mxUtils.write(k,mxResources.get("layers"));
-var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="10px";k.appendChild(t);mxUtils.write(k,mxResources.get("zoom"));t.setAttribute("checked","checked");t.defaultChecked=!0;var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="10px";null!=a.pages&&1<a.pages.length&&(u.setAttribute("checked","checked"),u.defaultChecked=!0,k.appendChild(u));mxUtils.write(k,mxResources.get("allPages"));f.appendChild(k);this.init=function(){c()};
-mxEvent.addListener(g,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(s,"change",c);mxEvent.addListener(l,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(u,"change",c);k=document.createElement("div");k.style.paddingTop="20px";k.style.textAlign="right";a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/pages/viewpage.action?pageId\x3d12878123")}),
+var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="10px";k.appendChild(u);mxUtils.write(k,mxResources.get("zoom"));u.setAttribute("checked","checked");u.defaultChecked=!0;var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="10px";null!=a.pages&&1<a.pages.length&&(t.setAttribute("checked","checked"),t.defaultChecked=!0,k.appendChild(t));mxUtils.write(k,mxResources.get("allPages"));f.appendChild(k);this.init=function(){c()};
+mxEvent.addListener(g,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(s,"change",c);mxEvent.addListener(l,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);k=document.createElement("div");k.style.paddingTop="20px";k.style.textAlign="right";a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/pages/viewpage.action?pageId\x3d12878123")}),
n.className="geBtn",k.appendChild(n));if(!mxClient.IS_CHROMEAPP&&!navigator.standalone&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))n=mxUtils.button(mxResources.get("preview"),function(){var a=window.open(),c=a.document;"CSS1Compat"===document.compatMode&&c.writeln("\x3c!DOCTYPE html\x3e");c.writeln("\x3chtml\x3e");c.writeln("\x3chead\x3e\x3ctitle\x3e"+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e');c.writeln("\x3cbody\x3e");
c.writeln(b.value);var d=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;d&&c.writeln(e.value);c.writeln("\x3c/body\x3e");c.writeln("\x3c/html\x3e");c.close();if(!d){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));d=a.document.createElement("img");d.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");d.style.marginLeft="6px";f.appendChild(d);a.document.body.insertBefore(f,
a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(e.value)[1];c.body.appendChild(a);f.parentNode.removeChild(f)},20)}}),n.className="geBtn",k.appendChild(n);var n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("copy"),function(){b.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",
@@ -7145,9 +7145,9 @@ a.document.body.firstChild);window.setTimeout(function(){var a=document.createEl
(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",c+="cursor:pointer;");k.checked&&(c+="max-width:100%;");var d="";m.checked&&(d=' width\x3d"'+Math.round(f.width)+'" height\x3d"'+Math.round(f.height)+'"');e.value='\x3cimg src\x3d"'+a+'"'+d+(""!=c?' style\x3d"'+c+'"':"")+b+"/\x3e";e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)};if(a.isExportToCanvas())e.value=mxResources.get("updatingDocument"),a.exportToCanvas(mxUtils.bind(this,
function(b){var c=p.checked?a.getFileData(!0):null;b=a.createPngDataUri(b,c);g(b)}),null,null,null,mxUtils.bind(this,function(b){e.value="";a.handleError({message:mxResources.get("unknownError")})}),null,!0,m.checked?2:1,null,l.checked);else if(b=a.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){e.value=mxResources.get("updatingDocument");var v="";m.checked&&(v="\x26w\x3d"+Math.round(2*f.width)+"\x26h\x3d"+Math.round(2*f.height));var s=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+
(p.checked?"1":"0")+v+"\x26xml\x3d"+encodeURIComponent(b));s.send(mxUtils.bind(this,function(){200==s.getStatus()?document.body.contains(d)&&g("data:image/png;base64,"+s.getText()):(e.value="",a.handleError({message:mxResources.get("unknownError")}))}))}else e.value="",a.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}else{b=a.editor.graph.getSvg();v=b.getElementsByTagName("a");if(null!=v)for(var x=0;x<v.length;x++){var y=v[x].getAttribute("href");null!=y&&("#"==
-y.charAt(0)&&"_blank"==v[x].getAttribute("target"))&&v[x].removeAttribute("target")}p.checked&&b.setAttribute("content",a.getFileData(!0));l.checked&&a.editor.addSvgShadow(b);if(n.checked){var C=" ",z="";p.checked&&(C="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
-(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",z+="cursor:pointer;");k.checked&&(z+="max-width:100%;");a.convertImages(b,function(b){e.value='\x3cimg src\x3d"'+a.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=z?' style\x3d"'+z+'"':"")+C+"/\x3e"})}else z="",p.checked&&(b.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
-(r.checked?"\x26layers\x3d1":"")+"');}}})(this);"),z+="cursor:pointer;"),k.checked&&(v=parseInt(b.getAttribute("width")),x=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","0 0 "+v+" "+x),z+="max-width:100%;max-height:"+x+"px;",b.removeAttribute("height")),""!=z&&b.setAttribute("style",z),e.value=mxUtils.getXml(b);e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)}}a.getCurrentFile();var d=document.createElement("div"),
+y.charAt(0)&&"_blank"==v[x].getAttribute("target"))&&v[x].removeAttribute("target")}p.checked&&b.setAttribute("content",a.getFileData(!0));l.checked&&a.editor.addSvgShadow(b);if(n.checked){var C=" ",A="";p.checked&&(C="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
+(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",A+="cursor:pointer;");k.checked&&(A+="max-width:100%;");a.convertImages(b,function(b){e.value='\x3cimg src\x3d"'+a.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=A?' style\x3d"'+A+'"':"")+C+"/\x3e"})}else A="",p.checked&&(b.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
+(r.checked?"\x26layers\x3d1":"")+"');}}})(this);"),A+="cursor:pointer;"),k.checked&&(v=parseInt(b.getAttribute("width")),x=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","0 0 "+v+" "+x),A+="max-width:100%;max-height:"+x+"px;",b.removeAttribute("height")),""!=A&&b.setAttribute("style",A),e.value=mxUtils.getXml(b);e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)}}a.getCurrentFile();var d=document.createElement("div"),
b=a.editor.graph;b.getGraphBounds();mxUtils.write(d,mxResources.get("mainEmbedNotice")+": ");mxUtils.br(d);var e=document.createElement("textarea");e.style.marginTop="6px";e.style.width="550px";e.style.height="280px";e.style.resize="none";d.appendChild(e);mxUtils.br(d);var g=document.createElement("div");g.style.paddingTop="16px";g.style.textAlign="center";var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;g.appendChild(k);
mxUtils.write(g,mxResources.get("fit"));var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginLeft="30px";b.shadowVisible&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);if(!c||a.isExportToCanvas())g.appendChild(l),mxUtils.write(g,mxResources.get("shadow"));var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="30px";c||(g.appendChild(n),mxUtils.write(g,mxResources.get("image")));var m=document.createElement("input");
m.setAttribute("type","checkbox");m.style.marginLeft="30px";c&&(g.appendChild(m),mxUtils.write(g,mxResources.get("retina")));var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="30px";g.appendChild(p);mxUtils.write(g,mxResources.get("lightbox"));var r=document.createElement("input");r.setAttribute("type","checkbox");r.style.marginLeft="30px";b=a.editor.graph.getModel();1<b.getChildCount(b.getRoot())?(r.setAttribute("checked",
@@ -7155,27 +7155,27 @@ m.setAttribute("type","checkbox");m.style.marginLeft="30px";c&&(g.appendChild(m)
function(){window.open("https://support.draw.io/pages/viewpage.action?pageId\x3d12222606")}),b.className="geBtn",g.appendChild(b));if(!mxClient.IS_CHROMEAPP&&!navigator.standalone&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))b=mxUtils.button(mxResources.get("preview"),function(){var a=window.open().document;a.writeln("\x3chtml\x3e\x3chead\x3e\x3ctitle\x3e"+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e\x3cbody\x3e'+
e.value+"\x3c/body\x3e\x3c/html\x3e");a.close()}),b.className="geBtn",g.appendChild(b);var b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}),s=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});g.appendChild(b);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(s),s.className=
"geBtn gePrimaryBtn",b.className="geBtn"):b.className="geBtn gePrimaryBtn";d.appendChild(g);this.container=d},GoogleSitesDialog=function(a){function c(){var a=null!=C.getTitle()?C.getTitle():this.defaultFilename;if(x.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type\x3d4\x26diagram\x3d"+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a));0<y.length&&(b+="\x26s\x3d"+y);""!=r.value&&"0"!=r.value&&(b+="\x26border\x3d"+r.value);""!=m.value&&
-(b+="\x26height\x3d"+m.value);b+="\x26pan\x3d"+(s.checked?"1":"0");b+="\x26zoom\x3d"+(q.checked?"1":"0");b+="\x26fit\x3d"+(A.checked?"1":"0");b+="\x26resize\x3d"+(v.checked?"1":"0");b+="\x26x0\x3d"+Number(n.value);b+="\x26y0\x3d"+k;d.mathEnabled&&(b+="\x26math\x3d1");u.checked?b+="\x26edit\x3d_blank":t.checked&&(b+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed\x3d0\x26diagram\x3d",
+(b+="\x26height\x3d"+m.value);b+="\x26pan\x3d"+(s.checked?"1":"0");b+="\x26zoom\x3d"+(q.checked?"1":"0");b+="\x26fit\x3d"+(z.checked?"1":"0");b+="\x26resize\x3d"+(v.checked?"1":"0");b+="\x26x0\x3d"+Number(n.value);b+="\x26y0\x3d"+k;d.mathEnabled&&(b+="\x26math\x3d1");t.checked?b+="\x26edit\x3d_blank":u.checked&&(b+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed\x3d0\x26diagram\x3d",
""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"\x26type\x3d3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"\x26type\x3d2":b+"\x26type\x3d1"),null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(n.value),b+="\x26height\x3d"+a),l.value=b):l.value=""}var f=document.createElement("div"),d=a.editor.graph,b=d.getGraphBounds(),e=d.view.scale,g=Math.floor(b.x/e-d.view.translate.x),k=Math.floor(b.y/e-d.view.translate.y);mxUtils.write(f,
mxResources.get("googleGadget")+":");mxUtils.br(f);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";f.appendChild(l);mxUtils.br(f);this.init=function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size",
"4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=g;f.appendChild(n);mxUtils.write(f,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(b.height/e);f.appendChild(m);mxUtils.br(f);b=document.createElement("hr");b.setAttribute("size","1");b.style.marginBottom="16px";b.style.marginTop="16px";f.appendChild(b);mxUtils.write(f,mxResources.get("publicDiagramUrl")+":");mxUtils.br(f);
var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";f.appendChild(p);mxUtils.br(f);mxUtils.write(f,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.setAttribute("size","3");r.style.marginBottom="8px";r.style.marginLeft="4px";r.value="0";f.appendChild(r);mxUtils.br(f);var s=document.createElement("input");s.setAttribute("type",
-"checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="16px";f.appendChild(s);mxUtils.write(f,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";f.appendChild(q);mxUtils.write(f,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);
-f.appendChild(t);mxUtils.write(f,mxResources.get("edit")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";f.appendChild(u);mxUtils.write(f,mxResources.get("asNew")+" ");mxUtils.br(f);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";f.appendChild(v);mxUtils.write(f,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type",
-"checkbox");A.style.marginLeft="8px";f.appendChild(A);mxUtils.write(f,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";f.appendChild(x);mxUtils.write(f,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),C=a.getCurrentFile();c();p.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(C,function(a){p.setAttribute("placeholder","");p.value=null!=a?a:"";c()});mxEvent.addListener(s,"change",c);
-mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)});
-b=document.createElement("div");b.style.paddingTop="12px";b.style.textAlign="right";e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);f.appendChild(b);this.container=f},IframeDialog=function(a,c,f){function d(){null!=v&&null!=v.getTitle()&&v.getTitle();if(f&&null!=v&&(""!=q.value||v.constructor==DriveFile||v.constructor==DropboxFile||v.constructor==OneDriveFile)){t.removeAttribute("disabled");u.removeAttribute("disabled");var a=
-"https://www.draw.io/?chrome\x3d0";p.checked&&(a+="\x26lightbox\x3d1");r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+v.getHash())));e.foldingEnabled&&(a+="\x26nav\x3d1");s.checked&&(a+="\x26layers\x3d1");a=""!=q.value?a+("\x26url\x3d"+encodeURIComponent(mxUtils.htmlEntities(q.value))):a+("#"+v.getHash());l.value=a;l.removeAttribute("disabled")}else if(""!=q.value){t.removeAttribute("disabled");u.removeAttribute("disabled");var b=encodeURIComponent(mxUtils.htmlEntities(q.value));
+"checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="16px";f.appendChild(s);mxUtils.write(f,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";f.appendChild(q);mxUtils.write(f,mxResources.get("zoom")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";u.setAttribute("title",window.location.href);
+f.appendChild(u);mxUtils.write(f,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";f.appendChild(t);mxUtils.write(f,mxResources.get("asNew")+" ");mxUtils.br(f);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";f.appendChild(v);mxUtils.write(f,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type",
+"checkbox");z.style.marginLeft="8px";f.appendChild(z);mxUtils.write(f,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";f.appendChild(x);mxUtils.write(f,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),C=a.getCurrentFile();c();p.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(C,function(a){p.setAttribute("placeholder","");p.value=null!=a?a:"";c()});mxEvent.addListener(s,"change",c);
+mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)});
+b=document.createElement("div");b.style.paddingTop="12px";b.style.textAlign="right";e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);f.appendChild(b);this.container=f},IframeDialog=function(a,c,f){function d(){null!=v&&null!=v.getTitle()&&v.getTitle();if(f&&null!=v&&(""!=q.value||v.constructor==DriveFile||v.constructor==DropboxFile||v.constructor==OneDriveFile)){u.removeAttribute("disabled");t.removeAttribute("disabled");var a=
+"https://www.draw.io/?chrome\x3d0";p.checked&&(a+="\x26lightbox\x3d1");r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+v.getHash())));e.foldingEnabled&&(a+="\x26nav\x3d1");s.checked&&(a+="\x26layers\x3d1");a=""!=q.value?a+("\x26url\x3d"+encodeURIComponent(mxUtils.htmlEntities(q.value))):a+("#"+v.getHash());l.value=a;l.removeAttribute("disabled")}else if(""!=q.value){u.removeAttribute("disabled");t.removeAttribute("disabled");var b=encodeURIComponent(mxUtils.htmlEntities(q.value));
c?(a=EXPORT_URL+"?format\x3dpng\x26url\x3d"+b,l.value=a):(a="https://www.draw.io/?chrome\x3d0",p.checked&&(a+="\x26lightbox\x3d1"),r.checked&&(a+="\x26edit\x3d"+b),e.foldingEnabled&&(a+="\x26nav\x3d1"),s.checked&&(a+="\x26layers\x3d1"),l.value='\x3ciframe frameborder\x3d"0" style\x3d"width:'+n.value+";height:"+m.value+'" src\x3d"'+(a+("\x26url\x3d"+b))+'"\x3e\x3c/iframe\x3e');l.removeAttribute("disabled")}else!c&&!f&&null!=v&&(v.constructor==DriveFile||v.constructor==DropboxFile||v.constructor==OneDriveFile)?
-(t.removeAttribute("disabled"),u.removeAttribute("disabled"),a="https://www.draw.io/?chrome\x3d0",p.checked&&(a+="\x26lightbox\x3d1"),r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+v.getHash()))),e.foldingEnabled&&(a+="\x26nav\x3d1"),s.checked&&(a+="\x26layers\x3d1"),a+="#"+v.getHash(),l.value='\x3ciframe frameborder\x3d"0" style\x3d"width:'+n.value+";height:"+m.value+'" src\x3d"'+a+'"\x3e\x3c/iframe\x3e',l.removeAttribute("disabled")):(t.setAttribute("disabled",
-"disabled"),u.setAttribute("disabled","disabled"),l.value=mxResources.get("invalidPublicUrl"),l.setAttribute("disabled","disabled"))}var b=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),k=e.view.scale;mxUtils.write(b,mxResources.get(f?"link":"mainEmbedNotice")+": ");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";b.appendChild(l);mxUtils.br(b);this.init=function(){"disabled"!=
+(u.removeAttribute("disabled"),t.removeAttribute("disabled"),a="https://www.draw.io/?chrome\x3d0",p.checked&&(a+="\x26lightbox\x3d1"),r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+v.getHash()))),e.foldingEnabled&&(a+="\x26nav\x3d1"),s.checked&&(a+="\x26layers\x3d1"),a+="#"+v.getHash(),l.value='\x3ciframe frameborder\x3d"0" style\x3d"width:'+n.value+";height:"+m.value+'" src\x3d"'+a+'"\x3e\x3c/iframe\x3e',l.removeAttribute("disabled")):(u.setAttribute("disabled",
+"disabled"),t.setAttribute("disabled","disabled"),l.value=mxResources.get("invalidPublicUrl"),l.setAttribute("disabled","disabled"))}var b=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),k=e.view.scale;mxUtils.write(b,mxResources.get(f?"link":"mainEmbedNotice")+": ");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";b.appendChild(l);mxUtils.br(b);this.init=function(){"disabled"!=
l.getAttribute("disabled")&&(l.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null))};var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginBottom="8px";n.style.marginLeft="4px";n.value="100%";!c&&!f&&(mxUtils.write(b,mxResources.get("width")+":"),b.appendChild(n));var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft=
"4px";m.value=Math.ceil((g.y+g.height-e.view.translate.y)/k)+2+"px";var p=document.createElement("input");p.setAttribute("type","checkbox");var r=document.createElement("input");r.setAttribute("type","checkbox");var s=document.createElement("input");s.setAttribute("type","checkbox");c||(f||(mxUtils.write(b,mxResources.get("height")+":"),b.appendChild(m),mxUtils.br(b)),p.setAttribute("checked","checked"),p.defaultChecked=!0,b.appendChild(p),mxUtils.write(b,mxResources.get("lightbox")),s.style.marginLeft=
"16px",g=a.editor.graph.getModel(),1<g.getChildCount(g.getRoot())?(s.setAttribute("checked","checked"),s.defaultChecked=!0):s.setAttribute("disabled","disabled"),b.appendChild(s),mxUtils.write(b,mxResources.get("layers")),r.style.marginLeft="16px",r.setAttribute("checked","checked"),r.defaultChecked=!0,b.appendChild(r),mxUtils.write(b,mxResources.get("edit")),mxUtils.br(b));g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";b.appendChild(g);
-mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";b.appendChild(q);mxUtils.br(b);var t=mxUtils.button(mxResources.get("preview"),function(){if(c||f)window.open(l.value);else{var a=window.open().document;"CSS1Compat"===document.compatMode&&a.writeln("\x3c!DOCTYPE html\x3e");a.writeln("\x3chead\x3e\x3ctitle\x3e"+
-encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e');a.writeln("\x3cbody\x3e");a.writeln(l.value);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close()}});t.className="geBtn";var u=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))}),v=a.getCurrentFile();
+mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";b.appendChild(q);mxUtils.br(b);var u=mxUtils.button(mxResources.get("preview"),function(){if(c||f)window.open(l.value);else{var a=window.open().document;"CSS1Compat"===document.compatMode&&a.writeln("\x3c!DOCTYPE html\x3e");a.writeln("\x3chead\x3e\x3ctitle\x3e"+
+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e');a.writeln("\x3cbody\x3e");a.writeln(l.value);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close()}});u.className="geBtn";var t=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))}),v=a.getCurrentFile();
d();q.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(v,function(a){q.setAttribute("placeholder","");q.value=null!=a?a:"";d()});mxEvent.addListener(n,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(s,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(r,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",
-!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});(c||!mxClient.IS_QUIRKS&&!navigator.standalone&&(!window.chrome||!chrome.app||!chrome.app.runtime)&&(null==document.documentMode||9<=document.documentMode))&&g.appendChild(t);g.appendChild(k);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(u),u.className="geBtn gePrimaryBtn",k.className="geBtn"):k.className="geBtn gePrimaryBtn";
+!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});(c||!mxClient.IS_QUIRKS&&!navigator.standalone&&(!window.chrome||!chrome.app||!chrome.app.runtime)&&(null==document.documentMode||9<=document.documentMode))&&g.appendChild(u);g.appendChild(k);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(t),t.className="geBtn gePrimaryBtn",k.className="geBtn"):k.className="geBtn gePrimaryBtn";
b.appendChild(g);this.container=b},CreateGraphDialog=function(a,c,f){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);d.appendChild(b);var c=new Graph(b);c.setCellsCloneable(!0);c.setPanning(!0);c.setAllowDanglingEdges(!1);c.connectionHandler.select=
!1;c.view.setTranslate(20,20);c.border=20;c.panningHandler.useLeftButtonForPanning=!0;var g="curved\x3d1;";c.cellRenderer.installCellOverlayListeners=function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown",
"event",c,"state",a))})};c.getAllConnectionConstraints=function(){return null};c.connectionHandler.marker.highlight.keepOnTop=!1;c.connectionHandler.createEdgeState=function(a){a=c.createEdge(null,null,null,null,null,g);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var k=c.getDefaultParent(),l=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){c.connectionHandler.reset();c.clearSelection();
@@ -7204,28 +7204,28 @@ n[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,n[a]=b,x.pu
e.style.resize="none";e.style.width="100%";e.style.height="354px";e.style.marginBottom="16px";var g=document.createElement("input");g.setAttribute("type","checkbox");var k=d();e.value=k;b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),e.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=
function(a){e.value=a.target.result};b.readAsText(a)}},!1));b.appendChild(g);mxEvent.addListener(g,"change",function(){var a=d();if(0==e.value.length||e.value==k)k=a,e.value=k});var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("diagram"));l.style.marginRight="10px";b.appendChild(l);l=mxUtils.button(mxResources.get("close"),function(){e.value==k?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});l.className="geBtn";a.editor.cancelFirst&&b.appendChild(l);
var n=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();f(e.value,!g.checked)});b.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(l);this.container=b},NewDialog=function(a,c,f,d){function b(){if(d)f||a.hideDialog(),d(s,p.value);else{var b=p.value;if(null!=b&&0<b.length){var c=a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null;a.pickFolder(c,function(c){a.createFile(b,s,null!=r&&0<r.length?
-r:null,null,function(){a.hideDialog()},null,c)},c!=App.MODE_GOOGLE)}}}function e(a,b,c){null!=q&&(q.style.backgroundColor="transparent",q.style.border="1px solid transparent");s=b;r=c;q=a;q.style.backgroundColor="#e6eff8";q.style.border="1px solid #ccd9ea"}function g(a,c,d,f,k){var g=document.createElement("div");g.className="geTemplate";g.style.height=A+"px";g.style.width=x+"px";null!=f&&0<f.length&&g.setAttribute("title",f);if(null!=a&&0<a.length){a.substring(0,a.length-4);g.style.backgroundImage=
-"url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(g,"click",function(d){t.setAttribute("disabled","disabled");g.style.backgroundColor="transparent";g.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200==a.getStatus()&&(t.removeAttribute("disabled"),e(g,a.getText(),c),l&&b())}))});mxEvent.addListener(g,"dblclick",function(a){l=!0})}else g.innerHTML=
-'\x3ctable width\x3d"100%" height\x3d"100%"\x3e\x3ctr\x3e\x3ctd align\x3d"center" valign\x3d"middle"\x3e'+mxResources.get(d)+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",k&&e(g),mxEvent.addListener(g,"click",function(a){e(g)}),mxEvent.addListener(g,"dblclick",function(a){b()});u.appendChild(g)}function k(){function a(){for(var c=!0;b<z.length&&(c||0!=mxUtils.mod(b,30));)c=z[b++],g(c.url,c.libs,c.title,c.tooltip,c.select),c=!1}var b=0;mxEvent.addListener(u,"scroll",function(b){u.scrollTop+u.clientHeight>=
-u.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in y){var e=document.createElement("div"),f=mxResources.get(d),k=y[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18<f.length&&(f=f.substring(0,18)+"\x26hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";e.setAttribute("title",f+" ("+k.length+")");mxUtils.write(e,e.getAttribute("title"));v.appendChild(e);null==c&&(c=e,c.style.backgroundColor=
-"#ebf2f9");(function(d,f){mxEvent.addListener(e,"click",function(){c!=f&&(c.style.backgroundColor="",c=f,c.style.backgroundColor="#ebf2f9",u.scrollTop=0,u.innerHTML="",b=0,z=y[d],a())})})(d,e)}a()}f=null!=f?f:!0;var l=document.createElement("div");l.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="46px";l.appendChild(n);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.width="40px";m.style.height=
+r:null,null,function(){a.hideDialog()},null,c)},c!=App.MODE_GOOGLE)}}}function e(a,b,c){null!=q&&(q.style.backgroundColor="transparent",q.style.border="1px solid transparent");s=b;r=c;q=a;q.style.backgroundColor="#e6eff8";q.style.border="1px solid #ccd9ea"}function g(a,c,d,f,k){var g=document.createElement("div");g.className="geTemplate";g.style.height=z+"px";g.style.width=x+"px";null!=f&&0<f.length&&g.setAttribute("title",f);if(null!=a&&0<a.length){a.substring(0,a.length-4);g.style.backgroundImage=
+"url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(g,"click",function(d){u.setAttribute("disabled","disabled");g.style.backgroundColor="transparent";g.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200==a.getStatus()&&(u.removeAttribute("disabled"),e(g,a.getText(),c),l&&b())}))});mxEvent.addListener(g,"dblclick",function(a){l=!0})}else g.innerHTML=
+'\x3ctable width\x3d"100%" height\x3d"100%"\x3e\x3ctr\x3e\x3ctd align\x3d"center" valign\x3d"middle"\x3e'+mxResources.get(d)+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",k&&e(g),mxEvent.addListener(g,"click",function(a){e(g)}),mxEvent.addListener(g,"dblclick",function(a){b()});t.appendChild(g)}function k(){function a(){for(var c=!0;b<A.length&&(c||0!=mxUtils.mod(b,30));)c=A[b++],g(c.url,c.libs,c.title,c.tooltip,c.select),c=!1}var b=0;mxEvent.addListener(t,"scroll",function(b){t.scrollTop+t.clientHeight>=
+t.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in y){var e=document.createElement("div"),f=mxResources.get(d),k=y[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18<f.length&&(f=f.substring(0,18)+"\x26hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";e.setAttribute("title",f+" ("+k.length+")");mxUtils.write(e,e.getAttribute("title"));v.appendChild(e);null==c&&(c=e,c.style.backgroundColor=
+"#ebf2f9");(function(d,f){mxEvent.addListener(e,"click",function(){c!=f&&(c.style.backgroundColor="",c=f,c.style.backgroundColor="#ebf2f9",t.scrollTop=0,t.innerHTML="",b=0,A=y[d],a())})})(d,e)}a()}f=null!=f?f:!0;var l=document.createElement("div");l.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="46px";l.appendChild(n);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.width="40px";m.style.height=
"40px";m.style.marginRight="10px";m.style.paddingBottom="4px";m.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&f&&n.appendChild(m);f&&mxUtils.write(n,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+
":");m=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?m=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?m=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive&&(m=a.oneDrive.extension);var p=document.createElement("input");p.setAttribute("value",a.defaultFilename+m);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width=c?"220px":"450px";this.init=function(){f&&(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",
-!1,null))};f&&n.appendChild(p);var r=null,s=null,q=null,t=mxUtils.button(mxResources.get("create"),function(){b()});t.className="geBtn gePrimaryBtn";var u=document.createElement("div");u.style.border="1px solid #d3d3d3";u.style.position="absolute";u.style.left="160px";u.style.right="34px";u.style.top=f?"72px":"40px";u.style.bottom="76px";u.style.margin="6px 0 0 -1px";u.style.padding="6px";u.style.overflow="auto";var v=document.createElement("div");v.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
-f||(v.style.top="40px");var A=140,x=140,y={},C=1;y.basic=[{title:"blankDiagram",select:!0}];var z=y.basic;if(!c){l.appendChild(v);l.appendChild(u);var B=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!B){B=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=y[b];null==c&&(C++,c=[],y[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
-tooltip:a.getAttribute("url")})}}a=a.nextSibling}k()}})}mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&b()});n=document.createElement("div");n.style.marginTop=c?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="30px";n.style.right="40px";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});m.className="geBtn";a.editor.cancelFirst&&n.appendChild(m);if(!c&&!a.isOffline()&&f&&null==d){var F=mxUtils.button(mxResources.get("help"),
-function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});F.className="geBtn";n.appendChild(F)}!c&&"1"!=urlParams.embed&&(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode\x3d"+a.mode+"\x26title\x3d"+encodeURIComponent(p.value)+"\x26create\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.className="geBtn",n.appendChild(c));n.appendChild(t);!a.editor.cancelFirst&&null==d&&n.appendChild(m);l.appendChild(n);this.container=l},CreateDialog=function(a,c,f,d,b,e,g,k,l,n,m){function p(b,c,d,e){function f(){mxEvent.addListener(k,"click",function(){r(d);s(d)})}var k=document.createElement("a");k.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");
+!1,null))};f&&n.appendChild(p);var r=null,s=null,q=null,u=mxUtils.button(mxResources.get("create"),function(){b()});u.className="geBtn gePrimaryBtn";var t=document.createElement("div");t.style.border="1px solid #d3d3d3";t.style.position="absolute";t.style.left="160px";t.style.right="34px";t.style.top=f?"72px":"40px";t.style.bottom="76px";t.style.margin="6px 0 0 -1px";t.style.padding="6px";t.style.overflow="auto";var v=document.createElement("div");v.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
+f||(v.style.top="40px");var z=140,x=140,y={},C=1;y.basic=[{title:"blankDiagram",select:!0}];var A=y.basic;if(!c){l.appendChild(v);l.appendChild(t);var B=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!B){B=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=y[b];null==c&&(C++,c=[],y[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
+tooltip:a.getAttribute("url")})}}a=a.nextSibling}k()}})}mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&b()});n=document.createElement("div");n.style.marginTop=c?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="30px";n.style.right="40px";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});m.className="geBtn";a.editor.cancelFirst&&n.appendChild(m);if(!c&&!a.isOffline()&&f&&null==d){var E=mxUtils.button(mxResources.get("help"),
+function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});E.className="geBtn";n.appendChild(E)}!c&&"1"!=urlParams.embed&&(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode\x3d"+a.mode+"\x26title\x3d"+encodeURIComponent(p.value)+"\x26create\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.className="geBtn",n.appendChild(c));n.appendChild(u);!a.editor.cancelFirst&&null==d&&n.appendChild(m);l.appendChild(n);this.container=l},CreateDialog=function(a,c,f,d,b,e,g,k,l,n,m){function p(b,c,d,e){function f(){mxEvent.addListener(k,"click",function(){r(d);s(d)})}var k=document.createElement("a");k.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");
g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";k.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";k.className="geBaseButton";k.style.position="relative";k.style.margin="4px";k.style.padding="8px 8px 10px 8px";k.style.whiteSpace="nowrap";k.appendChild(g);mxClient.IS_QUIRKS&&(k.style.cssFloat="left",k.style.zoom="1");k.style.color="gray";k.style.fontSize="11px";var l=document.createElement("div");k.appendChild(l);mxUtils.write(l,c);if(null!=e&&null==a[e]){g.style.visibility=
-"hidden";mxUtils.setOpacity(l,10);var n=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});n.spin(k);var m=window.setTimeout(function(){null==a[e]&&(n.stop(),k.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[e]&&(window.clearTimeout(m),mxUtils.setOpacity(l,100),g.style.visibility="",n.stop(),f())}))}else f();A.appendChild(k)}function r(b){if(g){var d=v.value,e=d.lastIndexOf(".");
-if(0>c.lastIndexOf(".")&&(!t||0>e)){b=null!=b?b:x.value;var f="";b==App.MODE_GOOGLE?f=a.drive.extension:b==App.MODE_DROPBOX?f=a.dropbox.extension:b==App.MODE_ONEDRIVE?f=a.oneDrive.extension:b==App.MODE_DEVICE&&(f=".xml");0<=e&&(d=d.substring(0,e));v.value=d+f}}}function s(b){var c=v.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),f(c,b)}g=null!=g?g:!0;k=null!=k?k:!0;var q=document.createElement("div"),t=!0;null==d&&a.addLanguageMenu(q);var u=document.createElement("h2");mxUtils.write(u,b||mxResources.get("create"));
-u.style.marginTop="0px";u.style.marginBottom="24px";q.appendChild(u);mxUtils.write(q,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",c);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};q.appendChild(v);mxUtils.br(q);var A=document.createElement("div");A.style.textAlign="center";t?(A.style.marginTop=
-"6px",q.appendChild(A)):mxUtils.write(q,mxResources.get("chooseAnOption")+":");var x=document.createElement("select");x.style.marginLeft="10px";"function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),x.appendChild(b),p(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive"));"function"===typeof window.DropboxClient&&(b=document.createElement("option"),b.setAttribute("value",
+"hidden";mxUtils.setOpacity(l,10);var n=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});n.spin(k);var m=window.setTimeout(function(){null==a[e]&&(n.stop(),k.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[e]&&(window.clearTimeout(m),mxUtils.setOpacity(l,100),g.style.visibility="",n.stop(),f())}))}else f();z.appendChild(k)}function r(b){if(g){var d=v.value,e=d.lastIndexOf(".");
+if(0>c.lastIndexOf(".")&&(!u||0>e)){b=null!=b?b:x.value;var f="";b==App.MODE_GOOGLE?f=a.drive.extension:b==App.MODE_DROPBOX?f=a.dropbox.extension:b==App.MODE_ONEDRIVE?f=a.oneDrive.extension:b==App.MODE_DEVICE&&(f=".xml");0<=e&&(d=d.substring(0,e));v.value=d+f}}}function s(b){var c=v.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),f(c,b)}g=null!=g?g:!0;k=null!=k?k:!0;var q=document.createElement("div"),u=!0;null==d&&a.addLanguageMenu(q);var t=document.createElement("h2");mxUtils.write(t,b||mxResources.get("create"));
+t.style.marginTop="0px";t.style.marginBottom="24px";q.appendChild(t);mxUtils.write(q,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",c);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};q.appendChild(v);mxUtils.br(q);var z=document.createElement("div");z.style.textAlign="center";u?(z.style.marginTop=
+"6px",q.appendChild(z)):mxUtils.write(q,mxResources.get("chooseAnOption")+":");var x=document.createElement("select");x.style.marginLeft="10px";"function"===typeof window.DriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(b,mxResources.get("googleDrive")),x.appendChild(b),p(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive"));"function"===typeof window.DropboxClient&&(b=document.createElement("option"),b.setAttribute("value",
App.MODE_DROPBOX),mxUtils.write(b,mxResources.get("dropbox")),x.appendChild(b),a.mode==App.MODE_DROPBOX&&b.setAttribute("selected","selected"),p(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"));"function"===typeof window.OneDriveClient&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(b,mxResources.get("oneDrive")),x.appendChild(b),a.mode==App.MODE_ONEDRIVE&&b.setAttribute("selected","selected"),p(IMAGE_PATH+"/onedrive-logo.svg",
-mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive"));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),x.appendChild(b),(a.mode==App.MODE_DEVICE||!k)&&b.setAttribute("selected","selected"),m&&(mxUtils.br(A),p(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));k&&(isLocalStorage&&"0"!=urlParams.browser)&&
-(k=document.createElement("option"),k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),x.appendChild(k),a.mode==App.MODE_BROWSER&&k.setAttribute("selected","selected"),p(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));k=document.createElement("div");k.style.marginTop=t?"26px":"38px";k.style.textAlign=t?"center":"right";t||(q.appendChild(x),mxEvent.addListener(x,"change",r),r());null!=n&&(b=mxUtils.button(mxResources.get("help"),function(){window.open(n)}),
-b.className="geBtn",k.appendChild(b));b=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});b.className="geBtn";a.editor.cancelFirst&&k.appendChild(b);null==d&&(u=mxUtils.button(mxResources.get("decideLater"),function(){s(null)}),u.className="geBtn",k.appendChild(u));l&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){s("_blank")}),l.className="geBtn",k.appendChild(l));if(!mxClient.IS_IOS||
-!t)e=mxUtils.button(e||mxResources.get("create"),function(){s(m?"download":t?App.MODE_DEVICE:x.value)}),e.className="geBtn gePrimaryBtn",k.appendChild(e);a.editor.cancelFirst||k.appendChild(b);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?s(t?App.MODE_DEVICE:x.value):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});q.appendChild(k);this.container=q},PopupDialog=function(a,c,f,d,b){b=null!=b?b:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,
+mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive"));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)b=document.createElement("option"),b.setAttribute("value",App.MODE_DEVICE),mxUtils.write(b,mxResources.get("device")),x.appendChild(b),(a.mode==App.MODE_DEVICE||!k)&&b.setAttribute("selected","selected"),m&&(mxUtils.br(z),p(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));k&&(isLocalStorage&&"0"!=urlParams.browser)&&
+(k=document.createElement("option"),k.setAttribute("value",App.MODE_BROWSER),mxUtils.write(k,mxResources.get("browser")),x.appendChild(k),a.mode==App.MODE_BROWSER&&k.setAttribute("selected","selected"),p(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));k=document.createElement("div");k.style.marginTop=u?"26px":"38px";k.style.textAlign=u?"center":"right";u||(q.appendChild(x),mxEvent.addListener(x,"change",r),r());null!=n&&(b=mxUtils.button(mxResources.get("help"),function(){window.open(n)}),
+b.className="geBtn",k.appendChild(b));b=mxUtils.button(mxResources.get("cancel"),function(){null!=d?d():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});b.className="geBtn";a.editor.cancelFirst&&k.appendChild(b);null==d&&(t=mxUtils.button(mxResources.get("decideLater"),function(){s(null)}),t.className="geBtn",k.appendChild(t));l&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){s("_blank")}),l.className="geBtn",k.appendChild(l));if(!mxClient.IS_IOS||
+!u)e=mxUtils.button(e||mxResources.get("create"),function(){s(m?"download":u?App.MODE_DEVICE:x.value)}),e.className="geBtn gePrimaryBtn",k.appendChild(e);a.editor.cancelFirst||k.appendChild(b);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?s(u?App.MODE_DEVICE:x.value):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});q.appendChild(k);this.container=q},PopupDialog=function(a,c,f,d,b){b=null!=b?b:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,
mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var g=mxUtils.button(mxResources.get("openInThisWindow"),function(){b&&a.hideDialog();null!=d&&d()});g.className="geBtn";g.style.marginBottom="8px";g.style.width="280px";e.appendChild(g);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInNewWindow"),function(){b&&a.hideDialog();null!=f&&f();window.open(c)});k.className="geBtn gePrimaryBtn";k.style.width=g.style.width;e.appendChild(k);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,
mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,f,d,b,e){e=null!=e?e:!0;var g=a.editor.graph,k=document.createElement("div");mxUtils.write(k,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var l=document.createElement("input");l.setAttribute("value",f);l.setAttribute("type",
"text");l.style.marginTop="6px";l.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display=mxClient.IS_VML?
@@ -7239,20 +7239,20 @@ 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&&m(l.value)});r=mxUtils.button(mxResources.get("apply"),function(){m(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(){r.value=Math.max(1,Math.min(g,Math.max(parseInt(r.value),parseInt(p.value))));p.value=Math.max(1,Math.min(g,Math.min(parseInt(r.value),parseInt(p.value))))}function f(b){function c(a,b,d){var f=a.getGraphBounds(),k=0,g=0,l=I.get(),n=1/a.pageScale,m=u.checked;if(m)var n=parseInt(E.value),p=parseInt(H.value),n=Math.min(l.height*p/(f.height/a.view.scale),l.width*n/(f.width/a.view.scale));else n=parseInt(t.value)/(100*a.pageScale),isNaN(n)&&(e=1/a.pageScale,
-t.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*e);l.height=Math.ceil(l.height*e);n*=e;!m&&a.pageVisible?(f=a.getPageLayout(),k-=f.x*l.width,g-=f.y*l.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,n,l,0,k,g,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var q=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=q.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,null,
+PrintDialog.prototype.create=function(a){function c(){r.value=Math.max(1,Math.min(g,Math.max(parseInt(r.value),parseInt(p.value))));p.value=Math.max(1,Math.min(g,Math.min(parseInt(r.value),parseInt(p.value))))}function f(b){function c(a,b,d){var f=a.getGraphBounds(),k=0,g=0,l=J.get(),n=1/a.pageScale,m=t.checked;if(m)var n=parseInt(F.value),p=parseInt(H.value),n=Math.min(l.height*p/(f.height/a.view.scale),l.width*n/(f.width/a.view.scale));else n=parseInt(u.value)/(100*a.pageScale),isNaN(n)&&(e=1/a.pageScale,
+u.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*e);l.height=Math.ceil(l.height*e);n*=e;!m&&a.pageVisible?(f=a.getPageLayout(),k-=f.x*l.width,g-=f.y*l.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,n,l,0,k,g,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var q=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=q.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,null,
d,!0)}else{l=a.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";b.backgroundColor=l;b.autoOrigin=m;b.appendGraph(a,n,k,g,d,!0)}return b}var e=parseInt(L.value)/100;isNaN(e)&&(e=1,L.value="100 %");var e=0.75*e,f=p.value,g=r.value,l=!n.checked,m=null;l&&(l=f==k&&g==k);if(!l&&null!=a.pages&&a.pages.length){var q=0,l=a.pages.length-1;n.checked||(q=parseInt(f)-1,l=parseInt(g)-1);for(var v=q;v<=l;v++){var s=a.pages[v],f=s==a.currentPage?d:null;if(null==f){var f=a.createTemporaryGraph(d.getStylesheet()),
-g=!0,q=!1,A=null,x=null;null==s.viewState&&null==s.mapping&&null==s.root&&a.updatePageRoot(s);null!=s.viewState?(g=s.viewState.pageVisible,q=s.viewState.mathEnabled,A=s.viewState.background,x=s.viewState.backgroundImage):null!=s.mapping&&null!=s.mapping.diagramMap&&(q="0"!=s.mapping.diagramMap.get("mathEnabled"),A=s.mapping.diagramMap.get("background"),x=s.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);f.background=A;f.backgroundImage=null!=x?new mxImage(x.src,
+g=!0,q=!1,z=null,x=null;null==s.viewState&&null==s.mapping&&null==s.root&&a.updatePageRoot(s);null!=s.viewState?(g=s.viewState.pageVisible,q=s.viewState.mathEnabled,z=s.viewState.background,x=s.viewState.backgroundImage):null!=s.mapping&&null!=s.mapping.diagramMap&&(q="0"!=s.mapping.diagramMap.get("mathEnabled"),z=s.mapping.diagramMap.get("background"),x=s.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);f.background=z;f.backgroundImage=null!=x?new mxImage(x.src,
x.width,x.height):null;f.pageVisible=g;f.mathEnabled=q;var y=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?s.getName():"pagenumber"==a?v+1:y.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(s);f.model.setRoot(s.root)}m=c(f,m,v!=l);f!=d&&f.container.parentNode.removeChild(f.container)}}else m=c(d);m.mathEnabled&&(l=m.wnd.document,l.writeln('\x3cscript type\x3d"text/x-mathjax-config"\x3e'),l.writeln("MathJax.Hub.Config({"),l.writeln('messageStyle: "none",'),
l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln("TeX: {"),l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),b&&(l.writeln("MathJax.Hub.Queue(function () {"),
l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script\x3e"),l.writeln('\x3cscript type\x3d"text/javascript" src\x3d"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js"\x3e\x3c/script\x3e'));m.closeDocument();!m.mathEnabled&&b&&PrintDialog.printPreview(m)}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=1,l=document.createElement("div");l.style.cssText=
"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");l.appendChild(n);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));l.appendChild(e);mxUtils.br(l);var m=n.cloneNode(!0);n.setAttribute("checked","checked");m.setAttribute("value","range");l.appendChild(m);
e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");l.appendChild(e);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.style.width="50px";l.appendChild(p);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));l.appendChild(e);var r=p.cloneNode(!0);l.appendChild(r);mxEvent.addListener(p,"focus",function(){m.checked=!0});mxEvent.addListener(r,
"focus",function(){m.checked=!0});mxEvent.addListener(p,"change",c);mxEvent.addListener(r,"change",c);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){k=e+1;p.value=k;r.value=k;break}p.setAttribute("max",g);r.setAttribute("max",g);1<g&&b.appendChild(l);var s=document.createElement("div");s.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type",
-"radio");q.setAttribute("name","printZoom");s.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));s.appendChild(e);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","100 %");t.style.width="50px";s.appendChild(t);mxEvent.addListener(t,"focus",function(){q.checked=!0});b.appendChild(s);var l=l.cloneNode(!1),u=q.cloneNode(!0);u.setAttribute("value","fit");q.setAttribute("checked","checked");e=document.createElement("div");
-e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(u);l.appendChild(e);s=document.createElement("table");s.style.display="inline-block";var v=document.createElement("tbody"),A=document.createElement("tr"),x=A.cloneNode(!0),y=document.createElement("td"),C=y.cloneNode(!0),z=y.cloneNode(!0),B=y.cloneNode(!0),F=y.cloneNode(!0),G=y.cloneNode(!0);y.style.textAlign="right";B.style.textAlign="right";mxUtils.write(y,mxResources.get("fitTo"));var E=document.createElement("input");
-E.style.cssText="margin:0 8px 0 8px;";E.setAttribute("value","1");E.setAttribute("min","1");E.setAttribute("type","number");E.style.width="40px";C.appendChild(E);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));z.appendChild(e);mxUtils.write(B,mxResources.get("fitToBy"));var H=E.cloneNode(!0);F.appendChild(H);mxEvent.addListener(E,"focus",function(){u.checked=!0});mxEvent.addListener(H,"focus",function(){u.checked=!0});e=document.createElement("span");mxUtils.write(e,
-mxResources.get("fitToSheetsDown"));G.appendChild(e);A.appendChild(y);A.appendChild(C);A.appendChild(z);x.appendChild(B);x.appendChild(F);x.appendChild(G);v.appendChild(A);v.appendChild(x);s.appendChild(v);l.appendChild(s);b.appendChild(l);l=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));l.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var I=PageSetupDialog.addPageFormatPanel(e,
+"radio");q.setAttribute("name","printZoom");s.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));s.appendChild(e);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";s.appendChild(u);mxEvent.addListener(u,"focus",function(){q.checked=!0});b.appendChild(s);var l=l.cloneNode(!1),t=q.cloneNode(!0);t.setAttribute("value","fit");q.setAttribute("checked","checked");e=document.createElement("div");
+e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(t);l.appendChild(e);s=document.createElement("table");s.style.display="inline-block";var v=document.createElement("tbody"),z=document.createElement("tr"),x=z.cloneNode(!0),y=document.createElement("td"),C=y.cloneNode(!0),A=y.cloneNode(!0),B=y.cloneNode(!0),E=y.cloneNode(!0),G=y.cloneNode(!0);y.style.textAlign="right";B.style.textAlign="right";mxUtils.write(y,mxResources.get("fitTo"));var F=document.createElement("input");
+F.style.cssText="margin:0 8px 0 8px;";F.setAttribute("value","1");F.setAttribute("min","1");F.setAttribute("type","number");F.style.width="40px";C.appendChild(F);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));A.appendChild(e);mxUtils.write(B,mxResources.get("fitToBy"));var H=F.cloneNode(!0);E.appendChild(H);mxEvent.addListener(F,"focus",function(){t.checked=!0});mxEvent.addListener(H,"focus",function(){t.checked=!0});e=document.createElement("span");mxUtils.write(e,
+mxResources.get("fitToSheetsDown"));G.appendChild(e);z.appendChild(y);z.appendChild(C);z.appendChild(A);x.appendChild(B);x.appendChild(E);x.appendChild(G);v.appendChild(z);v.appendChild(x);s.appendChild(v);l.appendChild(s);b.appendChild(l);l=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));l.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var J=PageSetupDialog.addPageFormatPanel(e,
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);l.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));l.appendChild(e);var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","100 %");L.style.width="60px";l.appendChild(L);b.appendChild(l);e=document.createElement("div");e.style.cssText="text-align:right;margin:42px 0 0 0;";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
l.className="geBtn";a.editor.cancelFirst&&e.appendChild(l);mxClient.IS_CHROMEAPP||(s=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),s.className="geBtn",e.appendChild(s));s=mxUtils.button(mxResources.get(mxClient.IS_CHROMEAPP?"ok":"print"),function(){a.hideDialog();f(!0)});s.className="geBtn gePrimaryBtn";e.appendChild(s);a.editor.cancelFirst||e.appendChild(l);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"));
@@ -7274,41 +7274,41 @@ mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?b.
c.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst?(f.appendChild(k),f.appendChild(b)):(f.appendChild(b),f.appendChild(k));c.appendChild(f);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,c){var f=document.createElement("div"),d=document.createElement("h3");d.style.marginTop="0px";mxUtils.write(d,mxResources.get("revisionHistory"));f.appendChild(d);var b=document.createElement("div");b.style.position="absolute";b.style.overflow="auto";b.style.width="170px";b.style.height="378px";f.appendChild(b);var e=document.createElement("div");e.style.position="absolute";e.style.border="1px solid lightGray";e.style.left="199px";e.style.width="470px";e.style.height=
"376px";e.style.overflow="hidden";mxEvent.disableContextMenu(e);f.appendChild(e);var g=new Graph(e);g.setEnabled(!1);g.setPanning(!0);g.panningHandler.ignoreCell=!0;g.panningHandler.useLeftButtonForPanning=!0;g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;var k=0,l=null,n=0,m=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a&&null!=l&&null!=l[n]?l[n].getAttribute("name"):"pagenumber"==a?n+1:m.apply(this,arguments)};g.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(g.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),r=a.getCurrentFile(),s=null,q=null,t=null,u=null,v=mxUtils.button("",function(){null!=t&&g.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",mxResources.get("zoomIn"));
-v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var A=mxUtils.button("",function(){null!=t&&g.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var x=mxUtils.button("",function(){null!=t&&(g.maxFitScale=8,g.fit(8),g.center())});x.className=
-"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var y=mxUtils.button("",function(){null!=t&&(g.zoomActual(),g.center())});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var C=
-document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.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!=u&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&r.save(!0,
-function(b){a.spinner.stop();a.replaceFileData(u);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 F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var G=null;mxEvent.addListener(F,
-"change",function(a){null!=G&&(G(a),mxEvent.consume(a))});var E=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()))});E.className="geBtn";E.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"));
+g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(g.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),r=a.getCurrentFile(),s=null,q=null,u=null,t=null,v=mxUtils.button("",function(){null!=u&&g.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",mxResources.get("zoomIn"));
+v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var z=mxUtils.button("",function(){null!=u&&g.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var x=mxUtils.button("",function(){null!=u&&(g.maxFitScale=8,g.fit(8),g.center())});x.className=
+"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var y=mxUtils.button("",function(){null!=u&&(g.zoomActual(),g.center())});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var C=
+document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var A=mxUtils.button(mxResources.get("download"),function(){if(null!=u){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(u.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"))}});A.className="geBtn";A.setAttribute("disabled","disabled");var B=mxUtils.button(mxResources.get("restore"),function(){null!=u&&null!=t&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&r.save(!0,
+function(b){a.spinner.stop();a.replaceFileData(t);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 E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var G=null;mxEvent.addListener(E,
+"change",function(a){null!=G&&(G(a),mxEvent.consume(a))});var F=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=u&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(u.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 J=document.createElement("div");J.className="geToolbarContainer";J.style.backgroundColor="transparent";J.style.padding="2px";J.style.border="none";J.style.left="199px";J.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",J.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));
else if(null!=c&&0<c.length){e.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var U=document.createElement("tbody"),Y=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var O=c.length-1;0<=O;O--){var D=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()===Y?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 I=function(b){p.stop();var c=mxUtils.parseXml(b),m=a.editor.extractGraphModel(c.documentElement,!0);if(null!=m){F.style.display="none";F.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){F.removeAttribute("disabled");F.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"),F.appendChild(c)}G=function(){n=k=parseInt(F.value);s(l[k])}}else q(m);
-C.innerHTML="";mxUtils.write(C,d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));v.removeAttribute("disabled");A.removeAttribute("disabled");x.removeAttribute("disabled");y.removeAttribute("disabled");if(null==r||!r.isRestricted())a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),z.removeAttribute("disabled"),H.removeAttribute("disabled"),E.removeAttribute("disabled");mxUtils.setOpacity(v,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(x,60);
-mxUtils.setOpacity(y,60)}else F.style.display="none",F.innerHTML="",C.innerHTML="",mxUtils.write(C,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,C.removeAttribute("title"),C.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),B.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),v.setAttribute("disabled",
-"disabled"),A.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(y,20),p.spin(e),b.getXml(function(a){q==b&&I(a)},function(a){p.stop();F.style.display="none";F.innerHTML="";C.innerHTML="";mxUtils.write(C,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);U.appendChild(f)}return f}(c[O]);null!=D&&O==c.length-1&&(L=D)}Q.appendChild(U);b.appendChild(Q)}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(F);I.appendChild(v);I.appendChild(A);I.appendChild(y);I.appendChild(x);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(z),d.appendChild(E),d.appendChild(B),d.appendChild(H)):(d.appendChild(z),d.appendChild(E),d.appendChild(B),d.appendChild(H),d.appendChild(b));f.appendChild(d);f.appendChild(I);f.appendChild(C);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";mxUtils.write(l,
+" "+b.lastModifyingUserName:""));var J=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="";u=c;t=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);
+C.innerHTML="";mxUtils.write(C,d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));v.removeAttribute("disabled");z.removeAttribute("disabled");x.removeAttribute("disabled");y.removeAttribute("disabled");if(null==r||!r.isRestricted())a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),A.removeAttribute("disabled"),H.removeAttribute("disabled"),F.removeAttribute("disabled");mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(x,60);
+mxUtils.setOpacity(y,60)}else E.style.display="none",E.innerHTML="",C.innerHTML="",mxUtils.write(C,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",t=u=null,C.removeAttribute("title"),C.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"),y.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(y,20),p.spin(e),b.getXml(function(a){q==b&&J(a)},function(a){p.stop();E.style.display="none";E.innerHTML="";C.innerHTML="";mxUtils.write(C,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);U.appendChild(f)}return f}(c[O]);null!=D&&O==c.length-1&&(L=D)}Q.appendChild(U);b.appendChild(Q)}else e.style.display="none",J.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";J.appendChild(E);J.appendChild(v);J.appendChild(z);J.appendChild(y);J.appendChild(x);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(A),d.appendChild(F),d.appendChild(B),d.appendChild(H)):(d.appendChild(A),d.appendChild(F),d.appendChild(B),d.appendChild(H),d.appendChild(b));f.appendChild(d);f.appendChild(J);f.appendChild(C);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";mxUtils.write(l,
c);k.appendChild(l);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.width="640px";n.style.height="386px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);k.appendChild(n);var m=new Graph(n);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;c=mxUtils.parseXml(f);var p=a.editor.extractGraphModel(c.documentElement,
!0),r=0,s=null,q=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=s&&null!=s[r]?s[r].getAttribute("name"):"pagenumber"==a?r+1:q.apply(this,arguments)};m.getLinkForCell=function(){return null};c=mxUtils.button("",function(){m.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);f=mxUtils.button("",function(){m.zoomOut()});f.className="geSprite geSprite-zoomout";
-f.setAttribute("title",mxResources.get("zoomOut"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){m.maxFitScale=8;m.fit(8);m.center()});l.className="geSprite geSprite-fit";l.setAttribute("title",mxResources.get("fit"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);var t=mxUtils.button("",function(){m.zoomActual();m.center()});t.className="geSprite geSprite-actualsize";t.setAttribute("title",
-mxResources.get("actualSize"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);b=mxUtils.button(g||mxResources.get("discard"),b);b.className="geBtn";var u=document.createElement("select");u.style.maxWidth="80px";u.style.position="relative";u.style.top="-2px";u.style.verticalAlign="bottom";u.style.marginRight="6px";u.style.display="none";d=mxUtils.button(e||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position=
+f.setAttribute("title",mxResources.get("zoomOut"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){m.maxFitScale=8;m.fit(8);m.center()});l.className="geSprite geSprite-fit";l.setAttribute("title",mxResources.get("fit"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);var u=mxUtils.button("",function(){m.zoomActual();m.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",
+mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);b=mxUtils.button(g||mxResources.get("discard"),b);b.className="geBtn";var t=document.createElement("select");t.style.maxWidth="80px";t.style.position="relative";t.style.top="-2px";t.style.verticalAlign="bottom";t.style.marginRight="6px";t.style.display="none";d=mxUtils.button(e||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position=
"absolute";e.style.top="470px";e.style.width="640px";e.style.textAlign="right";g=document.createElement("div");g.className="geToolbarContainer";g.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;top:470px;";this.init=function(){function b(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";n.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);
-m.center()}}function c(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));return d}mxEvent.addListener(u,"change",function(a){r=parseInt(u.value);c(s[r]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var d=p.getElementsByTagName("diagram");s=[];for(var e=0;e<d.length;e++)s.push(d[e]);0<s.length&&c(s[r]);if(1<s.length){u.style.display="";for(e=0;e<s.length;e++)d=document.createElement("option"),mxUtils.write(d,s[e].getAttribute("name")||mxResources.get("pageWithNumber",
-[e+1])),d.setAttribute("value",e),e==r&&d.setAttribute("selected","selected"),u.appendChild(d)}}else b(p)};g.appendChild(u);g.appendChild(c);g.appendChild(f);g.appendChild(t);g.appendChild(l);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";a.editor.cancelFirst?(e.appendChild(c),e.appendChild(b),e.appendChild(d)):(e.appendChild(d),e.appendChild(b),e.appendChild(c));k.appendChild(e);k.appendChild(g);this.container=k},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=
+m.center()}}function c(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));return d}mxEvent.addListener(t,"change",function(a){r=parseInt(t.value);c(s[r]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var d=p.getElementsByTagName("diagram");s=[];for(var e=0;e<d.length;e++)s.push(d[e]);0<s.length&&c(s[r]);if(1<s.length){t.style.display="";for(e=0;e<s.length;e++)d=document.createElement("option"),mxUtils.write(d,s[e].getAttribute("name")||mxResources.get("pageWithNumber",
+[e+1])),d.setAttribute("value",e),e==r&&d.setAttribute("selected","selected"),t.appendChild(d)}}else b(p)};g.appendChild(t);g.appendChild(c);g.appendChild(f);g.appendChild(u);g.appendChild(l);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";a.editor.cancelFirst?(e.appendChild(c),e.appendChild(b),e.appendChild(d)):(e.appendChild(d),e.appendChild(b),e.appendChild(c));k.appendChild(e);k.appendChild(g);this.container=k},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,k){if(null!=a.shape){for(var g=[b[0]],l=d*f/k,n=1;n<e;n++)if(l<=c[n-1]){g.push(new mxPoint(b[n-
1].x+(b[n].x-b[n-1].x)*l/c[n-1],b[n-1].y+(b[n].y-b[n-1].y)*l/c[n-1]));break}else l-=c[n-1],g.push(b[n]);a.shape.points=g;a.shape.redraw()}},stop:function(){null!=a.shape&&(a.shape.points=b,a.shape.redraw())}}}function n(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 m(a,b,c){function d(){if(g==b){window.clearInterval(m);for(var a=0;a<e.length;a++)e[a].stop()}else{for(a=0;a<e.length;a++)e[a].execute(g,b);g++}}b=null!=b?b:30;c=null!=c?c:30;for(var e=[],f=0;f<a.length;f++){var k=B.view.getState(a[f]);null!=k&&null!=k.shape&&
-B.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&(B.model.isVertex(k.cell)&&null!=k.shape&&null!=k.shape.bounds)&&e.push(n(k))}var g=0,m=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=F=!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=y.value.split("\n"),l=0,n=function(){if(F&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;n()},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])):m([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;n()}}else G=!1};n()}}var s=document.createElement("table");s.style.width="100%";s.style.height="100%";var q=document.createElement("tbody"),t=document.createElement("tr"),u=document.createElement("td");u.style.width="140px";var v=document.createElement("td"),A=document.createElement("tr");
-A.style.height="40px";var x=document.createElement("td");x.setAttribute("colspan","2");var y=document.createElement("textarea");y.style.overflow="auto";y.style.width="100%";y.style.height="100%";u.appendChild(y);var C=a.editor.graph.getModel().getRoot();null!=C.value&&"object"==typeof C.value&&(y.value=C.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);v.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 F=!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++)y.value=y.value+"show "+b[c].id+" fade\n";y.value+="wait 1000\n"}});x.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++)y.value=y.value+"show "+b[c].id+"\n";y.value+="wait 1000\n"}});x.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++)y.value=y.value+"hide "+b[c].id+"\n";y.value+="wait 1000\n"}});x.appendChild(z);z=mxUtils.button("Wait",function(){y.value+="wait 1000\n"});x.appendChild(z);z=mxUtils.button("Preview",function(){r()});x.appendChild(z);
-z=mxUtils.button("Stop",function(){F=!1;B.getModel().clear()});x.appendChild(z);z=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(C,"animation",y.value)});x.appendChild(z);C=a.editor.graph.getModel().getRoot();t.appendChild(u);t.appendChild(v);q.appendChild(t);A.appendChild(x);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);
+B.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&(B.model.isVertex(k.cell)&&null!=k.shape&&null!=k.shape.bounds)&&e.push(n(k))}var g=0,m=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=E=!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=y.value.split("\n"),l=0,n=function(){if(E&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;n()},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])):m([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;n()}}else G=!1};n()}}var s=document.createElement("table");s.style.width="100%";s.style.height="100%";var q=document.createElement("tbody"),u=document.createElement("tr"),t=document.createElement("td");t.style.width="140px";var v=document.createElement("td"),z=document.createElement("tr");
+z.style.height="40px";var x=document.createElement("td");x.setAttribute("colspan","2");var y=document.createElement("textarea");y.style.overflow="auto";y.style.width="100%";y.style.height="100%";t.appendChild(y);var C=a.editor.graph.getModel().getRoot();null!=C.value&&"object"==typeof C.value&&(y.value=C.value.getAttribute("animation"));var A=document.createElement("div");A.style.border="1px solid lightGray";A.style.background="#ffffff";A.style.width="100%";A.style.height="100%";A.style.overflow=
+"auto";mxEvent.disableContextMenu(A);v.appendChild(A);var B=new Graph(A);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 E=!1,G=!1,A=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+" fade\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Wipe In",
+function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+"\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Fade Out",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"hide "+b[c].id+"\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Wait",function(){y.value+="wait 1000\n"});x.appendChild(A);A=mxUtils.button("Preview",function(){r()});x.appendChild(A);
+A=mxUtils.button("Stop",function(){E=!1;B.getModel().clear()});x.appendChild(A);A=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(C,"animation",y.value)});x.appendChild(A);C=a.editor.graph.getModel().getRoot();u.appendChild(t);u.appendChild(v);q.appendChild(u);z.appendChild(x);q.appendChild(z);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"),k.src=IMAGE_PATH+"/onedrive-logo-white.svg");c=document.createElement("p");mxUtils.write(c,mxResources.get("authorizeThisAppIn",[g]));var l=document.createElement("input");l.setAttribute("type","checkbox");g=mxUtils.button(mxResources.get("authorize"),function(){a.hideDialog(!1);d(l.checked)});g.insertBefore(k,g.firstChild);g.style.marginTop=
"6px";g.className="geBigButton";b.appendChild(e);b.appendChild(c);b.appendChild(g);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(l),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),f.appendChild(e),b.appendChild(f),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)}));this.container=b},MoreShapesDialog=function(a,c,f){f=null!=f?f:a.sidebar.entries;var d=document.createElement("div");
@@ -7319,8 +7319,8 @@ if(c){c=document.createElement("div");c.className="geDialogTitle";mxUtils.write(
k.push(function(){return m.checked?c.id:null});0==n&&0==f&&p()})(c.entries[f])})(f[n]);d.style.padding="30px";d.appendChild(c);d.appendChild(b);d.appendChild(e);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";mxClient.IS_QUIRKS&&(f.style.width=c.style.width,f.style.paddingTop="12px");var m=document.createElement("input");
m.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)c=document.createElement("span"),c.style.paddingRight="20px",c.appendChild(m),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(c,"click",function(a){mxEvent.getSource(a)!=m&&(m.checked=!m.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(c.style.position="relative",c.style.top="-6px"),f.appendChild(c);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
c.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<k.length;c++){var d=k[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),m.checked,!0)});p.className="geBtn gePrimaryBtn"}else{var r=document.createElement("table"),s=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";var q=document.createElement("tr");r.style.width="100%";c=document.createElement("td");var p=document.createElement("td"),
-t=document.createElement("td"),u=mxUtils.bind(this,function(b,c,d){var e=document.createElement("input");e.type="checkbox";r.appendChild(e);e.checked=a.sidebar.isEntryVisible(d);var f=document.createElement("span");mxUtils.write(f,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(f);mxEvent.addListener(f,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});q.appendChild(c);q.appendChild(p);
-q.appendChild(t);s.appendChild(q);r.appendChild(s);for(var k=[],v=0,n=0;n<f.length;n++)for(s=0;s<f[n].entries.length;s++)v++;for(var A=[c,p,t],x=0,n=0;n<f.length;n++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];k.push(u(A[Math.floor(x/(v/3))],c.title,c.id));x++}})(f[n]);d.appendChild(r);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";m=document.createElement("input");isLocalStorage&&(m.setAttribute("type","checkbox"),m.checked=!0,m.defaultChecked=
+u=document.createElement("td"),t=mxUtils.bind(this,function(b,c,d){var e=document.createElement("input");e.type="checkbox";r.appendChild(e);e.checked=a.sidebar.isEntryVisible(d);var f=document.createElement("span");mxUtils.write(f,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(f);mxEvent.addListener(f,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});q.appendChild(c);q.appendChild(p);
+q.appendChild(u);s.appendChild(q);r.appendChild(s);for(var k=[],v=0,n=0;n<f.length;n++)for(s=0;s<f[n].entries.length;s++)v++;for(var z=[c,p,u],x=0,n=0;n<f.length;n++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];k.push(t(z[Math.floor(x/(v/3))],c.title,c.id));x++}})(f[n]);d.appendChild(r);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";m=document.createElement("input");isLocalStorage&&(m.setAttribute("type","checkbox"),m.checked=!0,m.defaultChecked=
!0,f.appendChild(m),c=document.createElement("span"),mxUtils.write(c," "+mxResources.get("rememberThisSetting")),f.appendChild(c),mxEvent.addListener(c,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));d.appendChild(f);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<k.length;c++){var d=k[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?
b.join(";"):"",m.checked);a.hideDialog()});p.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}a.editor.cancelFirst?(f.appendChild(c),f.appendChild(p)):(f.appendChild(p),f.appendChild(c));d.appendChild(f);this.container=d},PluginsDialog=function(a){function c(){if(0==b.length)d.innerHTML=mxResources.get("noPlugins");else{d.innerHTML="";for(var e=0;e<b.length;e++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var k=
document.createElement("span");k.className="geSprite geSprite-delete";k.style.position="relative";k.style.cursor="pointer";k.style.top="5px";k.style.marginRight="4px";k.style.display="inline-block";f.appendChild(k);mxUtils.write(f,b[e]);d.appendChild(f);mxUtils.br(d);mxEvent.addListener(k,"click",function(d){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+b[d]+'"?',function(){b.splice(d,1);c()})}}(e))}}}var f=document.createElement("div"),d=document.createElement("div");d.style.height=
@@ -7330,35 +7330,35 @@ f[a])&&b.push(f[a]);c()}},mxResources.get("enterValue")+" ("+mxResources.get("ur
"6px";mxUtils.write(l,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d?d.x:"";this.init=function(){m.focus();m.select()};n.appendChild(m);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
p.value=null!=d?d.y:"";n.appendChild(p);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.width="100px";r.value=null!=d?d.width:"";n.appendChild(r);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");
mxUtils.write(l,mxResources.get("height")+":");var s=document.createElement("input");s.setAttribute("type","text");s.style.width="100px";s.value=null!=d?d.height:"";n.appendChild(s);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=1==c.length?mxUtils.getValue(f.getCellStyle(c[0]),
-mxConstants.STYLE_ROTATION,0):"";n.appendChild(q);k.appendChild(l);k.appendChild(n);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var d=f.getCellGeometry(c[b]);null!=d&&(d=d.clone(),f.isCellMovable(c[b])&&(0<mxUtils.trim(m.value).length&&(d.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(d.y=
-Number(p.value))),f.isCellResizable(c[b])&&(0<mxUtils.trim(r.value).length&&(d.width=Number(r.value)),0<mxUtils.trim(s.value).length&&(d.height=Number(s.value))),f.getModel().setGeometry(c[b],d));0<mxUtils.trim(q.value).length&&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,r){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 x=
-f,z=l;if(f>a.maxImageSize||l>a.maxImageSize){var D=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=D;l*=D}x>z?(z=Math.round(z*u/x),x=u):(x=Math.round(x*v/z),z=v);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";N.style.position="relative";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=b){var P=document.createElement("img");P.setAttribute("src",
-C.convert(b));P.style.width=x+"px";P.style.height=z+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((v-z)/2)+"px";P.style.paddingLeft=Math.floor((u-x)/2)+"px";N.appendChild(P)}else if(null!=n){var M=a.stringToCells(a.editor.graph.decompress(n.xml));0<M.length&&(a.sidebar.createThumb(M,u,v,N,null,!0,!1),N.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",N.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}N.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)})})(N,b,n);N.appendChild(V);N.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:r},null!=p&&
-(K.aspect=p),t[b]=P,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!=y&&(y(),y=null,mxEvent.consume(a))});S();N.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){"true"!=
-J.getAttribute("contentEditable")&&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!=y&&(y(),y=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);y=function(){J.removeAttribute("contentEditable");
-J.style.cursor="pointer";K.title=J.innerHTML;S()};mxEvent.consume(b)}}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(N,"dblclick",f);s.appendChild(N);mxEvent.addListener(N,"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);A=g(a);mxClient.IS_GC&&(N.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);V.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(N,"dragend",function(a){"hidden"==V.style.visibility&&(V.style.visibility="",J.style.visibility="");A=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,"transform",null)})}else a.handleError({message:mxResources.get("fileExists")});
-else{f=!1;try{if(null!=b&&"\x3cmxlibrary"==b.substring(0,10)){z=mxUtils.parseXml(b);x=JSON.parse(mxUtils.getTextContent(z.documentElement));if(null!=x&&0<x.length)for(l=0;l<x.length;l++)null!=x[l].xml?k(null,null,0,0,0,0,x[l]):k(x[l].data,null,0,0,x[l].w,x[l].h,null,"fixed",x[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!=A?"move":
-"copy";a.stopPropagation();a.preventDefault()}function n(b){b.stopPropagation();b.preventDefault();x=g(b);if(null!=A)null!=x&&x<s.children.length?(m.splice(x>A?x-1:x,0,m.splice(A,1)[0]),s.insertBefore(s.children[A],s.children[x])):(m.push(m.splice(A,1)[0]),s.appendChild(s.children[A]));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||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};p.appendChild(r);var s=document.createElement("div");
-s.style.borderWidth="1px 0px 1px 0px";s.style.borderColor="#d3d3d3";s.style.borderStyle="solid";s.style.marginTop="6px";s.style.overflow="auto";s.style.height="340px";s.style.backgroundPosition="center center";s.style.backgroundRepeat="no-repeat";0==m.length&&Graph.fileSupport&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";
-q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));f.appendChild(q);var t={},u=100,v=100,A=null,x=null,y=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(a))};mxEvent.addListener(s,"mousedown",c);mxEvent.addListener(s,"pointerdown",c);mxEvent.addListener(s,"touchstart",c);var C=new mxUrlConverter;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,null,0,0,p.w,p.h,p);mxEvent.addListener(s,"dragleave",function(a){q.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==s||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});mxEvent.addListener(s,"dragover",l);mxEvent.addListener(s,"drop",n);mxEvent.addListener(q,"dragover",l);mxEvent.addListener(q,"drop",n);f.appendChild(s);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&
-d.appendChild(c);!window.chrome||!chrome.app||!chrome.app.runtime?(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(m),c=r.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(new mxXmlRequest(SAVE_URL,"filename\x3d"+encodeURIComponent(c)+"\x26format\x3dxml\x26xml\x3d"+encodeURIComponent(b))).simulate(document,"_blank")}),p.setAttribute("id","btnDownload"),p.className="geBtn",d.appendChild(p)):r.setAttribute("disabled",
-"disabled");var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,"change",function(b){a.importFiles(z.files,0,0,a.maxImageSize,function(a,b,c,d,e,f,g){k(a,b,c,d,e,f,g,"fixed");z.value=""})}),p=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);z.click()}),p.setAttribute("id","btnAddImage"),p.className="geBtn",d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),
-function(){null!=y&&(y(),y=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}k(a,null,0,0,b,c)}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(r.value,
-m,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";mxUtils.write(g,f);e.appendChild(g);l.appendChild(e);
-e=document.createElement("tr");g=document.createElement("td");var n=document.createElement("textarea");n.style.outline="none";n.style.resize="none";n.style.width=d-200+"px";n.style.height=b+"px";this.textarea=n;this.init=function(){n.focus();n.scrollTop=0};g.appendChild(n);e.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=b+4+"px";f.style.overflow="hidden";
-f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var m=new Graph(f);m.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];m.addCells([p]);f=m.view.getState(p);var r="";null!=f.shape&&null!=f.shape.stencil&&(r=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(n,r||"");f=m.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);m.view.scaleAndTranslate(b,20/b-f.x,20/b-f.y);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");
-g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Editing+Shapes")}),f.className="geBtn",g.appendChild(f));var s=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 k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(g){throw g;}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(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+mxConstants.STYLE_ROTATION,0):"";n.appendChild(q);k.appendChild(l);k.appendChild(n);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var d=f.getCellGeometry(c[b]);null!=d&&(d=d.clone(),f.isCellMovable(c[b])&&(0<mxUtils.trim(m.value).length&&(d.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(d.y=
+Number(p.value))),f.isCellResizable(c[b])&&(0<mxUtils.trim(r.value).length&&(d.width=Number(r.value)),0<mxUtils.trim(s.value).length&&(d.height=Number(s.value))),f.getModel().setGeometry(c[b],d));0<mxUtils.trim(q.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(q.value),[c[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&u.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?
+(e.appendChild(d),e.appendChild(u)):(e.appendChild(u),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,r){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=n||null==u[b]){s.style.backgroundImage="";q.style.display="none";var x=
+f,B=l;if(f>a.maxImageSize||l>a.maxImageSize){var T=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=T;l*=T}x>B?(B=Math.round(B*t/x),x=t):(x=Math.round(x*v/B),B=v);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";M.style.position="relative";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition","transform .1s ease-in-out");if(null!=b){var K=document.createElement("img");K.setAttribute("src",
+C.convert(b));K.style.width=x+"px";K.style.height=B+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((v-B)/2)+"px";K.style.paddingLeft=Math.floor((t-x)/2)+"px";M.appendChild(K)}else if(null!=n){var $=a.stringToCells(a.editor.graph.decompress(n.xml));0<$.length&&(a.sidebar.createThumb($,t,v,M,null,!0,!1),M.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",M.firstChild.style.cursor="")}var N=document.createElement("img");N.setAttribute("src",Editor.closeImage);N.setAttribute("border",
+"0");N.setAttribute("title",mxResources.get("delete"));N.setAttribute("align","top");N.style.paddingTop="4px";N.style.marginLeft="-22px";N.style.cursor="pointer";mxEvent.addListener(N,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=n&&(N.style.position="relative");(function(a,b,c){mxEvent.addListener(N,"click",function(d){u[b]=null;for(var e=0;e<m.length;e++)if(null!=m[e].data&&m[e].data==b||null!=m[e].xml&&m[e].xml==c.xml){m.splice(e,1);break}M.parentNode.removeChild(a);0==m.length&&
+(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(N,"dblclick",function(a){mxEvent.consume(a)})})(M,b,n);M.appendChild(N);M.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var P=null;null!=b?(P={data:b,
+w:f,h:l,title:r},null!=p&&(P.aspect=p),u[b]=K,m.push(P)):null!=n&&(n.aspect="fixed",m.push(n),P=n);var W=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=P.title&&0<P.title.length?P.title:mxResources.get("untitled"));I.style.color=null==P.title||0==P.title.length?"#d0d0d0":""};mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(a))});W();M.appendChild(I);mxEvent.addListener(I,
+"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});f=function(b){if(!mxClient.IS_IOS&&!mxClient.IS_QUIRKS&&!mxClient.IS_FF&&(null==document.documentMode||9<document.documentMode)){if("true"!=I.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==P.title||0==P.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",
+!1,null);y=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";P.title=I.innerHTML;W()};mxEvent.consume(b)}}else{var c=new FilenameDialog(a,P.title||"",mxResources.get("ok"),function(a){null!=a&&(P.title=a,W())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}};mxEvent.addListener(I,"click",f);mxEvent.addListener(M,"dblclick",f);s.appendChild(M);mxEvent.addListener(M,"dragstart",function(a){null==b&&null!=n&&(N.style.visibility=
+"hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=n.xml&&a.dataTransfer.setData("Text",n.xml);z=g(a);mxClient.IS_GC&&(M.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(M.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(M,30);N.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(a){"hidden"==N.style.visibility&&(N.style.visibility="",I.style.visibility="");z=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,
+"transform",null)})}else A||(A=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(null!=b&&"\x3cmxlibrary"==b.substring(0,10)){B=mxUtils.parseXml(b);x=JSON.parse(mxUtils.getTextContent(B.documentElement));if(null!=x&&0<x.length)for(l=0;l<x.length;l++)null!=x[l].xml?k(null,null,0,0,0,0,x[l]):k(x[l].data,null,0,0,x[l].w,x[l].h,null,"fixed",x[l].title);a.spinner.stop();f=!0}}catch(fa){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){console.log("e",
+da)}return null}function l(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function n(b){b.stopPropagation();b.preventDefault();A=!1;x=g(b);if(null!=z)null!=x&&x<s.children.length?(m.splice(x>z?x-1:x,0,m.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[x])):(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||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",
+!1,null)};p.appendChild(r);var s=document.createElement("div");s.style.borderWidth="1px 0px 1px 0px";s.style.borderColor="#d3d3d3";s.style.borderStyle="solid";s.style.marginTop="6px";s.style.overflow="auto";s.style.height="340px";s.style.backgroundPosition="center center";s.style.backgroundRepeat="no-repeat";0==m.length&&Graph.fileSupport&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top=
+"260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));f.appendChild(q);var u={},t=100,v=100,z=null,x=null,y=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(a))};mxEvent.addListener(s,"mousedown",c);mxEvent.addListener(s,"pointerdown",c);mxEvent.addListener(s,"touchstart",c);var C=new mxUrlConverter,A=!1;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,
+null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(s,"dragleave",function(a){q.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==s||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});mxEvent.addListener(s,"dragover",l);mxEvent.addListener(s,"drop",n);mxEvent.addListener(q,"dragover",l);mxEvent.addListener(q,"drop",n);f.appendChild(s);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});
+c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);!window.chrome||!chrome.app||!chrome.app.runtime?(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(m),c=r.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(new mxXmlRequest(SAVE_URL,"filename\x3d"+encodeURIComponent(c)+"\x26format\x3dxml\x26xml\x3d"+encodeURIComponent(b))).simulate(document,"_blank")}),p.setAttribute("id","btnDownload"),
+p.className="geBtn",d.appendChild(p)):r.setAttribute("disabled","disabled");var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){A=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,b,c,d,e,f,g){k(a,b,c,d,e,f,g,"fixed");B.value=""})}),p=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);B.click()}),p.setAttribute("id","btnAddImage"),p.className="geBtn",
+d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=y&&(y(),y=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){A=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}k(a,null,0,0,b,c)}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};p=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(r.value,m,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan",
+"2");g.style.fontSize="10pt";mxUtils.write(g,f);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");var n=document.createElement("textarea");n.style.outline="none";n.style.resize="none";n.style.width=d-200+"px";n.style.height=b+"px";this.textarea=n;this.init=function(){n.focus();n.scrollTop=0};g.appendChild(n);e.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
+"6px";f.style.width="200px";f.style.height=b+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var m=new Graph(f);m.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];m.addCells([p]);f=m.view.getState(p);var r="";null!=f.shape&&null!=f.shape.stencil&&(r=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(n,r||"");f=m.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);m.view.scaleAndTranslate(b,20/b-f.x,20/b-f.y);e.appendChild(g);
+l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Editing+Shapes")}),f.className="geBtn",g.appendChild(f));var s=
+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 k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+e+")",[c])}catch(g){throw g;}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(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.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"==b.nodeName){c=b.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"==b.getAttribute("math");c=b.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"==b.getAttribute("shadow"),
@@ -7398,7 +7398,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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.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.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"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
-[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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,k,g,l,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return s.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.0.1.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.plusImage=!mxClient.IS_SVG?IMAGE_PATH+"/plus.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII\x3d";
+[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.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,k,g,l,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return s.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.0.1.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.plusImage=!mxClient.IS_SVG?IMAGE_PATH+"/plus.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII\x3d";
EditorUi.spinImage=!mxClient.IS_SVG?IMAGE_PATH+"/spin.gif":"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw\x3d\x3d";
EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;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.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(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){}};
@@ -7412,13 +7412,13 @@ mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(
a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d){var e=b.lastIndexOf("\x26lt;/mxfile\x26gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement),c=null!=g?mxUtils.getXml(g):""}catch(s){}return c};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("0"!=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"0"!=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.createFileData=function(a,b,c,d,e,f,g,q,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;t=null!=t?t:!0;var u=null,v=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?u="_blank":v=u=d;if(null==a)return"";
-var A=a;if("mxfile"!=A.nodeName.toLowerCase()){var x=b.zapGremlins(mxUtils.getXml(a)),A=b.compress(x);if(b.decompress(A)!=x)return x;x=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(x,A);A=a.ownerDocument.createElement("mxfile");A.appendChild(x)}A.setAttribute("userAgent",navigator.userAgent);A.setAttribute("version",EditorUi.VERSION);A.setAttribute("editor","www.draw.io");a=null!=c?c.getMode():this.mode;null!=a&&A.setAttribute("type",a);a=mxUtils.getXml(A);if(!f&&!e&&(g||null!=c&&
-/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(A),b,null!=c?c.getTitle():null,u,v);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,t,v)}return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));
+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.createFileData=function(a,b,c,d,e,f,g,q,u){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;u=null!=u?u:!0;var t=null,v=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?t="_blank":v=t=d;if(null==a)return"";
+var z=a;if("mxfile"!=z.nodeName.toLowerCase()){var x=b.zapGremlins(mxUtils.getXml(a)),z=b.compress(x);if(b.decompress(z)!=x)return x;x=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(x,z);z=a.ownerDocument.createElement("mxfile");z.appendChild(x)}z.setAttribute("userAgent",navigator.userAgent);z.setAttribute("version",EditorUi.VERSION);z.setAttribute("editor","www.draw.io");a=null!=c?c.getMode():this.mode;null!=a&&z.setAttribute("type",a);a=mxUtils.getXml(z);if(!f&&!e&&(g||null!=c&&
+/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(z),b,null!=c?c.getTitle():null,t,v);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,u,v)}return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));
mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var f=this.pages[e].mapping;this.currentPage!=this.pages[e]&&(null!=f&&f.needsUpdate)&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};
-EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var q=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=q&&/(\.svg)$/i.test(q.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var t=f.getGlobalVariable,u=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(f.container);
-f.model.setRoot(u.root)}a=this.createFileData(g,f,q,window.location.href,a,b,c,d,e);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),t=b.view.scale;f=Math.floor(g.x/t-b.view.translate.x);t=Math.floor(g.y/t-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),
-0<b.length&&(q="https://www.draw.io/embed.js?s\x3d"+b));a.setAttribute("x0",f);a.setAttribute("y0",t)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"\x26amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));
+EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var q=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=q&&/(\.svg)$/i.test(q.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var u=f.getGlobalVariable,t=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(f.container);
+f.model.setRoot(t.root)}a=this.createFileData(g,f,q,window.location.href,a,b,c,d,e);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),u=b.view.scale;f=Math.floor(g.x/u-b.view.translate.x);u=Math.floor(g.y/u-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),
+0<b.length&&(q="https://www.draw.io/embed.js?s\x3d"+b));a.setAttribute("x0",f);a.setAttribute("y0",u)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"\x26amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));
return(null==e?'\x3c!--[if IE]\x3e\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d5,IE\x3d9" \x3e\x3c![endif]--\x3e\n':"")+"\x3c!DOCTYPE html\x3e\n\x3chtml"+(null!=e?' xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e':"\x3e")+"\n\x3chead\x3e\n"+(null==e?null!=c?"\x3ctitle\x3e"+mxUtils.htmlEntities(c)+"\x3c/title\x3e\n":"":"\x3ctitle\x3eDraw.io Diagram\x3c/title\x3e\n")+(null!=e?'\x3cmeta http-equiv\x3d"refresh" content\x3d"0;URL\x3d\''+e+"'\"/\x3e\n":"")+"\x3c/head\x3e\n\x3cbody"+(null==e&&
null!=g&&g!=mxConstants.NONE?' style\x3d"background-color:'+g+';"\x3e':"\x3e")+'\n\x3cdiv class\x3d"mxgraph" style\x3d"position:relative;overflow:auto;width:100%;"\x3e\n\x3cdiv style\x3d"width:1px;height:1px;overflow:hidden;"\x3e'+d+"\x3c/div\x3e\n\x3c/div\x3e\n"+(null==e?'\x3cscript type\x3d"text/javascript" src\x3d"'+q+'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href\x3d"'+e+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"https://www.draw.io/images/drawlogo128.png"/\x3e\x3c/a\x3e')+
"\n\x3c/body\x3e\n\x3c/html\x3e\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){d="https://www.draw.io/js/viewer.min.js";var f="";null!=b&&null==e&&(f=this.getBasenames().join(";"),0<f.length&&(d="https://www.draw.io/embed2.js?s\x3d"+f));null!=e&&(e=e.replace(/&/g,"\x26amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
@@ -7426,10 +7426,10 @@ this.currentPage));return(null==e?'\x3c!--[if IE]\x3e\x3cmeta http-equiv\x3d"X-U
mxUtils.htmlEntities(JSON.stringify(a))+'"\x3e\x3c/div\x3e\n'+(null==e?'\x3cscript type\x3d"text/javascript" src\x3d"'+d+'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href\x3d"'+e+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"https://www.draw.io/images/drawlogo128.png"/\x3e\x3c/a\x3e')+"\n\x3c/body\x3e\n\x3c/html\x3e\n"};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"),"0"!=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}"0"!=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)};EditorUi.prototype.downloadFile=function(a,b,c,d,e){try{var f=this.getCurrentFile();
-d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));var q=g+"."+a;if("xml"==a){var t='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,t,"text/xml")}else if("html"==a)t=this.getHtml2(this.getFileData(!0),this.editor.graph,g),
-this.saveData(q,a,t,"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var u=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var A=this.editor.graph.background;A==mxConstants.NONE&&(A=null);var x=this.editor.graph.getSvg(A,null,null,!1,null,
-d);c&&this.editor.addSvgShadow(x);this.convertImages(x,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else{var y=this.editor.graph.getGraphBounds(),t=this.getFileData(!0,null,null,null,d,"xmlpng"!=
-a),C="";if(y.width*y.height<=MAX_AREA&&t.length<=MAX_REQUEST_SIZE){var z="0";if("xmlpng"==a&&(z="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){C="\x26from\x3d"+b;break}this.saveRequest(t,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+C+"\x26base64\x3d"+c+"\x26embedXml\x3d"+z+"\x26xml\x3d"+encodeURIComponent(t)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
+d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));var q=g+"."+a;if("xml"==a){var u='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,u,"text/xml")}else if("html"==a)u=this.getHtml2(this.getFileData(!0),this.editor.graph,g),
+this.saveData(q,a,u,"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var t=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var z=this.editor.graph.background;z==mxConstants.NONE&&(z=null);var x=this.editor.graph.getSvg(z,null,null,!1,null,
+d);c&&this.editor.addSvgShadow(x);this.convertImages(x,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else{var y=this.editor.graph.getGraphBounds(),u=this.getFileData(!0,null,null,null,d,"xmlpng"!=
+a),C="";if(y.width*y.height<=MAX_AREA&&u.length<=MAX_REQUEST_SIZE){var A="0";if("xmlpng"==a&&(A="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){C="\x26from\x3d"+b;break}this.saveRequest(u,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+C+"\x26base64\x3d"+c+"\x26embedXml\x3d"+A+"\x26xml\x3d"+encodeURIComponent(u)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
mxResources.get("error"))}}catch(B){this.handleError(B)}};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=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);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=
a)try{if(this.setCurrentFile(a),a.addListener("descriptorChanged",this.descriptorChangedListener),a.addListener("contentChanged",this.descriptorChangedListener),this.setMode(a.getMode()),this.descriptorChanged(),a.open(),this.diagramContainer.style.visibility="",this.formatContainer.style.visibility="",this.hsplit.style.display="",this.sidebarContainer.style.display="",this.sidebarFooterContainer.style.display="",this.editor.undoManager.clear(),this.updateUi(),null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):
@@ -7437,133 +7437,134 @@ this.editor.setStatus(mxResources.get("readOnly"))),this.editor.chromeless?this.
a,e),this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):c()}))}else c()};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
a,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));
-this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),
-mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+
-"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);c=g.parentNode.previousSibling;d=c.getAttribute("title");null!=d&&(0<d.length&&".scratchpad"!=a.title)&&c.setAttribute("title",
-this.getLibraryStorageHint(a)+"\n"+d);var q=document.createElement("div");q.style.position="absolute";q.style.right="0px";q.style.top="5px";c.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.marginRight="8px";t.style.marginTop="3px";q.appendChild(t);var u=null;mxEvent.addListener(t,"click",mxUtils.bind(this,
-function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var v=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),
-x=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=t.cloneNode(!1),z.setAttribute("src",EditorUi.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="6px",z.style.marginTop="2px",q.insertBefore(z,q.firstChild),this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z)})):null==u&&(u=t.cloneNode(!1),u.setAttribute("src",
-IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),q.insertBefore(u,q.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);u.parentNode.removeChild(u);u=null;mxEvent.consume(c)})))}),y=mxUtils.bind(this,function(a,c,d,f){a=v.cloneCells(v.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var n=v.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);x(d);null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}),C=mxUtils.bind(this,function(a){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(a),v.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
-v.getSelectionCells(),c=v.view.getBounds(b),d=v.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=v.view.translate.x;c.y-=v.view.translate.y;y(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){v.isMouseDown&&(null!=v.panningManager&&null!=v.graphHandler.shape)&&(v.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",
-g.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!1),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){v.isMouseDown&&(null!=v.panningManager&&null!=v.graphHandler)&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),
-v.isMouseDown=!1,v.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",v.autoScroll=!0,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!0),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,m,u,t){if(null!=c&&"image/"==d.substring(0,6)){var q="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,u),q)];q[0].vertex=!0;y(q,new mxRectangle(0,0,m,u),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))}else{t=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=
-JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);x(a);this.spinner.stop();t=!0}catch(A){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),q=this.stringToCells(this.editor.graph.decompress(v)),y(q,new mxRectangle(0,0,m,u),a),t=!0}catch(z){}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),
-e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));q.insertBefore(t,q.firstChild);mxEvent.addListener(t,"click",A);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&A(a)});t=t.cloneNode(!1);
-t.setAttribute("src",EditorUi.plusImage);t.setAttribute("title",mxResources.get("add"));q.insertBefore(t,q.firstChild);this.isOffline()||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;margin-right:8px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),q.insertBefore(d,q.firstChild));var z=null;mxEvent.addListener(t,
-"click",C)}c.appendChild(q)};"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()&&"1"!=urlParams.embed)&&this.showSplash()}));a.init()};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.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
-"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+
-mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,
-!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,
-"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=
-!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type",
-"checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");
-t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&u.setAttribute("disabled","disabled");a&&(f.appendChild(u),mxUtils.write(f,mxResources.get("embedImages")),
-mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom="8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,v.checked,u.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"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);
-var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");
-A.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),x=document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");
-0<y&&(a=a.substring(0,y));x.value=a+".png";var C=document.createElement("input");C.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");C.value="master";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(C);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Message:");z.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);
-q=q.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/"+v.value+"/"+A.value+"/contents/"+x.value+"?ref\x3d"+encodeURIComponent(C.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:x.value,message:z.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/"+v.value+"/"+A.value+"/blob/"+C.value+"/"+x.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(t.value+":"+u.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("."),t=f;0<g&&(t=f=t.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:t+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),u=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+
-b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+
-e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,
-function(){200==l.getStatus()?k():u(l)}),mxUtils.bind(this,function(){u(l)}))}else k()}catch(p){this.handleError(p)}else u(a)}),mxUtils.bind(this,function(a){u(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);
-if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(u){this.handleError(u)}}})):this.showRemoteExportDialog(mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),
-e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");
-b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
-"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,A){f=null!=f?f:!0;A=null!=A?A:this.editor.graph;var x=t?null:A.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&!1==t&&(x="#ffffff");this.convertImages(A.getSvg(x,null,null,null,null,null!=g?g:!0),
-mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*n),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*n));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),this.convertMath(A,c,!0,
-mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 n=a.getElementsByTagName(c),u=0;u<n.length;u++)mxUtils.bind(this,function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var u=f[n];null==u?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,u)}})(n[u])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),
-t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=0;v<u.length;v++){var A=this.updatePageRoot(new DiagramPage(u[v])),x=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));g.model.execute(new ChangePage(this,
-A,A,x))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var y=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,y);var C=y.getChildCount(y.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<C;v++){var z=y.getChildAt(y.getRoot(),v);if(1==C&&!g.isCellLocked(g.getDefaultParent()))var B=y.getChildren(z),f=f.concat(g.importCells(B,b,c,g.getDefaultParent(),null,a));else z=g.importCells([z],0,0,g.model.getRoot(),null,a)[0],B=g.model.getChildren(z),
-g.moveCells(B,b,c),f=f.concat(B)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var F=g.getBoundingBoxFromGeometry(f,!0);null!=F&&g.moveCells(f,b-F.x,c-F.y)}}finally{g.model.endUpdate()}}}}catch(G){throw e||this.handleError(G,mxResources.get("invalidOrMissingFile")),G;}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 q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=
-null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,b,c,f,!0),0<t.length)return t}catch(u){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
-null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted",
-"cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,
-b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,
-e,f,g,q,t,u,v){u=null!=u?u:!0;var A=!1,x=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(x=this.importXml(b,c,d,u),g=!0)),g||(x=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&x.isGridEnabled()&&(c=x.snap(c),d=x.snap(d)),x=[x.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
-a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(A=!0,this.parseFile(null!=t?t: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,u));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(t):x=this.insertTextAt(this.validateFileData(a),c,d,!0);!A&&null!=q&&q(x);return x};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,q,t,u,v,A){var x=null!=b&&null!=
-c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;t=null!=t?t:!0;var y=this.editor.graph,C=y.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,x,A)});f=null!=f?f:mxUtils.bind(this,function(a){y.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=
-a.length,B=z,F=[],G=mxUtils.bind(this,function(a,b){F[a]=b;if(0==--B){this.spinner.stop();if(null!=q)q(F);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<F.length;d++){var e=F[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),E=0;E<z;E++)mxUtils.bind(this,function(f){var q=a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),x=
-atob(k.substring(r+1)),y=mxUtils.parseXml(x),x=y.getElementsByTagName("svg");if(0<x.length){var x=x[0],z=A?null:x.getAttribute("content");null!=z&&("\x3c"!=z.charAt(0)&&"%"!=z.charAt(0))&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null!=z&&("\x3cmxfile "===z.substring(0,8)||"\x3cmxGraphModel "===z.substring(0,14))?G(f,mxUtils.bind(this,function(){return e(z,"text/xml",b+f*C,c+f*C,0,0,q.name)})):G(f,mxUtils.bind(this,function(){try{if(k.substring(0,
-r+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],u=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox","0 0 "+u+" "+t);else if(isNaN(u)||isNaN(t)){var s=v.split(" ");3<s.length&&(u=parseFloat(s[2]),t=parseFloat(s[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var A=Math.min(1,Math.min(d/Math.max(1,u)),d/Math.max(1,t));return e(k,q.type,b+f*C,c+f*C,Math.max(1,Math.round(u*
-A)),Math.max(1,Math.round(t*A)),q.name)}}}catch(x){}return null}))}}else{x=!1;if("image/png"==q.type){var B=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var E=new Image;E.src=a.target.result;G(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*C,c+f*C,E.width,E.height,q.name)}));x=!0}}x||(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,k,v){G(f,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var r=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/v));return e(g,q.type,b+f*C,c+f*C,Math.round(k*r),Math.round(v*r),q.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),t,d,v)})))}else e(a.target.result,q.type,b+f*C,c+f*C,240,160,q.name,function(a){G(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*C,c+f*C,240,160,q.name,function(a){G(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):r.readAsText(q)})(E)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var t=Math.max(g/e,q/e);if(1<t){var u=Math.round(g/t),v=Math.round(q/t),A=document.createElement("canvas");A.width=u;A.height=v;A.getContext("2d").drawImage(a,0,0,u,v);var x=A.toDataURL();if(x.length<b.length){var y=
-document.createElement("canvas");y.width=u;y.height=v;var C=y.toDataURL();x!==C&&(b=x,g=u,q=v)}}}catch(z){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var f=c,d=0;8>d;d++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[c]=f;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=q;q+=b;return a.substring(c,q)}
-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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>>16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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 b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
-var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===
-c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");
-f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();
-document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&
-(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=
-this.createSpinner(document.body.clientWidth/2-2,e,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();
-a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){e=document.getElementById("geFooter");null!=e&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity=
-"0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),e.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
-"hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}e=document.getElementById("geInfo");null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var u=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=u&&(u.parentNode.removeChild(u),u=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==u&&
-(!mxClient.IS_IE||10<document.documentMode))u=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=u&&(u.parentNode.removeChild(u),u=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,n=e.getElementsByTagName("img");null!=
-n&&1==n.length?(c=n[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,
-null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};
-EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,
-d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),t=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(t)&&(e=!0,d=t)}catch(u){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||
-this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
-null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),
-"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,
-"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,
-function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-
-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,
-d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+
-1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));
+this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,
+c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==
+f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=
+q.getAttribute("title");null!=c&&(0<c.length&&".scratchpad"!=a.title)&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var u=document.createElement("div");u.style.position="absolute";u.style.right="0px";u.style.top="5px";u.style.backgroundColor="inherit";q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align","top");t.setAttribute("border","0");t.className=
+"geButton";t.style.marginRight="1px";t.style.marginTop="-1px";u.appendChild(t);var v=null;mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var z=
+this.editor.graph,x=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),y=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=t.cloneNode(!1),B.setAttribute("src",EditorUi.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",u.insertBefore(B,u.firstChild),q.style.paddingRight=18*u.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),q.style.paddingRight=18*u.childNodes.length+"px")})):null==v&&(v=t.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),u.insertBefore(v,u.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);v.parentNode.removeChild(v);v=null;q.style.paddingRight=
+18*u.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*u.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var n=z.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);
+y(d);null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}),A=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;C(b,c)}mxEvent.consume(a)});
+g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&(null!=z.panningManager&&null!=z.graphHandler.shape)&&(z.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&(null!=z.panningManager&&null!=z.graphHandler)&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility=
+"visible",g.style.border="3px solid transparent",g.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor=
+"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,m,t,u){if(null!=c&&"image/"==d.substring(0,6)){var q="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,t),q)];q[0].vertex=!0;C(q,new mxRectangle(0,0,m,t),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," "))}else{u=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);y(a);this.spinner.stop();u=!0}catch(z){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
+q=this.stringToCells(this.editor.graph.decompress(v)),C(q,new mxRectangle(0,0,m,t),a),u=!0}catch(x){}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));
+t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));u.insertBefore(t,u.firstChild);mxEvent.addListener(t,"click",x);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&x(a)});t=t.cloneNode(!1);t.setAttribute("src",EditorUi.plusImage);t.setAttribute("title",mxResources.get("add"));u.insertBefore(t,u.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),
+c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),u.insertBefore(c,u.firstChild));var B=null;mxEvent.addListener(t,"click",A)}q.appendChild(u);q.style.paddingRight=18*u.childNodes.length+"px"};"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()&&"1"!=urlParams.embed)&&this.showSplash()}));a.init()};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.handleError=
+function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=
+typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),
+g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};
+EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=
+document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,
+e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,
+mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");f.appendChild(u);mxUtils.write(f,mxResources.get("shadow"));
+mxUtils.br(f);e.shadowVisible&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&t.setAttribute("disabled","disabled");a&&(f.appendChild(t),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom=
+"8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,u.checked,v.checked,t.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"),q=document.createElement("td"),u=document.createElement("input");u.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),t=document.createElement("input");t.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);
+q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);
+var q=q.cloneNode(!1),x=document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");0<y&&(a=a.substring(0,y));x.value=a+".png";var C=document.createElement("input");C.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");C.value="master";
+g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(C);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Message:");A.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);q=q.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/"+
+v.value+"/"+z.value+"/contents/"+x.value+"?ref\x3d"+encodeURIComponent(C.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:x.value,message:A.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/"+v.value+"/"+z.value+"/blob/"+C.value+"/"+x.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(u.value+":"+t.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("."),u=f;0<g&&(u=f=u.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:u+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),t=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();
+var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),
+function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():t(l)}),mxUtils.bind(this,function(){t(l)}))}else k()}catch(p){this.handleError(p)}else t(a)}),mxUtils.bind(this,function(a){t(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,
+b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var u=this.editor.graph.isSelectionEmpty();f=null!=f?f:u;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,
+e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(t){this.handleError(t)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*
+f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);
+if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&
+(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
+"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,u,t,v,z){f=null!=f?f:!0;z=null!=z?z:this.editor.graph;var x=u?null:z.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&!1==u&&(x="#ffffff");this.convertImages(z.getSvg(x,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));q=null!=
+q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*n),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*n));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.addSvgShadow(c),this.convertMath(z,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
+var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 n=a.getElementsByTagName(c),t=0;t<n.length;t++)mxUtils.bind(this,
+function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var t=f[n];null==t?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,t)}})(n[t])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),u=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=u&&"mxfile"==u.nodeName&&null!=this.pages){var t=u.getElementsByTagName("diagram");if(1==t.length)u=
+mxUtils.parseXml(g.decompress(mxUtils.getTextContent(t[0]))).documentElement;else if(1<t.length){g.model.beginUpdate();try{for(var v=0;v<t.length;v++){var z=this.updatePageRoot(new DiagramPage(t[v])),x=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[x+1]));g.model.execute(new ChangePage(this,z,z,x))}}finally{g.model.endUpdate()}}}if(null!=u&&"mxGraphModel"===u.nodeName){var y=new mxGraphModel;(new mxCodec(u.ownerDocument)).decode(u,y);var C=y.getChildCount(y.getRoot());
+g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<C;v++){var A=y.getChildAt(y.getRoot(),v);if(1==C&&!g.isCellLocked(g.getDefaultParent()))var B=y.getChildren(A),f=f.concat(g.importCells(B,b,c,g.getDefaultParent(),null,a));else A=g.importCells([A],0,0,g.model.getRoot(),null,a)[0],B=g.model.getChildren(A),g.moveCells(B,b,c),f=f.concat(B)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var E=g.getBoundingBoxFromGeometry(f,!0);null!=E&&g.moveCells(f,b-E.x,c-E.y)}}finally{g.model.endUpdate()}}}}catch(G){throw e||
+this.handleError(G,mxResources.get("invalidOrMissingFile")),G;}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 q=this.extractGraphModelFromPng(a),u=this.importXml(q,b,c,f,!0);if(0<u.length)return u}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),u=this.importXml(q,
+b,c,f,!0),0<u.length)return u}catch(t){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted",
+"cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
+g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,u,t,v){t=null!=t?t:!0;var z=!1,x=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(x=this.importXml(b,c,d,t),g=!0)),g||(x=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
+1))),t&&x.isGridEnabled()&&(c=x.snap(c),d=x.snap(d)),x=[x.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(z=!0,this.parseFile(null!=u?u: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,t));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(u):x=this.insertTextAt(this.validateFileData(a),c,d,!0);!z&&null!=q&&q(x);return x};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,q,u,t,v,z){var x=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;u=null!=u?u:!0;var y=this.editor.graph,C=y.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,x,z)});f=null!=f?f:mxUtils.bind(this,function(a){y.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=a.length,B=A,E=[],G=mxUtils.bind(this,function(a,b){E[a]=b;if(0==--B){this.spinner.stop();if(null!=q)q(E);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<E.length;d++){var e=E[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),F=0;F<A;F++)mxUtils.bind(this,function(f){var q=
+a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),x=atob(k.substring(r+1)),y=mxUtils.parseXml(x),x=y.getElementsByTagName("svg");if(0<x.length){var x=x[0],A=z?null:x.getAttribute("content");null!=A&&("\x3c"!=A.charAt(0)&&"%"!=A.charAt(0))&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null!=A&&("\x3cmxfile "===
+A.substring(0,8)||"\x3cmxGraphModel "===A.substring(0,14))?G(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*C,c+f*C,0,0,q.name)})):G(f,mxUtils.bind(this,function(){try{if(k.substring(0,r+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],t=parseFloat(g.getAttribute("width")),u=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox","0 0 "+t+" "+u);else if(isNaN(t)||isNaN(u)){var s=v.split(" ");3<s.length&&(t=
+parseFloat(s[2]),u=parseFloat(s[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var z=Math.min(1,Math.min(d/Math.max(1,t)),d/Math.max(1,u));return e(k,q.type,b+f*C,c+f*C,Math.max(1,Math.round(t*z)),Math.max(1,Math.round(u*z)),q.name)}}}catch(x){}return null}))}}else{x=!1;if("image/png"==q.type){var B=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var F=new Image;F.src=a.target.result;G(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*C,c+f*C,F.width,F.height,
+q.name)}));x=!0}}x||(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,k,v){G(f,mxUtils.bind(this,function(){if(null!=
+g&&g.length<t){var r=!u||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/v));return e(g,q.type,b+f*C,c+f*C,Math.round(k*r),Math.round(v*r),q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,d,v)})))}else e(a.target.result,q.type,b+f*C,c+f*C,240,160,q.name,function(a){G(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*C,c+f*C,240,160,q.name,function(a){G(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):
+r.readAsText(q)})(F)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
+f))try{var u=Math.max(g/e,q/e);if(1<u){var t=Math.round(g/u),v=Math.round(q/u),z=document.createElement("canvas");z.width=t;z.height=v;z.getContext("2d").drawImage(a,0,0,t,v);var x=z.toDataURL();if(x.length<b.length){var y=document.createElement("canvas");y.width=t;y.height=v;var C=y.toDataURL();x!==C&&(b=x,g=t,q=v)}}}catch(A){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var f=c,d=0;8>d;d++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[c]=f;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=q;q+=b;return a.substring(c,q)}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 q=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,q);do{var u=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);u=4294967295;u=this.updateCRC(u,b,0,4);u=this.updateCRC(u,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((u^4294967295)>>24&255,(u^4294967295)>>
+16&255,(u^4294967295)>>8&255,(u^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+u);d=f(a,u);f(a,4)}while(u);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 b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};
+this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,
+c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";
+f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=
+a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
+"\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,e,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
+this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){e=document.getElementById("geFooter");
+null!=e&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),e.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var u=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:u.apply(this,arguments)}}e=document.getElementById("geInfo");
+null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var t=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=t&&(t.parentNode.removeChild(t),t=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==t&&(!mxClient.IS_IE||10<document.documentMode))t=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=t&&(t.parentNode.removeChild(t),t=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,n=e.getElementsByTagName("img");null!=n&&1==n.length?(c=n[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),
+e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,
+f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),u=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(u)&&(e=!0,d=u)}catch(t){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),
+c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],
+"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):
+this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&
+(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+
+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=
+mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
+[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-
+4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=
+d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(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=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){!this.editor.modified||"0"==urlParams.modified?this.editor.setStatus(""):null!=urlParams.modified&&this.editor.setStatus(mxResources.get(urlParams.modified))});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function t(a){if(null!=
-a&&"function"===typeof a.charAt&&"\x3c"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var u=f.data;if("json"==urlParams.proto){u=JSON.parse(u);if("dialog"==u.action){this.showError(null!=u.titleKey?mxResources.get(u.titleKey):u.title,null!=u.messageKey?mxResources.get(u.messageKey):
-u.message,null!=u.buttonKey?mxResources.get(u.buttonKey):u.button);null!=u.modified&&(this.editor.modified=u.modified);return}if("prompt"==u.action){var v=new FilenameDialog(this,u.defaultValue||"",null!=u.okKey?mxResources.get(u.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:u}),"*")},null!=u.titleKey?mxResources.get(u.titleKey):u.title);this.showDialog(v.container,300,80,!0,!1);v.init();return}if("draft"==u.action){v=null;v="data:image/png;base64,"==
-u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):t(u.xml);v=new DraftDialog(this,mxResources.get("draftFound",[u.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:u}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:u}),"*")}),u.editKey?mxResources.get(u.editKey):null,u.discardKey?mxResources.get(u.discardKey):null);this.showDialog(v.container,
-640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{v.init()}catch(r){g.postMessage(JSON.stringify({event:"draft",error:r.toString(),message:u}),"*")}return}if("template"==u.action){v=new NewDialog(this,!1,null!=u.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=u.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));
-this.showDialog(v.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));v.init();return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxResources.get(u.messageKey)):null!=u.message&&this.editor.setStatus(u.message);null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var x=null!=u.messageKey?mxResources.get(u.messageKey):u.message;null!=u.show&&!u.show?this.spinner.stop():this.spinner.spin(document.body,x);return}if("export"==
-u.action){if("png"==u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin)){var y=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=u.format;b.xml=encodeURIComponent(y);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var z=
-this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var z=this.createTemporaryGraph(z.getStylesheet()),B=z.getGlobalVariable,F=this.pages[0];z.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:B.apply(this,arguments)};document.body.appendChild(z.container);z.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==u.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(y))));
-z!=this.editor.graph&&z.container.parentNode.removeChild(z.container);C(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,z)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==u.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(y)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&C(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
-u.xml&&0<u.xml.length&&this.setFileData(u.xml);x=this.createLoadMessage("export");if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))v=this.getXmlFileData(),x.xml=mxUtils.getXml(v),x.data=this.getFileData(null,null,!0,null,null,null,v),x.format=u.format;else if("html"==u.format)y=this.editor.getGraphXml(),x.data=this.getHtml(y,this.editor.graph),x.xml=mxUtils.getXml(y),x.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;v=this.editor.graph.background;
-v==mxConstants.NONE&&(v=null);x.xml=this.getFileData(!0);x.format="svg";if(u.embedImages||null==u.embedImages){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==u.format?this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(x),"*")})):this.convertImages(this.editor.graph.getSvg(v),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(x),"*")}));return}v="xmlsvg"==u.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(v));x.data=this.createSvgDataUri(v)}g.postMessage(JSON.stringify(x),"*")}return}if("load"==u.action)d=1==u.autosave,this.hideDialog(),null!=u.modified&&null==urlParams.modified&&(urlParams.modified=
-u.modified),null!=u.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=u.saveAndExit),null!=u.title&&null!=this.buttonContainer&&(v=document.createElement("span"),mxUtils.write(v,u.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(v)),u=null!=u.xmlpng?this.extractGraphModelFromPng(u.xmlpng):null!=
-u.xml&&"data:image/png;base64,"==u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):u.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage"}),"*");return}}u=t(u);c=!0;try{a(u,f)}catch(G){this.handleError(G)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var E=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=E();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=
-E();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
+scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){!this.editor.modified||"0"==urlParams.modified?this.editor.setStatus(""):null!=urlParams.modified&&this.editor.setStatus(mxResources.get(urlParams.modified))});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function u(a){if(null!=
+a&&"function"===typeof a.charAt&&"\x3c"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var t=f.data;if("json"==urlParams.proto){t=JSON.parse(t);if("dialog"==t.action){this.showError(null!=t.titleKey?mxResources.get(t.titleKey):t.title,null!=t.messageKey?mxResources.get(t.messageKey):
+t.message,null!=t.buttonKey?mxResources.get(t.buttonKey):t.button);null!=t.modified&&(this.editor.modified=t.modified);return}if("prompt"==t.action){var v=new FilenameDialog(this,t.defaultValue||"",null!=t.okKey?mxResources.get(t.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:t}),"*")},null!=t.titleKey?mxResources.get(t.titleKey):t.title);this.showDialog(v.container,300,80,!0,!1);v.init();return}if("draft"==t.action){v=null;v="data:image/png;base64,"==
+t.xml.substring(0,22)?this.extractGraphModelFromPng(t.xml):u(t.xml);v=new DraftDialog(this,mxResources.get("draftFound",[t.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:t}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:t}),"*")}),t.editKey?mxResources.get(t.editKey):null,t.discardKey?mxResources.get(t.discardKey):null);this.showDialog(v.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{v.init()}catch(r){g.postMessage(JSON.stringify({event:"draft",error:r.toString(),message:t}),"*")}return}if("template"==t.action){v=new NewDialog(this,!1,null!=t.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=t.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));
+this.showDialog(v.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));v.init();return}if("status"==t.action){null!=t.messageKey?this.editor.setStatus(mxResources.get(t.messageKey)):null!=t.message&&this.editor.setStatus(t.message);null!=t.modified&&(this.editor.modified=t.modified);return}if("spinner"==t.action){var x=null!=t.messageKey?mxResources.get(t.messageKey):t.message;null!=t.show&&!t.show?this.spinner.stop():this.spinner.spin(document.body,x);return}if("export"==
+t.action){if("png"==t.format||"xmlpng"==t.format){if(null==t.spin&&null==t.spinKey||this.spinner.spin(document.body,null!=t.spinKey?mxResources.get(t.spinKey):t.spin)){var y=null!=t.xml?t.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=t.format;b.xml=encodeURIComponent(y);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var A=
+this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var A=this.createTemporaryGraph(A.getStylesheet()),B=A.getGlobalVariable,E=this.pages[0];A.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:B.apply(this,arguments)};document.body.appendChild(A.container);A.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==t.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(y))));
+A!=this.editor.graph&&A.container.parentNode.removeChild(A.container);C(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,A)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==t.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(y)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&C(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
+t.xml&&0<t.xml.length&&this.setFileData(t.xml);x=this.createLoadMessage("export");if("html2"==t.format||"html"==t.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))v=this.getXmlFileData(),x.xml=mxUtils.getXml(v),x.data=this.getFileData(null,null,!0,null,null,null,v),x.format=t.format;else if("html"==t.format)y=this.editor.getGraphXml(),x.data=this.getHtml(y,this.editor.graph),x.xml=mxUtils.getXml(y),x.format=t.format;else{mxSvgCanvas2D.prototype.foAltText=null;v=this.editor.graph.background;
+v==mxConstants.NONE&&(v=null);x.xml=this.getFileData(!0);x.format="svg";if(t.embedImages||null==t.embedImages){if(null==t.spin&&null==t.spinKey||this.spinner.spin(document.body,null!=t.spinKey?mxResources.get(t.spinKey):t.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==t.format?this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(x),"*")})):this.convertImages(this.editor.graph.getSvg(v),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(x),"*")}));return}v="xmlsvg"==t.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(v));x.data=this.createSvgDataUri(v)}g.postMessage(JSON.stringify(x),"*")}return}if("load"==t.action)d=1==t.autosave,this.hideDialog(),null!=t.modified&&null==urlParams.modified&&(urlParams.modified=
+t.modified),null!=t.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=t.saveAndExit),null!=t.title&&null!=this.buttonContainer&&(v=document.createElement("span"),mxUtils.write(v,t.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(v)),t=null!=t.xmlpng?this.extractGraphModelFromPng(t.xmlpng):null!=
+t.xml&&"data:image/png;base64,"==t.xml.substring(0,22)?this.extractGraphModelFromPng(t.xml):t.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage"}),"*");return}}t=u(t);c=!0;try{a(t,f)}catch(G){this.handleError(G)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=F();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=
+F();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};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.setAttribute("title",mxResources.get("save")+" (Ctrl+S)");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.setAttribute("title",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.setAttribute("title",mxResources.get("exit"));
@@ -7673,8 +7674,8 @@ a=function(a,b,c){var d;d=4-b;a<<=6*d;for(b=2;b>=d;)c.push(String.fromCharCode(a
e+=1,4===e&&(a(c,e,g),c=e=0);return 0<e&&a(c,e,g),g.join("")}}(),function(){var a,b,c,d,e,f,g,k,l;if(m.Util.hmac=function(b,d){return a(c(k(b),k(d),b.length,d.length))},m.Util.sha1=function(b){return a(d(k(b),b.length))},m.Util.sha256=function(b){return a(e(k(b),b.length))},m.Env.require)try{b=m.Env.require("crypto"),b.createHmac&&b.createHash&&(m.Util.hmac=function(a,c){var d;return d=b.createHmac("sha1",c),d.update(a),d.digest("base64")},m.Util.sha1=function(a){var c;return c=b.createHash("sha1"),
c.update(a),c.digest("base64")},m.Util.sha256=function(a){var c;return c=b.createHash("sha256"),c.update(a),c.digest("base64")})}catch(n){}return c=function(a,b,c,e){var f,g,k,l;return 16<b.length&&(b=d(b,e)),k=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(909522486^b[g]);return c}(),l=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(1549556828^b[g]);return c}(),f=d(k.concat(a),64+c),d(l.concat(f),84)},d=function(a,b){var c,d,e,f,g,k,l,n,m,p,q,t,u,r,s,v,x;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>
6<<4)+15]=b<<3;s=Array(80);c=1732584193;e=4023233417;g=2562383102;l=271733878;m=3285377520;q=0;for(u=a.length;u>q;){d=c;f=e;k=g;n=l;p=m;for(t=x=0;80>x;t=++x)16>t?s[t]=0|a[q+t<<2>>2]:(r=(0|s[t-3<<2>>2])^(0|s[t-8<<2>>2])^(0|s[t-14<<2>>2])^(0|s[t-16<<2>>2]),s[t]=r<<1|r>>>31),v=((c<<5|c>>>27)+m|0)+s[t<<2>>2]|0,v=20>t?v+((e&g|~e&l)+1518500249|0)|0:40>t?v+((e^g^l)+1859775393|0)|0:60>t?v+((e&g|e&l|g&l)-1894007588)|0:v+((e^g^l)-899497514|0)|0,m=l,l=g,g=e<<30|e>>>2,e=c,c=v;c=d+c|0;e=f+e|0;g=k+g|0;l=n+l|0;
-m=p+m|0;q=q+16|0}return[c,e,g,l,m]},e=function(a,b){var c,d,e,k,l,n,m,p,q,t,u,r,s,v,x,A,z,B,F,X,aa,W,R,ga,ca,$,fa,ia,ba,ka;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>6<<4)+15]=b<<3;ba=Array(80);c=f[0];e=f[1];l=f[2];p=f[3];t=f[4];r=f[5];v=f[6];X=f[7];W=0;for(ga=a.length;ga>W;){d=c;k=e;n=l;q=p;u=t;s=r;x=v;aa=X;for(R=ka=0;64>ka;R=++ka)16>R?ia=ba[R]=0|a[W+R<<2>>2]:(z=0|ba[R-15<<2>>2],A=(z<<25|z>>>7)^(z<<14|z>>>18)^z>>>3,F=0|ba[R-2<<2>>2],B=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10,ia=ba[R]=(A+(0|ba[R-7<<2>>2])|0)+
-(B+(0|ba[R-16<<2>>2])|0)|0),m=t&r^~t&v,ca=c&e^c&l^e&l,$=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),fa=(t<<26|t>>>6)^(t<<21|t>>>11)^(t<<7|t>>>25),m=((X+fa|0)+(m+ia|0)|0)+(0|g[R<<2>>2])|0,ca=$+ca|0,X=v,v=r,r=t,t=p+m|0,p=l,l=e,e=c,c=m+ca|0;c=d+c|0;e=k+e|0;l=n+l|0;p=q+p|0;t=u+t|0;r=s+r|0;v=x+v|0;X=aa+X|0;W+=16}return[c,e,l,p,t,r,v,X]},f=[],g=[],function(){var a,b,c,d,e,k,l;b=function(a){return 4294967296*(a-Math.floor(a))|0};e=2;l=[];for(c=k=0;64>k;c=++k){for(;;){d=!0;for(a=2;e>=a*a;){if(0===e%a){d=
+m=p+m|0;q=q+16|0}return[c,e,g,l,m]},e=function(a,b){var c,d,e,k,l,n,m,p,q,t,u,r,s,v,x,z,A,B,E,X,aa,V,R,ga,ca,Z,ea,ia,ba,ka;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>6<<4)+15]=b<<3;ba=Array(80);c=f[0];e=f[1];l=f[2];p=f[3];t=f[4];r=f[5];v=f[6];X=f[7];V=0;for(ga=a.length;ga>V;){d=c;k=e;n=l;q=p;u=t;s=r;x=v;aa=X;for(R=ka=0;64>ka;R=++ka)16>R?ia=ba[R]=0|a[V+R<<2>>2]:(A=0|ba[R-15<<2>>2],z=(A<<25|A>>>7)^(A<<14|A>>>18)^A>>>3,E=0|ba[R-2<<2>>2],B=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10,ia=ba[R]=(z+(0|ba[R-7<<2>>2])|0)+
+(B+(0|ba[R-16<<2>>2])|0)|0),m=t&r^~t&v,ca=c&e^c&l^e&l,Z=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),ea=(t<<26|t>>>6)^(t<<21|t>>>11)^(t<<7|t>>>25),m=((X+ea|0)+(m+ia|0)|0)+(0|g[R<<2>>2])|0,ca=Z+ca|0,X=v,v=r,r=t,t=p+m|0,p=l,l=e,e=c,c=m+ca|0;c=d+c|0;e=k+e|0;l=n+l|0;p=q+p|0;t=u+t|0;r=s+r|0;v=x+v|0;X=aa+X|0;V+=16}return[c,e,l,p,t,r,v,X]},f=[],g=[],function(){var a,b,c,d,e,k,l;b=function(a){return 4294967296*(a-Math.floor(a))|0};e=2;l=[];for(c=k=0;64>k;c=++k){for(;;){d=!0;for(a=2;e>=a*a;){if(0===e%a){d=
!1;break}a+=1}if(d)break;e+=1}8>c&&(f[c]=b(Math.pow(e,0.5)));g[c]=b(Math.pow(e,1/3));l.push(e+=1)}return l}(),a=function(a){var b,c,d,e,f;e="";b=0;for(d=4*a.length;d>b;)c=b,f=(a[c>>2]>>(3-(3&c)<<3)&255)<<16,c+=1,f|=(a[c>>2]>>(3-(3&c)<<3)&255)<<8,c+=1,f|=a[c>>2]>>(3-(3&c)<<3)&255,e+=l[f>>18&63],e+=l[f>>12&63],b+=1,e+=b>=d?"\x3d":l[f>>6&63],b+=1,e+=b>=d?"\x3d":l[63&f],b+=1;return e},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=function(a){var b,c,d,e;b=[];c=d=0;for(e=a.length;0<=
e?e>d:d>e;c=0<=e?++d:--d)b[c>>2]|=(a.charCodeAt(c)&255)<<(3-(3&c)<<3);return b}}(),m.Util.Oauth=function(){function a(b){this._loaded=this._appHash=this._error=this._tokenKid=this._tokenKey=this._token=this._authCode=this._stateParam=this._secret=this._id=null;this.setCredentials(b)}return a.prototype.setCredentials=function(a){if(a.key)this._id=a.key;else{if(!a.token)throw Error("No API key supplied");this._id=null}return this._secret=a.secret||null,this._appHash=null,this._error=null,this._loaded=
!0,this.reset(),a.token?(this._token=a.token,a.tokenKey&&(this._tokenKey=a.tokenKey,this._tokenKid=a.tokenKid)):a.oauthCode?this._authCode=a.oauthCode:a.oauthStateParam&&(this._stateParam=a.oauthStateParam),this},a.prototype.credentials=function(){var a;return a={},this._id&&(a.key=this._id),this._secret&&(a.secret=this._secret),null!==this._token?(a.token=this._token,this._tokenKey&&(a.tokenKey=this._tokenKey,a.tokenKid=this._tokenKid)):null!==this._authCode?a.oauthCode=this._authCode:null!==this._stateParam&&
@@ -8052,11 +8053,11 @@ App.prototype.loadFile=function(a,c,f){this.hideDialog();var d=mxUtils.bind(this
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else null!=f?(this.spinner.stop(),this.fileLoaded(f)):(b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)&&(b=this.oneDrive),a=decodeURIComponent(a.substring(1)),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=
a.getHash()}))})))});null==a||0==a.length?(this.editor.setStatus(""),this.fileLoaded(null)):null!=this.getCurrentFile()&&!this.isDiagramEmpty()&&!c?window.openWindow(this.getUrl()+"#"+a,null,d):d()};
-App.prototype.getLibraryStorageHint=function(a){var c="";a.constructor!=LocalLibrary&&(c+=a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,1);if("L"==
-c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(f){a(b)}}else if("U"==c){var n=decodeURIComponent(b.substring(1));this.isOffline()||mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(n),mxUtils.bind(this,function(c){if(200==c.getStatus())try{this.loadLibrary(new UrlLibrary(this,c.getText(),
-n)),delete this.pendingLibraries[b]}catch(d){a(b)}else a(b)}),function(){a(b)})}else{var m=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(m=this.drive):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==c&&(null!=this.oneDrive&&null!=this.oneDrive.getUser())&&(m=this.oneDrive);null!=m&&m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(d){a(b)}}),function(c){a(b)})}}})(b)}});
-c(mxSettings.getCustomLibraries());c((urlParams.clibs||"").split(";"))}};
+App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,
+1);if("L"==c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(f){a(b)}}else if("U"==c){var n=decodeURIComponent(b.substring(1));this.isOffline()||mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(n),mxUtils.bind(this,function(c){if(200==c.getStatus())try{this.loadLibrary(new UrlLibrary(this,
+c.getText(),n)),delete this.pendingLibraries[b]}catch(d){a(b)}else a(b)}),function(){a(b)})}else{var m=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(m=this.drive):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==c&&(null!=this.oneDrive&&null!=this.oneDrive.getUser())&&(m=this.oneDrive);null!=m?m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(d){a(b)}}),function(c){a(b)}):
+delete this.pendingLibraries[b]}}})(b)}});c(mxSettings.getCustomLibraries());c((urlParams.clibs||"").split(";"))}};
App.prototype.exportImage=function(a,c,f,d,b){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();f=null!=f?f:e;try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,b?this.getFileData(!0,null,null,null,f):null)}catch(c){"Invalid image"==c.message?this.downloadFile("png"):this.handleError(c)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,f,a||1,c,d)}catch(g){this.spinner.stop(),
this.handleError(g)}}};
EditorUi.prototype.exportSvg=function(a,c,f,d,b,e){var g=this.editor.graph.isSelectionEmpty();f=null!=f?f:g;g=c?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&!1==c&&(g="#ffffff");var k=this.editor.graph.getSvg(g,a,null,null,null,f);d&&this.editor.addSvgShadow(k);a=this.getCurrentFile();var l=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=l.lastIndexOf(".");0<a&&(l=l.substring(0,a));l+=".svg";if(this.spinner.spin(document.body,mxResources.get("export"))){var n=mxUtils.bind(this,
diff --git a/war/js/atlas-viewer.min.js b/war/js/atlas-viewer.min.js
index 9ce7b7b3..45f9e0df 100644
--- a/war/js/atlas-viewer.min.js
+++ b/war/js/atlas-viewer.min.js
@@ -43,19 +43,19 @@ this.l);c!==this.o&&a.push("#",this.o);return a.join("")};g.prototype.T=function
function(){return this.h&&decodeURIComponent(this.h)};g.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=c};g.prototype.$=function(){return c!==this.h};g.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};g.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=c};g.prototype.O=function(a){this.l=a?a:c};g.prototype.aa=function(){return c!==this.l};g.prototype.ba=function(a){if("object"===typeof a&&
!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="\x26",e&&b.push("\x3d",encodeURIComponent(e.toString()));this.l=b.join("")};g.prototype.fa=function(a){this.o=a?a:c};g.prototype.Z=function(){return c!==this.o};var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
p=/[#\/\?@]/g,r=/[\#\?]/g;g.parse=a;g.create=function(a,e,f,k,l,n,m){a=new g(b(a,p),b(e,p),"string"==typeof f?encodeURIComponent(f):c,0<k?k.toString():c,b(l,r),c,"string"==typeof m?encodeURIComponent(m):c);n&&("string"===typeof n?a.O(n.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):a.ba(n));return a};g.N=f;g.ma=e;g.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},N:function(b,c){return b?f(a(b),a(c)).toString():""+c}};return g}();"undefined"!==typeof window&&(window.URI=
-n);var m=a,p=a,r=a,s=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(C,g)+'")':'url("about:blank")'}function g(a){return E[a]}function k(a,b){return a?n.ha.N(a,b):b}function t(a,b,d){if(!d)return c;var e=(""+a).match(D);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function z(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var C=/[\n\f\r\"\'()*<>]/g,E={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function S(b,c,d,g,n){b=z(b);var m=f[b];if(!m||"object"!==typeof m)c.length=0;else{for(var p=m.cssPropBits,r=p&80,q=p&1536,s=NaN,G=0,u=0;G<c.length;++G){var D=c[G].toLowerCase(),F=D.charCodeAt(0),H,A,E,C,P,ha;if(32===F)D="";else if(34===F)D=16===r?d?e(t(k(g,l(c[G].substring(1,D.length-1))),b,d)):"":p&8&&!(r&r-1)?D:"";else if("inherit"!==D){if(P=m.cssLitGroup){var ea;if(!(ea=m.cssLitMap)){ea=
-{};for(var V=P.length;0<=--V;)for(var ga=P[V],ka=ga.length;0<=--ka;)ea[ga[ka]]=a;ea=m.cssLitMap=ea}P=ea}else P=a;if(!(ha=P,ha[z(D)]===a))if(35===F&&/^#(?:[0-9a-f]{3}){1,2}$/.test(D))D=p&2?D:"";else if(48<=F&&57>=F)D=p&1?D:"";else if(H=D.charCodeAt(1),A=D.charCodeAt(2),E=48<=H&&57>=H,C=48<=A&&57>=A,43===F&&(E||46===H&&C))D=p&1?(E?"":"0")+D.substring(1):"";else if(45===F&&(E||46===H&&C))D=p&4?(E?"-":"-0")+D.substring(1):p&1?"0":"";else if(46===F&&E)D=p&1?"0"+D:"";else if('url("'===D.substring(0,5))D=
-d&&p&16?e(t(k(g,c[G].substring(5,D.length-2)),b,d)):"";else if("("===D.charAt(D.length-1))a:{P=c;ea=G;D=1;V=ea+1;for(F=P.length;V<F&&D;)ga=P[V++],D+=")"===ga?-1:/^[^"']*\($/.test(ga);if(!D){D=P[ea].toLowerCase();F=z(D);P=P.splice(ea,V-ea,"");ea=m.cssFns;V=0;for(ga=ea.length;V<ga;++V)if(ea[V].substring(0,F.length)==F){P[0]=P[P.length-1]="";S(ea[V],P,d,g);D=D+P.join(" ")+")";break a}}D=""}else D=q&&/^-?[a-z_][\w\-]*$/.test(D)&&!/__$/.test(D)?n&&512===q?c[G]+n:1024===q&&f[D]&&"number"===typeof f[D].oa?
-D:"":/^\w+$/.test(D)&&64===r&&p&8?s+1===u?(c[s]=c[s].substring(0,c[s].length-1)+" "+D+'"',""):(s=u,'"'+D+'"'):""}D&&(c[u++]=D)}1===u&&'url("about:blank")'===c[0]&&(u=0);c.length=u}}}();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)$"),
-H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(a,e,f){function g(p,r){function q(c,f,g){var k,m,p,r,v,t=b;k="";if(c<f)if(v=a[c],"*"===v)++c,k=v;else if(/^[a-zA-Z]/.test(v)&&(m=n(v.toLowerCase(),[])))"tagName"in m&&(v=m.tagName),++c,k=v;for(r=p=m="";t&&c<f;++c)if(v=a[c],"#"===v.charAt(0))/^#_|__$|[^\w#:\-]/.test(v)?t=d:m+=v+l;else if("."===v)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(v=a[c])&&!/^_|__$/.test(v)?m+="."+v:t=d;else if(c+1<f&&"["===a[c]){++c;var D=a[c++].toLowerCase();v=u.m[k+"::"+D];v!==+v&&(v=u.m["*::"+
-D]);var F;e.ia?(F=e.ia(k,D),"string"!==typeof F&&(t=d,F=D),t&&v!==+v&&(v=u.d.NONE)):(F=D,v!==+v&&(t=d));var H=D="",x=d;/^[~^$*|]?=$/.test(a[c])&&(D=a[c++],H=a[c++],/^[0-9A-Za-z:_\-]+$/.test(H)?H='"'+H+'"':"]"===H&&(H='""',--c),/^"([^\"\\]|\\.)*"$/.test(H)||(t=d),(x="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=d);switch(v){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===D||"~\x3d"===D||"$\x3d"===D)&&'""'!=H&&!x?H='"'+H.substring(1,H.length-
-1)+l+'"':"|\x3d"===D||""===D||(t=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==D&&(t=d);break;default:t=d}t&&(p+="["+F.replace(/[^\w-]/g,"\\$\x26")+D+H+(x?" i]":"]"))}else if(c<f&&":"===a[c])if(v=a[++c],G.test(v))r+=":"+v;else break;else break;c!==f&&(t=d);t&&(c=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+g)&&s.push(c);return t}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var s=[],v=p,t=b,D=p;t&&D<r;++D){var F=a[D];if(H[F]===H||" "===F)q(v,D,F)?v=D+1:t=d}q(v,r,"")||(t=d);return t?(s.length&&(v=
-s.join(""),k!==c&&(v="."+k+" "+v),m.push(v)),b):!f||f(a.slice(p,r))}var k=e.na,l=e.L,n=e.Aa,m=[],p=0,r,q=0,s;for(r=0;r<a.length;++r)if(s=a[r],"("==s||"["==s?(++q,b):")"==s||"]"==s?(q&&--q,b):!(" "==a[r]&&(q||H[a[r-1]]===H||H[a[r+1]]===H)))a[p++]=a[r];a.length=p;p=a.length;for(r=q=0;r<p;++r)if(","===a[r]){if(!g(q,r))return c;q=r+1}return!g(q,p)?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,r,G,v,u){function D(){E=
-A.length&&A[A.length-1]===c}var F=a,H=u||[0],A=[],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 v){var l=s(b.slice(1));if("not all"!==l){++H[0];var m=[];F.push(m);var p=t(k(g,e(b[0])),function(a){var b=
-f(p,a.qa,n,r,G,v,H);--H[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;v(a,!!H[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;A.push(a)},endAtrule:function(){A.pop();E||F.push(";");D()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===A[A.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,"{")}A.push(c)},endRuleset:function(){A.pop();E||F.push("}");D()},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,r,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!H[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
+n);var m=a,p=a,r=a,s=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(D,g)+'")':'url("about:blank")'}function g(a){return E[a]}function k(a,b){return a?n.ha.N(a,b):b}function t(a,b,d){if(!d)return c;var e=(""+a).match(B);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function A(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var D=/[\n\f\r\"\'()*<>]/g,E={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},B=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function S(b,c,d,g,n){b=A(b);var m=f[b];if(!m||"object"!==typeof m)c.length=0;else{for(var p=m.cssPropBits,r=p&80,q=p&1536,s=NaN,G=0,u=0;G<c.length;++G){var B=c[G].toLowerCase(),F=B.charCodeAt(0),x,H,E,D,P,ha;if(32===F)B="";else if(34===F)B=16===r?d?e(t(k(g,l(c[G].substring(1,B.length-1))),b,d)):"":p&8&&!(r&r-1)?B:"";else if("inherit"!==B){if(P=m.cssLitGroup){var ea;if(!(ea=m.cssLitMap)){ea=
+{};for(var V=P.length;0<=--V;)for(var ga=P[V],ka=ga.length;0<=--ka;)ea[ga[ka]]=a;ea=m.cssLitMap=ea}P=ea}else P=a;if(!(ha=P,ha[A(B)]===a))if(35===F&&/^#(?:[0-9a-f]{3}){1,2}$/.test(B))B=p&2?B:"";else if(48<=F&&57>=F)B=p&1?B:"";else if(x=B.charCodeAt(1),H=B.charCodeAt(2),E=48<=x&&57>=x,D=48<=H&&57>=H,43===F&&(E||46===x&&D))B=p&1?(E?"":"0")+B.substring(1):"";else if(45===F&&(E||46===x&&D))B=p&4?(E?"-":"-0")+B.substring(1):p&1?"0":"";else if(46===F&&E)B=p&1?"0"+B:"";else if('url("'===B.substring(0,5))B=
+d&&p&16?e(t(k(g,c[G].substring(5,B.length-2)),b,d)):"";else if("("===B.charAt(B.length-1))a:{P=c;ea=G;B=1;V=ea+1;for(F=P.length;V<F&&B;)ga=P[V++],B+=")"===ga?-1:/^[^"']*\($/.test(ga);if(!B){B=P[ea].toLowerCase();F=A(B);P=P.splice(ea,V-ea,"");ea=m.cssFns;V=0;for(ga=ea.length;V<ga;++V)if(ea[V].substring(0,F.length)==F){P[0]=P[P.length-1]="";S(ea[V],P,d,g);B=B+P.join(" ")+")";break a}}B=""}else B=q&&/^-?[a-z_][\w\-]*$/.test(B)&&!/__$/.test(B)?n&&512===q?c[G]+n:1024===q&&f[B]&&"number"===typeof f[B].oa?
+B:"":/^\w+$/.test(B)&&64===r&&p&8?s+1===u?(c[s]=c[s].substring(0,c[s].length-1)+" "+B+'"',""):(s=u,'"'+B+'"'):""}B&&(c[u++]=B)}1===u&&'url("about:blank")'===c[0]&&(u=0);c.length=u}}}();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)$"),
+H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(a,e,f){function g(p,r){function q(c,f,g){var k,m,p,r,t,B=b;k="";if(c<f)if(t=a[c],"*"===t)++c,k=t;else if(/^[a-zA-Z]/.test(t)&&(m=n(t.toLowerCase(),[])))"tagName"in m&&(t=m.tagName),++c,k=t;for(r=p=m="";B&&c<f;++c)if(t=a[c],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?B=d:m+=t+l;else if("."===t)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(t=a[c])&&!/^_|__$/.test(t)?m+="."+t:B=d;else if(c+1<f&&"["===a[c]){++c;var v=a[c++].toLowerCase();t=u.m[k+"::"+v];t!==+t&&(t=u.m["*::"+
+v]);var F;e.ia?(F=e.ia(k,v),"string"!==typeof F&&(B=d,F=v),B&&t!==+t&&(t=u.d.NONE)):(F=v,t!==+t&&(B=d));var x=v="",H=d;/^[~^$*|]?=$/.test(a[c])&&(v=a[c++],x=a[c++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--c),/^"([^\"\\]|\\.)*"$/.test(x)||(B=d),(H="i"===a[c])&&++c);"]"!==a[c]&&(++c,B=d);switch(t){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===v||"~\x3d"===v||"$\x3d"===v)&&'""'!=x&&!H?x='"'+x.substring(1,x.length-
+1)+l+'"':"|\x3d"===v||""===v||(B=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==v&&(B=d);break;default:B=d}B&&(p+="["+F.replace(/[^\w-]/g,"\\$\x26")+v+x+(H?" i]":"]"))}else if(c<f&&":"===a[c])if(t=a[++c],G.test(t))r+=":"+t;else break;else break;c!==f&&(B=d);B&&(c=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+g)&&s.push(c);return B}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var s=[],t=p,B=b,v=p;B&&v<r;++v){var F=a[v];if(H[F]===H||" "===F)q(t,v,F)?t=v+1:B=d}q(t,r,"")||(B=d);return B?(s.length&&(t=
+s.join(""),k!==c&&(t="."+k+" "+t),m.push(t)),b):!f||f(a.slice(p,r))}var k=e.na,l=e.L,n=e.Aa,m=[],p=0,r,q=0,s;for(r=0;r<a.length;++r)if(s=a[r],"("==s||"["==s?(++q,b):")"==s||"]"==s?(q&&--q,b):!(" "==a[r]&&(q||H[a[r-1]]===H||H[a[r+1]]===H)))a[p++]=a[r];a.length=p;p=a.length;for(r=q=0;r<p;++r)if(","===a[r]){if(!g(q,r))return c;q=r+1}return!g(q,p)?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,r,G,u,B){function v(){E=
+H.length&&H[H.length-1]===c}var F=a,x=B||[0],H=[],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){++x[0];var m=[];F.push(m);var p=t(k(g,e(b[0])),function(a){var b=
+f(p,a.qa,n,r,G,u,x);--x[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;u(a,!!x[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;H.push(a)},endAtrule:function(){H.pop();E||F.push(";");v()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===H[H.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,"{")}H.push(c)},endRuleset:function(){H.pop();E||F.push("}");v()},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,r,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!x[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 p=[],r=0,q=b;q<m;++q)b=a[q]," "!==b&&(p[r++]=b);if(m<c){do{b=a[m];
@@ -82,17 +82,17 @@ time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"
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);e=function(e){function f(a,b){var c;if(L.hasOwnProperty(b))c=L[b];else{var d=b.match(I);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(aa))?String.fromCharCode(parseInt(d[1],
16)):J&&M.test(b)?(J.innerHTML="\x26"+b+";",d=J.textContent,L[b]=d):"\x26"+b+";"}return c}function g(a){return a.replace(R,f)}function k(a){return(""+a).replace($,"\x26amp;").replace(X,"\x26lt;").replace(Z,"\x26gt;").replace(T,"\x26#34;")}function l(a){return a.replace(Q,"\x26amp;$1").replace(X,"\x26lt;").replace(Z,"\x26gt;")}function m(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,e){var f,
g=/(<\/|<\!--|<[!?]|[&<>])/g;f=a+"";if(ha)f=f.split(g);else{for(var k=[],l=0,n;(n=g.exec(f))!==c;)k.push(f.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(f.substring(l));f=k}r(b,f,0,{r:d,C:d},e)}}function p(a,b,c,d,e){return function(){r(a,b,c,d,e)}}function r(a,c,d,f,g){try{a.H&&0==d&&a.H(g);for(var k,l,n,m=c.length;d<m;){var t=c[d++],u=c[d];switch(t){case "\x26":ca.test(u)?(a.e&&a.e("\x26"+u,g,V,p(a,c,d,f,g)),d++):a.e&&a.e("\x26amp;",g,V,p(a,c,d,f,g));break;case "\x3c/":if(k=/^([-\w:]+)[^\'\"]*/.exec(u))if(k[0].length===
-u.length&&"\x3e"===c[d+1])d+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,V,p(a,c,d,f,g));else{var B=c,D=d,P=a,A=g,x=V,H=f,y=s(B,D);y?(P.t&&P.t(y.name,A,x,p(P,B,D,H,A)),d=y.next):d=B.length}else a.e&&a.e("\x26lt;/",g,V,p(a,c,d,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(u))if(k[0].length===u.length&&"\x3e"===c[d+1]){d+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,V,p(a,c,d,f,g));var Y=e.f[n];Y&ea&&(d=q(c,{name:n,next:d,c:Y},a,g,V,f))}else{var B=c,D=a,P=g,A=V,x=f,L=s(B,d);L?(D.w&&D.w(L.name,L.R,P,A,p(D,
-B,L.next,x,P)),d=L.c&ea?q(B,L,D,P,A,x):L.next):d=B.length}else a.e&&a.e("\x26lt;",g,V,p(a,c,d,f,g));break;case "\x3c!--":if(!f.C){for(l=d+1;l<m&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<m){if(a.A){var C=c.slice(d,l).join("");a.A(C.substr(0,C.length-2),g,V,p(a,c,l+1,f,g))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",g,V,p(a,c,d,f,g));break;case "\x3c!":if(/^\w/.test(u)){if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",g,V,p(a,c,d,f,g))}else a.e&&a.e("\x26lt;!",
-g,V,p(a,c,d,f,g));break;case "\x3c?":if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",g,V,p(a,c,d,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,V,p(a,c,d,f,g));break;case "":break;default:a.e&&a.e(t,g,V,p(a,c,d,f,g))}}a.B&&a.B(g)}catch(I){if(I!==V)throw I;}}function q(a,b,c,d,f,g){var k=a.length;ga.hasOwnProperty(b.name)||(ga[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var n=ga[b.name],m=b.next,r=b.next+1;r<k&&!("\x3c/"===a[r-1]&&n.test(a[r]));r++);r<k&&
+u.length&&"\x3e"===c[d+1])d+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,V,p(a,c,d,f,g));else{var C=c,B=d,P=a,x=g,y=V,H=f,z=s(C,B);z?(P.t&&P.t(z.name,x,y,p(P,C,B,H,x)),d=z.next):d=C.length}else a.e&&a.e("\x26lt;/",g,V,p(a,c,d,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(u))if(k[0].length===u.length&&"\x3e"===c[d+1]){d+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,V,p(a,c,d,f,g));var Y=e.f[n];Y&ea&&(d=q(c,{name:n,next:d,c:Y},a,g,V,f))}else{var C=c,B=a,P=g,x=V,y=f,L=s(C,d);L?(B.w&&B.w(L.name,L.R,P,x,p(B,
+C,L.next,y,P)),d=L.c&ea?q(C,L,B,P,x,y):L.next):d=C.length}else a.e&&a.e("\x26lt;",g,V,p(a,c,d,f,g));break;case "\x3c!--":if(!f.C){for(l=d+1;l<m&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<m){if(a.A){var I=c.slice(d,l).join("");a.A(I.substr(0,I.length-2),g,V,p(a,c,l+1,f,g))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",g,V,p(a,c,d,f,g));break;case "\x3c!":if(/^\w/.test(u)){if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",g,V,p(a,c,d,f,g))}else a.e&&a.e("\x26lt;!",
+g,V,p(a,c,d,f,g));break;case "\x3c?":if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",g,V,p(a,c,d,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,V,p(a,c,d,f,g));break;case "":break;default:a.e&&a.e(t,g,V,p(a,c,d,f,g))}}a.B&&a.B(g)}catch(D){if(D!==V)throw D;}}function q(a,b,c,d,f,g){var k=a.length;ga.hasOwnProperty(b.name)||(ga[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var n=ga[b.name],m=b.next,r=b.next+1;r<k&&!("\x3c/"===a[r-1]&&n.test(a[r]));r++);r<k&&
(r-=1);k=a.slice(m,r).join("");if(b.c&e.c.CDATA)c.z&&c.z(k,d,f,p(c,a,r,g,d));else if(b.c&e.c.RCDATA)c.F&&c.F(l(k),d,f,p(c,a,r,g,d));else throw Error("bug");return r}function s(a,c){var f=/^([-\w:]+)/.exec(a[c]),k={};k.name=f[1].toLowerCase();k.c=e.f[k.name];for(var l=a[c].substr(f[0].length),n=c+1,m=a.length;n<m&&"\x3e"!==a[n];n++)l+=a[n];if(!(m<=n)){for(var p=[];""!==l;)if(f=P.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],r=d,l=[l,a[n++]];n<m;n++){if(r){if("\x3e"===a[n])break}else 0<=
-a[n].indexOf(f)&&(r=b);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var r=f[1].toLowerCase(),q;if(f[2]){q=f[3];var G=q.charCodeAt(0);if(34===G||39===G)q=q.substr(1,q.length-2);q=g(q.replace(N,""))}else q="";p.push(r,q);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=n+1;return k}}function t(b){function f(a,b){l||b.push(a)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,f,n){if(!l&&e.f.hasOwnProperty(d)){var m=e.f[d];if(!(m&e.c.FOLDABLE)){var p=b(d,
-f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=m);if(m&e.c.OPTIONAL_ENDTAG){var q=g[g.length-1];q&&q.D===d&&(q.v!==r||d!==r)&&n.push("\x3c/",q.v,"\x3e")}m&e.c.EMPTY||g.push({D:d,v:r});n.push("\x3c",r);d=0;for(q=f.length;d<q;d+=2){var s=f[d],G=f[d+1];G!==c&&G!==a&&n.push(" ",s,'\x3d"',k(G),'"')}n.push("\x3e");m&e.c.EMPTY&&!(p&e.c.EMPTY)&&
+a[n].indexOf(f)&&(r=b);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var r=f[1].toLowerCase(),q;if(f[2]){q=f[3];var t=q.charCodeAt(0);if(34===t||39===t)q=q.substr(1,q.length-2);q=g(q.replace(N,""))}else q="";p.push(r,q);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=n+1;return k}}function t(b){function f(a,b){l||b.push(a)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,f,n){if(!l&&e.f.hasOwnProperty(d)){var m=e.f[d];if(!(m&e.c.FOLDABLE)){var p=b(d,
+f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=m);if(m&e.c.OPTIONAL_ENDTAG){var q=g[g.length-1];q&&q.D===d&&(q.v!==r||d!==r)&&n.push("\x3c/",q.v,"\x3e")}m&e.c.EMPTY||g.push({D:d,v:r});n.push("\x3c",r);d=0;for(q=f.length;d<q;d+=2){var s=f[d],t=f[d+1];t!==c&&t!==a&&n.push(" ",s,'\x3d"',k(t),'"')}n.push("\x3e");m&e.c.EMPTY&&!(p&e.c.EMPTY)&&
n.push("\x3c/",r,"\x3e")}else l=!(m&e.c.EMPTY)}}},endTag:function(a,b){if(l)l=d;else if(e.f.hasOwnProperty(a)){var c=e.f[a];if(!(c&(e.c.EMPTY|e.c.FOLDABLE))){if(c&e.c.OPTIONAL_ENDTAG)for(c=g.length;0<=--c;){var f=g[c].D;if(f===a)break;if(!(e.f[f]&e.c.OPTIONAL_ENDTAG))return}else for(c=g.length;0<=--c&&g[c].D!==a;);if(!(0>c)){for(f=g.length;--f>c;){var k=g[f].v;e.f[k]&e.c.OPTIONAL_ENDTAG||b.push("\x3c/",k,"\x3e")}c<g.length&&(a=g[c].v);g.length=c;b.push("\x3c/",a,"\x3e")}}}},pcdata:f,rcdata:f,cdata:f,
endDoc:function(a){for(;g.length;g.length--)a.push("\x3c/",g[g.length-1].v,"\x3e")}})}function u(a,b,d,e,f){if(!f)return c;try{var g=n.parse(""+a);if(g&&(!g.K()||ka.test(g.W()))){var k=f(g,b,d,e);return k?k.toString():c}}catch(l){}return c}function K(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function S(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+
-c;if(a.hasOwnProperty(b))return a[b]}function W(b,d,f,g,k){for(var l=0;l<d.length;l+=2){var n=d[l],m=d[l+1],p=m,r=c,q;if((q=b+"::"+n,e.m.hasOwnProperty(q))||(q="*::"+n,e.m.hasOwnProperty(q)))r=e.m[q];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:m=c;k&&K(k,b,n,p,m);break;case e.d.STYLE:if("undefined"===typeof B){m=c;k&&K(k,b,n,p,m);break}var s=[];B(m,{declaration:function(a,b){var d=a.toLowerCase();Y(d,b,f?function(a){return u(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&s.push(d+
+c;if(a.hasOwnProperty(b))return a[b]}function W(b,d,f,g,k){for(var l=0;l<d.length;l+=2){var n=d[l],m=d[l+1],p=m,r=c,q;if((q=b+"::"+n,e.m.hasOwnProperty(q))||(q="*::"+n,e.m.hasOwnProperty(q)))r=e.m[q];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:m=c;k&&K(k,b,n,p,m);break;case e.d.STYLE:if("undefined"===typeof C){m=c;k&&K(k,b,n,p,m);break}var s=[];C(m,{declaration:function(a,b){var d=a.toLowerCase();Y(d,b,f?function(a){return u(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&s.push(d+
": "+b.join(" "))}});m=0<s.length?s.join(" ; "):c;k&&K(k,b,n,p,m);break;case e.d.ID:case e.d.IDREF:case e.d.IDREFS:case e.d.GLOBAL_NAME:case e.d.LOCAL_NAME:case e.d.CLASSES:m=g?g(m):m;k&&K(k,b,n,p,m);break;case e.d.URI:m=u(m,S(e.J,b,n),S(e.I,b,n),{TYPE:"MARKUP",XML_ATTR:n,XML_TAG:b},f);k&&K(k,b,n,p,m);break;case e.d.URI_FRAGMENT:m&&"#"===m.charAt(0)?(m=m.substring(1),m=g?g(m):m,m!==c&&m!==a&&(m="#"+m)):m=c;k&&K(k,b,n,p,m);break;default:m=c,k&&K(k,b,n,p,m)}else m=c,k&&K(k,b,n,p,m);d[l+1]=m}return d}
-function da(b,c,d){return function(f,g){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:W(f,g,b,c,d)}}}function U(a,b){var c=[];t(b)(a,c);return c.join("")}var B,Y;"undefined"!==typeof window&&(B=window.parseCssDeclarations,Y=window.sanitizeCssProperty);var L={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,aa=/^#x([0-9A-Fa-f]+)$/,M=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+function da(b,c,d){return function(f,g){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:W(f,g,b,c,d)}}}function U(a,b){var c=[];t(b)(a,c);return c.join("")}var C,Y;"undefined"!==typeof window&&(C=window.parseCssDeclarations,Y=window.sanitizeCssProperty);var L={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,aa=/^#x([0-9A-Fa-f]+)$/,M=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
c,N=/\0/g,R=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ca=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,$=/&/g,Q=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,X=/[<]/g,Z=/>/g,T=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ha=3==="a,b".split(/(,)/).length,ea=e.c.CDATA|e.c.RCDATA,V={},ga={},ka=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=t;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=da;ba.wa=ba.normalizeRCData=l;ba.xa=
ba.sanitize=function(a,b,c,d){return U(a,da(b,c,d))};ba.ya=ba.sanitizeAttribs=W;ba.za=ba.sanitizeWithPolicy=U;ba.Ba=ba.unescapeEntities=g;return ba}(u);g=e.sanitize;"undefined"!==typeof window&&(window.html=e,window.html_sanitize=g)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,b){var c="",d,e,f,g,k,l,n=0;for(null!=b&&b||(a=Base64._utf8_encode(a));n<a.length;)d=a.charCodeAt(n++),e=a.charCodeAt(n++),f=a.charCodeAt(n++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=
a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):
@@ -103,10 +103,10 @@ new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/defla
f.avail_out&&(f.output=new k.Buf8(n),f.next_out=0,f.avail_out=n),d=g.deflate(f,e),1!==d&&d!==r)return this.onEnd(d),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==e&&2!==e)||("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!==d);return 4===e?(d=g.deflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===r):2!==e||(this.onEnd(r),f.avail_out=0,!0)};e.prototype.onData=
function(b){this.chunks.push(b)};e.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=e;d.deflate=f;d.deflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.gzip=function(b,c){return c=c||{},c.gzip=!0,f(b,c)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(b,c,d){function e(b){if(!(this instanceof
e))return new e(b);var c=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},b||{});c.raw&&0<=c.windowBits&&16>c.windowBits&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||b&&b.windowBits||(c.windowBits+=32);15<c.windowBits&&48>c.windowBits&&0===(15&c.windowBits)&&(c.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;b=g.inflateInit2(this.strm,c.windowBits);if(b!==n.Z_OK)throw Error(m[b]);
-this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),n=b("./zlib/constants"),m=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),s=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,m,p,r,C=this.strm,E=this.options.chunkSize,D=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?n.Z_FINISH:n.Z_NO_FLUSH;
-"string"==typeof b?C.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?C.input=new Uint8Array(b):C.input=b;C.next_in=0;C.avail_in=C.input.length;do{if(0===C.avail_out&&(C.output=new k.Buf8(E),C.next_out=0,C.avail_out=E),d=g.inflate(C,n.Z_NO_FLUSH),d===n.Z_NEED_DICT&&D&&(r="string"==typeof D?l.string2buf(D):"[object ArrayBuffer]"===s.call(D)?new Uint8Array(D):D,d=g.inflateSetDictionary(this.strm,r)),d===n.Z_BUF_ERROR&&!0===F&&(d=n.Z_OK,F=!1),d!==n.Z_STREAM_END&&d!==n.Z_OK)return this.onEnd(d),
-this.ended=!0,!1;C.next_out&&(0!==C.avail_out&&d!==n.Z_STREAM_END&&(0!==C.avail_in||e!==n.Z_FINISH&&e!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(C.output,C.next_out),m=C.next_out-f,p=l.buf2string(C.output,f),C.next_out=m,C.avail_out=E-m,m&&k.arraySet(C.output,C.output,f,m,0),this.onData(p)):this.onData(k.shrinkBuf(C.output,C.next_out))));0===C.avail_in&&0===C.avail_out&&(F=!0)}while((0<C.avail_in||0===C.avail_out)&&d!==n.Z_STREAM_END);return d===n.Z_STREAM_END&&(e=n.Z_FINISH),
-e===n.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===n.Z_OK):e!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),C.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===n.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=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
+this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),n=b("./zlib/constants"),m=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),s=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,m,p,r,D=this.strm,E=this.options.chunkSize,B=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?n.Z_FINISH:n.Z_NO_FLUSH;
+"string"==typeof b?D.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?D.input=new Uint8Array(b):D.input=b;D.next_in=0;D.avail_in=D.input.length;do{if(0===D.avail_out&&(D.output=new k.Buf8(E),D.next_out=0,D.avail_out=E),d=g.inflate(D,n.Z_NO_FLUSH),d===n.Z_NEED_DICT&&B&&(r="string"==typeof B?l.string2buf(B):"[object ArrayBuffer]"===s.call(B)?new Uint8Array(B):B,d=g.inflateSetDictionary(this.strm,r)),d===n.Z_BUF_ERROR&&!0===F&&(d=n.Z_OK,F=!1),d!==n.Z_STREAM_END&&d!==n.Z_OK)return this.onEnd(d),
+this.ended=!0,!1;D.next_out&&(0!==D.avail_out&&d!==n.Z_STREAM_END&&(0!==D.avail_in||e!==n.Z_FINISH&&e!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(D.output,D.next_out),m=D.next_out-f,p=l.buf2string(D.output,f),D.next_out=m,D.avail_out=E-m,m&&k.arraySet(D.output,D.output,f,m,0),this.onData(p)):this.onData(k.shrinkBuf(D.output,D.next_out))));0===D.avail_in&&0===D.avail_out&&(F=!0)}while((0<D.avail_in||0===D.avail_out)&&d!==n.Z_STREAM_END);return d===n.Z_STREAM_END&&(e=n.Z_FINISH),
+e===n.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===n.Z_OK):e!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),D.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===n.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=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(b,c,d){b="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if("object"!=typeof d)throw new TypeError(d+"must be non-object");for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}}return b};d.shrinkBuf=function(b,c){return b.length===
c?b:b.subarray?b.subarray(0,c):(b.length=c,b)};var e={arraySet:function(b,c,d,e,f){if(c.subarray&&b.subarray)return void b.set(c.subarray(d,d+e),f);for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){var c,d,e,f,p;c=e=0;for(d=b.length;c<d;c++)e+=b[c].length;p=new Uint8Array(e);c=e=0;for(d=b.length;c<d;c++)f=b[c],p.set(f,e),e+=f.length;return p}},f={arraySet:function(b,c,d,e,f){for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(b){b?
(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,e)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,f))};d.setTyped(b)},{}],4:[function(b,c,d){function e(b,c){if(65537>c&&(b.subarray&&k||!b.subarray&&g))return String.fromCharCode.apply(null,f.shrinkBuf(b,c));for(var d="",e=0;e<c;e++)d+=String.fromCharCode(b[e]);return d}var f=b("./common"),g=!0,k=!0;try{String.fromCharCode.apply(null,[0])}catch(l){g=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){k=!1}var m=
@@ -114,76 +114,76 @@ new f.Buf8(256);for(b=0;256>b;b++)m[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=
d?(c[k++]=192|d>>>6,c[k++]=128|63&d):65536>d?(c[k++]=224|d>>>12,c[k++]=128|d>>>6&63,c[k++]=128|63&d):(c[k++]=240|d>>>18,c[k++]=128|d>>>12&63,c[k++]=128|d>>>6&63,c[k++]=128|63&d);return c};d.buf2binstring=function(b){return e(b,b.length)};d.binstring2buf=function(b){for(var c=new f.Buf8(b.length),d=0,e=c.length;d<e;d++)c[d]=b.charCodeAt(d);return c};d.buf2string=function(b,c){var d,f,g,k,l=c||b.length,n=Array(2*l);for(d=f=0;d<l;)if(g=b[d++],128>g)n[f++]=g;else if(k=m[g],4<k)n[f++]=65533,d+=k-1;else{for(g&=
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=D[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&&(x.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){z._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-R?b.strstart-(b.w_size-R):0,m=b.window,p=b.w_mask,r=b.prev,q=b.strstart+N,s=m[g+k-1],G=m[g+k];b.prev_length>=b.good_match&&
+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=B[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&&(y.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){A._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-R?b.strstart-(b.w_size-R):0,m=b.window,p=b.w_mask,r=b.prev,q=b.strstart+N,s=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]===s&&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<q);if(e=N-(q-g),g=q-N,e>k){if(b.match_start=c,k=e,e>=l)break;s=m[g+k-1];G=m[g+k]}}while((c=r[c&p])>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-R)){x.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,x.arraySet(e,c.input,c.next_in,l,k),1===c.state.wrap?c.adler=C(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)),
+g+(g-R)){y.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,y.arraySet(e,c.input,c.next_in,l,k),1===c.state.wrap?c.adler=D(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>=J){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+J-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<J)););}}while(b.lookahead<R&&0!==b.strm.avail_in)}function r(b,c){for(var d,e;;){if(b.lookahead<R){if(p(b),b.lookahead<R&&c===F)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<
-b.hash_shift^b.window[b.strstart+J-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-R&&(b.match_length=m(b,d)),b.match_length>=J)if(e=z._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=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 e=z._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function s(b,c){for(var d,e,f;;){if(b.lookahead<R){if(p(b),
+b.hash_shift^b.window[b.strstart+J-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-R&&(b.match_length=m(b,d)),b.match_length>=J)if(e=A._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=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 e=A._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function s(b,c){for(var d,e,f;;){if(b.lookahead<R){if(p(b),
b.lookahead<R&&c===F)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=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=J-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-R&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===S||b.match_length===J&&4096<b.strstart-b.match_start)&&(b.match_length=J-1)),b.prev_length>=
-J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=z._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);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+J-1])&b.hash_mask,d=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=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=z._tr_tally(b,0,
-b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(z._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=
+J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=A._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);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+J-1])&b.hash_mask,d=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=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=A._tr_tally(b,0,
+b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(A._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;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=U;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*aa);this.dyn_dtree=new x.Buf16(2*(2*L+1));this.bl_tree=new x.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(M+1);this.heap=new x.Buf16(2*Y+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*Y+1);f(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(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=da,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:$,b.adler=2===c.wrap?0:1,c.last_flush=F,z._tr_init(c),H):e(b,O)}function v(b){var c=u(b);c===H&&(b=b.state,b.window_size=2*b.w_size,f(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=J-1,b.match_available=0,b.ins_h=0);return c}function A(b,c,d,f,g,k){if(!b)return O;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>B||d!==U||8>f||15<f||0>c||9<c||0>k||k>W)return e(b,O);8===f&&(f=9);var n=new t;return b.state=n,n.strm=b,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+J-1)/J),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=c,n.strategy=k,n.method=d,v(b)}var y,x=b("../utils/common"),z=b("./trees"),C=b("./adler32"),E=b("./crc32"),D=b("./messages"),F=0,G=4,H=0,O=-2,K=-1,S=1,W=4,da=2,U=8,B=9,Y=286,L=30,I=19,aa=2*Y+1,M=15,J=3,N=258,R=N+J+1,ca=42,$=113,Q=1,X=2,Z=3,T=4;y=[new q(0,0,0,0,function(b,c){var d=
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new y.Buf16(2*aa);this.dyn_dtree=new y.Buf16(2*(2*L+1));this.bl_tree=new y.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new y.Buf16(M+1);this.heap=new y.Buf16(2*Y+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new y.Buf16(2*Y+1);f(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(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=da,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:$,b.adler=2===c.wrap?0:1,c.last_flush=F,A._tr_init(c),H):e(b,O)}function v(b){var c=u(b);c===H&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,k){if(!b)return O;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>C||d!==U||8>f||15<f||0>c||9<c||0>k||k>W)return e(b,O);8===f&&(f=9);var n=new t;return b.state=n,n.strm=b,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+J-1)/J),n.window=new y.Buf8(2*
+n.w_size),n.head=new y.Buf16(n.hash_size),n.prev=new y.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new y.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=c,n.strategy=k,n.method=d,v(b)}var z,y=b("../utils/common"),A=b("./trees"),D=b("./adler32"),E=b("./crc32"),B=b("./messages"),F=0,G=4,H=0,O=-2,K=-1,S=1,W=4,da=2,U=8,C=9,Y=286,L=30,I=19,aa=2*Y+1,M=15,J=3,N=258,R=N+J+1,ca=42,$=113,Q=1,X=2,Z=3,T=4;z=[new q(0,0,0,0,function(b,c){var d=
65535;for(d>b.pending_buf_size-5&&(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===F)return Q;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-R&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):(b.strstart>b.block_start&&k(b,!1),Q)}),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,c){return A(b,c,U,15,8,0)};d.deflateInit2=A;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?O:(b.state.gzhead=c,H):O};d.deflate=function(b,c){var d,m,r,q;if(!b||!b.state||5<c||0>c)return b?e(b,O):O;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||
+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,c){return x(b,c,U,15,8,0)};d.deflateInit2=x;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?O:(b.state.gzhead=c,H):O};d.deflate=function(b,c){var d,m,r,q;if(!b||!b.state||5<c||0>c)return b?e(b,O):O;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||
666===m.status&&c!==G)return e(b,0===b.avail_out?-5:O);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ca)2===m.wrap?(b.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&&(b.adler=E(b.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=$)):(r=U+(m.w_bits-8<<4)<<8,q=-1,q=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,r|=q<<6,0!==m.strstart&&(r|=32),m.status=$,n(m,r+(31-r%31)),0!==m.strstart&&(n(m,b.adler>>>16),n(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(r=m.pending;m.gzindex<(65535&
m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r)),g(b),r=m.pending,m.pending!==m.pending_buf_size));)l(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&
(b.adler=E(b.adler,m.pending_buf,m.pending-r,r)),g(b),r=m.pending,m.pending===m.pending_buf_size)){q=1;break}q=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;l(m,q)}while(0!==q);m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r));0===q&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r)),g(b),
r=m.pending,m.pending===m.pending_buf_size)){q=1;break}q=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;l(m,q)}while(0!==q);m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r));0===q&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(l(m,255&b.adler),l(m,b.adler>>8&255),b.adler=0,m.status=$)):m.status=$),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=
--1,H}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==F&&666!==m.status){var s;if(2===m.strategy)a:{for(var B;;){if(0===m.lookahead&&(p(m),0===m.lookahead)){if(c===F){s=Q;break a}break}if(m.match_length=0,B=z._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,B&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&
-(k(m,!1),0===m.strm.avail_out)?Q:X)}else if(3===m.strategy)a:{var t,v;for(B=m.window;;){if(m.lookahead<=N){if(p(m),m.lookahead<=N&&c===F){s=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=J&&0<m.strstart&&(v=m.strstart-1,t=B[v],t===B[++v]&&t===B[++v]&&t===B[++v])){d=m.strstart+N;do;while(t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&v<d);m.match_length=N-(d-v);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
-J?(s=z._tr_tally(m,1,m.match_length-J),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(s=z._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),s&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?Q:X)}else s=y[m.level].func(m,c);if(s!==Z&&s!==T||(m.status=666),s===Q||s===Z)return 0===b.avail_out&&(m.last_flush=-1),H;if(s===X&&(1===c?z._tr_align(m):5!==c&&(z._tr_stored_block(m,
+-1,H}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==F&&666!==m.status){var s;if(2===m.strategy)a:{for(var C;;){if(0===m.lookahead&&(p(m),0===m.lookahead)){if(c===F){s=Q;break a}break}if(m.match_length=0,C=A._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,C&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&
+(k(m,!1),0===m.strm.avail_out)?Q:X)}else if(3===m.strategy)a:{var t,B;for(C=m.window;;){if(m.lookahead<=N){if(p(m),m.lookahead<=N&&c===F){s=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=J&&0<m.strstart&&(B=m.strstart-1,t=C[B],t===C[++B]&&t===C[++B]&&t===C[++B])){d=m.strstart+N;do;while(t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&B<d);m.match_length=N-(d-B);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
+J?(s=A._tr_tally(m,1,m.match_length-J),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(s=A._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),s&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?Q:X)}else s=z[m.level].func(m,c);if(s!==Z&&s!==T||(m.status=666),s===Q||s===Z)return 0===b.avail_out&&(m.last_flush=-1),H;if(s===X&&(1===c?A._tr_align(m):5!==c&&(A._tr_stored_block(m,
0,0,!1),3===c&&(f(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(b),0===b.avail_out))return m.last_flush=-1,H}return c!==G?H:0>=m.wrap?1:(2===m.wrap?(l(m,255&b.adler),l(m,b.adler>>8&255),l(m,b.adler>>16&255),l(m,b.adler>>24&255),l(m,255&b.total_in),l(m,b.total_in>>8&255),l(m,b.total_in>>16&255),l(m,b.total_in>>24&255)):(n(m,b.adler>>>16),n(m,65535&b.adler)),g(b),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?H:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,
-c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==$&&666!==c?e(b,O):(b.state=null,c===$?e(b,-3):H)):O};d.deflateSetDictionary=function(b,c){var d,e,g,k,l,n,m;e=c.length;if(!b||!b.state||(d=b.state,k=d.wrap,2===k||1===k&&d.status!==ca||d.lookahead))return O;1===k&&(b.adler=C(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===k&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new x.Buf8(d.w_size),x.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=e;b.next_in=
+c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==$&&666!==c?e(b,O):(b.state=null,c===$?e(b,-3):H)):O};d.deflateSetDictionary=function(b,c){var d,e,g,k,l,n,m;e=c.length;if(!b||!b.state||(d=b.state,k=d.wrap,2===k||1===k&&d.status!==ca||d.lookahead))return O;1===k&&(b.adler=D(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===k&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new y.Buf8(d.w_size),y.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=e;b.next_in=
0;b.input=c;for(p(d);d.lookahead>=J;){e=d.strstart;g=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=n,b.input=m,b.avail_in=l,d.wrap=k,H};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
-"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.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(b,c,d){c.exports=function(b,c){var d,k,l,n,m,p,r,s,q,t,u,v,A,y,x,z,C,E,D,F,G,H,O,K;d=b.state;k=b.next_in;O=b.input;l=k+(b.avail_in-5);n=b.next_out;K=b.output;m=n-(c-b.avail_out);p=n+(b.avail_out-257);r=d.dmax;s=d.wsize;q=d.whave;t=d.wnext;u=d.window;v=d.hold;A=d.bits;y=d.lencode;
-x=d.distcode;z=(1<<d.lenbits)-1;C=(1<<d.distbits)-1;a:do{15>A&&(v+=O[k++]<<A,A+=8,v+=O[k++]<<A,A+=8);E=y[v&z];b:for(;;){if(D=E>>>24,v>>>=D,A-=D,D=E>>>16&255,0===D)K[n++]=65535&E;else{if(!(16&D)){if(0===(64&D)){E=y[(65535&E)+(v&(1<<D)-1)];continue b}if(32&D){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&E;(D&=15)&&(A<D&&(v+=O[k++]<<A,A+=8),F+=v&(1<<D)-1,v>>>=D,A-=D);15>A&&(v+=O[k++]<<A,A+=8,v+=O[k++]<<A,A+=8);E=x[v&C];c:for(;;){if(D=E>>>24,v>>>=D,A-=D,D=E>>>16&255,
-!(16&D)){if(0===(64&D)){E=x[(65535&E)+(v&(1<<D)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&E,D&=15,A<D&&(v+=O[k++]<<A,A+=8,A<D&&(v+=O[k++]<<A,A+=8)),G+=v&(1<<D)-1,G>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=D,A-=D,D=n-m,G>D){if(D=G-D,D>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,H=u,0===t){if(E+=s-D,D<F){F-=D;do K[n++]=u[E++];while(--D);E=n-G;H=K}}else if(t<D){if(E+=s+t-D,D-=t,D<F){F-=D;do K[n++]=u[E++];while(--D);
-if(E=0,t<F){D=t;F-=D;do K[n++]=u[E++];while(--D);E=n-G;H=K}}}else if(E+=t-D,D<F){F-=D;do K[n++]=u[E++];while(--D);E=n-G;H=K}for(;2<F;)K[n++]=H[E++],K[n++]=H[E++],K[n++]=H[E++],F-=3;F&&(K[n++]=H[E++],1<F&&(K[n++]=H[E++]))}else{E=n-G;do K[n++]=K[E++],K[n++]=K[E++],K[n++]=K[E++],F-=3;while(2<F);F&&(K[n++]=K[E++],1<F&&(K[n++]=K[E++]))}break}}break}}while(k<l&&n<p);F=A>>3;k-=F;A-=F<<3;b.next_in=k;b.next_out=n;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=n<p?257+(p-n):257-(n-p);d.hold=v&(1<<A)-1;d.bits=A}},
+"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.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(b,c,d){c.exports=function(b,c){var d,k,l,n,m,p,r,s,q,t,u,v,x,z,y,A,D,E,B,F,G,H,O,K;d=b.state;k=b.next_in;O=b.input;l=k+(b.avail_in-5);n=b.next_out;K=b.output;m=n-(c-b.avail_out);p=n+(b.avail_out-257);r=d.dmax;s=d.wsize;q=d.whave;t=d.wnext;u=d.window;v=d.hold;x=d.bits;z=d.lencode;
+y=d.distcode;A=(1<<d.lenbits)-1;D=(1<<d.distbits)-1;a:do{15>x&&(v+=O[k++]<<x,x+=8,v+=O[k++]<<x,x+=8);E=z[v&A];b:for(;;){if(B=E>>>24,v>>>=B,x-=B,B=E>>>16&255,0===B)K[n++]=65535&E;else{if(!(16&B)){if(0===(64&B)){E=z[(65535&E)+(v&(1<<B)-1)];continue b}if(32&B){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&E;(B&=15)&&(x<B&&(v+=O[k++]<<x,x+=8),F+=v&(1<<B)-1,v>>>=B,x-=B);15>x&&(v+=O[k++]<<x,x+=8,v+=O[k++]<<x,x+=8);E=y[v&D];c:for(;;){if(B=E>>>24,v>>>=B,x-=B,B=E>>>16&255,
+!(16&B)){if(0===(64&B)){E=y[(65535&E)+(v&(1<<B)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&E,B&=15,x<B&&(v+=O[k++]<<x,x+=8,x<B&&(v+=O[k++]<<x,x+=8)),G+=v&(1<<B)-1,G>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=B,x-=B,B=n-m,G>B){if(B=G-B,B>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,H=u,0===t){if(E+=s-B,B<F){F-=B;do K[n++]=u[E++];while(--B);E=n-G;H=K}}else if(t<B){if(E+=s+t-B,B-=t,B<F){F-=B;do K[n++]=u[E++];while(--B);
+if(E=0,t<F){B=t;F-=B;do K[n++]=u[E++];while(--B);E=n-G;H=K}}}else if(E+=t-B,B<F){F-=B;do K[n++]=u[E++];while(--B);E=n-G;H=K}for(;2<F;)K[n++]=H[E++],K[n++]=H[E++],K[n++]=H[E++],F-=3;F&&(K[n++]=H[E++],1<F&&(K[n++]=H[E++]))}else{E=n-G;do K[n++]=K[E++],K[n++]=K[E++],K[n++]=K[E++],F-=3;while(2<F);F&&(K[n++]=K[E++],1<F&&(K[n++]=K[E++]))}break}}break}}while(k<l&&n<p);F=x>>3;k-=F;x-=F<<3;b.next_in=k;b.next_out=n;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=n<p?257+(p-n):257-(n-p);d.hold=v&(1<<x)-1;d.bits=x}},
{}],11:[function(b,c,d){function e(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){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 c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=x,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new s.Buf32(z),c.distcode=c.distdyn=new s.Buf32(C),c.sane=1,c.back=-1,A):y}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function l(b,c){var d,e;return b&&b.state?(e=b.state,
-0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):y}function n(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==A&&(b.state=null),d):y}function m(b,c,d,e){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)),e>=b.wsize?(s.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),s.arraySet(b.window,c,d-
-e,f,b.wnext),e-=f,e?(s.arraySet(b.window,c,d-e,e,0),b.wnext=e,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=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),u=b("./inffast"),v=b("./inftrees"),A=0,y=-2,x=1,z=852,C=592,E=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(b,c){var d,f,g,k,l,n,C,z,B,Y,L,I,aa,M,J,N,R,ca,$,Q,X,Z,T=0,P=new s.Buf8(4),ha=[16,17,
-18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;g=b.output;C=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;z=d.hold;B=d.bits;Y=n;L=C;X=A;a:for(;;)switch(d.mode){case x:if(0===d.wrap){d.mode=13;break}for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(2&d.wrap&&35615===z){d.check=0;P[0]=255&z;P[1]=z>>>8&255;d.check=t(d.check,P,2,0);B=z=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&
-d.wrap)||(((255&z)<<8)+(z>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&z)){b.msg="unknown compression method";d.mode=30;break}if(z>>>=4,B-=4,Q=(15&z)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&z?10:12;B=z=0;break;case 2:for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(d.flags=z,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";
-d.mode=30;break}d.head&&(d.head.text=z>>8&1);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,d.check=t(d.check,P,2,0));B=z=0;d.mode=3;case 3:for(;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.head&&(d.head.time=z);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,P[2]=z>>>16&255,P[3]=z>>>24&255,d.check=t(d.check,P,4,0));B=z=0;d.mode=4;case 4:for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.head&&(d.head.xflags=255&z,d.head.os=z>>8);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,d.check=t(d.check,P,2,0));B=z=0;d.mode=
-5;case 5:if(1024&d.flags){for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.length=z;d.head&&(d.head.extra_len=z);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,d.check=t(d.check,P,2,0));B=z=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>n&&(I=n),I&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),s.arraySet(d.head.extra,f,k,I,Q)),512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
+new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=y,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new s.Buf32(A),c.distcode=c.distdyn=new s.Buf32(D),c.sane=1,c.back=-1,x):z}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):z}function l(b,c){var d,e;return b&&b.state?(e=b.state,
+0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?z:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):z}function n(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):z}function m(b,c,d,e){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)),e>=b.wsize?(s.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),s.arraySet(b.window,c,d-
+e,f,b.wnext),e-=f,e?(s.arraySet(b.window,c,d-e,e,0),b.wnext=e,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=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),u=b("./inffast"),v=b("./inftrees"),x=0,z=-2,y=1,A=852,D=592,E=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(b,c){var d,f,g,k,l,n,D,A,C,Y,L,I,aa,M,J,N,R,ca,$,Q,X,Z,T=0,P=new s.Buf8(4),ha=[16,17,
+18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return z;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;g=b.output;D=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;A=d.hold;C=d.bits;Y=n;L=D;X=x;a:for(;;)switch(d.mode){case y:if(0===d.wrap){d.mode=13;break}for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(2&d.wrap&&35615===A){d.check=0;P[0]=255&A;P[1]=A>>>8&255;d.check=t(d.check,P,2,0);C=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&
+d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,C-=4,Q=(15&A)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.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(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";
+d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,d.check=t(d.check,P,2,0));C=A=0;d.mode=3;case 3:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.head&&(d.head.time=A);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,P[2]=A>>>16&255,P[3]=A>>>24&255,d.check=t(d.check,P,4,0));C=A=0;d.mode=4;case 4:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,d.check=t(d.check,P,2,0));C=A=0;d.mode=
+5;case 5:if(1024&d.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,d.check=t(d.check,P,2,0));C=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>n&&(I=n),I&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),s.arraySet(d.head.extra,f,k,I,Q)),512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
7;case 7:if(2048&d.flags){if(0===n)break a;I=0;do Q=f[k+I++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&I<n);if(512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,Q)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===n)break a;I=0;do Q=f[k+I++],d.head&&Q&&65536>d.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&I<n);if(512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,Q)break a}else d.head&&(d.head.comment=null);d.mode=
-9;case 9:if(512&d.flags){for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(z!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}B=z=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}b.adler=d.check=e(z);B=z=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=C,b.next_in=k,b.avail_in=n,d.hold=z,d.bits=B,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){z>>>=
-7&B;B-=7&B;d.mode=27;break}for(;3>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}switch(d.last=1&z,z>>>=1,B-=1,3&z){case 0:d.mode=14;break;case 1:M=d;if(E){N=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(N=0;144>N;)M.lens[N++]=8;for(;256>N;)M.lens[N++]=9;for(;280>N;)M.lens[N++]=7;for(;288>N;)M.lens[N++]=8;v(1,M.lens,0,288,p,0,M.work,{bits:9});for(N=0;32>N;)M.lens[N++]=5;v(2,M.lens,0,32,r,0,M.work,{bits:5});E=!1}M.lencode=p;M.lenbits=9;M.distcode=r;M.distbits=5;if(d.mode=20,6===c){z>>>=2;B-=2;break a}break;
-case 2:d.mode=17;break;case 3:b.msg="invalid block type",d.mode=30}z>>>=2;B-=2;break;case 14:z>>>=7&B;for(B-=7&B;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if((65535&z)!==(z>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&z,z=0,B=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>n&&(I=n),I>C&&(I=C),0===I)break a;s.arraySet(g,f,k,I,l);n-=I;k+=I;C-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>B;){if(0===n)break a;n--;z+=f[k++]<<
-B;B+=8}if(d.nlen=(31&z)+257,z>>>=5,B-=5,d.ndist=(31&z)+1,z>>>=5,B-=5,d.ncode=(15&z)+4,z>>>=4,B-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.lens[ha[d.have++]]=7&z;z>>>=3;B-=3}for(;19>d.have;)d.lens[ha[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},X=v(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid code lengths set";
-d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;T=d.lencode[z&(1<<d.lenbits)-1],J=T>>>24,N=65535&T,!(J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(16>N)z>>>=J,B-=J,d.lens[d.have++]=N;else{if(16===N){for(M=J+2;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(z>>>=J,B-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];I=3+(3&z);z>>>=2;B-=2}else if(17===N){for(M=J+3;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=J;B-=J;Q=0;I=3+(7&z);
-z>>>=3;B-=3}else{for(M=J+7;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=J;B-=J;Q=0;I=11+(127&z);z>>>=7;B-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},X=v(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,
-Z={bits:d.distbits},X=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,Z),d.distbits=Z.bits,X){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=n&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=k;b.avail_in=n;d.hold=z;d.bits=B;u(b,L);l=b.next_out;g=b.output;C=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;z=d.hold;B=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;T=d.lencode[z&(1<<d.lenbits)-1],J=T>>>24,M=T>>>16&255,N=65535&T,!(J<=B);){if(0===
-n)break a;n--;z+=f[k++]<<B;B+=8}if(M&&0===(240&M)){R=J;ca=M;for($=N;T=d.lencode[$+((z&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,N=65535&T,!(R+J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=R;B-=R;d.back+=R}if(z>>>=J,B-=J,d.back+=J,d.length=N,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.length+=z&(1<<d.extra)-1;z>>>=d.extra;
-B-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;case 23:for(;T=d.distcode[z&(1<<d.distbits)-1],J=T>>>24,M=T>>>16&255,N=65535&T,!(J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(0===(240&M)){R=J;ca=M;for($=N;T=d.distcode[$+((z&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,N=65535&T,!(R+J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=R;B-=R;d.back+=R}if(z>>>=J,B-=J,d.back+=J,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=N;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;B<
-M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.offset+=z&(1<<d.extra)-1;z>>>=d.extra;B-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(I=L-C,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,aa=d.wsize-I):aa=d.wnext-I;I>d.length&&(I=d.length);M=d.window}else M=g,aa=l-d.offset,I=d.length;I>C&&(I=C);C-=I;d.length-=I;do g[l++]=M[aa++];while(--I);
-0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;g[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>B;){if(0===n)break a;n--;z|=f[k++]<<B;B+=8}if(L-=C,b.total_out+=L,d.total+=L,L&&(b.adler=d.check=d.flags?t(d.check,g,L,l-L):q(d.check,g,L,l-L)),L=C,(d.flags?z:e(z))!==d.check){b.msg="incorrect data check";d.mode=30;break}B=z=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(z!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=
-30;break}B=z=0}d.mode=29;case 29:X=1;break a;case 30:X=-3;break a;case 31:return-4;default:return y}return b.next_out=l,b.avail_out=C,b.next_in=k,b.avail_in=n,d.hold=z,d.bits=B,(d.wsize||L!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,L-b.avail_out)?(d.mode=31,-4):(Y-=b.avail_in,L-=b.avail_out,b.total_in+=Y,b.total_out+=L,d.total+=L,d.wrap&&L&&(b.adler=d.check=d.flags?t(d.check,g,L,b.next_out-L):q(d.check,g,L,b.next_out-L)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:
-0)+(20===d.mode||15===d.mode?256:0),(0===Y&&0===L||4===c)&&X===A&&(X=-5),X)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,A};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,A)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,A)):
-y};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[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];c.exports=function(b,c,d,r,s,q,t,u){var v,A,y,x,z,C,E,D;x=u.bits;for(var F=0,G=0,H=0,O=0,K=0,S=0,W=0,da=v=0,U=0,B=null,Y=0,L=new e.Buf16(16),S=new e.Buf16(16),I=null,aa=0,F=0;15>=F;F++)L[F]=0;for(G=0;G<r;G++)L[c[d+G]]++;K=x;for(O=15;1<=O&&0===L[O];O--);if(K>O&&(K=O),0===O)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<O&&0===L[H];H++);K<H&&(K=H);for(F=v=1;15>=F;F++)if(v<<=1,v-=L[F],0>v)return-1;
-if(0<v&&(0===b||1!==O))return-1;S[1]=0;for(F=1;15>F;F++)S[F+1]=S[F]+L[F];for(G=0;G<r;G++)0!==c[d+G]&&(t[S[c[d+G]]++]=G);if(0===b?(B=I=t,z=19):1===b?(B=f,Y-=257,I=g,aa-=257,z=256):(B=k,I=l,z=-1),U=0,G=0,F=H,x=q,S=K,W=0,y=-1,da=1<<K,r=da-1,1===b&&852<da||2===b&&592<da)return 1;for(var M=0;;){M++;C=F-W;t[G]<z?(E=0,D=t[G]):t[G]>z?(E=I[aa+t[G]],D=B[Y+t[G]]):(E=96,D=0);v=1<<F-W;H=A=1<<S;do A-=v,s[x+(U>>W)+A]=C<<24|E<<16|D|0;while(0!==A);for(v=1<<F-1;U&v;)v>>=1;if(0!==v?(U&=v-1,U+=v):U=0,G++,0===--L[F]){if(F===
-O)break;F=c[d+t[G]]}if(F>K&&(U&r)!==y){0===W&&(W=K);x+=H;S=F-W;for(v=1<<S;S+W<O&&(v-=L[S+W],!(0>=v));)S++,v<<=1;if(da+=1<<S,1===b&&852<da||2===b&&592<da)return 1;y=U&r;s[y]=K<<24|S<<16|x-q|0}}return 0!==U&&(s[x+U]=F-W<<24|4194304),u.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.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(b,c,d){function e(b){for(var c=
+9;case 9:if(512&d.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}C=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}b.adler=d.check=e(A);C=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=D,b.next_in=k,b.avail_in=n,d.hold=A,d.bits=C,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=
+7&C;C-=7&C;d.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}switch(d.last=1&A,A>>>=1,C-=1,3&A){case 0:d.mode=14;break;case 1:M=d;if(E){N=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(N=0;144>N;)M.lens[N++]=8;for(;256>N;)M.lens[N++]=9;for(;280>N;)M.lens[N++]=7;for(;288>N;)M.lens[N++]=8;v(1,M.lens,0,288,p,0,M.work,{bits:9});for(N=0;32>N;)M.lens[N++]=5;v(2,M.lens,0,32,r,0,M.work,{bits:5});E=!1}M.lencode=p;M.lenbits=9;M.distcode=r;M.distbits=5;if(d.mode=20,6===c){A>>>=2;C-=2;break a}break;
+case 2:d.mode=17;break;case 3:b.msg="invalid block type",d.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)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,C=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>n&&(I=n),I>D&&(I=D),0===I)break a;s.arraySet(g,f,k,I,l);n-=I;k+=I;D-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>C;){if(0===n)break a;n--;A+=f[k++]<<
+C;C+=8}if(d.nlen=(31&A)+257,A>>>=5,C-=5,d.ndist=(31&A)+1,A>>>=5,C-=5,d.ncode=(15&A)+4,A>>>=4,C-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.lens[ha[d.have++]]=7&A;A>>>=3;C-=3}for(;19>d.have;)d.lens[ha[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},X=v(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid code lengths set";
+d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;T=d.lencode[A&(1<<d.lenbits)-1],J=T>>>24,N=65535&T,!(J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(16>N)A>>>=J,C-=J,d.lens[d.have++]=N;else{if(16===N){for(M=J+2;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A>>>=J,C-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];I=3+(3&A);A>>>=2;C-=2}else if(17===N){for(M=J+3;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=J;C-=J;Q=0;I=3+(7&A);
+A>>>=3;C-=3}else{for(M=J+7;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=J;C-=J;Q=0;I=11+(127&A);A>>>=7;C-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},X=v(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,
+Z={bits:d.distbits},X=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,Z),d.distbits=Z.bits,X){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=n&&258<=D){b.next_out=l;b.avail_out=D;b.next_in=k;b.avail_in=n;d.hold=A;d.bits=C;u(b,L);l=b.next_out;g=b.output;D=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;A=d.hold;C=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;T=d.lencode[A&(1<<d.lenbits)-1],J=T>>>24,M=T>>>16&255,N=65535&T,!(J<=C);){if(0===
+n)break a;n--;A+=f[k++]<<C;C+=8}if(M&&0===(240&M)){R=J;ca=M;for($=N;T=d.lencode[$+((A&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,N=65535&T,!(R+J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=R;C-=R;d.back+=R}if(A>>>=J,C-=J,d.back+=J,d.length=N,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;
+C-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;case 23:for(;T=d.distcode[A&(1<<d.distbits)-1],J=T>>>24,M=T>>>16&255,N=65535&T,!(J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(0===(240&M)){R=J;ca=M;for($=N;T=d.distcode[$+((A&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,N=65535&T,!(R+J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=R;C-=R;d.back+=R}if(A>>>=J,C-=J,d.back+=J,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=N;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;C<
+M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.offset+=A&(1<<d.extra)-1;A>>>=d.extra;C-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===D)break a;if(I=L-D,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,aa=d.wsize-I):aa=d.wnext-I;I>d.length&&(I=d.length);M=d.window}else M=g,aa=l-d.offset,I=d.length;I>D&&(I=D);D-=I;d.length-=I;do g[l++]=M[aa++];while(--I);
+0===d.length&&(d.mode=21);break;case 26:if(0===D)break a;g[l++]=d.length;D--;d.mode=21;break;case 27:if(d.wrap){for(;32>C;){if(0===n)break a;n--;A|=f[k++]<<C;C+=8}if(L-=D,b.total_out+=L,d.total+=L,L&&(b.adler=d.check=d.flags?t(d.check,g,L,l-L):q(d.check,g,L,l-L)),L=D,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}C=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=
+30;break}C=A=0}d.mode=29;case 29:X=1;break a;case 30:X=-3;break a;case 31:return-4;default:return z}return b.next_out=l,b.avail_out=D,b.next_in=k,b.avail_in=n,d.hold=A,d.bits=C,(d.wsize||L!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,L-b.avail_out)?(d.mode=31,-4):(Y-=b.avail_in,L-=b.avail_out,b.total_in+=Y,b.total_out+=L,d.total+=L,d.wrap&&L&&(b.adler=d.check=d.flags?t(d.check,g,L,b.next_out-L):q(d.check,g,L,b.next_out-L)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:
+0)+(20===d.mode||15===d.mode?256:0),(0===Y&&0===L||4===c)&&X===x&&(X=-5),X)};d.inflateEnd=function(b){if(!b||!b.state)return z;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?z:(d.head=c,c.done=!1,x)):z};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?z:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):
+z};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[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];c.exports=function(b,c,d,r,s,q,t,u){var v,x,z,y,A,D,E,B;y=u.bits;for(var F=0,G=0,H=0,O=0,K=0,S=0,W=0,da=v=0,U=0,C=null,Y=0,L=new e.Buf16(16),S=new e.Buf16(16),I=null,aa=0,F=0;15>=F;F++)L[F]=0;for(G=0;G<r;G++)L[c[d+G]]++;K=y;for(O=15;1<=O&&0===L[O];O--);if(K>O&&(K=O),0===O)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<O&&0===L[H];H++);K<H&&(K=H);for(F=v=1;15>=F;F++)if(v<<=1,v-=L[F],0>v)return-1;
+if(0<v&&(0===b||1!==O))return-1;S[1]=0;for(F=1;15>F;F++)S[F+1]=S[F]+L[F];for(G=0;G<r;G++)0!==c[d+G]&&(t[S[c[d+G]]++]=G);if(0===b?(C=I=t,A=19):1===b?(C=f,Y-=257,I=g,aa-=257,A=256):(C=k,I=l,A=-1),U=0,G=0,F=H,y=q,S=K,W=0,z=-1,da=1<<K,r=da-1,1===b&&852<da||2===b&&592<da)return 1;for(var M=0;;){M++;D=F-W;t[G]<A?(E=0,B=t[G]):t[G]>A?(E=I[aa+t[G]],B=C[Y+t[G]]):(E=96,B=0);v=1<<F-W;H=x=1<<S;do x-=v,s[y+(U>>W)+x]=D<<24|E<<16|B|0;while(0!==x);for(v=1<<F-1;U&v;)v>>=1;if(0!==v?(U&=v-1,U+=v):U=0,G++,0===--L[F]){if(F===
+O)break;F=c[d+t[G]]}if(F>K&&(U&r)!==z){0===W&&(W=K);y+=H;S=F-W;for(v=1<<S;S+W<O&&(v-=L[S+W],!(0>=v));)S++,v<<=1;if(da+=1<<S,1===b&&852<da||2===b&&592<da)return 1;z=U&r;s[z]=K<<24|S<<16|y-q|0}}return 0!==U&&(s[y+U]=F-W<<24|4194304),u.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.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(b,c,d){function e(b){for(var c=
b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>da-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>da-b.bi_valid,b.bi_valid+=d-da):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function n(b,c,d){l(b,
d[2*c],d[2*c+1])}function m(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(W+1),g=0;for(e=1;e<=W;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function r(b){var c;for(c=0;c<H;c++)b.dyn_ltree[2*c]=0;for(c=0;c<O;c++)b.dyn_dtree[2*c]=0;for(c=0;c<K;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*U]=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,c,d,e){var f=2*c,g=2*d;return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function u(b,c,d){var e,f,g,k,m=0;if(0!==b.last_lit){do e=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===e?n(b,f,c):(g=$[f],n(b,g+G+1,c),k=I[g],0!==k&&(f-=Q[g],l(b,f,k)),
e--,g=256>e?ca[e]:ca[256+(e>>>7)],n(b,g,d),k=aa[g],0!==k&&(e-=X[g],l(b,e,k)));while(m<b.last_lit)}n(b,U,c)}function v(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var k=c.stat_desc.has_stree,l=c.stat_desc.elems,n=-1;b.heap_len=0;b.heap_max=S;for(d=0;d<l;d++)0!==g[2*d]?(b.heap[++b.heap_len]=n=d,b.depth[d]=0):g[2*d+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-=e[2*f+1]);c.max_code=n;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=l;do d=
-b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+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,r,k=c.dyn_tree,l=c.max_code,q=c.stat_desc.static_tree,s=c.stat_desc.has_stree,B=c.stat_desc.extra_bits,v=c.stat_desc.extra_base,u=c.stat_desc.max_length,D=0;for(e=0;e<=W;e++)b.bl_count[e]=0;k[2*b.heap[b.heap_max]+
-1]=0;for(d=b.heap_max+1;d<S;d++)f=b.heap[d],e=k[2*k[2*f+1]+1]+1,e>u&&(e=u,D++),k[2*f+1]=e,f>l||(b.bl_count[e]++,m=0,f>=v&&(m=B[f-v]),r=k[2*f],b.opt_len+=r*(e+m),s&&(b.static_len+=r*(q[2*f+1]+m)));if(0!==D){do{for(e=u-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[u]--;D-=2}while(0<D);for(e=u;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>l||(k[2*m+1]!==e&&(b.opt_len+=(e-k[2*m+1])*k[2*m],k[2*m+1]=e),f--)}p(g,n,b.bl_count)}function A(b,c,d){var e,f,g=-1,k=c[1],l=0,n=7,
-m=4;0===k&&(n=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=k,k=c[2*(e+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*B]++):10>=l?b.bl_tree[2*Y]++:b.bl_tree[2*L]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,c,d){var e,f,g=-1,k=c[1],m=0,p=7,r=4;0===k&&(p=138,r=3);for(e=0;e<=d;e++)if(f=k,k=c[2*(e+1)+1],!(++m<p&&f===k)){if(m<r){do n(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(n(b,f,b.bl_tree),m--),n(b,B,b.bl_tree),l(b,m-3,2)):10>=m?
-(n(b,Y,b.bl_tree),l(b,m-3,3)):(n(b,L,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(p=138,r=3):f===k?(p=6,r=3):(p=7,r=4)}}function x(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return D;return E}function z(b,c,d,e){l(b,(F<<1)+(e?1:0),3);s(b);k(b,d);k(b,~d);C.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var C=b("../utils/common"),E=0,D=1,
-F=0,G=256,H=G+1+29,O=30,K=19,S=2*H+1,W=15,da=16,U=256,B=16,Y=17,L=18,I=[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],aa=[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],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=Array(2*(H+2));e(N);var R=Array(2*O);e(R);var ca=Array(512);e(ca);var $=Array(256);e($);var Q=Array(29);e(Q);var X=Array(O);e(X);var Z,T,P,ha=!1;d._tr_init=function(b){if(!ha){var c,d,e,k=Array(W+1);for(e=
+b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+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,r,k=c.dyn_tree,l=c.max_code,q=c.stat_desc.static_tree,s=c.stat_desc.has_stree,C=c.stat_desc.extra_bits,u=c.stat_desc.extra_base,v=c.stat_desc.max_length,B=0;for(e=0;e<=W;e++)b.bl_count[e]=0;k[2*b.heap[b.heap_max]+
+1]=0;for(d=b.heap_max+1;d<S;d++)f=b.heap[d],e=k[2*k[2*f+1]+1]+1,e>v&&(e=v,B++),k[2*f+1]=e,f>l||(b.bl_count[e]++,m=0,f>=u&&(m=C[f-u]),r=k[2*f],b.opt_len+=r*(e+m),s&&(b.static_len+=r*(q[2*f+1]+m)));if(0!==B){do{for(e=v-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[v]--;B-=2}while(0<B);for(e=v;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>l||(k[2*m+1]!==e&&(b.opt_len+=(e-k[2*m+1])*k[2*m],k[2*m+1]=e),f--)}p(g,n,b.bl_count)}function x(b,c,d){var e,f,g=-1,k=c[1],l=0,n=7,
+m=4;0===k&&(n=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=k,k=c[2*(e+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*Y]++:b.bl_tree[2*L]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function z(b,c,d){var e,f,g=-1,k=c[1],m=0,p=7,r=4;0===k&&(p=138,r=3);for(e=0;e<=d;e++)if(f=k,k=c[2*(e+1)+1],!(++m<p&&f===k)){if(m<r){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,Y,b.bl_tree),l(b,m-3,3)):(n(b,L,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(p=138,r=3):f===k?(p=6,r=3):(p=7,r=4)}}function y(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return B;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return B;return E}function A(b,c,d,e){l(b,(F<<1)+(e?1:0),3);s(b);k(b,d);k(b,~d);D.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var D=b("../utils/common"),E=0,B=1,
+F=0,G=256,H=G+1+29,O=30,K=19,S=2*H+1,W=15,da=16,U=256,C=16,Y=17,L=18,I=[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],aa=[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],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=Array(2*(H+2));e(N);var R=Array(2*O);e(R);var ca=Array(512);e(ca);var $=Array(256);e($);var Q=Array(29);e(Q);var X=Array(O);e(X);var Z,T,P,ha=!1;d._tr_init=function(b){if(!ha){var c,d,e,k=Array(W+1);for(e=
d=0;28>e;e++){Q[e]=d;for(c=0;c<1<<I[e];c++)$[d++]=e}$[d-1]=e;for(e=d=0;16>e;e++){X[e]=d;for(c=0;c<1<<aa[e];c++)ca[d++]=e}for(d>>=7;e<O;e++){X[e]=d<<7;for(c=0;c<1<<aa[e]-7;c++)ca[256+d++]=e}for(c=0;c<=W;c++)k[c]=0;for(c=0;143>=c;)N[2*c+1]=8,c++,k[8]++;for(;255>=c;)N[2*c+1]=9,c++,k[9]++;for(;279>=c;)N[2*c+1]=7,c++,k[7]++;for(;287>=c;)N[2*c+1]=8,c++,k[8]++;p(N,H+1,k);for(c=0;c<O;c++)R[2*c+1]=5,R[2*c]=m(c,5);Z=new f(N,I,G+1,H,W);T=new f(R,aa,0,O,W);P=new f([],M,0,K,7);ha=!0}b.l_desc=new g(b.dyn_ltree,
-Z);b.d_desc=new g(b.dyn_dtree,T);b.bl_desc=new g(b.bl_tree,P);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=z;d._tr_flush_block=function(b,c,d,e){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);A(b,b.dyn_ltree,b.l_desc.max_code);A(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=K-1;3<=k&&0===b.bl_tree[2*J[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=d+5;if(d+4<=f&&-1!==c)z(b,c,d,
-e);else if(4===b.strategy||g===f)l(b,2+(e?1:0),3),u(b,N,R);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;k+=1;l(b,c-257,5);l(b,d-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*J[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&s(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,
+Z);b.d_desc=new g(b.dyn_dtree,T);b.bl_desc=new g(b.bl_tree,P);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=A;d._tr_flush_block=function(b,c,d,e){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=y(b));v(b,b.l_desc);v(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=K-1;3<=k&&0===b.bl_tree[2*J[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=d+5;if(d+4<=f&&-1!==c)A(b,c,d,
+e);else if(4===b.strategy||g===f)l(b,2+(e?1:0),3),u(b,N,R);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;k+=1;l(b,c-257,5);l(b,d-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*J[f]+1],3);z(b,b.dyn_ltree,c-1);z(b,b.dyn_dtree,d-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&s(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,
c--,b.dyn_ltree[2*($[d]+G+1)]++,b.dyn_dtree[2*(256>c?ca[c]:ca[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,U,N);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(b,c,d){c.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(b,c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=k[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,k,s,q,t=f,u,v=d[a];v&&"object"===typeof v&&"function"===typeof v.toJSON&&(v=v.toJSON(a));"function"===typeof l&&(v=l.call(d,a,v));switch(typeof v){case "string":return b(v);case "number":return isFinite(v)?""+v:"null";case "boolean":case "null":return""+v;
@@ -256,7 +256,7 @@ a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:
return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){var c=0,d;for(d in b)c++;for(d in a)if(c--,(!mxUtils.isNaN(a[d])||!mxUtils.isNaN(b[d]))&&a[d]!=b[d])return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=
b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" \x3d [null]\n";else if("function"==typeof a[c])b+=c+" \x3d\x3e [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" \x3d\x3e ["+d+"]\n");else b+=c+" \x3d "+a[c]+"\n"}catch(e){b+=c+"\x3d"+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,
k,l){k-=a;l-=b;if(0===c||0===d)return r;c=Math.abs(c);d=Math.abs(d);var n=-k/2,m=-l/2,p=Math.cos(e*Math.PI/180),r=Math.sin(e*Math.PI/180);e=p*n+r*m;var n=-1*r*n+p*m,m=e*e,s=n*n,q=c*c,t=d*d,u=m/q+s/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((q*t-q*s-t*m)/(q*s+t*m)));m=f*c*n/d;s=-1*f*d*e/c;k=p*m-r*s+k/2;l=r*m+p*s+l/2;q=Math.atan2((n-s)/d,(e-m)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-n-s)/d,(-e-m)/c)-Math.atan2((n-s)/d,(e-m)/c);e=0<=q?q:2*Math.PI+q;0==
-g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;n=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),A=Math.sin(f),s=-n*(m*A+d*v),q=-n*(c*A-p*v),r=[],y=0;y<g;++y){f+=e;var v=Math.cos(f),A=Math.sin(f),t=m*v-d*A+k,u=c*v+p*A+l,x=-n*(m*A+d*v),v=-n*(c*A-p*v),A=6*y;r[A]=Number(s+a);r[A+1]=Number(q+b);r[A+2]=Number(t-x+a);r[A+3]=Number(u-v+b);r[A+4]=Number(t+a);r[A+5]=Number(u+b);s=t+x;q=u+v}return r},getBoundingBox:function(a,
+g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;n=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),x=Math.sin(f),s=-n*(m*x+d*v),q=-n*(c*x-p*v),r=[],z=0;z<g;++z){f+=e;var v=Math.cos(f),x=Math.sin(f),t=m*v-d*x+k,u=c*v+p*x+l,y=-n*(m*x+d*v),v=-n*(c*x-p*v),x=6*z;r[x]=Number(s+a);r[x+1]=Number(q+b);r[x+2]=Number(t-y+a);r[x+3]=Number(u-v+b);r[x+4]=Number(t+a);r[x+5]=Number(u+b);s=t+y;q=u+v}return r},getBoundingBox:function(a,
b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,
g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<
c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=
@@ -528,13 +528,13 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,n,m){if(null!=m&&n
g=0;e==mxConstants.ALIGN_CENTER?g-=c/2:e==mxConstants.ALIGN_RIGHT&&(g-=c);a+=g;f==mxConstants.ALIGN_MIDDLE?l-=d/2:f==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);b+=l;e=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(e+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=n&&(e+="rotate("+n+","+-g+","+
-l+")");m.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,n,m,p,r){if(this.textEnabled&&null!=e){p=null!=p?p:0;var s=this.state;a+=s.dx;b+=s.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";m?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==n?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==n&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<c?q+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,n);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,A=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y=
-document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";A=document.createElement("div");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;y.appendChild(A);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
-c){var x=A.offsetWidth;if(!m&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=n){var z=y.style.whiteSpace;A.style.whiteSpace="nowrap";x<A.offsetWidth&&(y.style.whiteSpace=z)}m&&(x=Math.min(x,c));y.style.width=x+"px";v=A.offsetWidth+v+0;A=A.offsetHeight+r;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=v+"px";q.setAttribute("style",y.style.cssText)}else v=A.offsetWidth+v,A=A.offsetHeight+r;y.parentNode.removeChild(y);u.appendChild(q)}else this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):u.appendChild(q),y=q,null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,k&&"break-word"==q.style.wordWrap&&(y.style.width="100%")),x=y.offsetWidth,0==x&&q.parentNode==u&&(q.style.visibility="hidden",document.body.appendChild(q),x=y.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=x),!m&&k&&(0<c&&this.root.ownerDocument!=document&&"fill"!=n&&"width"!=n)&&(z=q.style.whiteSpace,q.style.whiteSpace="nowrap",x<y.offsetWidth&&
-(q.style.whiteSpace=z)),v=x+v-1,k&&"fill"!=n&&"width"!=n&&(m&&(v=Math.min(v,c)),q.style.width=v+"px"),v=y.offsetWidth,A=y.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=v,t.mxCachedFinalOffsetHeight=A),A-=r,q.parentNode!=u&&(u.appendChild(q),q.style.visibility="");m&&(A=Math.min(A,d),v=Math.min(v,c));"width"==n?d=A:"fill"!=n&&(c=v,d=A);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
-r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
-")"+y);u.setAttribute("width",Math.round(Math.max(1,c)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,e,f,g,k,l,n,m,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(u),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,n,m,p,r)}};
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,n);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,x=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var z=
+document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";x=document.createElement("div");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(x);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
+c){var y=x.offsetWidth;if(!m&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=n){var A=z.style.whiteSpace;x.style.whiteSpace="nowrap";y<x.offsetWidth&&(z.style.whiteSpace=A)}m&&(y=Math.min(y,c));z.style.width=y+"px";v=x.offsetWidth+v+0;x=x.offsetHeight+r;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=v+"px";q.setAttribute("style",z.style.cssText)}else v=x.offsetWidth+v,x=x.offsetHeight+r;z.parentNode.removeChild(z);u.appendChild(q)}else this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):u.appendChild(q),z=q,null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==q.style.wordWrap&&(z.style.width="100%")),y=z.offsetWidth,0==y&&q.parentNode==u&&(q.style.visibility="hidden",document.body.appendChild(q),y=z.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=y),!m&&k&&(0<c&&this.root.ownerDocument!=document&&"fill"!=n&&"width"!=n)&&(A=q.style.whiteSpace,q.style.whiteSpace="nowrap",y<z.offsetWidth&&
+(q.style.whiteSpace=A)),v=y+v-1,k&&"fill"!=n&&"width"!=n&&(m&&(v=Math.min(v,c)),q.style.width=v+"px"),v=z.offsetWidth,x=z.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=v,t.mxCachedFinalOffsetHeight=x),x-=r,q.parentNode!=u&&(u.appendChild(q),q.style.visibility="");m&&(x=Math.min(x,d),v=Math.min(v,c));"width"==n?d=x:"fill"!=n&&(c=v,d=x);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
+r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;z=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(z+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=p&&(z+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
+")"+z);u.setAttribute("width",Math.round(Math.max(1,c)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,e,f,g,k,l,n,m,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(u),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,n,m,p,r)}};
mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,n,m,p){m=null!=m?m:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=m&&(q+="rotate("+m+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&s.setAttribute("direction",p);n&&0<c&&0<d&&(p=a,m=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d)),m=this.createClip(p*k.scale-2,
m*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document?(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),s.setAttribute("clip-path","url("+p+"#"+m.getAttribute("id")+")")):s.setAttribute("clip-path","url(#"+m.getAttribute("id")+")"));m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&s.setAttribute("text-anchor",
@@ -569,8 +569,8 @@ mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,n,m,p,r){if(this.textEna
l.style.left=this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),u=t.x,t=t.y;e=this.createDiv(e,f,g,n);f=this.createElement("div");null!=r&&e.setAttribute("dir",r);if(k&&0<c){if(m||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var v=e;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
(v.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=s.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&!mxClient.IS_EM&&"DIV"!=this.root.nodeName?(q.appendChild(f),l.appendChild(q)):l.appendChild(f)):8==document.documentMode&&!mxClient.IS_EM?(q.appendChild(e),l.appendChild(q)):(e.style.display="inline",l.appendChild(e));"DIV"!=this.root.nodeName?(r=this.createVmlElement("rect"),r.stroked="false",r.filled=
"false",r.appendChild(l),this.root.appendChild(r)):this.root.appendChild(l);m?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==n?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==n&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){v=p*(Math.PI/180);p=parseFloat(parseFloat(Math.cos(v)).toFixed(8));
-r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var A=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,v),
-q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*g+c*-A)/2-r*c*(u+0.5)+p*d*(t+0.5);k=(c-c*g+d*-A)/2+p*c*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-c/2)*s.scale)+"px",n.style.top=this.format(b+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&&
+r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var x=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,v),
+q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*g+c*-x)/2-r*c*(u+0.5)+p*d*(t+0.5);k=(c-c*g+d*-x)/2+p*c*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-c/2)*s.scale)+"px",n.style.top=this.format(b+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&&
!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-c/2)*s)+"px",l.style.top=this.format(b+(m-d/2)*s)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",s.appendChild(e),l.style.left=this.format(a+c*u*this.state.scale)+"px",l.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*u+
"%",q.style.top=100*t+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,n,m,p,r)}};
@@ -579,9 +579,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,n,m,p,r){k=this.sta
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=p*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,n=null,m=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=b.x;s.y+=b.y;var u=s.x,v=s.x+s.width,A=s.getCenterX(),y=s.y,x=s.y+s.height,z=s.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-A)<q?(f=b-a.getCenterX(),q=Math.abs(b-A),d=!0):Math.abs(b-u)<q?(f=b-a.x,
-q=Math.abs(b-u),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,n=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var s=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-z)<t?(g=b-a.getCenterY(),t=Math.abs(b-z),c=!0):Math.abs(b-
-y)<t?(g=b-a.y,t=Math.abs(b-y),c=!0):Math.abs(b-x)<t&&(g=b-a.y-a.height,t=Math.abs(b-x),c=!0);c&&(p=E,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));m=m||c},C=0;C<this.states.length;C++){var E=this.states[C];null!=E&&(this.horizontal&&(b.call(this,E.getCenterX(),
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,n=null,m=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=b.x;s.y+=b.y;var u=s.x,v=s.x+s.width,x=s.getCenterX(),z=s.y,y=s.y+s.height,A=s.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-x)<q?(f=b-a.getCenterX(),q=Math.abs(b-x),d=!0):Math.abs(b-u)<q?(f=b-a.x,
+q=Math.abs(b-u),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,n=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var s=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-A)<t?(g=b-a.getCenterY(),t=Math.abs(b-A),c=!0):Math.abs(b-
+z)<t?(g=b-a.y,t=Math.abs(b-z),c=!0):Math.abs(b-y)<t&&(g=b-a.y-a.height,t=Math.abs(b-y),c=!0);c&&(p=E,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));m=m||c},D=0;D<this.states.length;D++){var E=this.states[D];null!=E&&(this.horizontal&&(b.call(this,E.getCenterX(),
E),b.call(this,E.x,E),b.call(this,E.x+E.width,E)),this.vertical&&(s.call(this,E.getCenterY(),E),s.call(this,E.y,E),s.call(this,E.y+E.height,E)))}c&&(k||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),m||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));e=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
l.y+l.height)),this.guideX.points=null!=minY&&null!=maxY?[new mxPoint(n,minY),new mxPoint(n,maxY)]:[new mxPoint(n,-this.graph.panDy),new mxPoint(n,e.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw());!m&&null!=this.guideY?this.guideY.node.style.visibility="hidden":null!=this.guideY&&(null!=p&&null!=a&&(minX=Math.min(a.x+f-this.graph.panDx,p.x),maxX=Math.max(a.x+a.width+f-this.graph.panDx,p.x+p.width)),this.guideY.points=
null!=minX&&null!=maxX?[new mxPoint(minX,r),new mxPoint(maxX,r)]:[new mxPoint(-this.graph.panDx,r),new mxPoint(e.scrollWidth-3-this.graph.panDx,r)],this.guideY.stroke=this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw());b=new mxPoint(f,g)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
@@ -664,14 +664,14 @@ function mxArrowConnector(a,b,c,d,e,f,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 b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),n=g?0:this.arrowSpacing+c/2,m=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),r=b[b.length-1],s=1;s<b.length-1&&b[s].x==
-b[0].x&&b[s].y==b[0].y;)s++;var q=b[s].x-b[0].x,s=b[s].y-b[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,A=u,y=s/t,x,z=y,t=f*y,C=-f*u,E=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=u;s=y;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,u,y,m,d,f,n,!0);else{v=b[0].x+t/2+n*u;x=b[0].y+C/2+n*y;var D=b[0].x-t/2+n*u,F=b[0].y-C/2+n*y;g?(a.moveTo(v,x),E.push(function(){a.lineTo(D,F)})):(a.moveTo(D,F),a.lineTo(v,x))}for(var G=x=v=0,t=0;t<b.length-2;t++)if(C=mxUtils.relativeCcw(b[t].x,
-b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),v=b[t+2].x-b[t+1].x,x=b[t+2].y-b[t+1].y,G=Math.sqrt(v*v+x*x),0!=G&&(A=v/G,z=x/G,tmp=Math.max(Math.sqrt((u*A+y*z+1)/2),0.04),v=u+A,x=y+z,G=Math.sqrt(v*v+x*x),0!=G)){v/=G;x/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=C&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=b[t+1].x+x*f/2/G,O=b[t+1].y-v*f/2/G;x=b[t+1].x-x*f/2/G;v=b[t+1].y+v*f/2/G;0==C||!p?(a.lineTo(H,O),function(b,c){E.push(function(){a.lineTo(b,c)})}(x,v)):-1==C?(C=x+z*f,G=v-A*f,
-a.lineTo(x+y*f,v-u*f),a.quadTo(H,O,C,G),function(b,c){E.push(function(){a.lineTo(b,c)})}(x,v)):(a.lineTo(H,O),function(b,c){var d=H-y*f,e=O+u*f,g=H-z*f,k=O+A*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(g,k)})}(x,v));u=A;y=z}t=f*z;C=-f*A;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,n,!1);else{a.lineTo(r.x-n*A+t/2,r.y-n*z+C/2);var K=r.x-n*A-t/2,S=r.y-n*z-C/2;g?(a.moveTo(K,S),E.splice(0,0,function(){a.moveTo(K,S)})):a.lineTo(K,S)}for(t=E.length-1;0<=t;t--)E[t]();g?(a.end(),
-a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,s,m,d,f,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,n,!0),a.stroke(),a.end()))}};
+b[0].x&&b[s].y==b[0].y;)s++;var q=b[s].x-b[0].x,s=b[s].y-b[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,x=u,z=s/t,y,A=z,t=f*z,D=-f*u,E=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=u;s=z;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,u,z,m,d,f,n,!0);else{v=b[0].x+t/2+n*u;y=b[0].y+D/2+n*z;var B=b[0].x-t/2+n*u,F=b[0].y-D/2+n*z;g?(a.moveTo(v,y),E.push(function(){a.lineTo(B,F)})):(a.moveTo(B,F),a.lineTo(v,y))}for(var G=y=v=0,t=0;t<b.length-2;t++)if(D=mxUtils.relativeCcw(b[t].x,
+b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),v=b[t+2].x-b[t+1].x,y=b[t+2].y-b[t+1].y,G=Math.sqrt(v*v+y*y),0!=G&&(x=v/G,A=y/G,tmp=Math.max(Math.sqrt((u*x+z*A+1)/2),0.04),v=u+x,y=z+A,G=Math.sqrt(v*v+y*y),0!=G)){v/=G;y/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=D&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=b[t+1].x+y*f/2/G,O=b[t+1].y-v*f/2/G;y=b[t+1].x-y*f/2/G;v=b[t+1].y+v*f/2/G;0==D||!p?(a.lineTo(H,O),function(b,c){E.push(function(){a.lineTo(b,c)})}(y,v)):-1==D?(D=y+A*f,G=v-x*f,
+a.lineTo(y+z*f,v-u*f),a.quadTo(H,O,D,G),function(b,c){E.push(function(){a.lineTo(b,c)})}(y,v)):(a.lineTo(H,O),function(b,c){var d=H-z*f,e=O+u*f,g=H-A*f,k=O+x*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(g,k)})}(y,v));u=x;z=A}t=f*A;D=-f*x;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-z,c,e,f,n,!1);else{a.lineTo(r.x-n*x+t/2,r.y-n*A+D/2);var K=r.x-n*x-t/2,S=r.y-n*A-D/2;g?(a.moveTo(K,S),E.splice(0,0,function(){a.moveTo(K,S)})):a.lineTo(K,S)}for(t=E.length-1;0<=t;t--)E[t]();g?(a.end(),
+a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,s,m,d,f,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-z,c,e,f,n,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,n){g=k/g;var m=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;n?a.moveTo(b-m+p,c-k+f):a.lineTo(b-m+p,c-k+f);a.lineTo(b-m/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+m/g+p,c+k/g+f);a.lineTo(b+m+p,c+k+f)};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};
-function mxText(a,b,c,d,e,f,g,k,l,n,m,p,r,s,q,t,u,v,A,y,x){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
-0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=A?A:"visible";this.labelPadding=null!=y?y:0;this.textDirection=x;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+function mxText(a,b,c,d,e,f,g,k,l,n,m,p,r,s,q,t,u,v,x,z,y){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
+0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=z?z:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
@@ -864,9 +864,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)k=f[g],k.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),n=[],m=0;m<k.length;m++){var p=k[m].getGeneralPurposeVariable(a-1);n.push(p)}n.sort(function(a,b){return a-b});f[l]=n}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;f-=1;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++){l=d[g]+f;for(++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l]}return c};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var n=g[l],m=n.getGeneralPurposeVariable(f);0>m&&(m=l);k[m]=n}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,A=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],n=v.getNextLayerConnectedCells(f),m=v.getPreviousLayerConnectedCells(f),s=[],q=[],y=0;y<n.length;y++)s[y]=n[y].getGeneralPurposeVariable(f+
-1);for(y=0;y<m.length;y++)q[y]=m[y].getGeneralPurposeVariable(f-1)}else n=p,m=r,s=t,q=u,v=A;A=k[l+1];p=A.getNextLayerConnectedCells(f);r=A.getPreviousLayerConnectedCells(f);t=[];u=[];for(y=0;y<p.length;y++)t[y]=p[y].getGeneralPurposeVariable(f+1);for(y=0;y<r.length;y++)u[y]=r[y].getGeneralPurposeVariable(f-1);for(var x=0,z=0,y=0;y<s.length;y++)for(var C=0;C<t.length;C++)s[y]>t[C]&&x++,s[y]<t[C]&&z++;for(y=0;y<q.length;y++)for(C=0;C<u.length;C++)q[y]>u[C]&&x++,q[y]<u[C]&&z++;if(z<x||z==x&&e)p=v.getGeneralPurposeVariable(f),
-v.setGeneralPurposeVariable(f,A.getGeneralPurposeVariable(f)),A.setGeneralPurposeVariable(f,p),p=n,r=m,t=s,u=q,A=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var n=g[l],m=n.getGeneralPurposeVariable(f);0>m&&(m=l);k[m]=n}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,x=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],n=v.getNextLayerConnectedCells(f),m=v.getPreviousLayerConnectedCells(f),s=[],q=[],z=0;z<n.length;z++)s[z]=n[z].getGeneralPurposeVariable(f+
+1);for(z=0;z<m.length;z++)q[z]=m[z].getGeneralPurposeVariable(f-1)}else n=p,m=r,s=t,q=u,v=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);r=x.getPreviousLayerConnectedCells(f);t=[];u=[];for(z=0;z<p.length;z++)t[z]=p[z].getGeneralPurposeVariable(f+1);for(z=0;z<r.length;z++)u[z]=r[z].getGeneralPurposeVariable(f-1);for(var y=0,A=0,z=0;z<s.length;z++)for(var D=0;D<t.length;D++)s[z]>t[D]&&y++,s[z]<t[D]&&A++;for(z=0;z<q.length;z++)for(D=0;D<u.length;D++)q[z]>u[D]&&y++,q[z]<u[D]&&A++;if(A<y||A==y&&e)p=v.getGeneralPurposeVariable(f),
+v.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=n,r=m,t=s,u=q,x=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var n;n=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,n),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -901,7 +901,7 @@ q;if(s.isVertex()){q=0==k?e.connectsAsSource:e.connectsAsTarget;for(var t=0;t<q.
p+=this.prefVertEdgeOff:n>f/2&&(p-=this.prefVertEdgeOff);for(t=0;t<s;t++)q[4*t+2*k]=m,m+=l,q[4*t+2*k+1]=p;r=Math.max(r,p)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,n=0;n<a.edges.length;n++){var m=a.edges[n],p=this.layout.getVisibleTerminal(m,!0),r=[],s=a.isReversed;p!=g&&(s=!s);if(null!=f){var q=s?
2:0,t=s?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],u=f[4*e+1+q];s!=l&&(u=-u);var t=t+u,q=f[4*e+q],v=k.model.getTerminal(m,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,t+u))):(r.push(new mxPoint(t,
-q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t+u,q)))}q=a.x.length-1;t=u=-1;p=a.maxRank-1;for(s&&(q=0,u=a.x.length,t=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=u;q+=t){var v=a.x[q]+b,A=(this.rankTopY[p]+this.rankBottomY[p+1])/2,y=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var x=A,A=y,y=x;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,A)),r.push(new mxPoint(v,y))):(r.push(new mxPoint(A,v)),r.push(new mxPoint(y,
+q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t+u,q)))}q=a.x.length-1;t=u=-1;p=a.maxRank-1;for(s&&(q=0,u=a.x.length,t=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=u;q+=t){var v=a.x[q]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,z=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var y=x,x=z,z=y;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,x)),r.push(new mxPoint(v,z))):(r.push(new mxPoint(x,v)),r.push(new mxPoint(z,
v)));this.limitX=Math.max(this.limitX,v);p+=t}null!=f&&(q=s?2:0,t=s?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],u=f[4*e+3-q],s!=l&&(u=-u),t-=u,q=f[4*e+2-q],s=k.model.getTerminal(m,!1),p=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(s)&&k.model.getParent(s)==p&&(q=k.view.getState(s),q=null!=q?q.x:p.geometry.x+a.target.width*s.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
r.push(new mxPoint(q,t-u)),r.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t-u,q)),r.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,r);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};
@@ -1027,8 +1027,8 @@ mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.in
g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microsoft-com:vml" xmlns:o\x3d"urn:schemas-microsoft-com:office:office"\x3e'):("CSS1Compat"===document.compatMode&&g.writeln("\x3c!DOCTYPE html\x3e"),g.writeln("\x3chtml\x3e"));g.writeln("\x3chead\x3e");this.writeHead(g,a);g.writeln("\x3c/head\x3e");g.writeln('\x3cbody class\x3d"mxPage"\x3e')}var l=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),m=n/this.scale,p=this.graph.getView().getTranslate();this.autoOrigin||
(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=m;l.height/=m;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*t;var u=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<q)){var a=this.createPageSelector(t,q);g.body.appendChild(a);
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){a.style.position="absolute";var b=function(){a.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),v=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;
-if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var y=0;y<A.length;y++)v(A[y],!0);for(var x=this.getAppendices(this.pageFormat.width,this.pageFormat.height),y=0;y<t;y++){var z=y*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
-q;a++){if(null==this.wnd)return null;var C=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,E=y*q+a+1,D=new mxRectangle(C,z,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-C,-z,this.scale,E,a,D);this.printBackgroundImage&&this.insertBackgroundImage(a,-C,-z)}),E);f.setAttribute("id","mxPage-"+E);v(f,null!=x||y<t-1||a<q-1)}}if(null!=x)for(y=0;y<x.length;y++)v(x[y],y<x.length);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
+if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),x=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=x)for(var z=0;z<x.length;z++)v(x[z],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),z=0;z<t;z++){var A=z*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
+q;a++){if(null==this.wnd)return null;var D=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,E=z*q+a+1,B=new mxRectangle(D,A,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-D,-A,this.scale,E,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-D,-A)}),E);f.setAttribute("id","mxPage-"+E);v(f,null!=y||z<t-1||a<q-1)}}if(null!=y)for(z=0;z<y.length;z++)v(y[z],z<y.length);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
f&&null!=f.parentNode&&f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1155,25 +1155,25 @@ b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&
a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom: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&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?!mxUtils.contains(c,d.x,k)&&!mxUtils.contains(b,d.x,k)&&e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/
2,k)))))},SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,n=!0,m=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var m=[],s=0;s<d.length;s++){var q=a.view.transformControlPoint(a,d[s]);null!=
-q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var m=d[0],t=b,u=g[0],v=!1,A=!1,v=m;null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);for(s=0;2>s;s++){var y=null!=u&&u.x==v.x,x=null!=u&&u.y==v.y,z=null!=t&&v.y>=t.y&&
-v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=x||null==u&&z,A=y||null==u&&t;if(!(0==s&&(v&&A||y&&x))){if(null!=u&&!x&&!y&&(z||t)){n=z?!1:!0;break}if(A||v){n=v;1==s&&(n=0==d.length%2?v:A);break}}t=c;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];y&&x&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
+q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var m=d[0],t=b,u=g[0],v=!1,x=!1,v=m;null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);for(s=0;2>s;s++){var z=null!=u&&u.x==v.x,y=null!=u&&u.y==v.y,A=null!=t&&v.y>=t.y&&
+v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=y||null==u&&A,x=z||null==u&&t;if(!(0==s&&(v&&x||z&&y))){if(null!=u&&!y&&!z&&(A||t)){n=A?!1:!0;break}if(x||v){n=v;1==s&&(n=0==d.length%2?v:x);break}}t=c;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];z&&y&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
p.y));n?p.y=m.y:p.x=m.x;for(s=0;s<d.length;s++)n=!n,m=d[s],n?p.y=m.y:p.x=m.x,f(p.clone())}else m=p,n=!0;p=g[r];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=m&&(n&&(null!=g[r]&&g[r].y!=m.y||null==g[r]&&null!=c&&(m.y<c.y||m.y>c.y+c.height))?f(new mxPoint(p.x,m.y)):!n&&(null!=g[r]&&g[r].x!=m.x||null==g[r]&&null!=c&&(m.x<c.x||m.x>c.x+c.width))&&f(new mxPoint(m.x,p.y))));if(null==g[0]&&null!=b)for(;1<
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[r]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=q&&null!=e[e.length-1]&&(Math.abs(q.x-e[e.length-1].x)<k&&Math.abs(q.y-e[e.length-1].y)<k)&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-q.x)<k&&(e[e.length-1].x=q.x),Math.abs(e[e.length-1].y-q.y)<k&&(e[e.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,
dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,
2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,
VERTEX_MASK:3072,getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+
-mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],n=f[f.length-1],m=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,s=null!=b?b.height:0,q=null!=c?c.x:n.x,t=null!=c?c.y:n.y,u=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),A=a.view.scale*
-mxEdgeStyle.getJettySize(a,b,c,d,!1);null!=b&&c==b&&(f=A=Math.max(f,A));var y=A+f,x=!1;if(null!=l&&null!=n)var x=n.x-l.x,z=n.y-l.y,x=x*x+z*z<y*y;if(x||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];x=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(m,
-p,r,s),x),m=x.x,p=x.y,r=x.width,s=x.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(q,t,u,v),x),q=x.x,t=x.y,u=x.width,v=x.height));m=Math.round(10*m)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;a=[0,0];m=[[m,p,r,s],[q,t,u,v]];A=[f,A];for(x=0;2>
-x;x++)mxEdgeStyle.limits[x][1]=m[x][0]-A[x],mxEdgeStyle.limits[x][2]=m[x][1]-A[x],mxEdgeStyle.limits[x][4]=m[x][0]+m[x][2]+A[x],mxEdgeStyle.limits[x][8]=m[x][1]+m[x][3]+A[x];A=m[0][1]+m[0][3]/2;p=m[1][1]+m[1][3]/2;x=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);z=A-p;A=0;0>x?A=0>z?2:1:0>=z&&(A=3,0==x&&(A=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(x=0;2>x;x++)null!=p&&(b[x][0]=(p.x-m[x][0])/m[x][2],1>=Math.abs(p.x-m[x][0])?a[x]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-m[x][0]-m[x][2])&&(a[x]=
-mxConstants.DIRECTION_MASK_EAST),b[x][1]=(p.y-m[x][1])/m[x][3],1>=Math.abs(p.y-m[x][1])?a[x]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-m[x][1]-m[x][3])&&(a[x]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=n);x=m[0][1]-(m[1][1]+m[1][3]);n=m[0][0]-(m[1][0]+m[1][2]);p=m[1][1]-(m[0][1]+m[0][3]);r=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(n-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]=
-Math.max(r-y,0);y=[];c=[];l=[];c[0]=n>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=x>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);n=n>=r?n:r;p=x>=p?x:p;r=[[0,0],[0,0]];s=!1;for(x=0;2>x;x++)0==a[x]&&(0==(c[x]&d[x])&&(c[x]=mxUtils.reversePortConstraints(c[x])),0==(l[x]&d[x])&&(l[x]=mxUtils.reversePortConstraints(l[x])),r[x][0]=l[x],r[x][1]=c[x]);0<p&&0<n&&(0<(c[0]&d[0])&&
-0<(l[1]&d[1])?(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],s=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],s=!0);0<n&&!s&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(x=0;2>x;x++)if(0==a[x]&&(0==(r[x][0]&d[x])&&(r[x][0]=r[x][1]),y[x]=r[x][0]&d[x],y[x]|=(r[x][1]&d[x])<<8,y[x]|=(r[1-x][x]&d[x])<<16,y[x]|=(r[1-x][1-x]&d[x])<<24,0==(y[x]&15)&&(y[x]<<=8),0==(y[x]&3840)&&(y[x]=
-y[x]&15|y[x]>>8),0==(y[x]&983040)&&(y[x]=y[x]&65535|(y[x]&251658240)>>8),a[x]=y[x]&15,d[x]==mxConstants.DIRECTION_MASK_WEST||d[x]==mxConstants.DIRECTION_MASK_NORTH||d[x]==mxConstants.DIRECTION_MASK_EAST||d[x]==mxConstants.DIRECTION_MASK_SOUTH))a[x]=d[x];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=A;y-=A;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
-f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(x=0;x<d.length;x++)l=d[x]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=A,4<q&&(q-=4),n=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=y&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[x]&mxEdgeStyle.TARGET_MASK),s=0<(d[x]&mxEdgeStyle.SOURCE_MASK),p=(d[x]&mxEdgeStyle.SIDE_MASK)>>5,p<<=A,15<p&&(p>>=4),r=0<(d[x]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?m[s][0]+b[s][0]*m[s][2]:r?m[s][1]+b[s][1]*
-m[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*n[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*n[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=n[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=n[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:y=l;for(x=0;x<=f&&!(x==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
-mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);x++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[x][0]),Math.round(mxEdgeStyle.wayPoints1[x][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
+mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],n=f[f.length-1],m=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,s=null!=b?b.height:0,q=null!=c?c.x:n.x,t=null!=c?c.y:n.y,u=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*
+mxEdgeStyle.getJettySize(a,b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var z=x+f,y=!1;if(null!=l&&null!=n)var y=n.x-l.x,A=n.y-l.y,y=y*y+A*A<z*z;if(y||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];y=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(m,
+p,r,s),y),m=y.x,p=y.y,r=y.width,s=y.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(q,t,u,v),y),q=y.x,t=y.y,u=y.width,v=y.height));m=Math.round(10*m)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;a=[0,0];m=[[m,p,r,s],[q,t,u,v]];x=[f,x];for(y=0;2>
+y;y++)mxEdgeStyle.limits[y][1]=m[y][0]-x[y],mxEdgeStyle.limits[y][2]=m[y][1]-x[y],mxEdgeStyle.limits[y][4]=m[y][0]+m[y][2]+x[y],mxEdgeStyle.limits[y][8]=m[y][1]+m[y][3]+x[y];x=m[0][1]+m[0][3]/2;p=m[1][1]+m[1][3]/2;y=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);A=x-p;x=0;0>y?x=0>A?2:1:0>=A&&(x=3,0==y&&(x=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(y=0;2>y;y++)null!=p&&(b[y][0]=(p.x-m[y][0])/m[y][2],1>=Math.abs(p.x-m[y][0])?a[y]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-m[y][0]-m[y][2])&&(a[y]=
+mxConstants.DIRECTION_MASK_EAST),b[y][1]=(p.y-m[y][1])/m[y][3],1>=Math.abs(p.y-m[y][1])?a[y]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-m[y][1]-m[y][3])&&(a[y]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=n);y=m[0][1]-(m[1][1]+m[1][3]);n=m[0][0]-(m[1][0]+m[1][2]);p=m[1][1]-(m[0][1]+m[0][3]);r=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(n-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(y-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[3]=
+Math.max(r-z,0);z=[];c=[];l=[];c[0]=n>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=y>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);n=n>=r?n:r;p=y>=p?y:p;r=[[0,0],[0,0]];s=!1;for(y=0;2>y;y++)0==a[y]&&(0==(c[y]&d[y])&&(c[y]=mxUtils.reversePortConstraints(c[y])),0==(l[y]&d[y])&&(l[y]=mxUtils.reversePortConstraints(l[y])),r[y][0]=l[y],r[y][1]=c[y]);0<p&&0<n&&(0<(c[0]&d[0])&&
+0<(l[1]&d[1])?(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],s=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],s=!0);0<n&&!s&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(y=0;2>y;y++)if(0==a[y]&&(0==(r[y][0]&d[y])&&(r[y][0]=r[y][1]),z[y]=r[y][0]&d[y],z[y]|=(r[y][1]&d[y])<<8,z[y]|=(r[1-y][y]&d[y])<<16,z[y]|=(r[1-y][1-y]&d[y])<<24,0==(z[y]&15)&&(z[y]<<=8),0==(z[y]&3840)&&(z[y]=
+z[y]&15|z[y]>>8),0==(z[y]&983040)&&(z[y]=z[y]&65535|(z[y]&251658240)>>8),a[y]=z[y]&15,d[y]==mxConstants.DIRECTION_MASK_WEST||d[y]==mxConstants.DIRECTION_MASK_NORTH||d[y]==mxConstants.DIRECTION_MASK_EAST||d[y]==mxConstants.DIRECTION_MASK_SOUTH))a[y]=d[y];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;z-=x;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
+0:1;for(y=0;y<d.length;y++)l=d[y]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=x,4<q&&(q-=4),n=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[y]&mxEdgeStyle.TARGET_MASK),s=0<(d[y]&mxEdgeStyle.SOURCE_MASK),p=(d[y]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),r=0<(d[y]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?m[s][0]+b[s][0]*m[s][2]:r?m[s][1]+b[s][1]*
+m[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*n[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*n[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=n[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=n[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:z=l;for(y=0;y<=f&&!(y==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);y++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[y][0]),Math.round(mxEdgeStyle.wayPoints1[y][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);
mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;
@@ -2024,8 +2024,8 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'\x3csvg width\x3d"'+c+'" height\x3d"'+
c+'" xmlns\x3d"'+mxConstants.NS_SVG+'"\x3e\x3cdefs\x3e\x3cpattern id\x3d"grid" width\x3d"'+c+'" height\x3d"'+c+'" patternUnits\x3d"userSpaceOnUse"\x3e\x3cpath d\x3d"'+d.join(" ")+'" fill\x3d"none" stroke\x3d"'+a+'" opacity\x3d"0.2" stroke-width\x3d"1"/\x3e\x3cpath d\x3d"M '+c+" 0 L 0 0 0 "+c+'" fill\x3d"none" stroke\x3d"'+a+'" stroke-width\x3d"1"/\x3e\x3c/pattern\x3e\x3c/defs\x3e\x3crect width\x3d"100%" height\x3d"100%" fill\x3d"url(#grid)"/\x3e\x3c/svg\x3e'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=
function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,
-q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var t=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),u=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,A=q.x+b,y=q.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?u:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
-[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*t.height)),new mxPoint(Math.round(A),Math.round(q.y+(c+1)*t.height))]:[new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
+q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var t=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),u=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,x=q.x+b,z=q.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?u:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
+[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*t.height)),new mxPoint(Math.round(x),Math.round(q.y+(c+1)*t.height))]:[new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var e=0;e<c.length;e++)if(this.graph.getModel().isVertex(c[e])){var f=this.graph.getCellGeometry(c[e]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.apply(this,arguments);a.intersects=
mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=a.width/this.scale,e=a.height/this.scale,f=this.graph.pageFormat,g=this.graph.pageScale,
a=f.width*g,f=f.height*g,g=Math.floor(Math.min(0,b)/a),q=Math.floor(Math.min(0,c)/f),b=Math.ceil(Math.max(1,b+d)/a),c=Math.ceil(Math.max(1,c+e)/f);return new mxRectangle(this.scale*(this.translate.x+g*a),this.scale*(this.translate.y+q*f),this.scale*(b-g)*a,this.scale*(c-q)*f)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);if(this.dialect!=mxConstants.DIALECT_SVG&&null!=this.view.backgroundPageShape&&(!this.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.container)))this.view.backgroundPageShape.node.style.marginLeft=
@@ -2043,13 +2043,13 @@ mxClient.IS_MAC&&mxEvent.isMetaDown(a))};var l=!1,n=null,m=null,p=null,r=mxUtils
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 u=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.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 v="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 y=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
-z=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<z.length;a++)for(b=0;b<z[a].length;b++)v.push(z[a][b]);for(a=0;a<A.length;a++)v.push(A[a]);var C=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=v.slice(),f=0;f<n.length;f++){var p=n[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),s=mxUtils.indexOf(m,q);0<=s&&m.splice(s,1);for(var t=0;t<z.length;t++){var u=z[t];if(0<=mxUtils.indexOf(u,q))for(var y=0;y<u.length;y++){var x=mxUtils.indexOf(m,u[y]);0<=x&&m.splice(x,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var q=m[f],C=e[q];if(null!=
-C&&("shape"!=q||c))(!c||0>mxUtils.indexOf(A,q))&&d.setCellStyles(q,C,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){C(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"));C(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(y,c[g]);if("strokeColor"!=c[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,c[g]))f||0<=mxUtils.indexOf(x,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(v,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:
-d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(v,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(x,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=
+this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="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"],y="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
+A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<A.length;a++)for(b=0;b<A[a].length;b++)v.push(A[a][b]);for(a=0;a<x.length;a++)v.push(x[a]);var D=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=v.slice(),f=0;f<n.length;f++){var p=n[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),s=mxUtils.indexOf(m,q);0<=s&&m.splice(s,1);for(var t=0;t<A.length;t++){var u=A[t];if(0<=mxUtils.indexOf(u,q))for(var z=0;z<u.length;z++){var y=mxUtils.indexOf(m,u[z]);0<=y&&m.splice(y,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var q=m[f],D=e[q];if(null!=
+D&&("shape"!=q||c))(!c||0>mxUtils.indexOf(x,q))&&d.setCellStyles(q,D,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){D(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"));D(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(x,c[g]))f||0<=mxUtils.indexOf(y,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(v,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:
+d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(v,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(y,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&&
@@ -2084,12 +2084,12 @@ mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px
"":"none"})}null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow")||"Open in New Window");a.lightbox&&this.container!=document.body&&d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,(mxResources.get("close")||
"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||s(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,
"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||s(30)}));var u=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&(Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u)&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=
-this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}A.apply(this,arguments)};var y=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;
-if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):y.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
-1;var x=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
-this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=x&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-x.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
-2-x.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&(Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u)&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=
+this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;
+if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):z.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
+1;var y=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
+this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=y&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-y.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
+2-y.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){y=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
break}d=d.parentNode}}))};EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
EditorUi.prototype.lightboxFit=function(){this.editor.graph.maxFitScale=2;this.editor.graph.fit(20);this.editor.graph.maxFitScale=null};EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};
@@ -2175,12 +2175,12 @@ d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout
"#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):
c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
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 u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,
-arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.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 y=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 y.apply(this,arguments)};var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=
+arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(x=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=x)}));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 y=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return y.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 n=g.getChildCount(e),m=0;m<n;m++){var p=g.getChildAt(e,m),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var q=
-mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(r=mxUtils.getBoundingBox(r,q));(g.isEdge(p)||g.isVertex(p))&&(r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:z.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 C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();C=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!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=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,
+mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(r=mxUtils.getBoundingBox(r,q));(g.isEdge(p)||g.isVertex(p))&&(r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:A.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 D=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();D=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!=D?this.addSelectionCells(D):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);D=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,
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkTarget="_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;
Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
@@ -2286,7 +2286,7 @@ this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot
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),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);b.setGeometry(e,k);var m=this.view.getState(e),p=this.view.getState(f),r=this.view.getState(g);if(null!=m){var q=null!=p?this.getConnectionConstraint(m,p,!0):null,s=null!=r?this.getConnectionConstraint(m,r,!1):null;this.setConnectionConstraint(e,f,!0,s);this.setConnectionConstraint(e,g,!1,q)}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 t=k.width;k.width=k.height;k.height=t;b.setGeometry(e,k);var v=this.view.getState(e);if(null!=v){var u=v.style[mxConstants.STYLE_DIRECTION]||"east";"east"==u?u="south":"south"==u?u="west":"west"==u?u="north":"north"==u&&(u="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,u,[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&&
+2;k.y+=k.height/2-k.width/2;var t=k.width;k.width=k.height;k.height=t;b.setGeometry(e,k);var u=this.view.getState(e);if(null!=u){var v=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,v,[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,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.setAttributeForCell=function(a,b,c){var d=null;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),
@@ -2297,7 +2297,7 @@ e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(
function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html\x3d1;resizable\x3d0;points\x3d[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align\x3dcenter;verticalAlign\x3dmiddle;labelBackgroundColor\x3d#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=
new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getLinkUrl=
function(a){return a};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isBlankLink=function(a){var b=this.domainUrl;return"self"!=urlParams.target&&null!=a&&"#"!=a.charAt(0)&&a.substring(0,b.length)!=b&&!this.isRelativeUrl(a)};Graph.prototype.isRelativeUrl=function(a){return!/^(?:[a-z]+:)?\/\//i.test(a)&&"data:image"!=a.substring(0,10)&&"mailto:"!=a.substring(0,7)};Graph.prototype.addClickHandler=
-function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),d.charAt("#")?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
+function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),"#"===d.charAt(0)?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
"click",b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,
b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else"a"==b.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&
(b.getState()==this.currentState||null==b.getState())&&g.intersects(this.currentState,b.getGraphX(),b.getGraphY())||this.updateCurrentState(b)},mouseUp:function(a,d){var e=d.getSource(),k=this.currentLink;this.clear();if("a"!=e.nodeName.toLowerCase()&&!d.isConsumed()&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(d.getEvent())||mxEvent.isTouchEvent(d.getEvent())))null!=k?(g.isBlankLink(k)?window.open(k):(null!=b&&b(d.getEvent()),"#"==k.charAt(0)?window!=window.top?
@@ -2364,13 +2364,13 @@ var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph
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 q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),u=0):u=(new Date).getTime()-t;this.currentTerminalState=
-c};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
+c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;
-this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&(null!=d&&d.relative)&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):z.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.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 E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node)&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?
+this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&(null!=d&&d.relative)&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return y.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):A.apply(this,arguments)};var D=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&D.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 E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node)&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?
"":"none")};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=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(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(c);null!=c&&(a=!0);a&&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=
@@ -2385,8 +2385,8 @@ function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind
a.height+6+this.state.view.graph.tolerance)+"px"}};var da=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),
this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function n(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function s(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;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 A(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function x(){mxCylinder.call(this)}function z(){mxShape.call(this)}function C(){mxShape.call(this)}function E(){mxEllipse.call(this)}function D(){mxShape.call(this)}
-function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function O(){mxShape.call(this)}function K(){mxShape.call(this)}function S(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function da(){mxDoubleEllipse.call(this)}function U(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
+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 x(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function A(){mxShape.call(this)}function D(){mxShape.call(this)}function E(){mxEllipse.call(this)}function B(){mxShape.call(this)}
+function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function O(){mxShape.call(this)}function K(){mxShape.call(this)}function S(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function da(){mxDoubleEllipse.call(this)}function U(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
function aa(){mxActor.call(this)}function M(){mxActor.call(this)}function J(){mxActor.call(this)}function N(){mxActor.call(this)}function R(){mxActor.call(this)}function ca(){mxActor.call(this)}function $(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function T(){mxEllipse.call(this)}function P(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}
function ka(){mxActor.call(this)}function ba(){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,
@@ -2412,15 +2412,15 @@ c));a.close();a.end();a.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.pai
a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(u,mxActor);u.prototype.size=0.2;u.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=u;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-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=v;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(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.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};y.prototype.paintForeground=function(a,b,c,
+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=v;mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.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=x;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"],n=this.style["symbol"+f+"Width"],m=this.style["symbol"+
f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,r=this.style["symbol"+f+"ArcSpacing"];null!=r&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*r);var r=b,q=c,r=k==mxConstants.ALIGN_CENTER?r+(d-n)/2:k==mxConstants.ALIGN_RIGHT?r+(d-n-p):r+p,q=l==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:l==mxConstants.ALIGN_BOTTOM?q+(e-m-p):q+p;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,r,q,n,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.prototype.defaultShapes.ext=y;mxUtils.extend(x,mxCylinder);x.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=x;mxUtils.extend(z,mxShape);z.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=z;mxUtils.extend(C,mxShape);C.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};C.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=C;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(D,mxShape);D.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,
-0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=D;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
+arguments)};mxCellRenderer.prototype.defaultShapes.ext=z;mxUtils.extend(y,mxCylinder);y.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=y;mxUtils.extend(A,mxShape);A.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=A;mxUtils.extend(D,mxShape);D.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};D.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=D;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(B,mxShape);B.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,
+0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=B;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=G&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,
@@ -2431,8 +2431,8 @@ c.y<a.getCenterY()&&(d+=1,d*=-1);return new mxPoint(Math.min(a.x+a.width,Math.ma
O;mxUtils.extend(K,mxShape);K.prototype.size=10;K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
K;mxUtils.extend(S,mxCylinder);S.prototype.jettyWidth=32;S.prototype.jettyHeight=12;S.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,k=0.3*e-b/2,l=0.7*e-b/2;f?(a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b),a.moveTo(c,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(c,l+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
a.lineTo(c,l+b),a.lineTo(0,l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=S;mxUtils.extend(W,mxDoubleEllipse);W.prototype.outerStroke=!0;W.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=
-W;mxUtils.extend(da,W);da.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=da;mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=4;U.prototype.isOpenEnded=function(){return!0};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};U.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=U;mxUtils.extend(B,mxArrowConnector);B.prototype.defaultWidth=
-10;B.prototype.defaultArrowWidth=20;B.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};B.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};B.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=B;mxUtils.extend(Y,
+W;mxUtils.extend(da,W);da.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=da;mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=4;U.prototype.isOpenEnded=function(){return!0};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};U.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=U;mxUtils.extend(C,mxArrowConnector);C.prototype.defaultWidth=
+10;C.prototype.defaultArrowWidth=20;C.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};C.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};C.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=C;mxUtils.extend(Y,
mxActor);Y.prototype.size=30;Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=Y;mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=function(){return!1};
L.prototype.paintForeground=function(a,b,c,d,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(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();
a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=L;mxUtils.extend(I,mxActor);I.prototype.dx=20;I.prototype.dy=20;I.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,
@@ -2489,10 +2489,10 @@ ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b
b-q.y;b=(p*a-m*d)/(l*p-n*m);a=(n*a-l*d)/(n*m-l*p);r?(c&&(q=new mxPoint(q.x+l*b,q.y+n*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+l*b,q.y+n*b));e.push(q)};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=
+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;x.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;T.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;
Y.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;$.prototype.constraints=mxRectangleShape.prototype.constraints;Q.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)];z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
+!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)];A.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)];S.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,
0.2),!1),new mxConnectionConstraint(new mxPoint(0.1,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(0.75,0.25),!1),new mxConnectionConstraint(new mxPoint(0.9,0.5),!1),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)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0.5,
@@ -2548,7 +2548,7 @@ function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,"Ctrl+Shift+R");this.
f-m));f=Math.round(d.snap(d.popupMenuHandler.triggerY/f-e));b.addPointAt(b.state,m,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var e=d.getCellGeometry(c);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(c,
e))}}}finally{d.getModel().endUpdate()}}});f=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,"Ctrl+,");f=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,"Ctrl+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+
"):",c=d.getView().getState(d.getSelectionCell()),e="";null!=c&&(e=c.style[mxConstants.STYLE_IMAGE]||e);var f=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,b,c){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,b,c);else{var e=d.getSelectionCells();if(null!=a){var g=null;d.getModel().beginUpdate();try{if(0==e.length)var k=d.getFreeInsertPoint(),g=e=[d.insertVertex(d.getDefaultParent(),null,"",k.x,k.y,b,c,"shape\x3dimage;imageAspect\x3d0;aspect\x3dfixed;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;")];
-d.setCellStyles(mxConstants.STYLE_IMAGE,a,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var A=e[0],y=d.getModel().getGeometry(A);null!=y&&(y=y.clone(),y.width=b,y.height=c,d.getModel().setGeometry(A,y))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),
+d.setCellStyles(mxConstants.STYLE_IMAGE,a,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var x=e[0],z=d.getModel().getGeometry(x);null!=z&&(z=z.clone(),z.width=b,z.height=c,d.getModel().setGeometry(x,z))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),
!d.cellEditor.isContentEditing())}}).isEnabled=e;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=e;f=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",
function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,"Ctrl+Shift+L");f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));f=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,"Ctrl+Shift+P");f.setToggleAction(!0);
f.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));f=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):
@@ -2623,8 +2623,8 @@ a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d
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("0"!=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"0"!=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.createFileData=function(a,b,c,d,e,f,g,q,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;t=null!=t?t:!0;var u=null,v=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?u="_blank":v=u=d;if(null==a)return"";
-var A=a;if("mxfile"!=A.nodeName.toLowerCase()){var y=b.zapGremlins(mxUtils.getXml(a)),A=b.compress(y);if(b.decompress(A)!=y)return y;y=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(y,A);A=a.ownerDocument.createElement("mxfile");A.appendChild(y)}A.setAttribute("userAgent",navigator.userAgent);A.setAttribute("version",EditorUi.VERSION);A.setAttribute("editor","www.draw.io");a=null!=c?c.getMode():this.mode;null!=a&&A.setAttribute("type",a);a=mxUtils.getXml(A);if(!f&&!e&&(g||null!=c&&
-/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(A),b,null!=c?c.getTitle():null,u,v);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,t,v)}return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));
+var x=a;if("mxfile"!=x.nodeName.toLowerCase()){var z=b.zapGremlins(mxUtils.getXml(a)),x=b.compress(z);if(b.decompress(x)!=z)return z;z=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(z,x);x=a.ownerDocument.createElement("mxfile");x.appendChild(z)}x.setAttribute("userAgent",navigator.userAgent);x.setAttribute("version",EditorUi.VERSION);x.setAttribute("editor","www.draw.io");a=null!=c?c.getMode():this.mode;null!=a&&x.setAttribute("type",a);a=mxUtils.getXml(x);if(!f&&!e&&(g||null!=c&&
+/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(x),b,null!=c?c.getTitle():null,u,v);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,t,v)}return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));
mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var f=this.pages[e].mapping;this.currentPage!=this.pages[e]&&(null!=f&&f.needsUpdate)&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};
EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var q=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=q&&/(\.svg)$/i.test(q.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var t=f.getGlobalVariable,u=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(f.container);
f.model.setRoot(u.root)}a=this.createFileData(g,f,q,window.location.href,a,b,c,d,e);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),t=b.view.scale;f=Math.floor(g.x/t-b.view.translate.x);t=Math.floor(g.y/t-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),
@@ -2637,9 +2637,9 @@ mxUtils.htmlEntities(JSON.stringify(a))+'"\x3e\x3c/div\x3e\n'+(null==e?'\x3cscri
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"),"0"!=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}"0"!=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)};EditorUi.prototype.downloadFile=function(a,b,c,d,e){try{var f=this.getCurrentFile();
d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));var q=g+"."+a;if("xml"==a){var t='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,t,"text/xml")}else if("html"==a)t=this.getHtml2(this.getFileData(!0),this.editor.graph,g),
-this.saveData(q,a,t,"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var u=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var A=this.editor.graph.background;A==mxConstants.NONE&&(A=null);var y=this.editor.graph.getSvg(A,null,null,!1,null,
-d);c&&this.editor.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else{var x=this.editor.graph.getGraphBounds(),t=this.getFileData(!0,null,null,null,d,"xmlpng"!=
-a),z="";if(x.width*x.height<=MAX_AREA&&t.length<=MAX_REQUEST_SIZE){var C="0";if("xmlpng"==a&&(C="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){z="\x26from\x3d"+b;break}this.saveRequest(t,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+z+"\x26base64\x3d"+c+"\x26embedXml\x3d"+C+"\x26xml\x3d"+encodeURIComponent(t)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
+this.saveData(q,a,t,"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var u=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var x=this.editor.graph.background;x==mxConstants.NONE&&(x=null);var z=this.editor.graph.getSvg(x,null,null,!1,null,
+d);c&&this.editor.addSvgShadow(z);this.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else{var y=this.editor.graph.getGraphBounds(),t=this.getFileData(!0,null,null,null,d,"xmlpng"!=
+a),A="";if(y.width*y.height<=MAX_AREA&&t.length<=MAX_REQUEST_SIZE){var D="0";if("xmlpng"==a&&(D="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){A="\x26from\x3d"+b;break}this.saveRequest(t,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+A+"\x26base64\x3d"+c+"\x26embedXml\x3d"+D+"\x26xml\x3d"+encodeURIComponent(t)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
mxResources.get("error"))}}catch(E){this.handleError(E)}};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=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);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=
a)try{if(this.setCurrentFile(a),a.addListener("descriptorChanged",this.descriptorChangedListener),a.addListener("contentChanged",this.descriptorChangedListener),this.setMode(a.getMode()),this.descriptorChanged(),a.open(),this.diagramContainer.style.visibility="",this.formatContainer.style.visibility="",this.hsplit.style.display="",this.sidebarContainer.style.display="",this.sidebarFooterContainer.style.display="",this.editor.undoManager.clear(),this.updateUi(),null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):
@@ -2647,130 +2647,131 @@ this.editor.setStatus(mxResources.get("readOnly"))),this.editor.chromeless?this.
a,e),this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):c()}))}else c()};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
a,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));
-this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),
-mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+
-"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);c=g.parentNode.previousSibling;d=c.getAttribute("title");null!=d&&(0<d.length&&".scratchpad"!=a.title)&&c.setAttribute("title",
-this.getLibraryStorageHint(a)+"\n"+d);var q=document.createElement("div");q.style.position="absolute";q.style.right="0px";q.style.top="5px";c.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.marginRight="8px";t.style.marginTop="3px";q.appendChild(t);var u=null;mxEvent.addListener(t,"click",mxUtils.bind(this,
-function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var v=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),
-y=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=t.cloneNode(!1),C.setAttribute("src",EditorUi.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="6px",C.style.marginTop="2px",q.insertBefore(C,q.firstChild),this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C)})):null==u&&(u=t.cloneNode(!1),u.setAttribute("src",
-IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),q.insertBefore(u,q.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);u.parentNode.removeChild(u);u=null;mxEvent.consume(c)})))}),x=mxUtils.bind(this,function(a,c,d,f){a=v.cloneCells(v.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var n=v.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);y(d);null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}),z=mxUtils.bind(this,function(a){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(a),v.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
-v.getSelectionCells(),c=v.view.getBounds(b),d=v.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=v.view.translate.x;c.y-=v.view.translate.y;x(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){v.isMouseDown&&(null!=v.panningManager&&null!=v.graphHandler.shape)&&(v.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",
-g.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!1),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){v.isMouseDown&&(null!=v.panningManager&&null!=v.graphHandler)&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),
-v.isMouseDown=!1,v.autoScroll=!0,z(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",v.autoScroll=!0,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!0),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,m,q,v){if(null!=c&&"image/"==d.substring(0,6)){var t="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,q),t)];t[0].vertex=!0;x(t,new mxRectangle(0,0,m,q),a,mxEvent.isAltDown(a)?null:v.substring(0,v.lastIndexOf(".")).replace(/_/g," "))}else{v=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var u=
-JSON.parse(mxUtils.getTextContent(c.documentElement));f(u,g);b=b.concat(u);y(a);this.spinner.stop();v=!0}catch(z){}else if("mxfile"==c.documentElement.nodeName)try{u=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(u)),x(t,new mxRectangle(0,0,m,q),a),v=!0}catch(A){}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),
-e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));q.insertBefore(t,q.firstChild);mxEvent.addListener(t,"click",A);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&A(a)});t=t.cloneNode(!1);
-t.setAttribute("src",EditorUi.plusImage);t.setAttribute("title",mxResources.get("add"));q.insertBefore(t,q.firstChild);this.isOffline()||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;margin-right:8px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),q.insertBefore(d,q.firstChild));var C=null;mxEvent.addListener(t,
-"click",z)}c.appendChild(q)};"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()&&"1"!=urlParams.embed)&&this.showSplash()}));a.init()};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.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
-"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+
-mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,
-!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,
-"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=
-!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type",
-"checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");
-t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&u.setAttribute("disabled","disabled");a&&(f.appendChild(u),mxUtils.write(f,mxResources.get("embedImages")),
-mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom="8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,v.checked,u.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"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);
-var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");
-A.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),y=document.createElement("input");y.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(y);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var x=a.lastIndexOf(".");
-0<x&&(a=a.substring(0,x));y.value=a+".png";var z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");z.value="master";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),C=document.createElement("input");C.setAttribute("type","text");mxUtils.write(q,"Message:");C.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(C);g.appendChild(q);f.appendChild(g);
-q=q.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/"+v.value+"/"+A.value+"/contents/"+y.value+"?ref\x3d"+encodeURIComponent(z.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:y.value,message:C.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/"+v.value+"/"+A.value+"/blob/"+z.value+"/"+y.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(t.value+":"+u.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("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),u=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+
-b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+
-e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,
-function(){200==l.getStatus()?k():u(l)}),mxUtils.bind(this,function(){u(l)}))}else k()}catch(p){this.handleError(p)}else u(a)}),mxUtils.bind(this,function(a){u(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);
-if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(u){this.handleError(u)}}})):this.showRemoteExportDialog(mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),
-e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");
-b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
-"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,A){f=null!=f?f:!0;A=null!=A?A:this.editor.graph;var y=t?null:A.background;y==mxConstants.NONE&&(y=null);null==y&&(y=d);null==y&&!1==t&&(y="#ffffff");this.convertImages(A.getSvg(y,null,null,null,null,null!=g?g:!0),
-mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),this.convertMath(A,c,!0,
-mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 n=a.getElementsByTagName(c),u=0;u<n.length;u++)mxUtils.bind(this,function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var s=f[n];null==s?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(n[u])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),
-t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=0;v<u.length;v++){var A=this.updatePageRoot(new DiagramPage(u[v])),y=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[y+1]));g.model.execute(new ChangePage(this,
-A,A,y))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var x=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,x);var z=x.getChildCount(x.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<z;v++){var C=x.getChildAt(x.getRoot(),v);if(1==z&&!g.isCellLocked(g.getDefaultParent()))var E=x.getChildren(C),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a));else C=g.importCells([C],0,0,g.model.getRoot(),null,a)[0],E=g.model.getChildren(C),
-g.moveCells(E,b,c),f=f.concat(E)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}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 q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=
-null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,b,c,f,!0),0<t.length)return t}catch(u){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
-null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted",
-"cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,
-b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,
-e,f,g,q,t,u,v){u=null!=u?u:!0;var A=!1,y=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(y=this.importXml(b,c,d,u),g=!0)),g||(y=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&y.isGridEnabled()&&(c=y.snap(c),d=y.snap(d)),y=[y.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
-a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(A=!0,this.parseFile(null!=t?t: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,u));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(t):y=this.insertTextAt(this.validateFileData(a),c,d,!0);!A&&null!=q&&q(y);return y};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,q,t,u,v,A){var y=null!=b&&null!=
-c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;t=null!=t?t:!0;var x=this.editor.graph,z=x.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,y,A)});f=null!=f?f:mxUtils.bind(this,function(a){x.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=
-a.length,E=C,D=[],F=mxUtils.bind(this,function(a,b){D[a]=b;if(0==--E){this.spinner.stop();if(null!=q)q(D);else{var c=[];x.getModel().beginUpdate();try{for(var d=0;d<D.length;d++){var e=D[d]();null!=e&&(c=c.concat(e))}}finally{x.getModel().endUpdate()}}f(c)}}),G=0;G<C;G++)mxUtils.bind(this,function(f){var q=a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),x=
-atob(k.substring(r+1)),y=mxUtils.parseXml(x),x=y.getElementsByTagName("svg");if(0<x.length){var x=x[0],C=A?null:x.getAttribute("content");null!=C&&("\x3c"!=C.charAt(0)&&"%"!=C.charAt(0))&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null!=C&&("\x3cmxfile "===C.substring(0,8)||"\x3cmxGraphModel "===C.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*z,c+f*z,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,
-r+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),v=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox","0 0 "+s+" "+v);else if(isNaN(s)||isNaN(v)){var u=t.split(" ");3<u.length&&(s=parseFloat(u[2]),v=parseFloat(u[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,v));return e(k,q.type,b+f*z,c+f*z,Math.max(1,Math.round(s*
-x)),Math.max(1,Math.round(v*x)),q.name)}}}catch(A){}return null}))}}else{x=!1;if("image/png"==q.type){var D=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var E=new Image;E.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*z,c+f*z,E.width,E.height,q.name)}));x=!0}}x||(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,k,r){F(f,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var s=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/r));return e(g,q.type,b+f*z,c+f*z,Math.round(k*s),Math.round(r*s),q.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),t,d,v)})))}else e(a.target.result,q.type,b+f*z,c+f*z,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*z,c+f*z,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):r.readAsText(q)})(G)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var t=Math.max(g/e,q/e);if(1<t){var u=Math.round(g/t),v=Math.round(q/t),A=document.createElement("canvas");A.width=u;A.height=v;A.getContext("2d").drawImage(a,0,0,u,v);var y=A.toDataURL();if(y.length<b.length){var x=
-document.createElement("canvas");x.width=u;x.height=v;var z=x.toDataURL();y!==z&&(b=y,g=u,q=v)}}}catch(C){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;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=q;q+=b;return a.substring(c,q)}
-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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>>16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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 e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.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: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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===
-c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");
-f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();
-document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&
-(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=
-this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();
-a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity=
-"0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
-"hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var u=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=u&&(u.parentNode.removeChild(u),u=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==u&&
-(!mxClient.IS_IE||10<document.documentMode))u=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=u&&(u.parentNode.removeChild(u),u=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=
-m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,
-null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};
-EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,
-d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),t=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(t)&&(e=!0,d=t)}catch(u){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||
-this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
-null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),
-"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,
-"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,
-function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-
-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,
-d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+
-1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));
+this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,
+c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==
+f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=
+q.getAttribute("title");null!=c&&(0<c.length&&".scratchpad"!=a.title)&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="5px";t.style.backgroundColor="inherit";q.style.position="relative";var u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("close"));u.setAttribute("align","top");u.setAttribute("border","0");u.className=
+"geButton";u.style.marginRight="1px";u.style.marginTop="-1px";t.appendChild(u);var v=null;mxEvent.addListener(u,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var x=
+this.editor.graph,z=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),y=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=u.cloneNode(!1),E.setAttribute("src",EditorUi.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",t.insertBefore(E,t.firstChild),q.style.paddingRight=18*t.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),q.style.paddingRight=18*t.childNodes.length+"px")})):null==v&&(v=u.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),t.insertBefore(v,t.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);v.parentNode.removeChild(v);v=null;q.style.paddingRight=
+18*t.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*t.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,c,d,f){a=x.cloneCells(x.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var n=x.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);
+y(d);null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}),D=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;A(b,c)}mxEvent.consume(a)});
+g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&(null!=x.panningManager&&null!=x.graphHandler.shape)&&(x.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&(null!=x.panningManager&&null!=x.graphHandler)&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,D(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility=
+"visible",g.style.border="3px solid transparent",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor=
+"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,m,q,t){if(null!=c&&"image/"==d.substring(0,6)){var u="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+this.convertDataUri(c),u=[new mxCell("",new mxGeometry(0,0,m,q),u)];u[0].vertex=!0;A(u,new mxRectangle(0,0,m,q),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))}else{t=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);y(a);this.spinner.stop();t=!0}catch(x){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
+u=this.stringToCells(this.editor.graph.decompress(v)),A(u,new mxRectangle(0,0,m,q),a),t=!0}catch(z){}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));
+u=u.cloneNode(!1);u.setAttribute("src",IMAGE_PATH+"/edit.gif");u.setAttribute("title",mxResources.get("edit"));t.insertBefore(u,t.firstChild);mxEvent.addListener(u,"click",z);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&z(a)});u=u.cloneNode(!1);u.setAttribute("src",EditorUi.plusImage);u.setAttribute("title",mxResources.get("add"));t.insertBefore(u,t.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),
+c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),t.insertBefore(c,t.firstChild));var E=null;mxEvent.addListener(u,"click",D)}q.appendChild(t);q.style.paddingRight=18*t.childNodes.length+"px"};"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()&&"1"!=urlParams.embed)&&this.showSplash()}));a.init()};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.handleError=
+function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=
+typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),
+g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};
+EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=
+document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,
+e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,
+mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));
+mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&u.setAttribute("disabled","disabled");a&&(f.appendChild(u),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom=
+"8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,v.checked,u.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"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);
+q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),x=document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);
+var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");0<y&&(a=a.substring(0,y));z.value=a+".png";var A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");A.value="master";
+g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),D=document.createElement("input");D.setAttribute("type","text");mxUtils.write(q,"Message:");D.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(D);g.appendChild(q);f.appendChild(g);q=q.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/"+
+v.value+"/"+x.value+"/contents/"+z.value+"?ref\x3d"+encodeURIComponent(A.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:z.value,message:D.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/"+v.value+"/"+x.value+"/blob/"+A.value+"/"+z.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(t.value+":"+u.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("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),u=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();
+var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),
+function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():u(l)}),mxUtils.bind(this,function(){u(l)}))}else k()}catch(p){this.handleError(p)}else u(a)}),mxUtils.bind(this,function(a){u(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,
+b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,
+e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(u){this.handleError(u)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*
+f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);
+if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&
+(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
+"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,x){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;var z=t?null:x.background;z==mxConstants.NONE&&(z=null);null==z&&(z=d);null==z&&!1==t&&(z="#ffffff");this.convertImages(x.getSvg(z,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=
+q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
+var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 n=a.getElementsByTagName(c),u=0;u<n.length;u++)mxUtils.bind(this,
+function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var s=f[n];null==s?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(n[u])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=
+mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=0;v<u.length;v++){var x=this.updatePageRoot(new DiagramPage(u[v])),z=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[z+1]));g.model.execute(new ChangePage(this,x,x,z))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var y=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,y);var A=y.getChildCount(y.getRoot());
+g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<A;v++){var D=y.getChildAt(y.getRoot(),v);if(1==A&&!g.isCellLocked(g.getDefaultParent()))var E=y.getChildren(D),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a));else D=g.importCells([D],0,0,g.model.getRoot(),null,a)[0],E=g.model.getChildren(D),g.moveCells(E,b,c),f=f.concat(E)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var B=g.getBoundingBoxFromGeometry(f,!0);null!=B&&g.moveCells(f,b-B.x,c-B.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||
+this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}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 q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,
+b,c,f,!0),0<t.length)return t}catch(u){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted",
+"cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
+g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,t,u,v){u=null!=u?u:!0;var x=!1,z=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(z=this.importXml(b,c,d,u),g=!0)),g||(z=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
+1))),u&&z.isGridEnabled()&&(c=z.snap(c),d=z.snap(d)),z=[z.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(x=!0,this.parseFile(null!=t?t: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,u));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(t):z=this.insertTextAt(this.validateFileData(a),c,d,!0);!x&&null!=q&&q(z);return z};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,q,t,u,v,x){var z=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;t=null!=t?t:!0;var y=this.editor.graph,A=y.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,z,x)});f=null!=f?f:mxUtils.bind(this,function(a){y.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var D=a.length,E=D,B=[],F=mxUtils.bind(this,function(a,b){B[a]=b;if(0==--E){this.spinner.stop();if(null!=q)q(B);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<B.length;d++){var e=B[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),G=0;G<D;G++)mxUtils.bind(this,function(f){var q=
+a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),y=atob(k.substring(r+1)),z=mxUtils.parseXml(y),y=z.getElementsByTagName("svg");if(0<y.length){var y=y[0],B=x?null:y.getAttribute("content");null!=B&&("\x3c"!=B.charAt(0)&&"%"!=B.charAt(0))&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null!=B&&("\x3cmxfile "===
+B.substring(0,8)||"\x3cmxGraphModel "===B.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*A,c+f*A,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,r+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),u=g.getAttribute("viewBox");if(null==u||0==u.length)g.setAttribute("viewBox","0 0 "+s+" "+t);else if(isNaN(s)||isNaN(t)){var v=u.split(" ");3<v.length&&(s=
+parseFloat(v[2]),t=parseFloat(v[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,t));return e(k,q.type,b+f*A,c+f*A,Math.max(1,Math.round(s*x)),Math.max(1,Math.round(t*x)),q.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==q.type){var D=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var E=new Image;E.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*A,c+f*A,E.width,E.height,
+q.name)}));y=!0}}y||(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,k,r){F(f,mxUtils.bind(this,function(){if(null!=
+g&&g.length<u){var s=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/r));return e(g,q.type,b+f*A,c+f*A,Math.round(k*s),Math.round(r*s),q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),t,d,v)})))}else e(a.target.result,q.type,b+f*A,c+f*A,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*A,c+f*A,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):
+r.readAsText(q)})(G)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
+f))try{var t=Math.max(g/e,q/e);if(1<t){var u=Math.round(g/t),v=Math.round(q/t),x=document.createElement("canvas");x.width=u;x.height=v;x.getContext("2d").drawImage(a,0,0,u,v);var z=x.toDataURL();if(z.length<b.length){var y=document.createElement("canvas");y.width=u;y.height=v;var A=y.toDataURL();z!==A&&(b=z,g=u,q=v)}}}catch(D){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;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=q;q+=b;return a.substring(c,q)}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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>>
+16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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 e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.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: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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,
+c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";
+f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=
+a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
+"\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
+this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
+null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var u=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=u&&(u.parentNode.removeChild(u),u=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==u&&(!mxClient.IS_IE||10<document.documentMode))u=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=u&&(u.parentNode.removeChild(u),u=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),
+e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,
+f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),t=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(t)&&(e=!0,d=t)}catch(u){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),
+c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],
+"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):
+this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&
+(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+
+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=
+mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
+[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-
+4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=
+d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(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=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){!this.editor.modified||"0"==urlParams.modified?this.editor.setStatus(""):null!=urlParams.modified&&this.editor.setStatus(mxResources.get(urlParams.modified))});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function r(a){if(null!=
a&&"function"===typeof a.charAt&&"\x3c"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var u=f.data;if("json"==urlParams.proto){u=JSON.parse(u);if("dialog"==u.action){this.showError(null!=u.titleKey?mxResources.get(u.titleKey):u.title,null!=u.messageKey?mxResources.get(u.messageKey):
u.message,null!=u.buttonKey?mxResources.get(u.buttonKey):u.button);null!=u.modified&&(this.editor.modified=u.modified);return}if("prompt"==u.action){var v=new FilenameDialog(this,u.defaultValue||"",null!=u.okKey?mxResources.get(u.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:u}),"*")},null!=u.titleKey?mxResources.get(u.titleKey):u.title);this.showDialog(v.container,300,80,!0,!1);v.init();return}if("draft"==u.action){v=null;v="data:image/png;base64,"==
u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):r(u.xml);v=new DraftDialog(this,mxResources.get("draftFound",[u.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:u}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:u}),"*")}),u.editKey?mxResources.get(u.editKey):null,u.discardKey?mxResources.get(u.discardKey):null);this.showDialog(v.container,
-640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{v.init()}catch(A){g.postMessage(JSON.stringify({event:"draft",error:A.toString(),message:u}),"*")}return}if("template"==u.action){v=new NewDialog(this,!1,null!=u.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=u.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));
-this.showDialog(v.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));v.init();return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxResources.get(u.messageKey)):null!=u.message&&this.editor.setStatus(u.message);null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var y=null!=u.messageKey?mxResources.get(u.messageKey):u.message;null!=u.show&&!u.show?this.spinner.stop():this.spinner.spin(document.body,y);return}if("export"==
-u.action){if("png"==u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin)){var x=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var z=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=u.format;b.xml=encodeURIComponent(x);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var C=
-this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var C=this.createTemporaryGraph(C.getStylesheet()),E=C.getGlobalVariable,D=this.pages[0];C.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:E.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(D.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==u.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(x))));
-C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);z(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==u.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(x)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&z(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
-u.xml&&0<u.xml.length&&this.setFileData(u.xml);y=this.createLoadMessage("export");if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))v=this.getXmlFileData(),y.xml=mxUtils.getXml(v),y.data=this.getFileData(null,null,!0,null,null,null,v),y.format=u.format;else if("html"==u.format)x=this.editor.getGraphXml(),y.data=this.getHtml(x,this.editor.graph),y.xml=mxUtils.getXml(x),y.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;v=this.editor.graph.background;
-v==mxConstants.NONE&&(v=null);y.xml=this.getFileData(!0);y.format="svg";if(u.embedImages||null==u.embedImages){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==u.format?this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(y),"*")})):this.convertImages(this.editor.graph.getSvg(v),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(y),"*")}));return}v="xmlsvg"==u.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(v));y.data=this.createSvgDataUri(v)}g.postMessage(JSON.stringify(y),"*")}return}if("load"==u.action)d=1==u.autosave,this.hideDialog(),null!=u.modified&&null==urlParams.modified&&(urlParams.modified=
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{v.init()}catch(x){g.postMessage(JSON.stringify({event:"draft",error:x.toString(),message:u}),"*")}return}if("template"==u.action){v=new NewDialog(this,!1,null!=u.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=u.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));
+this.showDialog(v.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));v.init();return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxResources.get(u.messageKey)):null!=u.message&&this.editor.setStatus(u.message);null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var z=null!=u.messageKey?mxResources.get(u.messageKey):u.message;null!=u.show&&!u.show?this.spinner.stop():this.spinner.spin(document.body,z);return}if("export"==
+u.action){if("png"==u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin)){var y=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var A=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=u.format;b.xml=encodeURIComponent(y);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var D=
+this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var D=this.createTemporaryGraph(D.getStylesheet()),E=D.getGlobalVariable,B=this.pages[0];D.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:E.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==u.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(y))));
+D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);A(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==u.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(y)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&A(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
+u.xml&&0<u.xml.length&&this.setFileData(u.xml);z=this.createLoadMessage("export");if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))v=this.getXmlFileData(),z.xml=mxUtils.getXml(v),z.data=this.getFileData(null,null,!0,null,null,null,v),z.format=u.format;else if("html"==u.format)y=this.editor.getGraphXml(),z.data=this.getHtml(y,this.editor.graph),z.xml=mxUtils.getXml(y),z.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;v=this.editor.graph.background;
+v==mxConstants.NONE&&(v=null);z.xml=this.getFileData(!0);z.format="svg";if(u.embedImages||null==u.embedImages){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==u.format?this.getEmbeddedSvg(z.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(z),"*")})):this.convertImages(this.editor.graph.getSvg(v),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(z),"*")}));return}v="xmlsvg"==u.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(v));z.data=this.createSvgDataUri(v)}g.postMessage(JSON.stringify(z),"*")}return}if("load"==u.action)d=1==u.autosave,this.hideDialog(),null!=u.modified&&null==urlParams.modified&&(urlParams.modified=
u.modified),null!=u.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=u.saveAndExit),null!=u.title&&null!=this.buttonContainer&&(v=document.createElement("span"),mxUtils.write(v,u.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(v)),u=null!=u.xmlpng?this.extractGraphModelFromPng(u.xmlpng):null!=
u.xml&&"data:image/png;base64,"==u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):u.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage"}),"*");return}}u=r(u);c=!0;try{a(u,f)}catch(F){this.handleError(F)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var G=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=G();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=
G();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
@@ -2861,14 +2862,14 @@ c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.background
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))}})}for(var n=this.toolbarItems,m=0,p=null,r=null,s=0;s<n.length;s++){var q=n[s];if("pages"==q){var t=[],r=b.ownerDocument.createElement("div");
r.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.setOpacity(r,70);var u=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";c.appendChild(r);var v=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight=
-"0px";var A=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=A&&(t=this.xmlNode.getElementsByTagName("diagram"),this.currentPage=0,r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),A=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display}),y=this.graph.getModel();this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)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"==q){if(this.layersEnabled){var y=this.graph.getModel(),
-x=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=x.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
-p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");y.addListener(mxEvent.CHANGE,function(){x.style.display=1<y.getChildCount(y.root)?"inline-block":"none"});x.style.display=1<y.getChildCount(y.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
+"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=x&&(t=this.xmlNode.getElementsByTagName("diagram"),this.currentPage=0,r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),x=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display}),z=this.graph.getModel();this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)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"==q){if(this.layersEnabled){var z=this.graph.getModel(),
+y=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=y.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
+p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(q=this.graphConfig["toolbar-buttons"][q],null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.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 z=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"==z&&(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!=p&&(p.parentNode.removeChild(p),
-p=null),b.style.border=z)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",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!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)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()};
@@ -2887,5 +2888,5 @@ GraphViewer.getUrl=function(a,b,c){var d=0<navigator.userAgent.indexOf("MSIE 9")
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function f(b,c){if(b.resizedAttached){if(b.resizedAttached){b.resizedAttached.add(c);return}}else b.resizedAttached=new e,b.resizedAttached.add(c);b.resizeSensor=document.createElement("div");
b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='\x3cdiv class\x3d"resize-sensor-expand" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s;"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"resize-sensor-shrink" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"\x3e\x3c/div\x3e\x3c/div\x3e';
b.appendChild(b.resizeSensor);if("static"==(b.currentStyle?b.currentStyle.position:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue("position"):b.style.position))b.style.position="relative";var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),
-l=!1),a(n))};a(n);var A,y,x,z,C=function(){if((x=b.offsetWidth)!=A||(z=b.offsetHeight)!=y)l=!0,A=x,y=z;k()},E=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};E(d,"scroll",C);E(g,"scroll",C)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
+l=!1),a(n))};a(n);var x,z,y,A,D=function(){if((y=b.offsetWidth)!=x||(A=b.offsetHeight)!=z)l=!0,x=y,z=A;k()},E=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};E(d,"scroll",D);E(g,"scroll",D)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
0,n=c.length;k<n;k++)f(c[k],g);else f(c,g);this.detach=function(){if(l)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); \ No newline at end of file
diff --git a/war/js/atlas.min.js b/war/js/atlas.min.js
index a6abc9a1..97add7b6 100644
--- a/war/js/atlas.min.js
+++ b/war/js/atlas.min.js
@@ -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]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
p=/[#\/\?@]/g,q=/[\#\?]/g;g.parse=b;g.create=function(b,e,c,k,l,m,n){b=new g(a(b,p),a(e,p),"string"==typeof c?encodeURIComponent(c):f,0<k?k.toString():f,a(l,q),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(A,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(E);return e&&(!e[1]||F.test(e[1]))?d(b,a):f}function C(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function P(d,c,f,g,m){d=C(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,q=p&80,s=p&1536,r=NaN,v=0,G=0;v<c.length;++v){var z=c[v].toLowerCase(),E=z.charCodeAt(0),B,F,H,A,S,ia;if(32===E)z="";else if(34===E)z=16===q?f?b(t(k(g,l(c[v].substring(1,z.length-1))),d,f)):"":p&8&&!(q&q-1)?z:"";else if("inherit"!==z){if(S=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
-{};for(var aa=S.length;0<=--aa;)for(var fa=S[aa],ja=fa.length;0<=--ja;)ea[fa[ja]]=a;ea=n.cssLitMap=ea}S=ea}else S=a;if(!(ia=S,ia[C(z)]===a))if(35===E&&/^#(?:[0-9a-f]{3}){1,2}$/.test(z))z=p&2?z:"";else if(48<=E&&57>=E)z=p&1?z:"";else if(B=z.charCodeAt(1),F=z.charCodeAt(2),H=48<=B&&57>=B,A=48<=F&&57>=F,43===E&&(H||46===B&&A))z=p&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===B&&A))z=p&4?(H?"-":"-0")+z.substring(1):p&1?"0":"";else if(46===E&&H)z=p&1?"0"+z:"";else if('url("'===z.substring(0,
-5))z=f&&p&16?b(t(k(g,c[v].substring(5,z.length-2)),d,f)):"";else if("("===z.charAt(z.length-1))a:{S=c;ea=v;z=1;aa=ea+1;for(E=S.length;aa<E&&z;)fa=S[aa++],z+=")"===fa?-1:/^[^"']*\($/.test(fa);if(!z){z=S[ea].toLowerCase();E=C(z);S=S.splice(ea,aa-ea,"");ea=n.cssFns;aa=0;for(fa=ea.length;aa<fa;++aa)if(ea[aa].substring(0,E.length)==E){S[0]=S[S.length-1]="";P(ea[aa],S,f,g);z=z+S.join(" ")+")";break a}}z=""}else z=s&&/^-?[a-z_][\w\-]*$/.test(z)&&!/__$/.test(z)?m&&512===s?c[v]+m:1024===s&&e[z]&&"number"===
-typeof e[z].oa?z:"":/^\w+$/.test(z)&&64===q&&p&8?r+1===G?(c[r]=c[r].substring(0,c[r].length-1)+" "+z+'"',""):(r=G,'"'+z+'"'):""}z&&(c[G++]=z)}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)$"),
-H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(p,q){function s(e,f,g){var k,n,p,q,t,u=c;k="";if(e<f)if(t=b[e],"*"===t)++e,k=t;else if(/^[a-zA-Z]/.test(t)&&(n=m(t.toLowerCase(),[])))"tagName"in n&&(t=n.tagName),++e,k=t;for(q=p=n="";u&&e<f;++e)if(t=b[e],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?u=d:n+=t+l;else if("."===t)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(t=b[e])&&!/^_|__$/.test(t)?n+="."+t:u=d;else if(e+1<f&&"["===b[e]){++e;var x=b[e++].toLowerCase();t=v.m[k+"::"+x];t!==+t&&(t=v.m["*::"+
-x]);var z;a.ia?(z=a.ia(k,x),"string"!==typeof z&&(u=d,z=x),u&&t!==+t&&(t=v.d.NONE)):(z=x,t!==+t&&(u=d));var E=x="",B=d;/^[~^$*|]?=$/.test(b[e])&&(x=b[e++],E=b[e++],/^[0-9A-Za-z:_\-]+$/.test(E)?E='"'+E+'"':"]"===E&&(E='""',--e),/^"([^\"\\]|\\.)*"$/.test(E)||(u=d),(B="i"===b[e])&&++e);"]"!==b[e]&&(++e,u=d);switch(t){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)&&'""'!=E&&!B?E='"'+E.substring(1,E.length-
-1)+l+'"':"|\x3d"===x||""===x||(u=d);break;case v.d.URI:case v.d.URI_FRAGMENT:""!==x&&(u=d);break;default:u=d}u&&(p+="["+z.replace(/[^\w-]/g,"\\$\x26")+x+E+(B?" i]":"]"))}else if(e<f&&":"===b[e])if(t=b[++e],G.test(t))q+=":"+t;else break;else break;e!==f&&(u=d);u&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+q+g)&&r.push(e);return u}" "===b[p]&&++p;q-1!==p&&" "===b[q]&&--q;for(var r=[],t=p,u=c,x=p;u&&x<q;++x){var z=b[x];if(H[z]===H||" "===z)s(t,x,z)?t=x+1:u=d}s(t,q,"")||(u=d);return u?(r.length&&(t=
+m);var n=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(A,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 A=/[\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 P(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,q=p&80,s=p&1536,r=NaN,v=0,G=0;v<c.length;++v){var C=c[v].toLowerCase(),z=C.charCodeAt(0),F,B,H,A,R,ia;if(32===z)C="";else if(34===z)C=16===q?f?b(t(k(g,l(c[v].substring(1,C.length-1))),d,f)):"":p&8&&!(q&q-1)?C:"";else if("inherit"!==C){if(R=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
+{};for(var aa=R.length;0<=--aa;)for(var fa=R[aa],ja=fa.length;0<=--ja;)ea[fa[ja]]=a;ea=n.cssLitMap=ea}R=ea}else R=a;if(!(ia=R,ia[D(C)]===a))if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(C))C=p&2?C:"";else if(48<=z&&57>=z)C=p&1?C:"";else if(F=C.charCodeAt(1),B=C.charCodeAt(2),H=48<=F&&57>=F,A=48<=B&&57>=B,43===z&&(H||46===F&&A))C=p&1?(H?"":"0")+C.substring(1):"";else if(45===z&&(H||46===F&&A))C=p&4?(H?"-":"-0")+C.substring(1):p&1?"0":"";else if(46===z&&H)C=p&1?"0"+C:"";else if('url("'===C.substring(0,
+5))C=f&&p&16?b(t(k(g,c[v].substring(5,C.length-2)),d,f)):"";else if("("===C.charAt(C.length-1))a:{R=c;ea=v;C=1;aa=ea+1;for(z=R.length;aa<z&&C;)fa=R[aa++],C+=")"===fa?-1:/^[^"']*\($/.test(fa);if(!C){C=R[ea].toLowerCase();z=D(C);R=R.splice(ea,aa-ea,"");ea=n.cssFns;aa=0;for(fa=ea.length;aa<fa;++aa)if(ea[aa].substring(0,z.length)==z){R[0]=R[R.length-1]="";P(ea[aa],R,f,g);C=C+R.join(" ")+")";break a}}C=""}else C=s&&/^-?[a-z_][\w\-]*$/.test(C)&&!/__$/.test(C)?m&&512===s?c[v]+m:1024===s&&e[C]&&"number"===
+typeof e[C].oa?C:"":/^\w+$/.test(C)&&64===q&&p&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)$"),
+H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(p,q){function s(e,f,g){var k,n,p,q,t,u=c;k="";if(e<f)if(t=b[e],"*"===t)++e,k=t;else if(/^[a-zA-Z]/.test(t)&&(n=m(t.toLowerCase(),[])))"tagName"in n&&(t=n.tagName),++e,k=t;for(q=p=n="";u&&e<f;++e)if(t=b[e],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?u=d:n+=t+l;else if("."===t)++e<f&&/^[0-9A-Za-z:_\-]+$/.test(t=b[e])&&!/^_|__$/.test(t)?n+="."+t:u=d;else if(e+1<f&&"["===b[e]){++e;var C=b[e++].toLowerCase();t=v.m[k+"::"+C];t!==+t&&(t=v.m["*::"+
+C]);var x;a.ia?(x=a.ia(k,C),"string"!==typeof x&&(u=d,x=C),u&&t!==+t&&(t=v.d.NONE)):(x=C,t!==+t&&(u=d));var z=C="",y=d;/^[~^$*|]?=$/.test(b[e])&&(C=b[e++],z=b[e++],/^[0-9A-Za-z:_\-]+$/.test(z)?z='"'+z+'"':"]"===z&&(z='""',--e),/^"([^\"\\]|\\.)*"$/.test(z)||(u=d),(y="i"===b[e])&&++e);"]"!==b[e]&&(++e,u=d);switch(t){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"===C||"~\x3d"===C||"$\x3d"===C)&&'""'!=z&&!y?z='"'+z.substring(1,z.length-
+1)+l+'"':"|\x3d"===C||""===C||(u=d);break;case v.d.URI:case v.d.URI_FRAGMENT:""!==C&&(u=d);break;default:u=d}u&&(p+="["+x.replace(/[^\w-]/g,"\\$\x26")+C+z+(y?" i]":"]"))}else if(e<f&&":"===b[e])if(t=b[++e],G.test(t))q+=":"+t;else break;else break;e!==f&&(u=d);u&&(e=(k+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+q+g)&&r.push(e);return u}" "===b[p]&&++p;q-1!==p&&" "===b[q]&&--q;for(var r=[],t=p,u=c,C=p;u&&C<q;++C){var x=b[C];if(H[x]===H||" "===x)s(t,C,x)?t=C+1:u=d}s(t,q,"")||(u=d);return u?(r.length&&(t=
r.join(""),k!==f&&(t="."+k+" "+t),n.push(t)),c):!e||e(b.slice(p,q))}var k=a.na,l=a.L,m=a.Aa,n=[],p=0,q,s=0,r;for(q=0;q<b.length;++q)if(r=b[q],"("==r||"["==r?(++s,c):")"==r||"]"==r?(s&&--s,c):!(" "==b[q]&&(s||H[b[q-1]]===H||H[b[q+1]]===H)))b[p++]=b[q];b.length=p;p=b.length;for(q=s=0;q<p;++q)if(","===b[q]){if(!g(s,q))return f;s=q+1}return!g(s,p)?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,r,v,u,G){function z(){F=
-H.length&&H[H.length-1]===f}var E=a,B=G||[0],H=[],F=d;q(l,{startStylesheet:function(){E=[]},endStylesheet:function(){},startAtrule:function(a,d){if(F)a=f;else if("@media"===a)E.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(E.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){++B[0];var n=[];E.push(n);var p=t(k(g,b(d[0])),function(b){var a=
-e(p,b.qa,m,r,v,u,B);--B[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;u(b,!!B[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");F=!a;H.push(a)},endAtrule:function(){H.pop();F||E.push(";");z()},startBlock:function(){F||E.push("{")},endBlock:function(){F||(E.push("}"),F=c)},startRuleset:function(b){if(!F){var d=a;"@keyframes"===H[H.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-F=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?F=c:d=b.join(", "));F||E.push(d,"{")}H.push(f)},endRuleset:function(){H.pop();F||E.push("}");z()},declaration:function(b,a){if(!F){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,r,g,m.L);a.length&&E.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return E.join("")}},va:!!B[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
+"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,r,v,u,G){function C(){H=
+B.length&&B[B.length-1]===f}var z=a,F=G||[0],B=[],H=d;q(l,{startStylesheet:function(){z=[]},endStylesheet:function(){},startAtrule:function(a,d){if(H)a=f;else if("@media"===a)z.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(z.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=[];z.push(n);var p=t(k(g,b(d[0])),function(b){var a=
+e(p,b.qa,m,r,v,u,F);--F[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;n[0]=b;u(b,!!F[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");H=!a;B.push(a)},endAtrule:function(){B.pop();H||z.push(";");C()},startBlock:function(){H||z.push("{")},endBlock:function(){H||(z.push("}"),H=c)},startRuleset:function(b){if(!H){var d=a;"@keyframes"===B[B.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+H=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,m),!b||!b.length?H=c:d=b.join(", "));H||z.push(d,"{")}B.push(f)},endRuleset:function(){B.pop();H||z.push("}");C()},declaration:function(b,a){if(!H){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);n(b,a,r,g,m.L);a.length&&z.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return z.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 p=[],q=0,s=a;s<n;++s)a=b[s]," "!==a&&(p[q++]=a);if(n<e){do{a=b[n];
@@ -79,21 +79,21 @@ 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"};v.ELEMENT_DOM_INTERFACES=v.Q;v.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};v.ueffects=v.P;v.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};
-v.URIEFFECTS=v.J;v.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};v.ltypes=v.M;v.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};v.LOADERTYPES=v.I;"undefined"!==typeof window&&(window.html4=v);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(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(T,"\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,
+v.URIEFFECTS=v.J;v.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};v.ltypes=v.M;v.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};v.LOADERTYPES=v.I;"undefined"!==typeof window&&(window.html4=v);b=function(b){function e(b,a){var d;if(M.hasOwnProperty(a))d=M[a];else{var c=a.match(K);d=c?String.fromCharCode(parseInt(c[1],10)):(c=a.match(Y))?String.fromCharCode(parseInt(c[1],
+16)):I&&N.test(a)?(I.innerHTML="\x26"+a+";",c=I.textContent,M[a]=c):"\x26"+a+";"}return d}function g(b){return b.replace(V,e)}function k(b){return(""+b).replace(ca,"\x26amp;").replace(Z,"\x26lt;").replace(ba,"\x26gt;").replace(X,"\x26#34;")}function l(b){return b.replace(S,"\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}q(a,c,0,{r:d,C:d},e)}}function p(b,a,d,e,c){return function(){q(b,a,d,e,c)}}function q(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,m,n=d.length;e<n;){var t=d[e++],v=d[e];switch(t){case "\x26":da.test(v)?(a.e&&a.e("\x26"+v,g,aa,p(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,aa,p(a,d,e,f,g));break;case "\x3c/":if(k=
-/^([-\w:]+)[^\'\"]*/.exec(v))if(k[0].length===v.length&&"\x3e"===d[e+1])e+=2,m=k[1].toLowerCase(),a.t&&a.t(m,g,aa,p(a,d,e,f,g));else{var x=d,z=e,E=a,y=g,D=aa,Q=f,H=r(x,z);H?(E.t&&E.t(H.name,y,D,p(E,x,z,Q,y)),e=H.next):e=x.length}else a.e&&a.e("\x26lt;/",g,aa,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(v))if(k[0].length===v.length&&"\x3e"===d[e+1]){e+=2;m=k[1].toLowerCase();a.w&&a.w(m,[],g,aa,p(a,d,e,f,g));var C=b.f[m];C&ea&&(e=s(d,{name:m,next:e,c:C},a,g,aa,f))}else{var x=d,z=a,E=
-g,y=aa,D=f,S=r(x,e);S?(z.w&&z.w(S.name,S.R,E,y,p(z,x,S.next,D,E)),e=S.c&ea?s(x,S,z,E,y,D):S.next):e=x.length}else a.e&&a.e("\x26lt;",g,aa,p(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 N=d.slice(e,l).join("");a.A(N.substr(0,N.length-2),g,aa,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,aa,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(v)){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;!",
+/^([-\w:]+)[^\'\"]*/.exec(v))if(k[0].length===v.length&&"\x3e"===d[e+1])e+=2,m=k[1].toLowerCase(),a.t&&a.t(m,g,aa,p(a,d,e,f,g));else{var C=d,z=e,x=a,y=g,E=aa,M=f,H=r(C,z);H?(x.t&&x.t(H.name,y,E,p(x,C,z,M,y)),e=H.next):e=C.length}else a.e&&a.e("\x26lt;/",g,aa,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(v))if(k[0].length===v.length&&"\x3e"===d[e+1]){e+=2;m=k[1].toLowerCase();a.w&&a.w(m,[],g,aa,p(a,d,e,f,g));var D=b.f[m];D&ea&&(e=s(d,{name:m,next:e,c:D},a,g,aa,f))}else{var C=d,z=a,x=
+g,y=aa,E=f,R=r(C,e);R?(z.w&&z.w(R.name,R.R,x,y,p(z,C,R.next,E,x)),e=R.c&ea?s(C,R,z,x,y,E):R.next):e=C.length}else a.e&&a.e("\x26lt;",g,aa,p(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 T=d.slice(e,l).join("");a.A(T.substr(0,T.length-2),g,aa,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,aa,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(v)){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,p(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,aa,p(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,p(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,aa,p(a,d,e,f,g));break;case "":break;default:a.e&&a.e(t,g,aa,p(a,d,e,f,g))}}a.B&&a.B(g)}catch(A){if(A!==aa)throw A;}}function s(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,q=d.next+1;q<
-k&&!("\x3c/"===a[q-1]&&m.test(a[q]));q++);q<k&&(q-=1);k=a.slice(n,q).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,p(e,a,q,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,q,g,c));else throw Error("bug");return q}function r(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 p=[];""!==l;)if(f=S.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],q=d,l=[l,a[m++]];m<
-n;m++){if(q){if("\x3e"===a[m])break}else 0<=a[m].indexOf(f)&&(q=c);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var q=f[1].toLowerCase(),s;if(f[2]){s=f[3];var t=s.charCodeAt(0);if(34===t||39===t)s=s.substr(1,s.length-2);s=g(s.replace(R,""))}else s="";p.push(q,s);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=m+1;return k}}function t(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=
+k&&!("\x3c/"===a[q-1]&&m.test(a[q]));q++);q<k&&(q-=1);k=a.slice(n,q).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,p(e,a,q,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,q,g,c));else throw Error("bug");return q}function r(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 p=[];""!==l;)if(f=R.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],q=d,l=[l,a[m++]];m<
+n;m++){if(q){if("\x3e"===a[m])break}else 0<=a[m].indexOf(f)&&(q=c);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var q=f[1].toLowerCase(),s;if(f[2]){s=f[3];var t=s.charCodeAt(0);if(34===t||39===t)s=s.substr(1,s.length-2);s=g(s.replace(Q,""))}else s="";p.push(q,s);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=m+1;return k}}function t(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 p=e(d,c);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)c=p.attribs;else throw Error("tagPolicy gave no attribs");var q;"tagName"in p?(q=p.tagName,p=b.f[q]):(q=d,p=n);if(n&b.c.OPTIONAL_ENDTAG){var s=g[g.length-1];s&&s.D===d&&(s.v!==q||d!==q)&&m.push("\x3c/",s.v,"\x3e")}n&b.c.EMPTY||g.push({D:d,v:q});m.push("\x3c",q);d=0;for(s=c.length;d<s;d+=2){var r=c[d],t=c[d+1];t!==f&&t!==a&&m.push(" ",r,'\x3d"',k(t),'"')}m.push("\x3e");
n&b.c.EMPTY&&!(p&b.c.EMPTY)&&m.push("\x3c/",q,"\x3e")}else l=!(n&b.c.EMPTY)}}},endTag:function(a,e){if(l)l=d;else if(b.f.hasOwnProperty(a)){var c=b.f[a];if(!(c&(b.c.EMPTY|b.c.FOLDABLE))){if(c&b.c.OPTIONAL_ENDTAG)for(c=g.length;0<=--c;){var f=g[c].D;if(f===a)break;if(!(b.f[f]&b.c.OPTIONAL_ENDTAG))return}else for(c=g.length;0<=--c&&g[c].D!==a;);if(!(0>c)){for(f=g.length;--f>c;){var k=g[f].v;b.f[k]&b.c.OPTIONAL_ENDTAG||e.push("\x3c/",k,"\x3e")}c<g.length&&(a=g[c].v);g.length=c;e.push("\x3c/",a,"\x3e")}}}},
pcdata:c,rcdata:c,cdata:c,endDoc:function(b){for(;g.length;g.length--)b.push("\x3c/",g[g.length-1].v,"\x3e")}})}function v(b,a,d,e,c){if(!c)return f;try{var g=m.parse(""+b);if(g&&(!g.K()||ja.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 P(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];
-a="*::"+d;if(b.hasOwnProperty(a))return b[a]}function U(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var m=e[l],n=e[l+1],p=n,q=f,s;if((s=d+"::"+m,b.m.hasOwnProperty(s))||(s="*::"+m,b.m.hasOwnProperty(s)))q=b.m[s];if(q!==f)switch(q){case b.d.NONE:break;case b.d.SCRIPT:n=f;k&&L(k,d,m,p,n);break;case b.d.STYLE:if("undefined"===typeof D){n=f;k&&L(k,d,m,p,n);break}var r=[];D(n,{declaration:function(a,d){var e=a.toLowerCase();N(e,d,c?function(a){return v(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&
+a="*::"+d;if(b.hasOwnProperty(a))return b[a]}function U(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var m=e[l],n=e[l+1],p=n,q=f,s;if((s=d+"::"+m,b.m.hasOwnProperty(s))||(s="*::"+m,b.m.hasOwnProperty(s)))q=b.m[s];if(q!==f)switch(q){case b.d.NONE:break;case b.d.SCRIPT:n=f;k&&L(k,d,m,p,n);break;case b.d.STYLE:if("undefined"===typeof E){n=f;k&&L(k,d,m,p,n);break}var r=[];E(n,{declaration:function(a,d){var e=a.toLowerCase();T(e,d,c?function(a){return v(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&
r.push(e+": "+d.join(" "))}});n=0<r.length?r.join(" ; "):f;k&&L(k,d,m,p,n);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:n=g?g(n):n;k&&L(k,d,m,p,n);break;case b.d.URI:n=v(n,P(b.J,d,m),P(b.I,d,m),{TYPE:"MARKUP",XML_ATTR:m,XML_TAG:d},c);k&&L(k,d,m,p,n);break;case b.d.URI_FRAGMENT:n&&"#"===n.charAt(0)?(n=n.substring(1),n=g?g(n):n,n!==f&&n!==a&&(n="#"+n)):n=f;k&&L(k,d,m,p,n);break;default:n=f,k&&L(k,d,m,p,n)}else n=f,k&&L(k,d,m,p,n);e[l+1]=
-n}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:U(f,g,d,e,c)}}}function O(b,a){var d=[];t(a)(b,d);return d.join("")}var D,N;"undefined"!==typeof window&&(D=window.parseCssDeclarations,N=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,R=/\0/g,X=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,da=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,ca=/&/g,T=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Z=/[<]/g,ba=/>/g,Y=/\"/g,S=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ia=3==="a,b".split(/(,)/).length,ea=b.c.CDATA|b.c.RCDATA,aa={},fa={},ja=/^(?:https?|mailto|data)$/i,ga={};ga.pa=ga.escapeAttrib=k;ga.ra=ga.makeHtmlSanitizer=t;ga.sa=ga.makeSaxParser=n;ga.ta=ga.makeTagPolicy=W;ga.wa=ga.normalizeRCData=l;ga.xa=
+n}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:U(f,g,d,e,c)}}}function O(b,a){var d=[];t(a)(b,d);return d.join("")}var E,T;"undefined"!==typeof window&&(E=window.parseCssDeclarations,T=window.sanitizeCssProperty);var M={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},K=/^#(\d+)$/,Y=/^#x([0-9A-Fa-f]+)$/,N=/^[A-Za-z][A-za-z0-9]+$/,I="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+f,Q=/\0/g,V=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,da=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,ca=/&/g,S=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Z=/[<]/g,ba=/>/g,X=/\"/g,R=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ia=3==="a,b".split(/(,)/).length,ea=b.c.CDATA|b.c.RCDATA,aa={},fa={},ja=/^(?:https?|mailto|data)$/i,ga={};ga.pa=ga.escapeAttrib=k;ga.ra=ga.makeHtmlSanitizer=t;ga.sa=ga.makeSaxParser=n;ga.ta=ga.makeTagPolicy=W;ga.wa=ga.normalizeRCData=l;ga.xa=
ga.sanitize=function(b,a,d,e){return O(b,W(a,d,e))};ga.ya=ga.sanitizeAttribs=U;ga.za=ga.sanitizeWithPolicy=O;ga.Ba=ga.unescapeEntities=g;return ga}(v);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,m){if(!d[k]){if(!f[k]){var n="function"==typeof require&&require;if(!m&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=d[k]={exports:{}};
f[k][0].call(n.exports,function(b){var d=f[k][1][b];return e(d?d:b)},n,n.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=
@@ -102,8 +102,8 @@ 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,A=this.strm,B=this.options.chunkSize,E=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?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,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.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,A=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?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,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;A.next_out&&(0!==A.avail_out&&e!==m.Z_STREAM_END&&(0!==A.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),n=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=n,A.avail_out=B-n,n&&k.arraySet(A.output,A.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(F=!0)}while((0<A.avail_in||0===A.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),A.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===
@@ -113,77 +113,77 @@ new e.Buf8(256);for(c=0;256>c;c++)n[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=
c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6&63,d[k++]=128|63&c):(d[k++]=240|c>>>18,d[k++]=128|c>>>12&63,d[k++]=128|c>>>6&63,d[k++]=128|63&c);return d};d.buf2binstring=function(d){return b(d,d.length)};d.binstring2buf=function(b){for(var d=new e.Buf8(b.length),c=0,f=d.length;c<f;c++)d[c]=b.charCodeAt(c);return d};d.buf2string=function(d,e){var c,f,g,k,l=e||d.length,m=Array(2*l);for(c=f=0;c<l;)if(g=d[c++],128>g)m[f++]=g;else if(k=n[g],4<k)m[f++]=65533,c+=k-1;else{for(g&=
2===k?31:3===k?15:7;1<k&&c<l;)g=g<<6|63&d[c++],k--;1<k?m[f++]=65533:65536>g?m[f++]=g:(g-=65536,m[f++]=55296|g>>10&1023,m[f++]=56320|1023&g)}return b(m,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+n[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var l=65535&b|0;b=b>>>16&65535|0;for(var m=0;0!==c;){m=2E3<c?2E3:c;c-=m;do l=l+d[f++]|0,b=b+l|0;while(--m);l%=65521;b%=65521}return l|
b<<16|0}},{}],6:[function(c,f,d){f.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(c,f,d){var b=function(){for(var b,d=[],c=0;256>c;c++){b=c;
-for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=E[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(x.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=
-0))}function k(b,d){C._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,p=b.w_mask,q=b.prev,s=b.strstart+R,r=n[g+k-1],t=n[g+k];b.prev_length>=b.good_match&&
-(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===t&&n[e+k-1]===r&&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<s);if(c=R-(s-g),g=s-R,c>k){if(b.match_start=d,k=c,c>=l)break;r=n[g+k-1];t=n[g+k]}}while((d=q[d&p])>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=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<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 T;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=C._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=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(c&&(k(b,!1),0===b.strm.avail_out))return T}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)?T:Z}function s(b,d){for(var e,c,f;;){if(b.lookahead<X){if(p(b),
-b.lookahead<X&&d===F)return T;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===P||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=C._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 T}else if(b.match_available){if(c=C._tr_tally(b,0,
-b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return T}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(C._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)?T: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=
+for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l<f;l++)d=d>>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=C[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(x.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=
+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-V?b.strstart-(b.w_size-V):0,n=b.window,p=b.w_mask,q=b.prev,s=b.strstart+Q,r=n[g+k-1],t=n[g+k];b.prev_length>=b.good_match&&
+(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===t&&n[e+k-1]===r&&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<s);if(c=Q-(s-g),g=s-Q,c>k){if(b.match_start=d,k=c,c>=l)break;r=n[g+k-1];t=n[g+k]}}while((d=q[d&p])>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-V)){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>=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<V&&0!==b.strm.avail_in)}function r(b,d){for(var e,c;;){if(b.lookahead<V){if(p(b),b.lookahead<V&&d===F)return S;if(0===b.lookahead)break}if(e=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<
+b.hash_shift^b.window[b.strstart+I-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-V&&(b.match_length=n(b,e)),b.match_length>=I)if(c=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,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 S}return b.insert=b.strstart<I-1?b.strstart:I-1,d===G?(k(b,!0),0===b.strm.avail_out?ba:X):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?S:Z}function s(b,d){for(var e,c,f;;){if(b.lookahead<V){if(p(b),
+b.lookahead<V&&d===F)return S;if(0===b.lookahead)break}if(e=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-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=I-1,0!==e&&b.prev_length<b.max_lazy_match&&b.strstart-e<=b.w_size-V&&(b.match_length=n(b,e),5>=b.match_length&&(b.strategy===P||b.match_length===I&&4096<b.strstart-b.match_start)&&(b.match_length=I-1)),b.prev_length>=
+I&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-I;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-I);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+I-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=I-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return S}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 S}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<I-1?b.strstart:I-1,d===G?(k(b,!0),0===b.strm.avail_out?ba:X):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?S: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=O;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*N+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*N+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=F,C._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 z(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>D||c!==O||8>f||15<f||0>e||9<e||0>k||k>U)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"),C=c("./trees"),A=c("./adler32"),B=c("./crc32"),E=c("./messages"),F=0,G=4,H=0,I=-2,L=-1,P=1,U=4,W=2,O=8,D=9,N=286,Q=30,M=19,V=2*N+1,J=15,K=3,R=258,X=R+K+1,da=42,ca=113,T=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 T;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 T}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),T)}),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,O,15,8,0)};d.deflateInit2=z;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,s;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!==G)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.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(2*Y);this.dyn_dtree=new x.Buf16(2*(2*M+1));this.bl_tree=new x.Buf16(2*(2*K+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(N+1);this.heap=new x.Buf16(2*T+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*T+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=F,D._tr_init(e),H):b(d,J)}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=I-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return J;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!==O||8>f||15<f||0>e||9<e||0>k||k>U)return b(d,J);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+I-1)/I),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"),A=c("./adler32"),B=c("./crc32"),C=c("./messages"),F=0,G=4,H=0,J=-2,L=-1,P=1,U=4,W=2,O=8,E=9,T=286,M=30,K=19,Y=2*T+1,N=15,I=3,Q=258,V=Q+I+1,da=42,ca=113,S=1,Z=2,ba=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===F)return S;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-V&&(k(b,!1),0===b.strm.avail_out))return S}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?ba:X):(b.strstart>b.block_start&&k(b,!1),S)}),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,O,15,8,0)};d.deflateInit2=z;d.deflateReset=u;d.deflateResetKeep=v;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?J:(b.state.gzhead=d,H):J};d.deflate=function(d,c){var f,n,q,s;if(!d||!d.state||5<c||0>c)return d?b(d,J):J;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:J);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=O+(n.w_bits-8<<4)<<8,s=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=s<<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)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===s&&(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)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===s&&(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!==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 r;if(2===n.strategy)a:{for(var t;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){r=T;break a}break}if(n.match_length=0,t=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,t&&(k(n,!1),0===n.strm.avail_out)){r=T;break a}}r=(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)?T:Z)}else if(3===n.strategy)a:{var v,u;for(t=n.window;;){if(n.lookahead<=R){if(p(n),n.lookahead<=R&&c===F){r=T;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(u=n.strstart-1,v=t[u],v===t[++u]&&v===t[++u]&&v===t[++u])){f=n.strstart+R;do;while(v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&u<f);n.match_length=R-(f-u);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
-K?(r=C._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(r=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),r&&(k(n,!1),0===n.strm.avail_out)){r=T;break a}}r=(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)?T:Z)}else r=y[n.level].func(n,c);if(r!==ba&&r!==Y||(n.status=666),r===T||r===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(r===Z&&(1===c?C._tr_align(n):5!==c&&(C._tr_stored_block(n,
+-1,H}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 r;if(2===n.strategy)a:{for(var t;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){r=S;break a}break}if(n.match_length=0,t=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,t&&(k(n,!1),0===n.strm.avail_out)){r=S;break a}}r=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:X):n.last_lit&&
+(k(n,!1),0===n.strm.avail_out)?S:Z)}else if(3===n.strategy)a:{var v,u;for(t=n.window;;){if(n.lookahead<=Q){if(p(n),n.lookahead<=Q&&c===F){r=S;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=I&&0<n.strstart&&(u=n.strstart-1,v=t[u],v===t[++u]&&v===t[++u]&&v===t[++u])){f=n.strstart+Q;do;while(v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&v===t[++u]&&u<f);n.match_length=Q-(f-u);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
+I?(r=D._tr_tally(n,1,n.match_length-I),n.lookahead-=n.match_length,n.strstart+=n.match_length,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)){r=S;break a}}r=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:X):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?S:Z)}else r=y[n.level].func(n,c);if(r!==ba&&r!==X||(n.status=666),r===S||r===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(r===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!==G?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=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;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,z,y,x,C,A,B,E,F,G,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;z=c.bits;y=c.lencode;
-x=c.distcode;C=(1<<c.lenbits)-1;A=(1<<c.distbits)-1;a:do{15>z&&(u+=I[f++]<<z,z+=8,u+=I[f++]<<z,z+=8);B=y[u&C];b:for(;;){if(E=B>>>24,u>>>=E,z-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(u&(1<<E)-1)];continue b}if(32&E){c.mode=12;break a}b.msg="invalid literal/length code";c.mode=30;break a}F=65535&B;(E&=15)&&(z<E&&(u+=I[f++]<<z,z+=8),F+=u&(1<<E)-1,u>>>=E,z-=E);15>z&&(u+=I[f++]<<z,z+=8,u+=I[f++]<<z,z+=8);B=x[u&A];c:for(;;){if(E=B>>>24,u>>>=E,z-=E,E=B>>>16&255,
-!(16&E)){if(0===(64&E)){B=x[(65535&B)+(u&(1<<E)-1)];continue c}b.msg="invalid distance code";c.mode=30;break a}if(G=65535&B,E&=15,z<E&&(u+=I[f++]<<z,z+=8,z<E&&(u+=I[f++]<<z,z+=8)),G+=u&(1<<E)-1,G>r){b.msg="invalid distance too far back";c.mode=30;break a}if(u>>>=E,z-=E,E=m-n,G>E){if(E=G-E,E>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-E,E<F){F-=E;do L[m++]=v[B++];while(--E);B=m-G;H=L}}else if(t<E){if(B+=s+t-E,E-=t,E<F){F-=E;do L[m++]=v[B++];while(--E);
-if(B=0,t<F){E=t;F-=E;do L[m++]=v[B++];while(--E);B=m-G;H=L}}}else if(B+=t-E,E<F){F-=E;do L[m++]=v[B++];while(--E);B=m-G;H=L}for(;2<F;)L[m++]=H[B++],L[m++]=H[B++],L[m++]=H[B++],F-=3;F&&(L[m++]=H[B++],1<F&&(L[m++]=H[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=z>>3;f-=F;z-=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<<z)-1;c.bits=z}},
+e!==da&&69!==e&&73!==e&&91!==e&&103!==e&&e!==ca&&666!==e?b(d,J):(d.state=null,e===ca?b(d,-3):H)):J};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 J;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;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=
+0;b.input=d;for(p(c);c.lookahead>=I;){f=c.strstart;g=c.lookahead-(I-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+I-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=I-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=I-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,z,y,x,D,A,B,C,F,G,H,J,L;c=b.state;f=b.next_in;J=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;z=c.bits;y=c.lencode;
+x=c.distcode;D=(1<<c.lenbits)-1;A=(1<<c.distbits)-1;a:do{15>z&&(u+=J[f++]<<z,z+=8,u+=J[f++]<<z,z+=8);B=y[u&D];b:for(;;){if(C=B>>>24,u>>>=C,z-=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)&&(z<C&&(u+=J[f++]<<z,z+=8),F+=u&(1<<C)-1,u>>>=C,z-=C);15>z&&(u+=J[f++]<<z,z+=8,u+=J[f++]<<z,z+=8);B=x[u&A];c:for(;;){if(C=B>>>24,u>>>=C,z-=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,z<C&&(u+=J[f++]<<z,z+=8,z<C&&(u+=J[f++]<<z,z+=8)),G+=u&(1<<C)-1,G>r){b.msg="invalid distance too far back";c.mode=30;break a}if(u>>>=C,z-=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,H=v,0===t){if(B+=s-C,C<F){F-=C;do L[m++]=v[B++];while(--C);B=m-G;H=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;H=L}}}else if(B+=t-C,C<F){F-=C;do L[m++]=v[B++];while(--C);B=m-G;H=L}for(;2<F;)L[m++]=H[B++],L[m++]=H[B++],L[m++]=H[B++],F-=3;F&&(L[m++]=H[B++],1<F&&(L[m++]=H[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=z>>3;f-=F;z-=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<<z)-1;c.bits=z}},
{}],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(C),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,
+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 m(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 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-
-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"),v=c("./inffast"),u=c("./inftrees"),z=0,y=-2,x=1,C=852,A=592,B=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(d,e){var c,f,g,k,l,m,C,A,D,N,Q,M,V,J,K,R,X,da,ca,T,Z,ba,Y=0,S=new s.Buf8(4),ia=[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;C=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;A=c.hold;D=c.bits;N=m;Q=C;Z=z;a:for(;;)switch(c.mode){case x:if(0===c.wrap){c.mode=13;break}for(;16>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if(2&c.wrap&&35615===A){c.check=0;S[0]=255&A;S[1]=A>>>8&255;c.check=t(c.check,S,2,0);D=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,D-=4,T=(15&A)+8,0===c.wbits)c.wbits=T;else if(T>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<T;d.adler=c.check=1;c.mode=512&A?10:12;D=A=0;break;case 2:for(;16>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=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&&(S[0]=255&A,S[1]=A>>>8&255,c.check=t(c.check,S,2,0));D=A=0;c.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}c.head&&(c.head.time=A);512&c.flags&&(S[0]=255&A,S[1]=A>>>8&255,S[2]=A>>>16&255,S[3]=A>>>24&255,c.check=t(c.check,S,4,0));D=A=0;c.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}c.head&&(c.head.xflags=255&A,c.head.os=A>>8);512&c.flags&&(S[0]=255&A,S[1]=A>>>8&255,c.check=t(c.check,S,2,0));D=A=0;c.mode=
-5;case 5:if(1024&c.flags){for(;16>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}c.length=A;c.head&&(c.head.extra_len=A);512&c.flags&&(S[0]=255&A,S[1]=A>>>8&255,c.check=t(c.check,S,2,0));D=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>m&&(M=m),M&&(c.head&&(T=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,T)),512&c.flags&&(c.check=t(c.check,f,M,k)),m-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
-7;case 7:if(2048&c.flags){if(0===m)break a;M=0;do T=f[k+M++],c.head&&T&&65536>c.length&&(c.head.name+=String.fromCharCode(T));while(T&&M<m);if(512&c.flags&&(c.check=t(c.check,f,M,k)),m-=M,k+=M,T)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===m)break a;M=0;do T=f[k+M++],c.head&&T&&65536>c.length&&(c.head.comment+=String.fromCharCode(T));while(T&&M<m);if(512&c.flags&&(c.check=t(c.check,f,M,k)),m-=M,k+=M,T)break a}else c.head&&(c.head.comment=null);c.mode=
-9;case 9:if(512&c.flags){for(;16>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if(A!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}D=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>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}d.adler=c.check=b(A);D=A=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=C,d.next_in=k,d.avail_in=m,c.hold=A,c.bits=D,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&D;D-=7&D;c.mode=27;break}for(;3>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}switch(c.last=1&A,A>>>=1,D-=1,3&A){case 0:c.mode=14;break;case 1:J=c;if(B){p=new s.Buf32(512);r=new s.Buf32(32);for(R=0;144>R;)J.lens[R++]=8;for(;256>R;)J.lens[R++]=9;for(;280>R;)J.lens[R++]=7;for(;288>R;)J.lens[R++]=8;u(1,J.lens,0,288,p,0,J.work,{bits:9});for(R=0;32>R;)J.lens[R++]=5;u(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;D-=2;break a}break;case 2:c.mode=
-17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;D-=2;break;case 14:A>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if((65535&A)!==(A>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,D=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>m&&(M=m),M>C&&(M=C),0===M)break a;s.arraySet(g,f,k,M,l);m-=M;k+=M;C-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if(c.nlen=
-(31&A)+257,A>>>=5,D-=5,c.ndist=(31&A)+1,A>>>=5,D-=5,c.ncode=(15&A)+4,A>>>=4,D-=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>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}c.lens[ia[c.have++]]=7&A;A>>>=3;D-=3}for(;19>c.have;)c.lens[ia[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ba={bits:c.lenbits},Z=u(0,c.lens,0,19,c.lencode,0,c.work,ba),c.lenbits=ba.bits,Z){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(;Y=c.lencode[A&(1<<c.lenbits)-1],K=Y>>>24,R=65535&Y,!(K<=D);){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if(16>R)A>>>=K,D-=K,c.lens[c.have++]=R;else{if(16===R){for(J=K+2;D<J;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if(A>>>=K,D-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}T=c.lens[c.have-1];M=3+(3&A);A>>>=2;D-=2}else if(17===R){for(J=K+3;D<J;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}A>>>=K;D-=K;T=0;M=3+(7&A);A>>>=3;D-=3}else{for(J=
-K+7;D<J;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}A>>>=K;D-=K;T=0;M=11+(127&A);A>>>=7;D-=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++]=T}}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,ba={bits:c.lenbits},Z=u(1,c.lens,0,c.nlen,c.lencode,0,c.work,ba),c.lenbits=ba.bits,Z){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ba={bits:c.distbits},
-Z=u(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.bits,Z){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<=m&&258<=C){d.next_out=l;d.avail_out=C;d.next_in=k;d.avail_in=m;c.hold=A;c.bits=D;v(d,Q);l=d.next_out;g=d.output;C=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;A=c.hold;D=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;Y=c.lencode[A&(1<<c.lenbits)-1],K=Y>>>24,J=Y>>>16&255,R=65535&Y,!(K<=D);){if(0===m)break a;m--;A+=f[k++]<<
-D;D+=8}if(J&&0===(240&J)){X=K;da=J;for(ca=R;Y=c.lencode[ca+((A&(1<<X+da)-1)>>X)],K=Y>>>24,J=Y>>>16&255,R=65535&Y,!(X+K<=D);){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}A>>>=X;D-=X;c.back+=X}if(A>>>=K,D-=K,c.back+=K,c.length=R,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;D<J;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}c.length+=A&(1<<c.extra)-1;A>>>=c.extra;D-=c.extra;c.back+=
-c.extra}c.was=c.length;c.mode=23;case 23:for(;Y=c.distcode[A&(1<<c.distbits)-1],K=Y>>>24,J=Y>>>16&255,R=65535&Y,!(K<=D);){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if(0===(240&J)){X=K;da=J;for(ca=R;Y=c.distcode[ca+((A&(1<<X+da)-1)>>X)],K=Y>>>24,J=Y>>>16&255,R=65535&Y,!(X+K<=D);){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}A>>>=X;D-=X;c.back+=X}if(A>>>=K,D-=K,c.back+=K,64&J){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&J;c.mode=24;case 24:if(c.extra){for(J=c.extra;D<J;){if(0===m)break a;
-m--;A+=f[k++]<<D;D+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;D-=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===C)break a;if(M=Q-C,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>C&&(M=C);C-=M;c.length-=M;do g[l++]=J[V++];while(--M);0===c.length&&(c.mode=
-21);break;case 26:if(0===C)break a;g[l++]=c.length;C--;c.mode=21;break;case 27:if(c.wrap){for(;32>D;){if(0===m)break a;m--;A|=f[k++]<<D;D+=8}if(Q-=C,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=C,(c.flags?A:b(A))!==c.check){d.msg="incorrect data check";c.mode=30;break}D=A=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>D;){if(0===m)break a;m--;A+=f[k++]<<D;D+=8}if(A!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}D=A=0}c.mode=
-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=C,d.next_in=k,d.avail_in=m,c.hold=A,c.bits=D,(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):(N-=d.avail_in,Q-=d.avail_out,d.total_in+=N,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===N&&0===Q||4===e)&&Z===z&&(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,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:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
+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"),v=c("./inffast"),u=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 m(b,15)};d.inflateInit2=m;d.inflate=function(d,e){var c,f,g,k,l,m,D,A,E,T,M,K,Y,N,I,Q,V,da,ca,S,Z,ba,X=0,R=new s.Buf8(4),ia=[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;m=d.avail_in;A=c.hold;E=c.bits;T=m;M=D;Z=z;a:for(;;)switch(c.mode){case x:if(0===c.wrap){c.mode=13;break}for(;16>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=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);E=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,E-=4,S=(15&A)+8,0===c.wbits)c.wbits=S;else if(S>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<S;d.adler=c.check=1;c.mode=512&A?10:12;E=A=0;break;case 2:for(;16>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=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));E=A=0;c.mode=3;case 3:for(;32>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=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));E=A=0;c.mode=4;case 4:for(;16>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=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));E=A=0;c.mode=
+5;case 5:if(1024&c.flags){for(;16>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=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));E=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(K=c.length,K>m&&(K=m),K&&(c.head&&(S=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,K,S)),512&c.flags&&(c.check=t(c.check,f,K,k)),m-=K,k+=K,c.length-=K),c.length))break a;c.length=0;c.mode=
+7;case 7:if(2048&c.flags){if(0===m)break a;K=0;do S=f[k+K++],c.head&&S&&65536>c.length&&(c.head.name+=String.fromCharCode(S));while(S&&K<m);if(512&c.flags&&(c.check=t(c.check,f,K,k)),m-=K,k+=K,S)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===m)break a;K=0;do S=f[k+K++],c.head&&S&&65536>c.length&&(c.head.comment+=String.fromCharCode(S));while(S&&K<m);if(512&c.flags&&(c.check=t(c.check,f,K,k)),m-=K,k+=K,S)break a}else c.head&&(c.head.comment=null);c.mode=
+9;case 9:if(512&c.flags){for(;16>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}if(A!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}E=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>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}d.adler=c.check=b(A);E=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=m,c.hold=A,c.bits=E,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&E;E-=7&E;c.mode=27;break}for(;3>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}switch(c.last=1&A,A>>>=1,E-=1,3&A){case 0:c.mode=14;break;case 1:N=c;if(B){p=new s.Buf32(512);r=new s.Buf32(32);for(Q=0;144>Q;)N.lens[Q++]=8;for(;256>Q;)N.lens[Q++]=9;for(;280>Q;)N.lens[Q++]=7;for(;288>Q;)N.lens[Q++]=8;u(1,N.lens,0,288,p,0,N.work,{bits:9});for(Q=0;32>Q;)N.lens[Q++]=5;u(2,N.lens,0,32,r,0,N.work,{bits:5});B=!1}N.lencode=p;N.lenbits=9;N.distcode=r;N.distbits=5;if(c.mode=20,6===e){A>>>=2;E-=2;break a}break;case 2:c.mode=
+17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;E-=2;break;case 14:A>>>=7&E;for(E-=7&E;32>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}if((65535&A)!==(A>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,E=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(K=c.length){if(K>m&&(K=m),K>D&&(K=D),0===K)break a;s.arraySet(g,f,k,K,l);m-=K;k+=K;D-=K;l+=K;c.length-=K;break}c.mode=12;break;case 17:for(;14>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}if(c.nlen=
+(31&A)+257,A>>>=5,E-=5,c.ndist=(31&A)+1,A>>>=5,E-=5,c.ncode=(15&A)+4,A>>>=4,E-=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>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}c.lens[ia[c.have++]]=7&A;A>>>=3;E-=3}for(;19>c.have;)c.lens[ia[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ba={bits:c.lenbits},Z=u(0,c.lens,0,19,c.lencode,0,c.work,ba),c.lenbits=ba.bits,Z){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],I=X>>>24,Q=65535&X,!(I<=E);){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}if(16>Q)A>>>=I,E-=I,c.lens[c.have++]=Q;else{if(16===Q){for(N=I+2;E<N;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}if(A>>>=I,E-=I,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}S=c.lens[c.have-1];K=3+(3&A);A>>>=2;E-=2}else if(17===Q){for(N=I+3;E<N;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}A>>>=I;E-=I;S=0;K=3+(7&A);A>>>=3;E-=3}else{for(N=
+I+7;E<N;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}A>>>=I;E-=I;S=0;K=11+(127&A);A>>>=7;E-=7}if(c.have+K>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;K--;)c.lens[c.have++]=S}}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,ba={bits:c.lenbits},Z=u(1,c.lens,0,c.nlen,c.lencode,0,c.work,ba),c.lenbits=ba.bits,Z){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ba={bits:c.distbits},
+Z=u(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.bits,Z){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<=m&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=m;c.hold=A;c.bits=E;v(d,M);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;A=c.hold;E=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;X=c.lencode[A&(1<<c.lenbits)-1],I=X>>>24,N=X>>>16&255,Q=65535&X,!(I<=E);){if(0===m)break a;m--;A+=f[k++]<<
+E;E+=8}if(N&&0===(240&N)){V=I;da=N;for(ca=Q;X=c.lencode[ca+((A&(1<<V+da)-1)>>V)],I=X>>>24,N=X>>>16&255,Q=65535&X,!(V+I<=E);){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}A>>>=V;E-=V;c.back+=V}if(A>>>=I,E-=I,c.back+=I,c.length=Q,0===N){c.mode=26;break}if(32&N){c.back=-1;c.mode=12;break}if(64&N){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&N;c.mode=22;case 22:if(c.extra){for(N=c.extra;E<N;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}c.length+=A&(1<<c.extra)-1;A>>>=c.extra;E-=c.extra;c.back+=
+c.extra}c.was=c.length;c.mode=23;case 23:for(;X=c.distcode[A&(1<<c.distbits)-1],I=X>>>24,N=X>>>16&255,Q=65535&X,!(I<=E);){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}if(0===(240&N)){V=I;da=N;for(ca=Q;X=c.distcode[ca+((A&(1<<V+da)-1)>>V)],I=X>>>24,N=X>>>16&255,Q=65535&X,!(V+I<=E);){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}A>>>=V;E-=V;c.back+=V}if(A>>>=I,E-=I,c.back+=I,64&N){d.msg="invalid distance code";c.mode=30;break}c.offset=Q;c.extra=15&N;c.mode=24;case 24:if(c.extra){for(N=c.extra;E<N;){if(0===m)break a;
+m--;A+=f[k++]<<E;E+=8}c.offset+=A&(1<<c.extra)-1;A>>>=c.extra;E-=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(K=M-D,c.offset>K){if(K=c.offset-K,K>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}K>c.wnext?(K-=c.wnext,Y=c.wsize-K):Y=c.wnext-K;K>c.length&&(K=c.length);N=c.window}else N=g,Y=l-c.offset,K=c.length;K>D&&(K=D);D-=K;c.length-=K;do g[l++]=N[Y++];while(--K);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>E;){if(0===m)break a;m--;A|=f[k++]<<E;E+=8}if(M-=D,d.total_out+=M,c.total+=M,M&&(d.adler=c.check=c.flags?t(c.check,g,M,l-M):q(c.check,g,M,l-M)),M=D,(c.flags?A:b(A))!==c.check){d.msg="incorrect data check";c.mode=30;break}E=A=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>E;){if(0===m)break a;m--;A+=f[k++]<<E;E+=8}if(A!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}E=A=0}c.mode=
+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=A,c.bits=E,(c.wsize||M!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,M-d.avail_out)?(c.mode=31,-4):(T-=d.avail_in,M-=d.avail_out,d.total_in+=T,d.total_out+=M,c.total+=M,c.wrap&&M&&(d.adler=c.check=c.flags?t(c.check,g,M,d.next_out-M):q(c.check,g,M,d.next_out-M)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===
+c.mode?256:0),(0===T&&0===M||4===e)&&Z===z&&(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,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:n(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,v){var u,z,y,x,C,A,B,E;x=v.bits;for(var F=0,G=0,H=0,I=0,L=0,P=0,U=0,W=0,O=0,D=null,N=0,Q=new b.Buf16(16),P=new b.Buf16(16),M=null,V=0,F=0;15>=F;F++)Q[F]=0;for(G=0;G<r;G++)Q[c[f+G]]++;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(F=u=1;15>=F;F++)if(u<<=1,u-=Q[F],0>u)return-1;if(0<u&&(0===d||1!==I))return-1;P[1]=0;for(F=1;15>F;F++)P[F+
-1]=P[F]+Q[F];for(G=0;G<r;G++)0!==c[f+G]&&(t[P[c[f+G]]++]=G);if(0===d?(D=M=t,C=19):1===d?(D=e,N-=257,M=g,V-=257,C=256):(D=k,M=l,C=-1),O=0,G=0,F=H,x=q,P=L,U=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=F-U;t[G]<C?(B=0,E=t[G]):t[G]>C?(B=M[V+t[G]],E=D[N+t[G]]):(B=96,E=0);u=1<<F-U;H=z=1<<P;do z-=u,s[x+(O>>U)+z]=A<<24|B<<16|E|0;while(0!==z);for(u=1<<F-1;O&u;)u>>=1;if(0!==u?(O&=u-1,O+=u):O=0,G++,0===--Q[F]){if(F===I)break;F=c[f+t[G]]}if(F>L&&(O&r)!==y){0===U&&(U=L);x+=H;P=
-F-U;for(u=1<<P;P+U<I&&(u-=Q[P+U],!(0>=u));)P++,u<<=1;if(W+=1<<P,1===d&&852<W||2===d&&592<W)return 1;y=O&r;s[y]=L<<24|P<<16|x-q|0}}return 0!==O&&(s[x+O]=F-U<<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,z,y,x,D,A,B,C;x=v.bits;for(var F=0,G=0,H=0,J=0,L=0,P=0,U=0,W=0,O=0,E=null,T=0,M=new b.Buf16(16),P=new b.Buf16(16),K=null,Y=0,F=0;15>=F;F++)M[F]=0;for(G=0;G<r;G++)M[c[f+G]]++;L=x;for(J=15;1<=J&&0===M[J];J--);if(L>J&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,v.bits=1,0;for(H=1;H<J&&0===M[H];H++);L<H&&(L=H);for(F=u=1;15>=F;F++)if(u<<=1,u-=M[F],0>u)return-1;if(0<u&&(0===d||1!==J))return-1;P[1]=0;for(F=1;15>F;F++)P[F+
+1]=P[F]+M[F];for(G=0;G<r;G++)0!==c[f+G]&&(t[P[c[f+G]]++]=G);if(0===d?(E=K=t,D=19):1===d?(E=e,T-=257,K=g,Y-=257,D=256):(E=k,K=l,D=-1),O=0,G=0,F=H,x=q,P=L,U=0,y=-1,W=1<<L,r=W-1,1===d&&852<W||2===d&&592<W)return 1;for(var N=0;;){N++;A=F-U;t[G]<D?(B=0,C=t[G]):t[G]>D?(B=K[Y+t[G]],C=E[T+t[G]]):(B=96,C=0);u=1<<F-U;H=z=1<<P;do z-=u,s[x+(O>>U)+z]=A<<24|B<<16|C|0;while(0!==z);for(u=1<<F-1;O&u;)u>>=1;if(0!==u?(O&=u-1,O+=u):O=0,G++,0===--M[F]){if(F===J)break;F=c[f+t[G]]}if(F>L&&(O&r)!==y){0===U&&(U=L);x+=H;P=
+F-U;for(u=1<<P;P+U<J&&(u-=M[P+U],!(0>=u));)P++,u<<=1;if(W+=1<<P,1===d&&852<W||2===d&&592<W)return 1;y=O&r;s[y]=L<<24|P<<16|x-q|0}}return 0!==O&&(s[x+O]=F-U<<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(U+1),g=0;for(c=1;c<=U;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*O]=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-=T[g],l(b,f,k)),c--,g=256>c?da[c]:da[256+(c>>>7)],m(b,g,e),k=V[g],
+1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(U+1),g=0;for(c=1;c<=U;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<J;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*O]=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=K[g],0!==k&&(f-=S[g],l(b,f,k)),c--,g=256>c?da[c]:da[256+(c>>>7)],m(b,g,e),k=Y[g],
0!==k&&(c-=Z[g],l(b,c,k)));while(n<b.last_lit)}m(b,O,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=P;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,s=d.stat_desc.static_tree,r=d.stat_desc.has_stree,v=d.stat_desc.extra_bits,u=d.stat_desc.extra_base,x=d.stat_desc.max_length,z=0;for(c=0;c<=U;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;e<P;e++)f=b.heap[e],c=k[2*
k[2*f+1]+1]+1,c>x&&(c=x,z++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=u&&(n=v[f-u]),q=k[2*f],b.opt_len+=q*(c+n),r&&(b.static_len+=q*(s[2*f+1]+n)));if(0!==z){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]--;z-=2}while(0<z);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 z(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*D]++):10>=l?b.bl_tree[2*N]++: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,p=7,q=4;0===k&&(p=138,q=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n<p&&f===k)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,D,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,N,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?(p=138,q=3):f===k?(p=6,q=3):(p=7,q=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<G;d++)if(0!==b.dyn_ltree[2*d])return E;return B}function C(b,d,e,c){l(b,(F<<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,F=0,G=256,H=G+1+29,I=30,L=19,P=2*H+1,U=15,W=16,O=256,
-D=16,N=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],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 T=Array(29);b(T);var Z=Array(I);b(Z);var ba,Y,S,ia=!1;d._tr_init=function(b){if(!ia){var d,c,f,k=Array(U+1);for(f=c=0;28>f;f++){T[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<<V[f];d++)da[c++]=f}for(c>>=7;f<I;f++){Z[f]=c<<7;for(d=0;d<1<<V[f]-7;d++)da[256+c++]=f}for(d=0;d<=U;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,G+1,H,U);Y=new e(X,V,0,I,U);S=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,
-S);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=C;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);z(b,b.dyn_ltree,b.l_desc.max_code);z(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)C(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]+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,O,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,
+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*T]++:b.bl_tree[2*M]++,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,p=7,q=4;0===k&&(p=138,q=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n<p&&f===k)){if(n<q){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,T,b.bl_tree),l(b,n-3,3)):(m(b,M,b.bl_tree),l(b,
+n-11,7));n=0;g=f;0===k?(p=138,q=3):f===k?(p=6,q=3):(p=7,q=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);A.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var A=c("../utils/common"),B=0,C=1,F=0,G=256,H=G+1+29,J=30,L=19,P=2*H+1,U=15,W=16,O=256,
+E=16,T=17,M=18,K=[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],Y=[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],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=Array(2*(H+2));b(Q);var V=Array(2*J);b(V);var da=Array(512);b(da);var ca=Array(256);b(ca);var S=Array(29);b(S);var Z=Array(J);b(Z);var ba,X,R,ia=!1;d._tr_init=function(b){if(!ia){var d,c,f,k=Array(U+1);for(f=c=0;28>f;f++){S[f]=c;for(d=0;d<1<<K[f];d++)ca[c++]=
+f}ca[c-1]=f;for(f=c=0;16>f;f++){Z[f]=c;for(d=0;d<1<<Y[f];d++)da[c++]=f}for(c>>=7;f<J;f++){Z[f]=c<<7;for(d=0;d<1<<Y[f]-7;d++)da[256+c++]=f}for(d=0;d<=U;d++)k[d]=0;for(d=0;143>=d;)Q[2*d+1]=8,d++,k[8]++;for(;255>=d;)Q[2*d+1]=9,d++,k[9]++;for(;279>=d;)Q[2*d+1]=7,d++,k[7]++;for(;287>=d;)Q[2*d+1]=8,d++,k[8]++;p(Q,H+1,k);for(d=0;d<J;d++)V[2*d+1]=5,V[2*d]=n(d,5);ba=new e(Q,K,G+1,H,U);X=new e(V,Y,0,J,U);R=new e([],N,0,L,7);ia=!0}b.l_desc=new g(b.dyn_ltree,ba);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));u(b,b.l_desc);u(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(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*I[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,Q,V);
+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*I[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,O,Q);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=
a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),b=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|b>>4,b=(b&15)<<4|g>>2,e=(g&3)<<6|k,f+=String.fromCharCode(d),64!=g&&(f+=String.fromCharCode(b)),64!=k&&(f+=String.fromCharCode(e));c||(f=Base64._utf8_decode(f));return f},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var c="",f=0;f<a.length;f++){var d=a.charCodeAt(f);128>d?c+=String.fromCharCode(d):
@@ -534,9 +534,9 @@ g=0;b==mxConstants.ALIGN_CENTER?g-=f/2:b==mxConstants.ALIGN_RIGHT&&(g-=f);a+=g;e
mxSvgCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,m,n,p,r){if(this.textEnabled&&null!=b){p=null!=p?p:0;var s=this.state;a+=s.dx;c+=s.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";n?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(f)+"px;":"fill"==m?q+="width:"+Math.round(f+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(q+="width:"+Math.round(f+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<f?q+("width:"+
Math.round(f+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var v=this.createElement("foreignObject");v.setAttribute("style","overflow:visible;");v.setAttribute("pointer-events","all");q=this.createDiv(b,e,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(v);this.root.appendChild(t);var u=0,z=0;r=u=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y=
document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";z=document.createElement("div");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;y.appendChild(z);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(u+=2,r+=2);if(k&&0<
-f){var x=z.offsetWidth;if(!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m){var C=y.style.whiteSpace;z.style.whiteSpace="nowrap";x<z.offsetWidth&&(y.style.whiteSpace=C)}n&&(x=Math.min(x,f));y.style.width=x+"px";u=z.offsetWidth+u+0;z=z.offsetHeight+r;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=u+"px";q.setAttribute("style",y.style.cssText)}else u=z.offsetWidth+u,z=z.offsetHeight+r;y.parentNode.removeChild(y);v.appendChild(q)}else this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):v.appendChild(q),y=q,null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,k&&"break-word"==q.style.wordWrap&&(y.style.width="100%")),x=y.offsetWidth,0==x&&q.parentNode==v&&(q.style.visibility="hidden",document.body.appendChild(q),x=y.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=x),!n&&k&&0<f&&(this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m)&&(C=q.style.whiteSpace,q.style.whiteSpace="nowrap",x<y.offsetWidth&&
-(q.style.whiteSpace=C)),u=x+u-1,k&&"fill"!=m&&"width"!=m&&(n&&(u=Math.min(u,f)),q.style.width=u+"px"),u=y.offsetWidth,z=y.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=u,t.mxCachedFinalOffsetHeight=z),z-=r,q.parentNode!=v&&(v.appendChild(q),q.style.visibility="");n&&(z=Math.min(z,d),u=Math.min(u,f));"width"==m?d=z:"fill"!=m&&(f=u,d=z);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;e==mxConstants.ALIGN_CENTER?q-=f/2:e==mxConstants.ALIGN_RIGHT&&(q-=f);a+=q;g==mxConstants.ALIGN_MIDDLE?
+f){var x=z.offsetWidth;if(!n&&k&&0<f&&this.root.ownerDocument!=document&&"fill"!=m){var D=y.style.whiteSpace;z.style.whiteSpace="nowrap";x<z.offsetWidth&&(y.style.whiteSpace=D)}n&&(x=Math.min(x,f));y.style.width=x+"px";u=z.offsetWidth+u+0;z=z.offsetHeight+r;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=u+"px";q.setAttribute("style",y.style.cssText)}else u=z.offsetWidth+u,z=z.offsetHeight+r;y.parentNode.removeChild(y);v.appendChild(q)}else this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):v.appendChild(q),y=q,null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,k&&"break-word"==q.style.wordWrap&&(y.style.width="100%")),x=y.offsetWidth,0==x&&q.parentNode==v&&(q.style.visibility="hidden",document.body.appendChild(q),x=y.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=x),!n&&k&&0<f&&(this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m)&&(D=q.style.whiteSpace,q.style.whiteSpace="nowrap",x<y.offsetWidth&&
+(q.style.whiteSpace=D)),u=x+u-1,k&&"fill"!=m&&"width"!=m&&(n&&(u=Math.min(u,f)),q.style.width=u+"px"),u=y.offsetWidth,z=y.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=u,t.mxCachedFinalOffsetHeight=z),z-=r,q.parentNode!=v&&(v.appendChild(q),q.style.visibility="");n&&(z=Math.min(z,d),u=Math.min(u,f));"width"==m?d=z:"fill"!=m&&(f=u,d=z);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;e==mxConstants.ALIGN_CENTER?q-=f/2:e==mxConstants.ALIGN_RIGHT&&(q-=f);a+=q;g==mxConstants.ALIGN_MIDDLE?
r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);c+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(a*=s.scale,c*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+
")"+y);v.setAttribute("width",Math.round(Math.max(1,f)));v.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(v,a,c,f,d,b,e,g,k,l,m,n,p),null!=a&&(v.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(v),f.appendChild(a),t.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,m,n,p,r)}};
mxSvgCanvas2D.prototype.createClip=function(a,c,f,d){a=Math.round(a);c=Math.round(c);f=Math.round(f);d=Math.round(d);for(var b="mx-clip-"+a+"-"+c+"-"+f+"-"+d,e=0,g=b+"-"+e;null!=document.getElementById(g);)g=b+"-"+ ++e;clip=this.createElement("clipPath");clip.setAttribute("id",g);b=this.createElement("rect");b.setAttribute("x",a);b.setAttribute("y",c);b.setAttribute("width",f);b.setAttribute("height",d);clip.appendChild(b);return clip};
@@ -583,8 +583,8 @@ mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,m,n,p,r){k=this.sta
g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=p*(Math.PI/180),b=Math.sin(g)*e,e*=Math.cos(g));f.appendChild(d);f.style.left=this.format(a-b)+"px";f.style.top=this.format(c+e)+"px";this.root.appendChild(f)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,c){this.graph=a;this.setStates(c)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=this.graph.getView().translate,b=this.graph.getView().scale,e=c.x,g=c.y,k=!1,l=null,m=null,n=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=c.x;s.y+=c.y;var v=s.x,u=s.x+s.width,z=s.getCenterX(),y=s.y,x=s.y+s.height,C=s.getCenterY();c=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-z)<q?(e=b-a.getCenterX(),q=Math.abs(b-z),c=!0):Math.abs(b-v)<q?(e=b-a.x,
-q=Math.abs(b-v),c=!0):Math.abs(b-u)<q&&(e=b-a.x-a.width,q=Math.abs(b-u),c=!0);c&&(l=d,m=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||c};for(var s=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-C)<t?(g=b-a.getCenterY(),t=Math.abs(b-C),d=!0):Math.abs(b-
+mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=this.graph.getView().translate,b=this.graph.getView().scale,e=c.x,g=c.y,k=!1,l=null,m=null,n=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=c.x;s.y+=c.y;var v=s.x,u=s.x+s.width,z=s.getCenterX(),y=s.y,x=s.y+s.height,D=s.getCenterY();c=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-z)<q?(e=b-a.getCenterX(),q=Math.abs(b-z),c=!0):Math.abs(b-v)<q?(e=b-a.x,
+q=Math.abs(b-v),c=!0):Math.abs(b-u)<q&&(e=b-a.x-a.width,q=Math.abs(b-u),c=!0);c&&(l=d,m=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||c};for(var s=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-D)<t?(g=b-a.getCenterY(),t=Math.abs(b-D),d=!0):Math.abs(b-
y)<t?(g=b-a.y,t=Math.abs(b-y),d=!0):Math.abs(b-x)<t&&(g=b-a.y-a.height,t=Math.abs(b-x),d=!0);d&&(p=B,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||d},A=0;A<this.states.length;A++){var B=this.states[A];null!=B&&(this.horizontal&&(c.call(this,B.getCenterX(),
B),c.call(this,B.x,B),c.call(this,B.x+B.width,B)),this.vertical&&(s.call(this,B.getCenterY(),B),s.call(this,B.y,B),s.call(this,B.y+B.height,B)))}f&&(k||(f=a.x-(this.graph.snap(a.x/b-d.x)+d.x)*b,e=this.graph.snap(e/b)*b-f),n||(d=a.y-(this.graph.snap(a.y/b-d.y)+d.y)*b,g=this.graph.snap(g/b)*b-d));b=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
l.y+l.height)),this.guideX.points=null!=minY&&null!=maxY?[new mxPoint(m,minY),new mxPoint(m,maxY)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,b.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw());!n&&null!=this.guideY?this.guideY.node.style.visibility="hidden":null!=this.guideY&&(null!=p&&null!=a&&(minX=Math.min(a.x+e-this.graph.panDx,p.x),maxX=Math.max(a.x+a.width+e-this.graph.panDx,p.x+p.width)),this.guideY.points=
@@ -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,z=v,y=s/t,x,C=y,t=e*y,A=-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+A/2+m*y;var E=c[0].x-t/2+m*v,F=c[0].y-A/2+m*y;g?(a.moveTo(u,x),B.push(function(){a.lineTo(E,F)})):(a.moveTo(E,F),a.lineTo(u,x))}for(var G=x=u=0,t=0;t<c.length-2;t++)if(A=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&&(z=u/G,C=x/G,tmp=Math.max(Math.sqrt((v*z+y*C+1)/2),0.04),u=v+z,x=y+C,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!=A&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=c[t+1].x+x*e/2/G,I=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==A||!p?(a.lineTo(H,I),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,u)):-1==A?(A=x+C*e,G=u-z*e,
-a.lineTo(x+y*e,u-v*e),a.quadTo(H,I,A,G),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-C*e,k=I+z*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,u));v=z;y=C}t=e*C;A=-e*z;if(l&&!g)this.paintMarker(a,r.x,r.y,-v,-y,f,b,e,m,!1);else{a.lineTo(r.x-m*z+t/2,r.y-m*C+A/2);var L=r.x-m*z-t/2,P=r.y-m*C-A/2;g?(a.moveTo(L,P),B.splice(0,0,function(){a.moveTo(L,P)})):a.lineTo(L,P)}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,z=v,y=s/t,x,D=y,t=e*y,A=-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+A/2+m*y;var C=c[0].x-t/2+m*v,F=c[0].y-A/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(A=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&&(z=u/G,D=x/G,tmp=Math.max(Math.sqrt((v*z+y*D+1)/2),0.04),u=v+z,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!=A&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=c[t+1].x+x*e/2/G,J=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==A||!p?(a.lineTo(H,J),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,u)):-1==A?(A=x+D*e,G=u-z*e,
+a.lineTo(x+y*e,u-v*e),a.quadTo(H,J,A,G),function(b,d){B.push(function(){a.lineTo(b,d)})}(x,u)):(a.lineTo(H,J),function(b,d){var c=H-y*e,f=J+v*e,g=H-D*e,k=J+z*e;B.push(function(){a.quadTo(b,d,c,f)});B.push(function(){a.lineTo(g,k)})}(x,u));v=z;y=D}t=e*D;A=-e*z;if(l&&!g)this.paintMarker(a,r.x,r.y,-v,-y,f,b,e,m,!1);else{a.lineTo(r.x-m*z+t/2,r.y-m*D+A/2);var L=r.x-m*z-t/2,P=r.y-m*D-A/2;g?(a.moveTo(L,P),B.splice(0,0,function(){a.moveTo(L,P)})):a.lineTo(L,P)}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};
@@ -869,7 +869,7 @@ k}}else{f++;for(b=0;b<this.nestedBestRanks.length;b++){e=a.ranks[b];for(g=0;g<e.
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,c){for(var f=0,d=c.ranks[a],b=c.ranks[a-1],e=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(b,a){return b-a});e[l]=m}d=[];for(g=0;g<e.length;g++)d=d.concat(e[g]);for(e=1;e<b.length;)e<<=1;l=2*e-1;e-=1;b=[];for(g=0;g<l;++g)b[g]=0;for(g=0;g<d.length;g++){l=d[g]+e;for(++b[l];0<
l;)l%2&&(f+=b[l+1]),l=l-1>>1,++b[l]}return f};
mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;e<c.ranks.length;e++){for(var g=c.ranks[e],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(e);0>n&&(n=l);k[n]=m}for(var p=null,r=null,s=null,q=null,t=null,v=null,u=null,z=null,l=0;l<g.length-1;l++){if(0==l){for(var u=k[l],m=u.getNextLayerConnectedCells(e),n=u.getPreviousLayerConnectedCells(e),s=[],q=[],y=0;y<m.length;y++)s[y]=m[y].getGeneralPurposeVariable(e+
-1);for(y=0;y<n.length;y++)q[y]=n[y].getGeneralPurposeVariable(e-1)}else m=p,n=r,s=t,q=v,u=z;z=k[l+1];p=z.getNextLayerConnectedCells(e);r=z.getPreviousLayerConnectedCells(e);t=[];v=[];for(y=0;y<p.length;y++)t[y]=p[y].getGeneralPurposeVariable(e+1);for(y=0;y<r.length;y++)v[y]=r[y].getGeneralPurposeVariable(e-1);for(var x=0,C=0,y=0;y<s.length;y++)for(var A=0;A<t.length;A++)s[y]>t[A]&&x++,s[y]<t[A]&&C++;for(y=0;y<q.length;y++)for(A=0;A<v.length;A++)q[y]>v[A]&&x++,q[y]<v[A]&&C++;if(C<x||C==x&&b)p=u.getGeneralPurposeVariable(e),
+1);for(y=0;y<n.length;y++)q[y]=n[y].getGeneralPurposeVariable(e-1)}else m=p,n=r,s=t,q=v,u=z;z=k[l+1];p=z.getNextLayerConnectedCells(e);r=z.getPreviousLayerConnectedCells(e);t=[];v=[];for(y=0;y<p.length;y++)t[y]=p[y].getGeneralPurposeVariable(e+1);for(y=0;y<r.length;y++)v[y]=r[y].getGeneralPurposeVariable(e-1);for(var x=0,D=0,y=0;y<s.length;y++)for(var A=0;A<t.length;A++)s[y]>t[A]&&x++,s[y]<t[A]&&D++;for(y=0;y<q.length;y++)for(A=0;A<v.length;A++)q[y]>v[A]&&x++,q[y]<v[A]&&D++;if(D<x||D==x&&b)p=u.getGeneralPurposeVariable(e),
u.setGeneralPurposeVariable(e,z.getGeneralPurposeVariable(e)),z.setGeneralPurposeVariable(e,p),p=m,r=n,t=s,v=q,z=u,b||(f=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,c){var f=0==a%2;if(f)for(var d=c.maxRank-1;0<=d;d--)this.medianRank(d,f);else for(d=1;d<c.maxRank;d++)this.medianRank(d,f)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,c){for(var f=this.nestedBestRanks[a].length,d=[],b=[],e=0;e<f;e++){var g=this.nestedBestRanks[a][e],k=new MedianCellSorter;k.cell=g;var l;l=c?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=c?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):b[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(e=0;e<f;e++)null==b[e]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
e))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,c){for(var f=[],d=0,b=0;b<a.length;b++){var e=a[b];f[d++]=e.getGeneralPurposeVariable(c)}f.sort(function(b,a){return b-a});if(1==d%2)return f[Math.floor(d/2)];if(2==d)return(f[0]+f[1])/2;b=d/2;e=f[b-1]-f[0];d=f[d-1]-f[b];return(f[b-1]*d+f[b]*e)/(e+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
@@ -1031,8 +1031,8 @@ mxPrintPreview.prototype.open=function(a,c,f,d){var b=this.graph.cellRenderer.in
g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microsoft-com:vml" xmlns:o\x3d"urn:schemas-microsoft-com:office:office"\x3e'):("CSS1Compat"===document.compatMode&&g.writeln("\x3c!DOCTYPE html\x3e"),g.writeln("\x3chtml\x3e"));g.writeln("\x3chead\x3e");this.writeHead(g,a);g.writeln("\x3c/head\x3e");g.writeln('\x3cbody class\x3d"mxPage"\x3e')}var l=this.graph.getGraphBounds().clone(),m=this.graph.getView().getScale(),n=m/this.scale,p=this.graph.getView().getTranslate();this.autoOrigin||
(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*t;var v=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<q)){var b=this.createPageSelector(t,q);g.body.appendChild(b);
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){b.style.position="absolute";var a=function(){b.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),u=mxUtils.bind(this,function(b,a){null!=this.borderColor&&(b.style.borderColor=this.borderColor,b.style.borderStyle="solid",b.style.borderWidth="1px");b.style.background=this.backgroundColor;
-if(f||a)b.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),g.body.appendChild(b));(f||a)&&this.addPageBreak(g)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var y=0;y<z.length;y++)u(z[y],!0);for(var x=this.getAppendices(this.pageFormat.width,this.pageFormat.height),y=0;y<t;y++){var C=y*s/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
-q;a++){if(null==this.wnd)return null;var A=a*r/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,B=y*q+a+1,E=new mxRectangle(A,C,r,s),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-A,-C,this.scale,B,b,E);this.printBackgroundImage&&this.insertBackgroundImage(b,-A,-C)}),B);e.setAttribute("id","mxPage-"+B);u(e,null!=x||y<t-1||a<q-1)}}if(null!=x)for(y=0;y<x.length;y++)u(x[y],y<x.length);c&&!d&&(this.closeDocument(),v());this.wnd.focus()}catch(F){null!=
+if(f||a)b.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),g.body.appendChild(b));(f||a)&&this.addPageBreak(g)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var y=0;y<z.length;y++)u(z[y],!0);for(var x=this.getAppendices(this.pageFormat.width,this.pageFormat.height),y=0;y<t;y++){var D=y*s/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
+q;a++){if(null==this.wnd)return null;var A=a*r/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,B=y*q+a+1,C=new mxRectangle(A,D,r,s),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-A,-D,this.scale,B,b,C);this.printBackgroundImage&&this.insertBackgroundImage(b,-A,-D)}),B);e.setAttribute("id","mxPage-"+B);u(e,null!=x||y<t-1||a<q-1)}}if(null!=x)for(y=0;y<x.length;y++)u(x[y],y<x.length);c&&!d&&(this.closeDocument(),v());this.wnd.focus()}catch(F){null!=
e&&null!=e.parentNode&&e.parentNode.removeChild(e)}finally{this.graph.cellRenderer.initializeOverlay=b}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var c=a.createElement("hr");c.className="mxPageBreak";a.body.appendChild(c)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,c){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=c&&a.writeln(c);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1159,17 +1159,17 @@ c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&
a,d.y)&&!mxUtils.contains(c,a,d.y)&&b.push(new mxPoint(a,d.y)):(e=Math.max(c.y,f.y),c=Math.min(c.y+c.height,f.y+f.height),b.push(new mxPoint(a,e+(c-e)/2)))))},TopToBottom:function(a,c,f,d,b){var e=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=e.transformControlPoint(a,d));null!=k&&(c=new mxCellState,c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&(k=Math.max(c.y,f.y),g=Math.min(c.y+c.height,f.y+f.height),a=e.getRoutingCenterX(c),
null!=d&&d.x>=c.x&&d.x<=c.x+c.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),a=null!=d&&d.x>=f.x&&d.x<=f.x+f.width?d.x:e.getRoutingCenterX(f),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),1==b.length&&(null!=d&&1==b.length?!mxUtils.contains(f,d.x,k)&&!mxUtils.contains(c,d.x,k)&&b.push(new mxPoint(d.x,k)):(e=Math.max(c.x,f.x),c=Math.min(c.x+c.width,f.x+f.width),b.push(new mxPoint(e+(c-e)/
2,k)))))},SegmentConnector:function(a,c,f,d,b){function e(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)b.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<b.length?b[0]:null,m=!0,n=null,p=g[0];null==p&&null!=c?p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var n=[],s=0;s<d.length;s++){var q=a.view.transformControlPoint(a,d[s]);null!=
-q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),n.push(q))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var n=d[0],t=c,v=g[0],u=!1,z=!1,u=n;null!=v&&(v.x=Math.round(v.x),v.y=Math.round(v.y),t=null);for(s=0;2>s;s++){var y=null!=v&&v.x==u.x,x=null!=v&&v.y==u.y,C=null!=t&&u.y>=t.y&&
-u.y<=t.y+t.height,t=null!=t&&u.x>=t.x&&u.x<=t.x+t.width,u=x||null==v&&C,z=y||null==v&&t;if(!(0==s&&(u&&z||y&&x))){if(null!=v&&!x&&!y&&(C||t)){m=C?!1:!0;break}if(z||u){m=u;1==s&&(m=0==d.length%2?u:z);break}}t=f;v=g[r];null!=v&&(v.x=Math.round(v.x),v.y=Math.round(v.y),t=null);u=d[d.length-1];y&&x&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&e(new mxPoint(n.x,
+q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),n.push(q))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var n=d[0],t=c,v=g[0],u=!1,z=!1,u=n;null!=v&&(v.x=Math.round(v.x),v.y=Math.round(v.y),t=null);for(s=0;2>s;s++){var y=null!=v&&v.x==u.x,x=null!=v&&v.y==u.y,D=null!=t&&u.y>=t.y&&
+u.y<=t.y+t.height,t=null!=t&&u.x>=t.x&&u.x<=t.x+t.width,u=x||null==v&&D,z=y||null==v&&t;if(!(0==s&&(u&&z||y&&x))){if(null!=v&&!x&&!y&&(D||t)){m=D?!1:!0;break}if(z||u){m=u;1==s&&(m=0==d.length%2?u:z);break}}t=f;v=g[r];null!=v&&(v.x=Math.round(v.x),v.y=Math.round(v.y),t=null);u=d[d.length-1];y&&x&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&e(new mxPoint(n.x,
p.y));m?p.y=n.y:p.x=n.x;for(s=0;s<d.length;s++)m=!m,n=d[s],m?p.y=n.y:p.x=n.x,e(p.clone())}else n=p,m=!0;p=g[r];null==p&&null!=f&&(p=new mxPoint(a.view.getRoutingCenterX(f),a.view.getRoutingCenterY(f)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[r]&&g[r].y!=n.y||null==g[r]&&null!=f&&(n.y<f.y||n.y>f.y+f.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[r]&&g[r].x!=n.x||null==g[r]&&null!=f&&(n.x<f.x||n.x>f.x+f.width))&&e(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=c)for(;1<
b.length&&null!=b[1]&&mxUtils.contains(c,b[1].x,b[1].y);)b.splice(1,1);if(null==g[r]&&null!=f)for(;1<b.length&&null!=b[b.length-1]&&mxUtils.contains(f,b[b.length-1].x,b[b.length-1].y);)b.splice(b.length-1,1);null!=q&&null!=b[b.length-1]&&Math.abs(q.x-b[b.length-1].x)<k&&Math.abs(q.y-b[b.length-1].y)<k&&(b.splice(b.length-1,1),null!=b[b.length-1]&&(Math.abs(b[b.length-1].x-q.x)<k&&(b[b.length-1].x=q.x),Math.abs(b[b.length-1].y-q.y)<k&&(b[b.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
getJettySize:function(a,c,f,d,b){c=mxUtils.getValue(a.style,b?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==c&&(mxUtils.getValue(a.style,b?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,b?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),c=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(a,c,f,d,b){var e=a.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=a.absolutePoints,l=e[0],m=e[e.length-1],n=null!=c?c.x:l.x,p=null!=c?c.y:l.y,r=null!=c?c.width:0,s=null!=c?c.height:0,q=null!=f?f.x:m.x,t=null!=f?f.y:m.y,v=null!=f?f.width:0,u=null!=f?f.height:0,e=a.view.scale*mxEdgeStyle.getJettySize(a,c,f,d,!0),z=a.view.scale*mxEdgeStyle.getJettySize(a,
-c,f,d,!1);null!=c&&f==c&&(e=z=Math.max(e,z));var y=z+e,x=!1;if(null!=l&&null!=m)var x=m.x-l.x,C=m.y-l.y,x=x*x+C*C<y*y;if(x||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];x=0;null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(n,p,r,s),x),n=x.x,
+c,f,d,!1);null!=c&&f==c&&(e=z=Math.max(e,z));var y=z+e,x=!1;if(null!=l&&null!=m)var x=m.x-l.x,D=m.y-l.y,x=x*x+D*D<y*y;if(x||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,c,f,d,b);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];x=0;null!=c&&(d[0]=mxUtils.getPortConstraints(c,a,!0,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(n,p,r,s),x),n=x.x,
p=x.y,r=x.width,s=x.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(q,t,v,u),x),q=x.x,t=x.y,v=x.width,u=x.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;v=Math.round(10*v)/10;u=Math.round(10*u)/10;a=[0,0];n=[[n,p,r,s],[q,t,v,u]];z=[e,z];for(x=0;2>x;x++)mxEdgeStyle.limits[x][1]=
-n[x][0]-z[x],mxEdgeStyle.limits[x][2]=n[x][1]-z[x],mxEdgeStyle.limits[x][4]=n[x][0]+n[x][2]+z[x],mxEdgeStyle.limits[x][8]=n[x][1]+n[x][3]+z[x];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;x=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);C=z-p;z=0;0>x?z=0>C?2:1:0>=C&&(z=3,0==x&&(z=2));p=null;null!=c&&(p=l);c=[[0.5,0.5],[0.5,0.5]];for(x=0;2>x;x++)null!=p&&(c[x][0]=(p.x-n[x][0])/n[x][2],1>=Math.abs(p.x-n[x][0])?a[x]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[x][0]-n[x][2])&&(a[x]=mxConstants.DIRECTION_MASK_EAST),
+n[x][0]-z[x],mxEdgeStyle.limits[x][2]=n[x][1]-z[x],mxEdgeStyle.limits[x][4]=n[x][0]+n[x][2]+z[x],mxEdgeStyle.limits[x][8]=n[x][1]+n[x][3]+z[x];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;x=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);D=z-p;z=0;0>x?z=0>D?2:1:0>=D&&(z=3,0==x&&(z=2));p=null;null!=c&&(p=l);c=[[0.5,0.5],[0.5,0.5]];for(x=0;2>x;x++)null!=p&&(c[x][0]=(p.x-n[x][0])/n[x][2],1>=Math.abs(p.x-n[x][0])?a[x]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[x][0]-n[x][2])&&(a[x]=mxConstants.DIRECTION_MASK_EAST),
c[x][1]=(p.y-n[x][1])/n[x][3],1>=Math.abs(p.y-n[x][1])?a[x]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[x][1]-n[x][3])&&(a[x]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=m);x=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);r=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-y,0);y=[];
f=[];l=[];f[0]=m>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=x>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=r?m:r;p=x>=p?x:p;r=[[0,0],[0,0]];s=!1;for(x=0;2>x;x++)0==a[x]&&(0==(f[x]&d[x])&&(f[x]=mxUtils.reversePortConstraints(f[x])),0==(l[x]&d[x])&&(l[x]=mxUtils.reversePortConstraints(l[x])),r[x][0]=l[x],r[x][1]=f[x]);0<p&&0<m&&(0<(f[0]&d[0])&&0<(l[1]&d[1])?(r[0][0]=
f[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=f[1],s=!0):0<(l[0]&d[0])&&0<(f[1]&d[1])&&(r[0][0]=l[0],r[0][1]=f[0],r[1][0]=f[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=f[0],r[1][0]=l[1],r[1][1]=f[1],s=!0);0<m&&!s&&(r[0][0]=f[0],r[0][1]=l[0],r[1][0]=f[1],r[1][1]=l[1]);for(x=0;2>x;x++)if(0==a[x]&&(0==(r[x][0]&d[x])&&(r[x][0]=r[x][1]),y[x]=r[x][0]&d[x],y[x]|=(r[x][1]&d[x])<<8,y[x]|=(r[1-x][x]&d[x])<<16,y[x]|=(r[1-x][1-x]&d[x])<<24,0==(y[x]&15)&&(y[x]<<=8),0==(y[x]&3840)&&(y[x]=y[x]&15|y[x]>>8),0==
@@ -2051,8 +2051,8 @@ m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=b;n=e;p=a}}),s=thi
"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(" "),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],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(" "),
-C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)u.push(C[a][c]);for(a=0;a<z.length;a++)u.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),m=null!=l?l.split(";"):[],n=u.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("\x3d");if(0<=q){var s=p.substring(0,q),r=mxUtils.indexOf(n,s);0<=r&&n.splice(r,1);for(var t=0;t<C.length;t++){var v=C[t];if(0<=mxUtils.indexOf(v,s))for(var x=0;x<v.length;x++){var y=mxUtils.indexOf(n,v[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 s=n[f],A=c[s];if(null!=
+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<z.length;a++)u.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),m=null!=l?l.split(";"):[],n=u.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("\x3d");if(0<=q){var s=p.substring(0,q),r=mxUtils.indexOf(n,s);0<=r&&n.splice(r,1);for(var t=0;t<D.length;t++){var v=D[t];if(0<=mxUtils.indexOf(v,s))for(var x=0;x<v.length;x++){var y=mxUtils.indexOf(n,v[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 s=n[f],A=c[s];if(null!=
A&&("shape"!=s||e))(!e||0>mxUtils.indexOf(z,s))&&d.setCellStyles(s,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(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=
@@ -2316,27 +2316,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,z=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),E=null,F=e(this.roundDrop),G=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 P=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");P.apply(this,arguments)};var U=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");U.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),J=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&&J==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!=J&&null!=t&&J!=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,z=!1,y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),A=e(this.triangleLeft,mxResources.get("connect")),B=e(this.refreshTarget,mxResources.get("replace")),C=null,F=e(this.roundDrop),G=e(this.roundDrop),H=mxConstants.DIRECTION_NORTH,J=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 P=s.dragEnter;s.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");P.apply(this,arguments)};var U=s.dragExit;s.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");U.apply(this,arguments)};s.dragOver=function(a,e){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=
+this.previewElement){var c=a.view;if(null!=u&&J==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!=J){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),
r=c.translate.x*c.scale,v=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(q)&&(v=c.getState(q),r=v.x,v=v.y);k=l.x;l=l.y;a.model.isEdge(d[f])&&(l=k=0);this.previewElement.style.left=(g.x-k)*c.scale+r+"px";this.previewElement.style.top=(g.y-l)*c.scale+v+"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(),O=0,D=null,N=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;D!=l?(D=l,W=(new Date).getTime(),O=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(D=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
-10))):O=(new Date).getTime()-W;if(2500>O&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(N,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(N,mxConstants.STYLE_SHAPE)||1500<O||b.model.isEdge(l.cell))&&O>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==E&&(b.container.appendChild(B),E=B.parentNode);g(a,e,m,B)}else null==u||!mxUtils.contains(u,a,e)||1500<O&&!mxEvent.isShiftDown(c)?(u=null,null!=E&&(B.parentNode.removeChild(B),E=null)):null!=u&&null!=E&&(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(z&&null!=t&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(t);if(b.model.isEdge(t.cell)){var p=t.absolutePoints;null!=F.parentNode&&(m=p[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&&(p=p[p.length-1],k.add(g(a,e,new mxRectangle(p.x-
+(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(),O=0,E=null,T=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=J=null;E!=l?(E=l,W=(new Date).getTime(),O=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==J&&(E=l,s.getDropTarget(b,a,e,c))},this.dropTargetDelay+
+10))):O=(new Date).getTime()-W;if(2500>O&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(T,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(T,mxConstants.STYLE_SHAPE)||1500<O||b.model.isEdge(l.cell))&&O>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<O&&!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(z&&null!=t&&!mxEvent.isAltDown(c)&&null==J){k=mxRectangle.fromRectangle(t);if(b.model.isEdge(t.cell)){var p=t.absolutePoints;null!=F.parentNode&&(m=p[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&&(p=p[p.length-1],k.add(g(a,e,new mxRectangle(p.x-
this.roundDrop.width/2,p.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),p=this.graph.selectionCellsHandler.getHandler(t.cell),null!=p&&(m.x-=p.horizontalOffset/2,m.y-=p.verticalOffset/2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&
"hidden"!=p.rotationShape.node.style.visibility&&("none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox)&&m.add(p.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),C)),k.add(g(a,e,new mxRectangle(m.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),A));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;I==x?H=mxConstants.DIRECTION_EAST:I==C||I==G?H=mxConstants.DIRECTION_SOUTH:I==A&&(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<=O||t!=l&&(null==k||!mxUtils.contains(k,a,e)||500<O&&null==I&&m))if(z=!1,t=5E3>O&&O>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,y,x,C,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(m=p[0],p=p[p.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(p.x-
+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),A));null!=k&&k.grow(10)}H=mxConstants.DIRECTION_NORTH;J==x?H=mxConstants.DIRECTION_EAST:J==D||J==G?H=mxConstants.DIRECTION_SOUTH:J==A&&(H=mxConstants.DIRECTION_WEST);null!=u&&J==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<=O||t!=l&&(null==k||!mxUtils.contains(k,a,e)||500<O&&null==J&&m))if(z=!1,t=5E3>O&&O>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,y,x,D,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);b.model.isEdge(f)?(p=l.absolutePoints,null!=p&&(m=p[0],p=p[p.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(p.x-
this.roundDrop.width/2)+"px",G.style.top=Math.floor(p.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),p=this.graph.selectionCellsHandler.getHandler(l.cell),null!=p&&(m.x-=p.horizontalOffset/2,m.y-=p.verticalOffset/
2,m.width+=p.horizontalOffset,m.height+=p.verticalOffset,null!=p.rotationShape&&null!=p.rotationShape.node&&"hidden"!=p.rotationShape.node.style.visibility&&("none"!=p.rotationShape.node.style.display&&null!=p.rotationShape.boundingBox)&&m.add(p.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",C.style.left=y.style.left,C.style.top=Math.floor(m.y+m.height)+"px",A.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(y),b.container.appendChild(C)),b.container.appendChild(x),b.container.appendChild(A));null!=l&&(v=b.selectionCellsHandler.getHandler(l.cell),null!=v&&null!=v.setHandlesVisible&&v.setHandlesVisible(!1));z=!0}else{k=[F,G,y,x,C,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m])}!z&&
-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=[F,G,B,y,x,C,A],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=t&&null!=v&&v.reset();I=E=u=t=v=null};return s};
+2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(m.y+m.height)+"px",A.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(y),b.container.appendChild(D)),b.container.appendChild(x),b.container.appendChild(A));null!=l&&(v=b.selectionCellsHandler.getHandler(l.cell),null!=v&&null!=v.setHandlesVisible&&v.setHandlesVisible(!1));z=!0}else{k=[F,G,y,x,D,A];for(m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m])}!z&&
+null!=v&&v.setHandlesVisible(!0);f=(!mxEvent.isAltDown(c)||mxEvent.isShiftDown(c))&&!(null!=u&&J==B)?mxDragSource.prototype.getDropTarget.apply(this,arguments):null;k=b.getModel();if(null!=f&&(null!=J||!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,A],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=t&&null!=v&&v.reset();J=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.getFreeInsertPoint(),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})};
@@ -2373,7 +2373,7 @@ function(){var b=this.currentState;q.apply(this,arguments);b!=this.currentState?
arguments)||mxEvent.isShiftDown(b)};var u=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(b){return u.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(z=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=z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var y=this.click;this.click=function(b){if(!this.isEnabled()&&!b.isConsumed()){var a=b.getCell();null!=a&&(a=this.getLinkForCell(a),null!=a&&window.open(a))}else return y.apply(this,arguments)};var x=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return x.apply(this,arguments);if(null!=
this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,e,c,f){f=null!=f?f:[];if(0<d||0<e){var g=this.getModel(),k=b+d,l=a+e;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var m=g.getChildCount(c),n=0;n<m;n++){var p=g.getChildAt(c,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var s=
-mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=s&&(q=mxUtils.getBoundingBox(q,s));(g.isEdge(p)||g.isVertex(p))&&q.x>=b&&q.y+q.height<=l&&(q.y>=a&&q.x+q.width<=k)&&f.push(p);this.getAllCells(b,a,d,e,p,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:C.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,
+mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=s&&(q=mxUtils.getBoundingBox(q,s));(g.isEdge(p)||g.isVertex(p))&&q.x>=b&&q.y+q.height<=l&&(q.y>=a&&q.x+q.width<=k)&&f.push(p);this.getAllCells(b,a,d,e,p,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:D.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,
"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),e=a.getProperty("cell");
null==e?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);A=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,a){return a&&b.view.graph.isCellSelected(b.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(b){b=B.apply(this,arguments);this.isCellLocked(b.getCell())&&(b.state=null);return b}}};
@@ -2492,7 +2492,7 @@ c.width),d=Math.max(d,e.y*c.height);return new mxPoint(this.snap(a+b),this.snap(
function(b,a,d){var e=new mxCell;e.value="Text";e.style="text;html\x3d1;resizable\x3d0;points\x3d[];";e.geometry=new mxGeometry(0,0,0,0);e.vertex=!0;if(null!=d){e.style+="align\x3dcenter;verticalAlign\x3dmiddle;labelBackgroundColor\x3d#ffffff;";e.geometry.relative=!0;e.connectable=!1;var c=this.view.getRelativePoint(d,b,a);e.geometry.x=Math.round(1E4*c.x)/1E4;e.geometry.y=Math.round(c.y);e.geometry.offset=new mxPoint(0,0);var c=this.view.getPoint(d,e.geometry),f=this.view.scale;e.geometry.offset=
new mxPoint(Math.round((b-c.x)/f),Math.round((a-c.y)/f))}else e.style+="autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;",c=this.view.translate,e.geometry.width=40,e.geometry.height=20,e.geometry.x=Math.round(b/this.view.scale)-c.x,e.geometry.y=Math.round(a/this.view.scale)-c.y;this.getModel().beginUpdate();try{this.addCells([e],null!=d?d.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[e])),this.autoSizeCell(e)}finally{this.getModel().endUpdate()}return e};Graph.prototype.getLinkUrl=
function(b){return b};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};Graph.prototype.isBlankLink=function(b){var a=this.domainUrl;return"self"!=urlParams.target&&null!=b&&"#"!=b.charAt(0)&&b.substring(0,a.length)!=a&&!this.isRelativeUrl(b)};Graph.prototype.isRelativeUrl=function(b){return!/^(?:[a-z]+:)?\/\//i.test(b)&&"data:image"!=b.substring(0,10)&&"mailto:"!=b.substring(0,7)};Graph.prototype.addClickHandler=
-function(b,a,d){var e=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var d=0;d<b.length;d++){var e=this.getLinkUrl(b[d].getAttribute("href"));b[d].setAttribute("href",e);null!=e&&!this.isBlankLink(e)&&(window!=window.top?(b[d].setAttribute("target","_top"),e.charAt("#")?b[d].setAttribute("href",this.baseUrl+e):b[d].setAttribute("href",this.getAbsoluteUrl(e))):"_blank"==b[d].getAttribute("target")&&b[d].removeAttribute("target"),null!=a&&mxEvent.addListener(b[d],
+function(b,a,d){var e=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var d=0;d<b.length;d++){var e=this.getLinkUrl(b[d].getAttribute("href"));b[d].setAttribute("href",e);null!=e&&!this.isBlankLink(e)&&(window!=window.top?(b[d].setAttribute("target","_top"),"#"===e.charAt(0)?b[d].setAttribute("href",this.baseUrl+e):b[d].setAttribute("href",this.getAbsoluteUrl(e))):"_blank"==b[d].getAttribute("target")&&b[d].removeAttribute("target"),null!=a&&mxEvent.addListener(b[d],
"click",a))}});this.model.addListener(mxEvent.CHANGE,e);e();var c=this.container.style.cursor,f=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=b&&""!=b&&b!=mxConstants.NONE?new mxCellHighlight(g,b,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(b){b=g.view.getState(b.getCell());b!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(b,
a){this.startX=a.getGraphX();this.startY=a.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(a)},mouseMove:function(b,a){if(g.isMouseDown){if(null!=this.currentLink){var d=Math.abs(this.startX-a.getGraphX()),e=Math.abs(this.startY-a.getGraphY());(d>f||e>f)&&this.clear()}}else"a"==a.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&
(a.getState()==this.currentState||null==a.getState())&&g.intersects(this.currentState,a.getGraphX(),a.getGraphY())||this.updateCurrentState(a)},mouseUp:function(b,e){var c=e.getSource(),k=this.currentLink;this.clear();if("a"!=c.nodeName.toLowerCase()&&!e.isConsumed()&&(null==e.getState()||!e.isSource(e.getState().control))&&(mxEvent.isLeftMouseButton(e.getEvent())||mxEvent.isTouchEvent(e.getEvent())))null!=k?(g.isBlankLink(k)?window.open(k):(null!=a&&a(e.getEvent()),"#"==k.charAt(0)?window!=window.top?
@@ -2562,10 +2562,10 @@ this.secondDiv=null)),a.consume()}};var q=mxRubberband.prototype.reset;mxRubberb
d};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<v||(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 y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var x=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 x.apply(this,arguments)};var C=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))):C.apply(this,arguments)};var A=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);
+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 x.apply(this,arguments)};var D=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))):D.apply(this,arguments)};var A=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)&&A.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 B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var E=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,a){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.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=
@@ -2573,7 +2573,7 @@ this.editingHandler);var d=this.graph.getLinkForCell(this.state.cell);this.updat
b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=
mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
this.selectionHandler=mxUtils.bind(this,function(a,d){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var a=this.graph.getLinkForCell(this.state.cell);null!=a&&(this.updateLinkHint(a),this.redrawHandles())};var H=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
-function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this);if(null!=this.state&&null!=this.linkHint){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),a=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(a,this.state.style[mxConstants.STYLE_ROTATION]||
+function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this);if(null!=this.state&&null!=this.linkHint){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),a=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(a,this.state.style[mxConstants.STYLE_ROTATION]||
"0",b),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==b&&(b=this.state);this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b.y+b.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var L=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var P=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var U=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(U.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b.y+
@@ -2581,9 +2581,9 @@ b.height+6+this.state.view.graph.tolerance)+"px"}};var W=mxEdgeHandler.prototype
this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),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 z(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function x(){mxCylinder.call(this)}function C(){mxShape.call(this)}function A(){mxShape.call(this)}function B(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function P(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function N(){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 R(){mxActor.call(this)}function X(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function S(){mxRhombus.call(this)}function ia(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
+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 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 C(){mxShape.call(this)}
+function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function J(){mxShape.call(this)}function L(){mxShape.call(this)}function P(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function W(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this);this.spacing=0}function E(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function M(){mxRectangleShape.call(this)}function K(){mxActor.call(this)}
+function Y(){mxActor.call(this)}function N(){mxActor.call(this)}function I(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(){mxActor.call(this)}function S(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}function R(){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,
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,e,c,f){a=Math.min(e,c/(0.5+ta));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((e-a)/2,(c-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=
@@ -2613,36 +2613,36 @@ arguments)};mxCellRenderer.prototype.defaultShapes.plus=z;var xa=mxRhombus.proto
1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);a+=f;d+=f;e-=2*f;c-=2*f;0<e&&0<c&&(b.setShadow(!1),xa.apply(this,[b,a,d,e,c]))}};mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var a=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+a,b.y+a,b.width-2*a,b.height-2*a)}return b};y.prototype.paintForeground=function(b,a,d,
e,c){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);a+=f;d+=f;e-=2*f;c-=2*f;0<e&&0<c&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.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"],p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(e+this.strokewidth,c+this.strokewidth)*q);var q=a,s=d,q=k==mxConstants.ALIGN_CENTER?q+(e-m)/2:k==mxConstants.ALIGN_RIGHT?q+(e-m-p):q+p,s=l==mxConstants.ALIGN_MIDDLE?s+(c-n)/2:l==mxConstants.ALIGN_BOTTOM?s+(c-n-p):s+p;b.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,b,q,s,m,n);b.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
-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(C,mxShape);C.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=C;mxUtils.extend(A,mxShape);A.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};A.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=A;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(E,mxShape);E.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=E;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/
+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(A,mxShape);A.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};A.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=A;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(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(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=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(J,mxShape);J.prototype.size=10;J.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=
+J;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(P,mxCylinder);P.prototype.jettyWidth=32;P.prototype.jettyHeight=12;P.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=P;mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.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=
-U;mxUtils.extend(W,U);W.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=W;mxUtils.extend(O,mxArrowConnector);O.prototype.defaultWidth=4;O.prototype.isOpenEnded=function(){return!0};O.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};O.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=O;mxUtils.extend(D,mxArrowConnector);D.prototype.defaultWidth=
-10;D.prototype.defaultArrowWidth=20;D.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};D.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=D;mxUtils.extend(N,
-mxActor);N.prototype.size=30;N.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(c,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,c),new mxPoint(0,a),new mxPoint(e,0),new mxPoint(e,c)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=N;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,e,c){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(e*g,c*g));g=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+e,d+f);b.end();b.stroke();
-b.begin();b.moveTo(a+g,d);b.lineTo(a+g,d+c);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,e,c){a=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(e/2,Math.min(c,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(e,0),new mxPoint(e,d),new mxPoint(a,d),new mxPoint(a,c),new mxPoint(0,c)],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,e,c){a=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));Math.abs(e-a);Math.min(e/2,Math.min(c,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(e,0),new mxPoint(e,d),new mxPoint((e+a)/2,d),new mxPoint((e+a)/2,c),new mxPoint((e-a)/2,c),new mxPoint((e-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=
-0.3;J.prototype.arrowSize=0.2;J.prototype.redrawPath=function(b,a,d,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(c-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(e-a,d),new mxPoint(e-a,0),new mxPoint(e,c/2),new mxPoint(e-a,c),new mxPoint(e-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,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",J.prototype.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",J.prototype.arrowSize))));d=(c-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,
-[new mxPoint(0,c/2),new mxPoint(a,0),new mxPoint(a,d),new mxPoint(e-a,d),new mxPoint(e-a,0),new mxPoint(e,c/2),new mxPoint(e-a,c),new mxPoint(e-a,f),new mxPoint(a,f),new mxPoint(a,c)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=K;mxUtils.extend(R,mxActor);R.prototype.size=0.1;R.prototype.redrawPath=function(b,a,d,e,c){a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(a,0);b.lineTo(e,0);b.quadTo(e-2*a,c/2,e,c);b.lineTo(a,
-c);b.quadTo(a-2*a,c/2,a,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=R;mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(b,a,d,e,c){b.moveTo(0,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,0,c);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.or=X;mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(b,a,d,e,c){b.moveTo(0,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,0,c);b.quadTo(e/2,c/2,0,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.xor=da;mxUtils.extend(ca,
-mxActor);ca.prototype.size=20;ca.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e/2,Math.min(c,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(e-a,0),new mxPoint(e,0.8*a),new mxPoint(e,c),new mxPoint(0,c),new mxPoint(0,0.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ca;mxUtils.extend(T,mxActor);T.prototype.size=0.375;
-T.prototype.redrawPath=function(b,a,d,e,c){a=c*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(e,0),new mxPoint(e,c-a),new mxPoint(e/2,c),new mxPoint(0,c-a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=T;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.begin();b.moveTo(a+e/2,d+c);b.lineTo(a+e,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=Z;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+c/2);b.lineTo(a+e,d+c/2);b.end();b.stroke();b.begin();b.moveTo(a+e/2,d);b.lineTo(a+e/2,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ba;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=
-function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a+0.145*e,d+0.145*c);b.lineTo(a+0.855*e,d+0.855*c);b.end();b.stroke();b.begin();b.moveTo(a+0.855*e,d+0.145*c);b.lineTo(a+0.145*e,d+0.855*c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=Y;mxUtils.extend(S,mxRhombus);S.prototype.paintVertexShape=function(b,a,d,e,c){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+
-c/2);b.lineTo(a+e,d+c/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=S;mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(b,a,d,e,c){b.begin();b.moveTo(a,d);b.lineTo(a+e,d);b.lineTo(a+e/2,d+c/2);b.close();b.fillAndStroke();b.begin();b.moveTo(a,d+c);b.lineTo(a+e,d+c);b.lineTo(a+e/2,d+c/2);b.close();b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ia;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(b,a,d,e,c){var f=d+c-5;
+U;mxUtils.extend(W,U);W.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=W;mxUtils.extend(O,mxArrowConnector);O.prototype.defaultWidth=4;O.prototype.isOpenEnded=function(){return!0};O.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};O.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=O;mxUtils.extend(E,mxArrowConnector);E.prototype.defaultWidth=
+10;E.prototype.defaultArrowWidth=20;E.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};E.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};E.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=E;mxUtils.extend(T,
+mxActor);T.prototype.size=30;T.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(c,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,c),new mxPoint(0,a),new mxPoint(e,0),new mxPoint(e,c)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=T;mxUtils.extend(M,mxRectangleShape);M.prototype.dx=20;M.prototype.dy=20;M.prototype.isHtmlAllowed=function(){return!1};
+M.prototype.paintForeground=function(b,a,d,e,c){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(e*g,c*g));g=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+e,d+f);b.end();b.stroke();
+b.begin();b.moveTo(a+g,d);b.lineTo(a+g,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=M;mxUtils.extend(K,mxActor);K.prototype.dx=20;K.prototype.dy=20;K.prototype.redrawPath=function(b,a,d,e,c){a=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(e/2,Math.min(c,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(e,0),new mxPoint(e,d),new mxPoint(a,d),new mxPoint(a,c),new mxPoint(0,c)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.corner=K;mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(b,a,d,e,c){a=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));Math.abs(e-a);Math.min(e/2,Math.min(c,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(e,0),new mxPoint(e,d),new mxPoint((e+a)/2,d),new mxPoint((e+a)/2,c),new mxPoint((e-a)/2,c),new mxPoint((e-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=Y;mxUtils.extend(N,mxActor);N.prototype.arrowWidth=
+0.3;N.prototype.arrowSize=0.2;N.prototype.redrawPath=function(b,a,d,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(c-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(e-a,d),new mxPoint(e-a,0),new mxPoint(e,c/2),new mxPoint(e-a,c),new mxPoint(e-a,
+f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=N;mxUtils.extend(I,mxActor);I.prototype.redrawPath=function(b,a,d,e,c){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",N.prototype.arrowWidth))));a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",N.prototype.arrowSize))));d=(c-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,
+[new mxPoint(0,c/2),new mxPoint(a,0),new mxPoint(a,d),new mxPoint(e-a,d),new mxPoint(e-a,0),new mxPoint(e,c/2),new mxPoint(e-a,c),new mxPoint(e-a,f),new mxPoint(a,f),new mxPoint(a,c)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=I;mxUtils.extend(Q,mxActor);Q.prototype.size=0.1;Q.prototype.redrawPath=function(b,a,d,e,c){a=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(a,0);b.lineTo(e,0);b.quadTo(e-2*a,c/2,e,c);b.lineTo(a,
+c);b.quadTo(a-2*a,c/2,a,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=Q;mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(b,a,d,e,c){b.moveTo(0,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,0,c);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.or=V;mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(b,a,d,e,c){b.moveTo(0,0);b.quadTo(e,0,e,c/2);b.quadTo(e,c,0,c);b.quadTo(e/2,c/2,0,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.xor=da;mxUtils.extend(ca,
+mxActor);ca.prototype.size=20;ca.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e/2,Math.min(c,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(e-a,0),new mxPoint(e,0.8*a),new mxPoint(e,c),new mxPoint(0,c),new mxPoint(0,0.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ca;mxUtils.extend(S,mxActor);S.prototype.size=0.375;
+S.prototype.redrawPath=function(b,a,d,e,c){a=c*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(e,0),new mxPoint(e,c-a),new mxPoint(e/2,c),new mxPoint(0,c-a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=S;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);b.begin();b.moveTo(a+e/2,d+c);b.lineTo(a+e,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=Z;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+c/2);b.lineTo(a+e,d+c/2);b.end();b.stroke();b.begin();b.moveTo(a+e/2,d);b.lineTo(a+e/2,d+c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ba;mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=
+function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a+0.145*e,d+0.145*c);b.lineTo(a+0.855*e,d+0.855*c);b.end();b.stroke();b.begin();b.moveTo(a+0.855*e,d+0.145*c);b.lineTo(a+0.145*e,d+0.855*c);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=X;mxUtils.extend(R,mxRhombus);R.prototype.paintVertexShape=function(b,a,d,e,c){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(a,d+
+c/2);b.lineTo(a+e,d+c/2);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=R;mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(b,a,d,e,c){b.begin();b.moveTo(a,d);b.lineTo(a+e,d);b.lineTo(a+e/2,d+c/2);b.close();b.fillAndStroke();b.begin();b.moveTo(a,d+c);b.lineTo(a+e,d+c);b.lineTo(a+e/2,d+c/2);b.close();b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ia;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(b,a,d,e,c){var f=d+c-5;
b.begin();b.moveTo(a,d);b.lineTo(a,d+c);b.moveTo(a,f);b.lineTo(a+10,f-5);b.moveTo(a,f);b.lineTo(a+10,f+5);b.moveTo(a,f);b.lineTo(a+e,f);b.moveTo(a+e,d);b.lineTo(a+e,d+c);b.moveTo(a+e,f);b.lineTo(a+e-10,f-5);b.moveTo(a+e,f);b.lineTo(a+e-10,f+5);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=ea;mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(b,a,d,e,c){this.outline||b.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=
this.style&&(b.setStrokeColor(this.stroke),b.rect(a,d,e,c),b.fill(),"1"==mxUtils.getValue(this.style,"top","1")&&(b.begin(),b.moveTo(a,d),b.lineTo(a+e,d),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(b.begin(),b.moveTo(a+e,d),b.lineTo(a+e,d+c),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(b.begin(),b.moveTo(a+e,d+c),b.lineTo(a,d+c),b.end(),b.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(b.begin(),b.moveTo(a,d+c),b.lineTo(a,d),b.end(),b.stroke()))};
mxCellRenderer.prototype.defaultShapes.partialRectangle=aa;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(b,a,d,e,c){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(a+e/2,d),b.lineTo(a+e/2,d+c)):(b.moveTo(a,d+c/2),b.lineTo(a+e,d+c/2));b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=fa;mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(b,a,d,e,c){a=Math.min(e,
@@ -2655,7 +2655,7 @@ b.execute=function(){for(var b=0;b<a.length;b++)this.copyStyle(a[b])};b.getPosit
100*(b.width-a.x+b.x)/Math.min(b.width,b.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(b)})},la=function(){return function(b){var a=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(ma(b));return a}},ka=function(b){return function(a){var d=[ha(a,["size"],function(a){var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(a.x+0.75*d*a.width,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,
Math.min(b,(d.x-a.x)/(0.75*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ma(a));return d}},qa=function(b,a,d){d=null!=d?d:1;return function(e){var c=[ha(e,["size"],function(a){var d=parseFloat(mxUtils.getValue(this.state.style,"size",b));return new mxPoint(a.x+d*a.width,a.getCenterY())},function(b,a){this.state.style.size=Math.max(0,Math.min(d,(a.x-b.x)/b.width))})];a&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(e));return c}},ua=function(b,a,d){return function(e){var c=
[ha(e,["size"],function(d){var e=Math.max(0,Math.min(d.width,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"size",a)))))*b;return new mxPoint(d.x+e,d.y+e)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,d.x-a.x),Math.min(a.height,d.y-a.y)))/b)})];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(e));return c}},ya=function(b){return function(a){return[ha(a,["arrowWidth","arrowSize"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",J.prototype.arrowWidth))),e=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",J.prototype.arrowSize)));return new mxPoint(a.x+(1-e)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},pa=function(b,a,d,e,c){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,m=d?f[0]:f[g],n=d?f[1]:f[g-
+"arrowWidth",N.prototype.arrowWidth))),e=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",N.prototype.arrowSize)));return new mxPoint(a.x+(1-e)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},pa=function(b,a,d,e,c){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,m=d?f[0]:f[g],n=d?f[1]:f[g-
1],p=n.x-m.x,q=n.y-m.y,s=Math.sqrt(p*p+q*q);return ha(b,a,function(b){b=e.call(this,s,p/s,q/s,m,n);return new mxPoint(b.x/l-k.x,b.y/l-k.y)},function(b,a,d){b=Math.sqrt(p*p+q*q);a.x=(a.x+k.x)*l;a.y=(a.y+k.y)*l;c.call(this,b,p/b,q/b,m,n,a,d)})},za=function(b,a,d){return pa(b,["width"],a,function(a,e,c,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+e*a/4+c*g/2,f.y+c*a/4-e*g/2)},function(a,e,c,f,g,k){a=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));b.style.width=Math.round(2*
a)/b.view.scale-d})},va={link:function(b){return[za(b,!0,10),za(b,!1,10)]},flexArrow:function(b){var a=b.view.graph.gridSize/b.view.scale,d=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(d.push(pa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(a,d,e,c,f){a=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(c.x+
d*(f+b.shape.strokewidth*b.view.scale)+e*a/2,c.y+e*(f+b.shape.strokewidth*b.view.scale)-d*a/2)},function(d,e,c,f,g,k,l){d=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));e=mxUtils.ptLineDist(f.x,f.y,f.x+c,f.y-e,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(e-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*d)/b.view.scale;mxEvent.isControlDown(l.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
@@ -2672,13 +2672,13 @@ mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(a.height,d.y-a.y)
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=
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",N.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,
-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:ya(1),doubleArrow:ya(0.5),folder:function(b){return[ha(b,["tabWidth",
+"size",T.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",Q.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",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)))})];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",K.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",K.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",Y.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",Y.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:ya(1),doubleArrow:ya(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",m.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",T.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",S.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:qa(v.prototype.size,!0),hexagon:qa(u.prototype.size,!0,0.5),curlyBracket:qa(r.prototype.size,!1),display:qa(oa.prototype.size,!1),cube:ua(1,a.prototype.size,!1),card:ua(0.5,k.prototype.size,!0),loopLimit:ua(0.5,ca.prototype.size,!0),trapezoid:ka(0.5),parallelogram:ka(1)};Graph.createHandle=ha;Graph.handleFactory=va;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var b=
va[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=va[this.state.style.shape];if(null!=b)return b(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ra=new mxPoint(1,0),sa=new mxPoint(1,0),ka=mxUtils.toRadians(-30),la=Math.cos(ka),ka=Math.sin(ka),ra=mxUtils.getRotatedPoint(ra,la,ka),ka=mxUtils.toRadians(-150),la=Math.cos(ka),ka=Math.sin(ka),
sa=mxUtils.getRotatedPoint(sa,la,ka);mxEdgeStyle.IsometricConnector=function(b,a,d,e,c){var f=b.view;e=null!=e&&0<e.length?e[0]:null;var g=b.absolutePoints,k=g[0],g=g[g.length-1];null!=e&&(e=f.transformControlPoint(b,e));null==k&&null!=a&&(k=new mxPoint(a.getCenterX(),a.getCenterY()));null==g&&null!=d&&(g=new mxPoint(d.getCenterX(),d.getCenterY()));var l=ra.x,m=ra.y,n=sa.x,p=sa.y,q="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=g&&null!=k){var s=k;b=function(b,a,d){b-=s.x;var e=
@@ -2686,22 +2686,22 @@ a-s.y;a=(p*b-n*e)/(l*p-m*n);b=(m*b-l*e)/(m*n-l*p);q?(d&&(s=new mxPoint(s.x+l*a,s
new mxElbowEdgeHandler(b);d.snapToTerminals=!1;return d}return Ea.apply(this,arguments)};c.prototype.constraints=[];f.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;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;R.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;
-N.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;T.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)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
+mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;
+T.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;S.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)];P.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,
0.2),!1),new mxConnectionConstraint(new mxPoint(0.1,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(0.75,0.25),!1),new mxConnectionConstraint(new mxPoint(0.9,0.5),!1),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)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0.5,
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)];J.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;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)];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)];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.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;Y.prototype.constraints=null;K.prototype.constraints=null;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];I.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)];G.prototype.constraints=null;V.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")+
@@ -2879,27 +2879,27 @@ 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),z=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,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,x,C,A,B,E,F;d.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",
-z.style.display="none",n.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,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)]),
-C.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",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=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,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,x,D,A,B,C,F;d.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none",
+z.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 G=document.createElement("select");G.style.position="absolute";G.style.right="20px";G.style.width="97px";G.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 H="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),J={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]));G.appendChild(L)}p.appendChild(G);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 P=document.createElement("select");P.style.position="absolute";P.style.right="20px";P.style.width="97px";P.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],U={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]));P.appendChild(W)}H.appendChild(P);d.isEditing()||(a.appendChild(p),mxEvent.addListener(G,"change",function(b){d.getModel().beginUpdate();try{var a=I[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(H),mxEvent.addListener(P,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,U[P.value],d.getSelectionCells());mxEvent.consume(b)}));var O=document.createElement("input");O.style.textAlign="right";O.style.marginTop="4px";mxClient.IS_QUIRKS||(O.style.position="absolute",O.style.right="32px");O.style.width="46px";O.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(O);var D=null,p=this.installInputHandler(O,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
-1,999," pt",function(b){D=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=D+"px";window.setTimeout(function(){O.value=D+" pt";D=null},0);break}},!0),p=this.createStepper(O,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=O.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 N=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){N=b},destroy:function(){N=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=
-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",
+mxResources.get(L[t]));P.appendChild(W)}H.appendChild(P);d.isEditing()||(a.appendChild(p),mxEvent.addListener(G,"change",function(b){d.getModel().beginUpdate();try{var a=J[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(H),mxEvent.addListener(P,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,U[P.value],d.getSelectionCells());mxEvent.consume(b)}));var O=document.createElement("input");O.style.textAlign="right";O.style.marginTop="4px";mxClient.IS_QUIRKS||(O.style.position="absolute",O.style.right="32px");O.style.width="46px";O.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(O);var E=null,p=this.installInputHandler(O,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(){O.value=E+" pt";E=null},0);break}},!0),p=this.createStepper(O,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=O.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 T=null,M="#ffffff",K=null,Y="#000000",N=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return M},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){T=b},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");N.style.fontWeight="bold";var I=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");I.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Y},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){K=b},destroy:function(){K=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){N.style.display=null==b||b==mxConstants.NONE?"none":"";I.style.display=
+N.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(N);d.cellEditor.isContentEditing()||g.appendChild(I);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 R,X,da,ca,T,Z=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),ba=this.addUnitInput(k,"pt",20,44,function(){X.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 Y=this.addUnitInput(k,"pt",162,44,function(){da.apply(this,arguments)}),S=this.addUnitInput(k,"pt",91,44,function(){ca.apply(this,arguments)}),ia=this.addUnitInput(k,
-"pt",20,44,function(){T.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 ea=null,aa=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!=ea&&(d.cellEditor.restoreSelection(ea),ea=null);for(var e=d.getSelectedElement();null!=
+mxResources.get("spacing"));k.appendChild(p);var Q,V,da,ca,S,Z=this.addUnitInput(k,"pt",91,44,function(){Q.apply(this,arguments)}),ba=this.addUnitInput(k,"pt",20,44,function(){V.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(){da.apply(this,arguments)}),R=this.addUnitInput(k,"pt",91,44,function(){ca.apply(this,arguments)}),ia=this.addUnitInput(k,
+"pt",20,44,function(){S.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 ea=null,aa=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!=ea&&(d.cellEditor.restoreSelection(ea),ea=null);for(var e=d.getSelectedElement();null!=
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!=E?E.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!=E?E.cellIndex+1:-1))}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=B&&null!=E&&d.deleteColumn(B,E.cellIndex)}catch(b){alert(b)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=B&&null!=F&&
+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!=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,
@@ -2910,12 +2910,12 @@ mxConstants.FONT_ITALIC);c(m[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(v,a==mxConstants.ALIGN_TOP);c(u,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);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?P.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?P.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(P.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!=S)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),S.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");T=this.installInputHandler(ia,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ca=this.installInputHandler(S,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");da=this.installInputHandler(Y,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,fa);this.addKeyHandler(ba,fa);this.addKeyHandler(Z,fa);this.addKeyHandler(ia,fa);this.addKeyHandler(S,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=
+mxConstants.STYLE_SPACING_RIGHT,0)),ia.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"});V=this.installInputHandler(ba,mxConstants.STYLE_SPACING,2,-999,999," pt");Q=this.installInputHandler(Z,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");S=this.installInputHandler(ia,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ca=this.installInputHandler(R,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");da=this.installInputHandler(X,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,fa);this.addKeyHandler(ba,fa);this.addKeyHandler(Z,fa);this.addKeyHandler(ia,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 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(C,"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);E=null==B?null:d.getParentByName(b,"TD",B);A.style.display=null!=B?"":"none";if(document.activeElement!=O){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=D?(b.removeAttribute("size"),b.style.fontSize=D+"px",D=null):O.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);A.style.display=null!=B?"":"none";if(document.activeElement!=O){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=E?(b.removeAttribute("size"),b.style.fontSize=E+"px",E=null):O.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&&(V="#"==b.charAt(0)?b:"#000000",M(V,!0));null!=N&&(Q="#"==e.charAt(0)?e:null,N(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,
+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});null!=K&&(Y="#"==b.charAt(0)?b:"#000000",K(Y,!0));null!=T&&(M="#"==e.charAt(0)?e:null,T(M,!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);
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))};
@@ -2941,7 +2941,7 @@ mxEvent.addListener(v,"blur",c);mxEvent.addListener(v,"change",c);mxEvent.addLis
null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-startclassic",
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),D=this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-startclassic",
mxResources.get("linestart"),!1,mxUtils.bind(this,function(b){if("connector"==e.style.shape||"flexArrow"==e.style.shape)this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon geSprite geSprite-noarrow",null,!1).setAttribute("title",mxResources.get("none")),"connector"==e.style.shape?(this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,
!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,
"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_STARTARROW,
@@ -2963,21 +2963,21 @@ null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.ed
"endFill"],[mxConstants.ARROW_DIAMOND,0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),
this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],
["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(b,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(b,
-"",[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(C);
-this.addArrow(A);z=this.addArrow(m,9);z.className="geIcon";z.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";z.appendChild(B);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid black";E.style.marginBottom="9px";y.appendChild(E);m.style.height="15px";n.style.height=
-"15px";t.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";A.style.marginLeft="3px";A.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 F,G,H=this.addUnitInput(m,"pt",74,33,function(){F.apply(this,arguments)}),I=this.addUnitInput(m,"pt",20,33,function(){G.apply(this,arguments)});mxUtils.br(m);z=document.createElement("div");z.style.height="8px";m.appendChild(z);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,P,U=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){P.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,
+"",[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(A);z=this.addArrow(m,9);z.className="geIcon";z.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";z.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";A.style.marginLeft="3px";A.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 F,G,H=this.addUnitInput(m,"pt",74,33,function(){F.apply(this,arguments)}),J=this.addUnitInput(m,"pt",20,33,function(){G.apply(this,arguments)});mxUtils.br(m);z=document.createElement("div");z.style.height="8px";m.appendChild(z);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,P,U=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),W=this.addUnitInput(m,"pt",20,33,function(){P.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 O,D=this.addUnitInput(g,"pt",20,41,function(){O.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 N=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}
+mxResources.get("perimeter"));g.appendChild(n);var O,E=this.addUnitInput(g,"pt",20,41,function(){O.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 T=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,
-null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?B.style.borderBottom="1px dashed black":B.style.borderBottom="1px dotted black":B.style.borderBottom="1px solid black";E.style.borderBottom=B.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==
+null)&&(k.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?B.style.borderBottom="1px dashed black":B.style.borderBottom="1px dotted black":B.style.borderBottom="1px solid black";C.style.borderBottom=B.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==
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"),C,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"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(C,30),mxUtils.setOpacity(A,
-30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(A,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!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),U.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!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=D)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),D.value=isNaN(a)?"":a+" pt"});P=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");G=this.installInputHandler(I,
-mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");O=this.installInputHandler(D,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(v,N);this.addKeyHandler(W,N);this.addKeyHandler(U,N);this.addKeyHandler(I,N);this.addKeyHandler(H,N);this.addKeyHandler(D,N);b.getModel().addListener(mxEvent.CHANGE,N);this.listeners.push({destroy:function(){b.getModel().removeListener(N)}});
-N();return a};
+"startFill","1"),D,"start");c=g(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),A,"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(A,
+30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(A,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!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),U.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)?
+"":a+" pt";if(f||document.activeElement!=U)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"});P=this.installInputHandler(W,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");G=this.installInputHandler(J,
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");O=this.installInputHandler(E,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(v,T);this.addKeyHandler(W,T);this.addKeyHandler(U,T);this.addKeyHandler(J,T);this.addKeyHandler(H,T);this.addKeyHandler(E,T);b.getModel().addListener(mxEvent.CHANGE,T);this.listeners.push({destroy:function(){b.getModel().removeListener(T)}});
+T();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"),
"swimlaneLine",1);f.containsImage||n(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);f.glass&&n(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);f.comic&&n(mxResources.get("comic"),"comic",0);0==m&&(a.style.display="none")});c.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){c.getModel().removeListener(p)}});p();return a};
@@ -3135,7 +3135,7 @@ l.className="geToolbarContainer";l.style.overflow="hidden";l.style.position="rel
mxResources.get("lockUnlock"));var v=k.view.getState(c),u=null!=v?v.style:k.getCellStyle(c);"1"==mxUtils.getValue(u,"locked","0")?t.setAttribute("src",Dialog.prototype.lockedImage):t.setAttribute("src",Dialog.prototype.unlockedImage);mxEvent.addListener(t,"click",function(b){if(k.isEnabled()){var a=null;k.getModel().beginUpdate();try{a="1"==mxUtils.getValue(u,"locked","0")?null:"1",k.setCellStyles("locked",a,[c])}finally{k.getModel().endUpdate()}"1"==a&&k.removeSelectionCells(k.getModel().getDescendants(c));
mxEvent.consume(b)}});m.appendChild(t);t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));t.style.marginLeft="4px";t.style.marginRight="6px";t.style.marginTop="4px";m.appendChild(t);k.isEnabled()||t.setAttribute("disabled","disabled");k.model.isVisible(c)&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);mxEvent.addListener(t,"click",function(b){k.isEnabled()&&(k.model.setVisible(c,
!k.model.isVisible(c)),mxEvent.consume(b))});mxUtils.write(m,d);l.appendChild(m);if(k.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)d=document.createElement("div"),d.style.display="block",d.style.textAlign="right",d.style.whiteSpace="nowrap",d.style.position="absolute",d.style.right="6px",d.style.top="6px",0<a&&(m=document.createElement("a"),m.setAttribute("title",mxResources.get("toBack")),m.className="geButton",m.style.cssFloat=
-"none",m.innerHTML="\x26#9650;",m.style.width="14px",m.style.height="14px",m.style.fontSize="14px",m.style.margin="0px",m.style.marginTop="-1px",d.appendChild(m),mxEvent.addListener(m,"click",function(b){k.isEnabled()&&k.addCell(c,k.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<s-1&&(m=document.createElement("a"),m.setAttribute("title",mxResources.get("toFront")),m.className="geButton",m.style.cssFloat="none",m.innerHTML="\x26#9660;",m.style.width="14px",m.style.height="14px",m.style.fontSize="14px",
+"none",m.innerHTML="\x26#9660;",m.style.width="14px",m.style.height="14px",m.style.fontSize="14px",m.style.margin="0px",m.style.marginTop="-1px",d.appendChild(m),mxEvent.addListener(m,"click",function(b){k.isEnabled()&&k.addCell(c,k.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<s-1&&(m=document.createElement("a"),m.setAttribute("title",mxResources.get("toFront")),m.className="geButton",m.style.cssFloat="none",m.innerHTML="\x26#9650;",m.style.width="14px",m.style.height="14px",m.style.fontSize="14px",
m.style.margin="0px",m.style.marginTop="-1px",d.appendChild(m),mxEvent.addListener(m,"click",function(b){k.isEnabled()&&k.addCell(c,k.model.root,a+1);mxEvent.consume(b)})),l.appendChild(d);if(mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode))l.setAttribute("draggable","true"),l.style.cursor="move"}mxEvent.addListener(l,"dblclick",function(b){var a=mxEvent.getSource(b).nodeName;"INPUT"!=a&&"IMG"!=a&&(e(c),mxEvent.consume(b))});k.getDefaultParent()==c?(l.style.background="#e6eff8",l.style.fontWeight=
"bold",q=c):mxEvent.addListener(l,"click",function(b){k.isEnabled()&&(k.setDefaultParent(f),k.view.setCurrentRoot(null),g())});n.appendChild(l)}s=k.model.getChildCount(k.model.root);n.innerHTML="";for(var a=s-1;0<=a;a--)mxUtils.bind(this,function(d){b(a,d.value||mxResources.get("background"),d,d)})(k.model.getChildAt(k.model.root,a));v.setAttribute("title",mxResources.get("removeIt",[q.value||mxResources.get("background")]));u.setAttribute("title",mxResources.get("moveSelectionTo",[q.value||mxResources.get("background")]));
y.setAttribute("title",mxResources.get("duplicateIt",[q.value||mxResources.get("background")]));z.setAttribute("title",mxResources.get("renameIt",[q.value||mxResources.get("background")]));k.isSelectionEmpty()&&(u.className="geButton mxDisabled")}var k=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background="whiteSmoke";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var m=!EditorUi.compactUi?"30px":
@@ -3191,8 +3191,8 @@ r[b]?this.addEipMessagingSystemsPalette():"System Management"==r[b]&&this.addEip
this.addGMDLPickersPalette():"Selection Controls"==s[b]?this.addGMDLSelectionControlsPalette():"Sliders"==s[b]?this.addGMDLSlidersPalette():"Steppers"==s[b]?this.addGMDLSteppersPalette():"Tabs"==s[b]?this.addGMDLTabsPalette():"Text Fields"==s[b]&&this.addGMDLTextFieldsPalette();this.addCabinetsPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.showEntries()};if("1"==urlParams.createindex){var f=Sidebar.prototype.addStencilPalette;Sidebar.prototype.addStencilPalette=function(b,a,
d,c,m,n,p,r){f.apply(this,arguments);p=null!=p?p:1;mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(b,a,d,e,f){if(null==m||0>mxUtils.indexOf(m,a))d=null!=r?r[a]:null,mxLog.debug('\x3cshape style\x3d"shape\x3d'+b+a+c+'" w\x3d"'+Math.round(e*p)+'" h\x3d"'+Math.round(f*p)+'"'+(null!=d?' tags\x3d"'+d+'"':"")+"/\x3e")}),!0)}}var d=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(b,a,c,f,m){var n=f;this.editorUi.enableLogging&&!this.editorUi.isOffline()&&0==c&&((new Image).src=
(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dshapesearch:"+encodeURIComponent(b)+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION));f=mxUtils.bind(this,function(d,f,l,m){!this.editorUi.isOffline()&&d.length<=a/4?(l=c-Math.ceil((f-a/4)/a),mxUtils.get(ICONSEARCH_PATH+"?v\x3d2\x26q\x3d"+encodeURIComponent(b)+"\x26p\x3d"+l+"\x26c\x3d"+a,mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var e=JSON.parse(b.getText());for(b=0;b<e.icons.length;b++){for(var l=
-e.icons[b].raster_sizes,s=l.length-1;0<s&&128<l[s].size;)s--;var y=l[s].size,x=l[s].formats[0].preview_url;null!=y&&null!=x&&mxUtils.bind(this,function(b,a){d.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape\x3dimage;html\x3d1;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;imageAspect\x3d0;aspect\x3dfixed;image\x3d"+a,b,b,"")}))})(y,x)}n(d,(c-1)*a+d.length,e.icons.length==a,m)}else n(d,f,!1,m),this.editorUi.handleError({message:mxResources.get("unknownError")})}catch(C){n(d,
-f,!1,m),this.editorUi.handleError(C)}},function(){n(d,f,!1,m)}))):n(d,f,l||!this.editorUi.isOffline(),m)});d.apply(this,arguments)};var b=Sidebar.prototype.itemClicked;Sidebar.prototype.itemClicked=function(a,d,c){var f=this.editorUi.editor.graph,m=!1;if(null!=a&&1==f.getSelectionCount()&&f.getModel().isVertex(a[0])){var n=f.cloneCells(a)[0];if(f.getModel().isEdge(f.getSelectionCell())&&null==f.getModel().getTerminal(f.getSelectionCell(),!1)&&f.getModel().isVertex(n)){f.getModel().beginUpdate();try{var p=
+e.icons[b].raster_sizes,s=l.length-1;0<s&&128<l[s].size;)s--;var y=l[s].size,x=l[s].formats[0].preview_url;null!=y&&null!=x&&mxUtils.bind(this,function(b,a){d.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape\x3dimage;html\x3d1;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;imageAspect\x3d0;aspect\x3dfixed;image\x3d"+a,b,b,"")}))})(y,x)}n(d,(c-1)*a+d.length,e.icons.length==a,m)}else n(d,f,!1,m),this.editorUi.handleError({message:mxResources.get("unknownError")})}catch(D){n(d,
+f,!1,m),this.editorUi.handleError(D)}},function(){n(d,f,!1,m)}))):n(d,f,l||!this.editorUi.isOffline(),m)});d.apply(this,arguments)};var b=Sidebar.prototype.itemClicked;Sidebar.prototype.itemClicked=function(a,d,c){var f=this.editorUi.editor.graph,m=!1;if(null!=a&&1==f.getSelectionCount()&&f.getModel().isVertex(a[0])){var n=f.cloneCells(a)[0];if(f.getModel().isEdge(f.getSelectionCell())&&null==f.getModel().getTerminal(f.getSelectionCell(),!1)&&f.getModel().isVertex(n)){f.getModel().beginUpdate();try{var p=
f.view.getState(f.getSelectionCell());if(null!=p){var r=f.view.translate,s=f.view.scale,q=p.absolutePoints[p.absolutePoints.length-1];n.geometry.x=q.x/s-r.x-n.geometry.width/2;n.geometry.y=q.y/s-r.y-n.geometry.height/2}f.addCell(n);f.getModel().setTerminal(f.getSelectionCell(),n,!1)}finally{f.getModel().endUpdate()}f.scrollCellToVisible(n);f.setSelectionCell(n);m=!0}}m||b.apply(this,arguments)}})();
(function(){var a=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=a.apply(this,arguments),f=this,d=new mxCell("Vertical Flow Layout",new mxGeometry(0,0,270,280),"swimlane;html\x3d1;startSize\x3d20;horizontal\x3d1;childLayout\x3dflowLayout;flowOrientation\x3dnorth;resizable\x3d0;interRankCellSpacing\x3d50;");d.vertex=!0;var b=new mxCell("Start",new mxGeometry(20,20,100,40),"whiteSpace\x3dwrap;html\x3d1;");b.vertex=!0;d.insert(b);var e=new mxCell("Task",
new mxGeometry(20,20,100,40),"whiteSpace\x3dwrap;html\x3d1;");e.vertex=!0;d.insert(e);var g=new mxCell("",new mxGeometry(0,0,0,0),"html\x3d1;curved\x3d1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);d.insert(g);var k=new mxCell("Task",new mxGeometry(20,20,100,40),"whiteSpace\x3dwrap;html\x3d1;");k.vertex=!0;d.insert(k);g=g.clone();b.insertEdge(g,!0);k.insertEdge(g,!1);d.insert(g);b=new mxCell("End",new mxGeometry(20,20,100,40),"whiteSpace\x3dwrap;html\x3d1;");b.vertex=
@@ -3943,14 +3943,14 @@ new mxGeometry(772,167,8,4),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d
r.vertex=!0;var s=new mxCell("Message Type",new mxGeometry(0,440,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;");s.vertex=!0;var q=new mxCell("Email + Push",new mxGeometry(0,460,390,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;align\x3dleft;spacingLeft\x3d10;fontSize\x3d16;whiteSpace\x3dwrap;");
q.vertex=!0;var t=new mxCell("",new mxGeometry(370,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");t.vertex=!0;var v=new mxCell("Tap target",new mxGeometry(410,440,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;");v.vertex=!0;var u=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;align\x3dleft;spacingLeft\x3d10;fontSize\x3d16;whiteSpace\x3dwrap;");
u.vertex=!0;var z=new mxCell("",new mxGeometry(780,477,10,5),"shape\x3dtriangle;strokeColor\x3dnone;fillColor\x3d#000000;direction\x3dsouth;");z.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 C=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;");C.vertex=!0;var A=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;");
-A.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 E=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;");
-E.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 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 P=new mxCell("",new mxGeometry(420,
+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 A=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;");
+A.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 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 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 J=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");J.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 P=new mxCell("",new mxGeometry(420,
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");P.vertex=!0;var U=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;");U.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 O=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;");O.vertex=!0;var D=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");D.vertex=!0;var N=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;");
-N.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,m,n,p,r,s,q,t,v,u,z,y,x,C,A,B,E,F,G,H,I,L,P,U,W,O,D,N,Q,M,V],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
+W.vertex=!0;var O=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;");O.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 T=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;");
+T.vertex=!0;var M=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;");M.vertex=!0;var K=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;");
+K.vertex=!0;var Y=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;");Y.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,r,s,q,t,v,u,z,y,x,D,A,B,C,F,G,H,J,L,P,U,W,O,E,T,M,K,Y],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;");
@@ -4325,7 +4325,7 @@ this.createVertexTemplateEntry(y+"clutch;",100,20,"","Clutch",null,null,this.get
this.getTagsForStencil("mxgraph.electrical.rot_mech","delayed action","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"manual_control;",50,50,"","Manual Control",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","manual control","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"blocking_device;",100,15,"","Blocking Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
"blocking device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"latching_device;",100,22,"","Latching Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","latching device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"mechanical_interlock;",100,30,"","Mechanical Interlock",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","mechanical interlock",
"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"automatic_return;",100,12,"","Automatic Return",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","automatic_return","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"detent;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);
-var C=[this.createVertexTemplateEntry(x+"bus_width;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"cable_group;",130,130,"","Cable Group",
+var D=[this.createVertexTemplateEntry(x+"bus_width;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"cable_group;",130,130,"","Cable Group",
null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
"optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition\x3dbottom;shadow\x3d0;dashed\x3d0;align\x3dcenter;fillColor\x3d#ffffff;strokeColor\x3d#000000;html\x3d1;verticalAlign\x3dtop;strokeWidth\x3d1;shape\x3dellipse;",10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"terminal_3_phase;",43,10,"","Terminal 3 Phase",
null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition\x3dmiddle;shadow\x3d0;dashed\x3d0;align\x3dcenter;fillColor\x3d#ffffff;strokeColor\x3d#000000;html\x3d1;verticalAlign\x3dmiddle;strokeWidth\x3d1;shape\x3dellipse;fontColor\x3d#000000;fontSize\x3d50;fontStyle\x3d1;perimeter\x3dellipsePerimeter;",130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
@@ -4336,7 +4336,7 @@ null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 P
"elbow bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+
"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"twoLineBusElbow;notch\x3d25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
"2 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"threeLineBusElbow;notch\x3d30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"fourLineBusElbow;notch\x3d75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow",
-"electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"eightLineBusElbow;notch\x3d180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(b){for(var a=0;a<C.length;a++)b.appendChild(C[a](b))}))}})();
+"electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"eightLineBusElbow;notch\x3d180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(b){for(var a=0;a<D.length;a++)b.appendChild(D[a](b))}))}})();
(function(){Sidebar.prototype.addErPalette=function(){var a=this,c=new mxCell("Row",new mxGeometry(0,0,40,26),"text;html\x3d1;strokeColor\x3dnone;fillColor\x3dnone;spacingLeft\x3d4;spacingRight\x3d4;whiteSpace\x3dwrap;overflow\x3dhidden;rotatable\x3d0;points\x3d[[0,0.5],[1,0.5]];portConstraint\x3deastwest;");c.vertex=!0;var f=[this.addEntry("er entity relation table",function(){var d=new mxCell("Table",new mxGeometry(0,0,160,110),"swimlane;html\x3d1;fontStyle\x3d0;childLayout\x3dstackLayout;horizontal\x3d1;startSize\x3d26;fillColor\x3d#e0e0e0;horizontalStack\x3d0;resizeParent\x3d1;resizeLast\x3d0;collapsible\x3d1;marginBottom\x3d0;swimlaneFillColor\x3d#ffffff;align\x3dcenter;");
d.vertex=!0;d.insert(a.cloneCell(c,"Row 1"));d.insert(a.cloneCell(c,"Row 2"));d.insert(a.cloneCell(c,"Row 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Table")}),this.addEntry("er entity relation table section subsection",function(){var d=new mxCell("Section",new mxGeometry(0,0,140,110),"swimlane;html\x3d1;fontStyle\x3d0;childLayout\x3dstackLayout;horizontal\x3d1;startSize\x3d22;fillColor\x3dnone;horizontalStack\x3d0;resizeParent\x3d1;resizeLast\x3d0;collapsible\x3d1;marginBottom\x3d0;swimlaneFillColor\x3d#ffffff;align\x3dcenter;");
d.vertex=!0;d.insert(a.cloneCell(c,"Row 1"));d.insert(a.cloneCell(c,"Row 2"));d.insert(a.cloneCell(c,"Row 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Section")}),this.addEntry("er entity relation table section subsection",function(){var d=new mxCell("Table",new mxGeometry(0,0,160,144),"swimlane;html\x3d1;fontStyle\x3d0;childLayout\x3dstackLayout;horizontal\x3d1;startSize\x3d26;fillColor\x3d#e0e0e0;horizontalStack\x3d0;resizeParent\x3d1;resizeLast\x3d0;collapsible\x3d1;marginBottom\x3d0;swimlaneFillColor\x3d#ffffff;align\x3dcenter;");
@@ -4409,7 +4409,7 @@ a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;directio
l.vertex=!0;var m=new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");m.vertex=!0;var n=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");p.vertex=!0;var r=new mxCell("",new mxGeometry(230,0,40,43),
a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");r.vertex=!0;var s=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");s.vertex=!0;var q=new mxCell("",new mxGeometry(290,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");q.vertex=!0;var t=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");
t.vertex=!0;var v=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");v.vertex=!0;var u=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");u.vertex=!0;var z=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");z.vertex=!0;var y=new mxCell("",new mxGeometry(410,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");
-y.vertex=!0;var x=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");x.vertex=!0;var C=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");C.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,m,n,p,r,s,q,t,v,u,z,y,x,C,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=
+y.vertex=!0;var x=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;");x.vertex=!0;var D=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;fillColor\x3d#ffffff;strokeColor\x3d#000000;shadow\x3d0;direction\x3dwest;");D.vertex=!0;return sb.createVertexTemplateFromCells([b,c,f,k,l,m,n,p,r,s,q,t,v,u,z,y,x,D,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(a){for(var b=
0;b<f.length;b++)a.appendChild(f[b](a))}))}})();
(function(){Sidebar.prototype.addFlowchartPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"\x3dbottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"\x3dtop;html\x3d1;strokeWidth\x3d2;shape\x3dmxgraph.flowchart.";this.addPaletteFunctions("flowchart",mxResources.get("flowchart"),!1,[this.createVertexTemplateEntry("strokeWidth\x3d2;html\x3d1;shape\x3dmxgraph.flowchart.annotation_1;align\x3dleft;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_1","").join(" ")),
this.createVertexTemplateEntry("strokeWidth\x3d2;html\x3d1;shape\x3dmxgraph.flowchart.annotation_2;align\x3dleft;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_2","").join(" ")),this.createVertexTemplateEntry("strokeWidth\x3d2;html\x3d1;shape\x3dmxgraph.flowchart.card;whiteSpace\x3dwrap;",100,60,"","Card",null,null,this.getTagsForStencil("mxgraph.flowchart","card","").join(" ")),this.createVertexTemplateEntry(a+"collate;",100,100,"","Collate",null,null,this.getTagsForStencil("mxgraph.flowchart",
@@ -7162,8 +7162,8 @@ a.document.body.firstChild);window.setTimeout(function(){var a=document.createEl
(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",c+="cursor:pointer;");k.checked&&(c+="max-width:100%;");var d="";n.checked&&(d=' width\x3d"'+Math.round(f.width)+'" height\x3d"'+Math.round(f.height)+'"');e.value='\x3cimg src\x3d"'+a+'"'+d+(""!=c?' style\x3d"'+c+'"':"")+b+"/\x3e";e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)};if(a.isExportToCanvas())e.value=mxResources.get("updatingDocument"),a.exportToCanvas(mxUtils.bind(this,
function(b){var c=p.checked?a.getFileData(!0):null;b=a.createPngDataUri(b,c);g(b)}),null,null,null,mxUtils.bind(this,function(b){e.value="";a.handleError({message:mxResources.get("unknownError")})}),null,!0,n.checked?2:1,null,l.checked);else if(b=a.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){e.value=mxResources.get("updatingDocument");var s="";n.checked&&(s="\x26w\x3d"+Math.round(2*f.width)+"\x26h\x3d"+Math.round(2*f.height));var z=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+
(p.checked?"1":"0")+s+"\x26xml\x3d"+encodeURIComponent(b));z.send(mxUtils.bind(this,function(){200==z.getStatus()?document.body.contains(d)&&g("data:image/png;base64,"+z.getText()):(e.value="",a.handleError({message:mxResources.get("unknownError")}))}))}else e.value="",a.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}else{b=a.editor.graph.getSvg();s=b.getElementsByTagName("a");if(null!=s)for(var y=0;y<s.length;y++){var x=s[y].getAttribute("href");null!=x&&"#"==
-x.charAt(0)&&"_blank"==s[y].getAttribute("target")&&s[y].removeAttribute("target")}p.checked&&b.setAttribute("content",a.getFileData(!0));l.checked&&a.editor.addSvgShadow(b);if(m.checked){var C=" ",A="";p.checked&&(C="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
-(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",A+="cursor:pointer;");k.checked&&(A+="max-width:100%;");a.convertImages(b,function(b){e.value='\x3cimg src\x3d"'+a.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=A?' style\x3d"'+A+'"':"")+C+"/\x3e"})}else A="",p.checked&&(b.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
+x.charAt(0)&&"_blank"==s[y].getAttribute("target")&&s[y].removeAttribute("target")}p.checked&&b.setAttribute("content",a.getFileData(!0));l.checked&&a.editor.addSvgShadow(b);if(m.checked){var D=" ",A="";p.checked&&(D="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
+(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",A+="cursor:pointer;");k.checked&&(A+="max-width:100%;");a.convertImages(b,function(b){e.value='\x3cimg src\x3d"'+a.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=A?' style\x3d"'+A+'"':"")+D+"/\x3e"})}else A="",p.checked&&(b.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
(r.checked?"\x26layers\x3d1":"")+"');}}})(this);"),A+="cursor:pointer;"),k.checked&&(s=parseInt(b.getAttribute("width")),y=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","0 0 "+s+" "+y),A+="max-width:100%;max-height:"+y+"px;",b.removeAttribute("height")),""!=A&&b.setAttribute("style",A),e.value=mxUtils.getXml(b);e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)}}a.getCurrentFile();var d=document.createElement("div"),
b=a.editor.graph;b.getGraphBounds();mxUtils.write(d,mxResources.get("mainEmbedNotice")+": ");mxUtils.br(d);var e=document.createElement("textarea");e.style.marginTop="6px";e.style.width="550px";e.style.height="280px";e.style.resize="none";d.appendChild(e);mxUtils.br(d);var g=document.createElement("div");g.style.paddingTop="16px";g.style.textAlign="center";var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;g.appendChild(k);
mxUtils.write(g,mxResources.get("fit"));var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginLeft="30px";b.shadowVisible&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);if(!c||a.isExportToCanvas())g.appendChild(l),mxUtils.write(g,mxResources.get("shadow"));var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.marginLeft="30px";c||(g.appendChild(m),mxUtils.write(g,mxResources.get("image")));var n=document.createElement("input");
@@ -7171,15 +7171,15 @@ n.setAttribute("type","checkbox");n.style.marginLeft="30px";c&&(g.appendChild(n)
"checked"),r.defaultChecked=!0):r.setAttribute("disabled","disabled");g.appendChild(r);mxUtils.write(g,mxResources.get("layers"));d.appendChild(g);this.init=function(){f()};mxEvent.addListener(m,"change",f);mxEvent.addListener(n,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(r,"change",f);g=document.createElement("div");g.style.paddingTop="18px";g.style.textAlign="right";!a.isOffline()&&!c&&(b=mxUtils.button(mxResources.get("help"),
function(){window.open("https://support.draw.io/pages/viewpage.action?pageId\x3d12222606")}),b.className="geBtn",g.appendChild(b));if(!mxClient.IS_CHROMEAPP&&!navigator.standalone&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))b=mxUtils.button(mxResources.get("preview"),function(){var a=window.open().document;a.writeln("\x3chtml\x3e\x3chead\x3e\x3ctitle\x3e"+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e\x3cbody\x3e'+
e.value+"\x3c/body\x3e\x3c/html\x3e");a.close()}),b.className="geBtn",g.appendChild(b);var b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}),s=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});g.appendChild(b);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(s),s.className=
-"geBtn gePrimaryBtn",b.className="geBtn"):b.className="geBtn gePrimaryBtn";d.appendChild(g);this.container=d},GoogleSitesDialog=function(a){function c(){var a=null!=C.getTitle()?C.getTitle():this.defaultFilename;if(y.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type\x3d4\x26diagram\x3d"+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a));0<x.length&&(b+="\x26s\x3d"+x);""!=r.value&&"0"!=r.value&&(b+="\x26border\x3d"+r.value);""!=n.value&&
-(b+="\x26height\x3d"+n.value);b+="\x26pan\x3d"+(s.checked?"1":"0");b+="\x26zoom\x3d"+(q.checked?"1":"0");b+="\x26fit\x3d"+(z.checked?"1":"0");b+="\x26resize\x3d"+(u.checked?"1":"0");b+="\x26x0\x3d"+Number(m.value);b+="\x26y0\x3d"+k;d.mathEnabled&&(b+="\x26math\x3d1");v.checked?b+="\x26edit\x3d_blank":t.checked&&(b+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed\x3d0\x26diagram\x3d",
-""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"\x26type\x3d3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"\x26type\x3d2":b+"\x26type\x3d1"),null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(m.value),b+="\x26height\x3d"+a),l.value=b):l.value=""}var f=document.createElement("div"),d=a.editor.graph,b=d.getGraphBounds(),e=d.view.scale,g=Math.floor(b.x/e-d.view.translate.x),k=Math.floor(b.y/e-d.view.translate.y);mxUtils.write(f,
+"geBtn gePrimaryBtn",b.className="geBtn"):b.className="geBtn gePrimaryBtn";d.appendChild(g);this.container=d},GoogleSitesDialog=function(a){function c(){var a=null!=D.getTitle()?D.getTitle():this.defaultFilename;if(y.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type\x3d4\x26diagram\x3d"+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a));0<x.length&&(b+="\x26s\x3d"+x);""!=r.value&&"0"!=r.value&&(b+="\x26border\x3d"+r.value);""!=n.value&&
+(b+="\x26height\x3d"+n.value);b+="\x26pan\x3d"+(s.checked?"1":"0");b+="\x26zoom\x3d"+(q.checked?"1":"0");b+="\x26fit\x3d"+(z.checked?"1":"0");b+="\x26resize\x3d"+(u.checked?"1":"0");b+="\x26x0\x3d"+Number(m.value);b+="\x26y0\x3d"+k;d.mathEnabled&&(b+="\x26math\x3d1");v.checked?b+="\x26edit\x3d_blank":t.checked&&(b+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed\x3d0\x26diagram\x3d",
+""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"\x26type\x3d3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"\x26type\x3d2":b+"\x26type\x3d1"),null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(m.value),b+="\x26height\x3d"+a),l.value=b):l.value=""}var f=document.createElement("div"),d=a.editor.graph,b=d.getGraphBounds(),e=d.view.scale,g=Math.floor(b.x/e-d.view.translate.x),k=Math.floor(b.y/e-d.view.translate.y);mxUtils.write(f,
mxResources.get("googleGadget")+":");mxUtils.br(f);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";f.appendChild(l);mxUtils.br(f);this.init=function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size",
"4");m.style.marginRight="16px";m.style.marginLeft="4px";m.value=g;f.appendChild(m);mxUtils.write(f,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(b.height/e);f.appendChild(n);mxUtils.br(f);b=document.createElement("hr");b.setAttribute("size","1");b.style.marginBottom="16px";b.style.marginTop="16px";f.appendChild(b);mxUtils.write(f,mxResources.get("publicDiagramUrl")+":");mxUtils.br(f);
var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";f.appendChild(p);mxUtils.br(f);mxUtils.write(f,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.setAttribute("size","3");r.style.marginBottom="8px";r.style.marginLeft="4px";r.value="0";f.appendChild(r);mxUtils.br(f);var s=document.createElement("input");s.setAttribute("type",
"checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="16px";f.appendChild(s);mxUtils.write(f,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";f.appendChild(q);mxUtils.write(f,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);
f.appendChild(t);mxUtils.write(f,mxResources.get("edit")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";f.appendChild(v);mxUtils.write(f,mxResources.get("asNew")+" ");mxUtils.br(f);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";f.appendChild(u);mxUtils.write(f,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type",
-"checkbox");z.style.marginLeft="8px";f.appendChild(z);mxUtils.write(f,mxResources.get("fit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";f.appendChild(y);mxUtils.write(f,mxResources.get("embed")+" ");var x=a.getBasenames().join(";"),C=a.getCurrentFile();c();p.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(C,function(a){p.setAttribute("placeholder","");p.value=null!=a?a:"";c()});mxEvent.addListener(s,"change",c);
+"checkbox");z.style.marginLeft="8px";f.appendChild(z);mxUtils.write(f,mxResources.get("fit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";f.appendChild(y);mxUtils.write(f,mxResources.get("embed")+" ");var x=a.getBasenames().join(";"),D=a.getCurrentFile();c();p.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(D,function(a){p.setAttribute("placeholder","");p.value=null!=a?a:"";c()});mxEvent.addListener(s,"change",c);
mxEvent.addListener(q,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)});
b=document.createElement("div");b.style.paddingTop="12px";b.style.textAlign="right";e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);f.appendChild(b);this.container=f},IframeDialog=function(a,c,f){function d(){null!=u&&null!=u.getTitle()&&u.getTitle();if(f&&null!=u&&(""!=q.value||u.constructor==DriveFile||u.constructor==DropboxFile||u.constructor==OneDriveFile)){t.removeAttribute("disabled");v.removeAttribute("disabled");var a=
"https://www.draw.io/?chrome\x3d0";p.checked&&(a+="\x26lightbox\x3d1");r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+u.getHash())));e.foldingEnabled&&(a+="\x26nav\x3d1");s.checked&&(a+="\x26layers\x3d1");a=""!=q.value?a+("\x26url\x3d"+encodeURIComponent(mxUtils.htmlEntities(q.value))):a+("#"+u.getHash());l.value=a;l.removeAttribute("disabled")}else if(""!=q.value){t.removeAttribute("disabled");v.removeAttribute("disabled");var b=encodeURIComponent(mxUtils.htmlEntities(q.value));
@@ -7215,7 +7215,7 @@ a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.ph
d.length){var e=a.editor.graph,f=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle\x3d1;childLayout\x3dstackLayout;horizontal\x3d1;startSize\x3d26;fillColor\x3dnone;horizontalStack\x3d0;resizeParent\x3d1;resizeLast\x3d0;collapsible\x3d1;marginBottom\x3d0;swimlaneFillColor\x3d#ffffff;");f.vertex=!0;var k=e.getPreferredSizeForCell(f);null!=k&&f.geometry.width<k.width+10&&(f.geometry.width=k.width+10);if(1<d.length)for(var g=1;g<d.length;g++)if("--"==d[g])k=new mxCell("",new mxGeometry(0,
0,40,8),"line;strokeWidth\x3d1;fillColor\x3dnone;align\x3dleft;verticalAlign\x3dmiddle;spacingTop\x3d-1;spacingLeft\x3d3;spacingRight\x3d3;rotatable\x3d0;labelPosition\x3dright;points\x3d[];portConstraint\x3deastwest;"),k.vertex=!0,f.geometry.height+=k.geometry.height,f.insert(k);else if(0<d[g].length&&";"!=d[g].charAt(0)){var l=new mxCell(d[g],new mxGeometry(0,0,60,26),"text;strokeColor\x3dnone;fillColor\x3dnone;align\x3dleft;verticalAlign\x3dtop;spacingLeft\x3d4;spacingRight\x3d4;overflow\x3dhidden;rotatable\x3d0;points\x3d[[0,0.5],[1,0.5]];portConstraint\x3deastwest;");
l.vertex=!0;k=e.getPreferredSizeForCell(l);null!=k&&l.geometry.width<k.width&&(l.geometry.width=k.width);f.geometry.width=Math.max(f.geometry.width,l.geometry.width);f.geometry.height+=l.geometry.height;f.insert(l)}k=e.view;l=e.getGraphBounds();g=Math.ceil(Math.max(0,l.x/k.scale-k.translate.x)+4*e.gridSize);k=Math.ceil(Math.max(0,(l.y+l.height)/k.scale-k.translate.y)+4*e.gridSize);e.setSelectionCells(e.importCells([f],g,k));e.scrollCellToVisible(e.getSelectionCell())}}else{for(var m={},y=[],e=function(a){var b=
-m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,m[a]=b,y.push(b));return b},g=0;g<d.length;g++)if(";"!=d[g].charAt(0)){var x=d[g].split("-\x3e");if(2==x.length){var l=e(x[0]),x=e(x[1]),C=new mxCell("",new mxGeometry);C.edge=!0;l.insertEdge(C,!0);x.insertEdge(C,!1);y.push(C)}}if(0<y.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);e=new Graph(d);e.getModel().beginUpdate();try{y=e.importCells(y);for(g=0;g<y.length;g++)e.getModel().isVertex(y[g])&&
+m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,m[a]=b,y.push(b));return b},g=0;g<d.length;g++)if(";"!=d[g].charAt(0)){var x=d[g].split("-\x3e");if(2==x.length){var l=e(x[0]),x=e(x[1]),D=new mxCell("",new mxGeometry);D.edge=!0;l.insertEdge(D,!0);x.insertEdge(D,!1);y.push(D)}}if(0<y.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);e=new Graph(d);e.getModel().beginUpdate();try{y=e.importCells(y);for(g=0;g<y.length;g++)e.getModel().isVertex(y[g])&&
(k=e.getPreferredSizeForCell(y[g]),y[g].geometry.width=Math.max(y[g].geometry.width,k.width),y[g].geometry.height=Math.max(y[g].geometry.height,k.height));f=new mxFastOrganicLayout(e);f.disableEdgeStyle=!1;f.forceConstant=120;f.execute(e.getDefaultParent());e.moveCells(y,20,20)}finally{e.getModel().endUpdate()}e.clearCellOverlays();k=a.editor.graph.view;l=a.editor.graph.getGraphBounds();g=Math.ceil(Math.max(0,l.x/k.scale-k.translate.x)+e.gridSize);k=Math.ceil(Math.max(0,(l.y+l.height)/k.scale-k.translate.y)+
4*e.gridSize);a.editor.graph.setSelectionCells(a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),g,k));a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());e.destroy();d.parentNode.removeChild(d)}}}function d(){return!g.checked?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":";Example:\na-\x3eb\nb-\x3ec\nc-\x3ea\n"}var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");
e.style.resize="none";e.style.width="100%";e.style.height="354px";e.style.marginBottom="16px";var g=document.createElement("input");g.setAttribute("type","checkbox");var k=d();e.value=k;b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),e.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=
@@ -7229,9 +7229,9 @@ v.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in x){var e=docume
"40px";n.style.marginRight="10px";n.style.paddingBottom="4px";n.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&f&&m.appendChild(n);f&&mxUtils.write(m,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+
":");n=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?n=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?n=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive&&(n=a.oneDrive.extension);var p=document.createElement("input");p.setAttribute("value",a.defaultFilename+n);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width=c?"220px":"450px";this.init=function(){f&&(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",
!1,null))};f&&m.appendChild(p);var r=null,s=null,q=null,t=mxUtils.button(mxResources.get("create"),function(){b()});t.className="geBtn gePrimaryBtn";var v=document.createElement("div");v.style.border="1px solid #d3d3d3";v.style.position="absolute";v.style.left="160px";v.style.right="34px";v.style.top=f?"72px":"40px";v.style.bottom="76px";v.style.margin="6px 0 0 -1px";v.style.padding="6px";v.style.overflow="auto";var u=document.createElement("div");u.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
-f||(u.style.top="40px");var z=140,y=140,x={},C=1;x.basic=[{title:"blankDiagram",select:!0}];var A=x.basic;if(!c){l.appendChild(u);l.appendChild(v);var B=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!B){B=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=x[b];null==c&&(C++,c=[],x[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
-tooltip:a.getAttribute("url")})}}a=a.nextSibling}k()}})}mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&b()});m=document.createElement("div");m.style.marginTop=c?"4px":"16px";m.style.textAlign="right";m.style.position="absolute";m.style.left="40px";m.style.bottom="30px";m.style.right="40px";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);if(!c&&!a.isOffline()&&f&&null==d){var E=mxUtils.button(mxResources.get("help"),
-function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});E.className="geBtn";m.appendChild(E)}!c&&"1"!=urlParams.embed&&(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode\x3d"+a.mode+"\x26title\x3d"+encodeURIComponent(p.value)+"\x26create\x3d"+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},
+f||(u.style.top="40px");var z=140,y=140,x={},D=1;x.basic=[{title:"blankDiagram",select:!0}];var A=x.basic;if(!c){l.appendChild(u);l.appendChild(v);var B=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!B){B=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=x[b];null==c&&(D++,c=[],x[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
+tooltip:a.getAttribute("url")})}}a=a.nextSibling}k()}})}mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&b()});m=document.createElement("div");m.style.marginTop=c?"4px":"16px";m.style.textAlign="right";m.style.position="absolute";m.style.left="40px";m.style.bottom="30px";m.style.right="40px";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);if(!c&&!a.isOffline()&&f&&null==d){var C=mxUtils.button(mxResources.get("help"),
+function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});C.className="geBtn";m.appendChild(C)}!c&&"1"!=urlParams.embed&&(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode\x3d"+a.mode+"\x26title\x3d"+encodeURIComponent(p.value)+"\x26create\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.className="geBtn",m.appendChild(c));m.appendChild(t);!a.editor.cancelFirst&&null==d&&m.appendChild(n);l.appendChild(m);this.container=l},CreateDialog=function(a,c,f,d,b,e,g,k,l,m,n){function p(b,c,d,e){function f(){mxEvent.addListener(k,"click",function(){r(d);s(d)})}var k=document.createElement("a");k.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");
g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";k.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";k.className="geBaseButton";k.style.position="relative";k.style.margin="4px";k.style.padding="8px 8px 10px 8px";k.style.whiteSpace="nowrap";k.appendChild(g);mxClient.IS_QUIRKS&&(k.style.cssFloat="left",k.style.zoom="1");k.style.color="gray";k.style.fontSize="11px";var l=document.createElement("div");k.appendChild(l);mxUtils.write(l,c);if(null!=e&&null==a[e]){g.style.visibility=
"hidden";mxUtils.setOpacity(l,10);var m=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});m.spin(k);var n=window.setTimeout(function(){null==a[e]&&(m.stop(),k.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[e]&&(window.clearTimeout(n),mxUtils.setOpacity(l,100),g.style.visibility="",m.stop(),f())}))}else f();z.appendChild(k)}function r(b){if(g){var d=u.value,e=d.lastIndexOf(".");
@@ -7256,7 +7256,7 @@ 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(){r.value=Math.max(1,Math.min(g,Math.max(parseInt(r.value),parseInt(p.value))));p.value=Math.max(1,Math.min(g,Math.min(parseInt(r.value),parseInt(p.value))))}function f(b){function c(a,b,d){var f=a.getGraphBounds(),k=0,g=0,l=I.get(),m=1/a.pageScale,n=v.checked;if(n)var m=parseInt(G.value),p=parseInt(H.value),m=Math.min(l.height*p/(f.height/a.view.scale),l.width*m/(f.width/a.view.scale));else m=parseInt(t.value)/(100*a.pageScale),isNaN(m)&&(e=1/a.pageScale,
+PrintDialog.prototype.create=function(a){function c(){r.value=Math.max(1,Math.min(g,Math.max(parseInt(r.value),parseInt(p.value))));p.value=Math.max(1,Math.min(g,Math.min(parseInt(r.value),parseInt(p.value))))}function f(b){function c(a,b,d){var f=a.getGraphBounds(),k=0,g=0,l=J.get(),m=1/a.pageScale,n=v.checked;if(n)var m=parseInt(G.value),p=parseInt(H.value),m=Math.min(l.height*p/(f.height/a.view.scale),l.width*m/(f.width/a.view.scale));else m=parseInt(t.value)/(100*a.pageScale),isNaN(m)&&(e=1/a.pageScale,
t.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*e);l.height=Math.ceil(l.height*e);m*=e;!n&&a.pageVisible?(f=a.getPageLayout(),k-=f.x*l.width,g-=f.y*l.height):n=!0;if(null==b){b=PrintDialog.createPrintPreview(a,m,l,0,k,g,n);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var q=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=q.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,null,
d,!0)}else{l=a.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";b.backgroundColor=l;b.autoOrigin=n;b.appendGraph(a,m,k,g,d,!0)}return b}var e=parseInt(L.value)/100;isNaN(e)&&(e=1,L.value="100 %");var e=0.75*e,f=p.value,g=r.value,l=!m.checked,n=null;l&&(l=f==k&&g==k);if(!l&&null!=a.pages&&a.pages.length){var q=0,l=a.pages.length-1;m.checked||(q=parseInt(f)-1,l=parseInt(g)-1);for(var s=q;s<=l;s++){var u=a.pages[s],f=u==a.currentPage?d:null;if(null==f){var f=a.createTemporaryGraph(d.getStylesheet()),
g=!0,q=!1,x=null,z=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(g=u.viewState.pageVisible,q=u.viewState.mathEnabled,x=u.viewState.background,z=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(q="0"!=u.mapping.diagramMap.get("mathEnabled"),x=u.mapping.diagramMap.get("background"),z=u.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);f.background=x;f.backgroundImage=null!=z?new mxImage(z.src,
@@ -7267,9 +7267,9 @@ l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script\x3e"),l.wr
e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");l.appendChild(e);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.style.width="50px";l.appendChild(p);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));l.appendChild(e);var r=p.cloneNode(!0);l.appendChild(r);mxEvent.addListener(p,"focus",function(){n.checked=!0});mxEvent.addListener(r,
"focus",function(){n.checked=!0});mxEvent.addListener(p,"change",c);mxEvent.addListener(r,"change",c);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){k=e+1;p.value=k;r.value=k;break}p.setAttribute("max",g);r.setAttribute("max",g);1<g&&b.appendChild(l);var s=document.createElement("div");s.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type",
"radio");q.setAttribute("name","printZoom");s.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));s.appendChild(e);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","100 %");t.style.width="50px";s.appendChild(t);mxEvent.addListener(t,"focus",function(){q.checked=!0});b.appendChild(s);var l=l.cloneNode(!1),v=q.cloneNode(!0);v.setAttribute("value","fit");q.setAttribute("checked","checked");e=document.createElement("div");
-e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(v);l.appendChild(e);s=document.createElement("table");s.style.display="inline-block";var u=document.createElement("tbody"),z=document.createElement("tr"),y=z.cloneNode(!0),x=document.createElement("td"),C=x.cloneNode(!0),A=x.cloneNode(!0),B=x.cloneNode(!0),E=x.cloneNode(!0),F=x.cloneNode(!0);x.style.textAlign="right";B.style.textAlign="right";mxUtils.write(x,mxResources.get("fitTo"));var G=document.createElement("input");
-G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","1");G.setAttribute("min","1");G.setAttribute("type","number");G.style.width="40px";C.appendChild(G);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));A.appendChild(e);mxUtils.write(B,mxResources.get("fitToBy"));var H=G.cloneNode(!0);E.appendChild(H);mxEvent.addListener(G,"focus",function(){v.checked=!0});mxEvent.addListener(H,"focus",function(){v.checked=!0});e=document.createElement("span");mxUtils.write(e,
-mxResources.get("fitToSheetsDown"));F.appendChild(e);z.appendChild(x);z.appendChild(C);z.appendChild(A);y.appendChild(B);y.appendChild(E);y.appendChild(F);u.appendChild(z);u.appendChild(y);s.appendChild(u);l.appendChild(s);b.appendChild(l);l=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));l.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var I=PageSetupDialog.addPageFormatPanel(e,
+e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(v);l.appendChild(e);s=document.createElement("table");s.style.display="inline-block";var u=document.createElement("tbody"),z=document.createElement("tr"),y=z.cloneNode(!0),x=document.createElement("td"),D=x.cloneNode(!0),A=x.cloneNode(!0),B=x.cloneNode(!0),C=x.cloneNode(!0),F=x.cloneNode(!0);x.style.textAlign="right";B.style.textAlign="right";mxUtils.write(x,mxResources.get("fitTo"));var G=document.createElement("input");
+G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","1");G.setAttribute("min","1");G.setAttribute("type","number");G.style.width="40px";D.appendChild(G);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));A.appendChild(e);mxUtils.write(B,mxResources.get("fitToBy"));var H=G.cloneNode(!0);C.appendChild(H);mxEvent.addListener(G,"focus",function(){v.checked=!0});mxEvent.addListener(H,"focus",function(){v.checked=!0});e=document.createElement("span");mxUtils.write(e,
+mxResources.get("fitToSheetsDown"));F.appendChild(e);z.appendChild(x);z.appendChild(D);z.appendChild(A);y.appendChild(B);y.appendChild(C);y.appendChild(F);u.appendChild(z);u.appendChild(y);s.appendChild(u);l.appendChild(s);b.appendChild(l);l=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));l.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var J=PageSetupDialog.addPageFormatPanel(e,
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);l.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));l.appendChild(e);var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","100 %");L.style.width="60px";l.appendChild(L);b.appendChild(l);e=document.createElement("div");e.style.cssText="text-align:right;margin:42px 0 0 0;";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
l.className="geBtn";a.editor.cancelFirst&&e.appendChild(l);mxClient.IS_CHROMEAPP||(s=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),s.className="geBtn",e.appendChild(s));s=mxUtils.button(mxResources.get(mxClient.IS_CHROMEAPP?"ok":"print"),function(){a.hideDialog();f(!0)});s.className="geBtn gePrimaryBtn";e.appendChild(s);a.editor.cancelFirst||e.appendChild(l);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"));
@@ -7293,21 +7293,21 @@ var RevisionDialog=function(a,c){var f=document.createElement("div"),d=document.
"376px";e.style.overflow="hidden";mxEvent.disableContextMenu(e);f.appendChild(e);var g=new Graph(e);g.setEnabled(!1);g.setPanning(!0);g.panningHandler.ignoreCell=!0;g.panningHandler.useLeftButtonForPanning=!0;g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;var k=0,l=null,m=0,n=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a&&null!=l&&null!=l[m]?l[m].getAttribute("name"):"pagenumber"==a?m+1:n.apply(this,arguments)};g.getLinkForCell=function(){return null};Editor.MathJaxRender&&
g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(g.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),r=a.getCurrentFile(),s=null,q=null,t=null,v=null,u=mxUtils.button("",function(){null!=t&&g.zoomIn()});u.className="geSprite geSprite-zoomin";u.setAttribute("title",mxResources.get("zoomIn"));
u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var z=mxUtils.button("",function(){null!=t&&g.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var y=mxUtils.button("",function(){null!=t&&(g.maxFitScale=8,g.fit(8),g.center())});y.className=
-"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 C=
-document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var A=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"):
+"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 A=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"))}});A.className="geBtn";A.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 E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var F=null;mxEvent.addListener(E,
+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 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"));
-else if(null!=c&&0<c.length){e.style.cursor="move";var P=document.createElement("table");P.style.border="1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var U=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var O=c.length-1;0<=O;O--){var D=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){f=document.createElement("tr");f.style.borderBottom=
+d=document.createElement("div");d.style.position="absolute";d.style.top="482px";d.style.width="640px";d.style.textAlign="right";var J=document.createElement("div");J.className="geToolbarContainer";J.style.backgroundColor="transparent";J.style.padding="2px";J.style.border="none";J.style.left="199px";J.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",J.style.display="none",mxUtils.write(b,mxResources.get("notAvailable"));
+else if(null!=c&&0<c.length){e.style.cursor="move";var P=document.createElement("table");P.style.border="1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var U=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(var O=c.length-1;0<=O;O--){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 D=function(b){p.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){E.style.display="none";E.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){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==m&&c.setAttribute("selected","selected"),E.appendChild(c)}F=function(){m=k=parseInt(E.value);s(l[k])}}else q(n);
-C.innerHTML="";mxUtils.write(C,d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));u.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"),H.removeAttribute("disabled"),G.removeAttribute("disabled");mxUtils.setOpacity(u,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(y,60);
-mxUtils.setOpacity(x,60)}else E.style.display="none",E.innerHTML="",C.innerHTML="",mxUtils.write(C,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,C.removeAttribute("title"),C.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),u.setAttribute("disabled",
-"disabled"),z.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(x,20),p.spin(e),b.getXml(function(a){q==b&&D(a)},function(a){p.stop();E.style.display="none";E.innerHTML="";C.innerHTML="";mxUtils.write(C,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);U.appendChild(f)}return f}(c[O]);null!=D&&O==c.length-1&&(L=D)}P.appendChild(U);b.appendChild(P)}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(E);I.appendChild(u);I.appendChild(z);I.appendChild(x);I.appendChild(y);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(A),d.appendChild(G),d.appendChild(B),d.appendChild(H)):(d.appendChild(A),d.appendChild(G),d.appendChild(B),d.appendChild(H),d.appendChild(b));f.appendChild(d);f.appendChild(I);f.appendChild(C);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";mxUtils.write(l,
+" "+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)}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");z.removeAttribute("disabled");y.removeAttribute("disabled");x.removeAttribute("disabled");if(null==r||!r.isRestricted())a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),A.removeAttribute("disabled"),H.removeAttribute("disabled"),G.removeAttribute("disabled");mxUtils.setOpacity(u,60);mxUtils.setOpacity(z,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"),A.setAttribute("disabled","disabled"),u.setAttribute("disabled",
+"disabled"),z.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(z,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);U.appendChild(f)}return f}(c[O]);null!=E&&O==c.length-1&&(L=E)}P.appendChild(U);b.appendChild(P)}else e.style.display="none",J.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";J.appendChild(C);J.appendChild(u);J.appendChild(z);J.appendChild(x);J.appendChild(y);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(A),d.appendChild(G),d.appendChild(B),d.appendChild(H)):(d.appendChild(A),d.appendChild(G),d.appendChild(B),d.appendChild(H),d.appendChild(b));f.appendChild(d);f.appendChild(J);f.appendChild(D);this.container=f},DraftDialog=function(a,c,f,d,b,e,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";mxUtils.write(l,
c);k.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.marginTop="10px";m.style.width="640px";m.style.height="386px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);k.appendChild(m);var n=new Graph(m);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(f);var p=a.editor.extractGraphModel(c.documentElement,
!0),r=0,s=null,q=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=s&&null!=s[r]?s[r].getAttribute("name"):"pagenumber"==a?r+1:q.apply(this,arguments)};n.getLinkForCell=function(){return null};c=mxUtils.button("",function(){n.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);f=mxUtils.button("",function(){n.zoomOut()});f.className="geSprite geSprite-zoomout";
f.setAttribute("title",mxResources.get("zoomOut"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});l.className="geSprite geSprite-fit";l.setAttribute("title",mxResources.get("fit"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);var t=mxUtils.button("",function(){n.zoomActual();n.center()});t.className="geSprite geSprite-actualsize";t.setAttribute("title",
@@ -7319,13 +7319,13 @@ n.center()}}function c(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompre
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,k){if(null!=a.shape){for(var g=[b[0]],l=d*f/k,m=1;m<e;m++)if(l<=c[m-1]){g.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],g.push(b[m]);a.shape.points=g;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(g==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(g,b);g++}}b=null!=b?b:30;c=null!=c?c:30;for(var e=[],f=0;f<a.length;f++){var k=B.view.getState(a[f]);null!=k&&null!=k.shape&&
-B.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&B.model.isVertex(k.cell)&&(null!=k.shape&&null!=k.shape.bounds)&&e.push(m(k))}var g=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=E=!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(E&&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<
+B.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&B.model.isVertex(k.cell)&&(null!=k.shape&&null!=k.shape.bounds)&&e.push(m(k))}var g=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 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"),z=document.createElement("tr");
-z.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 C=a.editor.graph.getModel().getRoot();null!=C.value&&"object"==typeof C.value&&(x.value=C.value.getAttribute("animation"));var A=document.createElement("div");A.style.border="1px solid lightGray";A.style.background="#ffffff";A.style.width="100%";A.style.height="100%";A.style.overflow=
-"auto";mxEvent.disableContextMenu(A);u.appendChild(A);var B=new Graph(A);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 E=!1,F=!1,A=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(A);A=mxUtils.button("Wipe In",
+z.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 A=document.createElement("div");A.style.border="1px solid lightGray";A.style.background="#ffffff";A.style.width="100%";A.style.height="100%";A.style.overflow=
+"auto";mxEvent.disableContextMenu(A);u.appendChild(A);var B=new Graph(A);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,F=!1,A=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(A);A=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(A);A=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(A);A=mxUtils.button("Wait",function(){x.value+="wait 1000\n"});y.appendChild(A);A=mxUtils.button("Preview",function(){r()});y.appendChild(A);
-A=mxUtils.button("Stop",function(){E=!1;B.getModel().clear()});y.appendChild(A);A=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(C,"animation",x.value)});y.appendChild(A);C=a.editor.graph.getModel().getRoot();t.appendChild(v);t.appendChild(u);q.appendChild(t);z.appendChild(y);q.appendChild(z);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);
+A=mxUtils.button("Stop",function(){C=!1;B.getModel().clear()});y.appendChild(A);A=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(D,"animation",x.value)});y.appendChild(A);D=a.editor.graph.getModel().getRoot();t.appendChild(v);t.appendChild(u);q.appendChild(t);z.appendChild(y);q.appendChild(z);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"),k.src=IMAGE_PATH+"/onedrive-logo-white.svg");c=document.createElement("p");mxUtils.write(c,mxResources.get("authorizeThisAppIn",[g]));var l=document.createElement("input");l.setAttribute("type","checkbox");g=mxUtils.button(mxResources.get("authorize"),function(){a.hideDialog(!1);d(l.checked)});g.insertBefore(k,g.firstChild);g.style.marginTop=
"6px";g.className="geBigButton";b.appendChild(e);b.appendChild(c);b.appendChild(g);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(l),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),f.appendChild(e),b.appendChild(f),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)}));this.container=b},MoreShapesDialog=function(a,c,f){f=null!=f?f:a.sidebar.entries;var d=document.createElement("div");
@@ -7350,32 +7350,32 @@ mxUtils.write(l,mxResources.get("height")+":");var s=document.createElement("inp
mxConstants.STYLE_ROTATION,0):"";m.appendChild(q);k.appendChild(l);k.appendChild(m);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var d=f.getCellGeometry(c[b]);null!=d&&(d=d.clone(),f.isCellMovable(c[b])&&(0<mxUtils.trim(n.value).length&&(d.x=Number(n.value)),0<mxUtils.trim(p.value).length&&(d.y=
Number(p.value))),f.isCellResizable(c[b])&&(0<mxUtils.trim(r.value).length&&(d.width=Number(r.value)),0<mxUtils.trim(s.value).length&&(d.height=Number(s.value))),f.getModel().setGeometry(c[b],d));0<mxUtils.trim(q.value).length&&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,m,p,r){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=m||null==t[b]){s.style.backgroundImage="";q.style.display="none";var y=
-f,A=l;if(f>a.maxImageSize||l>a.maxImageSize){var D=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=D;l*=D}y>A?(A=Math.round(A*v/y),y=v):(y=Math.round(y*u/A),A=u);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";N.style.position="relative";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=b){var Q=document.createElement("img");Q.setAttribute("src",
-C.convert(b));Q.style.width=y+"px";Q.style.height=A+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((u-A)/2)+"px";Q.style.paddingLeft=Math.floor((v-y)/2)+"px";N.appendChild(Q)}else if(null!=m){var M=a.stringToCells(a.editor.graph.decompress(m.xml));0<M.length&&(a.sidebar.createThumb(M,v,u,N,null,!0,!1),N.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",N.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!=m&&(V.style.position="relative");(function(a,c){mxEvent.addListener(V,"click",function(d){t[b]=null;for(var e=0;e<n.length;e++)if(null!=b&&n[e].data==c||null!=m&&n[e].xml==m.xml){n.splice(e,1);break}N.parentNode.removeChild(a);0==n.length&&(s.style.backgroundImage=
-"url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(V,"dblclick",function(a){mxEvent.consume(a)})})(N,b,m);N.appendChild(V);N.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:r},null!=p&&
-(K.aspect=p),t[b]=Q,n.push(K)):null!=m&&(m.aspect="fixed",n.push(m),K=m);var R=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))});R();N.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){"true"!=
-J.getAttribute("contentEditable")&&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;R()};mxEvent.consume(b)}}else{var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,R())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}};mxEvent.addListener(J,"click",f);mxEvent.addListener(N,"dblclick",f);s.appendChild(N);mxEvent.addListener(N,"dragstart",function(a){null==b&&null!=m&&(V.style.visibility="hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=
-m.xml&&a.dataTransfer.setData("Text",m.xml);z=g(a);mxClient.IS_GC&&(N.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);V.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(N,"dragend",function(a){"hidden"==V.style.visibility&&(V.style.visibility="",J.style.visibility="");z=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.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);y=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=y&&0<y.length)for(l=0;l<y.length;l++)null!=y[l].xml?k(null,null,0,0,0,0,y[l]):k(y[l].data,null,0,0,y[l].w,y[l].h,null,"fixed",y[l].title);a.spinner.stop();f=!0}}catch(X){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){console.log("e",da)}return null}function l(a){a.dataTransfer.dropEffect=null!=z?"move":
-"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();y=g(b);if(null!=z)null!=y&&y<s.children.length?(n.splice(y>z?y-1:y,0,n.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(n.push(n.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 n=[];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||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};p.appendChild(r);var s=document.createElement("div");
-s.style.borderWidth="1px 0px 1px 0px";s.style.borderColor="#d3d3d3";s.style.borderStyle="solid";s.style.marginTop="6px";s.style.overflow="auto";s.style.height="340px";s.style.backgroundPosition="center center";s.style.backgroundRepeat="no-repeat";0==n.length&&Graph.fileSupport&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";
-q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));f.appendChild(q);var t={},v=100,u=100,z=null,y=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(s,"mousedown",c);mxEvent.addListener(s,"pointerdown",c);mxEvent.addListener(s,"touchstart",c);var C=new mxUrlConverter;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,null,0,0,p.w,p.h,p);mxEvent.addListener(s,"dragleave",function(a){q.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==s||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});mxEvent.addListener(s,"dragover",l);mxEvent.addListener(s,"drop",m);mxEvent.addListener(q,"dragover",l);mxEvent.addListener(q,"drop",m);f.appendChild(s);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&
-d.appendChild(c);!window.chrome||!chrome.app||!chrome.app.runtime?(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),c=r.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(new mxXmlRequest(SAVE_URL,"filename\x3d"+encodeURIComponent(c)+"\x26format\x3dxml\x26xml\x3d"+encodeURIComponent(b))).simulate(document,"_blank")}),p.setAttribute("id","btnDownload"),p.className="geBtn",d.appendChild(p)):r.setAttribute("disabled",
-"disabled");var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(b){a.importFiles(A.files,0,0,a.maxImageSize,function(a,b,c,d,e,f,g){k(a,b,c,d,e,f,g,"fixed");A.value=""})}),p=mxUtils.button(mxResources.get("import"),function(){null!=x&&(x(),x=null);A.click()}),p.setAttribute("id","btnAddImage"),p.className="geBtn",d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),
-function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}k(a,null,0,0,b,c)}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(r.value,
-n,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";mxUtils.write(g,f);e.appendChild(g);l.appendChild(e);
-e=document.createElement("tr");g=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=d-200+"px";m.style.height=b+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};g.appendChild(m);e.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=b+4+"px";f.style.overflow="hidden";
-f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var n=new Graph(f);n.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];n.addCells([p]);f=n.view.getState(p);var r="";null!=f.shape&&null!=f.shape.stencil&&(r=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(m,r||"");f=n.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);n.view.scaleAndTranslate(b,20/b-f.x,20/b-f.y);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");
-g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Editing+Shapes")}),f.className="geBtn",g.appendChild(f));var s=function(b,c,d){var e=m.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 k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(g){throw g;}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};
+f,B=l;if(f>a.maxImageSize||l>a.maxImageSize){var T=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=T;l*=T}y>B?(B=Math.round(B*v/y),y=v):(y=Math.round(y*u/B),B=u);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";M.style.position="relative";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition","transform .1s ease-in-out");if(null!=b){var K=document.createElement("img");K.setAttribute("src",
+D.convert(b));K.style.width=y+"px";K.style.height=B+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((u-B)/2)+"px";K.style.paddingLeft=Math.floor((v-y)/2)+"px";M.appendChild(K)}else if(null!=m){var Y=a.stringToCells(a.editor.graph.decompress(m.xml));0<Y.length&&(a.sidebar.createThumb(Y,v,u,M,null,!0,!1),M.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",M.firstChild.style.cursor="")}var N=document.createElement("img");N.setAttribute("src",Editor.closeImage);N.setAttribute("border",
+"0");N.setAttribute("title",mxResources.get("delete"));N.setAttribute("align","top");N.style.paddingTop="4px";N.style.marginLeft="-22px";N.style.cursor="pointer";mxEvent.addListener(N,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=m&&(N.style.position="relative");(function(a,b,c){mxEvent.addListener(N,"click",function(d){t[b]=null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==b||null!=n[e].xml&&n[e].xml==c.xml){n.splice(e,1);break}M.parentNode.removeChild(a);0==n.length&&
+(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(N,"dblclick",function(a){mxEvent.consume(a)})})(M,b,m);M.appendChild(N);M.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var Q=null;null!=b?(Q={data:b,
+w:f,h:l,title:r},null!=p&&(Q.aspect=p),t[b]=K,n.push(Q)):null!=m&&(m.aspect="fixed",n.push(m),Q=m);var V=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=Q.title&&0<Q.title.length?Q.title:mxResources.get("untitled"));I.style.color=null==Q.title||0==Q.title.length?"#d0d0d0":""};mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});V();M.appendChild(I);mxEvent.addListener(I,
+"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});f=function(b){if(!mxClient.IS_IOS&&!mxClient.IS_QUIRKS&&!mxClient.IS_FF&&(null==document.documentMode||9<document.documentMode)){if("true"!=I.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==Q.title||0==Q.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",
+!1,null);x=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";Q.title=I.innerHTML;V()};mxEvent.consume(b)}}else{var c=new FilenameDialog(a,Q.title||"",mxResources.get("ok"),function(a){null!=a&&(Q.title=a,V())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}};mxEvent.addListener(I,"click",f);mxEvent.addListener(M,"dblclick",f);s.appendChild(M);mxEvent.addListener(M,"dragstart",function(a){null==b&&null!=m&&(N.style.visibility=
+"hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=m.xml&&a.dataTransfer.setData("Text",m.xml);z=g(a);mxClient.IS_GC&&(M.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(M.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(M,30);N.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(a){"hidden"==N.style.visibility&&(N.style.visibility="",I.style.visibility="");z=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,
+"transform",null)})}else A||(A=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(null!=b&&"\x3cmxlibrary"==b.substring(0,10)){B=mxUtils.parseXml(b);y=JSON.parse(mxUtils.getTextContent(B.documentElement));if(null!=y&&0<y.length)for(l=0;l<y.length;l++)null!=y[l].xml?k(null,null,0,0,0,0,y[l]):k(y[l].data,null,0,0,y[l].w,y[l].h,null,"fixed",y[l].title);a.spinner.stop();f=!0}}catch(da){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ca){console.log("e",
+ca)}return null}function l(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();A=!1;y=g(b);if(null!=z)null!=y&&y<s.children.length?(n.splice(y>z?y-1:y,0,n.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(n.push(n.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 n=[];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||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",
+!1,null)};p.appendChild(r);var s=document.createElement("div");s.style.borderWidth="1px 0px 1px 0px";s.style.borderColor="#d3d3d3";s.style.borderStyle="solid";s.style.marginTop="6px";s.style.overflow="auto";s.style.height="340px";s.style.backgroundPosition="center center";s.style.backgroundRepeat="no-repeat";0==n.length&&Graph.fileSupport&&(s.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top=
+"260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));f.appendChild(q);var t={},v=100,u=100,z=null,y=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(s,"mousedown",c);mxEvent.addListener(s,"pointerdown",c);mxEvent.addListener(s,"touchstart",c);var D=new mxUrlConverter,A=!1;if(null!=d)for(c=0;c<d.length;c++)p=d[c],k(p.data,
+null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(s,"dragleave",function(a){q.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==s||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});mxEvent.addListener(s,"dragover",l);mxEvent.addListener(s,"drop",m);mxEvent.addListener(q,"dragover",l);mxEvent.addListener(q,"drop",m);f.appendChild(s);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});
+c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);!window.chrome||!chrome.app||!chrome.app.runtime?(p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),c=r.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(new mxXmlRequest(SAVE_URL,"filename\x3d"+encodeURIComponent(c)+"\x26format\x3dxml\x26xml\x3d"+encodeURIComponent(b))).simulate(document,"_blank")}),p.setAttribute("id","btnDownload"),
+p.className="geBtn",d.appendChild(p)):r.setAttribute("disabled","disabled");var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){A=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,b,c,d,e,f,g){k(a,b,c,d,e,f,g,"fixed");B.value=""})}),p=mxUtils.button(mxResources.get("import"),function(){null!=x&&(x(),x=null);B.click()}),p.setAttribute("id","btnAddImage"),p.className="geBtn",
+d.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){A=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}k(a,null,0,0,b,c)}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";d.appendChild(p);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};p=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(r.value,n,b,e)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);f.appendChild(d);this.container=f},EditShapeDialog=function(a,c,f,d,b){d=null!=d?d:300;b=null!=b?b:120;var e,g,k=document.createElement("table"),l=document.createElement("tbody");k.style.cellPadding="4px";e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan",
+"2");g.style.fontSize="10pt";mxUtils.write(g,f);e.appendChild(g);l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=d-200+"px";m.style.height=b+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};g.appendChild(m);e.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
+"6px";f.style.width="200px";f.style.height=b+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var n=new Graph(f);n.setEnabled(!1);var p=a.editor.graph.cloneCells([c])[0];n.addCells([p]);f=n.view.getState(p);var r="";null!=f.shape&&null!=f.shape.stencil&&(r=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(m,r||"");f=n.getGraphBounds();b=Math.min(160/f.width,(b-40)/f.height);n.view.scaleAndTranslate(b,20/b-f.x,20/b-f.y);e.appendChild(g);
+l.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&g.appendChild(b);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Editing+Shapes")}),f.className="geBtn",g.appendChild(f));var s=
+function(b,c,d){var e=m.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 k=a.editor.graph.getInsertPoint();c.geometry.x=k.x;c.geometry.y=k.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+e+")",[c])}catch(g){throw g;}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(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":IMAGE_PATH+
"/delete.png";Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="\x26dev\x3d1",Editor.prototype.editBlankFallbackUrl+="\x26dev\x3d1");var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.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"==b.nodeName){c=b.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+"/"+
@@ -7417,7 +7417,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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.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"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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,k,g,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(){EditorUi.VERSION="6.0.1.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.plusImage=!mxClient.IS_SVG?IMAGE_PATH+"/plus.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII\x3d";
+(function(){EditorUi.VERSION="6.0.1.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.plusImage=!mxClient.IS_SVG?IMAGE_PATH+"/plus.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII\x3d";
EditorUi.spinImage=!mxClient.IS_SVG?IMAGE_PATH+"/spin.gif":"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw\x3d\x3d";
EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;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.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(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){}};
@@ -7448,7 +7448,7 @@ null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=
d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));var q=g+"."+a;if("xml"==a){var t='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,t,"text/xml")}else if("html"==a)t=this.getHtml2(this.getFileData(!0),this.editor.graph,g),
this.saveData(q,a,t,"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var v=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==a){var z=this.editor.graph.background;z==mxConstants.NONE&&(z=null);var y=this.editor.graph.getSvg(z,null,null,!1,null,
d);c&&this.editor.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}else{var x=this.editor.graph.getGraphBounds(),t=this.getFileData(!0,null,null,null,d,"xmlpng"!=
-a),C="";if(x.width*x.height<=MAX_AREA&&t.length<=MAX_REQUEST_SIZE){var A="0";if("xmlpng"==a&&(A="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){C="\x26from\x3d"+b;break}this.saveRequest(t,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+C+"\x26base64\x3d"+c+"\x26embedXml\x3d"+A+"\x26xml\x3d"+encodeURIComponent(t)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
+a),D="";if(x.width*x.height<=MAX_AREA&&t.length<=MAX_REQUEST_SIZE){var A="0";if("xmlpng"==a&&(A="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){D="\x26from\x3d"+b;break}this.saveRequest(t,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+D+"\x26base64\x3d"+c+"\x26embedXml\x3d"+A+"\x26xml\x3d"+encodeURIComponent(t)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
mxResources.get("error"))}}catch(B){this.handleError(B)}};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=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);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=
a)try{if(this.setCurrentFile(a),a.addListener("descriptorChanged",this.descriptorChangedListener),a.addListener("contentChanged",this.descriptorChangedListener),this.setMode(a.getMode()),this.descriptorChanged(),a.open(),this.diagramContainer.style.visibility="",this.formatContainer.style.visibility="",this.hsplit.style.display="",this.sidebarContainer.style.display="",this.sidebarFooterContainer.style.display="",this.editor.undoManager.clear(),this.updateUi(),null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):
@@ -7456,117 +7456,118 @@ this.editor.setStatus(mxResources.get("readOnly"))),this.editor.chromeless?this.
a,e),this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):c()}))}else c()};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
a,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));
-this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),
-mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+
-"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);c=g.parentNode.previousSibling;d=c.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&c.setAttribute("title",
-this.getLibraryStorageHint(a)+"\n"+d);var q=document.createElement("div");q.style.position="absolute";q.style.right="0px";q.style.top="5px";c.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.marginRight="8px";t.style.marginTop="3px";q.appendChild(t);var v=null;mxEvent.addListener(t,"click",mxUtils.bind(this,
-function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var u=this.editor.graph,z=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),
-y=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=t.cloneNode(!1),A.setAttribute("src",EditorUi.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="6px",A.style.marginTop="2px",q.insertBefore(A,q.firstChild),this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A)})):null==v&&(v=t.cloneNode(!1),v.setAttribute("src",
-IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),q.insertBefore(v,q.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);v.parentNode.removeChild(v);v=null;mxEvent.consume(c)})))}),x=mxUtils.bind(this,function(a,c,d,f){a=u.cloneCells(u.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var m=u.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);y(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),C=mxUtils.bind(this,function(a){if(u.isSelectionEmpty())u.getRubberband().isActive()?(u.getRubberband().execute(a),u.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
-u.getSelectionCells(),c=u.view.getBounds(b),d=u.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=u.view.translate.x;c.y-=u.view.translate.y;x(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){u.isMouseDown&&null!=u.panningManager&&null!=u.graphHandler.shape&&(u.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",
-g.style.cursor="copy",u.panningManager.stop(),u.autoScroll=!1,null!=u.graphHandler.guide&&u.graphHandler.guide.setVisible(!1),null!=u.graphHandler.hint&&(u.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){u.isMouseDown&&null!=u.panningManager&&null!=u.graphHandler&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,u.panningManager.stop(),u.graphHandler.reset(),
-u.isMouseDown=!1,u.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){u.isMouseDown&&null!=u.graphHandler.shape&&(u.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",u.autoScroll=!0,null!=u.graphHandler.guide&&u.graphHandler.guide.setVisible(!0),null!=u.graphHandler.hint&&(u.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,q,t){if(null!=c&&"image/"==d.substring(0,6)){var v="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),v=[new mxCell("",new mxGeometry(0,0,n,q),v)];v[0].vertex=!0;x(v,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))}else{t=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var u=
-JSON.parse(mxUtils.getTextContent(c.documentElement));f(u,g);b=b.concat(u);y(a);this.spinner.stop();t=!0}catch(z){}else if("mxfile"==c.documentElement.nodeName)try{u=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),v=this.stringToCells(this.editor.graph.decompress(u)),x(v,new mxRectangle(0,0,n,q),a),t=!0}catch(A){}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),
-e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));q.insertBefore(t,q.firstChild);mxEvent.addListener(t,"click",z);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&z(a)});t=t.cloneNode(!1);
-t.setAttribute("src",EditorUi.plusImage);t.setAttribute("title",mxResources.get("add"));q.insertBefore(t,q.firstChild);this.isOffline()||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;margin-right:8px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),q.insertBefore(d,q.firstChild));var A=null;mxEvent.addListener(t,
-"click",C)}c.appendChild(q)};"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()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};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.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
-"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+
-mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,
-!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,
-"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=
-!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type",
-"checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");
-t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&v.setAttribute("disabled","disabled");a&&(f.appendChild(v),mxUtils.write(f,mxResources.get("embedImages")),
-mxUtils.br(f));var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");u.style.marginBottom="8px";u.setAttribute("checked","checked");u.defaultChecked=!0;f.appendChild(u);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,u.checked,v.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"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);
-var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=document.createElement("input");
-z.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),y=document.createElement("input");y.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(y);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var x=a.lastIndexOf(".");
-0<x&&(a=a.substring(0,x));y.value=a+".png";var C=document.createElement("input");C.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");C.value="master";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(C);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Message:");A.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);
-q=q.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/"+u.value+"/"+z.value+"/contents/"+y.value+"?ref\x3d"+encodeURIComponent(C.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:y.value,message:A.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/"+u.value+"/"+z.value+"/blob/"+C.value+"/"+y.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(t.value+":"+v.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("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),v=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+
-b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+
-e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,
-function(){200==l.getStatus()?k():v(l)}),mxUtils.bind(this,function(){v(l)}))}else k()}catch(p){this.handleError(p)}else v(a)}),mxUtils.bind(this,function(a){v(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);
-if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(n){this.handleError(n)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(v){this.handleError(v)}}})):this.showRemoteExportDialog(mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),
-e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");
-b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
-"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,v,u,z){f=null!=f?f:!0;z=null!=z?z:this.editor.graph;var y=t?null:z.background;y==mxConstants.NONE&&(y=null);null==y&&(y=d);null==y&&!1==t&&(y="#ffffff");this.convertImages(z.getSvg(y,null,null,null,null,null!=g?g:!0),
-mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{v&&this.editor.addSvgShadow(c),this.convertMath(z,c,!0,
-mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,u)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 m=a.getElementsByTagName(c),v=0;v<m.length;v++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var s=f[m];null==s?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(m[v])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),
-t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var v=t.getElementsByTagName("diagram");if(1==v.length)t=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(v[0]))).documentElement;else if(1<v.length){g.model.beginUpdate();try{for(var u=0;u<v.length;u++){var z=this.updatePageRoot(new DiagramPage(v[u])),y=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[y+1]));g.model.execute(new ChangePage(this,
-z,z,y))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var x=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,x);var C=x.getChildCount(x.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(u=0;u<C;u++){var A=x.getChildAt(x.getRoot(),u);if(1==C&&!g.isCellLocked(g.getDefaultParent()))var B=x.getChildren(A),f=f.concat(g.importCells(B,b,c,g.getDefaultParent(),null,a));else A=g.importCells([A],0,0,g.model.getRoot(),null,a)[0],B=g.model.getChildren(A),
-g.moveCells(B,b,c),f=f.concat(B)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var E=g.getBoundingBoxFromGeometry(f,!0);null!=E&&g.moveCells(f,b-E.x,c-E.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}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 q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=
-null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,b,c,f,!0),0<t.length)return t}catch(v){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
-null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted",
-"cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,
-b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,
-e,f,g,q,t,v,u){v=null!=v?v:!0;var z=!1,y=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=u?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(y=this.importXml(b,c,d,v),g=!0)),g||(y=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&y.isGridEnabled()&&(c=y.snap(c),d=y.snap(d)),y=[y.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
-a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(z=!0,this.parseFile(null!=t?t: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,v));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(t):y=this.insertTextAt(this.validateFileData(a),c,d,!0);!z&&null!=q&&q(y);return y};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,q,t,v,u,z){var y=null!=b&&null!=
-c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;v=null!=v?v:this.maxImageBytes;t=null!=t?t:!0;var x=this.editor.graph,C=x.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,y,z)});f=null!=f?f:mxUtils.bind(this,function(a){x.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=
-a.length,B=A,E=[],F=mxUtils.bind(this,function(a,b){E[a]=b;if(0==--B){this.spinner.stop();if(null!=q)q(E);else{var c=[];x.getModel().beginUpdate();try{for(var d=0;d<E.length;d++){var e=E[d]();null!=e&&(c=c.concat(e))}}finally{x.getModel().endUpdate()}}f(c)}}),G=0;G<A;G++)mxUtils.bind(this,function(f){var q=a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),x=
-atob(k.substring(r+1)),y=mxUtils.parseXml(x),x=y.getElementsByTagName("svg");if(0<x.length){var x=x[0],A=z?null:x.getAttribute("content");null!=A&&"\x3c"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null!=A&&("\x3cmxfile "===A.substring(0,8)||"\x3cmxGraphModel "===A.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*C,c+f*C,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,
-r+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox","0 0 "+s+" "+t);else if(isNaN(s)||isNaN(t)){var u=v.split(" ");3<u.length&&(s=parseFloat(u[2]),t=parseFloat(u[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,t));return e(k,q.type,b+f*C,c+f*C,Math.max(1,Math.round(s*
-x)),Math.max(1,Math.round(t*x)),q.name)}}}catch(z){}return null}))}}else{x=!1;if("image/png"==q.type){var B=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var E=new Image;E.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*C,c+f*C,E.width,E.height,q.name)}));x=!0}}x||(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,k,s){F(f,mxUtils.bind(this,function(){if(null!=g&&g.length<v){var r=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/s));return e(g,q.type,b+f*C,c+f*C,Math.round(k*r),Math.round(s*r),q.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),t,d,u)})))}else e(a.target.result,q.type,b+f*C,c+f*C,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*C,c+f*C,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):r.readAsText(q)})(G)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var t=Math.max(g/e,q/e);if(1<t){var v=Math.round(g/t),u=Math.round(q/t),z=document.createElement("canvas");z.width=v;z.height=u;z.getContext("2d").drawImage(a,0,0,v,u);var y=z.toDataURL();if(y.length<b.length){var x=
-document.createElement("canvas");x.width=v;x.height=u;var C=x.toDataURL();y!==C&&(b=y,g=v,q=u)}}}catch(A){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var f=c,d=0;8>d;d++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[c]=f;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=q;q+=b;return a.substring(c,q)}
-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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>>16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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 b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");
-var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===
-c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");
-f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();
-document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&
-(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=
-this.createSpinner(document.body.clientWidth/2-2,e,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();
-a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){e=document.getElementById("geFooter");null!=e&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity=
-"0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),e.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
-"hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}e=document.getElementById("geInfo");null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var v=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=v&&(v.parentNode.removeChild(v),v=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==v&&
-(!mxClient.IS_IE||10<document.documentMode))v=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=v&&(v.parentNode.removeChild(v),v=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=
-m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,
-null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};
-EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,
-d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),t=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(t)&&(e=!0,d=t)}catch(v){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||
-this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(u){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
-null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),
-"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,
-"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,
-function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-
-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,
-d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+
-1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));
+this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,
+c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==
+f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=
+q.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="5px";t.style.backgroundColor="inherit";q.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("align","top");v.setAttribute("border","0");v.className="geButton";
+v.style.marginRight="1px";v.style.marginTop="-1px";t.appendChild(v);var u=null;mxEvent.addListener(v,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var z=
+this.editor.graph,y=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),x=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=v.cloneNode(!1),B.setAttribute("src",EditorUi.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",t.insertBefore(B,t.firstChild),q.style.paddingRight=18*t.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),q.style.paddingRight=18*t.childNodes.length+"px")})):null==u&&(u=v.cloneNode(!1),u.setAttribute("src",IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),t.insertBefore(u,t.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);u.parentNode.removeChild(u);u=null;q.style.paddingRight=
+18*t.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*t.childNodes.length+"px")}),D=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var m=z.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);
+x(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),A=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;D(b,c)}mxEvent.consume(a)});
+g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility=
+"visible",g.style.border="3px solid transparent",g.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor=
+"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,q,t){if(null!=c&&"image/"==d.substring(0,6)){var v="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+this.convertDataUri(c),v=[new mxCell("",new mxGeometry(0,0,n,q),v)];v[0].vertex=!0;D(v,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))}else{t=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var u=JSON.parse(mxUtils.getTextContent(c.documentElement));f(u,g);b=b.concat(u);x(a);this.spinner.stop();t=!0}catch(z){}else if("mxfile"==c.documentElement.nodeName)try{u=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
+v=this.stringToCells(this.editor.graph.decompress(u)),D(v,new mxRectangle(0,0,n,q),a),t=!0}catch(y){}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));
+v=v.cloneNode(!1);v.setAttribute("src",IMAGE_PATH+"/edit.gif");v.setAttribute("title",mxResources.get("edit"));t.insertBefore(v,t.firstChild);mxEvent.addListener(v,"click",y);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&y(a)});v=v.cloneNode(!1);v.setAttribute("src",EditorUi.plusImage);v.setAttribute("title",mxResources.get("add"));t.insertBefore(v,t.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),
+c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),t.insertBefore(c,t.firstChild));var B=null;mxEvent.addListener(v,"click",A)}q.appendChild(t);q.style.paddingRight=18*t.childNodes.length+"px"};"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()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};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.handleError=
+function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=
+typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),
+g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};
+EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=
+document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,
+e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,
+mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));
+mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&v.setAttribute("disabled","disabled");a&&(f.appendChild(v),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");u.style.marginBottom=
+"8px";u.setAttribute("checked","checked");u.defaultChecked=!0;f.appendChild(u);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,u.checked,v.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"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);
+q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);
+var q=q.cloneNode(!1),y=document.createElement("input");y.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(y);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var x=a.lastIndexOf(".");0<x&&(a=a.substring(0,x));y.value=a+".png";var D=document.createElement("input");D.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");D.value="master";
+g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(D);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Message:");A.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);q=q.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/"+
+u.value+"/"+z.value+"/contents/"+y.value+"?ref\x3d"+encodeURIComponent(D.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:y.value,message:A.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/"+u.value+"/"+z.value+"/blob/"+D.value+"/"+y.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(t.value+":"+v.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("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),v=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();
+var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),
+function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():v(l)}),mxUtils.bind(this,function(){v(l)}))}else k()}catch(p){this.handleError(p)}else v(a)}),mxUtils.bind(this,function(a){v(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,
+b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,
+e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(n){this.handleError(n)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(v){this.handleError(v)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*
+f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);
+if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&
+(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
+"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,v,u,z){f=null!=f?f:!0;z=null!=z?z:this.editor.graph;var y=t?null:z.background;y==mxConstants.NONE&&(y=null);null==y&&(y=d);null==y&&!1==t&&(y="#ffffff");this.convertImages(z.getSvg(y,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=
+q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{v&&this.editor.addSvgShadow(c),this.convertMath(z,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,u)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
+var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 m=a.getElementsByTagName(c),v=0;v<m.length;v++)mxUtils.bind(this,
+function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var s=f[m];null==s?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(m[v])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var v=t.getElementsByTagName("diagram");if(1==v.length)t=
+mxUtils.parseXml(g.decompress(mxUtils.getTextContent(v[0]))).documentElement;else if(1<v.length){g.model.beginUpdate();try{for(var u=0;u<v.length;u++){var z=this.updatePageRoot(new DiagramPage(v[u])),y=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[y+1]));g.model.execute(new ChangePage(this,z,z,y))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var x=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,x);var D=x.getChildCount(x.getRoot());
+g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(u=0;u<D;u++){var A=x.getChildAt(x.getRoot(),u);if(1==D&&!g.isCellLocked(g.getDefaultParent()))var B=x.getChildren(A),f=f.concat(g.importCells(B,b,c,g.getDefaultParent(),null,a));else A=g.importCells([A],0,0,g.model.getRoot(),null,a)[0],B=g.model.getChildren(A),g.moveCells(B,b,c),f=f.concat(B)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||
+this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}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 q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,
+b,c,f,!0),0<t.length)return t}catch(v){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted",
+"cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
+g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,t,v,u){v=null!=v?v:!0;var z=!1,y=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=u?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(y=this.importXml(b,c,d,v),g=!0)),g||(y=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
+1))),v&&y.isGridEnabled()&&(c=y.snap(c),d=y.snap(d)),y=[y.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(z=!0,this.parseFile(null!=t?t: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,v));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(t):y=this.insertTextAt(this.validateFileData(a),c,d,!0);!z&&null!=q&&q(y);return y};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,q,t,v,u,z){var y=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;v=null!=v?v:this.maxImageBytes;t=null!=t?t:!0;var x=this.editor.graph,D=x.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,y,z)});f=null!=f?f:mxUtils.bind(this,function(a){x.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=a.length,B=A,C=[],F=mxUtils.bind(this,function(a,b){C[a]=b;if(0==--B){this.spinner.stop();if(null!=q)q(C);else{var c=[];x.getModel().beginUpdate();try{for(var d=0;d<C.length;d++){var e=C[d]();null!=e&&(c=c.concat(e))}}finally{x.getModel().endUpdate()}}f(c)}}),G=0;G<A;G++)mxUtils.bind(this,function(f){var q=
+a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),x=atob(k.substring(r+1)),y=mxUtils.parseXml(x),x=y.getElementsByTagName("svg");if(0<x.length){var x=x[0],A=z?null:x.getAttribute("content");null!=A&&"\x3c"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null!=A&&("\x3cmxfile "===
+A.substring(0,8)||"\x3cmxGraphModel "===A.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*D,c+f*D,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,r+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox","0 0 "+s+" "+t);else if(isNaN(s)||isNaN(t)){var u=v.split(" ");3<u.length&&(s=
+parseFloat(u[2]),t=parseFloat(u[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,t));return e(k,q.type,b+f*D,c+f*D,Math.max(1,Math.round(s*x)),Math.max(1,Math.round(t*x)),q.name)}}}catch(z){}return null}))}}else{x=!1;if("image/png"==q.type){var B=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var C=new Image;C.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*D,c+f*D,C.width,C.height,
+q.name)}));x=!0}}x||(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,k,s){F(f,mxUtils.bind(this,function(){if(null!=
+g&&g.length<v){var r=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/s));return e(g,q.type,b+f*D,c+f*D,Math.round(k*r),Math.round(s*r),q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),t,d,u)})))}else e(a.target.result,q.type,b+f*D,c+f*D,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*D,c+f*D,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):
+r.readAsText(q)})(G)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
+f))try{var t=Math.max(g/e,q/e);if(1<t){var v=Math.round(g/t),u=Math.round(q/t),z=document.createElement("canvas");z.width=v;z.height=u;z.getContext("2d").drawImage(a,0,0,v,u);var y=z.toDataURL();if(y.length<b.length){var x=document.createElement("canvas");x.width=v;x.height=u;var D=x.toDataURL();y!==D&&(b=y,g=v,q=u)}}}catch(A){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var f=c,d=0;8>d;d++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[c]=f;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=q;q+=b;return a.substring(c,q)}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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>>
+16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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 b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};
+this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,
+c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";
+f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=
+a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
+"\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,e,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
+this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){e=document.getElementById("geFooter");
+null!=e&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),e.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}e=document.getElementById("geInfo");
+null!=e&&e.parentNode.removeChild(e);if(Graph.fileSupport){var v=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=v&&(v.parentNode.removeChild(v),v=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==v&&(!mxClient.IS_IE||10<document.documentMode))v=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=v&&(v.parentNode.removeChild(v),v=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),
+e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,
+f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),t=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(t)&&(e=!0,d=t)}catch(v){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),
+c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(u){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],
+"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):
+this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&
+(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+
+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=
+mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
+[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-
+4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=
+d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(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=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){!this.editor.modified||"0"==urlParams.modified?this.editor.setStatus(""):null!=urlParams.modified&&this.editor.setStatus(mxResources.get(urlParams.modified))});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function t(a){if(null!=
a&&"function"===typeof a.charAt&&"\x3c"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var r=f.data;if("json"==urlParams.proto){r=JSON.parse(r);if("dialog"==r.action){this.showError(null!=r.titleKey?mxResources.get(r.titleKey):r.title,null!=r.messageKey?mxResources.get(r.messageKey):
@@ -7574,9 +7575,9 @@ r.message,null!=r.buttonKey?mxResources.get(r.buttonKey):r.button);null!=r.modif
r.xml.substring(0,22)?this.extractGraphModelFromPng(r.xml):t(r.xml);u=new DraftDialog(this,mxResources.get("draftFound",[r.name||this.defaultFilename]),u,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:r}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:r}),"*")}),r.editKey?mxResources.get(r.editKey):null,r.discardKey?mxResources.get(r.discardKey):null);this.showDialog(u.container,
640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{u.init()}catch(z){g.postMessage(JSON.stringify({event:"draft",error:z.toString(),message:r}),"*")}return}if("template"==r.action){u=new NewDialog(this,!1,null!=r.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=r.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));
this.showDialog(u.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));u.init();return}if("status"==r.action){null!=r.messageKey?this.editor.setStatus(mxResources.get(r.messageKey)):null!=r.message&&this.editor.setStatus(r.message);null!=r.modified&&(this.editor.modified=r.modified);return}if("spinner"==r.action){var y=null!=r.messageKey?mxResources.get(r.messageKey):r.message;null!=r.show&&!r.show?this.spinner.stop():this.spinner.spin(document.body,y);return}if("export"==
-r.action){if("png"==r.format||"xmlpng"==r.format){if(null==r.spin&&null==r.spinKey||this.spinner.spin(document.body,null!=r.spinKey?mxResources.get(r.spinKey):r.spin)){var x=null!=r.xml?r.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=r.format;b.xml=encodeURIComponent(x);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var A=
-this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var A=this.createTemporaryGraph(A.getStylesheet()),B=A.getGlobalVariable,E=this.pages[0];A.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:B.apply(this,arguments)};document.body.appendChild(A.container);A.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==r.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(x))));
-A!=this.editor.graph&&A.container.parentNode.removeChild(A.container);C(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,A)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==r.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(x)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&C(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
+r.action){if("png"==r.format||"xmlpng"==r.format){if(null==r.spin&&null==r.spinKey||this.spinner.spin(document.body,null!=r.spinKey?mxResources.get(r.spinKey):r.spin)){var x=null!=r.xml?r.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=r.format;b.xml=encodeURIComponent(x);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var A=
+this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var A=this.createTemporaryGraph(A.getStylesheet()),B=A.getGlobalVariable,C=this.pages[0];A.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:B.apply(this,arguments)};document.body.appendChild(A.container);A.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==r.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(x))));
+A!=this.editor.graph&&A.container.parentNode.removeChild(A.container);D(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,A)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==r.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(x)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&D(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
r.xml&&0<r.xml.length&&this.setFileData(r.xml);y=this.createLoadMessage("export");if("html2"==r.format||"html"==r.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))u=this.getXmlFileData(),y.xml=mxUtils.getXml(u),y.data=this.getFileData(null,null,!0,null,null,null,u),y.format=r.format;else if("html"==r.format)x=this.editor.getGraphXml(),y.data=this.getHtml(x,this.editor.graph),y.xml=mxUtils.getXml(x),y.format=r.format;else{mxSvgCanvas2D.prototype.foAltText=null;u=this.editor.graph.background;
u==mxConstants.NONE&&(u=null);y.xml=this.getFileData(!0);y.format="svg";if(r.embedImages||null==r.embedImages){if(null==r.spin&&null==r.spinKey||this.spinner.spin(document.body,null!=r.spinKey?mxResources.get(r.spinKey):r.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==r.format?this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(y),"*")})):this.convertImages(this.editor.graph.getSvg(u),
mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(y),"*")}));return}u="xmlsvg"==r.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(u));y.data=this.createSvgDataUri(u)}g.postMessage(JSON.stringify(y),"*")}return}if("load"==r.action)d=1==r.autosave,this.hideDialog(),null!=r.modified&&null==urlParams.modified&&(urlParams.modified=
@@ -7717,11 +7718,11 @@ App.prototype.loadFile=function(a,c,f){this.hideDialog();var d=mxUtils.bind(this
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else null!=f?(this.spinner.stop(),this.fileLoaded(f)):(b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)&&(b=this.oneDrive),a=decodeURIComponent(a.substring(1)),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=
a.getHash()}))})))});null==a||0==a.length?(this.editor.setStatus(""),this.fileLoaded(null)):null!=this.getCurrentFile()&&!this.isDiagramEmpty()&&!c?window.openWindow(this.getUrl()+"#"+a,null,d):d()};
-App.prototype.getLibraryStorageHint=function(a){var c="";a.constructor!=LocalLibrary&&(c+=a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,1);if("L"==
-c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(f){a(b)}}else if("U"==c){var m=decodeURIComponent(b.substring(1));this.isOffline()||mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(m),mxUtils.bind(this,function(c){if(200==c.getStatus())try{this.loadLibrary(new UrlLibrary(this,c.getText(),
-m)),delete this.pendingLibraries[b]}catch(d){a(b)}else a(b)}),function(){a(b)})}else{var n=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==c&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n&&n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(d){a(b)}}),function(c){a(b)})}}})(b)}});c(mxSettings.getCustomLibraries());
-c((urlParams.clibs||"").split(";"))}};
+App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,
+1);if("L"==c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(f){a(b)}}else if("U"==c){var m=decodeURIComponent(b.substring(1));this.isOffline()||mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(m),mxUtils.bind(this,function(c){if(200==c.getStatus())try{this.loadLibrary(new UrlLibrary(this,
+c.getText(),m)),delete this.pendingLibraries[b]}catch(d){a(b)}else a(b)}),function(){a(b)})}else{var n=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==c&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(d){a(b)}}),function(c){a(b)}):
+delete this.pendingLibraries[b]}}})(b)}});c(mxSettings.getCustomLibraries());c((urlParams.clibs||"").split(";"))}};
App.prototype.exportImage=function(a,c,f,d,b){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();f=null!=f?f:e;try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,b?this.getFileData(!0,null,null,null,f):null)}catch(c){"Invalid image"==c.message?this.downloadFile("png"):this.handleError(c)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,f,a||1,c,d)}catch(g){this.spinner.stop(),
this.handleError(g)}}};
EditorUi.prototype.exportSvg=function(a,c,f,d,b,e){var g=this.editor.graph.isSelectionEmpty();f=null!=f?f:g;g=c?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&!1==c&&(g="#ffffff");var k=this.editor.graph.getSvg(g,a,null,null,null,f);d&&this.editor.addSvgShadow(k);a=this.getCurrentFile();var l=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=l.lastIndexOf(".");0<a&&(l=l.substring(0,a));l+=".svg";if(this.spinner.spin(document.body,mxResources.get("export"))){var m=mxUtils.bind(this,
diff --git a/war/js/diagramly/App.js b/war/js/diagramly/App.js
index e4ed3787..5919f269 100644
--- a/war/js/diagramly/App.js
+++ b/war/js/diagramly/App.js
@@ -3249,11 +3249,11 @@ App.prototype.loadFile = function(id, sameWindow, file)
*/
App.prototype.getLibraryStorageHint = function(file)
{
- var tip = '';
+ var tip = file.getTitle();
if (file.constructor != LocalLibrary)
{
- tip += file.getHash();
+ tip += '\n' + file.getHash();
}
if (file.constructor == DriveLibrary)
@@ -3309,7 +3309,8 @@ App.prototype.restoreLibraries = function()
(mxUtils.bind(this, function(id)
{
- if (this.pendingLibraries[id] == null && this.sidebar.palettes[id] == null)
+ if (id != null && id.length > 0 && this.pendingLibraries[id] == null &&
+ this.sidebar.palettes[id] == null)
{
this.pendingLibraries[id] = true;
var service = id.substring(0, 1);
@@ -3419,6 +3420,10 @@ App.prototype.restoreLibraries = function()
ignore(id);
});
}
+ else
+ {
+ delete this.pendingLibraries[id];
+ }
}
}
}))(name);
diff --git a/war/js/diagramly/Dialogs.js b/war/js/diagramly/Dialogs.js
index b37fc0a0..88b7a7d0 100644
--- a/war/js/diagramly/Dialogs.js
+++ b/war/js/diagramly/Dialogs.js
@@ -7743,6 +7743,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
// For converting image URLs
var converter = new mxUrlConverter();
+ var errorShowed = false;
function addButton(data, mimeType, x, y, w, h, img, aspect, title)
{
@@ -7833,16 +7834,16 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
rem.style.position = 'relative';
}
- (function(wrapperDiv, dataParam)
+ (function(wrapperDiv, dataParam, imgParam)
{
mxEvent.addListener(rem, 'click', function(evt)
{
- entries[data] = null;
+ entries[dataParam] = null;
for (var i = 0; i < images.length; i++)
{
- if ((data != null && images[i].data == dataParam) ||
- (img != null && images[i].xml == img.xml))
+ if ((images[i].data != null && images[i].data == dataParam) ||
+ (images[i].xml != null && images[i].xml == imgParam.xml))
{
images.splice(i, 1);
break;
@@ -8046,9 +8047,9 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
mxUtils.setPrefixedStyle(wrapper.style, 'transform', null);
});
}
- else
+ else if (!errorShowed)
{
- //editorUi.spinner.stop();
+ errorShowed = true;
editorUi.handleError({message: mxResources.get('fileExists')})
}
}
@@ -8108,7 +8109,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
for (var i = 0; i < initialImages.length; i++)
{
var img = initialImages[i];
- addButton(img.data, null, 0, 0, img.w, img.h, img);
+ addButton(img.data, null, 0, 0, img.w, img.h, img, img.aspect, img.title);
}
}
@@ -8142,6 +8143,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
{
evt.stopPropagation();
evt.preventDefault();
+ errorShowed = false;
dropTargetIndex = getIndexForEvent(evt);
@@ -8163,7 +8165,8 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
{
editorUi.importFiles(evt.dataTransfer.files, 0, 0, editorUi.maxImageSize, function(data, mimeType, x, y, w, h, img)
{
- addButton(data, mimeType, x, y, w, h, img, 'fixed', (mxEvent.isAltDown(evt)) ? null : img.substring(0, img.lastIndexOf('.')).replace(/_/g, ' '));
+ addButton(data, mimeType, x, y, w, h, img, 'fixed', (mxEvent.isAltDown(evt)) ?
+ null : img.substring(0, img.lastIndexOf('.')).replace(/_/g, ' '));
});
}
else if (mxUtils.indexOf(evt.dataTransfer.types, 'text/uri-list') >= 0)
@@ -8247,6 +8250,8 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
{
mxEvent.addListener(fileInput, 'change', function(evt)
{
+ errorShowed = false;
+
editorUi.importFiles(fileInput.files, 0, 0, editorUi.maxImageSize, function(data, mimeType, x, y, w, h, img)
{
addButton(data, mimeType, x, y, w, h, img, 'fixed');
@@ -8282,6 +8287,8 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
editorUi.showImageDialog(mxResources.get('addImageUrl'), '', function(url, w, h)
{
+ errorShowed = false;
+
if (url != null)
{
// Image dialog returns modified data URLs which
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index b3b6d886..22a8a1a3 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -1414,6 +1414,17 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
+ EditorUi.prototype.getLibraryStorageHint = function(file)
+ {
+ return '';
+ };
+
+ /**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
EditorUi.prototype.libraryLoaded = function(file, images, optionalTitle)
{
if (file.constructor != LocalLibrary)
@@ -1506,16 +1517,18 @@
buttons.style.position = 'absolute';
buttons.style.right = '0px';
buttons.style.top = '5px';
+ buttons.style.backgroundColor = 'inherit';
title.style.position = 'relative';
+ var btnWidth = 18;
var btn = document.createElement('img');
btn.setAttribute('src', Dialog.prototype.closeImage);
btn.setAttribute('title', mxResources.get('close'));
btn.setAttribute('align', 'top');
btn.setAttribute('border', '0');
- btn.style.cursor = 'pointer';
- btn.style.marginRight = '8px';
- btn.style.marginTop = '3px';
+ btn.className = 'geButton';
+ btn.style.marginRight = '1px';
+ btn.style.marginTop = '-1px';
buttons.appendChild(btn);
var saveBtn = null;
@@ -1579,15 +1592,17 @@
spinBtn.setAttribute('src', EditorUi.spinImage);
spinBtn.setAttribute('title', mxResources.get('saving'));
spinBtn.style.cursor = 'default';
- spinBtn.style.marginRight = '6px';
- spinBtn.style.marginTop = '2px';
+ spinBtn.style.marginRight = '2px';
+ spinBtn.style.marginTop = '-2px';
buttons.insertBefore(spinBtn, buttons.firstChild);
+ title.style.paddingRight = (buttons.childNodes.length * btnWidth) + 'px';
this.saveLibrary(file.getTitle(), images, file, file.getMode(), true, true, function()
{
if (spinBtn != null && spinBtn.parentNode != null)
{
spinBtn.parentNode.removeChild(spinBtn);
+ title.style.paddingRight = (buttons.childNodes.length * btnWidth) + 'px';
}
});
}
@@ -1603,9 +1618,12 @@
this.saveLibrary(file.getTitle(), images, file, file.getMode(), true, true);
saveBtn.parentNode.removeChild(saveBtn);
saveBtn = null;
+ title.style.paddingRight = (buttons.childNodes.length * btnWidth) + 'px';
mxEvent.consume(evt);
}));
+
+ title.style.paddingRight = (buttons.childNodes.length * btnWidth) + 'px';
}
});
@@ -1900,11 +1918,12 @@
btn.setAttribute('title', mxResources.get('add'));
buttons.insertBefore(btn, buttons.firstChild);
- if (!this.isOffline())
+ if (!this.isOffline() && file.title == '.scratchpad')
{
var link = document.createElement('span');
link.setAttribute('title', mxResources.get('help'));
- link.style.cssText = 'color:gray;text-decoration:none;margin-right:8px;';
+ link.style.cssText = 'color:gray;text-decoration:none;';
+ link.className = 'geButton';
mxUtils.write(link, '?');
mxEvent.addGestureListeners(link, mxUtils.bind(this, function(evt)
@@ -1922,6 +1941,7 @@
}
title.appendChild(buttons);
+ title.style.paddingRight = (buttons.childNodes.length * btnWidth) + 'px';
};
/**
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index e44488e3..59038abd 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+u+"}":"{"+v.join(",")+"}";f=u;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:"6.0.1.6",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:"6.0.1.7",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/")||
@@ -1642,7 +1642,7 @@ e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(
function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html\x3d1;resizable\x3d0;points\x3d[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align\x3dcenter;verticalAlign\x3dmiddle;labelBackgroundColor\x3d#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=
new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getLinkUrl=
function(a){return a};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isBlankLink=function(a){var b=this.domainUrl;return"self"!=urlParams.target&&null!=a&&"#"!=a.charAt(0)&&a.substring(0,b.length)!=b&&!this.isRelativeUrl(a)};Graph.prototype.isRelativeUrl=function(a){return!/^(?:[a-z]+:)?\/\//i.test(a)&&"data:image"!=a.substring(0,10)&&"mailto:"!=a.substring(0,7)};Graph.prototype.addClickHandler=
-function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),d.charAt("#")?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
+function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),"#"===d.charAt(0)?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
"click",b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,
b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else"a"==b.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&
(b.getState()==this.currentState||null==b.getState())&&g.intersects(this.currentState,b.getGraphX(),b.getGraphY())||this.updateCurrentState(b)},mouseUp:function(a,d){var e=d.getSource(),h=this.currentLink;this.clear();if("a"!=e.nodeName.toLowerCase()&&!d.isConsumed()&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(d.getEvent())||mxEvent.isTouchEvent(d.getEvent())))null!=h?(g.isBlankLink(h)?window.open(h):(null!=b&&b(d.getEvent()),"#"==h.charAt(0)?window!=window.top?
diff --git a/war/js/mxgraph/Dialogs.js b/war/js/mxgraph/Dialogs.js
index 11532864..a8c5939e 100644
--- a/war/js/mxgraph/Dialogs.js
+++ b/war/js/mxgraph/Dialogs.js
@@ -3144,7 +3144,7 @@ var LayersWindow = function(editorUi, x, y, w, h)
img2.className = 'geButton';
img2.style.cssFloat = 'none';
- img2.innerHTML = '&#9650;';
+ img2.innerHTML = '&#9660;';
img2.style.width = '14px';
img2.style.height = '14px';
img2.style.fontSize = '14px';
@@ -3171,7 +3171,7 @@ var LayersWindow = function(editorUi, x, y, w, h)
img1.className = 'geButton';
img1.style.cssFloat = 'none';
- img1.innerHTML = '&#9660;';
+ img1.innerHTML = '&#9650;';
img1.style.width = '14px';
img1.style.height = '14px';
img1.style.fontSize = '14px';
diff --git a/war/js/mxgraph/Graph.js b/war/js/mxgraph/Graph.js
index 7ae360d7..6e968811 100644
--- a/war/js/mxgraph/Graph.js
+++ b/war/js/mxgraph/Graph.js
@@ -4405,7 +4405,7 @@ if (typeof mxVertexHandler != 'undefined')
{
links[i].setAttribute('target', '_top');
- if (href.charAt('#'))
+ if (href.charAt(0) === '#')
{
links[i].setAttribute('href', this.baseUrl + href);
}
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index 6181e22e..0a21935a 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+u+"}":"{"+v.join(",")+"}";f=u;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:"6.0.1.6",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:"6.0.1.7",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/")||
@@ -1642,7 +1642,7 @@ e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(
function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html\x3d1;resizable\x3d0;points\x3d[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align\x3dcenter;verticalAlign\x3dmiddle;labelBackgroundColor\x3d#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=
new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getLinkUrl=
function(a){return a};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isBlankLink=function(a){var b=this.domainUrl;return"self"!=urlParams.target&&null!=a&&"#"!=a.charAt(0)&&a.substring(0,b.length)!=b&&!this.isRelativeUrl(a)};Graph.prototype.isRelativeUrl=function(a){return!/^(?:[a-z]+:)?\/\//i.test(a)&&"data:image"!=a.substring(0,10)&&"mailto:"!=a.substring(0,7)};Graph.prototype.addClickHandler=
-function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),d.charAt("#")?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
+function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),"#"===d.charAt(0)?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
"click",b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,
b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else"a"==b.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&
(b.getState()==this.currentState||null==b.getState())&&g.intersects(this.currentState,b.getGraphX(),b.getGraphY())||this.updateCurrentState(b)},mouseUp:function(a,d){var e=d.getSource(),h=this.currentLink;this.clear();if("a"!=e.nodeName.toLowerCase()&&!d.isConsumed()&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(d.getEvent())||mxEvent.isTouchEvent(d.getEvent())))null!=h?(g.isBlankLink(h)?window.open(h):(null!=b&&b(d.getEvent()),"#"==h.charAt(0)?window!=window.top?
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index 7f43c71f..891c9f9d 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -44,19 +44,19 @@ this.l);c!==this.o&&a.push("#",this.o);return a.join("")};g.prototype.T=function
function(){return this.h&&decodeURIComponent(this.h)};g.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=c};g.prototype.$=function(){return c!==this.h};g.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};g.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=c};g.prototype.O=function(a){this.l=a?a:c};g.prototype.aa=function(){return c!==this.l};g.prototype.ba=function(a){if("object"===typeof a&&
!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="\x26",e&&b.push("\x3d",encodeURIComponent(e.toString()));this.l=b.join("")};g.prototype.fa=function(a){this.o=a?a:c};g.prototype.Z=function(){return c!==this.o};var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
p=/[#\/\?@]/g,r=/[\#\?]/g;g.parse=a;g.create=function(a,e,f,k,l,n,m){a=new g(b(a,p),b(e,p),"string"==typeof f?encodeURIComponent(f):c,0<k?k.toString():c,b(l,r),c,"string"==typeof m?encodeURIComponent(m):c);n&&("string"===typeof n?a.O(n.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):a.ba(n));return a};g.N=f;g.ma=e;g.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},N:function(b,c){return b?f(a(b),a(c)).toString():""+c}};return g}();"undefined"!==typeof window&&(window.URI=
-n);var m=a,p=a,r=a,s=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(C,g)+'")':'url("about:blank")'}function g(a){return E[a]}function k(a,b){return a?n.ha.N(a,b):b}function t(a,b,d){if(!d)return c;var e=(""+a).match(D);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function z(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var C=/[\n\f\r\"\'()*<>]/g,E={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function S(b,c,d,g,n){b=z(b);var m=f[b];if(!m||"object"!==typeof m)c.length=0;else{for(var p=m.cssPropBits,r=p&80,q=p&1536,s=NaN,G=0,u=0;G<c.length;++G){var D=c[G].toLowerCase(),F=D.charCodeAt(0),H,A,E,C,P,ha;if(32===F)D="";else if(34===F)D=16===r?d?e(t(k(g,l(c[G].substring(1,D.length-1))),b,d)):"":p&8&&!(r&r-1)?D:"";else if("inherit"!==D){if(P=m.cssLitGroup){var ea;if(!(ea=m.cssLitMap)){ea=
-{};for(var V=P.length;0<=--V;)for(var ga=P[V],ka=ga.length;0<=--ka;)ea[ga[ka]]=a;ea=m.cssLitMap=ea}P=ea}else P=a;if(!(ha=P,ha[z(D)]===a))if(35===F&&/^#(?:[0-9a-f]{3}){1,2}$/.test(D))D=p&2?D:"";else if(48<=F&&57>=F)D=p&1?D:"";else if(H=D.charCodeAt(1),A=D.charCodeAt(2),E=48<=H&&57>=H,C=48<=A&&57>=A,43===F&&(E||46===H&&C))D=p&1?(E?"":"0")+D.substring(1):"";else if(45===F&&(E||46===H&&C))D=p&4?(E?"-":"-0")+D.substring(1):p&1?"0":"";else if(46===F&&E)D=p&1?"0"+D:"";else if('url("'===D.substring(0,5))D=
-d&&p&16?e(t(k(g,c[G].substring(5,D.length-2)),b,d)):"";else if("("===D.charAt(D.length-1))a:{P=c;ea=G;D=1;V=ea+1;for(F=P.length;V<F&&D;)ga=P[V++],D+=")"===ga?-1:/^[^"']*\($/.test(ga);if(!D){D=P[ea].toLowerCase();F=z(D);P=P.splice(ea,V-ea,"");ea=m.cssFns;V=0;for(ga=ea.length;V<ga;++V)if(ea[V].substring(0,F.length)==F){P[0]=P[P.length-1]="";S(ea[V],P,d,g);D=D+P.join(" ")+")";break a}}D=""}else D=q&&/^-?[a-z_][\w\-]*$/.test(D)&&!/__$/.test(D)?n&&512===q?c[G]+n:1024===q&&f[D]&&"number"===typeof f[D].oa?
-D:"":/^\w+$/.test(D)&&64===r&&p&8?s+1===u?(c[s]=c[s].substring(0,c[s].length-1)+" "+D+'"',""):(s=u,'"'+D+'"'):""}D&&(c[u++]=D)}1===u&&'url("about:blank")'===c[0]&&(u=0);c.length=u}}}();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)$"),
-H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(a,e,f){function g(p,r){function q(c,f,g){var k,m,p,r,v,t=b;k="";if(c<f)if(v=a[c],"*"===v)++c,k=v;else if(/^[a-zA-Z]/.test(v)&&(m=n(v.toLowerCase(),[])))"tagName"in m&&(v=m.tagName),++c,k=v;for(r=p=m="";t&&c<f;++c)if(v=a[c],"#"===v.charAt(0))/^#_|__$|[^\w#:\-]/.test(v)?t=d:m+=v+l;else if("."===v)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(v=a[c])&&!/^_|__$/.test(v)?m+="."+v:t=d;else if(c+1<f&&"["===a[c]){++c;var D=a[c++].toLowerCase();v=u.m[k+"::"+D];v!==+v&&(v=u.m["*::"+
-D]);var F;e.ia?(F=e.ia(k,D),"string"!==typeof F&&(t=d,F=D),t&&v!==+v&&(v=u.d.NONE)):(F=D,v!==+v&&(t=d));var H=D="",x=d;/^[~^$*|]?=$/.test(a[c])&&(D=a[c++],H=a[c++],/^[0-9A-Za-z:_\-]+$/.test(H)?H='"'+H+'"':"]"===H&&(H='""',--c),/^"([^\"\\]|\\.)*"$/.test(H)||(t=d),(x="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=d);switch(v){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===D||"~\x3d"===D||"$\x3d"===D)&&'""'!=H&&!x?H='"'+H.substring(1,H.length-
-1)+l+'"':"|\x3d"===D||""===D||(t=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==D&&(t=d);break;default:t=d}t&&(p+="["+F.replace(/[^\w-]/g,"\\$\x26")+D+H+(x?" i]":"]"))}else if(c<f&&":"===a[c])if(v=a[++c],G.test(v))r+=":"+v;else break;else break;c!==f&&(t=d);t&&(c=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+g)&&s.push(c);return t}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var s=[],v=p,t=b,D=p;t&&D<r;++D){var F=a[D];if(H[F]===H||" "===F)q(v,D,F)?v=D+1:t=d}q(v,r,"")||(t=d);return t?(s.length&&(v=
-s.join(""),k!==c&&(v="."+k+" "+v),m.push(v)),b):!f||f(a.slice(p,r))}var k=e.na,l=e.L,n=e.Aa,m=[],p=0,r,q=0,s;for(r=0;r<a.length;++r)if(s=a[r],"("==s||"["==s?(++q,b):")"==s||"]"==s?(q&&--q,b):!(" "==a[r]&&(q||H[a[r-1]]===H||H[a[r+1]]===H)))a[p++]=a[r];a.length=p;p=a.length;for(r=q=0;r<p;++r)if(","===a[r]){if(!g(q,r))return c;q=r+1}return!g(q,p)?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,r,G,v,u){function D(){E=
-A.length&&A[A.length-1]===c}var F=a,H=u||[0],A=[],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 v){var l=s(b.slice(1));if("not all"!==l){++H[0];var m=[];F.push(m);var p=t(k(g,e(b[0])),function(a){var b=
-f(p,a.qa,n,r,G,v,H);--H[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;v(a,!!H[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;A.push(a)},endAtrule:function(){A.pop();E||F.push(";");D()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===A[A.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,"{")}A.push(c)},endRuleset:function(){A.pop();E||F.push("}");D()},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,r,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!H[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
+n);var m=a,p=a,r=a,s=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(D,g)+'")':'url("about:blank")'}function g(a){return E[a]}function k(a,b){return a?n.ha.N(a,b):b}function t(a,b,d){if(!d)return c;var e=(""+a).match(B);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function A(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var D=/[\n\f\r\"\'()*<>]/g,E={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},B=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function S(b,c,d,g,n){b=A(b);var m=f[b];if(!m||"object"!==typeof m)c.length=0;else{for(var p=m.cssPropBits,r=p&80,q=p&1536,s=NaN,G=0,u=0;G<c.length;++G){var B=c[G].toLowerCase(),F=B.charCodeAt(0),x,H,E,D,P,ha;if(32===F)B="";else if(34===F)B=16===r?d?e(t(k(g,l(c[G].substring(1,B.length-1))),b,d)):"":p&8&&!(r&r-1)?B:"";else if("inherit"!==B){if(P=m.cssLitGroup){var ea;if(!(ea=m.cssLitMap)){ea=
+{};for(var V=P.length;0<=--V;)for(var ga=P[V],ka=ga.length;0<=--ka;)ea[ga[ka]]=a;ea=m.cssLitMap=ea}P=ea}else P=a;if(!(ha=P,ha[A(B)]===a))if(35===F&&/^#(?:[0-9a-f]{3}){1,2}$/.test(B))B=p&2?B:"";else if(48<=F&&57>=F)B=p&1?B:"";else if(x=B.charCodeAt(1),H=B.charCodeAt(2),E=48<=x&&57>=x,D=48<=H&&57>=H,43===F&&(E||46===x&&D))B=p&1?(E?"":"0")+B.substring(1):"";else if(45===F&&(E||46===x&&D))B=p&4?(E?"-":"-0")+B.substring(1):p&1?"0":"";else if(46===F&&E)B=p&1?"0"+B:"";else if('url("'===B.substring(0,5))B=
+d&&p&16?e(t(k(g,c[G].substring(5,B.length-2)),b,d)):"";else if("("===B.charAt(B.length-1))a:{P=c;ea=G;B=1;V=ea+1;for(F=P.length;V<F&&B;)ga=P[V++],B+=")"===ga?-1:/^[^"']*\($/.test(ga);if(!B){B=P[ea].toLowerCase();F=A(B);P=P.splice(ea,V-ea,"");ea=m.cssFns;V=0;for(ga=ea.length;V<ga;++V)if(ea[V].substring(0,F.length)==F){P[0]=P[P.length-1]="";S(ea[V],P,d,g);B=B+P.join(" ")+")";break a}}B=""}else B=q&&/^-?[a-z_][\w\-]*$/.test(B)&&!/__$/.test(B)?n&&512===q?c[G]+n:1024===q&&f[B]&&"number"===typeof f[B].oa?
+B:"":/^\w+$/.test(B)&&64===r&&p&8?s+1===u?(c[s]=c[s].substring(0,c[s].length-1)+" "+B+'"',""):(s=u,'"'+B+'"'):""}B&&(c[u++]=B)}1===u&&'url("about:blank")'===c[0]&&(u=0);c.length=u}}}();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)$"),
+H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(a,e,f){function g(p,r){function q(c,f,g){var k,m,p,r,t,B=b;k="";if(c<f)if(t=a[c],"*"===t)++c,k=t;else if(/^[a-zA-Z]/.test(t)&&(m=n(t.toLowerCase(),[])))"tagName"in m&&(t=m.tagName),++c,k=t;for(r=p=m="";B&&c<f;++c)if(t=a[c],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?B=d:m+=t+l;else if("."===t)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(t=a[c])&&!/^_|__$/.test(t)?m+="."+t:B=d;else if(c+1<f&&"["===a[c]){++c;var v=a[c++].toLowerCase();t=u.m[k+"::"+v];t!==+t&&(t=u.m["*::"+
+v]);var F;e.ia?(F=e.ia(k,v),"string"!==typeof F&&(B=d,F=v),B&&t!==+t&&(t=u.d.NONE)):(F=v,t!==+t&&(B=d));var x=v="",H=d;/^[~^$*|]?=$/.test(a[c])&&(v=a[c++],x=a[c++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--c),/^"([^\"\\]|\\.)*"$/.test(x)||(B=d),(H="i"===a[c])&&++c);"]"!==a[c]&&(++c,B=d);switch(t){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===v||"~\x3d"===v||"$\x3d"===v)&&'""'!=x&&!H?x='"'+x.substring(1,x.length-
+1)+l+'"':"|\x3d"===v||""===v||(B=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==v&&(B=d);break;default:B=d}B&&(p+="["+F.replace(/[^\w-]/g,"\\$\x26")+v+x+(H?" i]":"]"))}else if(c<f&&":"===a[c])if(t=a[++c],G.test(t))r+=":"+t;else break;else break;c!==f&&(B=d);B&&(c=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+g)&&s.push(c);return B}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var s=[],t=p,B=b,v=p;B&&v<r;++v){var F=a[v];if(H[F]===H||" "===F)q(t,v,F)?t=v+1:B=d}q(t,r,"")||(B=d);return B?(s.length&&(t=
+s.join(""),k!==c&&(t="."+k+" "+t),m.push(t)),b):!f||f(a.slice(p,r))}var k=e.na,l=e.L,n=e.Aa,m=[],p=0,r,q=0,s;for(r=0;r<a.length;++r)if(s=a[r],"("==s||"["==s?(++q,b):")"==s||"]"==s?(q&&--q,b):!(" "==a[r]&&(q||H[a[r-1]]===H||H[a[r+1]]===H)))a[p++]=a[r];a.length=p;p=a.length;for(r=q=0;r<p;++r)if(","===a[r]){if(!g(q,r))return c;q=r+1}return!g(q,p)?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,r,G,u,B){function v(){E=
+H.length&&H[H.length-1]===c}var F=a,x=B||[0],H=[],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){++x[0];var m=[];F.push(m);var p=t(k(g,e(b[0])),function(a){var b=
+f(p,a.qa,n,r,G,u,x);--x[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;m[0]=a;u(a,!!x[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");E=!a;H.push(a)},endAtrule:function(){H.pop();E||F.push(";");v()},startBlock:function(){E||F.push("{")},endBlock:function(){E||(F.push("}"),E=b)},startRuleset:function(d){if(!E){var e=a;"@keyframes"===H[H.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,"{")}H.push(c)},endRuleset:function(){H.pop();E||F.push("}");v()},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,r,g,n.L);c.length&&F.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return F.join("")}},va:!!x[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 p=[],r=0,q=b;q<m;++q)b=a[q]," "!==b&&(p[r++]=b);if(m<c){do{b=a[m];
@@ -83,17 +83,17 @@ time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"
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);e=function(e){function f(a,b){var c;if(L.hasOwnProperty(b))c=L[b];else{var d=b.match(I);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(aa))?String.fromCharCode(parseInt(d[1],
16)):J&&M.test(b)?(J.innerHTML="\x26"+b+";",d=J.textContent,L[b]=d):"\x26"+b+";"}return c}function g(a){return a.replace(R,f)}function k(a){return(""+a).replace($,"\x26amp;").replace(X,"\x26lt;").replace(Z,"\x26gt;").replace(T,"\x26#34;")}function l(a){return a.replace(Q,"\x26amp;$1").replace(X,"\x26lt;").replace(Z,"\x26gt;")}function m(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,e){var f,
g=/(<\/|<\!--|<[!?]|[&<>])/g;f=a+"";if(ha)f=f.split(g);else{for(var k=[],l=0,n;(n=g.exec(f))!==c;)k.push(f.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(f.substring(l));f=k}r(b,f,0,{r:d,C:d},e)}}function p(a,b,c,d,e){return function(){r(a,b,c,d,e)}}function r(a,c,d,f,g){try{a.H&&0==d&&a.H(g);for(var k,l,n,m=c.length;d<m;){var t=c[d++],u=c[d];switch(t){case "\x26":ca.test(u)?(a.e&&a.e("\x26"+u,g,V,p(a,c,d,f,g)),d++):a.e&&a.e("\x26amp;",g,V,p(a,c,d,f,g));break;case "\x3c/":if(k=/^([-\w:]+)[^\'\"]*/.exec(u))if(k[0].length===
-u.length&&"\x3e"===c[d+1])d+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,V,p(a,c,d,f,g));else{var B=c,D=d,P=a,A=g,x=V,H=f,y=s(B,D);y?(P.t&&P.t(y.name,A,x,p(P,B,D,H,A)),d=y.next):d=B.length}else a.e&&a.e("\x26lt;/",g,V,p(a,c,d,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(u))if(k[0].length===u.length&&"\x3e"===c[d+1]){d+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,V,p(a,c,d,f,g));var Y=e.f[n];Y&ea&&(d=q(c,{name:n,next:d,c:Y},a,g,V,f))}else{var B=c,D=a,P=g,A=V,x=f,L=s(B,d);L?(D.w&&D.w(L.name,L.R,P,A,p(D,
-B,L.next,x,P)),d=L.c&ea?q(B,L,D,P,A,x):L.next):d=B.length}else a.e&&a.e("\x26lt;",g,V,p(a,c,d,f,g));break;case "\x3c!--":if(!f.C){for(l=d+1;l<m&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<m){if(a.A){var C=c.slice(d,l).join("");a.A(C.substr(0,C.length-2),g,V,p(a,c,l+1,f,g))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",g,V,p(a,c,d,f,g));break;case "\x3c!":if(/^\w/.test(u)){if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",g,V,p(a,c,d,f,g))}else a.e&&a.e("\x26lt;!",
-g,V,p(a,c,d,f,g));break;case "\x3c?":if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",g,V,p(a,c,d,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,V,p(a,c,d,f,g));break;case "":break;default:a.e&&a.e(t,g,V,p(a,c,d,f,g))}}a.B&&a.B(g)}catch(I){if(I!==V)throw I;}}function q(a,b,c,d,f,g){var k=a.length;ga.hasOwnProperty(b.name)||(ga[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var n=ga[b.name],m=b.next,r=b.next+1;r<k&&!("\x3c/"===a[r-1]&&n.test(a[r]));r++);r<k&&
+u.length&&"\x3e"===c[d+1])d+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,V,p(a,c,d,f,g));else{var C=c,B=d,P=a,x=g,y=V,H=f,z=s(C,B);z?(P.t&&P.t(z.name,x,y,p(P,C,B,H,x)),d=z.next):d=C.length}else a.e&&a.e("\x26lt;/",g,V,p(a,c,d,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(u))if(k[0].length===u.length&&"\x3e"===c[d+1]){d+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,V,p(a,c,d,f,g));var Y=e.f[n];Y&ea&&(d=q(c,{name:n,next:d,c:Y},a,g,V,f))}else{var C=c,B=a,P=g,x=V,y=f,L=s(C,d);L?(B.w&&B.w(L.name,L.R,P,x,p(B,
+C,L.next,y,P)),d=L.c&ea?q(C,L,B,P,x,y):L.next):d=C.length}else a.e&&a.e("\x26lt;",g,V,p(a,c,d,f,g));break;case "\x3c!--":if(!f.C){for(l=d+1;l<m&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<m){if(a.A){var I=c.slice(d,l).join("");a.A(I.substr(0,I.length-2),g,V,p(a,c,l+1,f,g))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",g,V,p(a,c,d,f,g));break;case "\x3c!":if(/^\w/.test(u)){if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",g,V,p(a,c,d,f,g))}else a.e&&a.e("\x26lt;!",
+g,V,p(a,c,d,f,g));break;case "\x3c?":if(!f.r){for(l=d+1;l<m&&"\x3e"!==c[l];l++);l<m?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",g,V,p(a,c,d,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,V,p(a,c,d,f,g));break;case "":break;default:a.e&&a.e(t,g,V,p(a,c,d,f,g))}}a.B&&a.B(g)}catch(D){if(D!==V)throw D;}}function q(a,b,c,d,f,g){var k=a.length;ga.hasOwnProperty(b.name)||(ga[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var n=ga[b.name],m=b.next,r=b.next+1;r<k&&!("\x3c/"===a[r-1]&&n.test(a[r]));r++);r<k&&
(r-=1);k=a.slice(m,r).join("");if(b.c&e.c.CDATA)c.z&&c.z(k,d,f,p(c,a,r,g,d));else if(b.c&e.c.RCDATA)c.F&&c.F(l(k),d,f,p(c,a,r,g,d));else throw Error("bug");return r}function s(a,c){var f=/^([-\w:]+)/.exec(a[c]),k={};k.name=f[1].toLowerCase();k.c=e.f[k.name];for(var l=a[c].substr(f[0].length),n=c+1,m=a.length;n<m&&"\x3e"!==a[n];n++)l+=a[n];if(!(m<=n)){for(var p=[];""!==l;)if(f=P.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],r=d,l=[l,a[n++]];n<m;n++){if(r){if("\x3e"===a[n])break}else 0<=
-a[n].indexOf(f)&&(r=b);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var r=f[1].toLowerCase(),q;if(f[2]){q=f[3];var G=q.charCodeAt(0);if(34===G||39===G)q=q.substr(1,q.length-2);q=g(q.replace(O,""))}else q="";p.push(r,q);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=n+1;return k}}function t(b){function f(a,b){l||b.push(a)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,f,n){if(!l&&e.f.hasOwnProperty(d)){var m=e.f[d];if(!(m&e.c.FOLDABLE)){var p=b(d,
-f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=m);if(m&e.c.OPTIONAL_ENDTAG){var q=g[g.length-1];q&&q.D===d&&(q.v!==r||d!==r)&&n.push("\x3c/",q.v,"\x3e")}m&e.c.EMPTY||g.push({D:d,v:r});n.push("\x3c",r);d=0;for(q=f.length;d<q;d+=2){var s=f[d],G=f[d+1];G!==c&&G!==a&&n.push(" ",s,'\x3d"',k(G),'"')}n.push("\x3e");m&e.c.EMPTY&&!(p&e.c.EMPTY)&&
+a[n].indexOf(f)&&(r=b);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var r=f[1].toLowerCase(),q;if(f[2]){q=f[3];var t=q.charCodeAt(0);if(34===t||39===t)q=q.substr(1,q.length-2);q=g(q.replace(O,""))}else q="";p.push(r,q);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=n+1;return k}}function t(b){function f(a,b){l||b.push(a)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,f,n){if(!l&&e.f.hasOwnProperty(d)){var m=e.f[d];if(!(m&e.c.FOLDABLE)){var p=b(d,
+f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=m);if(m&e.c.OPTIONAL_ENDTAG){var q=g[g.length-1];q&&q.D===d&&(q.v!==r||d!==r)&&n.push("\x3c/",q.v,"\x3e")}m&e.c.EMPTY||g.push({D:d,v:r});n.push("\x3c",r);d=0;for(q=f.length;d<q;d+=2){var s=f[d],t=f[d+1];t!==c&&t!==a&&n.push(" ",s,'\x3d"',k(t),'"')}n.push("\x3e");m&e.c.EMPTY&&!(p&e.c.EMPTY)&&
n.push("\x3c/",r,"\x3e")}else l=!(m&e.c.EMPTY)}}},endTag:function(a,b){if(l)l=d;else if(e.f.hasOwnProperty(a)){var c=e.f[a];if(!(c&(e.c.EMPTY|e.c.FOLDABLE))){if(c&e.c.OPTIONAL_ENDTAG)for(c=g.length;0<=--c;){var f=g[c].D;if(f===a)break;if(!(e.f[f]&e.c.OPTIONAL_ENDTAG))return}else for(c=g.length;0<=--c&&g[c].D!==a;);if(!(0>c)){for(f=g.length;--f>c;){var k=g[f].v;e.f[k]&e.c.OPTIONAL_ENDTAG||b.push("\x3c/",k,"\x3e")}c<g.length&&(a=g[c].v);g.length=c;b.push("\x3c/",a,"\x3e")}}}},pcdata:f,rcdata:f,cdata:f,
endDoc:function(a){for(;g.length;g.length--)a.push("\x3c/",g[g.length-1].v,"\x3e")}})}function u(a,b,d,e,f){if(!f)return c;try{var g=n.parse(""+a);if(g&&(!g.K()||ka.test(g.W()))){var k=f(g,b,d,e);return k?k.toString():c}}catch(l){}return c}function K(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function S(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+
-c;if(a.hasOwnProperty(b))return a[b]}function W(b,d,f,g,k){for(var l=0;l<d.length;l+=2){var n=d[l],m=d[l+1],p=m,r=c,q;if((q=b+"::"+n,e.m.hasOwnProperty(q))||(q="*::"+n,e.m.hasOwnProperty(q)))r=e.m[q];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:m=c;k&&K(k,b,n,p,m);break;case e.d.STYLE:if("undefined"===typeof B){m=c;k&&K(k,b,n,p,m);break}var s=[];B(m,{declaration:function(a,b){var d=a.toLowerCase();Y(d,b,f?function(a){return u(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&s.push(d+
+c;if(a.hasOwnProperty(b))return a[b]}function W(b,d,f,g,k){for(var l=0;l<d.length;l+=2){var n=d[l],m=d[l+1],p=m,r=c,q;if((q=b+"::"+n,e.m.hasOwnProperty(q))||(q="*::"+n,e.m.hasOwnProperty(q)))r=e.m[q];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:m=c;k&&K(k,b,n,p,m);break;case e.d.STYLE:if("undefined"===typeof C){m=c;k&&K(k,b,n,p,m);break}var s=[];C(m,{declaration:function(a,b){var d=a.toLowerCase();Y(d,b,f?function(a){return u(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&s.push(d+
": "+b.join(" "))}});m=0<s.length?s.join(" ; "):c;k&&K(k,b,n,p,m);break;case e.d.ID:case e.d.IDREF:case e.d.IDREFS:case e.d.GLOBAL_NAME:case e.d.LOCAL_NAME:case e.d.CLASSES:m=g?g(m):m;k&&K(k,b,n,p,m);break;case e.d.URI:m=u(m,S(e.J,b,n),S(e.I,b,n),{TYPE:"MARKUP",XML_ATTR:n,XML_TAG:b},f);k&&K(k,b,n,p,m);break;case e.d.URI_FRAGMENT:m&&"#"===m.charAt(0)?(m=m.substring(1),m=g?g(m):m,m!==c&&m!==a&&(m="#"+m)):m=c;k&&K(k,b,n,p,m);break;default:m=c,k&&K(k,b,n,p,m)}else m=c,k&&K(k,b,n,p,m);d[l+1]=m}return d}
-function da(b,c,d){return function(f,g){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:W(f,g,b,c,d)}}}function U(a,b){var c=[];t(b)(a,c);return c.join("")}var B,Y;"undefined"!==typeof window&&(B=window.parseCssDeclarations,Y=window.sanitizeCssProperty);var L={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,aa=/^#x([0-9A-Fa-f]+)$/,M=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+function da(b,c,d){return function(f,g){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:W(f,g,b,c,d)}}}function U(a,b){var c=[];t(b)(a,c);return c.join("")}var C,Y;"undefined"!==typeof window&&(C=window.parseCssDeclarations,Y=window.sanitizeCssProperty);var L={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,aa=/^#x([0-9A-Fa-f]+)$/,M=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
c,O=/\0/g,R=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ca=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,$=/&/g,Q=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,X=/[<]/g,Z=/>/g,T=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ha=3==="a,b".split(/(,)/).length,ea=e.c.CDATA|e.c.RCDATA,V={},ga={},ka=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=t;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=da;ba.wa=ba.normalizeRCData=l;ba.xa=
ba.sanitize=function(a,b,c,d){return U(a,da(b,c,d))};ba.ya=ba.sanitizeAttribs=W;ba.za=ba.sanitizeWithPolicy=U;ba.Ba=ba.unescapeEntities=g;return ba}(u);g=e.sanitize;"undefined"!==typeof window&&(window.html=e,window.html_sanitize=g)})();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,b){var c="",d,e,f,g,k,l,n=0;for(null!=b&&b||(a=Base64._utf8_encode(a));n<a.length;)d=a.charCodeAt(n++),e=a.charCodeAt(n++),f=a.charCodeAt(n++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=
@@ -106,10 +106,10 @@ new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/defla
f.avail_out&&(f.output=new k.Buf8(n),f.next_out=0,f.avail_out=n),d=g.deflate(f,e),1!==d&&d!==r)return this.onEnd(d),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==e&&2!==e)||("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!==d);return 4===e?(d=g.deflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===r):2!==e||(this.onEnd(r),f.avail_out=0,!0)};e.prototype.onData=
function(b){this.chunks.push(b)};e.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=e;d.deflate=f;d.deflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.gzip=function(b,c){return c=c||{},c.gzip=!0,f(b,c)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(b,c,d){function e(b){if(!(this instanceof
e))return new e(b);var c=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},b||{});c.raw&&0<=c.windowBits&&16>c.windowBits&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||b&&b.windowBits||(c.windowBits+=32);15<c.windowBits&&48>c.windowBits&&0===(15&c.windowBits)&&(c.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;b=g.inflateInit2(this.strm,c.windowBits);if(b!==n.Z_OK)throw Error(m[b]);
-this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),n=b("./zlib/constants"),m=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),s=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,m,p,r,C=this.strm,E=this.options.chunkSize,D=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?n.Z_FINISH:n.Z_NO_FLUSH;
-"string"==typeof b?C.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?C.input=new Uint8Array(b):C.input=b;C.next_in=0;C.avail_in=C.input.length;do{if(0===C.avail_out&&(C.output=new k.Buf8(E),C.next_out=0,C.avail_out=E),d=g.inflate(C,n.Z_NO_FLUSH),d===n.Z_NEED_DICT&&D&&(r="string"==typeof D?l.string2buf(D):"[object ArrayBuffer]"===s.call(D)?new Uint8Array(D):D,d=g.inflateSetDictionary(this.strm,r)),d===n.Z_BUF_ERROR&&!0===F&&(d=n.Z_OK,F=!1),d!==n.Z_STREAM_END&&d!==n.Z_OK)return this.onEnd(d),
-this.ended=!0,!1;C.next_out&&(0!==C.avail_out&&d!==n.Z_STREAM_END&&(0!==C.avail_in||e!==n.Z_FINISH&&e!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(C.output,C.next_out),m=C.next_out-f,p=l.buf2string(C.output,f),C.next_out=m,C.avail_out=E-m,m&&k.arraySet(C.output,C.output,f,m,0),this.onData(p)):this.onData(k.shrinkBuf(C.output,C.next_out))));0===C.avail_in&&0===C.avail_out&&(F=!0)}while((0<C.avail_in||0===C.avail_out)&&d!==n.Z_STREAM_END);return d===n.Z_STREAM_END&&(e=n.Z_FINISH),
-e===n.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===n.Z_OK):e!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),C.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===n.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=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
+this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),n=b("./zlib/constants"),m=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),s=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,m,p,r,D=this.strm,E=this.options.chunkSize,B=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?n.Z_FINISH:n.Z_NO_FLUSH;
+"string"==typeof b?D.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?D.input=new Uint8Array(b):D.input=b;D.next_in=0;D.avail_in=D.input.length;do{if(0===D.avail_out&&(D.output=new k.Buf8(E),D.next_out=0,D.avail_out=E),d=g.inflate(D,n.Z_NO_FLUSH),d===n.Z_NEED_DICT&&B&&(r="string"==typeof B?l.string2buf(B):"[object ArrayBuffer]"===s.call(B)?new Uint8Array(B):B,d=g.inflateSetDictionary(this.strm,r)),d===n.Z_BUF_ERROR&&!0===F&&(d=n.Z_OK,F=!1),d!==n.Z_STREAM_END&&d!==n.Z_OK)return this.onEnd(d),
+this.ended=!0,!1;D.next_out&&(0!==D.avail_out&&d!==n.Z_STREAM_END&&(0!==D.avail_in||e!==n.Z_FINISH&&e!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(D.output,D.next_out),m=D.next_out-f,p=l.buf2string(D.output,f),D.next_out=m,D.avail_out=E-m,m&&k.arraySet(D.output,D.output,f,m,0),this.onData(p)):this.onData(k.shrinkBuf(D.output,D.next_out))));0===D.avail_in&&0===D.avail_out&&(F=!0)}while((0<D.avail_in||0===D.avail_out)&&d!==n.Z_STREAM_END);return d===n.Z_STREAM_END&&(e=n.Z_FINISH),
+e===n.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===n.Z_OK):e!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),D.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===n.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=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(b,c,d){b="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if("object"!=typeof d)throw new TypeError(d+"must be non-object");for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}}return b};d.shrinkBuf=function(b,c){return b.length===
c?b:b.subarray?b.subarray(0,c):(b.length=c,b)};var e={arraySet:function(b,c,d,e,f){if(c.subarray&&b.subarray)return void b.set(c.subarray(d,d+e),f);for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){var c,d,e,f,p;c=e=0;for(d=b.length;c<d;c++)e+=b[c].length;p=new Uint8Array(e);c=e=0;for(d=b.length;c<d;c++)f=b[c],p.set(f,e),e+=f.length;return p}},f={arraySet:function(b,c,d,e,f){for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(b){b?
(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,e)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,f))};d.setTyped(b)},{}],4:[function(b,c,d){function e(b,c){if(65537>c&&(b.subarray&&k||!b.subarray&&g))return String.fromCharCode.apply(null,f.shrinkBuf(b,c));for(var d="",e=0;e<c;e++)d+=String.fromCharCode(b[e]);return d}var f=b("./common"),g=!0,k=!0;try{String.fromCharCode.apply(null,[0])}catch(l){g=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){k=!1}var m=
@@ -117,76 +117,76 @@ new f.Buf8(256);for(b=0;256>b;b++)m[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=
d?(c[k++]=192|d>>>6,c[k++]=128|63&d):65536>d?(c[k++]=224|d>>>12,c[k++]=128|d>>>6&63,c[k++]=128|63&d):(c[k++]=240|d>>>18,c[k++]=128|d>>>12&63,c[k++]=128|d>>>6&63,c[k++]=128|63&d);return c};d.buf2binstring=function(b){return e(b,b.length)};d.binstring2buf=function(b){for(var c=new f.Buf8(b.length),d=0,e=c.length;d<e;d++)c[d]=b.charCodeAt(d);return c};d.buf2string=function(b,c){var d,f,g,k,l=c||b.length,n=Array(2*l);for(d=f=0;d<l;)if(g=b[d++],128>g)n[f++]=g;else if(k=m[g],4<k)n[f++]=65533,d+=k-1;else{for(g&=
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=D[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&&(x.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){z._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-R?b.strstart-(b.w_size-R):0,m=b.window,p=b.w_mask,r=b.prev,q=b.strstart+O,s=m[g+k-1],G=m[g+k];b.prev_length>=b.good_match&&
+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=B[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&&(y.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){A._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-R?b.strstart-(b.w_size-R):0,m=b.window,p=b.w_mask,r=b.prev,q=b.strstart+O,s=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]===s&&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<q);if(e=O-(q-g),g=q-O,e>k){if(b.match_start=c,k=e,e>=l)break;s=m[g+k-1];G=m[g+k]}}while((c=r[c&p])>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-R)){x.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,x.arraySet(e,c.input,c.next_in,l,k),1===c.state.wrap?c.adler=C(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)),
+g+(g-R)){y.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,y.arraySet(e,c.input,c.next_in,l,k),1===c.state.wrap?c.adler=D(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>=J){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+J-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<J)););}}while(b.lookahead<R&&0!==b.strm.avail_in)}function r(b,c){for(var d,e;;){if(b.lookahead<R){if(p(b),b.lookahead<R&&c===F)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<
-b.hash_shift^b.window[b.strstart+J-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-R&&(b.match_length=m(b,d)),b.match_length>=J)if(e=z._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=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 e=z._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function s(b,c){for(var d,e,f;;){if(b.lookahead<R){if(p(b),
+b.hash_shift^b.window[b.strstart+J-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-R&&(b.match_length=m(b,d)),b.match_length>=J)if(e=A._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=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 e=A._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function s(b,c){for(var d,e,f;;){if(b.lookahead<R){if(p(b),
b.lookahead<R&&c===F)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=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=J-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-R&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===S||b.match_length===J&&4096<b.strstart-b.match_start)&&(b.match_length=J-1)),b.prev_length>=
-J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=z._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);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+J-1])&b.hash_mask,d=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=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=z._tr_tally(b,0,
-b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(z._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=
+J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=A._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);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+J-1])&b.hash_mask,d=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=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=A._tr_tally(b,0,
+b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(A._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?Q:X}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;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=U;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*aa);this.dyn_dtree=new x.Buf16(2*(2*L+1));this.bl_tree=new x.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(M+1);this.heap=new x.Buf16(2*Y+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(2*Y+1);f(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(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=da,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:$,b.adler=2===c.wrap?0:1,c.last_flush=F,z._tr_init(c),H):e(b,N)}function v(b){var c=u(b);c===H&&(b=b.state,b.window_size=2*b.w_size,f(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=J-1,b.match_available=0,b.ins_h=0);return c}function A(b,c,d,f,g,k){if(!b)return N;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>B||d!==U||8>f||15<f||0>c||9<c||0>k||k>W)return e(b,N);8===f&&(f=9);var n=new t;return b.state=n,n.strm=b,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+J-1)/J),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=c,n.strategy=k,n.method=d,v(b)}var y,x=b("../utils/common"),z=b("./trees"),C=b("./adler32"),E=b("./crc32"),D=b("./messages"),F=0,G=4,H=0,N=-2,K=-1,S=1,W=4,da=2,U=8,B=9,Y=286,L=30,I=19,aa=2*Y+1,M=15,J=3,O=258,R=O+J+1,ca=42,$=113,Q=1,X=2,Z=3,T=4;y=[new q(0,0,0,0,function(b,c){var d=
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new y.Buf16(2*aa);this.dyn_dtree=new y.Buf16(2*(2*L+1));this.bl_tree=new y.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new y.Buf16(M+1);this.heap=new y.Buf16(2*Y+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new y.Buf16(2*Y+1);f(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(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=da,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:$,b.adler=2===c.wrap?0:1,c.last_flush=F,A._tr_init(c),H):e(b,N)}function v(b){var c=u(b);c===H&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,k){if(!b)return N;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>C||d!==U||8>f||15<f||0>c||9<c||0>k||k>W)return e(b,N);8===f&&(f=9);var n=new t;return b.state=n,n.strm=b,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+J-1)/J),n.window=new y.Buf8(2*
+n.w_size),n.head=new y.Buf16(n.hash_size),n.prev=new y.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new y.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=c,n.strategy=k,n.method=d,v(b)}var z,y=b("../utils/common"),A=b("./trees"),D=b("./adler32"),E=b("./crc32"),B=b("./messages"),F=0,G=4,H=0,N=-2,K=-1,S=1,W=4,da=2,U=8,C=9,Y=286,L=30,I=19,aa=2*Y+1,M=15,J=3,O=258,R=O+J+1,ca=42,$=113,Q=1,X=2,Z=3,T=4;z=[new q(0,0,0,0,function(b,c){var d=
65535;for(d>b.pending_buf_size-5&&(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===F)return Q;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-R&&(k(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:T):(b.strstart>b.block_start&&k(b,!1),Q)}),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,c){return A(b,c,U,15,8,0)};d.deflateInit2=A;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,H):N};d.deflate=function(b,c){var d,m,r,q;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||
+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,c){return x(b,c,U,15,8,0)};d.deflateInit2=x;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,H):N};d.deflate=function(b,c){var d,m,r,q;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||
666===m.status&&c!==G)return e(b,0===b.avail_out?-5:N);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ca)2===m.wrap?(b.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&&(b.adler=E(b.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=$)):(r=U+(m.w_bits-8<<4)<<8,q=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,r|=q<<6,0!==m.strstart&&(r|=32),m.status=$,n(m,r+(31-r%31)),0!==m.strstart&&(n(m,b.adler>>>16),n(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(r=m.pending;m.gzindex<(65535&
m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r)),g(b),r=m.pending,m.pending!==m.pending_buf_size));)l(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&
(b.adler=E(b.adler,m.pending_buf,m.pending-r,r)),g(b),r=m.pending,m.pending===m.pending_buf_size)){q=1;break}q=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;l(m,q)}while(0!==q);m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r));0===q&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r)),g(b),
r=m.pending,m.pending===m.pending_buf_size)){q=1;break}q=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;l(m,q)}while(0!==q);m.gzhead.hcrc&&m.pending>r&&(b.adler=E(b.adler,m.pending_buf,m.pending-r,r));0===q&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(l(m,255&b.adler),l(m,b.adler>>8&255),b.adler=0,m.status=$)):m.status=$),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=
--1,H}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==F&&666!==m.status){var s;if(2===m.strategy)a:{for(var B;;){if(0===m.lookahead&&(p(m),0===m.lookahead)){if(c===F){s=Q;break a}break}if(m.match_length=0,B=z._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,B&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&
-(k(m,!1),0===m.strm.avail_out)?Q:X)}else if(3===m.strategy)a:{var t,v;for(B=m.window;;){if(m.lookahead<=O){if(p(m),m.lookahead<=O&&c===F){s=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=J&&0<m.strstart&&(v=m.strstart-1,t=B[v],t===B[++v]&&t===B[++v]&&t===B[++v])){d=m.strstart+O;do;while(t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&t===B[++v]&&v<d);m.match_length=O-(d-v);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
-J?(s=z._tr_tally(m,1,m.match_length-J),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(s=z._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),s&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?Q:X)}else s=y[m.level].func(m,c);if(s!==Z&&s!==T||(m.status=666),s===Q||s===Z)return 0===b.avail_out&&(m.last_flush=-1),H;if(s===X&&(1===c?z._tr_align(m):5!==c&&(z._tr_stored_block(m,
+-1,H}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==F&&666!==m.status){var s;if(2===m.strategy)a:{for(var C;;){if(0===m.lookahead&&(p(m),0===m.lookahead)){if(c===F){s=Q;break a}break}if(m.match_length=0,C=A._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,C&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&
+(k(m,!1),0===m.strm.avail_out)?Q:X)}else if(3===m.strategy)a:{var t,B;for(C=m.window;;){if(m.lookahead<=O){if(p(m),m.lookahead<=O&&c===F){s=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=J&&0<m.strstart&&(B=m.strstart-1,t=C[B],t===C[++B]&&t===C[++B]&&t===C[++B])){d=m.strstart+O;do;while(t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&t===C[++B]&&B<d);m.match_length=O-(d-B);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
+J?(s=A._tr_tally(m,1,m.match_length-J),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(s=A._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),s&&(k(m,!1),0===m.strm.avail_out)){s=Q;break a}}s=(m.insert=0,c===G?(k(m,!0),0===m.strm.avail_out?Z:T):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?Q:X)}else s=z[m.level].func(m,c);if(s!==Z&&s!==T||(m.status=666),s===Q||s===Z)return 0===b.avail_out&&(m.last_flush=-1),H;if(s===X&&(1===c?A._tr_align(m):5!==c&&(A._tr_stored_block(m,
0,0,!1),3===c&&(f(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(b),0===b.avail_out))return m.last_flush=-1,H}return c!==G?H:0>=m.wrap?1:(2===m.wrap?(l(m,255&b.adler),l(m,b.adler>>8&255),l(m,b.adler>>16&255),l(m,b.adler>>24&255),l(m,255&b.total_in),l(m,b.total_in>>8&255),l(m,b.total_in>>16&255),l(m,b.total_in>>24&255)):(n(m,b.adler>>>16),n(m,65535&b.adler)),g(b),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?H:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,
-c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==$&&666!==c?e(b,N):(b.state=null,c===$?e(b,-3):H)):N};d.deflateSetDictionary=function(b,c){var d,e,g,k,l,n,m;e=c.length;if(!b||!b.state||(d=b.state,k=d.wrap,2===k||1===k&&d.status!==ca||d.lookahead))return N;1===k&&(b.adler=C(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===k&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new x.Buf8(d.w_size),x.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=e;b.next_in=
+c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==$&&666!==c?e(b,N):(b.state=null,c===$?e(b,-3):H)):N};d.deflateSetDictionary=function(b,c){var d,e,g,k,l,n,m;e=c.length;if(!b||!b.state||(d=b.state,k=d.wrap,2===k||1===k&&d.status!==ca||d.lookahead))return N;1===k&&(b.adler=D(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===k&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new y.Buf8(d.w_size),y.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=e;b.next_in=
0;b.input=c;for(p(d);d.lookahead>=J;){e=d.strstart;g=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=n,b.input=m,b.avail_in=l,d.wrap=k,H};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
-"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.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(b,c,d){c.exports=function(b,c){var d,k,l,n,m,p,r,s,q,t,u,v,A,y,x,z,C,E,D,F,G,H,N,K;d=b.state;k=b.next_in;N=b.input;l=k+(b.avail_in-5);n=b.next_out;K=b.output;m=n-(c-b.avail_out);p=n+(b.avail_out-257);r=d.dmax;s=d.wsize;q=d.whave;t=d.wnext;u=d.window;v=d.hold;A=d.bits;y=d.lencode;
-x=d.distcode;z=(1<<d.lenbits)-1;C=(1<<d.distbits)-1;a:do{15>A&&(v+=N[k++]<<A,A+=8,v+=N[k++]<<A,A+=8);E=y[v&z];b:for(;;){if(D=E>>>24,v>>>=D,A-=D,D=E>>>16&255,0===D)K[n++]=65535&E;else{if(!(16&D)){if(0===(64&D)){E=y[(65535&E)+(v&(1<<D)-1)];continue b}if(32&D){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&E;(D&=15)&&(A<D&&(v+=N[k++]<<A,A+=8),F+=v&(1<<D)-1,v>>>=D,A-=D);15>A&&(v+=N[k++]<<A,A+=8,v+=N[k++]<<A,A+=8);E=x[v&C];c:for(;;){if(D=E>>>24,v>>>=D,A-=D,D=E>>>16&255,
-!(16&D)){if(0===(64&D)){E=x[(65535&E)+(v&(1<<D)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&E,D&=15,A<D&&(v+=N[k++]<<A,A+=8,A<D&&(v+=N[k++]<<A,A+=8)),G+=v&(1<<D)-1,G>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=D,A-=D,D=n-m,G>D){if(D=G-D,D>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,H=u,0===t){if(E+=s-D,D<F){F-=D;do K[n++]=u[E++];while(--D);E=n-G;H=K}}else if(t<D){if(E+=s+t-D,D-=t,D<F){F-=D;do K[n++]=u[E++];while(--D);
-if(E=0,t<F){D=t;F-=D;do K[n++]=u[E++];while(--D);E=n-G;H=K}}}else if(E+=t-D,D<F){F-=D;do K[n++]=u[E++];while(--D);E=n-G;H=K}for(;2<F;)K[n++]=H[E++],K[n++]=H[E++],K[n++]=H[E++],F-=3;F&&(K[n++]=H[E++],1<F&&(K[n++]=H[E++]))}else{E=n-G;do K[n++]=K[E++],K[n++]=K[E++],K[n++]=K[E++],F-=3;while(2<F);F&&(K[n++]=K[E++],1<F&&(K[n++]=K[E++]))}break}}break}}while(k<l&&n<p);F=A>>3;k-=F;A-=F<<3;b.next_in=k;b.next_out=n;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=n<p?257+(p-n):257-(n-p);d.hold=v&(1<<A)-1;d.bits=A}},
+"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.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(b,c,d){c.exports=function(b,c){var d,k,l,n,m,p,r,s,q,t,u,v,x,z,y,A,D,E,B,F,G,H,N,K;d=b.state;k=b.next_in;N=b.input;l=k+(b.avail_in-5);n=b.next_out;K=b.output;m=n-(c-b.avail_out);p=n+(b.avail_out-257);r=d.dmax;s=d.wsize;q=d.whave;t=d.wnext;u=d.window;v=d.hold;x=d.bits;z=d.lencode;
+y=d.distcode;A=(1<<d.lenbits)-1;D=(1<<d.distbits)-1;a:do{15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);E=z[v&A];b:for(;;){if(B=E>>>24,v>>>=B,x-=B,B=E>>>16&255,0===B)K[n++]=65535&E;else{if(!(16&B)){if(0===(64&B)){E=z[(65535&E)+(v&(1<<B)-1)];continue b}if(32&B){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&E;(B&=15)&&(x<B&&(v+=N[k++]<<x,x+=8),F+=v&(1<<B)-1,v>>>=B,x-=B);15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);E=y[v&D];c:for(;;){if(B=E>>>24,v>>>=B,x-=B,B=E>>>16&255,
+!(16&B)){if(0===(64&B)){E=y[(65535&E)+(v&(1<<B)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&E,B&=15,x<B&&(v+=N[k++]<<x,x+=8,x<B&&(v+=N[k++]<<x,x+=8)),G+=v&(1<<B)-1,G>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=B,x-=B,B=n-m,G>B){if(B=G-B,B>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,H=u,0===t){if(E+=s-B,B<F){F-=B;do K[n++]=u[E++];while(--B);E=n-G;H=K}}else if(t<B){if(E+=s+t-B,B-=t,B<F){F-=B;do K[n++]=u[E++];while(--B);
+if(E=0,t<F){B=t;F-=B;do K[n++]=u[E++];while(--B);E=n-G;H=K}}}else if(E+=t-B,B<F){F-=B;do K[n++]=u[E++];while(--B);E=n-G;H=K}for(;2<F;)K[n++]=H[E++],K[n++]=H[E++],K[n++]=H[E++],F-=3;F&&(K[n++]=H[E++],1<F&&(K[n++]=H[E++]))}else{E=n-G;do K[n++]=K[E++],K[n++]=K[E++],K[n++]=K[E++],F-=3;while(2<F);F&&(K[n++]=K[E++],1<F&&(K[n++]=K[E++]))}break}}break}}while(k<l&&n<p);F=x>>3;k-=F;x-=F<<3;b.next_in=k;b.next_out=n;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=n<p?257+(p-n):257-(n-p);d.hold=v&(1<<x)-1;d.bits=x}},
{}],11:[function(b,c,d){function e(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){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 c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=x,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new s.Buf32(z),c.distcode=c.distdyn=new s.Buf32(C),c.sane=1,c.back=-1,A):y}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function l(b,c){var d,e;return b&&b.state?(e=b.state,
-0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):y}function n(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==A&&(b.state=null),d):y}function m(b,c,d,e){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)),e>=b.wsize?(s.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),s.arraySet(b.window,c,d-
-e,f,b.wnext),e-=f,e?(s.arraySet(b.window,c,d-e,e,0),b.wnext=e,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=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),u=b("./inffast"),v=b("./inftrees"),A=0,y=-2,x=1,z=852,C=592,E=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(b,c){var d,f,g,k,l,n,C,z,B,Y,L,I,aa,M,J,O,R,ca,$,Q,X,Z,T=0,P=new s.Buf8(4),ha=[16,17,
-18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;g=b.output;C=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;z=d.hold;B=d.bits;Y=n;L=C;X=A;a:for(;;)switch(d.mode){case x:if(0===d.wrap){d.mode=13;break}for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(2&d.wrap&&35615===z){d.check=0;P[0]=255&z;P[1]=z>>>8&255;d.check=t(d.check,P,2,0);B=z=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&
-d.wrap)||(((255&z)<<8)+(z>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&z)){b.msg="unknown compression method";d.mode=30;break}if(z>>>=4,B-=4,Q=(15&z)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&z?10:12;B=z=0;break;case 2:for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(d.flags=z,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";
-d.mode=30;break}d.head&&(d.head.text=z>>8&1);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,d.check=t(d.check,P,2,0));B=z=0;d.mode=3;case 3:for(;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.head&&(d.head.time=z);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,P[2]=z>>>16&255,P[3]=z>>>24&255,d.check=t(d.check,P,4,0));B=z=0;d.mode=4;case 4:for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.head&&(d.head.xflags=255&z,d.head.os=z>>8);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,d.check=t(d.check,P,2,0));B=z=0;d.mode=
-5;case 5:if(1024&d.flags){for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.length=z;d.head&&(d.head.extra_len=z);512&d.flags&&(P[0]=255&z,P[1]=z>>>8&255,d.check=t(d.check,P,2,0));B=z=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>n&&(I=n),I&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),s.arraySet(d.head.extra,f,k,I,Q)),512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
+new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=y,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new s.Buf32(A),c.distcode=c.distdyn=new s.Buf32(D),c.sane=1,c.back=-1,x):z}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):z}function l(b,c){var d,e;return b&&b.state?(e=b.state,
+0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?z:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):z}function n(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):z}function m(b,c,d,e){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)),e>=b.wsize?(s.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),s.arraySet(b.window,c,d-
+e,f,b.wnext),e-=f,e?(s.arraySet(b.window,c,d-e,e,0),b.wnext=e,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=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),u=b("./inffast"),v=b("./inftrees"),x=0,z=-2,y=1,A=852,D=592,E=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(b,c){var d,f,g,k,l,n,D,A,C,Y,L,I,aa,M,J,O,R,ca,$,Q,X,Z,T=0,P=new s.Buf8(4),ha=[16,17,
+18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return z;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;g=b.output;D=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;A=d.hold;C=d.bits;Y=n;L=D;X=x;a:for(;;)switch(d.mode){case y:if(0===d.wrap){d.mode=13;break}for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(2&d.wrap&&35615===A){d.check=0;P[0]=255&A;P[1]=A>>>8&255;d.check=t(d.check,P,2,0);C=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&
+d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,C-=4,Q=(15&A)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.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(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";
+d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,d.check=t(d.check,P,2,0));C=A=0;d.mode=3;case 3:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.head&&(d.head.time=A);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,P[2]=A>>>16&255,P[3]=A>>>24&255,d.check=t(d.check,P,4,0));C=A=0;d.mode=4;case 4:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,d.check=t(d.check,P,2,0));C=A=0;d.mode=
+5;case 5:if(1024&d.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(P[0]=255&A,P[1]=A>>>8&255,d.check=t(d.check,P,2,0));C=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>n&&(I=n),I&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),s.arraySet(d.head.extra,f,k,I,Q)),512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
7;case 7:if(2048&d.flags){if(0===n)break a;I=0;do Q=f[k+I++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&I<n);if(512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,Q)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===n)break a;I=0;do Q=f[k+I++],d.head&&Q&&65536>d.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&I<n);if(512&d.flags&&(d.check=t(d.check,f,I,k)),n-=I,k+=I,Q)break a}else d.head&&(d.head.comment=null);d.mode=
-9;case 9:if(512&d.flags){for(;16>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(z!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}B=z=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}b.adler=d.check=e(z);B=z=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=C,b.next_in=k,b.avail_in=n,d.hold=z,d.bits=B,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){z>>>=
-7&B;B-=7&B;d.mode=27;break}for(;3>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}switch(d.last=1&z,z>>>=1,B-=1,3&z){case 0:d.mode=14;break;case 1:M=d;if(E){p=new s.Buf32(512);r=new s.Buf32(32);for(O=0;144>O;)M.lens[O++]=8;for(;256>O;)M.lens[O++]=9;for(;280>O;)M.lens[O++]=7;for(;288>O;)M.lens[O++]=8;v(1,M.lens,0,288,p,0,M.work,{bits:9});for(O=0;32>O;)M.lens[O++]=5;v(2,M.lens,0,32,r,0,M.work,{bits:5});E=!1}M.lencode=p;M.lenbits=9;M.distcode=r;M.distbits=5;if(d.mode=20,6===c){z>>>=2;B-=2;break a}break;case 2:d.mode=
-17;break;case 3:b.msg="invalid block type",d.mode=30}z>>>=2;B-=2;break;case 14:z>>>=7&B;for(B-=7&B;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if((65535&z)!==(z>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&z,z=0,B=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>n&&(I=n),I>C&&(I=C),0===I)break a;s.arraySet(g,f,k,I,l);n-=I;k+=I;C-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(d.nlen=
-(31&z)+257,z>>>=5,B-=5,d.ndist=(31&z)+1,z>>>=5,B-=5,d.ncode=(15&z)+4,z>>>=4,B-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.lens[ha[d.have++]]=7&z;z>>>=3;B-=3}for(;19>d.have;)d.lens[ha[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},X=v(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid code lengths set";d.mode=30;break}d.have=
-0;d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;T=d.lencode[z&(1<<d.lenbits)-1],J=T>>>24,O=65535&T,!(J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(16>O)z>>>=J,B-=J,d.lens[d.have++]=O;else{if(16===O){for(M=J+2;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(z>>>=J,B-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];I=3+(3&z);z>>>=2;B-=2}else if(17===O){for(M=J+3;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=J;B-=J;Q=0;I=3+(7&z);z>>>=3;B-=3}else{for(M=
-J+7;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=J;B-=J;Q=0;I=11+(127&z);z>>>=7;B-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},X=v(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},
-X=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,Z),d.distbits=Z.bits,X){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=n&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=k;b.avail_in=n;d.hold=z;d.bits=B;u(b,L);l=b.next_out;g=b.output;C=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;z=d.hold;B=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;T=d.lencode[z&(1<<d.lenbits)-1],J=T>>>24,M=T>>>16&255,O=65535&T,!(J<=B);){if(0===n)break a;n--;z+=f[k++]<<
-B;B+=8}if(M&&0===(240&M)){R=J;ca=M;for($=O;T=d.lencode[$+((z&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,O=65535&T,!(R+J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=R;B-=R;d.back+=R}if(z>>>=J,B-=J,d.back+=J,d.length=O,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;B<M;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}d.length+=z&(1<<d.extra)-1;z>>>=d.extra;B-=d.extra;d.back+=d.extra}d.was=
-d.length;d.mode=23;case 23:for(;T=d.distcode[z&(1<<d.distbits)-1],J=T>>>24,M=T>>>16&255,O=65535&T,!(J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(0===(240&M)){R=J;ca=M;for($=O;T=d.distcode[$+((z&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,O=65535&T,!(R+J<=B);){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}z>>>=R;B-=R;d.back+=R}if(z>>>=J,B-=J,d.back+=J,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;B<M;){if(0===n)break a;n--;z+=f[k++]<<
-B;B+=8}d.offset+=z&(1<<d.extra)-1;z>>>=d.extra;B-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(I=L-C,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,aa=d.wsize-I):aa=d.wnext-I;I>d.length&&(I=d.length);M=d.window}else M=g,aa=l-d.offset,I=d.length;I>C&&(I=C);C-=I;d.length-=I;do g[l++]=M[aa++];while(--I);0===d.length&&(d.mode=21);break;
-case 26:if(0===C)break a;g[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>B;){if(0===n)break a;n--;z|=f[k++]<<B;B+=8}if(L-=C,b.total_out+=L,d.total+=L,L&&(b.adler=d.check=d.flags?t(d.check,g,L,l-L):q(d.check,g,L,l-L)),L=C,(d.flags?z:e(z))!==d.check){b.msg="incorrect data check";d.mode=30;break}B=z=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>B;){if(0===n)break a;n--;z+=f[k++]<<B;B+=8}if(z!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}B=z=0}d.mode=29;case 29:X=
-1;break a;case 30:X=-3;break a;case 31:return-4;default:return y}return b.next_out=l,b.avail_out=C,b.next_in=k,b.avail_in=n,d.hold=z,d.bits=B,(d.wsize||L!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,L-b.avail_out)?(d.mode=31,-4):(Y-=b.avail_in,L-=b.avail_out,b.total_in+=Y,b.total_out+=L,d.total+=L,d.wrap&&L&&(b.adler=d.check=d.flags?t(d.check,g,L,b.next_out-L):q(d.check,g,L,b.next_out-L)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:
-0),(0===Y&&0===L||4===c)&&X===A&&(X=-5),X)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,A};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,A)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,A)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
+9;case 9:if(512&d.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}C=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}b.adler=d.check=e(A);C=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=D,b.next_in=k,b.avail_in=n,d.hold=A,d.bits=C,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=
+7&C;C-=7&C;d.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}switch(d.last=1&A,A>>>=1,C-=1,3&A){case 0:d.mode=14;break;case 1:M=d;if(E){p=new s.Buf32(512);r=new s.Buf32(32);for(O=0;144>O;)M.lens[O++]=8;for(;256>O;)M.lens[O++]=9;for(;280>O;)M.lens[O++]=7;for(;288>O;)M.lens[O++]=8;v(1,M.lens,0,288,p,0,M.work,{bits:9});for(O=0;32>O;)M.lens[O++]=5;v(2,M.lens,0,32,r,0,M.work,{bits:5});E=!1}M.lencode=p;M.lenbits=9;M.distcode=r;M.distbits=5;if(d.mode=20,6===c){A>>>=2;C-=2;break a}break;case 2:d.mode=
+17;break;case 3:b.msg="invalid block type",d.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)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,C=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>n&&(I=n),I>D&&(I=D),0===I)break a;s.arraySet(g,f,k,I,l);n-=I;k+=I;D-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(d.nlen=
+(31&A)+257,A>>>=5,C-=5,d.ndist=(31&A)+1,A>>>=5,C-=5,d.ncode=(15&A)+4,A>>>=4,C-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.lens[ha[d.have++]]=7&A;A>>>=3;C-=3}for(;19>d.have;)d.lens[ha[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},X=v(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid code lengths set";d.mode=30;break}d.have=
+0;d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;T=d.lencode[A&(1<<d.lenbits)-1],J=T>>>24,O=65535&T,!(J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(16>O)A>>>=J,C-=J,d.lens[d.have++]=O;else{if(16===O){for(M=J+2;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A>>>=J,C-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];I=3+(3&A);A>>>=2;C-=2}else if(17===O){for(M=J+3;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=J;C-=J;Q=0;I=3+(7&A);A>>>=3;C-=3}else{for(M=
+J+7;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=J;C-=J;Q=0;I=11+(127&A);A>>>=7;C-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},X=v(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,X){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},
+X=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,Z),d.distbits=Z.bits,X){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=n&&258<=D){b.next_out=l;b.avail_out=D;b.next_in=k;b.avail_in=n;d.hold=A;d.bits=C;u(b,L);l=b.next_out;g=b.output;D=b.avail_out;k=b.next_in;f=b.input;n=b.avail_in;A=d.hold;C=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;T=d.lencode[A&(1<<d.lenbits)-1],J=T>>>24,M=T>>>16&255,O=65535&T,!(J<=C);){if(0===n)break a;n--;A+=f[k++]<<
+C;C+=8}if(M&&0===(240&M)){R=J;ca=M;for($=O;T=d.lencode[$+((A&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,O=65535&T,!(R+J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=R;C-=R;d.back+=R}if(A>>>=J,C-=J,d.back+=J,d.length=O,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;C<M;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;C-=d.extra;d.back+=d.extra}d.was=
+d.length;d.mode=23;case 23:for(;T=d.distcode[A&(1<<d.distbits)-1],J=T>>>24,M=T>>>16&255,O=65535&T,!(J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(0===(240&M)){R=J;ca=M;for($=O;T=d.distcode[$+((A&(1<<R+ca)-1)>>R)],J=T>>>24,M=T>>>16&255,O=65535&T,!(R+J<=C);){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}A>>>=R;C-=R;d.back+=R}if(A>>>=J,C-=J,d.back+=J,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;C<M;){if(0===n)break a;n--;A+=f[k++]<<
+C;C+=8}d.offset+=A&(1<<d.extra)-1;A>>>=d.extra;C-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===D)break a;if(I=L-D,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,aa=d.wsize-I):aa=d.wnext-I;I>d.length&&(I=d.length);M=d.window}else M=g,aa=l-d.offset,I=d.length;I>D&&(I=D);D-=I;d.length-=I;do g[l++]=M[aa++];while(--I);0===d.length&&(d.mode=21);break;
+case 26:if(0===D)break a;g[l++]=d.length;D--;d.mode=21;break;case 27:if(d.wrap){for(;32>C;){if(0===n)break a;n--;A|=f[k++]<<C;C+=8}if(L-=D,b.total_out+=L,d.total+=L,L&&(b.adler=d.check=d.flags?t(d.check,g,L,l-L):q(d.check,g,L,l-L)),L=D,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}C=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>C;){if(0===n)break a;n--;A+=f[k++]<<C;C+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}C=A=0}d.mode=29;case 29:X=
+1;break a;case 30:X=-3;break a;case 31:return-4;default:return z}return b.next_out=l,b.avail_out=D,b.next_in=k,b.avail_in=n,d.hold=A,d.bits=C,(d.wsize||L!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,L-b.avail_out)?(d.mode=31,-4):(Y-=b.avail_in,L-=b.avail_out,b.total_in+=Y,b.total_out+=L,d.total+=L,d.wrap&&L&&(b.adler=d.check=d.flags?t(d.check,g,L,b.next_out-L):q(d.check,g,L,b.next_out-L)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:
+0),(0===Y&&0===L||4===c)&&X===x&&(X=-5),X)};d.inflateEnd=function(b){if(!b||!b.state)return z;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?z:(d.head=c,c.done=!1,x)):z};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?z:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):z};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[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];c.exports=function(b,c,d,r,s,q,t,u){var v,A,y,x,z,C,E,D;x=u.bits;for(var F=0,G=0,H=0,N=0,K=0,S=0,W=0,da=0,U=0,B=null,Y=0,L=new e.Buf16(16),S=new e.Buf16(16),I=null,aa=0,F=0;15>=F;F++)L[F]=0;for(G=0;G<r;G++)L[c[d+G]]++;K=x;for(N=15;1<=N&&0===L[N];N--);if(K>N&&(K=N),0===N)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<N&&0===L[H];H++);K<H&&(K=H);for(F=v=1;15>=F;F++)if(v<<=1,v-=L[F],0>v)return-1;if(0<v&&(0===b||1!==N))return-1;S[1]=0;for(F=1;15>F;F++)S[F+
-1]=S[F]+L[F];for(G=0;G<r;G++)0!==c[d+G]&&(t[S[c[d+G]]++]=G);if(0===b?(B=I=t,z=19):1===b?(B=f,Y-=257,I=g,aa-=257,z=256):(B=k,I=l,z=-1),U=0,G=0,F=H,x=q,S=K,W=0,y=-1,da=1<<K,r=da-1,1===b&&852<da||2===b&&592<da)return 1;for(var M=0;;){M++;C=F-W;t[G]<z?(E=0,D=t[G]):t[G]>z?(E=I[aa+t[G]],D=B[Y+t[G]]):(E=96,D=0);v=1<<F-W;H=A=1<<S;do A-=v,s[x+(U>>W)+A]=C<<24|E<<16|D|0;while(0!==A);for(v=1<<F-1;U&v;)v>>=1;if(0!==v?(U&=v-1,U+=v):U=0,G++,0===--L[F]){if(F===N)break;F=c[d+t[G]]}if(F>K&&(U&r)!==y){0===W&&(W=K);
-x+=H;S=F-W;for(v=1<<S;S+W<N&&(v-=L[S+W],!(0>=v));)S++,v<<=1;if(da+=1<<S,1===b&&852<da||2===b&&592<da)return 1;y=U&r;s[y]=K<<24|S<<16|x-q|0}}return 0!==U&&(s[x+U]=F-W<<24|4194304),u.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.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(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,r,s,q,t,u){var v,x,z,y,A,D,E,B;y=u.bits;for(var F=0,G=0,H=0,N=0,K=0,S=0,W=0,da=0,U=0,C=null,Y=0,L=new e.Buf16(16),S=new e.Buf16(16),I=null,aa=0,F=0;15>=F;F++)L[F]=0;for(G=0;G<r;G++)L[c[d+G]]++;K=y;for(N=15;1<=N&&0===L[N];N--);if(K>N&&(K=N),0===N)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<N&&0===L[H];H++);K<H&&(K=H);for(F=v=1;15>=F;F++)if(v<<=1,v-=L[F],0>v)return-1;if(0<v&&(0===b||1!==N))return-1;S[1]=0;for(F=1;15>F;F++)S[F+
+1]=S[F]+L[F];for(G=0;G<r;G++)0!==c[d+G]&&(t[S[c[d+G]]++]=G);if(0===b?(C=I=t,A=19):1===b?(C=f,Y-=257,I=g,aa-=257,A=256):(C=k,I=l,A=-1),U=0,G=0,F=H,y=q,S=K,W=0,z=-1,da=1<<K,r=da-1,1===b&&852<da||2===b&&592<da)return 1;for(var M=0;;){M++;D=F-W;t[G]<A?(E=0,B=t[G]):t[G]>A?(E=I[aa+t[G]],B=C[Y+t[G]]):(E=96,B=0);v=1<<F-W;H=x=1<<S;do x-=v,s[y+(U>>W)+x]=D<<24|E<<16|B|0;while(0!==x);for(v=1<<F-1;U&v;)v>>=1;if(0!==v?(U&=v-1,U+=v):U=0,G++,0===--L[F]){if(F===N)break;F=c[d+t[G]]}if(F>K&&(U&r)!==z){0===W&&(W=K);
+y+=H;S=F-W;for(v=1<<S;S+W<N&&(v-=L[S+W],!(0>=v));)S++,v<<=1;if(da+=1<<S,1===b&&852<da||2===b&&592<da)return 1;z=U&r;s[z]=K<<24|S<<16|y-q|0}}return 0!==U&&(s[y+U]=F-W<<24|4194304),u.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.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(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,
c,d,e,f){this.static_tree=b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>da-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>da-b.bi_valid,b.bi_valid+=d-da):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function n(b,c,d){l(b,d[2*c],d[2*c+1])}function m(b,c){var d=
0;do d|=1&b,b>>>=1,d<<=1;while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(W+1),g=0;for(e=1;e<=W;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function r(b){var c;for(c=0;c<H;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<K;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*U]=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,
c,d,e){var f=2*c,g=2*d;return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function u(b,c,d){var e,f,g,k,m=0;if(0!==b.last_lit){do e=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===e?n(b,f,c):(g=$[f],n(b,g+G+1,c),k=I[g],0!==k&&(f-=Q[g],l(b,f,k)),e--,g=256>e?ca[e]:ca[256+(e>>>7)],
n(b,g,d),k=aa[g],0!==k&&(e-=X[g],l(b,e,k)));while(m<b.last_lit)}n(b,U,c)}function v(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var k=c.stat_desc.has_stree,l=c.stat_desc.elems,n=-1;b.heap_len=0;b.heap_max=S;for(d=0;d<l;d++)0!==g[2*d]?(b.heap[++b.heap_len]=n=d,b.depth[d]=0):g[2*d+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-=e[2*f+1]);c.max_code=n;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],
-t(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+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,r,k=c.dyn_tree,l=c.max_code,q=c.stat_desc.static_tree,s=c.stat_desc.has_stree,B=c.stat_desc.extra_bits,v=c.stat_desc.extra_base,u=c.stat_desc.max_length,D=0;for(e=0;e<=W;e++)b.bl_count[e]=0;k[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<S;d++)f=b.heap[d],
-e=k[2*k[2*f+1]+1]+1,e>u&&(e=u,D++),k[2*f+1]=e,f>l||(b.bl_count[e]++,m=0,f>=v&&(m=B[f-v]),r=k[2*f],b.opt_len+=r*(e+m),s&&(b.static_len+=r*(q[2*f+1]+m)));if(0!==D){do{for(e=u-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[u]--;D-=2}while(0<D);for(e=u;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>l||(k[2*m+1]!==e&&(b.opt_len+=(e-k[2*m+1])*k[2*m],k[2*m+1]=e),f--)}p(g,n,b.bl_count)}function A(b,c,d){var e,f,g=-1,k=c[1],l=0,n=7,m=4;0===k&&(n=138,m=3);c[2*(d+1)+1]=65535;for(e=
-0;e<=d;e++)f=k,k=c[2*(e+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*B]++):10>=l?b.bl_tree[2*Y]++:b.bl_tree[2*L]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,c,d){var e,f,g=-1,k=c[1],m=0,p=7,r=4;0===k&&(p=138,r=3);for(e=0;e<=d;e++)if(f=k,k=c[2*(e+1)+1],!(++m<p&&f===k)){if(m<r){do n(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(n(b,f,b.bl_tree),m--),n(b,B,b.bl_tree),l(b,m-3,2)):10>=m?(n(b,Y,b.bl_tree),l(b,m-3,3)):(n(b,L,b.bl_tree),
-l(b,m-11,7));m=0;g=f;0===k?(p=138,r=3):f===k?(p=6,r=3):(p=7,r=4)}}function x(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return D;return E}function z(b,c,d,e){l(b,(F<<1)+(e?1:0),3);s(b);k(b,d);k(b,~d);C.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var C=b("../utils/common"),E=0,D=1,F=0,G=256,H=G+1+29,N=30,K=19,S=2*H+1,W=15,da=16,
-U=256,B=16,Y=17,L=18,I=[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],aa=[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],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(H+2));e(O);var R=Array(2*N);e(R);var ca=Array(512);e(ca);var $=Array(256);e($);var Q=Array(29);e(Q);var X=Array(N);e(X);var Z,T,P,ha=!1;d._tr_init=function(b){if(!ha){var c,d,e,k=Array(W+1);for(e=d=0;28>e;e++){Q[e]=d;for(c=0;c<1<<I[e];c++)$[d++]=
+t(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+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,r,k=c.dyn_tree,l=c.max_code,q=c.stat_desc.static_tree,s=c.stat_desc.has_stree,C=c.stat_desc.extra_bits,u=c.stat_desc.extra_base,v=c.stat_desc.max_length,B=0;for(e=0;e<=W;e++)b.bl_count[e]=0;k[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<S;d++)f=b.heap[d],
+e=k[2*k[2*f+1]+1]+1,e>v&&(e=v,B++),k[2*f+1]=e,f>l||(b.bl_count[e]++,m=0,f>=u&&(m=C[f-u]),r=k[2*f],b.opt_len+=r*(e+m),s&&(b.static_len+=r*(q[2*f+1]+m)));if(0!==B){do{for(e=v-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[v]--;B-=2}while(0<B);for(e=v;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>l||(k[2*m+1]!==e&&(b.opt_len+=(e-k[2*m+1])*k[2*m],k[2*m+1]=e),f--)}p(g,n,b.bl_count)}function x(b,c,d){var e,f,g=-1,k=c[1],l=0,n=7,m=4;0===k&&(n=138,m=3);c[2*(d+1)+1]=65535;for(e=
+0;e<=d;e++)f=k,k=c[2*(e+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*Y]++:b.bl_tree[2*L]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function z(b,c,d){var e,f,g=-1,k=c[1],m=0,p=7,r=4;0===k&&(p=138,r=3);for(e=0;e<=d;e++)if(f=k,k=c[2*(e+1)+1],!(++m<p&&f===k)){if(m<r){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,Y,b.bl_tree),l(b,m-3,3)):(n(b,L,b.bl_tree),
+l(b,m-11,7));m=0;g=f;0===k?(p=138,r=3):f===k?(p=6,r=3):(p=7,r=4)}}function y(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return B;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return B;return E}function A(b,c,d,e){l(b,(F<<1)+(e?1:0),3);s(b);k(b,d);k(b,~d);D.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var D=b("../utils/common"),E=0,B=1,F=0,G=256,H=G+1+29,N=30,K=19,S=2*H+1,W=15,da=16,
+U=256,C=16,Y=17,L=18,I=[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],aa=[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],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(H+2));e(O);var R=Array(2*N);e(R);var ca=Array(512);e(ca);var $=Array(256);e($);var Q=Array(29);e(Q);var X=Array(N);e(X);var Z,T,P,ha=!1;d._tr_init=function(b){if(!ha){var c,d,e,k=Array(W+1);for(e=d=0;28>e;e++){Q[e]=d;for(c=0;c<1<<I[e];c++)$[d++]=
e}$[d-1]=e;for(e=d=0;16>e;e++){X[e]=d;for(c=0;c<1<<aa[e];c++)ca[d++]=e}for(d>>=7;e<N;e++){X[e]=d<<7;for(c=0;c<1<<aa[e]-7;c++)ca[256+d++]=e}for(c=0;c<=W;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,H+1,k);for(c=0;c<N;c++)R[2*c+1]=5,R[2*c]=m(c,5);Z=new f(O,I,G+1,H,W);T=new f(R,aa,0,N,W);P=new f([],M,0,K,7);ha=!0}b.l_desc=new g(b.dyn_ltree,Z);b.d_desc=new g(b.dyn_dtree,T);b.bl_desc=new g(b.bl_tree,
-P);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=z;d._tr_flush_block=function(b,c,d,e){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);A(b,b.dyn_ltree,b.l_desc.max_code);A(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=K-1;3<=k&&0===b.bl_tree[2*J[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=d+5;if(d+4<=f&&-1!==c)z(b,c,d,e);else if(4===b.strategy||g===f)l(b,2+(e?1:0),3),u(b,O,R);
-else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;k+=1;l(b,c-257,5);l(b,d-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*J[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&s(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*($[d]+G+1)]++,b.dyn_dtree[2*(256>
+P);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=A;d._tr_flush_block=function(b,c,d,e){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=y(b));v(b,b.l_desc);v(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(k=K-1;3<=k&&0===b.bl_tree[2*J[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=d+5;if(d+4<=f&&-1!==c)A(b,c,d,e);else if(4===b.strategy||g===f)l(b,2+(e?1:0),3),u(b,O,R);
+else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;k+=1;l(b,c-257,5);l(b,d-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*J[f]+1],3);z(b,b.dyn_ltree,c-1);z(b,b.dyn_dtree,d-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&s(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*($[d]+G+1)]++,b.dyn_dtree[2*(256>
c?ca[c]:ca[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,U,O);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(b,c,d){c.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(b,
c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=k[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,k,s,q,t=f,u,v=d[a];v&&"object"===typeof v&&"function"===typeof v.toJSON&&(v=v.toJSON(a));"function"===typeof l&&(v=l.call(d,a,v));switch(typeof v){case "string":return b(v);case "number":return isFinite(v)?""+v:"null";case "boolean":case "null":return""+
@@ -261,7 +261,7 @@ a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:
return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){var c=0,d;for(d in b)c++;for(d in a)if(c--,(!mxUtils.isNaN(a[d])||!mxUtils.isNaN(b[d]))&&a[d]!=b[d])return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=
b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" \x3d [null]\n";else if("function"==typeof a[c])b+=c+" \x3d\x3e [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" \x3d\x3e ["+d+"]\n");else b+=c+" \x3d "+a[c]+"\n"}catch(e){b+=c+"\x3d"+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,
k,l){k-=a;l-=b;if(0===c||0===d)return r;c=Math.abs(c);d=Math.abs(d);var n=-k/2,m=-l/2,p=Math.cos(e*Math.PI/180),r=Math.sin(e*Math.PI/180);e=p*n+r*m;var n=-1*r*n+p*m,m=e*e,s=n*n,q=c*c,t=d*d,u=m/q+s/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((q*t-q*s-t*m)/(q*s+t*m)));m=f*c*n/d;s=-1*f*d*e/c;k=p*m-r*s+k/2;l=r*m+p*s+l/2;q=Math.atan2((n-s)/d,(e-m)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-n-s)/d,(-e-m)/c)-Math.atan2((n-s)/d,(e-m)/c);e=0<=q?q:2*Math.PI+q;0==
-g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;n=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),A=Math.sin(f),s=-n*(m*A+d*v),q=-n*(c*A-p*v),r=[],y=0;y<g;++y){f+=e;var v=Math.cos(f),A=Math.sin(f),t=m*v-d*A+k,u=c*v+p*A+l,x=-n*(m*A+d*v),v=-n*(c*A-p*v),A=6*y;r[A]=Number(s+a);r[A+1]=Number(q+b);r[A+2]=Number(t-x+a);r[A+3]=Number(u-v+b);r[A+4]=Number(t+a);r[A+5]=Number(u+b);s=t+x;q=u+v}return r},getBoundingBox:function(a,
+g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;n=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),x=Math.sin(f),s=-n*(m*x+d*v),q=-n*(c*x-p*v),r=[],z=0;z<g;++z){f+=e;var v=Math.cos(f),x=Math.sin(f),t=m*v-d*x+k,u=c*v+p*x+l,y=-n*(m*x+d*v),v=-n*(c*x-p*v),x=6*z;r[x]=Number(s+a);r[x+1]=Number(q+b);r[x+2]=Number(t-y+a);r[x+3]=Number(u-v+b);r[x+4]=Number(t+a);r[x+5]=Number(u+b);s=t+y;q=u+v}return r},getBoundingBox:function(a,
b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,
g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<
c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=
@@ -533,13 +533,13 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,n,m){if(null!=m&&n
g=0;e==mxConstants.ALIGN_CENTER?g-=c/2:e==mxConstants.ALIGN_RIGHT&&(g-=c);a+=g;f==mxConstants.ALIGN_MIDDLE?l-=d/2:f==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);b+=l;e=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(e+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=n&&(e+="rotate("+n+","+-g+","+
-l+")");m.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,n,m,p,r){if(this.textEnabled&&null!=e){p=null!=p?p:0;var s=this.state;a+=s.dx;b+=s.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";m?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==n?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==n&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<c?q+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,n);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,A=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y=
-document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";A=document.createElement("div");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.wordWrap=mxConstants.WORD_WRAP;A.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;y.appendChild(A);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
-c){var x=A.offsetWidth;if(!m&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=n){var z=y.style.whiteSpace;A.style.whiteSpace="nowrap";x<A.offsetWidth&&(y.style.whiteSpace=z)}m&&(x=Math.min(x,c));y.style.width=x+"px";v=A.offsetWidth+v+0;A=A.offsetHeight+r;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=v+"px";q.setAttribute("style",y.style.cssText)}else v=A.offsetWidth+v,A=A.offsetHeight+r;y.parentNode.removeChild(y);u.appendChild(q)}else this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):u.appendChild(q),y=q,null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,k&&"break-word"==q.style.wordWrap&&(y.style.width="100%")),x=y.offsetWidth,0==x&&q.parentNode==u&&(q.style.visibility="hidden",document.body.appendChild(q),x=y.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=x),!m&&k&&0<c&&(this.root.ownerDocument!=document&&"fill"!=n&&"width"!=n)&&(z=q.style.whiteSpace,q.style.whiteSpace="nowrap",x<y.offsetWidth&&
-(q.style.whiteSpace=z)),v=x+v-1,k&&"fill"!=n&&"width"!=n&&(m&&(v=Math.min(v,c)),q.style.width=v+"px"),v=y.offsetWidth,A=y.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=v,t.mxCachedFinalOffsetHeight=A),A-=r,q.parentNode!=u&&(u.appendChild(q),q.style.visibility="");m&&(A=Math.min(A,d),v=Math.min(v,c));"width"==n?d=A:"fill"!=n&&(c=v,d=A);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
-r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
-")"+y);u.setAttribute("width",Math.round(Math.max(1,c)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,e,f,g,k,l,n,m,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(u),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,n,m,p,r)}};
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,n);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,x=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var z=
+document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";x=document.createElement("div");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(x);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
+c){var y=x.offsetWidth;if(!m&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=n){var A=z.style.whiteSpace;x.style.whiteSpace="nowrap";y<x.offsetWidth&&(z.style.whiteSpace=A)}m&&(y=Math.min(y,c));z.style.width=y+"px";v=x.offsetWidth+v+0;x=x.offsetHeight+r;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=v+"px";q.setAttribute("style",z.style.cssText)}else v=x.offsetWidth+v,x=x.offsetHeight+r;z.parentNode.removeChild(z);u.appendChild(q)}else this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):u.appendChild(q),z=q,null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==q.style.wordWrap&&(z.style.width="100%")),y=z.offsetWidth,0==y&&q.parentNode==u&&(q.style.visibility="hidden",document.body.appendChild(q),y=z.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=y),!m&&k&&0<c&&(this.root.ownerDocument!=document&&"fill"!=n&&"width"!=n)&&(A=q.style.whiteSpace,q.style.whiteSpace="nowrap",y<z.offsetWidth&&
+(q.style.whiteSpace=A)),v=y+v-1,k&&"fill"!=n&&"width"!=n&&(m&&(v=Math.min(v,c)),q.style.width=v+"px"),v=z.offsetWidth,x=z.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=v,t.mxCachedFinalOffsetHeight=x),x-=r,q.parentNode!=u&&(u.appendChild(q),q.style.visibility="");m&&(x=Math.min(x,d),v=Math.min(v,c));"width"==n?d=x:"fill"!=n&&(c=v,d=x);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
+r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;z=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(z+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=p&&(z+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
+")"+z);u.setAttribute("width",Math.round(Math.max(1,c)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,e,f,g,k,l,n,m,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(u),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,n,m,p,r)}};
mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,n,m,p){m=null!=m?m:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=m&&(q+="rotate("+m+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&s.setAttribute("direction",p);n&&0<c&&0<d&&(p=a,m=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d)),m=this.createClip(p*k.scale-2,
m*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document?(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),s.setAttribute("clip-path","url("+p+"#"+m.getAttribute("id")+")")):s.setAttribute("clip-path","url(#"+m.getAttribute("id")+")"));m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&s.setAttribute("text-anchor",
@@ -574,8 +574,8 @@ mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,n,m,p,r){if(this.textEna
l.style.left=this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),u=t.x,t=t.y;e=this.createDiv(e,f,g,n);f=this.createElement("div");null!=r&&e.setAttribute("dir",r);if(k&&0<c){if(m||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var v=e;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
(v.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=s.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&!mxClient.IS_EM&&"DIV"!=this.root.nodeName?(q.appendChild(f),l.appendChild(q)):l.appendChild(f)):8==document.documentMode&&!mxClient.IS_EM?(q.appendChild(e),l.appendChild(q)):(e.style.display="inline",l.appendChild(e));"DIV"!=this.root.nodeName?(r=this.createVmlElement("rect"),r.stroked="false",r.filled=
"false",r.appendChild(l),this.root.appendChild(r)):this.root.appendChild(l);m?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==n?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==n&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){v=p*(Math.PI/180);p=parseFloat(parseFloat(Math.cos(v)).toFixed(8));
-r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var A=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,v),
-q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*g+c*-A)/2-r*c*(u+0.5)+p*d*(t+0.5);k=(c-c*g+d*-A)/2+p*c*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-c/2)*s.scale)+"px",n.style.top=this.format(b+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&&
+r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var x=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,v),
+q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*g+c*-x)/2-r*c*(u+0.5)+p*d*(t+0.5);k=(c-c*g+d*-x)/2+p*c*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-c/2)*s.scale)+"px",n.style.top=this.format(b+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&&
!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-c/2)*s)+"px",l.style.top=this.format(b+(m-d/2)*s)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",s.appendChild(e),l.style.left=this.format(a+c*u*this.state.scale)+"px",l.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*u+
"%",q.style.top=100*t+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,n,m,p,r)}};
@@ -584,9 +584,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,n,m,p,r){k=this.sta
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=p*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,n=null,m=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=b.x;s.y+=b.y;var u=s.x,v=s.x+s.width,A=s.getCenterX(),y=s.y,x=s.y+s.height,z=s.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-A)<q?(f=b-a.getCenterX(),q=Math.abs(b-A),d=!0):Math.abs(b-u)<q?(f=b-a.x,
-q=Math.abs(b-u),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,n=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var s=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-z)<t?(g=b-a.getCenterY(),t=Math.abs(b-z),c=!0):Math.abs(b-
-y)<t?(g=b-a.y,t=Math.abs(b-y),c=!0):Math.abs(b-x)<t&&(g=b-a.y-a.height,t=Math.abs(b-x),c=!0);c&&(p=E,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));m=m||c},C=0;C<this.states.length;C++){var E=this.states[C];null!=E&&(this.horizontal&&(b.call(this,E.getCenterX(),
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,n=null,m=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=b.x;s.y+=b.y;var u=s.x,v=s.x+s.width,x=s.getCenterX(),z=s.y,y=s.y+s.height,A=s.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-x)<q?(f=b-a.getCenterX(),q=Math.abs(b-x),d=!0):Math.abs(b-u)<q?(f=b-a.x,
+q=Math.abs(b-u),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,n=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var s=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-A)<t?(g=b-a.getCenterY(),t=Math.abs(b-A),c=!0):Math.abs(b-
+z)<t?(g=b-a.y,t=Math.abs(b-z),c=!0):Math.abs(b-y)<t&&(g=b-a.y-a.height,t=Math.abs(b-y),c=!0);c&&(p=E,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));m=m||c},D=0;D<this.states.length;D++){var E=this.states[D];null!=E&&(this.horizontal&&(b.call(this,E.getCenterX(),
E),b.call(this,E.x,E),b.call(this,E.x+E.width,E)),this.vertical&&(s.call(this,E.getCenterY(),E),s.call(this,E.y,E),s.call(this,E.y+E.height,E)))}c&&(k||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),m||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));e=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
l.y+l.height)),this.guideX.points=null!=minY&&null!=maxY?[new mxPoint(n,minY),new mxPoint(n,maxY)]:[new mxPoint(n,-this.graph.panDy),new mxPoint(n,e.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw());!m&&null!=this.guideY?this.guideY.node.style.visibility="hidden":null!=this.guideY&&(null!=p&&null!=a&&(minX=Math.min(a.x+f-this.graph.panDx,p.x),maxX=Math.max(a.x+a.width+f-this.graph.panDx,p.x+p.width)),this.guideY.points=
null!=minX&&null!=maxX?[new mxPoint(minX,r),new mxPoint(maxX,r)]:[new mxPoint(-this.graph.panDx,r),new mxPoint(e.scrollWidth-3-this.graph.panDx,r)],this.guideY.stroke=this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw());b=new mxPoint(f,g)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
@@ -669,14 +669,14 @@ function mxArrowConnector(a,b,c,d,e,f,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 b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),n=g?0:this.arrowSpacing+c/2,m=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),r=b[b.length-1],s=1;s<b.length-1&&b[s].x==
-b[0].x&&b[s].y==b[0].y;)s++;var q=b[s].x-b[0].x,s=b[s].y-b[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,A=u,y=s/t,x,z=y,t=f*y,C=-f*u,E=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=u;s=y;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,u,y,m,d,f,n,!0);else{v=b[0].x+t/2+n*u;x=b[0].y+C/2+n*y;var D=b[0].x-t/2+n*u,F=b[0].y-C/2+n*y;g?(a.moveTo(v,x),E.push(function(){a.lineTo(D,F)})):(a.moveTo(D,F),a.lineTo(v,x))}for(var G=x=v=0,t=0;t<b.length-2;t++)if(C=mxUtils.relativeCcw(b[t].x,
-b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),v=b[t+2].x-b[t+1].x,x=b[t+2].y-b[t+1].y,G=Math.sqrt(v*v+x*x),0!=G&&(A=v/G,z=x/G,tmp=Math.max(Math.sqrt((u*A+y*z+1)/2),0.04),v=u+A,x=y+z,G=Math.sqrt(v*v+x*x),0!=G)){v/=G;x/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=C&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=b[t+1].x+x*f/2/G,N=b[t+1].y-v*f/2/G;x=b[t+1].x-x*f/2/G;v=b[t+1].y+v*f/2/G;0==C||!p?(a.lineTo(H,N),function(b,c){E.push(function(){a.lineTo(b,c)})}(x,v)):-1==C?(C=x+z*f,G=v-A*f,
-a.lineTo(x+y*f,v-u*f),a.quadTo(H,N,C,G),function(b,c){E.push(function(){a.lineTo(b,c)})}(x,v)):(a.lineTo(H,N),function(b,c){var d=H-y*f,e=N+u*f,g=H-z*f,k=N+A*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(g,k)})}(x,v));u=A;y=z}t=f*z;C=-f*A;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,n,!1);else{a.lineTo(r.x-n*A+t/2,r.y-n*z+C/2);var K=r.x-n*A-t/2,S=r.y-n*z-C/2;g?(a.moveTo(K,S),E.splice(0,0,function(){a.moveTo(K,S)})):a.lineTo(K,S)}for(t=E.length-1;0<=t;t--)E[t]();g?(a.end(),
-a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,s,m,d,f,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,n,!0),a.stroke(),a.end()))}};
+b[0].x&&b[s].y==b[0].y;)s++;var q=b[s].x-b[0].x,s=b[s].y-b[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,x=u,z=s/t,y,A=z,t=f*z,D=-f*u,E=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=u;s=z;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,u,z,m,d,f,n,!0);else{v=b[0].x+t/2+n*u;y=b[0].y+D/2+n*z;var B=b[0].x-t/2+n*u,F=b[0].y-D/2+n*z;g?(a.moveTo(v,y),E.push(function(){a.lineTo(B,F)})):(a.moveTo(B,F),a.lineTo(v,y))}for(var G=y=v=0,t=0;t<b.length-2;t++)if(D=mxUtils.relativeCcw(b[t].x,
+b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),v=b[t+2].x-b[t+1].x,y=b[t+2].y-b[t+1].y,G=Math.sqrt(v*v+y*y),0!=G&&(x=v/G,A=y/G,tmp=Math.max(Math.sqrt((u*x+z*A+1)/2),0.04),v=u+x,y=z+A,G=Math.sqrt(v*v+y*y),0!=G)){v/=G;y/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=D&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=b[t+1].x+y*f/2/G,N=b[t+1].y-v*f/2/G;y=b[t+1].x-y*f/2/G;v=b[t+1].y+v*f/2/G;0==D||!p?(a.lineTo(H,N),function(b,c){E.push(function(){a.lineTo(b,c)})}(y,v)):-1==D?(D=y+A*f,G=v-x*f,
+a.lineTo(y+z*f,v-u*f),a.quadTo(H,N,D,G),function(b,c){E.push(function(){a.lineTo(b,c)})}(y,v)):(a.lineTo(H,N),function(b,c){var d=H-z*f,e=N+u*f,g=H-A*f,k=N+x*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(g,k)})}(y,v));u=x;z=A}t=f*A;D=-f*x;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-z,c,e,f,n,!1);else{a.lineTo(r.x-n*x+t/2,r.y-n*A+D/2);var K=r.x-n*x-t/2,S=r.y-n*A-D/2;g?(a.moveTo(K,S),E.splice(0,0,function(){a.moveTo(K,S)})):a.lineTo(K,S)}for(t=E.length-1;0<=t;t--)E[t]();g?(a.end(),
+a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,s,m,d,f,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-z,c,e,f,n,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,n){g=k/g;var m=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;n?a.moveTo(b-m+p,c-k+f):a.lineTo(b-m+p,c-k+f);a.lineTo(b-m/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+m/g+p,c+k/g+f);a.lineTo(b+m+p,c+k+f)};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};
-function mxText(a,b,c,d,e,f,g,k,l,n,m,p,r,s,q,t,u,v,A,y,x){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
-0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=A?A:"visible";this.labelPadding=null!=y?y:0;this.textDirection=x;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+function mxText(a,b,c,d,e,f,g,k,l,n,m,p,r,s,q,t,u,v,x,z,y){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
+0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=z?z:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
@@ -869,9 +869,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)k=f[g],k.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),n=[],m=0;m<k.length;m++){var p=k[m].getGeneralPurposeVariable(a-1);n.push(p)}n.sort(function(a,b){return a-b});f[l]=n}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;f-=1;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++){l=d[g]+f;for(++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l]}return c};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var n=g[l],m=n.getGeneralPurposeVariable(f);0>m&&(m=l);k[m]=n}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,A=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],n=v.getNextLayerConnectedCells(f),m=v.getPreviousLayerConnectedCells(f),s=[],q=[],y=0;y<n.length;y++)s[y]=n[y].getGeneralPurposeVariable(f+
-1);for(y=0;y<m.length;y++)q[y]=m[y].getGeneralPurposeVariable(f-1)}else n=p,m=r,s=t,q=u,v=A;A=k[l+1];p=A.getNextLayerConnectedCells(f);r=A.getPreviousLayerConnectedCells(f);t=[];u=[];for(y=0;y<p.length;y++)t[y]=p[y].getGeneralPurposeVariable(f+1);for(y=0;y<r.length;y++)u[y]=r[y].getGeneralPurposeVariable(f-1);for(var x=0,z=0,y=0;y<s.length;y++)for(var C=0;C<t.length;C++)s[y]>t[C]&&x++,s[y]<t[C]&&z++;for(y=0;y<q.length;y++)for(C=0;C<u.length;C++)q[y]>u[C]&&x++,q[y]<u[C]&&z++;if(z<x||z==x&&e)p=v.getGeneralPurposeVariable(f),
-v.setGeneralPurposeVariable(f,A.getGeneralPurposeVariable(f)),A.setGeneralPurposeVariable(f,p),p=n,r=m,t=s,u=q,A=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var n=g[l],m=n.getGeneralPurposeVariable(f);0>m&&(m=l);k[m]=n}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,x=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],n=v.getNextLayerConnectedCells(f),m=v.getPreviousLayerConnectedCells(f),s=[],q=[],z=0;z<n.length;z++)s[z]=n[z].getGeneralPurposeVariable(f+
+1);for(z=0;z<m.length;z++)q[z]=m[z].getGeneralPurposeVariable(f-1)}else n=p,m=r,s=t,q=u,v=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);r=x.getPreviousLayerConnectedCells(f);t=[];u=[];for(z=0;z<p.length;z++)t[z]=p[z].getGeneralPurposeVariable(f+1);for(z=0;z<r.length;z++)u[z]=r[z].getGeneralPurposeVariable(f-1);for(var y=0,A=0,z=0;z<s.length;z++)for(var D=0;D<t.length;D++)s[z]>t[D]&&y++,s[z]<t[D]&&A++;for(z=0;z<q.length;z++)for(D=0;D<u.length;D++)q[z]>u[D]&&y++,q[z]<u[D]&&A++;if(A<y||A==y&&e)p=v.getGeneralPurposeVariable(f),
+v.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=n,r=m,t=s,u=q,x=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var n;n=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,n),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -906,7 +906,7 @@ q;if(s.isVertex()){q=0==k?e.connectsAsSource:e.connectsAsTarget;for(var t=0;t<q.
p+=this.prefVertEdgeOff:n>f/2&&(p-=this.prefVertEdgeOff);for(t=0;t<s;t++)q[4*t+2*k]=m,m+=l,q[4*t+2*k+1]=p;r=Math.max(r,p)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,n=0;n<a.edges.length;n++){var m=a.edges[n],p=this.layout.getVisibleTerminal(m,!0),r=[],s=a.isReversed;p!=g&&(s=!s);if(null!=f){var q=s?
2:0,t=s?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],u=f[4*e+1+q];s!=l&&(u=-u);var t=t+u,q=f[4*e+q],v=k.model.getTerminal(m,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,t+u))):(r.push(new mxPoint(t,
-q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t+u,q)))}q=a.x.length-1;t=u=-1;p=a.maxRank-1;for(s&&(q=0,u=a.x.length,t=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=u;q+=t){var v=a.x[q]+b,A=(this.rankTopY[p]+this.rankBottomY[p+1])/2,y=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var x=A,A=y,y=x;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,A)),r.push(new mxPoint(v,y))):(r.push(new mxPoint(A,v)),r.push(new mxPoint(y,
+q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t+u,q)))}q=a.x.length-1;t=u=-1;p=a.maxRank-1;for(s&&(q=0,u=a.x.length,t=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=u;q+=t){var v=a.x[q]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,z=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var y=x,x=z,z=y;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,x)),r.push(new mxPoint(v,z))):(r.push(new mxPoint(x,v)),r.push(new mxPoint(z,
v)));this.limitX=Math.max(this.limitX,v);p+=t}null!=f&&(q=s?2:0,t=s?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],u=f[4*e+3-q],s!=l&&(u=-u),t-=u,q=f[4*e+2-q],s=k.model.getTerminal(m,!1),p=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(s)&&k.model.getParent(s)==p&&(q=k.view.getState(s),q=null!=q?q.x:p.geometry.x+a.target.width*s.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
r.push(new mxPoint(q,t-u)),r.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t-u,q)),r.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,r);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};
@@ -1032,8 +1032,8 @@ mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.in
g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microsoft-com:vml" xmlns:o\x3d"urn:schemas-microsoft-com:office:office"\x3e'):("CSS1Compat"===document.compatMode&&g.writeln("\x3c!DOCTYPE html\x3e"),g.writeln("\x3chtml\x3e"));g.writeln("\x3chead\x3e");this.writeHead(g,a);g.writeln("\x3c/head\x3e");g.writeln('\x3cbody class\x3d"mxPage"\x3e')}var l=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),m=n/this.scale,p=this.graph.getView().getTranslate();this.autoOrigin||
(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=m;l.height/=m;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*t;var u=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<q)){var a=this.createPageSelector(t,q);g.body.appendChild(a);
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){a.style.position="absolute";var b=function(){a.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),v=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;
-if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var y=0;y<A.length;y++)v(A[y],!0);for(var x=this.getAppendices(this.pageFormat.width,this.pageFormat.height),y=0;y<t;y++){var z=y*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
-q;a++){if(null==this.wnd)return null;var C=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,E=y*q+a+1,D=new mxRectangle(C,z,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-C,-z,this.scale,E,a,D);this.printBackgroundImage&&this.insertBackgroundImage(a,-C,-z)}),E);f.setAttribute("id","mxPage-"+E);v(f,null!=x||y<t-1||a<q-1)}}if(null!=x)for(y=0;y<x.length;y++)v(x[y],y<x.length);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
+if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),x=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=x)for(var z=0;z<x.length;z++)v(x[z],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),z=0;z<t;z++){var A=z*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
+q;a++){if(null==this.wnd)return null;var D=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,E=z*q+a+1,B=new mxRectangle(D,A,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-D,-A,this.scale,E,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-D,-A)}),E);f.setAttribute("id","mxPage-"+E);v(f,null!=y||z<t-1||a<q-1)}}if(null!=y)for(z=0;z<y.length;z++)v(y[z],z<y.length);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
f&&null!=f.parentNode&&f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1160,25 +1160,25 @@ b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&
a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom: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&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?!mxUtils.contains(c,d.x,k)&&!mxUtils.contains(b,d.x,k)&&e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/
2,k)))))},SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,n=!0,m=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var m=[],s=0;s<d.length;s++){var q=a.view.transformControlPoint(a,d[s]);null!=
-q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var m=d[0],t=b,u=g[0],v=!1,A=!1,v=m;null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);for(s=0;2>s;s++){var y=null!=u&&u.x==v.x,x=null!=u&&u.y==v.y,z=null!=t&&v.y>=t.y&&
-v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=x||null==u&&z,A=y||null==u&&t;if(!(0==s&&(v&&A||y&&x))){if(null!=u&&!x&&!y&&(z||t)){n=z?!1:!0;break}if(A||v){n=v;1==s&&(n=0==d.length%2?v:A);break}}t=c;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];y&&x&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
+q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var m=d[0],t=b,u=g[0],v=!1,x=!1,v=m;null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);for(s=0;2>s;s++){var z=null!=u&&u.x==v.x,y=null!=u&&u.y==v.y,A=null!=t&&v.y>=t.y&&
+v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=y||null==u&&A,x=z||null==u&&t;if(!(0==s&&(v&&x||z&&y))){if(null!=u&&!y&&!z&&(A||t)){n=A?!1:!0;break}if(x||v){n=v;1==s&&(n=0==d.length%2?v:x);break}}t=c;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];z&&y&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
p.y));n?p.y=m.y:p.x=m.x;for(s=0;s<d.length;s++)n=!n,m=d[s],n?p.y=m.y:p.x=m.x,f(p.clone())}else m=p,n=!0;p=g[r];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=m&&(n&&(null!=g[r]&&g[r].y!=m.y||null==g[r]&&null!=c&&(m.y<c.y||m.y>c.y+c.height))?f(new mxPoint(p.x,m.y)):!n&&(null!=g[r]&&g[r].x!=m.x||null==g[r]&&null!=c&&(m.x<c.x||m.x>c.x+c.width))&&f(new mxPoint(m.x,p.y))));if(null==g[0]&&null!=b)for(;1<
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[r]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=q&&null!=e[e.length-1]&&Math.abs(q.x-e[e.length-1].x)<k&&Math.abs(q.y-e[e.length-1].y)<k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-q.x)<k&&(e[e.length-1].x=q.x),Math.abs(e[e.length-1].y-q.y)<k&&(e[e.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
-mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],n=f[f.length-1],m=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,s=null!=b?b.height:0,q=null!=c?c.x:n.x,t=null!=c?c.y:n.y,u=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),A=a.view.scale*mxEdgeStyle.getJettySize(a,
-b,c,d,!1);null!=b&&c==b&&(f=A=Math.max(f,A));var y=A+f,x=!1;if(null!=l&&null!=n)var x=n.x-l.x,z=n.y-l.y,x=x*x+z*z<y*y;if(x||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];x=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(m,p,r,s),x),m=x.x,
-p=x.y,r=x.width,s=x.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(q,t,u,v),x),q=x.x,t=x.y,u=x.width,v=x.height));m=Math.round(10*m)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;a=[0,0];m=[[m,p,r,s],[q,t,u,v]];A=[f,A];for(x=0;2>x;x++)mxEdgeStyle.limits[x][1]=
-m[x][0]-A[x],mxEdgeStyle.limits[x][2]=m[x][1]-A[x],mxEdgeStyle.limits[x][4]=m[x][0]+m[x][2]+A[x],mxEdgeStyle.limits[x][8]=m[x][1]+m[x][3]+A[x];A=m[0][1]+m[0][3]/2;p=m[1][1]+m[1][3]/2;x=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);z=A-p;A=0;0>x?A=0>z?2:1:0>=z&&(A=3,0==x&&(A=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(x=0;2>x;x++)null!=p&&(b[x][0]=(p.x-m[x][0])/m[x][2],1>=Math.abs(p.x-m[x][0])?a[x]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-m[x][0]-m[x][2])&&(a[x]=mxConstants.DIRECTION_MASK_EAST),
-b[x][1]=(p.y-m[x][1])/m[x][3],1>=Math.abs(p.y-m[x][1])?a[x]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-m[x][1]-m[x][3])&&(a[x]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=n);x=m[0][1]-(m[1][1]+m[1][3]);n=m[0][0]-(m[1][0]+m[1][2]);p=m[1][1]-(m[0][1]+m[0][3]);r=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(n-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-y,0);y=[];
-c=[];l=[];c[0]=n>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=x>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);n=n>=r?n:r;p=x>=p?x:p;r=[[0,0],[0,0]];s=!1;for(x=0;2>x;x++)0==a[x]&&(0==(c[x]&d[x])&&(c[x]=mxUtils.reversePortConstraints(c[x])),0==(l[x]&d[x])&&(l[x]=mxUtils.reversePortConstraints(l[x])),r[x][0]=l[x],r[x][1]=c[x]);0<p&&0<n&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(r[0][0]=
-c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],s=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],s=!0);0<n&&!s&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(x=0;2>x;x++)if(0==a[x]&&(0==(r[x][0]&d[x])&&(r[x][0]=r[x][1]),y[x]=r[x][0]&d[x],y[x]|=(r[x][1]&d[x])<<8,y[x]|=(r[1-x][x]&d[x])<<16,y[x]|=(r[1-x][1-x]&d[x])<<24,0==(y[x]&15)&&(y[x]<<=8),0==(y[x]&3840)&&(y[x]=y[x]&15|y[x]>>8),0==
-(y[x]&983040)&&(y[x]=y[x]&65535|(y[x]&251658240)>>8),a[x]=y[x]&15,d[x]==mxConstants.DIRECTION_MASK_WEST||d[x]==mxConstants.DIRECTION_MASK_NORTH||d[x]==mxConstants.DIRECTION_MASK_EAST||d[x]==mxConstants.DIRECTION_MASK_SOUTH))a[x]=d[x];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=A;y-=A;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
-f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(x=0;x<d.length;x++)l=d[x]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=A,4<q&&(q-=4),n=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=y&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[x]&mxEdgeStyle.TARGET_MASK),s=0<(d[x]&mxEdgeStyle.SOURCE_MASK),p=(d[x]&mxEdgeStyle.SIDE_MASK)>>5,p<<=A,15<p&&(p>>=4),r=0<(d[x]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?m[s][0]+b[s][0]*m[s][2]:r?m[s][1]+b[s][1]*
-m[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*n[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*n[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=n[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=n[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:y=l;for(x=0;x<=f&&!(x==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
-mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);x++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[x][0]),Math.round(mxEdgeStyle.wayPoints1[x][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
+mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],n=f[f.length-1],m=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,s=null!=b?b.height:0,q=null!=c?c.x:n.x,t=null!=c?c.y:n.y,u=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*mxEdgeStyle.getJettySize(a,
+b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var z=x+f,y=!1;if(null!=l&&null!=n)var y=n.x-l.x,A=n.y-l.y,y=y*y+A*A<z*z;if(y||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];y=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(m,p,r,s),y),m=y.x,
+p=y.y,r=y.width,s=y.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(q,t,u,v),y),q=y.x,t=y.y,u=y.width,v=y.height));m=Math.round(10*m)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;a=[0,0];m=[[m,p,r,s],[q,t,u,v]];x=[f,x];for(y=0;2>y;y++)mxEdgeStyle.limits[y][1]=
+m[y][0]-x[y],mxEdgeStyle.limits[y][2]=m[y][1]-x[y],mxEdgeStyle.limits[y][4]=m[y][0]+m[y][2]+x[y],mxEdgeStyle.limits[y][8]=m[y][1]+m[y][3]+x[y];x=m[0][1]+m[0][3]/2;p=m[1][1]+m[1][3]/2;y=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);A=x-p;x=0;0>y?x=0>A?2:1:0>=A&&(x=3,0==y&&(x=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(y=0;2>y;y++)null!=p&&(b[y][0]=(p.x-m[y][0])/m[y][2],1>=Math.abs(p.x-m[y][0])?a[y]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-m[y][0]-m[y][2])&&(a[y]=mxConstants.DIRECTION_MASK_EAST),
+b[y][1]=(p.y-m[y][1])/m[y][3],1>=Math.abs(p.y-m[y][1])?a[y]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-m[y][1]-m[y][3])&&(a[y]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=n);y=m[0][1]-(m[1][1]+m[1][3]);n=m[0][0]-(m[1][0]+m[1][2]);p=m[1][1]-(m[0][1]+m[0][3]);r=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(n-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(y-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-z,0);z=[];
+c=[];l=[];c[0]=n>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=y>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);n=n>=r?n:r;p=y>=p?y:p;r=[[0,0],[0,0]];s=!1;for(y=0;2>y;y++)0==a[y]&&(0==(c[y]&d[y])&&(c[y]=mxUtils.reversePortConstraints(c[y])),0==(l[y]&d[y])&&(l[y]=mxUtils.reversePortConstraints(l[y])),r[y][0]=l[y],r[y][1]=c[y]);0<p&&0<n&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(r[0][0]=
+c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],s=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],s=!0);0<n&&!s&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(y=0;2>y;y++)if(0==a[y]&&(0==(r[y][0]&d[y])&&(r[y][0]=r[y][1]),z[y]=r[y][0]&d[y],z[y]|=(r[y][1]&d[y])<<8,z[y]|=(r[1-y][y]&d[y])<<16,z[y]|=(r[1-y][1-y]&d[y])<<24,0==(z[y]&15)&&(z[y]<<=8),0==(z[y]&3840)&&(z[y]=z[y]&15|z[y]>>8),0==
+(z[y]&983040)&&(z[y]=z[y]&65535|(z[y]&251658240)>>8),a[y]=z[y]&15,d[y]==mxConstants.DIRECTION_MASK_WEST||d[y]==mxConstants.DIRECTION_MASK_NORTH||d[y]==mxConstants.DIRECTION_MASK_EAST||d[y]==mxConstants.DIRECTION_MASK_SOUTH))a[y]=d[y];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;z-=x;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
+0:1;for(y=0;y<d.length;y++)l=d[y]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=x,4<q&&(q-=4),n=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[y]&mxEdgeStyle.TARGET_MASK),s=0<(d[y]&mxEdgeStyle.SOURCE_MASK),p=(d[y]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),r=0<(d[y]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?m[s][0]+b[s][0]*m[s][2]:r?m[s][1]+b[s][1]*
+m[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*n[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*n[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=n[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=n[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=n[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:z=l;for(y=0;y<=f&&!(y==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);y++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[y][0]),Math.round(mxEdgeStyle.wayPoints1[y][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);
mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;
@@ -2030,8 +2030,8 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'\x3csvg width\x3d"'+c+'" height\x3d"'+
c+'" xmlns\x3d"'+mxConstants.NS_SVG+'"\x3e\x3cdefs\x3e\x3cpattern id\x3d"grid" width\x3d"'+c+'" height\x3d"'+c+'" patternUnits\x3d"userSpaceOnUse"\x3e\x3cpath d\x3d"'+d.join(" ")+'" fill\x3d"none" stroke\x3d"'+a+'" opacity\x3d"0.2" stroke-width\x3d"1"/\x3e\x3cpath d\x3d"M '+c+" 0 L 0 0 0 "+c+'" fill\x3d"none" stroke\x3d"'+a+'" stroke-width\x3d"1"/\x3e\x3c/pattern\x3e\x3c/defs\x3e\x3crect width\x3d"100%" height\x3d"100%" fill\x3d"url(#grid)"/\x3e\x3c/svg\x3e'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=
function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,
-q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var t=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),u=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,A=q.x+b,y=q.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?u:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
-[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*t.height)),new mxPoint(Math.round(A),Math.round(q.y+(c+1)*t.height))]:[new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
+q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var t=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),u=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,x=q.x+b,z=q.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?u:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
+[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*t.height)),new mxPoint(Math.round(x),Math.round(q.y+(c+1)*t.height))]:[new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var e=0;e<c.length;e++)if(this.graph.getModel().isVertex(c[e])){var f=this.graph.getCellGeometry(c[e]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.apply(this,arguments);a.intersects=
mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=a.width/this.scale,e=a.height/this.scale,f=this.graph.pageFormat,g=this.graph.pageScale,
a=f.width*g,f=f.height*g,g=Math.floor(Math.min(0,b)/a),q=Math.floor(Math.min(0,c)/f),b=Math.ceil(Math.max(1,b+d)/a),c=Math.ceil(Math.max(1,c+e)/f);return new mxRectangle(this.scale*(this.translate.x+g*a),this.scale*(this.translate.y+q*f),this.scale*(b-g)*a,this.scale*(c-q)*f)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);if(this.dialect!=mxConstants.DIALECT_SVG&&null!=this.view.backgroundPageShape&&(!this.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.container)))this.view.backgroundPageShape.node.style.marginLeft=
@@ -2050,13 +2050,13 @@ mxClient.IS_MAC&&mxEvent.isMetaDown(a))};var l=!1,n=null,m=null,p=null,r=mxUtils
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 u=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.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 v="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 y=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
-z=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<z.length;a++)for(b=0;b<z[a].length;b++)v.push(z[a][b]);for(a=0;a<A.length;a++)v.push(A[a]);var C=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=v.slice(),f=0;f<n.length;f++){var p=n[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),s=mxUtils.indexOf(m,q);0<=s&&m.splice(s,1);for(var t=0;t<z.length;t++){var u=z[t];if(0<=mxUtils.indexOf(u,q))for(var y=0;y<u.length;y++){var x=mxUtils.indexOf(m,u[y]);0<=x&&m.splice(x,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var q=m[f],C=e[q];if(null!=
-C&&("shape"!=q||c))(!c||0>mxUtils.indexOf(A,q))&&d.setCellStyles(q,C,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){C(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"));C(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(y,c[g]);if("strokeColor"!=c[g]||null!=k[g]&&"none"!=k[g])if(0<=mxUtils.indexOf(A,c[g]))f||0<=mxUtils.indexOf(x,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(v,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:
-d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(v,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(x,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=
+this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="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"],y="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),
+A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<A.length;a++)for(b=0;b<A[a].length;b++)v.push(A[a][b]);for(a=0;a<x.length;a++)v.push(x[a]);var D=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=v.slice(),f=0;f<n.length;f++){var p=n[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),s=mxUtils.indexOf(m,q);0<=s&&m.splice(s,1);for(var t=0;t<A.length;t++){var u=A[t];if(0<=mxUtils.indexOf(u,q))for(var z=0;z<u.length;z++){var y=mxUtils.indexOf(m,u[z]);0<=y&&m.splice(y,1)}}}}e=(c=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<m.length;f++){var q=m[f],D=e[q];if(null!=
+D&&("shape"!=q||c))(!c||0>mxUtils.indexOf(x,q))&&d.setCellStyles(q,D,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){D(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"));D(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(x,c[g]))f||0<=mxUtils.indexOf(y,c[g])?null==k[g]?delete d.currentEdgeStyle[c[g]]:d.currentEdgeStyle[c[g]]=k[g]:e&&0<=mxUtils.indexOf(v,c[g])&&(null==k[g]?delete d.currentVertexStyle[c[g]]:
+d.currentVertexStyle[c[g]]=k[g]);else if(0<=mxUtils.indexOf(v,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(y,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&&
@@ -2091,12 +2091,12 @@ mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px
"":"none"})}null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow")||"Open in New Window");a.lightbox&&this.container!=document.body&&d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,(mxResources.get("close")||
"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||s(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,
"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||s(30)}));var u=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
-mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}A.apply(this,arguments)};var y=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==
-g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):y.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
-1;var x=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
-this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=x&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-x.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
-2-x.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
+mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==
+g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):z.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
+1;var y=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
+this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=y&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-y.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
+2-y.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){y=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
break}d=d.parentNode}}))};EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
EditorUi.prototype.lightboxFit=function(){this.editor.graph.maxFitScale=2;this.editor.graph.fit(20);this.editor.graph.maxFitScale=null};EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};
@@ -2183,12 +2183,12 @@ d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout
"#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):
c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
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 u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,
-arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.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 y=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 y.apply(this,arguments)};var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=
+arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(x=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=x)}));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 y=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return y.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 n=g.getChildCount(e),m=0;m<n;m++){var p=g.getChildAt(e,m),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var q=
-mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(r=mxUtils.getBoundingBox(r,q));(g.isEdge(p)||g.isVertex(p))&&r.x>=a&&(r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:z.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 C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();C=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!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=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,
+mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(r=mxUtils.getBoundingBox(r,q));(g.isEdge(p)||g.isVertex(p))&&r.x>=a&&(r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:A.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 D=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();D=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!=D?this.addSelectionCells(D):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);D=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,
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkTarget="_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;
Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
@@ -2294,7 +2294,7 @@ this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot
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),n=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(n,!0);b.setGeometry(e,k);var m=this.view.getState(e),p=this.view.getState(f),r=this.view.getState(g);if(null!=m){var q=null!=p?this.getConnectionConstraint(m,p,!0):null,s=null!=r?this.getConnectionConstraint(m,r,!1):null;this.setConnectionConstraint(e,f,!0,s);this.setConnectionConstraint(e,g,!1,q)}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 t=k.width;k.width=k.height;k.height=t;b.setGeometry(e,k);var v=this.view.getState(e);if(null!=v){var u=v.style[mxConstants.STYLE_DIRECTION]||"east";"east"==u?u="south":"south"==u?u="west":"west"==u?u="north":"north"==u&&(u="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,u,[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&&
+2;k.y+=k.height/2-k.width/2;var t=k.width;k.width=k.height;k.height=t;b.setGeometry(e,k);var u=this.view.getState(e);if(null!=u){var v=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,v,[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,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.setAttributeForCell=function(a,b,c){var d=null;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),
@@ -2305,7 +2305,7 @@ e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(
function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html\x3d1;resizable\x3d0;points\x3d[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c){d.style+="align\x3dcenter;verticalAlign\x3dmiddle;labelBackgroundColor\x3d#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=
new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else d.style+="autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;",e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x,d.geometry.y=Math.round(b/this.view.scale)-e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getLinkUrl=
function(a){return a};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isBlankLink=function(a){var b=this.domainUrl;return"self"!=urlParams.target&&null!=a&&"#"!=a.charAt(0)&&a.substring(0,b.length)!=b&&!this.isRelativeUrl(a)};Graph.prototype.isRelativeUrl=function(a){return!/^(?:[a-z]+:)?\/\//i.test(a)&&"data:image"!=a.substring(0,10)&&"mailto:"!=a.substring(0,7)};Graph.prototype.addClickHandler=
-function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),d.charAt("#")?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
+function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getLinkUrl(a[c].getAttribute("href"));a[c].setAttribute("href",d);null!=d&&!this.isBlankLink(d)&&(window!=window.top?(a[c].setAttribute("target","_top"),"#"===d.charAt(0)?a[c].setAttribute("href",this.baseUrl+d):a[c].setAttribute("href",this.getAbsoluteUrl(d))):"_blank"==a[c].getAttribute("target")&&a[c].removeAttribute("target"),null!=b&&mxEvent.addListener(a[c],
"click",b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,
b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else"a"==b.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&
(b.getState()==this.currentState||null==b.getState())&&g.intersects(this.currentState,b.getGraphX(),b.getGraphY())||this.updateCurrentState(b)},mouseUp:function(a,d){var e=d.getSource(),k=this.currentLink;this.clear();if("a"!=e.nodeName.toLowerCase()&&!d.isConsumed()&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(d.getEvent())||mxEvent.isTouchEvent(d.getEvent())))null!=k?(g.isBlankLink(k)?window.open(k):(null!=b&&b(d.getEvent()),"#"==k.charAt(0)?window!=window.top?
@@ -2372,13 +2372,13 @@ var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph
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 q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),u=0):u=(new Date).getTime()-t;this.currentTerminalState=
-c};var A=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&A.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
+c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;
-this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):z.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.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 E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return y.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):A.apply(this,arguments)};var D=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&D.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 E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=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(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(c);null!=c&&(a=!0);a&&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=
@@ -2394,8 +2394,8 @@ a.height+6+this.state.view.graph.tolerance)+"px"}};var da=mxEdgeHandler.prototyp
this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();
(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function n(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function s(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;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 A(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function x(){mxCylinder.call(this)}function z(){mxShape.call(this)}function C(){mxShape.call(this)}function E(){mxEllipse.call(this)}function D(){mxShape.call(this)}
-function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxShape.call(this)}function S(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function da(){mxDoubleEllipse.call(this)}function U(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
+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 x(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function A(){mxShape.call(this)}function D(){mxShape.call(this)}function E(){mxEllipse.call(this)}function B(){mxShape.call(this)}
+function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxShape.call(this)}function S(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function da(){mxDoubleEllipse.call(this)}function U(){mxArrowConnector.call(this);this.spacing=0}function C(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
function aa(){mxActor.call(this)}function M(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function ca(){mxActor.call(this)}function $(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function T(){mxEllipse.call(this)}function P(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}
function ka(){mxActor.call(this)}function ba(){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,
@@ -2421,15 +2421,15 @@ c));a.close();a.end();a.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.pai
a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(u,mxActor);u.prototype.size=0.2;u.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=u;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-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=v;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(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.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};y.prototype.paintForeground=function(a,b,c,
+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=v;mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.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=x;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"],n=this.style["symbol"+f+"Width"],m=this.style["symbol"+
f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,r=this.style["symbol"+f+"ArcSpacing"];null!=r&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*r);var r=b,q=c,r=k==mxConstants.ALIGN_CENTER?r+(d-n)/2:k==mxConstants.ALIGN_RIGHT?r+(d-n-p):r+p,q=l==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:l==mxConstants.ALIGN_BOTTOM?q+(e-m-p):q+p;a.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,a,r,q,n,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.prototype.defaultShapes.ext=y;mxUtils.extend(x,mxCylinder);x.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=x;mxUtils.extend(z,mxShape);z.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=z;mxUtils.extend(C,mxShape);C.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};C.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=C;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(D,mxShape);D.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,
-0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=D;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
+arguments)};mxCellRenderer.prototype.defaultShapes.ext=z;mxUtils.extend(y,mxCylinder);y.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=y;mxUtils.extend(A,mxShape);A.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=A;mxUtils.extend(D,mxShape);D.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};D.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=D;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(B,mxShape);B.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,
+0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=B;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=G&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,
@@ -2440,8 +2440,8 @@ c.y<a.getCenterY()&&(d+=1,d*=-1);return new mxPoint(Math.min(a.x+a.width,Math.ma
N;mxUtils.extend(K,mxShape);K.prototype.size=10;K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
K;mxUtils.extend(S,mxCylinder);S.prototype.jettyWidth=32;S.prototype.jettyHeight=12;S.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,k=0.3*e-b/2,l=0.7*e-b/2;f?(a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b),a.moveTo(c,l),a.lineTo(g,l),a.lineTo(g,l+b),a.lineTo(c,l+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
a.lineTo(c,l+b),a.lineTo(0,l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=S;mxUtils.extend(W,mxDoubleEllipse);W.prototype.outerStroke=!0;W.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=
-W;mxUtils.extend(da,W);da.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=da;mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=4;U.prototype.isOpenEnded=function(){return!0};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};U.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=U;mxUtils.extend(B,mxArrowConnector);B.prototype.defaultWidth=
-10;B.prototype.defaultArrowWidth=20;B.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};B.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};B.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=B;mxUtils.extend(Y,
+W;mxUtils.extend(da,W);da.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=da;mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=4;U.prototype.isOpenEnded=function(){return!0};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};U.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=U;mxUtils.extend(C,mxArrowConnector);C.prototype.defaultWidth=
+10;C.prototype.defaultArrowWidth=20;C.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};C.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};C.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=C;mxUtils.extend(Y,
mxActor);Y.prototype.size=30;Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=Y;mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=function(){return!1};
L.prototype.paintForeground=function(a,b,c,d,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(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();
a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=L;mxUtils.extend(I,mxActor);I.prototype.dx=20;I.prototype.dy=20;I.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,
@@ -2498,10 +2498,10 @@ ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b
b-q.y;b=(p*a-m*d)/(l*p-n*m);a=(n*a-l*d)/(n*m-l*p);r?(c&&(q=new mxPoint(q.x+l*b,q.y+n*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+l*b,q.y+n*b));e.push(q)};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=
+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;x.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;T.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;
Y.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;$.prototype.constraints=mxRectangleShape.prototype.constraints;Q.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)];z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
+!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)];A.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)];S.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,
0.2),!1),new mxConnectionConstraint(new mxPoint(0.1,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(0.75,0.25),!1),new mxConnectionConstraint(new mxPoint(0.9,0.5),!1),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)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0.5,
@@ -2557,7 +2557,7 @@ function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,"Ctrl+Shift+R");this.
f-m));f=Math.round(d.snap(d.popupMenuHandler.triggerY/f-e));b.addPointAt(b.state,m,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var e=d.getCellGeometry(c);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(c,
e))}}}finally{d.getModel().endUpdate()}}});f=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,"Ctrl+,");f=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,"Ctrl+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+
"):",c=d.getView().getState(d.getSelectionCell()),e="";null!=c&&(e=c.style[mxConstants.STYLE_IMAGE]||e);var f=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,b,c){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,b,c);else{var e=d.getSelectionCells();if(null!=a){var g=null;d.getModel().beginUpdate();try{if(0==e.length)var k=d.getFreeInsertPoint(),g=e=[d.insertVertex(d.getDefaultParent(),null,"",k.x,k.y,b,c,"shape\x3dimage;imageAspect\x3d0;aspect\x3dfixed;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;")];
-d.setCellStyles(mxConstants.STYLE_IMAGE,a,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var A=e[0],y=d.getModel().getGeometry(A);null!=y&&(y=y.clone(),y.width=b,y.height=c,d.getModel().setGeometry(A,y))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),
+d.setCellStyles(mxConstants.STYLE_IMAGE,a,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var x=e[0],z=d.getModel().getGeometry(x);null!=z&&(z=z.clone(),z.width=b,z.height=c,d.getModel().setGeometry(x,z))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),
!d.cellEditor.isContentEditing())}}).isEnabled=e;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=e;f=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",
function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,"Ctrl+Shift+L");f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));f=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,"Ctrl+Shift+P");f.setToggleAction(!0);
f.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));f=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):
@@ -2636,8 +2636,8 @@ a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d
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("0"!=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"0"!=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.createFileData=function(a,b,c,d,e,f,g,q,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;t=null!=t?t:!0;var u=null,v=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?u="_blank":v=u=d;if(null==a)return"";
-var A=a;if("mxfile"!=A.nodeName.toLowerCase()){var y=b.zapGremlins(mxUtils.getXml(a)),A=b.compress(y);if(b.decompress(A)!=y)return y;y=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(y,A);A=a.ownerDocument.createElement("mxfile");A.appendChild(y)}A.setAttribute("userAgent",navigator.userAgent);A.setAttribute("version",EditorUi.VERSION);A.setAttribute("editor","www.draw.io");a=null!=c?c.getMode():this.mode;null!=a&&A.setAttribute("type",a);a=mxUtils.getXml(A);if(!f&&!e&&(g||null!=c&&
-/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(A),b,null!=c?c.getTitle():null,u,v);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,t,v)}return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));
+var x=a;if("mxfile"!=x.nodeName.toLowerCase()){var z=b.zapGremlins(mxUtils.getXml(a)),x=b.compress(z);if(b.decompress(x)!=z)return z;z=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(z,x);x=a.ownerDocument.createElement("mxfile");x.appendChild(z)}x.setAttribute("userAgent",navigator.userAgent);x.setAttribute("version",EditorUi.VERSION);x.setAttribute("editor","www.draw.io");a=null!=c?c.getMode():this.mode;null!=a&&x.setAttribute("type",a);a=mxUtils.getXml(x);if(!f&&!e&&(g||null!=c&&
+/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(x),b,null!=c?c.getTitle():null,u,v);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,t,v)}return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));
mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var f=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=f&&f.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};
EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var q=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=q&&/(\.svg)$/i.test(q.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var t=f.getGlobalVariable,u=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(f.container);
f.model.setRoot(u.root)}a=this.createFileData(g,f,q,window.location.href,a,b,c,d,e);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),t=b.view.scale;f=Math.floor(g.x/t-b.view.translate.x);t=Math.floor(g.y/t-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),
@@ -2650,9 +2650,9 @@ mxUtils.htmlEntities(JSON.stringify(a))+'"\x3e\x3c/div\x3e\n'+(null==e?'\x3cscri
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"),"0"!=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}"0"!=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)};EditorUi.prototype.downloadFile=function(a,b,c,d,e){try{var f=this.getCurrentFile();
d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));var q=g+"."+a;if("xml"==a){var t='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,t,"text/xml")}else if("html"==a)t=this.getHtml2(this.getFileData(!0),this.editor.graph,g),
-this.saveData(q,a,t,"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var u=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var A=this.editor.graph.background;A==mxConstants.NONE&&(A=null);var y=this.editor.graph.getSvg(A,null,null,!1,null,
-d);c&&this.editor.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else{var x=this.editor.graph.getGraphBounds(),t=this.getFileData(!0,null,null,null,d,"xmlpng"!=
-a),z="";if(x.width*x.height<=MAX_AREA&&t.length<=MAX_REQUEST_SIZE){var C="0";if("xmlpng"==a&&(C="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){z="\x26from\x3d"+b;break}this.saveRequest(t,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+z+"\x26base64\x3d"+c+"\x26embedXml\x3d"+C+"\x26xml\x3d"+encodeURIComponent(t)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
+this.saveData(q,a,t,"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var u=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var x=this.editor.graph.background;x==mxConstants.NONE&&(x=null);var z=this.editor.graph.getSvg(x,null,null,!1,null,
+d);c&&this.editor.addSvgShadow(z);this.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else{var y=this.editor.graph.getGraphBounds(),t=this.getFileData(!0,null,null,null,d,"xmlpng"!=
+a),A="";if(y.width*y.height<=MAX_AREA&&t.length<=MAX_REQUEST_SIZE){var D="0";if("xmlpng"==a&&(D="1",a="png",q=g+"."+a,null!=this.pages&&null!=this.currentPage))for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){A="\x26from\x3d"+b;break}this.saveRequest(t,q,a,function(b,c){return new mxXmlRequest(EXPORT_URL,"format\x3d"+a+A+"\x26base64\x3d"+c+"\x26embedXml\x3d"+D+"\x26xml\x3d"+encodeURIComponent(t)+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):""))})}else this.handleError({message:mxResources.get("drawingTooLarge")},
mxResources.get("error"))}}catch(E){this.handleError(E)}};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=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);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=
a)try{if(this.setCurrentFile(a),a.addListener("descriptorChanged",this.descriptorChangedListener),a.addListener("contentChanged",this.descriptorChangedListener),this.setMode(a.getMode()),this.descriptorChanged(),a.open(),this.diagramContainer.style.visibility="",this.formatContainer.style.visibility="",this.hsplit.style.display="",this.sidebarContainer.style.display="",this.sidebarFooterContainer.style.display="",this.editor.undoManager.clear(),this.updateUi(),null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):
@@ -2660,130 +2660,131 @@ this.editor.setStatus(mxResources.get("readOnly"))),this.editor.chromeless?this.
a,e),this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):c()}))}else c()};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
a,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));
-this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),
-mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+
-"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);c=g.parentNode.previousSibling;d=c.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&c.setAttribute("title",
-this.getLibraryStorageHint(a)+"\n"+d);var q=document.createElement("div");q.style.position="absolute";q.style.right="0px";q.style.top="5px";c.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.marginRight="8px";t.style.marginTop="3px";q.appendChild(t);var u=null;mxEvent.addListener(t,"click",mxUtils.bind(this,
-function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var v=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),
-y=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=t.cloneNode(!1),C.setAttribute("src",EditorUi.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="6px",C.style.marginTop="2px",q.insertBefore(C,q.firstChild),this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C)})):null==u&&(u=t.cloneNode(!1),u.setAttribute("src",
-IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),q.insertBefore(u,q.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);u.parentNode.removeChild(u);u=null;mxEvent.consume(c)})))}),x=mxUtils.bind(this,function(a,c,d,f){a=v.cloneCells(v.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var n=v.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);y(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),z=mxUtils.bind(this,function(a){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(a),v.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
-v.getSelectionCells(),c=v.view.getBounds(b),d=v.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=v.view.translate.x;c.y-=v.view.translate.y;x(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",
-g.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!1),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),
-v.isMouseDown=!1,v.autoScroll=!0,z(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",v.autoScroll=!0,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!0),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,m,q,v){if(null!=c&&"image/"==d.substring(0,6)){var t="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,q),t)];t[0].vertex=!0;x(t,new mxRectangle(0,0,m,q),a,mxEvent.isAltDown(a)?null:v.substring(0,v.lastIndexOf(".")).replace(/_/g," "))}else{v=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var u=
-JSON.parse(mxUtils.getTextContent(c.documentElement));f(u,g);b=b.concat(u);y(a);this.spinner.stop();v=!0}catch(z){}else if("mxfile"==c.documentElement.nodeName)try{u=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(u)),x(t,new mxRectangle(0,0,m,q),a),v=!0}catch(A){}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),
-e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));q.insertBefore(t,q.firstChild);mxEvent.addListener(t,"click",A);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&A(a)});t=t.cloneNode(!1);
-t.setAttribute("src",EditorUi.plusImage);t.setAttribute("title",mxResources.get("add"));q.insertBefore(t,q.firstChild);this.isOffline()||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;margin-right:8px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),q.insertBefore(d,q.firstChild));var C=null;mxEvent.addListener(t,
-"click",z)}c.appendChild(q)};"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()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};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.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
-"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+
-mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,
-!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,
-"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=
-!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type",
-"checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");
-t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&u.setAttribute("disabled","disabled");a&&(f.appendChild(u),mxUtils.write(f,mxResources.get("embedImages")),
-mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom="8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,v.checked,u.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"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);
-var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");
-A.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),y=document.createElement("input");y.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(y);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var x=a.lastIndexOf(".");
-0<x&&(a=a.substring(0,x));y.value=a+".png";var z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");z.value="master";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),C=document.createElement("input");C.setAttribute("type","text");mxUtils.write(q,"Message:");C.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(C);g.appendChild(q);f.appendChild(g);
-q=q.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/"+v.value+"/"+A.value+"/contents/"+y.value+"?ref\x3d"+encodeURIComponent(z.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:y.value,message:C.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/"+v.value+"/"+A.value+"/blob/"+z.value+"/"+y.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(t.value+":"+u.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("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),u=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+
-b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+
-e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,
-function(){200==l.getStatus()?k():u(l)}),mxUtils.bind(this,function(){u(l)}))}else k()}catch(p){this.handleError(p)}else u(a)}),mxUtils.bind(this,function(a){u(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);
-if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(u){this.handleError(u)}}})):this.showRemoteExportDialog(mxResources.get("publish"),
-"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),
-e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");
-b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
-"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,A){f=null!=f?f:!0;A=null!=A?A:this.editor.graph;var y=t?null:A.background;y==mxConstants.NONE&&(y=null);null==y&&(y=d);null==y&&!1==t&&(y="#ffffff");this.convertImages(A.getSvg(y,null,null,null,null,null!=g?g:!0),
-mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),this.convertMath(A,c,!0,
-mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 n=a.getElementsByTagName(c),u=0;u<n.length;u++)mxUtils.bind(this,function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var s=f[n];null==s?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(n[u])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),
-t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=0;v<u.length;v++){var A=this.updatePageRoot(new DiagramPage(u[v])),y=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[y+1]));g.model.execute(new ChangePage(this,
-A,A,y))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var x=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,x);var z=x.getChildCount(x.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<z;v++){var C=x.getChildAt(x.getRoot(),v);if(1==z&&!g.isCellLocked(g.getDefaultParent()))var E=x.getChildren(C),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a));else C=g.importCells([C],0,0,g.model.getRoot(),null,a)[0],E=g.model.getChildren(C),
-g.moveCells(E,b,c),f=f.concat(E)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}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 q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=
-null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,b,c,f,!0),0<t.length)return t}catch(u){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
-null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted",
-"cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,
-b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,
-e,f,g,q,t,u,v){u=null!=u?u:!0;var A=!1,y=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(y=this.importXml(b,c,d,u),g=!0)),g||(y=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&y.isGridEnabled()&&(c=y.snap(c),d=y.snap(d)),y=[y.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
-a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(A=!0,this.parseFile(null!=t?t: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,u));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(t):y=this.insertTextAt(this.validateFileData(a),c,d,!0);!A&&null!=q&&q(y);return y};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,q,t,u,v,A){var y=null!=b&&null!=
-c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;t=null!=t?t:!0;var x=this.editor.graph,z=x.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,y,A)});f=null!=f?f:mxUtils.bind(this,function(a){x.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=
-a.length,E=C,D=[],F=mxUtils.bind(this,function(a,b){D[a]=b;if(0==--E){this.spinner.stop();if(null!=q)q(D);else{var c=[];x.getModel().beginUpdate();try{for(var d=0;d<D.length;d++){var e=D[d]();null!=e&&(c=c.concat(e))}}finally{x.getModel().endUpdate()}}f(c)}}),G=0;G<C;G++)mxUtils.bind(this,function(f){var q=a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),x=
-atob(k.substring(r+1)),y=mxUtils.parseXml(x),x=y.getElementsByTagName("svg");if(0<x.length){var x=x[0],C=A?null:x.getAttribute("content");null!=C&&"\x3c"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null!=C&&("\x3cmxfile "===C.substring(0,8)||"\x3cmxGraphModel "===C.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*z,c+f*z,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,
-r+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),v=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox","0 0 "+s+" "+v);else if(isNaN(s)||isNaN(v)){var u=t.split(" ");3<u.length&&(s=parseFloat(u[2]),v=parseFloat(u[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,v));return e(k,q.type,b+f*z,c+f*z,Math.max(1,Math.round(s*
-x)),Math.max(1,Math.round(v*x)),q.name)}}}catch(A){}return null}))}}else{x=!1;if("image/png"==q.type){var D=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var E=new Image;E.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*z,c+f*z,E.width,E.height,q.name)}));x=!0}}x||(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,k,r){F(f,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var s=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/r));return e(g,q.type,b+f*z,c+f*z,Math.round(k*s),Math.round(r*s),q.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),t,d,v)})))}else e(a.target.result,q.type,b+f*z,c+f*z,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*z,c+f*z,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):r.readAsText(q)})(G)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var t=Math.max(g/e,q/e);if(1<t){var u=Math.round(g/t),v=Math.round(q/t),A=document.createElement("canvas");A.width=u;A.height=v;A.getContext("2d").drawImage(a,0,0,u,v);var y=A.toDataURL();if(y.length<b.length){var x=
-document.createElement("canvas");x.width=u;x.height=v;var z=x.toDataURL();y!==z&&(b=y,g=u,q=v)}}}catch(C){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;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=q;q+=b;return a.substring(c,q)}
-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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>>16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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 e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.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: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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===
-c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");
-f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();
-document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&
-(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=
-this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();
-a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity=
-"0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
-"hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}d=document.getElementById("geInfo");null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var u=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=u&&(u.parentNode.removeChild(u),u=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==u&&
-(!mxClient.IS_IE||10<document.documentMode))u=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,"drop",mxUtils.bind(this,function(b){null!=u&&(u.parentNode.removeChild(u),u=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,
-f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=
-m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,
-null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};
-EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,
-d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),t=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(t)&&(e=!0,d=t)}catch(u){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||
-this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
-null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),
-"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,
-"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,
-function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-
-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,
-d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+
-1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));
+this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,
+c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==
+f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=
+q.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="5px";t.style.backgroundColor="inherit";q.style.position="relative";var u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("close"));u.setAttribute("align","top");u.setAttribute("border","0");u.className="geButton";
+u.style.marginRight="1px";u.style.marginTop="-1px";t.appendChild(u);var v=null;mxEvent.addListener(u,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var x=
+this.editor.graph,z=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),y=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary||a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=u.cloneNode(!1),E.setAttribute("src",EditorUi.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",t.insertBefore(E,t.firstChild),q.style.paddingRight=18*t.childNodes.length+
+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),q.style.paddingRight=18*t.childNodes.length+"px")})):null==v&&(v=u.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),t.insertBefore(v,t.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0);v.parentNode.removeChild(v);v=null;q.style.paddingRight=
+18*t.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*t.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,c,d,f){a=x.cloneCells(x.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var n=x.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);
+y(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),D=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;A(b,c)}mxEvent.consume(a)});
+g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility=
+"hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(g.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,D(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility=
+"visible",g.style.border="3px solid transparent",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor=
+"copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,m,q,t){if(null!=c&&"image/"==d.substring(0,6)){var u="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+
+this.convertDataUri(c),u=[new mxCell("",new mxGeometry(0,0,m,q),u)];u[0].vertex=!0;A(u,new mxRectangle(0,0,m,q),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))}else{t=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);y(a);this.spinner.stop();t=!0}catch(x){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
+u=this.stringToCells(this.editor.graph.decompress(v)),A(u,new mxRectangle(0,0,m,q),a),t=!0}catch(z){}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));
+u=u.cloneNode(!1);u.setAttribute("src",IMAGE_PATH+"/edit.gif");u.setAttribute("title",mxResources.get("edit"));t.insertBefore(u,t.firstChild);mxEvent.addListener(u,"click",z);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&z(a)});u=u.cloneNode(!1);u.setAttribute("src",EditorUi.plusImage);u.setAttribute("title",mxResources.get("add"));t.insertBefore(u,t.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),
+c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),t.insertBefore(c,t.firstChild));var E=null;mxEvent.addListener(u,"click",D)}q.appendChild(t);q.style.paddingRight=18*t.childNodes.length+"px"};"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()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};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.handleError=
+function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!=
+typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"),
+g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};
+EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};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))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,"image/png",!0)};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=
+document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,
+e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,
+mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));
+mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&u.setAttribute("disabled","disabled");a&&(f.appendChild(u),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom=
+"8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,v.checked,u.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"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);
+q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),x=document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);
+var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");0<y&&(a=a.substring(0,y));z.value=a+".png";var A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");A.value="master";
+g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),D=document.createElement("input");D.setAttribute("type","text");mxUtils.write(q,"Message:");D.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(D);g.appendChild(q);f.appendChild(g);q=q.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/"+
+v.value+"/"+x.value+"/contents/"+z.value+"?ref\x3d"+encodeURIComponent(A.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:z.value,message:D.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/"+v.value+"/"+x.value+"/blob/"+A.value+"/"+z.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(t.value+":"+u.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("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),u=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
+try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();
+var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),
+function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():u(l)}),mxUtils.bind(this,function(){u(l)}))}else k()}catch(p){this.handleError(p)}else u(a)}),mxUtils.bind(this,function(a){u(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,
+b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,
+e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(u){this.handleError(u)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*
+f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);
+if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&
+(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
+"")+mxUtils.getXml(b)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,x){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;var z=t?null:x.background;z==mxConstants.NONE&&(z=null);null==z&&(z=d);null==z&&!1==t&&(z="#ffffff");this.convertImages(x.getSvg(z,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=
+q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
+var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=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 n=a.getElementsByTagName(c),u=0;u<n.length;u++)mxUtils.bind(this,
+function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var s=f[n];null==s?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(n[u])});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{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=
+mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=0;v<u.length;v++){var x=this.updatePageRoot(new DiagramPage(u[v])),z=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[z+1]));g.model.execute(new ChangePage(this,x,x,z))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var y=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,y);var A=y.getChildCount(y.getRoot());
+g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<A;v++){var D=y.getChildAt(y.getRoot(),v);if(1==A&&!g.isCellLocked(g.getDefaultParent()))var E=y.getChildren(D),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a));else D=g.importCells([D],0,0,g.model.getRoot(),null,a)[0],E=g.model.getChildren(D),g.moveCells(E,b,c),f=f.concat(E)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var B=g.getBoundingBoxFromGeometry(f,!0);null!=B&&g.moveCells(f,b-B.x,c-B.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||
+this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}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 q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,
+b,c,f,!0),0<t.length)return t}catch(u){}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;imageAspect\x3d0;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;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted",
+"cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length){g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
+g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,t,u,v){u=null!=u?u:!0;var x=!1,z=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(z=this.importXml(b,c,d,u),g=!0)),g||(z=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
+1))),u&&z.isGridEnabled()&&(c=z.snap(c),d=z.snap(d)),z=[z.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(x=!0,this.parseFile(null!=t?t: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,u));null!=q&&q(b)}}),g)):/(\.vsdx)($|\?)/i.test(g)?(new mxVsdxModel).decode(t):z=this.insertTextAt(this.validateFileData(a),c,d,!0);!x&&null!=q&&q(z);return z};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,q,t,u,v,x){var z=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;t=null!=t?t:!0;var y=this.editor.graph,A=y.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,z,x)});f=null!=f?f:mxUtils.bind(this,function(a){y.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var D=a.length,E=D,B=[],F=mxUtils.bind(this,function(a,b){B[a]=b;if(0==--E){this.spinner.stop();if(null!=q)q(B);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<B.length;d++){var e=B[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),G=0;G<D;G++)mxUtils.bind(this,function(f){var q=
+a[f],r=new FileReader;r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),y=atob(k.substring(r+1)),z=mxUtils.parseXml(y),y=z.getElementsByTagName("svg");if(0<y.length){var y=y[0],B=x?null:y.getAttribute("content");null!=B&&"\x3c"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null!=B&&("\x3cmxfile "===
+B.substring(0,8)||"\x3cmxGraphModel "===B.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(B,"text/xml",b+f*A,c+f*A,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,r+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),u=g.getAttribute("viewBox");if(null==u||0==u.length)g.setAttribute("viewBox","0 0 "+s+" "+t);else if(isNaN(s)||isNaN(t)){var v=u.split(" ");3<v.length&&(s=
+parseFloat(v[2]),t=parseFloat(v[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,t));return e(k,q.type,b+f*A,c+f*A,Math.max(1,Math.round(s*x)),Math.max(1,Math.round(t*x)),q.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==q.type){var D=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var E=new Image;E.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*A,c+f*A,E.width,E.height,
+q.name)}));y=!0}}y||(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,k,r){F(f,mxUtils.bind(this,function(){if(null!=
+g&&g.length<u){var s=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/r));return e(g,q.type,b+f*A,c+f*A,Math.round(k*s),Math.round(r*s),q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),t,d,v)})))}else e(a.target.result,q.type,b+f*A,c+f*A,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*A,c+f*A,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):
+r.readAsText(q)})(G)};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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
+f))try{var t=Math.max(g/e,q/e);if(1<t){var u=Math.round(g/t),v=Math.round(q/t),x=document.createElement("canvas");x.width=u;x.height=v;x.getContext("2d").drawImage(a,0,0,u,v);var z=x.toDataURL();if(z.length<b.length){var y=document.createElement("canvas");y.width=u;y.height=v;var A=y.toDataURL();z!==A&&(b=z,g=u,q=v)}}}catch(D){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;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=q;q+=b;return a.substring(c,q)}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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>>
+16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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 e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.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: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))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,
+c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";
+f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!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)&&!g)f.style.left=
+a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
+"\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
+this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
+null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var u=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=u&&(u.parentNode.removeChild(u),u=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==u&&(!mxClient.IS_IE||10<document.documentMode))u=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=u&&(u.parentNode.removeChild(u),u=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
+a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
+l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),
+e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var f=d.lastIndexOf("%3E");0<=f&&f<d.length-3&&(d=d.substring(0,
+f+3))}catch(g){}try{var q=b.getElementsByTagName("span"),t=null!=q&&0<q.length?mxUtils.trim(decodeURIComponent(q[0].textContent)):decodeURIComponent(d);this.isCompatibleString(t)&&(e=!0,d=t)}catch(u){}c.lastPasteXml==d?c.pasteCounter++:(c.lastPasteXml=d,c.pasteCounter=0);f=c.pasteCounter*c.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?c.setSelectionCells(this.importXml(d,f,f)):(e=c.getInsertPoint(),c.isMouseInsertPoint()&&(f=0,c.lastPasteXml==d&&0<c.pasteCounter&&c.pasteCounter--),
+c.setSelectionCells(this.insertTextAt(d,e.x+f,e.y+f,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],
+"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):
+this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&
+(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)&&(d=this.extractGraphModelFromPng(c),null!=d&&0<d.length&&this.openLocalFile(d)),!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format\x3dxml\x26data\x3d"+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200==a.getStatus()&&this.openLocalFile(a.getText())})):/^https?:\/\//.test(c)&&(c=this.getUrl(window.location.pathname+
+"?url\x3d"+encodeURIComponent(c)),null==this.getCurrentFile()?window.location.href=c:window.openWindow(c))))}else this.openLocalFile(c)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d=0,e=0;if(null==a)var e=document.body,f=document.documentElement,d=(e.clientWidth||f.clientWidth)-3,e=Math.max(e.clientHeight||0,f.clientHeight)-3;else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=
+mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
+[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var c=b.target.result,d=a.name;if(null!=d&&0<d.length)if(/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-
+4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200==a.status?this.openLocalFile(a.responseText,d):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));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.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=
+d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};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?(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=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){!this.editor.modified||"0"==urlParams.modified?this.editor.setStatus(""):null!=urlParams.modified&&this.editor.setStatus(mxResources.get(urlParams.modified))});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function r(a){if(null!=
a&&"function"===typeof a.charAt&&"\x3c"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var u=f.data;if("json"==urlParams.proto){u=JSON.parse(u);if("dialog"==u.action){this.showError(null!=u.titleKey?mxResources.get(u.titleKey):u.title,null!=u.messageKey?mxResources.get(u.messageKey):
u.message,null!=u.buttonKey?mxResources.get(u.buttonKey):u.button);null!=u.modified&&(this.editor.modified=u.modified);return}if("prompt"==u.action){var v=new FilenameDialog(this,u.defaultValue||"",null!=u.okKey?mxResources.get(u.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:u}),"*")},null!=u.titleKey?mxResources.get(u.titleKey):u.title);this.showDialog(v.container,300,80,!0,!1);v.init();return}if("draft"==u.action){v=null;v="data:image/png;base64,"==
u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):r(u.xml);v=new DraftDialog(this,mxResources.get("draftFound",[u.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:u}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:u}),"*")}),u.editKey?mxResources.get(u.editKey):null,u.discardKey?mxResources.get(u.discardKey):null);this.showDialog(v.container,
-640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{v.init()}catch(A){g.postMessage(JSON.stringify({event:"draft",error:A.toString(),message:u}),"*")}return}if("template"==u.action){v=new NewDialog(this,!1,null!=u.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=u.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));
-this.showDialog(v.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));v.init();return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxResources.get(u.messageKey)):null!=u.message&&this.editor.setStatus(u.message);null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var y=null!=u.messageKey?mxResources.get(u.messageKey):u.message;null!=u.show&&!u.show?this.spinner.stop():this.spinner.spin(document.body,y);return}if("export"==
-u.action){if("png"==u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin)){var x=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var z=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=u.format;b.xml=encodeURIComponent(x);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var C=
-this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var C=this.createTemporaryGraph(C.getStylesheet()),E=C.getGlobalVariable,D=this.pages[0];C.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:E.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(D.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==u.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(x))));
-C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);z(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==u.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(x)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&z(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
-u.xml&&0<u.xml.length&&this.setFileData(u.xml);y=this.createLoadMessage("export");if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))v=this.getXmlFileData(),y.xml=mxUtils.getXml(v),y.data=this.getFileData(null,null,!0,null,null,null,v),y.format=u.format;else if("html"==u.format)x=this.editor.getGraphXml(),y.data=this.getHtml(x,this.editor.graph),y.xml=mxUtils.getXml(x),y.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;v=this.editor.graph.background;
-v==mxConstants.NONE&&(v=null);y.xml=this.getFileData(!0);y.format="svg";if(u.embedImages||null==u.embedImages){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==u.format?this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(y),"*")})):this.convertImages(this.editor.graph.getSvg(v),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(y),"*")}));return}v="xmlsvg"==u.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(v));y.data=this.createSvgDataUri(v)}g.postMessage(JSON.stringify(y),"*")}return}if("load"==u.action)d=1==u.autosave,this.hideDialog(),null!=u.modified&&null==urlParams.modified&&(urlParams.modified=
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{v.init()}catch(x){g.postMessage(JSON.stringify({event:"draft",error:x.toString(),message:u}),"*")}return}if("template"==u.action){v=new NewDialog(this,!1,null!=u.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=u.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));
+this.showDialog(v.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));v.init();return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxResources.get(u.messageKey)):null!=u.message&&this.editor.setStatus(u.message);null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var z=null!=u.messageKey?mxResources.get(u.messageKey):u.message;null!=u.show&&!u.show?this.spinner.stop():this.spinner.spin(document.body,z);return}if("export"==
+u.action){if("png"==u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin)){var y=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var A=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=u.format;b.xml=encodeURIComponent(y);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var D=
+this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var D=this.createTemporaryGraph(D.getStylesheet()),E=D.getGlobalVariable,B=this.pages[0];D.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:E.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==u.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(y))));
+D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);A(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==u.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(y)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200==a.getStatus()&&A(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
+u.xml&&0<u.xml.length&&this.setFileData(u.xml);z=this.createLoadMessage("export");if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))v=this.getXmlFileData(),z.xml=mxUtils.getXml(v),z.data=this.getFileData(null,null,!0,null,null,null,v),z.format=u.format;else if("html"==u.format)y=this.editor.getGraphXml(),z.data=this.getHtml(y,this.editor.graph),z.xml=mxUtils.getXml(y),z.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;v=this.editor.graph.background;
+v==mxConstants.NONE&&(v=null);z.xml=this.getFileData(!0);z.format="svg";if(u.embedImages||null==u.embedImages){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==u.format?this.getEmbeddedSvg(z.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(z),"*")})):this.convertImages(this.editor.graph.getSvg(v),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(z),"*")}));return}v="xmlsvg"==u.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(v));z.data=this.createSvgDataUri(v)}g.postMessage(JSON.stringify(z),"*")}return}if("load"==u.action)d=1==u.autosave,this.hideDialog(),null!=u.modified&&null==urlParams.modified&&(urlParams.modified=
u.modified),null!=u.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=u.saveAndExit),null!=u.title&&null!=this.buttonContainer&&(v=document.createElement("span"),mxUtils.write(v,u.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(v)),u=null!=u.xmlpng?this.extractGraphModelFromPng(u.xmlpng):null!=
u.xml&&"data:image/png;base64,"==u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):u.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage"}),"*");return}}u=r(u);c=!0;try{a(u,f)}catch(F){this.handleError(F)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var G=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=G();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=
G();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
@@ -2876,14 +2877,14 @@ c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.background
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))}})}for(var n=this.toolbarItems,m=0,p=null,r=null,s=0;s<n.length;s++){var q=n[s];if("pages"==q){var t=[],r=b.ownerDocument.createElement("div");
r.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.setOpacity(r,70);var u=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";c.appendChild(r);var v=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight=
-"0px";var A=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=A&&(t=this.xmlNode.getElementsByTagName("diagram"),this.currentPage=0,r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),A=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display}),y=this.graph.getModel();this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)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"==q){if(this.layersEnabled){var y=this.graph.getModel(),
-x=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=x.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
-p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");y.addListener(mxEvent.CHANGE,function(){x.style.display=1<y.getChildCount(y.root)?"inline-block":"none"});x.style.display=1<y.getChildCount(y.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
+"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=x&&(t=this.xmlNode.getElementsByTagName("diagram"),this.currentPage=0,r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),x=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display}),z=this.graph.getModel();this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)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"==q){if(this.layersEnabled){var z=this.graph.getModel(),
+y=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=y.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
+p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(q=this.graphConfig["toolbar-buttons"][q],null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.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 z=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"==z&&(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!=p&&(p.parentNode.removeChild(p),
-p=null),b.style.border=z)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",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!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)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()};
@@ -2902,5 +2903,5 @@ GraphViewer.getUrl=function(a,b,c){var d=0<navigator.userAgent.indexOf("MSIE 9")
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function f(b,c){if(b.resizedAttached){if(b.resizedAttached){b.resizedAttached.add(c);return}}else b.resizedAttached=new e,b.resizedAttached.add(c);b.resizeSensor=document.createElement("div");
b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='\x3cdiv class\x3d"resize-sensor-expand" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s;"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"resize-sensor-shrink" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"\x3e\x3c/div\x3e\x3c/div\x3e';
b.appendChild(b.resizeSensor);if("static"==(b.currentStyle?b.currentStyle.position:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue("position"):b.style.position))b.style.position="relative";var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),
-l=!1),a(n))};a(n);var A,y,x,z,C=function(){if((x=b.offsetWidth)!=A||(z=b.offsetHeight)!=y)l=!0,A=x,y=z;k()},E=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};E(d,"scroll",C);E(g,"scroll",C)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
+l=!1),a(n))};a(n);var x,z,y,A,D=function(){if((y=b.offsetWidth)!=x||(A=b.offsetHeight)!=z)l=!0,x=y,z=A;k()},E=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};E(d,"scroll",D);E(g,"scroll",D)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
0,n=c.length;k<n;k++)f(c[k],g);else f(c,g);this.detach=function(){if(l)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();(function(){Editor.initMath();GraphViewer.initCss();mxStencilRegistry.dynamicLoading=!1;if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); \ No newline at end of file
diff --git a/war/resources/dia_pt-br.txt b/war/resources/dia_pt-br.txt
index a4f64eef..14fc6659 100644
--- a/war/resources/dia_pt-br.txt
+++ b/war/resources/dia_pt-br.txt
@@ -1,7 +1,7 @@
# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*
# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE
aboutDrawio=Sobre draw.io
-accessDenied=Access Denied
+accessDenied=Acesso Negado
actualSize=Tamanho real 
add=Adicionar
addImages=Adicionar imagens
@@ -10,12 +10,12 @@ addLayer=Adicionar camada
addProperty=Adicionar propriedade
addToExistingDrawing=Adicionar ao desenho existente
addWaypoint=Adicionar ponto de notificação
-adjustTo=Adjust to
+adjustTo=Ajustar para
advanced=Avançado
align=Alinhar 
alignment=Alinhamento
allChangesLost=Todas as modificações serão perdidas! 
-allPages=All Pages
+allPages=Todas as páginas
android=Android
angle=Ângulo
areYouSure=Tem certeza?
@@ -31,7 +31,7 @@ arrow=Seta
arrows=Setas
asNew=Como novo
atlas=Atlas
-author=Author
+author=Autor
authorizationRequired=Autorização necessária
authorizeThisAppIn=Autorize esse aplicativo em {1}:
authorize=Autorizar
@@ -63,7 +63,7 @@ bpmn=BPMN
browser=Navegador
bulletedList=Lista com marcadores
business=Business
-busy=Operation in progress
+busy=Operação em andamento
cabinets=Cabinets
cancel=Cancelar 
center=Centro 
@@ -106,7 +106,7 @@ connectionArrows=Connection Arrows
connectionPoints=Pontos de conexão
constrainProportions=Restringir proporções
containsValidationErrors=Contém erros de validação 
-copiedToClipboard=Copied to clipboard
+copiedToClipboard=Copiado para a área de transferência
copy=Copiar
copyConnect=Copiar ao conectar
copyOf=Cópia de {1}
@@ -116,7 +116,7 @@ create=Criar
createNewDiagram=Criar novo diagrama
createRevision=Criar revisão
createShape=Criar forma
-crop=Crop
+crop=Recortar
curved=Curvado
custom=Personalizado
current=Atual
@@ -126,21 +126,21 @@ decideLater=Decidir mais tarde
default=Default
delete=Excluir
deleteColumn=Excluir coluna
-deleteLibrary401=Insufficient permissions to delete this library
-deleteLibrary404=Selected library could not be found
-deleteLibrary500=Error deleting library
+deleteLibrary401=Permissões insuficientes para excluir esta biblioteca
+deleteLibrary404=Biblioteca selecionada não foi encontrada
+deleteLibrary500=Erro ao excluir o biblioteca
deleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?
deleteRow=Excluir linha
-description=Description
-device=Aparelho
+description=Descrição
+device=Dispositivo
diagram=Diagrama
diagramLocked=Diagrama travado para previnir futuras perdas de dados.
diagramName=Nome do diagrama
diamond=Diamante
-diamondThin=Diamante (Fino)
+diamondThin=Diamante (fino)
didYouKnow=Você sabia...
direction=Direção 
-discard=Discard
+discard=Descartar
discardChangesAndReconnect=Descartar mudanças e reconectar
googleDriveMissing=Google Drive ausente?
disconnected=Desconectado
@@ -151,25 +151,25 @@ doubleClickOrientation=Clique duas vezes para mudar de orientação 
doubleClickTooltip=Clique duas vezes para inserir texto
download=Baixar
downloadAs=Baixar como
-clickHereToSave=Click here to save.
-draftDiscarded=Draft discarded
-draftSaved=Draft saved
-dragElementsHere=Drag elements here
+clickHereToSave=Clique aqui para salvar.
+draftDiscarded=Rascunho descartado
+draftSaved=Rascunho salvo
+dragElementsHere=Arraste elementos aqui
dragImagesHere=Arraste imagens ou URLs aqui
dragUrlsHere=Arraste URLs aqui
draw.io=draw.io
drawing=Desenho{1}
drawingEmpty=Desenho está vazio
drawingTooLarge=O desenho é muito grande 
-drawioForWork=Draw.io for Work
+drawioForWork=Draw.io para Trabalho
dropbox=Dropbox
duplicate=Duplicar
duplicateIt=Duplicar {1]
divider=Dividir
east=Leste
edit=Editar 
-editData=Edit Data
-editDiagram=Edit Diagram
+editData=Editar dados
+editDiagram=Editar diagrama
editGeometry=Editar geometria
editImage=Editar imagem
editImageUrl=Editar URL de Imagem
@@ -193,12 +193,12 @@ enterPropertyName=Inserir nome de propriedade
enterValue=Inserir o valor 
entityRelation=Relação de entidade
error=Erro 
-errorDeletingFile=Error Deleting File
+errorDeletingFile=Erro ao excluir o aquivo
errorLoadingFile=Erro ao carregar o arquivo
errorRenamingFile=Erro ao renomear o arquivo.
errorRenamingFileNotFound=Erro ao renomear o arquivo. Arquivo não encontrado.
errorRenamingFileForbidden=Erro ao renomear o arquivo. Direitos de acesso insuficientes.
-errorSavingDraft=Error saving draft
+errorSavingDraft=Erro ao salvar o rascunho
errorSavingFile=Erro ao salvar o arquivo
errorSavingFileUnknown=Erro ao autorizar com servidores do Google. Por favor, atualize a página para tentar novamente.
errorSavingFileForbidden=Erro ao salvar o arquivo. Direitos de acesso insuficientes.
@@ -210,7 +210,7 @@ exit=Sair
exitGroup=Sair do Grupo
expand=Expandir
export=Exportar
-exporting=Exporting
+exporting=Exportando
exportAs=Exportar como
exportOptionsDisabled=Export options disabled
exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
@@ -389,7 +389,7 @@ nextPage=Next Page
noColor=Sem cor
noFiles=Nenhum arquivo
noFileSelected=Nenhum arquivo selecionado
-noLibraries=No libraries found
+noLibraries=Nenhuma biblioteca encontrada
noMoreResults=Sem mais resultados
none=Nada
noOtherViewers=Nenhum outro usuário
@@ -418,7 +418,7 @@ openArrow=Abrir seta
openExistingDiagram=Abrir diagrama existente
openFile=Abrir arquivo 
openFrom=Abrir de
-openLibrary=Open Library
+openLibrary=Abrir biblioteca
openLibraryFrom=Abrir biblioteca de
openLink=Abrir link
openInNewWindow=Abrir numa outra janela
@@ -433,8 +433,8 @@ otherViewer=outro usuário
otherViewers=outros usuários
outline=Contorno
oval=Oval 
-page=Page
-pageWithNumber=Page-{1}
+page=Página
+pageWithNumber=Página-{1}
pages=Páginas
pageView=Layout da Página 
pageSetup=Configuração da Página
@@ -462,17 +462,17 @@ position=Posição 
posterPrint=Imprimir Cartaz 
preferences=Preferências
preview=Pré-visualizar 
-previousPage=Previous Page
+previousPage=Página anterior
print=Imprimir 
-printAllPages=Print All Pages
+printAllPages=Imprimir todas as páginas
procEng=Proc. Eng.
properties=Propriedades
-publish=Publish
+publish=Publicar
publishConfirmation=This will make your diagram public on imgur.com.
-published=Published
-publishedAt=Published at {1}
-publishing=Publishing
-deleteUrl=Link to delete: {1}
+published=Publicado
+publishedAt=Publicado em {1}
+publishing=Publicando
+deleteUrl=Link para excluir: {1}
quickStart=Introdução rápida vídeo
rack=Rack
radialTree=Árvore radial
@@ -492,7 +492,7 @@ rename=Renomear
renamed=Renomeado
renameIt=Renomear {1}
renaming=Renomeando
-replace=Replace
+replace=Substituir
replaceIt={1} já existe. Você deseja substituí-lo? 
replaceExistingDrawing=Substituir desenho já existente
required=obrigatório
@@ -500,7 +500,7 @@ reset=Reset
resetView=Reset View
resize=Redimensionar
retina=Retina
-responsive=Responsive
+responsive=Responsivo
restore=Restaurar
restoring=Restaurando
retryingIn=Tentando novamente em {1} segundo(s)
@@ -523,7 +523,7 @@ saveDiagramsTo=Salvar diagramas em
saveLibrary403=Insufficient permissions to edit this library
saveLibrary500=There was an error while saving the library
saving=Salvando
-scratchpad=Scratchpad
+scratchpad=Bloco de rascunho
scrollbars=Barras de rolagem
search=Buscar
searchShapes=Search Shapes
@@ -550,11 +550,11 @@ showStartScreen=Show Start Screen
sidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.
signs=Signs
signOut=Sair
-simple=Simple
+simple=Simples
simpleArrow=Seta simples
size=Tamanho 
-solid=Solid
-sourceSpacing=Espaçamento Fonte
+solid=Sólido
+sourceSpacing=Espaçamento entre fontes
south=Sul
software=Software
spacing=Espaçamento 
@@ -577,7 +577,7 @@ textAlignment=Alinhamento de texto 
textOpacity=Opacidade do Texto
theme=Tema
timeout=Tempo esgotado
-title=Title
+title=Título
to=to
toBack=Para trás 
toFront=Para a frente 
@@ -587,7 +587,7 @@ topAlign=Alinhar ao topo
topLeft=Top Left
topRight=Top Right
transparent=Transparente
-transparentBackground=Transparent Background
+transparentBackground=Fundo Transparente
tryAgain=Tentar novamente
tryOpeningViaThisPage=Try opening via this page.
turn=Virar
@@ -598,9 +598,9 @@ undo=Desfazer 
ungroup=Desagrupar 
unsavedChanges=Mudanças não salvas
unsavedChangesClickHereToSave=Unsaved changes. Click here to save.
-untitled=Untitled
+untitled=Sem título
untitledDiagram=Diagrama sem título
-untitledLayer=Untitled Layer
+untitledLayer=Camada sem título
untitledLibrary=Biblioteca sem título
unknownError=Erro desconhecido
updatingDocument=Atualizando documento. Por favor, aguarde... 
@@ -608,13 +608,13 @@ updatingPreview=Atualizando pré-visualização. Por favor, aguarde...
updatingSelection=Atualizando seleção. Por favor, aguarde... 
upload=Carregar
url=URL
-userManual=User Manual
+userManual=Manual do Usuário
vertical=Vertical 
verticalFlow=Fluxo vertical
verticalTree=Árvore vertical
view=Visualização
viewUrl=Link to view: {1}
-voiceAssistant=Voice Assistant (beta)
+voiceAssistant=Assistente de Voz (beta)
warning=Warning
waypoints=Pontos de notificação
west=Oeste
@@ -632,7 +632,7 @@ charts=Gráficos
engineering=Engenharia
flowcharts=Fluxograma
gmdl=Material Design
-mindmaps=Mapas da mente
+mindmaps=Mapas mentais
mockups=Maquetes
networkdiagrams=Rede de diagramas
nothingIsSelected=Nenhuma seleção
diff --git a/war/styles/grapheditor.css b/war/styles/grapheditor.css
index 002f3501..b2119334 100644
--- a/war/styles/grapheditor.css
+++ b/war/styles/grapheditor.css
@@ -351,7 +351,15 @@ div.mxWindow .geButton {
}
.geTitle img:hover {
opacity:1;
- _filter:alpha(opacity=100);
+ _filter:alpha(opacity=100);
+}
+.geTitle .geButton {
+ border:1px solid transparent;
+ padding:3px;
+ border-radius:2px;
+}
+.geTitle .geButton:hover {
+ border:1px solid gray;
}
.geSidebar .geItem {
display:inline-block;